gdb-doc-7.6.2/0000755000175000017500000000000012266504106012065 5ustar zumbizumbigdb-doc-7.6.2/ChangeLog0000644000175000017500000164201712250773211013650 0ustar zumbizumbi2013-08-29 Joel Brobecker * src-release (VER): Strip any "-cvs" suffix from the version number, if extracted from $(TOOL)/version.in. 2013-02-15 Yufeng Zhang * configure.ac: Sync with GCC repo. * configure: Ditto. 2013-02-05 Ian Lance Taylor PR go/55969 * configure.ac: Disable libgo on some systems where it does not work. * configure: Rebuild. 2013-02-05 Alan Modra * configure: Regenerate after syncing config/. 2013-01-15 Jan-Benedict Glaw * configure.ac: Sync with GCC repo. * configure: Ditto. * Makefile.def: Ditto. * Makefile.in: Ditto. 2013-01-11 Joel Brobecker Sync with GCC, merge: 2013-01-09 Jason Merrill * .gitignore: Import from gdb repository. 2013-01-11 Jan-Benedict Glaw * config.sub: Update from config repo. 2013-01-11 Eric Botcazou * Makefile.tpl (BOOT_ADAFLAGS): Remove -gnata. * Makefile.in: Regenerate. 2013-01-09 H.J. Lu * Makefile.def (configure-gcc): Depend on all-gmp. (all-gcc): Remove dependency on all-gmp. * Makefile.in: Regenerated. 2013-01-08 Jan-Benedict Glaw * config.guess: Update from config repo. * config.sub: Ditto. 2013-01-07 Jeff Johnston * COPYING.LIBGLOSS: Remove license for mips/lsi33k-stub.h which no longer exists and replace the new bfin license in its location. 2013-01-07 H.J. Lu PR gas/14899 * Makefile.def (dependencies): Make all-binutils, all-gprof, all-ld and all-gold depend on all-gas. * Makefile.in: Regenerated. 2012-12-29 Ben Elliston * config.guess: Update to 2012-12-29 version. * config.sub: Likewise. 2012-12-20 Jan-Benedict Glaw * Makefile.def (install-target-libgo): Depend on install-target-libatomic. Merged from GCC repo. * Makefile.in: Regenerate. 2012-12-17 Jeff Johnston * COPYING.LIBGLOSS: Add license for bfin libgloss. 2012-12-16 Thomas Schwinge * configure.ac (ENABLE_GOLD): Consider *-*-gnu* targets ELF. * configure: Regenerate. 2012-12-11 H.J. Lu * Makefile.def (target_modules): Add bootstrap=true and raw_cxx=true to libsanitizer. * configure.ac (bootstrap_target_libs): Add libsanitizer. * Makefile.in: Regenerated. * configure: Likewise. 2012-12-08 Jan-Benedict Glaw * config.sub: Merge from config repo. 2012-11-30 Jan-Benedict Glaw * configure.ac: Merge from GCC. * Makefile.tpl: Ditto. * Makefile.in: Ditto. * configure: Ditto. 2012-11-28 Jan-Benedict Glaw * configure.ac (noconfigdirs): Merge from GCC. * configure: Regenerate. 2012-11-19 Jan-Benedict Glaw * config.sub (arm): Merge from upstream: Handle armv[6-8] targets. 2012-11-14 Roland McGrath * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. * configure: Regenerate. 2012-11-13 Richard Henderson * configure.ac: Move libsanitizer logic to subdirectory. * configure: Regenerate. 2012-11-13 Dodji Seketeli * configure.ac: Enable libsanitizer just on x86 linux for now. * configure: Re-generate. 2012-11-13 David Edelsohn * configure.ac: Merge libquadmath sections. * configure: Regenerate. 2012-11-12 Wei Mi * configure.ac: Add libsanitizer to target_libraries. * Makefile.def: Ditto. * configure: Regenerate. * Makefile.in: Regenerate. 2012-11-03 H.J. Lu * configure: Regenerated. 2012-11-03 Robert Mason * configure.ac: add --disable-libstdcxx configure option and handle defaulted state only for VxWorks, ARM-wince-pe and AVR. 2012-10-24 Corinna Vinschen * configure.ac (FLAGS_FOR_TARGET,target=cygwin): Fix for building against Mingw64 w32api. * configure: Regenerate. 2012-10-23 Eric Botcazou PR bootstrap/54820 * configure.ac (have_static_libs): Force 'no' for GCC version < 4.5. * configure: Regenerate. 2012-10-22 Eric Botcazou PR bootstrap/54820 * Makefile.tpl (STAGE1_FLAGS_TO_PASS): New variable. (all-[+prefix+][+module+]): Pass stage1_args to sub-makes. (all-stage[+id+]-[+prefix+][+module+]): Likewise, if prev is false. (clean-stage[+id+]-[+prefix+][+module+]): Likewise, if prev is false. (host_modules): Set stage1_args to STAGE1_FLAGS_TO_PASS. * Makefile.in: Regenerate. * configure.ac (have_static_libs): New variable and associated check. (stage1-ldflags): Move to after stage1_libs and set to -static-libstdc++ -static-libgcc if stage1_libs is empty and have_static_libs is yes. * configure: Regenerate. 2012-10-10 David Holsgrove * config.guess, config.sub: Include updated version from config-patches. Adds microblaze little endian support. 2012-09-28 Ian Lance Taylor * Makefile.def: Make all-target-libgo depend on all-target-libbacktrace. * Makefile.in: Rebuild. 2012-09-26 Ian Lance Taylor * Makefile.def: Make all-gcc depend on all-libbacktrace. * Makefile.in: Rebuild. 2012-09-06 Diego Novillo * configure.ac: Bump minimum GMP version to 4.2.3. * configure: Re-generate. 2012-09-05 Georg-Johann Lay PR target/54461 * configure.ac (noconfigdirs,target=avr-*-*): Add target-newlib, target-libgloss if not configured --with-avrlibc=no. * configure: Regenerate. 2012-09-04 Jason Merrill * configure.ac: Fix --enable-languages=all. 2012-09-03 Richard Guenther PR bootstrap/54138 * configure.ac: Re-organize ISL / CLOOG checks to allow disabling with either --without-isl or --without-cloog. * configure: Regenerated. 2012-09-03 Georg-Johann Lay * configure.ac (noconfigdirs,target=avr): Add target-libquadmath. * configure: Regenerate. 2012-09-21 Steve Ellcey * configure.ac: Add mips*-mti-elf* target. * configure: Regenerate. 2012-09-19 Ian Lance Taylor * configure.ac (host_libs): Add libbacktrace. (target_libraries): Add libbacktrace. * Makefile.def (host_modules): Add libbacktrace. (target_modules): Likewise. * configure, Makefile.in: Rebuild. 2012-09-15 Jiong Wang * configure.ac (ENABLE_GOLD): support tilegx* * configure: rebuild 2012-09-14 David Edelsohn PR target/38607 Merge upstream change. * libtool.m4 (_LT_COMPILER_PIC): Add -fPIC to GCC and GXX for AIX. * configure.ac: Add target-libquadmath to noconfigdirs for AIX. Add libgomp*.o to compare_exclusions for AIX. * configure: Regenerate. 2012-08-26 H.J. Lu PR binutils/4970 * Makefile.def (host_modules): Rmove lib_path=.libs from bfd and opcodes. * Makefile.in: Regenerated. 2012-08-14 Diego Novillo Merge from cxx-conversion branch. * Makefile.tpl (STAGE[+id+]_CXXFLAGS): Remove POSTSTAGE1_CONFIGURE_FLAGS. * Makefile.in: Regenerate. * configure.ac (ENABLE_BUILD_WITH_CXX): Remove. Update all users. Force C++ when bootstrapping. * configure: Regenerate. 2012-07-06 Richard Guenther * Makefile.def (cloog): Pass $(HOST_GMPINC) and $(HOST_ISLINC) as CPPFLAGS, pass path to built gmp as LDFLAGS, always use --with-gmp=system. * Makefile.in: Regenerated. * configure: Likewise. 2012-07-06 Richard Guenther * configure.ac (extra_isl_gmp_configure_flags): Initialize and subst. * Makefile.def (isl): Use extra_isl_gmp_configure_flags and supply V=1 as extra_make_flags. * configure: Regenerated. * Makefile.in: Likewise. 2012-07-03 Richard Guenther * Makfile.def (isl): Remove not necessary extra_exports and extra_make_flags. (cloog): Use $$CPPFLAGS instead of ${CPPFLAGS}. * Makefile.in: Regenerated. 2012-07-03 Richard Guenther * Makefile.def (cloog): Add V=1 to extra_make_flags. * configure.ac: If either the ISL or the CLooG check failed do not try to build in-tree versions. * Makefile.in: Regenerated. * configure: Regenerated. 2012-07-02 Richard Guenther Michael Matz Tobias Grosser Sebastian Pop * Makefile.def: Add ISL host module, remove PPL host module. Adjust ClooG host module to use the proper ISL. * Makefile.tpl: Pass ISL include flags instead of PPL ones. * configure.ac: Include config/isl.m4. Add ISL host library, remove PPL. Remove PPL configury, add ISL configury, adjust ClooG configury. * Makefile.in: Regenerated. * configure: Likewise. 2012-07-02 Richard Guenther Merge from graphite branch 2011-07-21 Tobias Grosser * configure: Regenerated. * config/cloog.m4: Remove support for CLooG-ppl and CLooG-parma, both cloog.org and legacy versions. The only supported version will be CLooG with the isl backend. 2011-07-21 Tobias Grosser * configure: Regenerated. * configure.ac: Require cloog isl 0.17.0 2011-07-21 Tobias Grosser * configure: Regenerated. * config/cloog.m4: Do not define CLOOG_ORG 2012-06-29 Steven Bosscher * configure.ac: Skip C if explicitly selected. * configure: Regenerate. 2012-06-28 Christophe Lyon * configure.ac (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Make sure they contain -O2. * configure: Regenerate. 2012-06-20 Jason Merrill * Makefile.tpl (check-target-libgomp-c++): New. (check-target-libitm-c++): New. * Makefile.def (c++): Add them. * Makefile.in: Regenerate. 2012-05-16 Olivier Hainque * Makefile.tpl (gcc-no-fixedincludes): Rename into ... (gcc-install-no-fixedincludes): Now forwarder to local target in gcc/ (install-no-fixedincludes): Adjust accordingly. * Makefile.in: Regenerate. 2012-05-09 Nick Clifton Paul Smith PR bootstrap/50461 * configure.ac (mpfr-dir): When using in-tree MPFR sources allow for the fact that from release v3.1.0 of MPFR the source files were moved into a src sub-directory. * configure: Regenerate. 2012-05-07 Janne Blomqvist * configure.ac: Bump minimum MPFR version to 2.4.0. * configure: Regenerated. 2012-05-01 Richard Henderson * Makefile.def (libatomic): New target_module. * configure.ac (target_libraries): Add libatomic. (noconfigdirs): Check if libatomic is supported. * Makefile.in, configure: Rebuild. 2012-05-15 H.J. Lu Merge upstream change * libtool.m4 (_LT_ENABLE_LOCK): Support x32. 2011-11-21 Andreas Tobler * libtool.m4: Additional FreeBSD 10 fixes. 2012-06-28 Christophe Lyon * configure.ac (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Make sure they contain -O2. * configure: Regenerate. 2012-05-14 Catherine Moore * NEWS: Mention PowerPC VLE port. 2012-05-11 Mike Frysinger * MAINTAINERS (config/): Move to intl/ section. (compile; depcomp; install-sh; missing; ylwrap): Likewise. 2012-05-09 Nick Clifton Paul Smith PR bootstrap/50461 * configure.ac (mpfr-dir): When using in-tree MPFR sources allow for the fact that from release v3.1.0 of MPFR the source files were moved into a src sub-directory. * configure: Regenerate. 2012-05-02 Roland McGrath * configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF. * configure: Regenerate. 2012-04-25 Joel Brobecker * config.sub: Update to 2012-04-18 version from official repo. 2012-03-19 Tristan Gingold * configure.ac (ia64*-*-*vms*): Add support for ld. * configure: Regenerate. 2012-03-14 Rainer Orth * configure.ac (enable_libgomp): Remove *-*-irix6*. (unsupported_languages): Remove mips-sgi-irix6.*. (noconfigdirs): Don't add ${libgcj} for mips*-*-irix6*. (with_stabs): Remove. * configure: Regenerate. 2012-03-12 Rainer Orth * configure.ac (enable_libgomp): Remove *-*-osf*. (with_stabs): Remove alpha*-*-osf*. * configure: Regenerate. 2012-03-09 Jeff Johnston * COPYING.NEWLIB: Modify DJ Delorie license to include modification rights in clause as permitted by DJ Delorie. * COPYING.LIBGLOSS: Ditto. 2012-03-09 Jeff Johnston * COPYING.NEWLIB: Remove two unused licenses. 2012-03-05 Tristan Gingold * configure.ac: Enable gdb and readline for ia64*-*-*vms*. * configure: Regenerate. 2012-02-21 Joern Rennecke * COPYING.NEWLIB: Add Adapteva notice. * COPYING.LIBGLOSS: Add Adapteva notice. 2011-12-18 Eric Botcazou * configure: Regenerate. 2011-12-15 Jeff Johnston * COPYING.LIBGLOSS: Add GPL with exception license. 2011-11-09 Roland McGrath * configure.ac: Add tool checks for READELF and READELF_FOR_TARGET. * configure: Rebuild. * Makefile.def (flags_to_pass): Add READELF_FOR_TARGET. * Makefile.tpl (READELF, READELF_FOR_TARGET): New variables. (HOST_EXPORTS): Add READELF, READELF_FOR_TARGET. (BASE_FLAGS_TO_PASS): Add READELF_FOR_TARGET. (BASE_TARGET_EXPORTS, EXTRA_HOST_FLAGS, EXTRA_TARGET_FLAGS): Add READELF. * Makefile.in: Rebuild. 2011-11-08 Richard Henderson * configure.ac: Test for libitm directory present first. * configure.ac: Adjust srcdir for running libitm/configure.tgt. * configure.ac: Test libitm/configure.tgt to disable libitm. * configure: Rebuild. 2011-11-02 Rainer Orth * Makefile.tpl (EXTRA_GCC_FLAGS): Remove LIBGCC2_CFLAGS, LIBGCC2_DEBUG_CFLAGS, LIBGCC2_INCLUDES. * Makefile.in: Regenerate. 2011-11-01 DJ Delorie * configure.ac (rl78-*-*) New case. * configure: Regenerate. 2011-11-01 DJ Delorie * config.sub: Update to version 2011-10-29 (added rl78) 2011-10-27 Nick Clifton * config.sub: Import these changes from the config project: 2011-10-08 Joern Rennecke Ben Elliston * config.sub (epiphany): New. 2011-09-09 Linas Vepstas Ben Elliston * config.sub (hexagon, hexagon-*): New. 2011-08-23 Roland McGrath * config.sub: Rename 32eb to be32, 32el to le32, 64el to le64, and 64eb to be64. 2011-08-16 Roland McGrath * config.sub (32eb, 32el, 64eb, 64el): New (pseudo-)CPUs. (nacl): Grok as alias for 32el-unknown-nacl. 2011-08-19 Joel Brobecker * src-release (GDB_SUPPORT_DIRS): Add 'cpu'. 2011-08-14 Yao Qi Merge from gcc: 2011-08-14 Yao Qi * configure.ac (tic6x-*-*): Remove gdb from noconfigdirs. * configure: Regenerate. 2011-07-26 Ian Lance Taylor Merge from gcc: 2011-07-26 Ian Lance Taylor * configure.ac: Set have_compiler based on whether gcc directory exists, rather than on whether gcc is in configdirs. * configure: Rebuild. 2011-07-20 David Edelsohn * Makefile.tpl (POSTSTAGE1_CONFIGURE_FLAGS): Add libsupc++ to link directories. * Makefile.in: Rebuild. 2011-07-20 Ian Lance Taylor PR bootstrap/49787 * configure.ac: Move --enable-bootstrap handling earlier in file. If --enable-bootstrap and either --enable-build-with-cxx or --enable-build-poststage1-with-cxx, enable C++ automatically. * configure: Rebuild. 2011-07-19 Ian Lance Taylor * configure.ac: Add --enable-build-poststage1-with-cxx. If set, make C++ a boot_language. Set and substitute POSTSTAGE1_CONFIGURE_FLAGS. * Makefile.tpl (POSTSTAGE1_CONFIGURE_FLAGS): New variable. (STAGE[+id+]_CONFIGURE_FLAGS): Add $(POSTSTAGE1_CONFIGURE_FLAGS). * configure, Makefile.in: Rebuild. 2011-07-16 Jason Merrill * Makefile.def (language=c++): Add check-c++0x and check-target-libmudflap-c++. * Makefile.tpl (check-target-libmudflap-c++): New. * Makefile.in: Regenerate. 2011-07-16 Matthias Klose * Makefile.tpl (EXTRA_CONFIGARGS_LIBJAVA): Define. * Makefile.def (target_modules/libjava): Pass $(EXTRA_CONFIGARGS_LIBJAVA). * configure.ac: Pass --disable-static in EXTRA_CONFIGARGS_LIBJAVA, if not configured with --enable-static-libjava. * Makefile.in: Regenerate. * configure: Likewise. 2011-06-22 Hans-Peter Nilsson PR regression/47836 PR bootstrap/23656 PR other/47733 PR bootstrap/49247 PR c/48825 * configure.ac (target_libraries): Remove target-libiberty. Remove case-statement setting skipdirs=target-libiberty for multiple targets. Remove checking target_configdirs and removing target-libiberty but keeping target-libgcc if otherwise empty. * Makefile.def (target_modules): Don't add libiberty. (dependencies): Remove all traces of target-libiberty. * configure, Makefile.in: Regenerate. 2011-07-22 Jason Merrill * Makefile.def (language=c++): Add check-c++0x and check-target-libmudflap-c++. * Makefile.tpl (check-target-libmudflap-c++): New. * Makefile.in: Regenerate. 2011-07-18 Rainer Orth * configure: Regenerate. 2011-07-07 Rainer Orth PR target/39150 * configure.ac (i[3456789]86-*-solaris2*): Also accept x86_64-*-solaris2.1[0-9]*. * configure: Regenerate. 2011-06-13 Walter Lee * configure.ac (tilepro-*-*) New case. (tilegx-*-*): Likewise. * configure: Regenerate. 2011-06-06 Nick Clifton * config.sub: Sync from upstream. 2011-05-08 Doug Kwan Merge from gcc: 2011-05-08 Doug Kwan * configure.ac: Propagate LDFLAGS_FOR_TARGET. * configure: Regenerated. * Makefile.tpl (LDFLAGS_FOR_TARGET): Use LDFLAGS_FOR_TARGET value from configure. * Makefile.in: Regenerated. 2011-05-05 Joseph Myers * configure.ac (alpha*-dec-osf*, i[[3456789]]86-*-rdos*, sh*-*-pe|mips*-*-pe|arm-wince-pe, sparc-*-sunos4*, *-*-aix*, *-*-beos*, *-*-chorusos, *-*-dragonfly*, *-*-freebsd*, *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu, *-*-lynxos*, *-*-mingw*, *-*-netbsd*, *-*-netware*, *-*-tpf*, *-*-uclinux*, *-*-vxworks*): Disable newlib and libgloss in separate case statement. (i[[3456789]]86-*-linux*): Move logic allowing newlib to be built to separate case statement. (*-*-chorusos, *-*-dragonfly*, *-*-freebsd*, *-*-netbsd*, *-*-netware*, *-*-tpf*, *-*-uclinux*, *-*-vxworks*, alpha*-dec-osf*, alpha*-*-linux*, am33_2.0-*-linux*, sh-*-linux*, sh*-*-pe|mips*-*-pe|*arm-wince-pe, arm-*-coff, arm-*-elf* | arm*-*-eabi*, arm*-*-linux-gnueabi, arm*-*-symbianelf*, avr-*-*, bfin-*-*, cris-*-* | crisv32-*-*, frv-*-*, i[[3456789]]86-*-coff | i[[3456789]]86-*-elf, i[[3456789]]86-w64-mingw*, i[[3456789]]86-*-mingw*, x86_64-*-mingw*, i[[3456789]]86-*-interix*, i[[3456789]]86-*-beos*, i[[3456789]]86-*-rdos*, m32r-*-*, m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*, m68k-*-elf*, m68*-*-* | fido-*-*, powerpc-*-aix*, powerpc-*-beos*, powerpc-*-eabi, powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems*, rs6000-*-lynxos*, rs6000-*-aix*, mips*-*-linux*, sparclet-*-aout* | sparc86x-*-*, sparc-*-elf*, sparc64-*-elf*, sparclite-*-*, sparc-*-sunos4*, sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*, *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu, *-*-lynxos*, *-*-*): Don't disable newlib and libgloss in main case over targets. Remove most empty cases in main case over targets. * configure: Regenerate. 2011-05-04 Joseph Myers * configure.ac: Remove code setting special library locations for hppa*64*-*-hpux11*. Remove code setting compiler for sparc-sun-solaris2*. * configure: Regenerate. 2011-05-04 Joseph Myers * configure.ac: Separate libgloss_dir settings from general case over targets. * configure: Regenerate. 2011-04-28 Joseph Myers * configure.ac (*-*-dragonfly*, *-*-freebsd*, *-*-netbsd*, alpha*-dec-osf*, alpha*-*-linux*, alpha*-*-*, sh-*-linux*, arm-*-elf* | arm*-*-eabi*, arm*-*-linux-gnueabi, frv-*-*): Remove cases in libgcj-disabling case statement. (hppa*64*-*-linux*): Set unsupported_languages instead of disabling target-zlib. (hppa*64*-*-*): Restrict case in libgcj-disabling case statement to hppa*64*-*-hpux*. (hppa*-*-*): Restrict case in libgcj-disabling case statement to hppa*-*-hpux*. (ia64*-*-elf*, ia64*-**-hpux*, i[[3456789]]86-*-elf, i[[3456789]]86-*-linux*, *-*-cygwin*, i[[3456789]]86-*-interix*, i[[3456789]]86-*-solaris2*, m32r-*-*, m68k-*-elf*, m68*-*-* | fido-*-*, powerpc-*-eabi, powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems*, mips*-*-linux*, mips*-*-*, sh-*-* | sh64-*-*, sparc-*-elf*, sparc64-*-elf*, sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*, *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu, *-*-*): Remove cases in libgcj-disabling case statement. * configure: Regenerate. 2011-04-28 Joseph Myers * configure.ac: Disable Java for targets not supporting libffi. (*-*-chorusos, *-*-kaos*, am33_2.0-*-linux*, sh*-*-pe|mips*-*-pe): Remove cases in Java-disabling statement. (*arm-wince-pe): Change to arm-wince-pe. (arc-*-*, arm-*-coff, arm-*-pe*, arm-*-riscix*, avr-*-*): Remove cases in Java-disabling statement. (bfin-*-*): Don't disable Java again. (c4x-*-* | tic4x-*-*, tic54x-*-*, cr16-*-*, d10v-*-*, d30v-*-*, fr30-*-elf*, moxie-*-*, h8300*-*-*, h8500-*-*, hppa1.1-*-osf* | hppa1.1-*-bsd*, hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-openbsd*, hppa*-*-pro*, i960-*-*, i[[3456789]]86-*-coff, i[[3456789]]86-*-pe, i[[3456789]]86-*-sco3.2v5*, i[[3456789]]86-*-sco*, i[[3456789]]86-*-sysv4*, i[[3456789]]86-*-beos*, i[[3456789]]86-*-rdos*, m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*): Remove cases in Java-disabling statement. (mmix-*-*): Don't disable Java again. (mt-*-*, powerpc*-*-winnt* | powerpc*-*-pe*, powerpcle-*-solaris*, powerpc-*-beos*, rs6000-*-lynxos*, rs6000-*-*, m68k-apollo-*, microblaze*, mips*-sde-elf*, mips*-*-irix5*, mips*-*-bsd*, sparclet-*-aout* | sparc86x-*-*, sparclite-*-*, sparc-*-sunos4*, tic6x-*-*, v810-*-*, vax-*-*): Remove cases in Java-disabling statement. * configure: Regenerate. 2011-04-28 Joseph Myers Merge from GCC: 2011-04-18 Jack Howarth PR lto/48086 * configure.ac: Re-enable LTO on *-apple-darwin9*. * configure: Regenerate. 2011-04-28 Joseph Myers * configure.ac: Separate cases disabling Java and Java libraries from general case over targets. * configure: Regenerate. 2011-04-06 Joseph Myers * configure.ac (build_tools): Remove build-byacc. (host_libs): Remove mmalloc. (host_tools): Remove byacc make patch prms send-pr ash bash bzip2 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed perl gawk findutils gettext zip. (libgcj): Remove target-qthreads. (target_tools): Remove target-examples target-gperf. (YACC): Don't handle building byacc. * configure: Regenerate. * Makefile.def (ash, autoconf, automake, bash, byacc, bzip2, diff, dosutils, examples, fileutils, find, findutils, gawk, gettext, gnuserv, gperf, gzip, hello, indent, libtool, make, mmalloc, patch, perl, prms, qthreads, rcs, recode, release, sed, send-pr, shellutils, tar, textutils, time, uudecode, wdiff, zip): Don't handle building components. * Makefile.in: Regenerate. 2011-04-05 Ralf Wildenhues * config.sub: Sync from upstream. 2011-04-01 Joseph Myers * configure.ac (avr-*-*): Add comment about why libssp is disabled. (microblaze*): Don't disable libssp. * configure: Regenerate. 2011-04-01 Joseph Myers * configure.ac: Remove code setting CONFIG_SHELL, config_shell and moveifchange. * configure: Regenerate. * Makefile.tpl: Use @SHELL@ not @config_shell@. * Makefile.in: Regenerate. 2011-04-01 Joseph Myers * configure.ac (*-*-sysv4*): Don't enable libgomp. (alpha*-*-*vms*, i[[34567]]86-*-sco3.2v5*, mn10300-*-*, powerpc-*-chorusos*, powerpc*-*-eabi*, powerpc*-*-sysv*, powerpc*-*-kaos*, s390x-ibm-tpf*, sparc64-*-elf*, v850*-*-*, xtensa*-*-elf*, *-*-beos*, *-*-elf*, *-*-netware*, *-*-rtems*, *-*-sysv[[45]]*, *-*-vxworks*, *-wrs-windiss): Remove md_exec_prefix cases. * configure: Regenerate. 2011-04-01 Joseph Myers * configure.ac: Separate cases disabling target-libssp, target-libiberty, target-libstdc++-v3 and Fortran from general case over targets. * configure: Regenerate. 2011-04-01 Joseph Myers * configure.ac (*-*-chorusos): Don't disable libgcj. (*-*-freebsd[[12]] | *-*-freebsd[[12]].* | *-*-freebsd*aout*): Remove case. (*-*-kaos*): Don't disable GCC libraries, zlib or fastjar. (arm-*-coff): Don't disable libgcj. (arm*-*-linux-gnueabi): Remove useless assignment. (arm-*-riscix*): Don't disable libgcj. (bfin-*-*): Don't enable target-bsp and target-cygmon depending on configuration. (c4x-*-* | tic4x-*-*): Don't disable GCC libraries. (c54x*-*-*): Remove case. (tic54x-*-*): Don't disable GCC or GCC libraries. (cris-*-* | crisv32-*-*): Don't handle *-*-aout. Change *-*-elf to *. (d10v-*-*): Don't disable GCC libraries. (d30v-*-*): Don't disable libgcj. (h8500-*-*): Don't disable GCC libraries. (i960-*-*): Don't disable libgcj. (i[[3456789]]86-*-linux*): Don't handle *-*-*libc1*. (i[[3456789]]86-*-sco3.2v5*, i[[3456789]]86-*-sco*, i[[3456789]]86-*-sysv4*, i[[3456789]]86-*-beos*): Don't disable libgcj. (m68k-*-coff*): Remove case. (mmix-*-*): Don't disable libgloss on host. (mn10200-*-*, mn10300-*-*): Remove cases. (powerpc*-*-winnt* | powerpc*-*-pe*, powerpcle-*-solaris*, powerpc-*-beos*, m68k-apollo-*, mips*-*-irix5*, mips*-*-bsd*): Don't disable libgcj. (romp-*-*): Remove case. (sparclite-*-*, sparc-*-sunos4*): Don't disable libgcj. (sparc-*-solaris2.[[0-6]] | sparc-*-solaris2.[[0-6]].*): Remove case. (v810-*-*): Don't disable GCC libraries. (v850*-*-*, vax-*-vms, xtensa*-*-*): Remove cases. (ip2k-*-*): Don't disable GCC libraries. * configure: Regenerate. 2011-03-28 Joseph Myers * configure.ac (i[[3456789]]86-*-msdosdjgpp*): Don't disable libffi on host. (x86_64-*-mingw*, i[[3456789]]86-*-mingw32*): Don't disable newlib on host. (c54x*-*-* | tic54x-*-*): Don't disable newlib on host. * configure: Regenerate. 2011-03-26 John Marino * configure.ac: Add support for *-*-dragonfly* * configure: Regenerate. 2011-03-25 Joseph Myers * configure.ac (native_only): Remove. (i[[3456789]]86-*-msdosdjgpp*): Don't disable expect dejagnu send-pr uudecode guile gnuserv on host. (x86_64-*-mingw*): Don't disable expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool on host. (i[[3456789]]86-*-mingw32*): Don't disable expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool on host. (*-*-cygwin*, *-*-netbsd*): Remove host cases. (*-*-kaos*): Don't disable target-examples target-gperf on target. (alpha*-dec-osf*): Don't disable fileutils on target. (sh*-*-pe|mips*-*-pe|*arm-wince-pe): Don't disable target-examples texinfo send-pr expect dejagnu on target. (arm-*-elf* | arm*-*-eabi*, arm*-*-linux-gnueabi): Don't disable target-qthreads on target. (hppa*-hp-hpux11*, hppa*-*-*): Don't disable shellutils on target. (ia64*-*-elf*, ia64*-*-*vms*): Don't disable mmalloc on target. (i[[3456789]]86-w64-mingw*, i[[3456789]]86-*-mingw*, x86_64-*-mingw*): Don't disable expect on target. (*-*-cygwin*): Don't disable target-gperf on target. (powerpc*-*-winnt* | powerpc*-*-pe*): Don't disable make expect gnuserv on target. (powerpcle-*-solaris*): Don't disable make expect gnuserv on target. * configure: Regenerate. 2011-03-25 Joseph Myers * configure.ac (target_tools): Remove target-groff. (native_only): Remove target-groff. (hppa*64*-*-*): Don't disable byacc. (i[[3456789]]86-*-mingw32*): Remove commented-out noconfigdirs setting. (*-*-kaos*): Don't skip target-librx and target-groff. (*-*-netware*): Don't skip target-libmudflap. (*-*-tpf*): Don't skip target-libmudflap. (sh*-*-pe|mips*-*-pe|*arm-wince-pe): Don't condition configured directories on the host. (ia64*-*-*vms*): Don't skip tix. (sh-*-* | sh64-*-*): Don't condition skipped directories on the host. * configure: Regenerate. 2011-03-24 Paolo Bonzini * configure.ac: Remove references to mt-mep, mt-netware, mt-wince. * Makefile.def: Add all-utils soft dependencies. * Makefile.tpl: Remove GDB_NLM_DEPS. * configure: Regenerate. * Makefile.in: Regenerate. 2011-03-24 Paolo Bonzini Sync from GCC: 2011-03-24 Paolo Bonzini * configure.ac: Do not include mh-x86omitfp. * configure: Regenerate. 2011-03-24 Paolo Bonzini * configure.ac: Remove empty cases. * configure: Regenerate. 2011-03-24 Paolo Bonzini * Makefile.def: Add dependency from termcap to gdb. * Makefile.in: Regenerate. 2011-03-24 Paolo Bonzini * configure.ac: Remove all mentions of mh-sysv4 and mh-solaris. * configure: Regenerate. * Makefile.def: Remove all mentions of X11_FLAGS_TO_PASS. * Makefile.tpl: Likewise. * Makefile.in: Regenerate. 2011-03-24 Paolo Bonzini * configure.ac: Remove all mentions of tentative_cc. * configure: Regenerate. 2011-03-16 Jack Howarth PR lto/48086 * configure.ac: Re-enable LTO on *-apple-darwin9. * configure: Regenerate. 2011-03-24 Joseph Myers * configure.ac (i[[3456789]]86-*-vsta, i[[3456789]]86-*-go32*, i[[3456789]]86-*-beos*, powerpc-*-beos*, m68k-hp-hpux*, m68k-apollo-sysv*, m68k-apollo-bsd*, m88k-dg-dgux*, m88k-harris-cxux*, m88k-motorola-sysv*, mips*-dec-ultrix*, mips*-nec-sysv4*, mips*-sgi-irix4*, mips*-*-sysv4*, mips*-*-sysv*, i370-ibm-opened*, i[[3456789]]86-*-sysv5*, i[[3456789]]86-*-dgux*, i[[3456789]]86-ncr-sysv4.3*, i[[3456789]]86-ncr-sysv4*, i[[3456789]]86-*-sco3.2v5*, i[[3456789]]86-*-sco*, i[[3456789]]86-*-udk*, vax-*-ultrix2*, m68k-sun-sunos*, hppa*-*-hiux*, *-*-hiux*, rs6000-*-lynxos*, *-*-sysv4*, *-*-rhapsody*): Remove host cases. * configure: Regenerate. 2011-03-24 Joseph Myers * configure.ac (ppc*-*-pe): Remove host case. (strongarm-*-coff | xscale-*-coff, strongarm-*-elf* | xscale-*-elf*, thumb-*-coff, thumb-*-elf, thumb-*-pe, ep9312-*-elf | ep9312-*-coff, parisc*64*-*-linux*, ppc*-*-pe): Remove target cases. * configure: Regenerate. 2011-03-24 Joseph Myers * config.sub: Update to version 2011-03-23. 2011-03-22 Joseph Myers * configure.ac (arm-semi-aof, crx-*-*, parisc*-*-linux*, i370-*-opened*, i[[3456789]]86-moss-msdos | i[[3456789]]86-*-moss* | i[[3456789]]86-*-uwin*, mcore-*-pe*): Remove empty cases. * configure: Regenerate. 2011-03-22 Joseph Myers * config-ml.in: Don't handle arc-*-elf*. * configure.ac (arc-*-*, crx-*-*, i[[3456789]]86-*-pe, m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*, mcore-*-pe*): Don't handle GCC libraries. * configure: Regenerate. 2011-03-21 Rainer Orth PR bootstrap/48120: * configure.ac (pwllib): Use LIBS instead of LDFLAGS. Add -lstdc++ -lm to LIBS. * configure: Regenerate. 2011-03-18 David Edelsohn * config.guess: Update to version 2011-02-02 * config.sub: Update to version 2011-02-24 2011-03-03 Sebastian Pop * configure.ac: Adjust test of with_ppl. * configure: Regenerated. 2011-03-02 Sebastian Pop * configure.ac: Add -lpwl to ppllibs. * config/cloog.m4: Add -lisl to clooglibs. * configure: Regenerated. 2011-02-13 Ralf Wildenhues Import from Libtool and gnulib: 2011-01-27 Gerald Pfeifer Prepare for supporting FreeBSD 10. * config.rpath: Remove handling of freebsd1* which soon would match FreeBSD 10.0. 2011-01-20 Gerald Pfeifer (tiny change) Remove support for FreeBSD 1.x. * libtool.m4 (_LT_LINKER_SHLIBS) (_LT_SYS_DYNAMIC_LINKER): Remove handling of freebsd1* which soon would incorrectly match FreeBSD 10.0. 2011-02-12 Ralf Wildenhues PR binutils/12283 * MAINTAINERS (mkinstalldirs): Comes from Automake. (move-if-change): Comes from gnulib. * move-if-change: Import version from gnulib. 2011-02-12 Ralf Wildenhues Sync from GCC: 2011-02-12 Alexandre Oliva PR lto/47225 * Makefile.def (lto-plugin): Double dash for enable-shared. (configure-gcc): Depend on all-lto-plugin. * Makefile.in: Rebuilt. 2011-02-11 Ralf Wildenhues * configure.ac: Remove extra bracket. * configure: Regenerate. 2011-02-06 Kai Tietz PR lto/47225 * Makefile.def: Add dependency for install-gcc on install-lto-plugin. * Makfile.in: Regenerated 2011-01-25 Jakub Jelinek * configure.ac: If with_ppl is no, move setting with_cloog=no after CLOOG_REQUESTED check. * configure: Regenerated. 2011-01-25 Sebastian Pop * configure.ac: Call AC_MSG_ERROR when PPL 0.11 is not present and CLooG has been requested. * configure: Regenerated. 2011-01-25 Sebastian Pop * configure: Regenerated. * configure.ac: Check for version 0.11 (or later revision) of PPL. 2011-01-25 Tobias Grosser * configure: Regenerated. * configure.ac: Use CLOOG_CHECK_VERSION(0,16,1). 2011-01-07 Jan Hubicka PR lto/47225 * Makefile.in: Regenerate. * Makefile.def (lto-plugin): Always pass enable-shared to the plugin configure. 2011-01-31 Alexandre Oliva PR libgcj/44341 * configure.ac: Discard --with-* flags for host when configuring target libraries for cross build. * configure: Rebuilt. 2011-01-21 Andreas Schwab Sync from GCC: 2011-01-21 Andreas Schwab * configure.ac: Use AS_HELP_STRING throughout. * configure: Regenerate. 2011-01-18 Jie Zhang * configure.ac (bfin-*-*): Remove gdb from noconfigdirs. * configure: Regenerate. 2010-12-10 John David Anglin * ltmain.sh (relink): Use absolute path when hardcoding with -L. 2011-01-13 Joel Brobecker * configure.ac: Remove readline, mmalloc, and gdb from noconfigdirs for ia64-hpux. * configure: Regenerate. 2011-01-02 Ralf Wildenhues Sync from GCC: 2010-12-22 Hariharan Sandanagobalane * configure.ac: (picochip): Disable libiberty. * configure: Regenerate. 2010-12-18 Jeff Johnston * COPYING.LIBGLOSS: Remove the GPL for fr30 target. 2010-12-10 Ian Lance Taylor PR bootstrap/46819 * configure.ac: For --disable-libgcj clear libgcj_saved. * configure: Rebuild. 2010-12-10 Tobias Burnus PR fortran/46540 * configure.ac: Add --disable-libquadmath and --disable-libquadmath-support. * configure: Regenerate. 2010-12-10 Tristan Gingold * src-release (ETC_SUPPORT): add gnu-oids.texi 2010-12-03 Hans-Peter Nilsson PR libffi/46792 * configure.ac (cris-*-elf, crisv32-*-elf): Disable target-libffi. * configure: Regenerate. 2010-12-02 Ian Lance Taylor * configure.ac: Always set default for poststage1_ldflags to -static-libstdc++ -static-libgcc. 2010-12-02 Jeff Johnston * COPYING.NEWLIB: Add National Semiconductor notice. 2010-11-29 Andreas Schwab * configure.ac: Move comment to remove extra space in last argument of GCC_TARGET_TOOL. 2010-11-26 Alexandre Oliva PR other/46026 * configure.ac (CXX_FOR_TARGET): Add -funconfigured-libstdc++-v3. * Makefile.def (CXX_FOR_TARGET): Removed from flags_to_pass. * Makefile.tpl (CXX_FOR_TARGET_FLAG_TO_PASS): New. (BASE_FLAGS_TO_PASS): Use it. * configure: Rebuilt. * Makefile.in: Rebuilt. 2010-11-23 H.J. Lu PR binutils/12258 * configure.ac: Correct comments for --enable-gold/--enable-ld. Properly check default linker. * configure: Regnerated. 2010-11-23 Matthias Klose * configure.ac: For --enable-gold, handle value `default' instead of `both*'. New configure option --{en,dis}able-ld. * configure: Regenerate. 2010-11-20 Ian Lance Taylor * configure.ac: Only disable a language library if no language needs it. Don't let --disable-libgcj uncondtionally disable libffi. * configure: Rebuild. 2010-11-20 Paolo Bonzini * configure: Regenerate. 2010-11-20 Ralf Wildenhues PR other/46202 * configure.ac: Fix just-built in-tree STRIP name to be binutils/strip-new. * configure: Regenerate. * Makefile.def (install-strip-gcc, install-strip-binutils) (install-strip-opcodes, install-strip-ld, install-strip-itcl) (install-strip-sid): Mirror dependencies on non-strip variants of these targets on the respective -strip prerequisites. * Makefile.tpl (install-strip, install-strip-host) (install-strip-target): New targets. (install-strip-[+module+], install-strip-target-[+module+]): New targets. * Makefile.in: Regenerate. 2010-11-19 Ian Lance Taylor Ralf Wildenhues * configure.ac: Add target-libgo to target_libraries. Set and substitute GOC_FOR_BUILD and GOC_FOR_TARGET. * Makefile.tpl (BUILD_EXPORTS): Add GOC and GOCFLAGS. (HOST_EXPORTS): Add GOC. (BASE_TARGET_EXPORTS): Add GOC. (GOC_FOR_BUILD, GOCFLAGS, GOC_FOR_TARGET): New variables. (GOCFLAGS_FOR_TARGET): New variable. (EXTRA_HOST_FLAGS): Add GOC. (EXTRA_TARGET_FLAGS): Add GOC and GOCFLAGS. * Makefile.def (target_modules): Add libgo. (flags_to_pass): Add GOC_FOR_TARGET and GOCFLAGS_FOR_TARGET. (dependencies): Add dependency from configure-target-libgo to configure-target-libffi and all-target-libstdc++-v3. Add dependencies from all-target-libgo to all-target-libffi. (languages): Add go. * configure: Rebuild. * Makefile.in: Rebuild. 2010-11-19 Ian Lance Taylor * config-ml.in: Add Go support: treat GOC and GOCFLAGS like other compiler/flag environment variables. 2010-11-18 Ian Lance Taylor * configure.ac: Check for lang_requires_boot_languages in config-lang.in files. * configure: Rebuild. 2010-11-17 Mike Frysinger * .gitignore: New file. 2010-11-16 Francois-Xavier Coudert Tobias Burnus PR fortran/32049 * Makefile.def: Add libquadmath; build it with language=fortran. * configure.ac: Add libquadmath. * Makefile.tpl: Handle multiple libs in check-[+language+]. * Makefile.in: Regenerate. * configure: Regenerate. 2010-11-15 Andreas Schwab * configure.ac: Fix spelling in option names. * configure: Regenerated. 2010-11-13 Georg-Johann Lay PR bootstrap/39622 * configure.ac (FLAGS_FOR_TARGET): Add include-fixed path. * configure: Regenerated. 2010-11-12 Tobias Grosser * config/cloog.m4: Add -enable-cloog-backend=(isl|ppl|ppl-legacy) to define the cloog backend to use. Furthermore, only pass the ppllibs to the configure checks, if necessary. * configure: Regenerate. 2010-11-12 Tobias Grosser * config/cloog.m4: Use CLooG predefined macro to check for CLooG PPL. * configure: regenerate 2010-11-12 Tobias Grosser * config/cloog.m4: Fix typo. verison -> version. * configure: Regenerate. 2010-11-12 Tobias Grosser * config/cloog.m4: Pass ppl libraries to the CLooG version check. * configure: Regenerate. 2010-11-11 Andreas Simbuerger * configure.ac: Support official CLooG.org versions. * configure: Regenerate. * config/cloog.m4: New. 2010-11-05 Michael Eager * COPYING.LIBGLOSS: Correct typo in microblaze. * COPYING.NEWLIB: Same. 2010-11-04 Iain Sandoe * configure.ac (*-*-darwin*): Use mh-darwin for all Darwin variants. * configure: Regenerate. 2010-11-03 Ian Lance Taylor Dave Korn PR lto/46273 * configure.ac: Remove libelf tests. Build lto-plugin on ELF always and on other supported platforms whenever LTO is enabled. * configure: Rebuild. 2010-11-02 Alan Modra PR binutils/12110 * configure.ac: Error when source path contains spaces. * configure: Regenerate. 2010-10-20 Ian Lance Taylor * Makefile.def (target_modules): Set lib_path to src/.libs for libstdc++-v3 module. * Makefile.tpl: Fix typo in TARGET_LIB_PATH comment. * Makefile.in: Rebuild. 2010-10-08 Bernd Schmidt Joseph Myers * COPYING.LIBGLOSS: Add National Semiconductor and CodeSourcery notices. * COPYING.NEWLIB: Add Texas Instruments notice. 2010-10-07 Dave Korn * configure.ac (build_lto_plugin): New shell variable. (--enable-lto): Turn on by default for all non-ELF platforms that have had LTO support added so far. Set build_lto_plugin appropriately for both ELF and non-ELF. (configdirs): Add lto-plugin or not based on build_lto_plugin. * configure: Regenerate. 2010-10-02 Ralf Wildenhues PR bootstrap/45326 PR bootstrap/45174 * configure.ac: Honor initial values of $build_configargs, $host_configargs, $target_configargs. Mark the precious, so environment settings get recorded. * configure: Regenerate. 2010-10-02 Ralf Wildenhues Sync from GCC: 2010-09-30 Michael Eager * configure.ac (microblaze): Add target-libssp to noconfigdirs. * configure: Regenerate. 2010-09-21 Iain Sandoe * configure.ac (enable-lto): Add Darwin to the list of supported lto targets and amend comment. * configure: Regenerate. 2010-09-03 Jack Howarth * configure.ac: Enable LTO by default on Darwin. * configure: Regenerate. 2010-07-23 Marc Glisse PR bootstrap/44455 * configure.ac (extra_mpfr_configure_flags): Copy from extra_mpc_gmp_configure_flags. * configure: Re-generated. 2010-09-30 Ralf Wildenhues Sync from GCC: PR bootstrap/45796 * Makefile.def (info-gcc, dvi-gcc, pdf-gcc, html-gcc): Depend on all-build-libiberty. * Makefile.in: Regenerate. 2010-09-27 Ralf Wildenhues Sync from GCC: PR bootstrap/44621 * configure.ac: Fix unportable shell quoting. * configure: Regenerate. 2010-07-26 Naveen.H.S * configure.ac: Support all v850 targets. * configure: Regenerate. 2010-07-17 Jack Howarth PR target/44862 * Makefile.tpl (POSTSTAGE1_CXX_EXPORT): Provide -B option to allow for link spec %s substitutions for libstdc++.a on darwin. * Makefile.in: Regenerate. 2010-06-10 Alexandre Oliva * Makefile.def (configure-gcc): Depend on all-libelf. * Makefile.in: Rebuild. 2010-06-01 Ralf Wildenhues * config.sub, config.guess: Update from upstream sources. 2010-06-01 Ralf Wildenhues Sync from GCC: 2010-05-05 Sebastian Pop * configure.ac: Allow all the versions greater than 0.10 of PPL. * configure: Regenerated. 2010-04-20 Eric Botcazou * configure.ac (BUILD_CONFIG): Redirect output to /dev/null. * configure: Regenerate. 2010-04-17 Ralf Corspius * configure.ac (*-*-rtems*): Add target-libiberty to $skipdirs. * configure: Regenerate. 2010-04-16 Rainer Orth * configure.ac: Check for elf_getshdrstrndx or elf_getshstrndx separately. * configure: Regenerate. 2010-04-13 Steve Ellcey * configure: Regenerate after change to elf.m4. 2010-04-02 Sebastian Pop * configure.ac: Add brackets around AC_TRY_COMPILE alternative. * configure: Regenerated. 2010-04-02 Sebastian Pop * configure.ac: Print "buggy but acceptable" when CLooG revision is less than 9. * configure: Regenerated. 2010-05-26 Dave Korn Merge from gcc: 2010-05-18 Steven Bosscher * configure.ac (--enable-lto): All *-apple-darwin* now support LTO. * configure: Regenerate. 2010-05-07 Steven Bosscher * configure.ac (--enable-lto): Add x86_64-apple-darwin* as a platform that supports LTO. * configure: Regenerate. 2010-04-27 Dave Korn PR lto/42776 * configure.ac (--enable-lto): Refactor handling so libelf tests are only performed inside then-clause of ACX_ELF_TARGET_IFELSE, and allow LTO to be explicitly enabled on non-ELF platforms that are known to support it inside else-clause. * configure: Regenerate. 2010-04-27 Roland McGrath H.J. Lu * configure.ac (--enable-gold): Support both, both/gold and both/bfd to add gold to configdirs without removing ld. * configure: Regenerated. * Makefile.def: Add install-gold dependency to install-ld. * Makefile.in: Regenerated. 2010-04-14 Tristan Gingold * configure.ac (alpha*-*-*vms*): Remove ld from noconfigdirs. * configure: Regenerate. 2010-04-08 Ralf Wildenhues Merge from gcc: PR bootstrap/43615 PR bootstrap/43328 Revert: 2010-03-31 Ralf Wildenhues * configure.ac: Do not pass --enable-multilib nor --disable-multilib in baseargs. Accept explicitly passed --enable_multilib. * configure: Regenerate. 2010-03-31 Ralf Wildenhues PR bootstrap/43328 * configure.ac: Do not pass --enable-multilib nor --disable-multilib in baseargs. Accept explicitly passed --enable_multilib. * configure: Regenerate. 2010-03-23 Joseph Myers * configure.ac (tic6x-*-*): New case. * configure: Regenerate. 2010-03-23 Joseph Myers Merge from gcc: 2010-03-19 Jack Howarth PR ada/42554 * configure.ac: Only pass -c to ranlib for darwin9 and earlier. * configure: Regenerate. 2010-03-23 Joseph Myers * config.sub: Update to version 2010-03-22. * config.guess: Update to version 2009-12-30. 2010-03-14 Joseph Myers Merge from gcc: 2010-01-11 Richard Guenther PR lto/41569 * Makefile.def (all-lto-plugin): Depend on all-gcc. * Makefile.in: Regenerated. 2010-03-01 Rainer Orth PR libstdc++/32499 * configure.ac (RANLIB): Default to true. (STRIP): Likewise. (RANLIB_FOR_TARGET): Remove superfluous : argument. * configure: Regenerate. 2010-02-17 Nick Clifton PR 11238 * Makefile.tpl (local-distclean): Also remove config.cache files in sub-directories as there may not be Makefiles present in the sub-directories. * Makefile.tpl: Use "-exec rm {}" rather than "-delete" to delete the config.cache files found by the find command. * Makefile.in: Regenerate. * configure.ac: Revert previous delta. * configure: Regenerate. 2010-02-15 Nick Clifton PR 11238 * configure.ac: Delete config.cache files in sub-directories when deleting Makefiles. * configure: Regenerate. 2010-02-15 Nick Clifton * configure.ac: Sync from gcc. * configure: Regenerate. 2010-01-31 Kaveh R. Ghazi Sync from gcc: * configure.ac: Add "recommended" version checks for GMP/MPC. Update recommended GMP/MPFR/MPC versions. * configure: Regenerate. 2010-01-25 Joern Rennecke gcc PR libstdc++/36101, gcc PR libstdc++/42813 * configure.ac (bootstrap_target_libs): Make inclusion of target-libgomp conditional on libgomb being in target_configdirs. * configure: Regenerate. 2010-01-23 Joern Rennecke gcc PR libstdc++/36101, gcc PR libstdc++/42813 * configure.ac (bootstrap_target_libs): Include target-libgomp. * configure: Regenerate. 2010-01-22 Joern Rennecke gcc PR libstdc++/36101, gcc PR libstdc++/42813 * configure.ac (target_configdirs): Substitute. * Makefile.def: Bootstrap target module libgomp. Add dependency of all-target-libstdc++-v3 on configure-target-libgomp. * Makefile.tpl (TARGET_CONFIGDIRS): New makefile variable. (BASE_TARGET_EXPORTS): Export TARGET_CONFIGDIRS. * configure, Makefile.in: Regenerate. 2009-12-09 Ralf Wildenhues * libtool.m4: Sync from git Libtool. * ltmain.sh: Likewise. * ltoptions.m4: Likewise. * ltversion.m4: Likewise. * lt~obsolete.m4: Likewise. 2010-01-07 Kaveh R. Ghazi Francois-Xavier Coudert PR bootstrap/42424 * configure.ac: Include libtool m4 files. (_LT_CHECK_OBJDIR): Call it. (extra_mpc_mpfr_configure_flags, extra_mpc_gmp_configure_flags, gmplibs, ppllibs, clooglibs): Use $lt_cv_objdir. * configure: Regenerate. 2010-01-07 Ralf Wildenhues PR bootstrap/41818 * Makefile.tpl (BASE_TARGET_EXPORTS): Only add TARGET_LIB_PATH to $(RPATH_ENVVAR) if bootstrapping. Fix typo in comment. * Makefile.in: Regenerate. 2009-12-18 Ben Elliston * config.sub, config.guess: Update from upstream sources. 2009-12-17 Jeff Johnston * COPYING.NEWLIB: Update copyright date. * COPYING.LIBGLOSS: Ditto. 2009-12-07 Kaveh R. Ghazi PR middle-end/30447 PR middle-end/30789 PR other/40302 * configure.ac: Require MPC. * configure: Regenerate. * configure.ac: Update minimum MPC version to 0.8. * configure: Regenerate. 2009-11-20 Paolo Bonzini * config.guess: Sync with upstream and gcc. * config.sub: Sync with upstream and gcc. 2009-11-16 Alexandre Oliva * Makefile.def: Restore host and target settings for gmp. * Makefile.in: Rebuild. 2009-11-16 Alexandre Oliva * configure.ac: Add libelf to host_libs. Enable in-tree configury of ppl and cloog. Fix in-tree configury of libelf, skip tests. Fix portability of test of C++ as bootstrap language. Add ppl/src/ppl-config.o to the bootstrap compare exclusion list. * configure: Rebuild. * Makefile.def: Drop host and target settings from gmp, mpfr, ppl, and cloog. Fix in-tree ppl configuration. Introduce libelf in-tree building. * Makefile.tpl (POSTSTAGE1_CXX_EXPORT): New. (POSTSTAGE1_HOST_EXPORTS): Use it. (STAGE[+id+]_CXXFLAGS): New. (BASE_FLAGS_TO_PASS): Pass it down. (configure-stage[+id+]-[+prefix+][+module+]): Use it. Add extra_exports. (all-stage[+id+]-[+prefix+][+module+]): Likewise. (configure-[+prefix+][+module+], all-[+prefix+][+module+]): Add extra_exports. * Makefile.in: Rebuild. 2009-11-06 Ozkan Sezer * configure.ac (FLAGS_FOR_TARGET): Add -L and -isystem paths for *-w64-mingw* and x86_64-*mingw*. * configure: Regenerated. 2009-10-30 Kai Tietz * configure.ac: Disable target-winsup & co for x86_64-*-mingw* and *-w64-mingw* targets. * configure: Regenerated. 2009-10-23 Rainer Orth * configure.ac (CLooG test): Use = with test. * configure: Regenerate. 2009-10-22 Richard Guenther * configure.ac: Do not set LIBS for ppl/cloog checks. Disable cloog if the ppl version check failed. Move flags saving before setting in libelf check. * configure: Regenerate. 2009-10-21 Richard Guenther * configure.ac: Adjust the ppl and cloog configure to work as documented. Disable cloog if ppl was disabled. Omit the version checks if they were disabled. * configure: Re-generate. 2009-10-13 Ralf Wildenhues * configure.ac: Add 'lto' to enable_languages, not new_enable_languages, and only if not already present. * configure: Regenerate. 2009-10-06 Ian Lance Taylor * Makefile.def: check-gold depends upon all-gas. * Makefile.in: Rebuild. 2009-10-03 2009-02-05 Rafael Avila de Espindola * Makefile.def: all-lto-plugin depends on all-libiberty. set bootstrap=true for lto-plugin. Add lto-plugin. * Makefile.in: Regenerate. * configure.ac (host_libs): Add lto-plugin. * configure: Regenerate. 2009-10-03 Diego Novillo * Makefile.tpl (HOST_EXPORTS): Add LIBELFLIBS and LIBELFINC. (HOST_LIBELFLIBS): Define. (HOST_LIBELFINC): Define. * Makefile.in: Regenerate. * configure.ac: Add --enable-lto. Add --with-libelf, --with-libelf-include and --with-libelf-lib. If --enable-lto is used, add 'lto' to new_enable_languages. If --enable-lto is used and gold is enabled, add lto-plugin to configdirs. * configure: Regenerate. 2009-10-03 Simon Baldwin * configure.ac: If --with-system-zlib, suppress local zlib and pass --with-system-zlib to subdir configure scripts. * configure: Regenerate. 2009-10-01 Loren J. Rittle Paolo Bonzini * Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Use $$s rather than $(srcdir). * Makefile.in: Rebuilt. 2009-09-29 Paolo Bonzini Sync from gcc: 2009-09-26 Kaveh R. Ghazi * configure.ac: Update minimum MPC version to 0.7. * configure: Regenerate. 2009-09-25 Nick Clifton * configure.ac: Pass any --cache-file=/dev/null option on to subconfigures. * configure: Regenerate. 2009-09-23 Nick Clifton * config.sub, config.guess: Update from upstream sources. 2009-09-22 Loren J. Rittle * Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Remove stray $$r/. * Makefile.in: Rebuilt. 2009-09-22 Ralf Wildenhues PR bootstrap/32272 * configure.ac: Error out if $srcdir isn't '.' but contains host-${host_noncanonical}. * configure: Regenerate. 2009-09-21 Ralf Wildenhues * configure.ac: If bootstrapping a combined tree with --enable-gold, require c++ in stage1_languages. * configure: Regenerate. * configure.ac: Also add target_libs of stage1_languages to bootstrap_target_libs. * configure: Regenerate. * configure.ac: Diagnose --enable-build-with-cxx bootstrap with --enable-languages not containing c++. * configure: Regenerate. 2009-09-16 Jie Zhang * configure.ac: Disable java and boehm-gc for bfin-*-*. * configure: Regenerate. 2009-09-08 Ralf Wildenhues * configure.ac: Do not use $extrasub for replacing @if/@endif parts in Makefile; instead, use additional arguments to AC_CONFIG_COMMANDS to do the replacement manually, with several sed invocations, to avoid HP-UX sed command limits. * configure: Regenerate. 2009-09-04 Alexandre Oliva * configure.ac (with-build-config): Document. Handle without. Handle missing argument. * configure: Rebuilt. 2009-09-03 Alexandre Oliva * configure.ac (--with-build-config): New. Set BUILD_CONFIG. Default to bootstrap-debug only if compare-debug works. * configure: Rebuilt. * Makefile.tpl: Make BUILD_CONFIG configure-configurable. * Makefile.in: Rebuilt. 2009-09-01 Alexandre Oliva * Makefile.tpl (BUILD_CONFIG): Default to bootstrap-debug. * Makefile.in: Rebuilt. 2009-09-02 Paolo Bonzini * Makefile.tpl (AWK): Fix typo. * Makefile.in: Regenerate. 2009-09-02 Paolo Bonzini * configure.ac: Detect awk and sed. * Makefile.def (flags_to_pass): Add AWK and SED. * Makefile.tpl (AWK, SED): New. (BASE_FLAGS_TO_PASS): Add AWK and SED. * configure: Regenerate. * Makefile.in: Regenerate. 2009-09-01 Tristan Gingold * setup.com: Ported to Itanium VMS. Can also build using DCL scripts. Remove logical names. 2009-08-31 Dave Korn * ltmain.sh (func_normal_abspath): New function. (func_relative_path): Likewise. (func_mode_help): Document new -bindir option for link mode. (func_mode_link): Add new -bindir option, and use it to place output DLL if specified. 2009-08-24 Ralf Wildenhues * configure.ac (AC_PREREQ): Bump to 2.64. 2009-08-22 Ralf Wildenhues * README-maintainer-mode: Point directly to upstream locations for autoconf, automake, libtool, gettext, instead of copies on sources.redhat.com. Document required versions. * configure.ac: Do not substitute datarootdir, htmldir, pdfdir, docdir. Do not process --with-datarootdir, --with-htmldir, --with-pdfdir, --with-docdir. * configure: Regenerate. * configure: Regenerate. * compile: Sync from Automake 1.11. * depcomp: Likewise. * install-sh: Likewise. * missing: Likewise. * mkinstalldirs: Likewise. * ylwrap: Likewise. 2009-08-19 Ralf Wildenhues * configure.ac: Call AC_DISABLE_OPTION_CHECKING. (baseargs): Add --disable-option-checking. * configure: Regenerate. * Makefile.def (configure-target-libiberty): Depend on all-binutils and all-ld. (configure-target-newlib): Likewise. * Makefile.in: Regenerate. 2009-08-19 Ralf Wildenhues Sync with GCC, merge: 2009-07-31 Christian Bruel * configure.ac (sh*-*-elf): Don't add target-libgloss to noconfigdirs. * configure: Regenerate. 2009-07-06 Ian Lance Taylor * configure.ac: Add missing comma in AC_ARG_WITH(boot-libs). * configure: Rebuild. 2009-06-26 Steve Ellcey PR bootstrap/40338 * configure.ac (comparestring): Create new variable. * Makefile.tpl (comparestring): Use to skip some comparisions. * configure: Regenerate. * Makefile.in: Regenerate. 2009-06-23 Ian Lance Taylor * configure.ac: Add --enable-build-with-cxx. When set, add c++ to boot_languages. Only bootstrap target libraries listed in target_libs for some boot language. Add --with-stage1-ldflags, --with-stage1-libs, --with-boot-ldflags, --with-boot-libs. Remove with_host_libstdcxx from ppllibs. Only add -fkeep-inline-functions if not building with C++. * Makefile.def: For target_module libstdc++-v3, set bootstrap=true. * Makefile.tpl (STAGE1_LDFLAGS, STAGE1_LIBS): New variables. (POSTSTAGE1_LDFLAGS, POSTSTAGE1_LIBS): New variables. (HOST_EXPORTS): Add STAGE1_LDFLAGS to LDFLAGS. Export HOST_LIBS. (POSTSTAGE1_HOST_EXPORTS): Set CXX and CXX_FOR_BUILD. Add POSTSTAGE1_LDFLAGS to LDFLAGS. Export HOST_LIBS. (POSTSTAGE1_FLAGS_TO_PASS): Likewise. * configure, Makefile.in: Rebuild. 2009-06-08 Kaveh R. Ghazi * configure.ac: Detect MPC in default directory. * configure: Regenerate. 2009-06-02 Richard Sandiford * configure.ac (powerpc-*-aix*, rs6000-*-aix*): Add target-newlib to noconfdirs. * configure: Regenerate. 2009-05-29 Kaveh R. Ghazi * Makefile.def: Add MPC support and dependencies. * configure.ac: Likewise. Reorganize GMP/MPFR checks. * Makefile.in, configure: Regenerate. 2009-05-24 Nicolas Roche * Makefile.tpl (compare-target): Skip ./ada/*tools directories. * Makefile.in: Regenerate. 2009-05-21 Dave Korn * configure.ac (cygwin noconfigdirs): Remove libgcj. * configure: Regenerate. 2009-05-07 Dave Korn * configure.ac ($with_ppl): Default to no if not supplied. ($with_cloog): Likewise. configure: Regenerate. 2009-04-24 Kaveh R. Ghazi PR bootstrap/39739 * configure.ac (extra_mpfr_configure_flags): Set and AC_SUBST. * Makefile.def (module=mpfr): Use extra_mpfr_configure_flags. * configure, Makefile.in: Regenerate. 2009-04-14 Jakub Jelinek * configure.ac: Change copyright header to refer to version 3 of the GNU General Public License and to point readers at the COPYING3 file and the FSF's license web page. * Makefile.def: Likewise. * Makefile.tpl: Likewise. * Makefile.in: Regenerate. 2009-04-09 Jack Howarth * configure.ac: Restore match for darwin9 or later. Use double brackets since regeneration eats one pair. * configure: Regenerate. 2009-08-18 Christopher Faylor * MAINTAINERS: Perform some obvious fixups. 2009-08-17 Ben Elliston * config.sub, config.guess: Update from upstream sources. 2009-08-06 Michael Eager * configure.ac: Add Microblaze target. * configure: Regenerate. 2009-07-02 Tristan Gingold * configure.ac: Do not exclude gas for i386-*-darwin. Add a case for x86_64-*-darwin. * configure: Regenerate. 2009-06-26 Doug Evans * Makefile.def (host_modules): Add cgen. * Makefile.in: Regenerate. * configure.ac (host_tools): Add cgen. * configure: Regenerate. 2009-06-17 Michael Eager * COPYING.LIBGLOSS: Add Xilinx license. 2009-06-15 Ryan Mansfield * configure.ac: Define is_elf for QNX Neutrino targets. * configure: Regenerate. 2009-06-03 Jerome Guitton Ralf Wildenhues * Makefile.tpl (all): Avoid a trailing backslash. * Makefile.in: Regenerate. 2009-06-03 Ben Elliston * config.sub, config.guess: Update from upstream sources. 2009-06-02 Alexandre Oliva * Makefile.tpl ([+compare-target+]): Compare all stage directories, rather than just gcc. * Makefile.in: Rebuilt. 2009-05-28 Doug Kwan * configure.ac: Support gold for target arm*-*-*. * configure: Regenerate. 2009-05-27 Alexandre Oliva * Makefile.tpl (all): Avoid harmless warning in make all when gcc-bootstrap is enabled but stage_last does not exist. * Makefile.in: Rebuilt. 2009-05-25 Tristan Gingold * setup.com: Complete the file with configuration and build. 2009-05-18 Alexandre Oliva PR other/40159 * Makefile.tpl (all): Don't assume gcc-bootstrap and gcc-no-bootstrap are mutually exclusive. * Makefile.in: Rebuilt. 2009-05-18 Alexandre Oliva PR other/40159 * Makefile.tpl (all): Don't end with unconditional success. * Makefile.in: Rebuilt. 2009-05-12 Alexandre Oliva PR target/37137 * Makefile.def (flags_to_pass): Remove redundant and incomplete STAGE1_CFLAGS, STAGE2_CFLAGS, STAGE3_CFLAGS, and STAGE4_CFLAGS. Add FLAGS_FOR_TARGET and BUILD_CONFIG. (bootstrap_stage): Remove bootstrap-debug custom stages. Turn stage_configureflags, stage_cflags and stage_libcflags into explicit Makefile macros. * Makefile.tpl (HOST_EXPORTS, EXTRA_HOST_FLAGS): Pass GCJ and GFORTRAN. (POSTSTAGE1_HOST_EXPORTS): Add XGCC_FLAGS_FOR_TARGET and TFLAGS to CC. Set CC_FOR_BUILD from CC. (BASE_TARGET_EXPORTS, RAW_CXX_TARGET_EXPORTS, NORMAL_TARGET_EXPORTS): Move SYSROOT_CFLAGS_FOR_TARGET and DEBUG_PREFIX_CFLAGS_FOR_TARGET from CFLAGS and CXXFLAGS to XGCC_FLAGS_FOR_TARGET. Add it along with TFLAGS to CC, CXX, GCJ, and GFORTRAN. (TFLAGS, STAGE_CFLAGS, STAGE_TFLAGS, STAGE_CONFIGURE_FLAGS): New. (_LIBCFLAGS): Renamed to _TFLAGS. (do-compare-debug, do-compare3-debug): Drop. (CC, GCC_FOR_TARGET, CXX_FOR_TARGET, RAW_CXX_FOR_TARGET, GCJ_FOR_TARGET, GFORTRAN_FOR_TARGET): Remove FLAGS_FOR_TARGET. (FLAGS_FOR_TARGET, SYSROOT_CFLAGS_FOR_TARGET, DEBUG_PREFIX_CFLAGS_FOR_TARGET): Move down. (XGCC_FLAGS_FOR_TARGET): New. (BASE_FLAGS_TO_PASS): Pass STAGEid_CFLAGS, STAGEid_TFLAGS and TFLAGS. (EXTRA_HOST_FLAGS): Pass GCJ and GFORTRAN. (POSTSTAGE1_FLAGS_TO_PASS): Move SYSROOT_CFLAGS_FOR_TARGET and DEBUG_PREFIX_CFLAGS_FOR_TARGET from CFLAGS, CXXFLAGS, LIBCFLAGS, LIBCXXFLAGS to XGCC_FLAGS_FOR_TARGET. Add it along with TFLAGS to CC, CXX, GCJ, and GFORTRAN. Pass XGCC_FLAGS_FOR_TARGET and TFLAGS. (BUILD_CONFIG): Include if requested. (all): Set TFLAGS on bootstrap. (configure-stageid-prefixmodule): Pass TFLAGS, adjust FLAGS. (all-stageid-prefixmodule): Likewise. (do-clean, distclean-stageid): Set TFLAGS. (restrap): Fix whitespace. * Makefile.in: Rebuilt. 2009-04-25 Eric Botcazou * Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Add GNATBIND. (POSTSTAGE1_FLAGS_TO_PASS): Pick up exported value for GNATBIND. * Makefile.in: Regenerate. 2009-04-24 Eli Zaretskii * config.guess (pc:*:*:*): Return i586-pc-msdosdjgpp, for consistency with config.sub. (Update from upstream sources.) 2009-04-21 Joseph Myers * texinfo/texinfo.tex: Update to version 2009-03-28.05. 2009-04-17 Ben Elliston * config.sub, config.guess: Update from upstream sources. 2009-04-15 Anthony Green * configure.ac: Add moxie support. * configure: Rebuilt. 2009-04-09 Kaveh R. Ghazi * configure.ac: Bump minimum GMP/MPFR versions to 4.2 and 2.3.1. * configure: Regenerate. 2009-04-09 H.J. Lu PR gas/10039 * configure.ac: Require texinfo 4.7. * configure: Regenerated. 2009-04-09 Steve Ellcey * Makefil.def (languages): New entries. * Makefile.tpl (check-gcc-*): New generic target. * Makefile.in: Regenerate. 2009-03-27 Eli Zaretskii * djunpack.bat: Use ".." quoting in Sed command, for the sake of Windows builds of Sed. 2009-03-18 Tom Tromey * configure: Rebuild. * configure.ac (host_libs): Add libiconv. * Makefile.in: Rebuild. * Makefile.def (host_modules): Add libiconv. (configure-gdb, all-gdb): Depend on libiconv. 2009-03-16 Tristan Gingold * configure.ac: Treat gdb as supported on x86_64-darwin. * configure: Regenerate. 2009-03-16 Joseph Myers Merge from GCC: 2009-03-16 Joseph Myers * configure.ac (--with-host-libstdcxx): New option. * configure: Regenerate. 2009-01-29 Robert Millan * configure.ac: Recognize GNU/kOpenSolaris (*-*-kopensolaris*-gnu). * configure: Regenerate. 2009-01-12 Sebastian Pop PR tree-optimization/38515 * configure.ac (cloog-polylib): Removed. (with_ppl, with_cloog): Test for "no". * configure: Regenerated. 2009-03-01 Ralf Wildenhues Backport from git Libtool: 2009-01-19 Robert Millan Support GNU/kOpenSolaris. * libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) (_LT_CHECK_MAGIC_METHOD, _LT_COMPILER_PIC, _LT_LINKER_SHLIBS) (_LT_LANG_CXX_CONFIG) [kopensolaris*-gnu]: Recognize GNU/kOpenSolaris. 2009-02-05 Andreas Schwab * Makefile.tpl (stage_last): Define $r and $s before using $(RECURSE_FLAGS_TO_PASS). * Makefile.in: Regenerate 2009-01-21 Jeff Johnston * COPYING.NEWLIB: Add ARM license. 2009-01-16 Alan Modra * Makefile.def (configure-opcodes): Depend on configure-libiberty. (all-opcodes): Depend on all-libiberty. * Makefile.in: Regenerate. 2009-01-15 Douglas B Rupp * configure.ac (ia64*-*-*vms*): Add case with no gdb or ld support. * configure: Regenerate. 2008-12-18 Ralf Wildenhues Backport link test fix from upstream Libtool: * libltdl.m4 (_LT_SYS_DYNAMIC_LINKER, _LT_LINKER_SHLIBS): Add cache variables to tests that require the linker to work. For shlibpath_overrides_runpath, this also changes the semantics to let the result from the C compiler take precedence. compiler take precedence. 2008-12-02 Ben Elliston * config.sub, config.guess: Update from upstream sources. 2008-12-17 Jeff Johnston * COPYING.NEWLIB: Updated. * COPYING.LIBGLOSS: Ditto. 2008-12-16 Paolo Bonzini Sync with GCC: 2008-12-12 Sebastian Pop * configure.ac (ppllibs): Add by default the lib flags. * configure: Regenerate. 2008-12-04 Jack Howarth * configure.ac: Add double brackets on darwin[912]. * configure: Regenerate. 2008-12-02 Jack Howarth * configure.ac: Expand to darwin10 and later. * configure: Regenerate. 2008-12-02 Andreas Schwab * Makefile.def: configure-target-boehm-gc depends on all-target-libstdc++-v3. * Makefile.in: Regenerate. 2008-12-02 Ben Elliston * config.sub, config.guess: Update from upstream sources. 2008-11-27 Joseph Myers Merge from GCC: 2007-12-02 Matthias Klose * config-ml.in: Remove 64bit configure tests. 2008-05-14 Rafael Espindola * config-ml.in: don't handle --enable-shared and --enable-static. 2008-09-02 Sebastian Pop Tobias Grosser Jan Sjodin Harsha Jagasia Dwarakanath Rajagopal Konrad Trifunovic Adrien Eliche Merge from graphite branch. * configure: Regenerate. * Makefile.in: Regenerate. * configure.ac (host_libs): Add ppl and cloog. Add checks for PPL and CLooG. * Makefile.def (ppl, cloog): Added modules and dependences. * Makefile.tpl (PPLLIBS, PPLINC, CLOOGLIBS, CLOOGINC): New. (HOST_PPLLIBS, HOST_PPLINC, HOST_CLOOGLIBS, HOST_CLOOGINC): New. 2008-09-03 Richard Guenther * configure.ac: Always pass -DCLOOG_PPL_BACKEND to the cloog test. * configure: Re-generate. 2008-09-03 Sebastian Pop * configure.ac (--with-cloog-polylib): New. (--disable-cloog-version-check): New. (--disable-ppl-version-check): New. * configure: Re-generate. 2008-09-05 Richard Guenther * configure.ac: Initialize clooglibs to -lcloog. * configure: Re-generate. 2008-10-13 Kaveh R. Ghazi * configure.ac (MPFR check): Bump minimum version to 2.3.0 and recommended version to 2.3.2. * configure: Regenerate. 2008-10-31 Ben Elliston * configure.ac (spu-*-*): Remove special case. * configure: Regenerate. Complete comment text from GCC version of: 2008-08-31 Aaron W. LaFramboise * configure.ac (RPATH_ENVVAR): Use PATH on Windows. (GCC_SHLIB_SUBDIR): New. * Makefile.tpl (HOST_LIB_PATH_gcc): Use GCC_SHLIB_SUBDIR. * configure: Regenerate. * Makefile.in: Regenerate. 2008-11-27 Tristan Gingold * configure.ac: Build gdb for i?86-*-darwin* * configure: Regenerated. 2008-11-14 Daniel Jacobowitz PR bootstrap/38014 PR bootstrap/37923 Revert: 2008-10-24 Daniel Jacobowitz * Makefile.tpl (HOST_EXPORTS): Correct CPPFLAGS typo. * Makefile.in: Regenerated. 2008-10-22 Daniel Jacobowitz PR gdb/921 PR gdb/1646 PR gdb/2175 PR gdb/2176 * Makefile.def (flags_to_pass): Add CPPFLAGS_FOR_BUILD and CPPFLAGS. * Makefile.tpl (BUILD_EXPORTS): Set CPPFLAGS. (EXTRA_BUILD_FLAGS): Correct typo. Pass CPPFLAGS. (HOST_EXPORTS): Pass CPPFLAGS. (CPPFLAGS_FOR_BUILD, CPPFLAGS, CPPFLAGS_FOR_TARGET): Define. (LDFLAGS_FOR_TARGET): Initialize from configure script. (EXTRA_TARGET_FLAGS): Set CPPFLAGS. * Makefile.in, configure: Regenerated. * configure.ac: Set CPPFLAGS_FOR_TARGET, LDFLAGS_FOR_TARGET, and CPPFLAGS_FOR_BUILD. 2008-10-29 Stefan Schulze Frielinghaus * configure.ac [spu-*-*]: Do not set skipdirs. * configure: Re-generate. 2008-10-24 Daniel Jacobowitz * Makefile.tpl (HOST_EXPORTS): Correct CPPFLAGS typo. * Makefile.in: Regenerated. 2008-10-22 Daniel Jacobowitz PR gdb/921 PR gdb/1646 PR gdb/2175 PR gdb/2176 * Makefile.def (flags_to_pass): Add CPPFLAGS_FOR_BUILD and CPPFLAGS. * Makefile.tpl (BUILD_EXPORTS): Set CPPFLAGS. (EXTRA_BUILD_FLAGS): Correct typo. Pass CPPFLAGS. (HOST_EXPORTS): Pass CPPFLAGS. (CPPFLAGS_FOR_BUILD, CPPFLAGS, CPPFLAGS_FOR_TARGET): Define. (LDFLAGS_FOR_TARGET): Initialize from configure script. (EXTRA_TARGET_FLAGS): Set CPPFLAGS. * Makefile.in, configure: Regenerated. * configure.ac: Set CPPFLAGS_FOR_TARGET, LDFLAGS_FOR_TARGET, and CPPFLAGS_FOR_BUILD. 2008-09-29 Peter O'Gorman * libtool.m4: Update to libtool 2.2.6. * lt~obsolete.m4: Update to libtool 2.2.6. * ltmain.sh: Update to libtool 2.2.6. * ltsugar.m4: Update to libtool 2.2.6. * ltversion.m4: Update to libtool 2.2.6. * ltoptions.m4: Update to libtool 2.2.6. * ltgcc.m4: Update to match changes from libtool 2.2.6. 2008-08-31 Aaron W. LaFramboise * configure.ac (RPATH_ENVVAR): Use PATH on Windows. (GCC_SHLIB_SUBDIR): New. * Makefile.tpl (HOST_LIB_PATH_gcc): Use GCC_SHLIB_SUBDIR. * configure: Regenerate. * Makefile.in: Regenerate. 2008-08-28 Tristan Gingold * configure.ac (powerpc-*-darwin*, i?86-*-darwin*,x86_64-*-darwin9): Enable bfd, binutils and opcodes. * configure: Regenerate. 2008-08-16 Nicolas Roche * Makefile.tpl: Add BOOT_ADAFLAGS. * Makefile.in: Regenerate. 2008-08-16 Richard Sandiford * configure.ac (mips*-*-*linux*, mips*-*-gnu*): Use mt-mips-gnu. * configure: Regenerate. 2008-07-30 Paolo Bonzini Sync with gcc: 2008-07-30 Paolo Bonzini * configure.ac: Add makefile fragments for hpux. * Makefile.def (flags_to_pass): Add ADA_CFLAGS. * Makefile.tpl (HOST_EXPORTS): Pass ADA_CFLAGS. * configure: Regenerate. * Makefile.in: Regenerate. 2008-06-17 Ralf Wildenhues * Makefile.tpl ($(srcdir)/configure): Update dependencies. * Makefile.in: Regenerate. * configure: Regenerate. 2008-06-18 Ian Lance Taylor * src-release (BINUTILS_SUPPORT_DIRS): Remove mkdep and depcomp. * src-release (BINUTILS_SUPPORT_DIRS): Add depcomp. 2008-06-17 Ralf Wildenhues * configure: Regenerate. 2008-06-16 Ralf Wildenhues * configure.ac: Set TOPLEVEL_CONFIGURE_ARGUMENTS early, when "$@" is still intact with both Autoconf 2.59 and 2.62. * configure: Regenerate. 2008-06-16 Ralf Wildenhues * Makefile.tpl: Fix comment errors. * Makefile.in: Regenerate. 2008-06-13 Julian Brown * configure.ac (arm*-*-linux-gnueabi): Don't disable building of libobjc for ARM EABI Linux. * configure: Regenerate. 2008-06-12 David S. Miller David Edelsohn * configure.ac: Add powerpc*-*-* to gold supported targets. * configure: Regenerate. 2008-06-08 Joseph Myers PR tree-optimization/36218 * Makefile.def (flags_to_pass): Add LDFLAGS_FOR_BUILD. * Makefile.tpl (EXTRA_BUILD_FLAGS): Define. (all prefix="build-"): Pass them to build-system sub-makes. * Makefile.in: Regenerate. 2008-05-16 Daniel Jacobowitz * src-release (DEVO_SUPPORT): Add ChangeLog, MAINTAINERS, README-maintainer-mode, lt~obsolete.m4, ltgcc.m4, depcomp, mkdep, and compile. Update comments. (ETC_SUPPORT): Add ChangeLog and update comments. 2008-05-11 Ian Lance Taylor * src-release (BINUTILS_SUPPORT_DIRS): Add elfcpp and gold. 2008-04-18 Paolo Bonzini Sync with gcc: 2008-04-18 Paolo Bonzini PR bootstrap/35457 * configure.ac: Include override.m4. * configure: Regenerate. 2008-04-18 Paolo Bonzini * Makefile.tpl (restrap): Call `make all' using double-colon rules. * Makefile.in: Regenerate. 2008-04-11 Eric B. Weddington * configure.ac: Do not build libssp for the AVR. * configure: Regenerate. 2008-04-18 Nick Clifton * MAINTAINERS: Replace reference to configure.in with reference to configure.ac. 2008-04-18 M R Swami Reddy * configure.ac (cr16-*-*): Add case for cr16 target and include gdb as nonconfigurable directories list. * configure: Regenerate. 2008-04-14 David S. Miller * configure.ac: Add sparc*-*-* to gold supported targets. * configure: Regenerate. 2008-04-14 Ben Elliston * config.sub, config.guess: Update from upstream sources. 2008-04-12 Hans-Peter Nilsson * Makefile.tpl : Error early unless at least GNU make 3.80. * Makefile.in: Regenerate. 2008-04-07 Ian Lance Taylor * Makefile.def: check-gold depends upon all-binutils. * Makefile.in: Regenerate. 2008-04-04 Nick Clifton PR binutils/4334 * configure.ac: Run ACX_CHECK_CYGWIN_CAT_WORKS for cygwin hosted builds. * configure: Regenerate. 2008-04-04 NightStrike PR other/35151 * configure.ac: Combine rules for mingw32 and mingw64. * configure: Regenerate. 2008-03-27 Paolo Bonzini * Makefile.tpl (PICFLAG, PICFLAG_FOR_TARGET): Remove. * Makefile.in: Regenerate. 2008-03-20 Ian Lance Taylor * configure.ac: Add support for --enable-gold. * Makefile.def: Add gold as a directory like ld. * configure, Makefile.in: Regenerate. 2008-03-19 Andreas Krebbel * opcodes/s390-mkopc.c (s390_opcode_cpu_val): S390_OPCODE_Z10 added. (s390_cond_extensions): Reduced extensions to the compare related. (main): z10 cpu type option added. (expandConditionalJump): Renamed to ... (insertExpandedMnemonic): ... this. * opcodes/s390-opc.c: Re-group the operand format makros. (INSTR_RIE_RRPU, INSTR_RIE_RRP0, INSTR_RIE_RUPI, INSTR_RIE_R0PI, INSTR_RIE_RUPU, INSTR_RIE_R0PU, INSTR_RIE_R0IU, INSTR_RIE_R0I0, INSTR_RIE_R0UU, INSTR_RIE_R0U0, INSTR_RIE_RRUUU, INSTR_RIS_RURDI, INSTR_RIS_R0RDI, INSTR_RIS_RURDU, INSTR_RIS_R0RDU, INSTR_RRF_U0RR, INSTR_RRF_00RR, INSTR_RRS_RRRDU, INSTR_RRS_RRRD0, INSTR_RXY_URRD, INSTR_SIY_IRD, INSTR_SIL_RDI, INSTR_SIL_RDU): New instruction formats added. (MASK_RIE_RRPU, MASK_RIE_RRP0, MASK_RIE_RUPI, MASK_RIE_R0PI, MASK_RIE_RUPU, MASK_RIE_R0PU, MASK_RIE_R0IU, MASK_RIE_R0I0, MASK_RIE_R0UU, MASK_RIE_R0U0, MASK_RIE_RRUUU, MASK_RIS_RURDI, MASK_RIS_R0RDI, MASK_RIS_RURDU, MASK_RIS_R0RDU, MASK_RRF_U0RR, MASK_RRF_00RR, MASK_RRS_RRRDU, MASK_RRS_RRRD0, MASK_RXY_URRD, MASK_SIY_IRD, MASK_SIL_RDI, MASK_SIL_RDU): New instruction format masks added. (s390_opformats): New formats added "ris", "rrs", "sil". * opcodes/s390-opc.txt: Add the conditional jumps with the extensions removed from automatic expansion in s390-mkopc.c manually. (asi - trtre): Add new System z10 EC instructions. * include/opcode/s390.h (s390_opcode_cpu_val): S390_OPCODE_Z10 added. 2008-03-17 Ralf Wildenhues * configure.ac: m4_include config/proginstall.m4. * configure: Regenerate. 2008-03-16 Ralf Wildenhues Backport from upstream Libtool: 2007-10-12 Eric Blake Deal with Autoconf 2.62's semantic change in m4_append. * ltsugar.m4 (lt_append): Replace broken versions of m4_append. (lt_if_append_uniq): Don't require separator to be overquoted, and avoid broken m4_append. (lt_dict_add): Fix typo. * libtool.m4 (_LT_DECL): Don't overquote separator. 2008-03-13 David Edelsohn * config.rpath: Add AIX 6 support. 2008-03-13 Paolo Bonzini * Makefile.def (stageprofile). Remove -fprofile-generate from stage_libcflags. * Makefile.in: Regenerate. 2008-03-13 Ben Elliston * config.sub, config.guess: Update from upstream sources. 2008-03-06 Florian Krohm * s390-opc.c (INSTR_RSL_R0RD): Fix operands. * s390-opc.txt (cmpsc): Duplicate entry removed. (dxr, sqdr, sqer, cxfbr, cdfbr, cefbr, lzer, lzdr, lzxr, cegbr, cdgbr, cxgbr, cegr, cdgr, cxgr, cxfr, cdfr, cefr, fixr, fidr, fier, cu42, cu41): Fix operand format. 2008-02-20 Paolo Bonzini PR bootstrap/32009 PR bootstrap/32161 * configure.ac (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Compute here. * configure: Regenerate. * Makefile.def: Define stage_libcflags for all bootstrap stages. * Makefile.tpl (BOOT_LIBCFLAGS, STAGE2_LIBCFLAGS, STAGE3_LIBCFLAGS, STAGE4_LIBCFLAGS): New. (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Subst from autoconf, without $(SYSROOT_CFLAGS_FOR_TARGET) and $(DEBUG_PREFIX_CFLAGS_FOR_TARGET). (BASE_TARGET_EXPORTS): Append them here to C{,XX}FLAGS. (EXTRA_TARGET_FLAGS): Append them here to {LIB,}C{,XX}FLAGS. (configure-stage[+id+]-[+prefix+][+module+]): Pass stage_libcflags for target modules. Don't export LIBCFLAGS. (all-stage[+id+]-[+prefix+][+module+]): Pass stage_libcflags; pass $(BASE_FLAGS_TO_PASS) where [+args+] was passed, and [+args+] after the overridden CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET. (invocations of `all'): Replace $(TARGET_FLAGS_TO_PASS) with $(EXTRA_TARGET_FLAGS), $(FLAGS_TO_PASS) with $(EXTRA_HOST_FLAGS). * Makefile.in: Regenerate. 2008-02-16 Ralf Wildenhues PR libgcj/33085 * libtool.m4 (_LT_COMPILER_PIC) [ mingw, cygwin ] : Do not use -DDLL_EXPORT. Backport from upstream. 2008-02-14 Nick Clifton Import this patch from gcc: 2008-01-24 David Edelsohn * libtool.m4: Backport AIX 6 support from ToT Libtool. 2008-02-02 Hans-Peter Nilsson * configure.ac: Enable fortran for cris-*-elf and crisv32-*-elf. * configure: Regenerate. 2008-01-31 Marc Gauthier * configure.ac (xtensa*-*-*): Recognize processor variants. * configure: Regenerate. 2008-01-30 Ralf Wildenhues PR bootstrap/34922 * configure.ac (PARSE_ARGS): Push suitable setting of ac_subdirs_all, for `./configure --help=recursive'. Handle `+' in generic toplevel directory disabling. * configure: Regenerate. 2008-01-23 Ben Elliston * config.sub, config.guess: Update from upstream sources. 2008-01-08 Ben Elliston * config.sub, config.guess: Update from upstream sources. 2007-12-19 Jeff Johnston * COPYING.LIBGLOSS: Update default copyright. 2007-12-19 Jeff Johnston * COPYING.NEWLIB: Update default copyright. 2007-12-17 Kaveh R. Ghazi * configure.ac: Change required MPFR from 2.2.0 -> 2.2.1. Change recommended MPFR from 2.2.1 > 2.3.0. * configure: Regenerate. 2007-12-13 Richard Sandiford * Makefile.tpl (CFLAGS_FOR_TARGET): Add -g. (CXXFLAGS_FOR_TARGET): Add -O2 -g. * Makefile.in: Regenerate. 2007-12-10 Andreas Tobler * configure.ac: Enable libjava for x86_64-*-darwin9. * configure: Regenerate. 2007-12-05 Ben Elliston * config.sub, config.guess: Update from upstream sources. 2007-11-28 Ralf Wildenhues * config-ml.in: Robustify against white space in absolute file names. * config-ml.in (multi-clean): Substitute ${Makefile}. Remove superfluous ${Makefile} in list. 2007-10-23 Daniel Jacobowitz * Makefile.def (dependencies): Make configure-gdb depend on all-intl. * Makefile.in: Regenerated. 2007-10-15 Patrick Mansfield * Makefile.def: To avoid problems running with parallel makes, build newlib before libgloss so that target specific header files are availble. * Makefile.in: Regenerate. 2007-10-11 Daniel Jacobowitz * Makefile.def (dependencies): Add all-gdb -> all-libdecnumber. * Makefile.in: Regenerate. 2007-10-11 Daniel Jacobowitz * src-release (GDB_SUPPORT_DIRS): Add libdecnumber. * libdecnumber: New directory, imported from GCC. 2007-10-08 Mike Frysinger * configure.ac (CFLAGS_FOR_BUILD, CXXFLAGS_FOR_BUILD, LDFLAGS_FOR_BUILD): Default them to host flags only for $host = $build. Set default CXXFLAGS_FOR_BUILD to CXXFLAGS, not CFLAGS. Set default LDFLAGS_FOR_BUILD to LDFLAGS, not CFLAGS. * configure: Regenerate. 2007-10-01 Paolo Bonzini * Makefile.tpl (AR_FOR_BUILD, AS_FOR_BUILD, CXX_FOR_BUILD, DLLTOOL_FOR_BUILD, GCJ_FOR_BUILD, GFORTRAN_FOR_BUILD, LDFLAGS_FOR_BUILD, LD_FOR_BUILD, NM_FOR_BUILD, RANLIB_FOR_BUILD, WINDMC_FOR_BUILD, WINDRES_FOR_BUILD): Use autoconf substitutions. * configure.ac: Default them to host tools for $host = $build. Subst them. * configure: Regenerate. * Makefile.in: Regenerate. 2007-09-20 Richard Sandiford * configure.ac (mipsisa*-*-elfoabi*): New stanza. * configure: Regenerate. 2007-09-19 Benjamin Kosnik * configure.ac (TOPLEVEL_CONFIGURE_ARGUMENTS): Move libgomp before libstdc++. * Makefile.def: Add libgomp config as a maybe dependency for libstdc++. * configure: Regenerate. * Makefile.in: Regenerate. 2007-09-17 Andreas Schwab * configure.ac: Raise minimum makeinfo version to 4.6. * configure: Regenerate. 2007-09-15 Alan Modra * configure.ac: Correct makeinfo version check. * configure: Regenerate. 2007-09-14 Richard Sandiford * configure.ac (mips*-sde-elf*): New stanza. Add target-libiberty to $skipdirs and only disable gprof for newlib. Use the normal mips*-elf* handling in other respects. * configure: Regnerate. 2007-09-12 David Daney * configure.ac: Remove mips64*-*-linux* noconfigdirs section, thus enabling libgcj. * configure: Regenerate. 2007-09-12 Richard Guenther * configure.ac (--enable-stage1-checking): If neither --enable-checking nor --disable-checking is provided also turn on yes and types checking for stage1. * configure: Re-generate. 2007-09-11 Francois-Xavier Coudert PR target/33281 * configure.ac: Use config/mh-mingw on mingw. * configure: Regenerate. 2007-09-10 Rask Ingemann Lambertsen PR other/32154 * configure.ac: For libgloss targets, point the linker to the linker script, startup code and simulator library. * configure: Regenerate. 2007-09-09 Andrew Haley * configure.ac (noconfigdirs): Remove target-libffi and target-libjava. 2007-08-29 Nick Clifton * config.sub, config.guess: Update from upstream sources. 2007-08-21 Richard Guenther * configure.ac: Add types checking to stage1 checking flags. * configure: Regenerate. 2007-08-18 Paul Brook Joseph Myers * Makefile.tpl (DEBUG_PREFIX_CFLAGS_FOR_TARGET): New. (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Include it. * Makefile.in: Regenerate. * configure.ac (--with-debug-prefix-map): New. * configure: Regenerate. 2007-08-17 Richard Sandiford Nigel Stephens * configure.ac (mips*-sde-elf*): New stanza. Use config/mt-sde as target_makefile_frag. * configure: Regenerate. 2007-08-16 Alexandre Oliva * Makefile.def (STAGE2_CFLAGS, STAGE3_CFLAGS, STAGE4_CFLAGS): Add to flags_to_pass. Adjust uses of BOOT_CFLAGS. (bootstrap2-debug, bootstrap-debug): New bootstrap stages. * Makefile.tpl (STAGE2_CFLAGS, STAGE3_CFLAGS, STAGE4_CFLAGS): New. (do-compare, do-compare3, do-compare-debug): New. ([+compare-target+]): Use them. 2007-08-16 Alexandre Oliva * Makefile.def (STAGE2_CFLAGS, STAGE3_CFLAGS, STAGE4_CFLAGS): Add to flags_to_pass. Adjust uses of BOOT_CFLAGS. (bootstrap2-debug, bootstrap-debug): New bootstrap stages. * Makefile.tpl (STAGE2_CFLAGS, STAGE3_CFLAGS, STAGE4_CFLAGS): New. (do-compare, do-compare3, do-compare-debug): New. ([+compare-target+]): Use them. 2007-08-13 Ralf Wildenhues Ben Elliston * configure.ac (TOPLEVEL_CONFIGURE_ARGUMENTS, baseargs): Pass --silent if $silent. * configure: Regenerate. 2007-08-12 Daniel Jacobowitz * src-release (DEVO_SUPPORT): Add COPYING3 and COPYING3.LIB. 2007-07-17 Nick Clifton * COPYING3: New file. Contains version 3 of the GNU General Public License. * COPYING3.LIB: New file. Contains version 3 of the GNU Lesser General Public License. 2007-07-11 Bernd Schmidt * configure.ac: Fix my previous change to really match GCC. * configure: Regenerate. 2007-07-11 Ralf Wildenhues * configure.ac: Rewrite 'configure --help' strings to look nicer. * configure: Regenerate. 2007-07-11 Ralf Wildenhues * configure.ac: Add some missing m4 quotation. * configure: Regenerate. 2007-07-09 Kai Tietz * Makefile.def: Add windmc tool to build. * Makefile.tpl: Likewise. * configure.ac: Likewise. * Makefile.in: Regenerate. * configure: Regenerate. 2007-07-05 H.J. Lu * lt~obsolete.m4: New. Import from 20070318 libtool. 2007-06-29 Bernd Schmidt * configure.ac: Don't add target-libmudflap to noconfigdirs for uclinux and linux-uclibc targets. * configure: Regenerate. 2007-06-28 DJ Delorie * configure.ac (arm*-*-linux-gnueabi): Don't build libgloss if we're not building newlib. * configure: Regenerated. 2007-06-22 Daniel Jacobowitz * src-release (DEVO_SUPPORT): Correct typos. 2007-06-18 Daniel Jacobowitz * Makefile.def: Add dependency from configure-gdb to all-bfd. * Makefile.in: Regenerated. 2007-06-14 Paolo Bonzini * Makefile.tpl (cleanstrap): Don't delete the toplevel Makefile. (distclean-stage[+id+]): Possibly delete stage_last. * Makefile.in: Regenerate. 2007-06-07 Ben Elliston * config.sub, config.guess: Update from upstream sources. 2007-06-07 Ben Elliston * Makefile.tpl: Fix spelling error. * Makefile.in: Regenerate. 2007-06-04 Paolo Bonzini Sync with gcc: 2007-05-30 Jakub Jelinek PR bootstrap/29382 * configure.ac: Don't use -fkeep-inline-functions for GCC < 3.3.1. * configure: Rebuilt. 2007-06-01 Steve Ellcey * libtool.m4 (LT_CMD_MAX_LEN): Try using getconf to set lt_cv_sys_max_cmd_len. 2007-05-31 Paolo Bonzini * ltgcc.m4: Update from GCC. 2007-05-25 Andreas Tobler * ltmain.sh: Fix Darwin verstring, remove ${wl}. 2007-05-24 Steve Ellcey * ltmain.sh: Update from GCC. * libtool.m4: Update from GCC. * ltsugar.m4: New. Update from GCC. * ltversion.m4: New. Update from GCC. * ltoptions.m4: New. Update from GCC. * ltconfig: Remove. * ltcf-c.sh: Remove. * ltcf-cxx.sh: Remove. * ltcf-gcj.sh: Remove. * src-release: Update with new libtool file list. 2007-05-16 Paolo Bonzini * Makefile.def (bootstrap_stage): Replace stage_make_flags with stage_cflags. * Makefile.tpl (POSTSTAGE1_HOST_EXPORTS, POSTSTAGE1_FLAGS_TO_PASS): Remove CFLAGS/LIBCFLAGS. (configure-stage[+id+]-[+prefix+][+module+], all-stage[+id+]-[+prefix+][+module+]): Pass it from [+stage_cflags+]. * Makefile.in: Regenerate. 2007-04-14 Steve Ellcey * config-ml.in: Update from GCC. 2007-04-09 Daniel Jacobowitz * src-release (do-proto-toplev): Process the support directories before the tool directory. 2007-03-21 Richard Sandiford * configure.ac (TOPLEVEL_CONFIGURE_ARGUMENTS): Fix m4 quoting of glob. Quote arguments with single quotes too. * configure: Regenerate. 2007-03-12 Brooks Moses * Makefile.def (fixincludes): Remove unneeded "missing" lines. * Makefile.in: Regenerate 2007-03-07 Andreas Schwab * configure: Regenerate. 2007-03-01 Brooks Moses * configure.ac: Add "--with-pdfdir" configure option, which defines pdfdir variable. * Makefile.def (target=fixincludes): Add install-pdf to missing targets. (recursive_targets): Add install-pdf target. (flags_to_pass): Add pdfdir. * Makefile.tpl: Add pdfdir handling, add do-install-pdf target. * configure: Regenerate * Makefile.in: Regenerate 2007-02-28 Eric Christopher Revert: 2006-12-07 Mike Stump * Makefile.def (dependencies): Add dependency for install-target-libssp and install-target-libgomp on install-gcc. * Makefile.in: Regenerate. 2007-02-27 Matt Kraai * configure: Regenerate. * configure.ac: Move statements after variable declarations. 2007-02-19 Joseph Myers * configure.ac: Adjust for loop syntax. * configure: Regenerate. 2007-02-18 Alexandre Oliva * configure: Rebuilt. 2007-02-18 Alexandre Oliva * configure.ac: Drop multiple occurrences of --enable-languages, and fix its quoting. * configure: Rebuilt. 2007-02-17 Mark Mitchell Nathan Sidwell Vladimir Prus * configure.ac (TOPLEVEL_CONFIGURE_ARGUMENTS): Fix quoting. * configure: Regenerate. 2007-02-13 Daniel Jacobowitz * configure.ac (target_libraries): Move libgcc before libiberty. * configure: Regenerated. 2007-02-13 Paolo Bonzini * configure: Regenerate again? 2007-02-13 Paolo Bonzini * configure: Reapply PR30748 fix which was lost in the previous commit. 2007-02-13 Daniel Jacobowitz Paolo Bonzini PR bootstrap/30753 * configure.ac: Remove obsolete build / host tests. Use AC_PROG_CC unconditionally. Use AC_PROG_CXX. Use ACX_TOOL_DIRS to find $prefix. * configure: Regenerated. 2007-02-10 Paolo Bonzini * configure: Regenerate. 2007-02-09 Daniel Jacobowitz PR bootstrap/30748 * configure.ac: Correct syntax for Solaris ksh. * configure: Regenerated. 2007-02-09 Paolo Bonzini * Makefile.def: Sync with GCC. * Makefile.tpl: Sync with GCC. * Makefile.in: Regenerate. * configure: Regenerate. 2007-02-09 Daniel Jacobowitz * Makefile.tpl (build_alias, host_alias, target_alias): Use noncanonical equivalents. * configure.in: Rename to... * configure.ac: ...this. Update AC_PREREQ. Prevent error for AS_FOR_TARGET. Set build_noncanonical, host_noncanonical, and target_noncanonical. Use them. Rewrite removal of configure arguments for autoconf 2.59. Discard variable settings. Force program_transform_name for native tools. * Makefile.in: Regenerated. * configure: Regenerated with autoconf 2.59. * src-release (DEVO_SUPPORT, do-proto-toplev): Expect configure.ac. 2007-02-08 Jeff Johnston * COPYING.LIBGLOSS: Reformat default Red Hat license to fit within 80 columns. * COPYING.NEWLIB: Ditto. 2007-02-05 Dave Brolley * Contribute the following changes: 2006-11-28 DJ Delorie * configure.in: Fix typo for mep's target_makefile_frag. * configure: Regenerated. 2005-04-22 Richard Sandiford * configure.in (mep*): Add -mlibrary to FLAGS_FOR_TARGET. * configure: Regenerate. 2001-09-19 DJ Delorie * configure.in (target_makefile_frag): use mt-mep 2001-06-12 Don Howard * configure.in: Remove gdb from MeP skip list. 2001-04-05 DJ Delorie * configure.in (noconfigdirs): Remove gcc from MeP skip list. 2001-03-20 Ben Elliston * configure.in (noconfigdirs): Add gcc and gdb for MeP. 2001-03-19 Ben Elliston * config.sub (mep, mep-*): Add. 2007-01-31 Andreas Schwab * Makefile.tpl (LDFLAGS): Substitute it. * Makefile.in: Regenerate. 2007-01-11 Paolo Bonzini * configure.in: Change == to = in test command. * configure: Regenerate. 2007-01-11 Paolo Bonzini Nick Clifton Kaveh R. Ghazi * configure.in (build_configargs, host_configargs, target_configargs): Remove build/host/target parameters. (host_libs): Add gmp and mpfr. (GMP tests): Reorganize to allow in-tree GMP/MPFR. * Makefile.def (gmp, mpfr): New. (gcc): Remove target. * Makefile.tpl (build_os, build_vendor, host_os, host_vendor, target_os, target_vendor): New. (configure): Add host_alias/target_alias arguments. Adjust invocations. * configure: Regenerate. * Makefile.in: Regenerate. 2007-01-11 Matt Fago * configure.in: Try to link to functions only in mpfr 2.2.x to improve robustness of configure tests. * configure: Regenerate. 2007-01-08 Kai Tietz * configure.in: Add support for an x86_64-mingw* target. * configure: Regenerate. 2007-01-05 Daniel Jacobowitz * Makefile.tpl (all-target): Correct @if conditional for target modules. * configure.in: Omit libiberty if building only target libgcc. * configure, Makefile.in: Regenerated. 2007-01-04 Paolo Bonzini * configure.in: Use DEV-PHASE to detect the default for --enable-werror. * configure: Regenerate. 2007-01-03 Daniel Jacobowitz * Makefile.def (target_modules): Add libgcc. (lang_env_dependencies): Remove default items. Use no_c and no_gcc. * Makefile.tpl (clean-target-libgcc): Delete. (configure-target-[+module+]): Emit --disable-bootstrap dependencies on gcc even for bootstrapped modules. Rewrite handling of lang_env_dependencies to loop over target_modules. * configure.in (target_libraries): Add target-libgcc. * Makefile.in, configure: Regenerated. 2006-12-29 Paolo Bonzini Sync with gcc: 2006-12-29 Paolo Bonzini * configure.in: Reorganize recognition of languages. Add --enable-stage1-languages. Show supported languages for the chosen target rather than all recognized languages. * configure: Regenerate. 2006-12-29 Paolo Bonzini * Makefile.tpl (GCC_STRAP_TARGETS, all-prebootstrap): Remove. * Makefile.in: Regenerate. 2006-12-29 Kaveh R. Ghazi * configure.in: Warn that MPFR 2.2.0 is buggy. * configure: Regenerate. 2006-12-27 Ian Lance Taylor * configure.in: When removing Makefiles to force a reconfigure, also remove prev-DIR*/Makefile. * configure: Regenerate. 2006-12-23 Kazu Hirata * config.bfd: Recognize fido. 2006-12-19 Paolo Bonzini Sync with gcc: 2006-12-19 Paolo Bonzini * configure.in: Remove "$build" case for powerpc-*-darwin* since it only affects bootstrap and could be tested on "$host" as well. * configure: Regenerate. * config/mh-ppc-darwin: Add to the stage1 cflags here. 2006-12-19 Paolo Bonzini PR bootstrap/29544 * Makefile.def (flags_to_pass): Add STAGE1_CHECKING. (bootstrap_stage): Add STAGE1_CHECKING to stage1 configure flags, move here comment from Makefile.tpl. * Makefile.tpl: Move some definitions higher in the file. (STAGE1_CHECKING): New. * configure.in: Add --enable-stage1-checking. * configure: Regenerate. * Makefile.in: Regenerate. 2006-12-03 Kaveh R. Ghazi * configure.in: Update error message for missing GMP/MPFR. * configure: Regenerate. 2006-12-02 Kaveh R. Ghazi * configure.in: Update MPFR version in error message. * configure: Regenerate. 2006-11-26 Kaveh R. Ghazi * configure.in (--with-mpfr-dir, --with-gmp-dir): Remove flags. (--with-mpfr-include, --with-mpfr-lib, --with-gmp-include, --with-gmp-lib): New flags. * configure: Regenerate. 2006-12-12 Andreas Tobler PR bootstrap/30134 * configure.in: Correct x86 darwin support for libjava to powerpc and i?86 only. * configure: Regenerate. 2006-12-11 Alan Modra * configure.in: Handle spu makefile frag. * Makefile.tpl (MAINT): Define (MAINTAINER_MODE_FALSE, MAINTAINER_MODE_TRUE): Define. * configure: Regenerate. * Makefile.in: Regenerate. 2006-12-11 Ben Elliston * config.sub, config.guess: Update from upstream sources. 2006-12-11 Ben Elliston * configure.in: Sync with GCC (spu-*-*). * configure: Sync with GCC. 2006-12-07 Mike Stump * Makefile.def (dependencies): Add dependency for install-target-libssp and install-target-libgomp on install-gcc. * Makefile.in: Regenerate. 2006-11-16 Paolo Bonzini * Makefile.tpl (clean-target-libgcc): Test for gcc Makefile presence. (unstage): Test for stage_last presence. PR bootstrap/29802 * Makefile.tpl (POSTSTAGE1_FLAGS_TO_PASS): Add HOST_SUBDIR in STAGE_PREFIX. * Makefile.in: Regenerate. 2006-11-14 DJ Delorie * Makefile.tpl (clean-stage*): Sync with GCC (clean). * Makefile.in: Sync with GCC. * configure.in: Sync with GCC (mpfr, gmp). * configure: Sync with GCC. 2006-11-08 Jie Zhang * configure.in: Remove target-libgloss from noconfigdirs for bfin-*-*. * configure: Regenerated. 2006-10-27 Jeff Johnston * COPYING.NEWLIB: Add spu license. * COPYING.LIBGLOSS: Ditto. 2006-10-17 Brooks Moses * Makefile.def: Added pdf target handling. * Makefile.tpl: Added pdf target handling. * Makefile.in: Regenerated. 2006-10-11 Jeff Johnston * COPYING.NEWLIB: Updated. * COPYING.LIBGLOSS: Ditto. 2006-09-27 Dave Brolley * configure.in (RUNTEST): Look for 'runtest' in the source tree by using $s instead of $r. * configure: Regenerated. 2006-09-26 Ben Elliston * config.sub, config.guess: Update from upstream sources. 2006-09-20 Thiemo Seufer * configure.in: Remove redundant handling of mips*-dec-bsd*. Likewise for mipstx39-*-*. Disable libgloss for mips64*-*-linux*. * configure: Regenerate. 2006-08-30 Corinna Vinschen * configure.in: Never build newlib for a Mingw host. Never build newlib as Mingw target library. Test the existence of winsup/cygwin for building a Cygwin newlib, rather than just winsup. Add winsup/mingw and winsup/w32api paths to FLAGS_FOR_TARGET if building a Mingw target. * configure: Regenerate. 2006-08-15 Thiemo Seufer Nigel Stephens David Ung * config.sub: Add support for sde as alias of mipsisa32-sde-elf. 2006-07-25 Paolo Bonzini Sync from GCC: 2006-07-04 Eric Botcazou PR bootstrap/18058 * configure.in: Add -fkeep-inline-functions to CFLAGS for stage 1 if the bootstrap compiler is a GCC version that supports it. * configure: Regenerate. 2006-07-22 Daniel Jacobowitz * configure.in: Allow mingw32 and cygwin targets to build cross-gdb. * configure: Regenerated. 2006-07-18 Paolo Bonzini * Makefile.tpl (configure-stageN-MODULE): Pass --with-build-libsubdir for stages after the first. 2006-07-17 Jakub Jelinek * Makefile.def: Add dependencies for configure-opcodes on configure-intl and all-opcodes on all-intl. * Makefile.in: Regenerated. 2006-07-04 Peter O'Gorman * ltconfig: chmod 644 before ranlib during install. 2006-07-03 Paolo Bonzini * configure.in: Fix thinkos in previous check-in. * configure: Regenerate. 2006-07-03 Paolo Bonzini Sync from gcc: 2007-07-03 Paolo Bonzini PR other/27063 * configure.in: Test subdir_requires and give an appropriate error message. * configure: Regenerate. 2006-06-16 Rainer Orth PR target/27540 * configure.in: Only enable libgomp on IRIX 6. * configure: Regenerate. 2006-06-20 David Ayers PR bootstrap/28072 * configure.in: Add target-boehm-gc to noconfigdirs depending on whether target-libjava is being configured instead of whether the java front end is enabled. * configure: Regenerate. 2006-06-15 Mark Shinwell * include/elf/arm.h: Correct names of R_ARM_LDC_G{0,1,2} to R_ARM_LDC_SB_G{0,1,2} respectively. 2006-06-15 Paolo Bonzini * Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Export CFLAGS and LDFLAGS too. * Makefile.in: Regenerate. 2006-06-13 John David Anglin Sync from gcc: 2006-06-12 John David Anglin * configure.in: Don't enable libgomp on hpux10. * configure: Rebuilt. 2006-06-13 David Ayers Sync from gcc: 2006-06-12 David Ayers PR bootstrap/27963 PR target/19970 * configure.in: Remove target-boehm-gc from noconfigdirs where ${libgcj} is specified. * configure: Regenerate. 2006-06-08 Jeff Johnston Sync from gcc: 2005-01-12 David Edelsohn Andreas Schwab PR bootstrap/18033 * config-ml.in: Eval option if surrounded by single quotes. 2006-06-07 Carlos O'Donell Sync from gcc: 2006-06-06 David Ayers PR libobjc/13946 * Makefile.def: Add dependencies for libobjc which boehm-gc. * Makefile.in: Regenerate. * configure.in: Add --enable-objc-gc at toplevel and have it enable boehm-gc for Objective-C. Remove target-boehm-gc from libgcj. Add target-boehm-gc to target_libraries. Add target-boehm-gc to noconfigdirs where ${libgcj} is specified. Assert that boehm-gc is supported when requested for Objective-C. Only build boehm-gc if needed either for Java or Objective-C. * configure: Regenerate. 2006-06-05 Paolo Bonzini PR 27674 * Makefile.tpl (configure-[+prefix+][+module+], all-[+prefix+][+module+]): Depend on stage_current if bootstrapping. Remove rule to unstage bootstrapped modules. (stage_current): New. * Makefile.in: Regenerate. 2006-05-20 John David Anglin Andreas Tobler * configure.in: Enable libgcj for hppa*-hp-hpux11*. * configure: Rebuilt. Revert 2006-01-31 Richard Guenther Paolo Bonzini * Makefile.def (target_modules): Add libgcc-math target module. * configure.in (target_libraries): Add libgcc-math target library. (--enable-libgcc-math): New configure switch. * Makefile.in: Re-generate. * configure: Re-generate. 2006-06-05 Jeff Johnston * config-ml.in: Alter CCASFLAGS to include special multilib options the same as is done for CFLAGS. 2006-05-31 Daniel Jacobowitz * Makefile.def: Added dependencies from sim and gdb on intl, and added configure dependencies to everything with an all dependency on intl. * gettext.m4: Removed. * src-release (DEVO_SUPPORT): Don't mention gettext.m4. (GDB_SUPPORT_DIRS): Add intl. * Makefile.in: Regenerated. 2006-05-25 Daniel Jacobowitz * src-release (DEVO_SUPPORT): Add config.rpath. 2006-05-25 Paolo Bonzini * Makefile.def (bfd, opcodes): Fix lib_path. * Makefile.tpl (POSTSTAGE1_FLAGS_TO_PASS): Replace ADAC with ADAFLAGS. (restrap): Move under "@if gcc-bootstrap". Fix typo. * Makefile.in: Regenerate. 2006-05-24 Mark Shinwell * configure.in: Enable gprof for cross builds. * configure: Regenerate. 2006-05-17 Daniel Jacobowitz * src-release (MAKEINFOFLAGS): Define. (do-proto-toplev): Pass MAKEINFOFLAGS to submakes. 2006-05-14 Ben Elliston * config.sub, config.guess: Update from upstream sources. 2006-05-12 Ben Elliston * config.sub, config.guess: Update from upstream sources. 2006-05-04 Steve Ellcey * blt, iwidgets, mmalloc: Remove directories. 2006-05-01 DJ Delorie * configure.in: Restore CFLAGS if GMP isn't present. * configure: Regenerate. 2006-04-18 DJ Delorie * configure.in (m32c): Build libstdc++-v3. Pass flags to reference libgloss so that libssp can be built in a combined tree. * configure: Regenerate. 2006-04-10 Ben Elliston * contrib: Remove directory. 2006-04-06 Carlos O'Donell * Makefile.tpl: Add install-html target. * Makefile.def: Add install-html target. * Makefile.in: Regenerate. * configure.in: Add --with-datarootdir, --with-docdir, and --with-htmldir options. * configure: Regenerate. 2006-03-31 Ben Elliston PR binutils/1860 * configure.in: Require makeinfo 4.4 or higher. * configure: Regenerate. 2006-03-14 Paolo Bonzini * Makefile.in: Regenerate. 2006-03-14 Paolo Bonzini Sync with gcc: 2006-03-10 Aldy Hernandez * configure.in: Handle --disable- generically. * configure: Regenerate. 2006-02-21 Rafael Avila de Espindola * Makefile.tpl (BUILD_CONFIGDIRS): Remove. (TARGET_CONFIGDIRS): Remove. * configure.in: Remove AC_SUBST(target_configdirs). * Makefile.in, configure: Regenerated. 2006-03-01 H.J. Lu PR libgcj/17311 * ltmain.sh: Don't use "$finalize_rpath" for compile. 2006-02-20 Paolo Bonzini PR bootstrap/25670 * Makefile.tpl ([+compare-target+]): Print explanation messages. * Makefile.def (ADAFLAGS, BOOT_ADAFLAGS, LANGUAGES): New flags_to_pass. * Makefile.tpl (BASE_FLAGS_TO_PASS): Support optional flags_to_pass. (EXTRA_GCC_FLAGS): Remove ADAFLAGS, BOOT_ADAFLAGS, LANGUAGES, BUILD_PREFIX, BUILD_PREFIX_1. * configure.in: (BUILD_PREFIX, BUILD_PREFIX_1): Don't substitute. * Makefile.def (bootstrap stage 1): Pass LIBCFLAGS too. * Makefile.tpl (POSTSTAGE1_FLAGS_TO_PASS): Override LIBCFLAGS too. * Makefile.tpl (configure-stage[+id+]-[+prefix+][+module+], all-stage[+id+]-[+prefix+][+module+], : Use $(current_stage) instead of `cat stage_current`. Always provide the `r' and `s' variables. (clean-stage[+id+]-[+prefix+][+module+]): Likewise, and make it into a single shell execution. (configure-[+prefix+][+module+], all-[+prefix+][+module+]): For bootstrapped modules, make the stage1 module if the build was not started yet, else build the current stage. (all-host, all-target): Omit bootstrapped modules (if bootstrapping). (all-build, all-host, all-target, [+make_target+]-host, [+make_target+]-target): Do not use \-continued lines. (target modules): Depend on stage_last, not all-gcc, if bootstrapping. (current_stage, restrap, stage_last): New. * Makefile.in: Regenerate. * configure: Regenerate. 2006-02-14 Paolo Bonzini Sync from gcc: 2006-01-31 Richard Guenther Paolo Bonzini * Makefile.def (target_modules): Add libgcc-math target module. * configure.in (target_libraries): Add libgcc-math target library. (--enable-libgcc-math): New configure switch. * Makefile.in: Re-generate. * configure: Re-generate. * libgcc-math: New toplevel directory. 2006-01-18 Richard Henderson Jakub Jelinek Diego Novillo * libgomp: New directory. * Makefile.def: Add target_module libgomp. * Makefile.in: Regenerate. * configure.in (target_libraries): Add target-libgomp. * configure: Regenerate. 2006-02-14 Paolo Bonzini Andreas Schwab * configure: Regenerate. 2006-01-16 Paolo Bonzini * configure.in: Set with_gnu_as, with_gnu_ld, with_newlib earlier. Set md_exec_prefix. Use ACX_CHECK_INSTALLED_TARGET_TOOL to find the assembler, linker and binutils. * configure: Regenerate. 2006-01-16 Nick Clifton * config.sub, config.guess: Sync from config repository. 2006-01-05 Alexandre Oliva * Makefile.tpl (clean-stage[+id+]-[+prefix+][+module+]): Remove @ from continuation. * Makefile.in: Rebuilt. 2006-01-04 Paolo Bonzini Sync from gcc: 2006-01-04 Paolo Bonzini PR bootstrap/24252 * Makefile.def (flags_to_pass): Add STAGE1_CFLAGS and STAGE1_LANGUAGES. * Makefile.tpl (OBJDUMP): New. (EXTRA_HOST_FLAGS): Add it. (EXTRA_GCC_FLAGS): Remove flags already specified in flags_to_pass. * Makefile.tpl (stage[+id+]-start, stage[+id+]-end): Do not try to use symbolic links between directories. Avoid race conditions or make them harmless. * configure.in: Do not try to use symbolic links between directories. * Makefile.def (LEAN): Pass. * Makefile.tpl (LEAN): Define. (stage[+id+]-start): Accept that the previous directory does not exist, if the bootstrap is lean. (stage[+id+]-bubble): Invoke lean bootstrap commands after stage[+id+]-start. Use a makefile variable and an `if' instead of a configure substitution. ([+compare-target+]): Likewise. ([+bootstrap-target+]-lean): New. * configure.in: Remove lean bootstrap support from here. * Makefile.in: Regenerate. * configure: Regenerate. 2006-01-02 Andreas Schwab * configure.in: When reconfiguring remove Makefile in all stage directories. * configure: Regenerate. 2005-12-27 Leif Ekblad * configure.in: Add support for RDOS target. * configure: Regenerate. 2005-12-27 Nick Clifton PR binutils/1990 * libtool.m4: Synchronize with version in GCC sources. 2005-12-20 Paolo Bonzini Revert Ada-related part of the previous change. * Makefile.def (ADAFLAGS, BOOT_ADAFLAGS, ADAFLAGS_FOR_TARGET): Do not pass. * Makefile.tpl (BOOT_ADAFLAGS): Do not define. * Makefile.in: Regenerate. * configure.in: Do not include mt-ppc-aix target fragment. * configure: Regenerate. 2005-12-19 Paolo Bonzini * configure.in: Select appropriate fragments for PowerPC/AIX. * configure: Regenerate. * Makefile.def (flags_to_pass): Add ADAFLAGS, BOOT_ADAFLAGS, BOOT_CFLAGS, BOOT_LDFLAGS. * Makefile.tpl (POSTSTAGE1_FLAGS_TO_PASS): Handle BOOT_ADAFLAGS, BOOT_CFLAGS, BOOT_LDFLAGS. (TARGET_FLAGS_TO_PASS): Handle ADAFLAGS_FOR_TARGET. (stage[+id+]-bubble): Pass flags recursively to the comparison target. (stage): Fail if we cannot complete the work. * Makefile.in: Regenerate. 2005-12-16 Jeff Johnston * COPYING.NEWLIB: Update copyright year for default copyright. 2005-12-15 Paolo Bonzini * Makefile.tpl (all, do-[+make_target+], do-check, install, install-host-nogcc): Don't invoke $(stage) at the end. * Makefile.in: Regenerate. 2005-12-14 Paolo Bonzini * configure.in: Flip the top-level bootstrap switch. * configure: Regenerate. Merge from gcc: 2005-12-14 Daniel Jacobowitz * Makefile.tpl: Throughout the file, use : $(MAKE) along with $(stage) and $(unstage). (EXTRA_TARGET_FLAGS): Correct double-quoting. (all): Remove stray semicolon. (local-distclean): Don't handle multilib.tmp and multilib.out. (install.all): Set $s for consistency. (configure-[+prefix+][+module+]): Instead of [+deps+], handle check_multilibs setting. Always make the install directory. (configure-stage[+id+]-[+prefix+][+module+]): Likewise. Correct @if/@endif. (all-stage[+id+]-[+prefix+][+module+]): Correct @if/@endif. ($(TARGET_SUBDIR)/[+module+]/multilib.out): Remove. (stage[+id+]-start, stage[+id+]-end): Stage $(TARGET_SUBDIR). (multilib.out): Remove. * Makefile.in: Regenerated. 2005-12-12 Nathan Sidwell * config.sub: Replace ms1 arch with mt. Allow ms1 as alias. * configure.in: Replace ms1 arch with mt. * configure: Rebuilt. 2005-12-05 Paolo Bonzini Sync with gcc: 2005-12-12 Nathan Sidwell * config.sub: Replace ms1 arch with mt. Allow ms1 as alias. * configure.in: Replace ms1 arch with mt. * configure: Rebuilt. 2005-12-05 Paolo Bonzini Sync with gcc: 2005-12-05 Paolo Bonzini * configure.in (CONFIGURED_BISON, CONFIGURED_YACC, CONFIGURED_M4, CONFIGURED_FLEX, CONFIGURED_LEX, CONFIGURED_MAKEINFO): Remove "CONFIGURED_" from the AC_CHECK_PROGS invocation. Move below. Find in-tree tools if available. (EXPECT, RUNTEST, LIPO, STRIP): Find them and substitute them. (CONFIGURED_*_FOR_TARGET): Don't set nor substitute. (*_FOR_TARGET): Set them with GCC_TARGET_TOOL. (COMPILER_*_FOR_TARGET): New. * Makefile.tpl (HOST_EXPORTS): Add *_FOR_TARGET symbols that gcc needs. (BASE_TARGET_EXPORTS): Use COMPILER_*_FOR_TARGET symbols. (CONFIGURED_*, USUAL_*): Remove. (BISON, YACC, FLEX, LEX, M4, MAKEINFO, EXPECT, RUNTEST, LIPO, STRIP): Use autoconf substitutions. (COMPILER_AS_FOR_TARGET, COMPILER_LD_FOR_TARGET, COMPILER_NM_FOR_TARGET): New. (EXTRA_HOST_FLAGS): Pass LIPO and STRIP. (all): Make all-host and all-target in parallel. (do-[+make_target+], do-check, install, [+compare-target+]): Ensure that $$r and $$s are set before invoking a recursive make. (stage[+id+]-bubble): Likewise, and invoke the comparison at the end. ([+bootstrap-target+]): Inline most of the `all' target. 2005-11-29 Ben Elliston * Makefile.tpl (clean-target-libgcc): Invoke clean-target-libgcc from the gcc build directory. * Makefile.in: Regenerate. 2005-11-29 Ben Elliston * Makefile.def: Add new libdecnumber host_module. Make all-gcc depend on all-libdecnumber. * configure.in (host_libs): Include libdecnumber. * Makefile.in: Regenerate. * configure: Likewise. 2005-11-21 Kean Johnston * config.sub, config.guess: Sync from upstream sources. 2005-11-11 Daniel Jacobowitz * Makefile.def: Remove gdb dependencies for gdbtk. * Makefile.tpl (CONFIGURE_GDB_TK, INSTALL_GDB_TK): New variables. (configure-gdb, install-gdb): New rules. * configure.in: Set CONFIGURE_GDB_TK and INSTALL_GDB_TK. * Makefile.in, configure: Regenerated. 2005-10-22 Paolo Bonzini PR bootstrap/24297 * Makefile.tpl (do-[+make-target+], do-check, install, stage[+id+]-bubble, [+compare-target+]): Ensure $$r and $$s are set before recursing. * Makefile.in: Regenerate. 2005-10-20 Eric Botcazou PR bootstrap/18939 * Makefile.def (gcc) : Fix thinko. * Makefile.in: Regenerate. 2005-10-17 Bernd Schmidt * configure.in (bfin-*-*): Use test, not brackets, in if statement. * configure: Regenerate. 2005-10-09 Kazu Hirata * configure.in (arm-*-linux-gnueabi): Add to noconfigdirs target-libffi, target-qthreads, target-libjava, and targetlibobjc. * configure: Regenerate. 2005-10-06 Daniel Jacobowitz * Makefile.def (flags_to_pass): Add OBJDUMP_FOR_TARGET. * Makefile.tpl (BASE_TARGET_EXPORTS): Add OBJDUMP. (OBJDUMP_FOR_TARGET, CONFIGURED_OBJDUMP_FOR_TARGET) (USUAL_OBJDUMP_FOR_TARGET): New. (EXTRA_TARGET_FLAGS): Add OBJDUMP. * configure.in: Check for $OBJDUMP_FOR_TARGET. * configure, Makefile.in: Regenerated. 2005-10-05 Paolo Bonzini * Makefile.tpl (all) [gcc-no-bootstrap]: Make prebootstrap packages before other host packages. 2005-10-05 Paolo Bonzini PR bootstrap/22340 * configure.in (default_target): Remove. * Makefile.tpl (all): Do not use prerequisites as subroutines (all) [gcc-bootstrap]: Bootstrap gcc first if it was not done yet. (do-[+make_target+], check, install, [+bootstrap_target+]): Do not use prerequisites as subroutines. (check-host, check-target): New. (bootstrap configure & all targets): Do not use stage*-start if the directory layout is already ok. (non-bootstrap configure & all targets): Prepend a $(unstage). (stage[+id+]-bubble): Do that here. Do not use NOTPARALLEL. (NOTPARALLEL): Remove. (unstage, stage variables): New variables. (unstage, stage targets): Simply expand to those variables. * configure: Regenerate. * Makefile.in: Regenerate. 2005-10-04 James E Wilson * Makefile.def (lang_env_dependencies): Add libmudflap. * Makefile.in: Regenerate. 2005-10-03 Catherine Moore * configure.in (bfin-*-*): Support bfin. * configure: Regenerated. 2005-09-30 H.J. Lu * configure.in (*-*-darwin*): Build bfd, binutils and opcodes. * configure: Regenerated. 2005-09-28 Geoffrey Keating * Makefile.tpl (BASE_TARGET_EXPORTS): Add LIPO, STRIP. (LIPO_FOR_TARGET): New. (CONFIGURED_LIPO_FOR_TARGET): New. (USUAL_LIPO_FOR_TARGET): New. (STRIP_FOR_TARGET): New. (CONFIGURED_STRIP_FOR_TARGET): New. (USUAL_STRIP_FOR_TARGET): New. * Makefile.def (flags_to_pass): Add LIPO_FOR_TARGET and STRIP_FOR_TARGET. * configure.in: Set LIPO_FOR_TARGET, STRIP_FOR_TARGET, CONFIGURED_LIPO_FOR_TARGET, CONFIGURED_STRIP_FOR_TARGET. * Makefile.in: Regenerate. * configure: Regenerate. 2005-09-19 David Edelsohn * configure.in (powerpc-*-aix*): Add target-libssp to noconfigdirs. (rs6000-*-aix*): Same. * configure: Regenerate. 2005-09-14 Francois-Xavier Coudert * configure.in: Recognize f95 in the --enable-languages option, and substitute it for fortran, issuing a warning. * configure: Regenerate. 2005-09-07 Ben Elliston Import from Autoconf sources: 2005-09-06 Paul Eggert * move-if-change: Don't output "$2 is unchanged"; suggested by Ben Elliston. Handle weird characters correctly. 2005-08-30 Phil Edwards * configure.in (*-*-vxworks*): Add target-libstdc++-v3 to noconfigdirs. * configure: Regenerated. 2005-08-20 Richard Earnshaw * Makefile.def (libssp): Add to lang_env_dependencies. * Makefile.in: Regenerate. 2005-08-17 Christian Groessler * Makefile.tpl: (USUAL_CC_FOR_TARGET): Add missing trailing slash. * Makefile.in: Regenerate. 2005-08-12 Paolo Bonzini * configure.in: Replace NCN_STRICT_CHECK_TOOL with NCN_STRICT_CHECK_TOOLS, and likewise for NCN_STRICT_CHECK_TARGET_TOOLS. Look for alternate names of the target cc and c++ * configure: Regenerate. 2005-08-08 Paolo Bonzini * configure.in (CC_FOR_TARGET, CXX_FOR_TARGET, GCJ_FOR_TARGET, GCC_FOR_TARGET, RAW_CXX_FOR_TARGET, GFORTRAN_FOR_TARGET): Find them with NCN_STRICT_CHECK_TARGET_TOOL, like the other target tools; remove code to manually set them. (Target tools): Look in the environment for them. * Makefile.tpl (CC_FOR_TARGET, CXX_FOR_TARGET, GCJ_FOR_TARGET, GCC_FOR_TARGET, RAW_CXX_FOR_TARGET, GFORTRAN_FOR_TARGET): Redefine. (AS_FOR_TARGET, LD_FOR_TARGET, NM_FOR_TARGET): Look into gcc build directory. (CONFIGURED_CC_FOR_TARGET, CONFIGURED_CXX_FOR_TARGET, CONFIGURED_GCJ_FOR_TARGET, CONFIGURED_GCC_FOR_TARGET, CONFIGURED_GFORTRAN_FOR_TARGET, USUAL_CC_FOR_TARGET, USUAL_CXX_FOR_TARGET, USUAL_GCJ_FOR_TARGET, USUAL_GCC_FOR_TARGET, USUAL_RAW_CXX_FOR_TARGET, USUAL_GFORTRAN_FOR_TARGET): New. (CXX_FOR_TARGET_FOR_RECURSIVE_MAKE, RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE, RECURSE_FLAGS): Delete. * configure: Regenerate. * Makefile.in: Regenerate. 2005-07-27 Mark Mitchell * Makefile.tpl (EXTRA_TARGET_FLAGS): Set LDFLAGS=LDFLAGS_FOR_TARGET. * Makefile.def (flags_to_pass): Add LDFLAGS_FOR_TARGET. * Makefile.in: Regenerated. 2005-07-26 Mark Mitchell * Makefile.tpl (SYSROOT_CFLAGS_FOR_TARGET): New variable. (CFLAGS_FOR_TARGET): Use it. (CXXFLAGS_FOR_TARGET): Likewise. * Makefile.in: Regenerated. * configure.in (--with-build-sysroot): New option. * configure: Regenerated. 2005-07-24 Paolo Bonzini * Makefile.tpl: Wrap install between unstage and stage * Makefile.in: Regenerate. 2005-07-16 Kelley Cook * all files: Update FSF address. 2005-07-14 Jim Blandy * configure.in: Add cases for Renesas m32c. * configure: Regenerated. 2005-07-14 Kelley Cook * COPYING, compile, config-ml.in, config.guess, config.sub, install-sh, missing, mkinstalldirs, symlink-tree, ylwrap: Sync from upstream sources. 2005-07-13 Eric Christopher * configure.in: Add toplevel noconfigdir support for tpf. * configure: Regenerate. 2005-07-11 Jakub Jelinek * Makefile.def (target_modules): Add libssp. * configure.in (target_libraries): Add target-libssp. * configure: Rebuilt. * Makefile.in: Rebuilt. 2005-07-11 Paolo Bonzini PR ada/22340 * Makefile.def: Sync with gcc. * Makefile.tpl (POSTSTAGE1_FLAGS_TO_PASS): Fix pasto. * Makefile.in: Regenerate. 2005-07-07 Andreas Schwab * Makefile.def (flags_to_pass): Add CFLAGS_FOR_BUILD. * Makefile.tpl (EXTRA_GCC_FLAGS): Don't pass CFLAGS_FOR_BUILD here. * Makefile.in: Regenerated. 2005-07-07 Kazu Hirata * configure.in: Add --enable-libssp and --disable-libssp. * configure: Regenerate with autoconf-2.13. 2005-07-06 Geoffrey Keating * configure.in: Don't build sim or rda when targetting darwin. * configure: Regenerate. 2005-07-04 Ben Elliston * src-release (do-proto-toplev): Remove dejagnu bits. (DEJAGNU_SUPPORT_DIRS): Remove. (dejagnu.tar.bz2, dejagnu.tar): Likewise. (GDBD_SUPPORT_DIRS): Likewise. (gdb+dejagnu.tar.bz2, gdb+dejagnu.tar): Likewise. (INSIGHTD_SUPPORT_DIRS): Likewise. (insight+dejagnu.tar.bz2, insight+dejagnu.tar): Likewise. 2005-06-30 Ben Elliston * setup.com (mpw): Remove unused directive. 2005-06-22 Paolo Bonzini * Makefile.def (stagefeedback): Come after profile. Define profiledbootstrap target. * Makefile.tpl (profiledbootstrap): Remove. (stageprofile-end): Zap stagefeedback. (stagefeedback-start): Copy all .gcda files, not only GCC's. * Makefile.in: Regenerate. 2005-06-13 Zack Weinberg * depcomp: Update from automake CVS. Add 'ia64hp' stanza. In 'cpp' stanza, support '#line' as well as '# '. 2005-06-07 Hans-Peter Nilsson * configure.in (unsupported_languages): New macro. : Set unsupported_languages. Name explicit non-ported target libraries in noconfigdirs. Ditto, except for non-aout, non-elf, non-linux-gnu. Remove libgcj_ex_libffi. : Set add_this_lang=no if the language is in unsupported_languages. * configure: Regenerate. 2005-06-04 Tobias Schl"uter * configure.in: Fix typo in handling of --with-mpfr-dir. * configure: Regenerate. 2005-06-02 Jim Blandy * config.sub: Add cases for the Renesas m32c. (This patch has been accepted into the master sources.) 2005-06-02 Aldy Hernandez Michael Snyder Stan Cox * configure.in: Set noconfigdirs for ms1. * configure: Regenerate. 2005-05-25 Paolo Bonzini * Makefile.tpl (stage[+id+]-start): Iterate over target module as well. (Dependencies): Consider target modules for bootstrap dependencies. Make target bootstrap modules depend on each stage's gcc. * Makefile.in: Regenerate. 2005-05-20 Paolo Bonzini * Makefile.def (configure-gcc): Depend on binutils having been built. (all-gcc): No need to do it here. * Makefile.in: Regenerate. 2005-05-19 Paul Brook * configure.in: Rewrite misleading error message when requested language cannot be built. * configure: Regenerate. 2005-05-15 Daniel Jacobowitz * ylwrap: Import from Automake 1.9.5. 2005-05-04 Mike Stump * configure.in: Always pass --target to target configures as otherwise rebuilds that do --recheck will fail. * configure: Rebuilt. 2005-05-04 Paolo Bonzini * Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Rename from STAGE_HOST_EXPORTS. (configure, all): Add bootstrap support. (Host modules, target modules): Pass post-stage1 flags and exports. (Top-level bootstrap): Remove bootstrap rules, expanded elsewhere. * Makefile.in: Regenerate. 2005-04-29 Paolo Bonzini Sync from gcc: 2005-04-22 Bernd Schmidt * config.sub: Update from master copy. 2005-04-19 Hans-Peter Nilsson * configure.in : New local variable libgcj_ex_libffi. Have specific match for *-*-linux*. Separate matches for "*-*-aout" and "*-*-elf". Don't disable libffi for "*-*-elf" and "*-*-linux*". * configure: Regenerate. 2005-04-06 Paolo Bonzini * Makefile.tpl (BUILD_CONFIGARGS): Include --with-build-subdir. (TARGET_CONFIGARGS): Include --with-target-subdir. (configure, all): New macros. Use them throughout. 2005-04-05 Paolo Bonzini * Makefile.tpl: Sync with gcc. * Makefile.in: Regenerate. 2005-03-30 J"orn Rennecke * config/mh-mingw32: Delete. * configure.in: Don't use it. * configure: Regenerate. 2005-03-31 Paolo Bonzini * Makefile.def (bfd, opcodes, libstdc++-v3, libmudflap): Set lib_path. * Makefile.tpl (SET_LIB_PATH, REALLY_SET_LIB_PATH): Remove. (HOST_EXPORTS, STAGE_HOST_EXPORTS, TARGET_EXPORTS): Set $(RPATH_ENVVAR). (HOST_LIB_PATH): Generate from Makefile.def. (TARGET_LIB_PATH): Likewise. (Old bootstrap targets): Include TARGET_LIB_PATH into RPATH_ENVVAR. * Makefile.in: Regenerate. * configure.in (set_lib_path, SET_LIB_PATH, SET_GCC_LIB_PATH): Remove. (RPATH_ENVVAR): Include Darwin case. * configure: Regenerate. 2005-03-25 Paolo Bonzini * configure.in (RPATH_ENVVAR): Set to DYLD_LIBRARY_PATH on Darwin. * configure: Regenerate. 2005-03-21 Zack Weinberg * Makefile.def: Remove libstdcxx_incdir, libsubdir, gxx_include_dir, gcc_version, and gcc_version_trigger from set of flags to pass. * Makefile.tpl: Remove definitions of above variables. (config.status): Remove dependency on $(gcc_version_trigger). * Makefile.in: Regenerate. * configure.in: Do not reference config/gcc-version.m4 nor config/gxx-include-dir.m4. Do not invoke TL_AC_GCC_VERSION nor TL_AC_GXX_INCLUDE_DIR. Do not set gcc_version_trigger. * configure: Regenerate. 2005-03-16 Manfred Hollstein Andrew Pinski * Makefile.tpl (check-[+module+]): Fix shell statement inside if ... fi. * Makefile.in: Regenerate. 2005-03-01 Alexandre Oliva PR libgcj/20160 * ltmain.sh: Avoid creating archives with components that have duplicate basenames. 2005-02-28 Andrew Pinski PR bootstrap/20250 * Makefile.tpl (HOST target installs): Fix copy and pasto, use install instead of check. * Makefile.in: Regenerate. 2005-02-28 Paolo Bonzini Sync from gcc. 2005-02-28 Paolo Bonzini PR bootstrap/17383 * Makefile.def (target_modules): Remove "stage", now unnecessary. * Makefile.tpl (HOST_SUBDIR): New substitution. (STAGE_HOST_EXPORTS, EXPECT, HOST_LIB_PATH, USUAL_AR_FOR_TARGET, USUAL_AS_FOR_TARGET, USUAL_DLLTOOL_FOR_TARGET, USUAL_GCC_FOR_TARGET, USUAL_LD_FOR_TARGET, USUAL_NM_FOR_TARGET, USUAL_OBJDUMP_FOR_TARGET, USUAL_RANLIB_FOR_TARGET, USUAL_WINDRES_FOR_TARGET): Use it. (Host modules, Bootstrapped modules): Use it. (Build modules, Target modules): Do not create symlink trees, always configure out-of-srcdir. (distclean): Try removing $(host_subdir) with rm before using rm -rf. * configure.in (FLAGS_FOR_TARGET, CC_FOR_TARGET, GCJ_FOR_TARGET, GFORTRAN_FOR_TARGET, CXX_FOR_TARGET, RAW_CXX_FOR_TARGET): Use $(HOST_SUBDIR). Create a symlink for host_subdir. * Makefile.in: Regenerate. * configure: Regenerate. Merged from libada-gnattools-branch: 2004-11-28 Nathanael Nerode * Makefile.def: Add gnattools as a module, depending on target-libada. * Makefile.in: Regenerate. * configure.in: Include gnattools in host_tools; disable it if ada is disabled. * configure: Regenerate. 2005-02-23 Nick Clifton * configure: Regenerate. 2005-02-22 Paul Schlie * configure.in: Allow darwin targeted ports to build tk, itcl and libgui. 2005-02-21 Eric Botcazou PR libgcj/10353 * configure.in (noconfigdirs) : Add libgcj. * configure: Regenerate. 2005-02-08 Andrew Cagney * MAINTAINERS: Delete reference to dejagnu/ and mmalloc/ from the gdb/ section. Update GDB's URL. 2005-01-31 Andrew Cagney * gettext.m4: Only set ENABLE_NLS when gettext is present. 2005-01-29 Hans-Peter Nilsson * configure.in (noconfigdirs) : Match like cris-*-*. : Only disable target-newlib and target-libgloss when not *-*-elf and *-*-aout. * configure: Regenerate. 2005-01-27 Andrew Cagney * gettext.m4: Don't use NONE as a default for CATOBJEXT. 2005-01-24 Andrew Cagney * gettext.m4: Only fall back to ../intl/ when it's present. 2005-01-17 Kelley Cook * install-sh, config.sub: Import from upstream. 2005-01-17 Kelley Cook PR bootstrap/18222 * Makefile.def: Pass CPPFLAGS_FOR_TARGET. * Makefile.tpl: Define target CPPFLAGS on CPPFLAGS_FOR_TARGET. * Makefile.in: Regenerate. 2005-01-03 Paolo Bonzini Revert 2004-12-28 Makefile changes, a better fix will be applied to mainline and src after GCC 4.0 branches. 2004-12-28 Paolo Bonzini PR bootstrap/17383 * Makefile.def (target_modules): Remove stage parameter, it is always true now. * Makefile.tpl (configure-build-[+module+], configure-target-[+module+]): Always build symlink tree for the directory and for include. BUILD_SUBDIR and TARGET_SUBDIR cannot be . anymore. * Makefile.in: Regenerate. 2004-12-25 David Edelsohn Revert 2004-12-08 Makefile changes. 2004-12-16 Andrew Stubbs * configure.in (sh64-*-*): Reenable gprof. * configure: Regenerate. 2004-12-09 Jim Blandy * MAINTAINERS: List 'depcomp' as part of automake. 2004-12-08 David Edelsohn * Makefile.def (flags_to_pass): Add PICFLAG_FOR_TARGET. * Makefile.tpl (EXTRA_HOST_FLAGS): Add PICFLAG. (EXTRA_TARGET_FLAGS): Add PICFLAG. * Makefile.in: Regenerate. 2004-12-07 Matt Kraai * Makefile.tpl: Generate normal dependencies if the LHS module is not bootstrapped. * Makefile.in: Regenerate. 2004-12-03 Richard Sandiford * configure.in: Include config/gxx-include-dir.m4. Use TL_AC_GXX_INCLUDE_DIR. Remove some now-redundant AC_SUBSTs. * configure: Regenerate. 2004-12-03 Richard Sandiford * config.if: Delete. * configure.in: Set libstdcxx_incdir directly. * configure: Regenerate. * MAINTAINERS: Remove mention of config.if. * src-release (DEVO_SUPPORT): Remove config.if. 2004-12-02 Eric Christopher * Makefile.tpl (clean-target-libgcc): Add stmp-dirs to list of things to remove. * Makefile.in: Regenerate. 2004-12-02 Richard Sandiford * configure.in: Clear gcc_version_trigger if the file doesn't exist. * configure: Regenerate. 2004-12-02 Richard Sandiford * configure.in: Include config/gcc-version.m4. Use TL_AC_GCC_VERSION to set gcc_version_trigger. Remove some now-redundant AC_SUBSTs. * configure: Regenerate. 2004-11-26 John David Anglin * configure.in (hppa*-*-linux*): Don't add libgcj to noconfigdirs. (hppa*64*-*-*): Delete incorrect comment. * configure: Rebuilt. 2004-11-15 Kelley Cook * install-sh, compile: Import from automake. 2004-11-15 Kelley Cook * config.guess, config.sub: Import from savannnah. 2004-11-12 Mike Stump * Makefile.def: Add html support. * Makefile.tpl: Likewise. * Makefile.in: Regenerate. 2004-11-11 Geoffrey Keating PR 18423 * configure.in: Remove all instances of build-fixincludes from noconfigdirs. (build_configargs): Supply --target to subdirectories. * configure: Regenerate. * Makefile.def: Make gcc install depend on fixincludes install. * Makefile.in: Regenerate. 2004-11-08 Hans-Peter Nilsson * configure.in (noconfigdirs) [mmix-*-*]: Disable target-libgfortran. * configure: Regenerate. 2004-11-07 David Edelsohn * config-ml.in: Pass FCFLAGS for multilibs, handle GFORTRAN like CC. 2004-11-05 Paolo Bonzini * Makefile.def (host fixincludes): Specify missing targets. * Makefile.in: Regenerate. 2004-11-04 H.J. Lu PR other/17783 * configure.in: Set up LD_LIBRARY_PATH by default for gcc. * configure: Regenerated. 2004-11-04 Daniel Jacobowitz * configure.in (arm-*-oabi*, thumb-*-oabi*): Remove. * configure: Regenerated. 2004-10-28 Eric B. Weddington PR target/18151 * configure.in (case ${target}): Do not build fixincludes for avr. * configure: Regenerated. 2004-10-26 Paolo Bonzini * configure.in (case ${target}): Do not build fixincludes on platforms where it is not used. * configure: Regenerated. 2004-10-23 Daniel Jacobowitz * configure.in: Use an absolute path to install-sh. * configure: Regenerated. 2004-10-19 Andrew Cagney * src-release (do-djunpack, do-md5sum): Install the generated file directly into the proto-toplev/ directory. 2004-10-19 Andrew Cagney * src-release (GDB_SUPPORT_DIRS): Remove utils and intl. 2004-10-12 Kelley Cook * configure.in (*-*-cygwin*): Supress warning if newlib not present. * configure: Regenerate. 2004-10-06 Paolo Bonzini Fix wrong conflict resolution in: 2004-08-16 Paolo Bonzini * Makefile.in: Regenerate. * Makefile.tpl (Autogenerated `all-*' targets): Invoke $(TARGET-*) in the recursive `make', instead of hardwiring `all'. (Autogenerated TARGET-* variables): New. 2004-10-05 Ulrich Weigand Merged from GCC / libtool upstream: 2004-10-02 P.J. Darcy * ltcf-c.sh (tpf*): Add ld_shlibs=yes. * ltcf-cxx.sh (tpf*): Likewise. * ltconfig (tpf*): Add TPF OS configuration support. 2004-09-30 Tomer Levi * configure.in: Enable target-libgloss for crx-*-*. * configure: Regenerate. 2004-09-24 Michael Roth * configure.in (--without-headers): Add missing double quotes. * configure: Regenerate. 2004-09-24 Kelley Cook * ylwrap: Revert to previous version. 2004-09-23 H.J. Lu PR bootstrap/17369 * Makefile.tpl (REALLY_SET_LIB_PATH): Add @SET_GCC_LIB_PATH@. (HOST_EXPORTS]): Add @SET_GCC_LIB_PATH@. Set and export SET_GCC_LIB_PATH_CMD. (BASE_TARGET_EXPORTS): Likewise. * Makefile.in: Regenerated. * configure.in (SET_GCC_LIB_PATH): Set and substitute. * configure: Regenerated. 2004-09-23 Kelley Cook * config.guess: New upstream version * compile, depcomp, install-sh, ylwrap: Likewise. 2004-09-19 Roger Sayle * config/mh-x86omitfp: New host makefile fragment. Add -fomit-frame-pointer to the default BOOT_CFLAGS. * configure.in: Use it to speed up bootstrap on some IA-32 hosts. * configure: Regenerate. 2004-09-15 Andrew Pinski PR target/11572 * configure.in (*-*-darwin*): Renable libobjc. * configure: Regenerate. 2004-09-09 Daniel Berlin * Makefile.def: Remove libbanshee. * Makefile.tpl: Ditto. * configure.in: Ditto. * Makefile.in: Regen. * configure: Ditto. 2004-09-07 Paolo Bonzini * missing: Import latest version from master repository. 2004-09-04 Nick Clifton * config.sub: Import latest version from master repository. * config.guess: Likewise. This includes these changes: 2004-08-27 Hans-Peter Nilsson * config.sub: Handle crisv32, alias etraxfs. * config.guess (crisv32:Linux:*:*): Handle. 2004-08-13 Brad Smith * config.guess (*:OpenBSD:*:*): Remove defunct MIPS machines. (sgi:OpenBSD:*:*): Emit mips64, not mipseb. 2004-08-11 Paul Eggert * config.guess (*:Darwin:*:*): If uname -p reports "unknown", assume the processor is a powerpc. This is because coreutils uname (at least versions 4.5.7 through 5.2.1) outputs "unknown" in this case, due to a MacOS X bug that causes sysctl ((int[]) {CTL_HW, HW_MACHINE_ARCH}, 2, buffer, &bufsize, 0, 0) to return a negative number. Problem reported by Petter Reinholdtsen in: http://lists.gnu.org/archive/html/bug-gnu-utils/2003-02/msg00201.html 2004-07-19 Ben Elliston * config.guess (S7501:*:4.0:3.0): Handle NCR System V UNIX machine. 2004-06-24 Ben Elliston * config.guess: Update copyright years. * config.sub: Likewise. 2004-06-22 Robert Millan * config.guess (*:FreeBSD:*:*): Remove check for glibc (unneeded since GNU/kFreeBSD systems match *:GNU/*:*:* instead). 2004-06-22 Stanley F. Quayle * config.guess (*:*VMS:*:*): New entry. Replaces Alpha:OpenVMS:*. Recognize and advertise all VMS flavors as dec manufacturer. 2004-06-22 Ben Elliston * config.guess: Cray fixes from Wendy Palm . * config.sub: Likewise. 2004-06-22 Ben Elliston Reported by Hans-Peter Nilsson : * config.sub: Correctly handle mmix-knuth and mmix-knuth-mmixware. 2004-06-11 Ben Elliston * config.guess (pegasos:OpenBSD:*:*): Remove. 2004-06-11 Ben Elliston From Wouter Verhelst : * config.guess (M68*:*:R3V[5678]:*): Detect R3V8. 2004-06-11 Ben Elliston * config.guess (luna88k:OpenBSD:*:*): New. 2004-03-12 Kazuhiro Inaoka * config.guess (m32r*:Linux:*:*): New case. * config.sub: Handle m32rle. 2004-03-12 Ben Elliston From Jens Petersen : * config.sub: Handle sparcv8. 2004-03-03 Ben Elliston From Tom Smith : * config.guess: Version suffixes are equally significant on Tru64 V4.* and V5.*, so do not ignore them on V5.*. Handle a version prefix of "P" (patched kernel). 2004-02-23 Tal Agmon * config.sub: Add support for National Semiconductor CRX target. 2004-09-03 Jan Beulich * configure.in: Remove target-libstdc++-v3 from noconfigdirs for *-*-netware, but add target-libmudflap. Consolidate *-*-netware targets (of which really only i?86 exists) into a single entry. * configure: Likewise. 2004-09-01 Paolo Bonzini * Makefile.tpl (sorry): Remove. (clean-stage[+id+], clean-stage[+id+]-module): New targets. (cleanstrap targets): Depend on distclean, not distclean-stage1. (do-clean): Clean per-stage directories too. (do-distclean): Run distclean-stage1 too. (.NOTPARALLEL): Enable during toplevel bootstrap. (stage[+id+]-bubble): Enable parallel execution during the recursive invocation. * Makefile.in: Regenerate. Sync from gcc (moving the Makefile.in change to Makefile.tpl): 2004-08-31 Robert Bowdidge * Makefile.in: Move BOOT_CFLAGS above host makefile fragment include. * configure.in: add test for powerpc-*-darwin* to specify makefile frag * configure: regenerate * config/mh-ppc-darwin: create file, override BOOT_CFLAGS for -mdynamic-no-pic 2004-08-31 Paolo Bonzini * Makefile.tpl: Move BOOT_CFLAGS above host makefile fragment include. * configure.in: Fix indentation. * configure: Regenerate. 2004-08-31 Paolo Bonzini * Makefile.def (build_modules): Add fixincludes. (dependencies): Make gcc depend on fixincludes. * configure.in (build_tools): Add fixincludes. (build_configdirs): Always include build_libs. * Makefile.in: Regenerate. * configure: Regenerate. 2004-08-30 Paolo Bonzini * Makefile.def (bootstrap stages): Add 'lean' parameter. * Makefile.tpl (configure-stageN-*, all-stageN-*): Turned into phony targets; do not generate timestamp files. (distclean-stageN): Remove references to their timestamp files. (restageN, touch-stageN): Remove. (stageN-bubble): Rewritten. (compare): Support lean bootstraps. * Makefile.in: Regenerate. * configure.in: Only warn when bootstrapping but build != host or build != target. Support lean bootstraps. * configure: Regenerate. Sync from gcc: 2004-08-26 Phil Edwards * configure.in: Give a better error message if GMP/MPFR are missing and a language needing them has been requested. * configure: Regenerated. 2004-08-25 Phil Edwards * configure.in: Print a list of available language front-ends if a requested one is missing. Tidy stray tab characters. * configure: Regenerated. 2004-08-17 Paolo Bonzini * Makefile.in: Regenerate. * configure: Regenerate. * Makefile.def (bootstrap-stage): Rename extra_*_flags to stage_*_flags. * Makefile.tpl (configure-[+module+], all-[+module+]): Exit for bootstrapped modules if toplevel bootstrap is going. (GCC bootstrap): Generate per-stage targets for all bootstrapped modules. Adjust for changes in Makefile.def. Enable several rules even in non-bootstrap mode, just to avoid peppering the template with unnecessary "@if/@endif gcc-bootstrap" pairs. (stage-[+prev+]-bubble): Remove. * Makefile.def (Dependencies): Depend on all-build-bison, all-build-flex, all-build-byacc, all-build-texinfo, rather than the host variations. * Makefile.tpl (BUILD_DIR_PREFIX): Remove. Replace throughout with BUILD_SUBDIR. (BISON): Update for recent Bisons. (YACC): Fix typo. (cross): Depend on all-build. (all): Do not depend on all-build. (prebootstrap): Remove. (dep-kind): Accept separate prefixes for MODULE and ON variables. (Prebootstrap dependencies): Add them to the per-stage targets and to all-prebootstrap. * configure.in (build_configdirs): Always enable build_tools. (BUILD_DIR_PREFIX): Remove. * Makefile.def (gcc): Add target variable. (gdb, expect, guile, tk, tix): Replace with_x with extra_make_flags. * Makefile.tpl (Autogenerated `all-*' targets): Invoke $(TARGET-*) in the recursive `make', instead of hardwiring `all'. (Autogenerated TARGET-* variables): New. 2004-08-17 Robert Millan * configure.in: In noconfigdirs check, match GNU/k*BSD with GNU/Linux (instead of FreeBSD). * configure: Regenerate. 2004-08-12 Nathanael Nerode * Makefile.def, configure.in, src-release: Remove useless, bogus references to tix. * Makefile.in, configure: Regenerate. * src-release: Stop distributing mmalloc with gdb (which doesn't use it). * Makefile.def: GDB doesn't depend on mmalloc anymore. * Makefile.in: Regenerate. 2004-08-09 Mark Mitchell * configure.in (arm*-*-eabi*): New target. * configure: Regenerate. 2004-08-01 Robert Millan * configure.in: Turn mt-linux into mt-gnu. Use mt-gnu and enable libmudflap for all GNU-based systems (with Glibc). * configure: Regenerate. 2004-08-06 Paolo Bonzini * Makefile.def (bfd, opcodes, gcc, zlib): Mark as bootstrap module. (bison, byacc, flex, texinfo): Do not mark as bootstrap module. (Dependencies): New section. * Makefile.tpl (Dependencies): Generate from Makefile.def. (configure-target-[+module+]): Depend on maybe-all-gcc (all-prebootstrap): New name of all-bootstrap. Changed throughout. (toplevel profiledbootstrap): Fix dependencies. * Makefile.in: Regenerate. 2004-08-03 Mark Mitchell * configure.in (arm*-*-symbianelf*): Add ${libgcj} and target-libiberty to noconfigdirs. 2004-08-03 Paul Brook * configure.in: Check for MPFR as well as GMP. * configure: Regenerate. 2004-08-03 Paolo Bonzini * Makefile.def (host-modules): Add gcc. * Makefile.in: Regenerate. * Makefile.tpl (sorry): New rule. (configure-host, all-host, [+make_target+]-host, do-check, install-host): Do not add gcc as a special case. (host modules): Add a small special-casing for gcc. Export extra_make_flags through the environment. (maybe-configure-gcc, configure-gcc, maybe-all-gcc, all-gcc, maybe-check-gcc, check-gcc, maybe-install-gcc, install-gcc, other recursive targets for gcc): Remove. (all, do-[+make_target+], do-check): Wrap between unstage and stage. (stage, unstage): New rules. (stage[+id+]-start, stage[+id+]-end, [+compare-target+], distclean-stage[+id+]): Use stage_current. ([+bootstrap-target+], profiledbootstrap): Do not invoke manually the stage*-start rules. 2004-07-19 Robert Millan Synced from gcc: 2004-04-26 Robert Millan Add patches from libtool CVS. * libtool.m4: Add kfreebsd*-gnu and knetbsd*-gnu. * ltconfig: Likewise. * ltcf-c.sh: Likewise. * ltcf-cxx.sh: Likewise. * ltcf-gcj.sh: Likewise. 2004-07-12 Paolo Bonzini * configure.in: Add noconfigdirs for crx-*-*. * configure: Regenerate. 2004-07-12 Paolo Bonzini Synced from gcc: 2004-07-09 Loren J. Rittle * configure.in: Build libmudflap by default on FreeBSD. * configure: Regenerated. 2004-07-09 Mark Mitchell * configure.in: Do not build libmudflap by default on non-GNU/Linux systems. * configure: Regenerated. 2004-07-08 John David Anglin PR target/16344 * Makefile.tpl (profiledbootstrap): Build runtime libraries with feedback based compiler. * Makefile.in: Rebuilt. 2004-07-05 Phil Edwards * configure.in: Do not prepend $srcdir to /dev/null in makefile fragments. * configure: Regenerate. 2004-07-08 Alexandre Oliva * Makefile.def (host_modules): Set bootstrap=true for flex. * Makefile.tpl (all-gcc): Depend on texinfo and flex. * Makefile.in: Rebuilt. 2004-07-01 Paolo Bonzini * Makefile.def (build_modules): Add bison, byacc, flex, m4, texinfo. (flags_to_pass): Add FLEX. * Makefile.tpl (BUILD_DIR_PREFIX, BASE_EXPORTS): New. (BUILD_EXPORTS, HOST_EXPORTS, BASE_TARGET_EXPORTS): Include it. (DEFAULT_YACC, USUAL_YACC, DEFAULT_LEX, USUAL_LEX, DEFAULT_M4, DEFAULT_MAKEINFO): Remove. (CONFIGURED_YACC, CONFIGURED_FLEX, CONFIGURED_BISON, CONFIGURED_LEX, CONFIGURED_M4, CONFIGURED_MAKEINFO): Substitute. (YACC, FLEX, BISON, LEX, M4, MAKEINFO): Define to look into objdir or else use configured tool. (all-build): New. (all): Depend on it. (Build module dependencies): Add. * Makefile.in: Regenerate. * configure.in: Better support for multiple build modules, matching what is done for host/target modules. Do not look for "plausible" locations of build tools if Canadian cross. Use autoconf's AC_PROG_CC to find a C compiler. Define BUILD_DIR_PREFIX. Look for flex, makeinfo and m4. * configure: Regenerate. 2004-06-22 Paolo Bonzini * Makefile.tpl (HOST_EXPORTS): Fix pasto. * Makefile.in: Regenerate. 2004-06-22 Paolo Bonzini * Makefile.tpl (configure-build-[+module+], configure-[+module+], configure-target-[+module+]): Pass [+extra_configure_args+]. (all-build-[+module+], all-[+module+], check-[+module+], install-[+module+], [+make_target+]-[+module+], all-target-[+module+], check-target-[+module+], install-target-[+module+], [+make_target+]-target-[+module+]): Pass [+extra_make_args+]. (HOST_EXPORTS): Include the former GCC_HOST_EXPORTS. (GCC_HOST_EXPORTS): Remove. (configure-gcc, all-gcc, GCC_STRAP_TARGETS, profiledbootstrap, cross, check-gcc, check-gcc-c++, install-gcc, gcc-no-fixedincludes, [+make_target+]-gcc, stage[+id+]-bubble): Replace GCC_HOST_EXPORTS with HOST_EXPORTS. * Makefile.in: Regenerate. 2004-06-21 Christopher Faylor * configure.in: Check for srcdir/winsup rather than build directory winsup. * configure: Regenerate. 2004-06-17 Corinna Vinschen * configure.in: Don't build Cygwin native newlib if winsup directory is missing. Emit warning instead. * configure: Regenerate. 2004-06-09 Paolo Bonzini * Makefile.tpl (touch-stage[+id+]): New. (restage[+prev+]): Depend on touch-stage[+id+]. * Makefile.tpl (RECURSE_FLAGS_TO_PASS): New. Use it throughout. * Makefile.def: Add profile and feedback bootstrap stages. Remove next field from bootstrap stages. * Makefile.tpl (LN, LN_S): Substitute. (stageN-start, stageN-end): Use double-colon rules, to provide a hook for additional setup commands. (distclean-stageN-gcc, restageN): Create dependencies from [+prev+], not from [+next+]. (stageN-bubble): Add commands for successive stages from [+prev+], using double-colon rules. (all-stageN-gcc): Fix typo. (stagefeedback-start, profiledbootstrap): New. * Makefile.in: Regenerate. * configure.in: Call ACX_PROG_LN. * configure: Regenerate. 2004-06-03 Paolo Bonzini * configure.in: Fix --enable-bootstrap breakage introduced in trees without gcc. * configure: Regenerate. 2004-06-01 Paolo Bonzini * Makefile.tpl: Fix typo. * Makefile.in: Regenerate. 2004-06-01 Paolo Bonzini * configure.in: Remove new- prefix from toplevel bootstrap targets. * configure: Regenerate. 2004-06-01 Paolo Bonzini Merge this patch from the gcc tree: 2004-05-30 Andreas Jaeger Jim Wilson * config-ml.in: Pass FFLAGS and ADAFLAGS for multilibs, handle F77 like CC. 2004-06-01 Paolo Bonzini * Makefile.tpl (all.normal): Rename to all. (all): Replace with a rule to pick the default target from configure. (all-gcc, configure-gcc): Use conditionals to do nothing when toplevel bootstrap is going on. (GCC directory bootstrap) [gcc-bootstrap]: Disable. (Toplevel bootstrap) [gcc-no-bootstrap]: Disable. * configure.in: Support --enable-bootstrap. * Makefile.def: Remove new- prefix from toplevel bootstrap targets. * Makefile.tpl: Likewise. * Makefile.def: Add bootstrap_stage 4. Add bootstrap2 target. * Makefile.tpl (Toplevel bootstrap): Pass $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) to recursive invocation of make. * Makefile.in: Regenerate. * configure: Regenerate. 2004-05-27 Daniel Jacobowitz * configure.in: Fix sed invocation for GFORTRAN_FOR_TARGET. * configure: Regenerate. 2004-05-25 Daniel Jacobowitz * Makefile.tpl (BUILD_EXPORTS, HOST_EXPORTS, GCC_HOST_EXPORTS) (STAGE_HOST_EXPORTS, BASE_TARGET_EXPORTS, RAW_CXX_TARGET_EXPORTS) (NORMAL_TARGET_EXPORTS): New macros. Use them in all the recursive targets. * Makefile.in: Regenerate. 2005-05-24 Paolo Bonzini * configure.in: Test the ability to symlink directories. * configure: Regenerate. * Makefile.def (bootstrap-stage): New definitions. * Makefile.tpl (configure-stage1-gcc, configure-stage2-gcc, configure-stage3-gcc, all-stage1-gcc, all-stage2-gcc, all-stage3-gcc, new-bootstrap, new-cleanstrap, new-restage1, new-restage2, new-restage3, compare): Autogenerate, see Makefile.in entry for behavioral changes. (distclean-stage1, new-stage1-start, new-stage1-end, new-stage1-bubble, distclean-stage2, new-stage2-start, new-stage2-end, new-stage2-bubble, distclean-stage3, new-stage3-start, new-stage3-end): New autogenerated targets. (objext, prebootstrap, BOOT_CFLAGS, POSTSTAGE1_FLAGS_TO_PASS): Move above the autogenerated targets. * Makefile.in: Regenerate. (distclean-stage1, new-stage1-start, new-stage1-end, new-stage1-bubble, distclean-stage2, new-stage2-start, new-stage2-end, new-stage2-bubble, distclean-stage3, new-stage3-start, new-stage3-end): New targets. (all-stage1-gcc): Move prebootstrap dependency from here... (configure-stage1-gcc): ...to here. (new-bootstrap): Use bubble targets. (new-cleanstrap, new-restage1, new-restage2, new-restage3): Use per-stage distclean targets. (configure-stage1-gcc, configure-stage2-gcc, configure-stage3-gcc, all-stage1-gcc, all-stage2-gcc, all-stage3-gcc, new-bootstrap): Use new-stageN-start to prepare the tree. 2004-05-23 Paolo Bonzini * Makefile.def (host_modules): add libcpp. * Makefile.tpl: Add dependencies on and for libcpp. * Makefile.in: Regenerate. * configure.in: Add libcpp host module. * configure: Regenerate. 2004-05-17 Zack Weinberg * Makefile.def, Makefile.tpl, configure.in: Remove all mention of libf2c. * configure, Makefile.in: Regenerate. 2004-05-13 Diego Novillo Merge from tree-ssa-20020619-branch. * Makefile.def: Add libbanshee, libmudflap and libgfortran. * Makefile.tpl (BUILD_CONFIGDIRS): Add libbanshee. (HOST_GMPLIBS): Define. (HOST_GMPINC): Define. (TARGET_LIB_PATH): Add libmudflap. (GFORTRAN_FOR_TARGET): Define. (configure-build*): Export GFORTRAN. (configure-gcc): Export GMPLIBS and GMPINC. (all-gcc): Add maybe-all-libbanshee. (configure-target-libgfortran): Define. * Makefile.in: Regenerate. * configure.in (host_libs): Add libbanshee. (target_libraries): Add target-libmudflap and target-libgfortran. Add --with-libbanshee. Handle --disable-libmudflap. (*-*-freebsd*): Use with_gmp. Add $(libgcj) to noconfigdirs. * configure: Regenerate. * depcomp: New file. * MAINTAINERS: Add tree-ssa maintainers. 2004-04-28 Paolo Bonzini * config/acx.m4: Fix fastcompare support for new-bootstrap. * configure: Regenerate. 2004-04-27 Paolo Bonzini Revert: 2004-04-26 Paolo Bonzini * Makefile.def (flags_to_pass): Remove *dir variables that are passed to the modules via TOPLEVEL_CONFIGURE_ARGUMENTS, as well as prefix and exec_prefix. * Makefile.in: Regenerate. 2004-04-26 Paolo Bonzini * Makefile.def (host_modules): Mark with the bootstrap flag packages on which gcc depends. * Makefile.tpl (all-bootstrap): Use it. * Makefile.in: Regenerate. 2004-04-26 Paolo Bonzini * Makefile.def (flags_to_pass): Remove *dir variables that are passed to the modules via TOPLEVEL_CONFIGURE_ARGUMENTS, as well as prefix and exec_prefix. * Makefile.in: Regenerate. 2004-04-26 Paolo Bonzini * configure.in: Invoke ACX_PROG_CMP_IGNORE_INITIAL. * configure: Regenerate. * config/acx.m4: Mutuate ACX_PROG_CMP_IGNORE_INITIAL from gcc. * gcc/Makefile.tpl (compare): Use the result of the test. * gcc/Makefile.in: Regenerate. 2004-04-23 Paolo Bonzini * Makefile.tpl (all-stage1-gcc, all-stage2-gcc, all-stage3-gcc): Always relocate gcc and prev-gcc to the original names, even if the build fails. (new-cleanstrap, new-restage1, new-restage2, new-restage3): New targets. 2004-04-19 Rainer Orth * configure.in (mips*-*-irix5*): Enable ld. * configure: Regenerate. 2004-04-15 James E Wilson * Makefile.tpl (configure-[+module+], configure-gcc, configure-stage1-gcc, configure-stage2-gcc, configure-stage3-gcc): Set and export LDFLAGS. * Makefile.in: Regenerate. 2004-04-09 Nathanael Nerode PR bootstrap/14871 * Makefile.tpl: If we don't have built-in-tree target tools, use the ones found by configure rather than hacking around with program_transform_name. * configure.in: Give Makefile.tpl the information necessary to do that. * Makefile.in: Regenerate. * configure: Regenerate. 2004-04-06 Nathanael Nerode PR bootstrap/14760 * configure.in: When computing baseargs, strip *all* copies of offending options. Also, don't match/substitute the trailing space, so that this actually works when two similar options are separated by only one space. * configure: Regenerate. 2004-04-06 David Edelsohn * configure.in (powerpc-*-aix*): Remove target-libada from noconfigdirs. (rs6000-*-aix*): Same. * configure: Regenerate. 2004-03-25 Stan Shebs Remove MPW support, no longer used. * mpw-README, mpw-build.in, mpw-config.in, mpw-configure, mpw-install: Remove files. * src-release (DEVO_SUPPORT): Remove names of removed files. * MAINTAINERS: Likewise. 2004-03-24 Nathanael Nerode * Makefile.tpl (top level bootstrap support): Remove now-unneeded STRICT_WARN, WARN_CFLAGS flags passed down to make. * Makefile.in: Regenerate. * configure.in (top level bootstrap support): Rework --enable-werror to set @stage2_werror_flag@. * configure: Regenerate. * Makefile.tpl (top level bootstrap support): Pass @stage2_werror_flag@ down to configure in stages 2 and 3. * Makefile.in: Regenerate. 2004-03-23 Nathanael Nerode * Makefile.tpl (new-bootstrap): Set CC and CC_FOR_BUILD in configure for stages 2 and 3 as well as in make. As a consequence, remove OUTPUT_OPTION (now detected by configure) from the flags passed down to make. * Makefile.in: Regenerate. * Makefile.tpl (new-bootstrap): Fix typo. * Makefile.in: Regenerate. 2004-03-22 Nathanael Nerode * Makefile.tpl: Rearrange by moving recursive_targets rules into their proper sections. * Makefile.tpl (top level bootstrap support): Move disabling of coverage flags from 'make' to 'configure'; improve comments. * Makefile.in: Regenerate. * Makefile.tpl (experimental top level bootstrap) Move stage1 language setting from all- target to configure- target; disable intermodule optimization in stage 1; prevent gratuitous rebuilds of stage 1. * Makefile.in: Regenerate. * configure.in: Comma-separate stage 1 language list for top level bootstrap. * configure: Regenerate. * Makefile.tpl: Clean up experimental top level bootstrap support: note known problems; set CONFIG_SHELL; don't set BUILD_CC; relocate prev-gcc in configure- targets as well as all- targets. * Makefile.in: Regenerate. 2004-03-17 Paolo Bonzini * configure.in: Remove symbolic link section. * configure: Regenerate. * Makefile.tpl (links): Remove. * Makefile.in: Regenerate. 2004-03-15 Paolo Bonzini Nathanael Nerode * configure.in (DEFAULT_YACC, DEFAULT_M4, DEFAULT_LEX): Set with AC_CHECK_PROGS. * configure.in: Fix comment typo from last patch. * configure: Regenerate. 2004-03-15 Nathanael Nerode * Makefile.tpl: Introduce experimental top level bootstrap support. * Makefile.in: Regenerate. * configure.in: Introduce support for top level bootstrap. * configure: Regenerate. 2004-03-12 Eric Botcazou Paolo Bonzini PR bootstrap/14522 * configure.in: Cope with shells that do not support unquoted ^ * configure: Regenerate. 2004-03-11 Eric Botcazou Paolo Bonzini PR bootstrap/14522 * configure.in: Cope with shell that do not support nesting quotes inside quoted backquote substitutions. * configure: Regenerate. 2004-03-10 Andrew Pinski PR bootstrap/14522 * configure.in: Fix escaping of $. * configure: Regenerate. 2004-03-11 Nathanael Nerode * configure: Regenerate. 2004-03-08 Paolo Bonzini PR ada/14131 Move language detection to the top level. * configure.in: Find default values for the tools as soon as possible. Disable ada if GNAT is not found. Emit error message about missing languages. Expand --enable-languages=all for the gcc subdirectory. 2004-03-01 Richard Sandiford * configure.in (mips64*-*-linux*): Override mips*-*-linux* case and disable libgcj. * configure: Regenerated. 2004-02-28 Nathanael Nerode PR bootstrap/7087 * Makefile.tpl: Guard XFOO sed statements better. * Makefile.tpl: Add dependency for configure-target-libada. * Makefile.in: Regenerate (incidentally fixes broken commit when libada-branch was merged). 2004-02-28 Andrew Cagney * src-release (CVS_NAMES): Define. (do-tar, do-tar): Prune $(CVS_NAMES). 2004-02-23 Andrew Cagney * texinfo/texinfo.tex: Update from version 2003-02-03.16 to 2004-02-19.09. 2004-02-19 Nathanael Nerode PR bootstrap/11932 * mkinstalldirs, install-sh: Import from automake CVS HEAD. 2004-02-19 Andrew Cagney * config.guess: Update from version 2003-06-12 to 2004-02-16. * config.sub: Update from version 2003-06-13 to 2004-02-16. 2004-02-11 David Edelsohn * configure.in (powerpc-*-aix*): Add target-libada to noconfigdirs. (rs6000-*-aix*): Same. * configure: Regenerate. 2004-02-11 Kelley Cook * configure.in (host): Add in missing $noconfigdirs to defines. * configure: Regenerate. 2004-02-10 Arnaud Charlet , Nathanael Nerode PR ada/6637, PR ada/5911 Merge with libada-branch: * configure.in, Makefile.tpl, Makefile.def: Add target-libada, with appropriate dependencies. Add --enable-libada configure switch. * configure, Makefile.in: Regenerate. 2004-02-05 Rainer Orth * configure.in: Don't pass --with-stabs on IRIX 5 either. * configure: Regenerate. 2004-02-02 Jeff Johnston * COPYING.NEWLIB: Update Red Hat license to 2004. 2004-01-23 DJ Delorie * Makefile.def (target_modules) [libiberty]: Don't stage. * Makefile.in: Rebuilt. 2004-01-23 Jeff Johnston * COPYING.NEWLIB: Update to include copyrights for new iconv code. 2004-01-15 Andrew Cagney * src-release: Update copyright year. (do-proto-toplev): Configure using i686-pc-linux-gnu. (NEWLIB_SUPPORT_DIRS): Delete macro. (newlib.tar.bz2): Delete rule. 2004-01-14 Loren J. Rittle * Makefile.def (target_modules) [libtermcap, libiberty, zlib]: Stage. * Makefile.tpl (configure-target-[+module+]): Support stage. * Makefile.in: Rebuilt. 2003-01-14 Maciej W. Rozycki * gettext.m4: Quote names of macros to be defined by AC_DEFUN throughout. 2004-01-04 Nathanael Nerode * configure.in: Use ./config.cache, not config.cache. * configure: Regenerate. * Makefile.tpl: Special-casing not needed for GCC any more. * Makefile.in: Regenerate. * configure.in: Don't share a cache file for host dirs. * configure: Regenerate. * config-ml.in: Don't mess with the cache file. 2004-01-03 Nathanael Nerode * Makefile.tpl: Make GCC use a separate config.cache. * Makefile.in: Regenerate. PR bootstrap/11932, PR bootstrap/11933 (I don't know if it will fix either of them, but it relates to them.) * configure.in: Don't use shared config.cache for target directories. * configure: Regenerate. 2003-12-31 Roger Sayle * configure.in (ia64*-*-hpux*): Disable building java libraries. * configure: Regenerated. 2003-12-21 Bernardo Innocenti * configure.in (*-*-uclinux): Exclude newlib, libgloss and rda. * configure: Regenerated. 2003-12-19 Nathanael Nerode Port change over from GCC: 2003-11-20 Kelley Cook * Makefile.tpl (BASE_FLAGS_TO_PASS): Pass along CONFIG_SHELL. (configure-build-[+module+], configure-[+module+]): Likewise. (configure-target-[+module+], configure-gcc, config.status): Likewise. * Makefile.in: Regenerate. 2003-12-08 Thomas Fitzsimmons * configure.in (raw_libstdcxx_flags): Remove the leading space. * configure: Regenerate. 2003-11-27 Jeff Johnston * COPYING.NEWLIB: Add license info for long long routines added to stdlib. 2003-11-14 Arnaud Charlet * Makefile.tpl (EXTRA_GCC_FLAGS): Pass BOOT_ADAFLAGS. * Makefile.in: Regenerate. 2003-10-20 Phil Edwards * configure.in (*-*-vxworks): Add target-libiberty to noconfdirs. * configure: Regenerate. 2003-10-13 Nathanael Nerode * Makefile.tpl: Make GCC_FLAGS_TO_PASS a superset of HOST_FLAGS_TO_PASS. * Makefile.in: Regenerate. 2003-10-05 Mohan Embar * configure.in: Allow explicit specification of CFLAGS_FOR_BUILD. * configure: Rebuilt * Makefile.tpl: Use CFLAGS_FOR_BUILD computed by configure * Makefile.in: Rebuilt 2003-10-03 H.J. Lu * ltconfig (sys_lib_search_path_spec): Fix a typo for HPUX. 2003-10-01 Phil Edwards * config-ml.in: Use ac_configure_args directly instead of ml_arguments. Only set ml_norecursion if --no[-]recursion is actually seen. 2003-10-01 Eric Botcazou * config-ml.in: Propagate INSTALL variables. 2003-09-21 Daniel Jacobowitz * configure.in: Pass a computed --program-transform-name to subconfigures. * configure: Regenerated. 2003-09-20 Nathanael Nerode * Makefile.tpl: Don't pass down obsolete ENQUIRE variable. * Makefile.in: Regenerate. * Makefile.tpl: Don't pass (unused) DLLTOOL or WINDRES to gcc. * Makefile.in: Regenerate. 2003-09-17 Daniel Jacobowitz * configure.in (TOPLEVEL_CONFIGURE_ARGUMENTS, baseargs): Fix quoting. * configure: Regenerated. 2003-09-12 Michael Chastain Fix PR gdb/857. * src-release (do-proto-topleve): Remove junk files intl/config.cache, intl/config.status, intl/config.h, intl/stamp-h. 2003-09-14 Andrew Cagney * src-release (dejagnu.tar): New target. (dejagnu.tar.bz2): Recursively call "gdb-taz" rule. (do-djunpack): Use $(PACKAGE) for the package name. 2003-09-04 DJ Delorie * configure: Regenerate. 2003-09-04 Robert Millan * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet. 2003-09-02 Kaveh R. Ghazi * configure.in: Ensure arguments to sed are properly spaced. * configure: Regenerate. 2003-08-28 Daniel Jacobowitz Merge from gcc: 2003-07-20 Phil Edwards * install-sh: Update to newer upstream versions (associated with aclocal 1.7). * missing: Likewise, plus $1Help2man -> $1 typo fix. 2003-08-27 Daniel Jacobowitz * configure.in: Set RAW_CXX_FOR_TARGET if unset. * configure: Regenerated. 2003-08-23 Phil Edwards * configure.in: Use newline instead of semicolon when assuming shell arguments in a for loop. * configure: Regenerated. 2003-08-20 Geoffrey Keating PR 8180 * configure.in: When testing with_libs and with_headers, treat 'no' as unset. Based on a patch by Dan Kegel . * configure: Regenerate. * configure.in (TOPLEVEL_CONFIGURE_ARGUMENTS): Quote properly for make, shell, etc. (baseargs): Likewise. * configure: Regenerate. 2003-08-19 Geoffrey Keating * configure.in: Disable libgcj for darwin not on powerpc. * configure: Rebuild. 2003-08-15 Michael Chastain * src-release (do-proto-toplev): Remove junk files dejagnu/example/calc/config.status, dejagnu/example/calc/config.log. 2003-08-14 Alexandre Duret-Lutz * config-ml.in, symlink-tree: Add license. 2003-08-01 Nathanael Nerode Merge from gcc: 2003-08-01 Matt Kraai * Makefile.tpl (check, check-c++): Express dependencies using dependencies rather than commands. * Makefile.in: Regenerate. 2003-07-31 Geoffrey Keating * Makefile.tpl (libsubdir): Use gcc instead of gcc-lib. * Makefile.in: Update. 2003-08-01 Andrew Cagney * configure.in (noconfigdirs): Do not add GDB when m32r-*-*. * configure: Ditto. 2003-07-30 Andreas Tobler * configure.in: Enable libgcj for darwin. * configure: Rebuild. 2003-07-29 Nathanael Nerode * mkinstalldirs: Import autoconf 2.57 / automake 1.7 version. 2003-07-27 Nathanael Nerode * Makefile.tpl: Use 'mkinstalldirs' rather than 'mkdir' when creating target and build subdirs to build all parent dirs as needed. * Makefile.in: Rebuild. * configure.in: Don't build dirs explicitly here. * configure: Rebuild. 2003-07-22 Alexandre Oliva * Makefile.tpl (all-make): Depend on intl. * Makefile.in: Rebuilt. 2003-07-16 Nathanael Nerode * config.if: Remove unused libc_interface determination. 2003-07-14 Nathanael Nerode * Makefile.in: Regenerate, correctly this time. 2003-07-13 Nathanael Nerode * Makefile.tpl: Set INSTALL and friends using autoconf. Remove unused INSTALL_PROGRAM_ARGS. * configure.in: Use AC_PROG_INSTALL. * Makefile.in: Regenerate. * configure: Regenerate. 2003-07-10 Alexandre Oliva * configure: Rebuilt. 2001-09-26 Alexandre Oliva * configure.in (noconfigdirs) [am33_2.0-*-linux*]: Don't build newlib nor libgloss. Wed May 9 10:07:19 2001 Alexandre Oliva * configure.in (am33_2.0-*-linux*): Added. 2003-07-09 Bob Wilson * configure.in: Add ${libgcj} to noconfigdirs for xtensa-*-* targets. * configure: Regenerate. 2003-07-06 H.J. Lu * config-ml.in: Replace PWD with PWD_COMMAND. * Makefile.tpl: Likewise. * Makefile.in: Regenerated. 2003-06-27 Nathanael Nerode * configure.in: Clean up config-lang.in handling. Delete useless assignment to "subdirs". * configure: Regenerate. 2003-06-26 Nathanael Nerode * configure.in: Rename 'target_libs' to 'target_libraries'. Remove useless reference to 'target_libs'. * configure: Regenerate. 2003-06-23 Keith Seitz * Makefile.tpl: Add maybe-configure-itcl to configure-gdb. * Makefile.in: Regenerate. 2003-06-23 Nathanael Nerode * Makefile.def: Introduce flags_to_pass. * Makefile.tpl: Generate BASE_FLAGS_TO_PASS using it. * Makefile.in: Regenerate. 2003-06-23 Hans-Peter Nilsson * configure.in (noconfigdirs) : Disable target-newlib and target-libgloss. : Disable gdb. : Disable libf2c and ${libgcj}. * configure: Regenerate. 2003-06-17 Benjamin Kosnik * configure.in: Update testsuite_flags to new location. * configure. Regenerate. 2003-06-18 Nathanael Nerode * Makefile.tpl: Remove BUILD_CC stuff. * Makefile.in: Regenerate. 2003-06-14 H.J. Lu * config.guess: Update to 2003-06-12 version. * config.sub: Update to 2003-06-13 version. 2003-06-12 Thiemo Seufer * MAINTAINERS: Add myself as MIPS co-maintainer. 2003-06-12 H.J. Lu * config.guess: Update to 2003-06-06 version. * config.sub: Update to 2003-06-06 version. 2003-06-11 Rainer Orth * configure.in: Don't pass --with-stabs for mips*-sgi-irix6*o32. * configure. Regenerate. 2003-06-10 Nathanael Nerode * configure.in: Disable serial configure by default. * configure: Regenerate. * Makefile.tpl: Abolish .NOTPARALLEL. * Makefile.in: Regenerate. * Makefile.tpl: Replace {build,host,target}_canonical by {build,host,target}. * Makefile.in: Regenerate. * Makefile.tpl: Fix stupid pasto. * Makefile.in: Regenerate. 2003-06-09 Nathanael Nerode * Makefile.tpl: Remove bogus conditional. * Makefile.in: Regenerate. 2003-06-03 Nathanael Nerode * Makefile.tpl: Make 'recursive targets' using autogen rather than shell loop. Remove duplicate 'clean' targets and false comments. * Makefile.def: Add systematic dependencies to 'recursive' targets. Add systematic method of specifying missing targets in subdirs. Add copyright boilerplate. * Makefile.in: Regenerate. * configure.in: Add 'recursive targets' to maybe list. * configure: Regenerate. * Makefile.tpl: Rename [+target+] to [+make_target+]. * Makefile.def: Rename 'target' to 'make_target'. 2003-05-30 Nick Clifton * README-maintainer-mode: Update URL for locating blessed config tools. 2003-05-29 Robert Millan * ltconfig: Import this patch and modify for use with current version of ltconfig: 2003-05-21 Bruno Haible * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER): Add support for GNU/FreeBSD. 2003-05-28 DJ Delorie * Makefile.tpl: Make maybe-check-gcc .PHONY. * Makefile.in: Regenerate. 2003-05-28 Jeff Johnston * COPYING.NEWLIB: Add license info for newlib/libc/sys/linux/stdlib. 2003-05-21 DJ Delorie * Makefile.tpl (configure-target-libiberty): Depend only on gcc, not newlib or libgloss. * Makefile.in: Regenerate. 2003-05-21 DJ Delorie * Makefile.tpl: Add missing empty maybe-check-gcc target. * Makefile.in: Regenerate. 2003-05-20 Maciej W. Rozycki * configure.in: Use curly braces in the definition of tooldir. * configure: Regenerate. 2003-05-19 Nathanael Nerode * configure.in: Switch more things to use maybe dependencies. * Makefile.tpl: Switch more things to use maybe dependencies. Factor out common code from autogen IF statements. * configure: Regenerate. * Makefile.in: Regenerate. 2003-05-14 Kelley Cook * configure.in: Accept i[3456789]86 for machine type. * configure: Regenerate. 2003-05-18 Nathanael Nerode * configure.in: Switch more things to use maybe dependencies. Rearrange a little. Use GCC_TOPLEV_SUBDIRS. * configure: Regenerate. * Makefile.tpl: Switch more things to use maybe dependencies. * Makefile.in: Regenerate. 2003-05-16 Andreas Schwab * Makefile.tpl (install-opcodes): Define. * Makefile.in: Rebuild. 2003-05-13 Andreas Jaeger * config.guess: Update to 2003-05-09 version. * config.sub: Update to 2003-05-09 version. 2003-05-13 Michael Eager * configure.in: Correct sed script so that options in quotes are not deleted. * configure: Rebuild. 2003-05-12 Corinna Vinschen * configure.in (FLAGS_FOR_TARGET): Remove $$s/newlib/libc/sys/cygwin and $$s/newlib/libc/sys/cygwin32 include paths. * configure: Ditto. 2003-05-05 H.J. Lu * config-ml.in: Restored from gcc repository. 2003-05-02 Chris Demetriou * Makefile.tpl: Require "makeinfo" from texinfo 4.2 or later. * Makefile.in: Regenerate. 2003-04-27 Daniel Jacobowitz * src-release (DEVO_SUPPORT): Add src-release, Makefile.tpl, and Makefile.def. 2003-04-27 Daniel Jacobowitz * Makefile.tpl: Clean $(BUILD_SUBDIR). * Makefile.in: Regenerated. 2003-04-18 Gerald Pfeifer * Makefile.tpl (MAKEINFOFLAGS): Default to --split-size=5000000. * Makefile.in: Regenerate. 2003-04-18 Jakub Jelinek * configure.in (powerpc64*-*-linux*): Remove. * configure: Rebuilt. 2003-04-17 Phil Edwards * Makefile.tpl (GCC_STRAP_TARGETS): New variable containing all the previous bootstrap targets, plus bubblestrap, quickstrap, cleanstrap, and restrap. * Makefile.in: Regenerate. 2003-04-16 Richard Earnshaw * configure.in (arm-*-netbsdelf*): Enable building java libraries. * configure: Regenerated. 2003-04-11 Alexandre Oliva * libtool.m4 (lt_cv_deplibs_check_method): Use pass_all on mips*. * */configure: Rebuilt. 2003-03-14 Nathanael Nerode * Makefile.tpl: Move .NOEXPORT, MAKEOVERRIDES back down. * Makefile.in: Regenerate. 2003-03-14 Michael Chastain * Makefile.in: Regenerate with correct Makefile.def. 2003-03-12 Nathanael Nerode * Makefile.tpl: Move .NOEXPORT, MAKEOVERRIDES up. Delete unused Make macro. * Makefile.in: Regenerate. * configure.in: Clean up gxx_include_dir logic. * configure: Regenerate. 2003-03-09 Franz Sirl * configure.in (gxx_include_dir): Fix typo. * configure: Regenerated. 2003-03-06 Andrew Cagney * texinfo/texinfo.tex: Import version 2003-02-03.16. 2003-03-04 Daniel Jacobowitz * configure.in: Include $(build_tooldir)/sys-include in FLAGS_FOR_TARGET. * configure: Regenerated. 2003-03-04 Nathanael Nerode * Makefile.tpl: Reindent. * Makefile.in: Regenerate. * configure.in: Reindent. Don't set unused variables. * configure: Regenerate. * Makefile.tpl: Always pass down RANLIB. * Makefile.in: Regenerate. * Makefile.tpl: Don't set unused enable_shared, enable_threads macros. * Makefile.in: Regenerate. * configure.in: Remove unused logic relating to --enable-shared and --enable-threads. Remove bogus comments. Remove redundant noconfigdirs. * configure: Regenerate. * configure.in: Replace ${libstdcxx_version} by its value. Remove reference to mh-dgux. * configure: Regenerate. 2003-02-28 Nathanael Nerode * Makefile.tpl: Rearrange. * Makefile.in: Regenerate. 2003-02-25 Nick Clifton * configure: Remove site-file supprot - it is obsolete. 2003-02-24 Uwe Stieber * configure.in: Add support for kaOS as cross build target system. * configure: Regenerated. 2003-02-20 Sean McNeil * Makefile.tpl: Add definition of CPPFLAGS to pass into configure-target-* as some target builds may require additional flags for preprocessor tests. * Makefile.in: Regenerated. 2003-02-19 Alexandre Oliva * libtool.m4 (LD): Append -melf* option to LD on IRIX with GNU ld. * ltconfig: Handle it. * ltcf-cxx.sh: Use with_gnu_ld passed as a shell variable instead of auto-detecting it. 2003-02-19 Alexandre Oliva * ltcf-cxx.sh: Replace $linker_flags with $compiler_flags wherever it is used as argument to $CC. * ltcf-gcj.sh: Likewise. 2003-02-19 Alexandre Oliva * configure.in: Introduce --enable-maintainer-mode. * configure: Rebuilt. * Makefile.tpl (Makefile.in, configure): Enable dependencies only for maintainer mode. * Makefile.in: Rebuilt. 2003-02-19 Andrew Cagney * configure: Regenerate using autoconf 2.13. 2003-02-19 Alan Modra * config.guess: Import latest version. * config.sub: Import latest version. 2003-02-18 Jason Merrill * Makefile.tpl (check-c++): Allow parallelism. 2003-02-17 Andrew Cagney * configure: Regenerate using autoconf 000227. 2003-02-15 Geoffrey Keating * configure.in (*-*-darwin*): Rename from powerpc*-*-darwin*, don't configure target-libobjc. * configure: Regenerate. 2003-02-14 Rainer Orth * Makefile.tpl (RANLIB): Define. * Makefile.in: Regenerate. 2003-02-06 Keith R Seitz * Makefile.def: Remove "snavigator", "grep", and "db" modules. * Makefile.tpl: Remove "all-snavigator" and "all-grep". * Makefile.in: Regenerated. * configure.in: Remove all traces of snavigator, db, and grep. * configure: Regenerated. 2003-01-31 Frank Ch. Eigler * Makefile.tpl (all-sid): Add libiberty/bfd/opcodes dependencies. * Makefile.in: Regenerated. 2003-01-30 Alexandre Oliva * config.if: Copy from GCC. 2003-01-27 Phil Edwards * configure.in: Revert 24Jan change. * configure: Regenerate. 2003-01-23 Nathanael Nerode * configure.in: Revert previous change. * configure: Regenerate. 2003-01-23 Nathanael Nerode * configure.in: Make rda native-only. * configure: Regenerate. 2003-01-19 Nathanael Nerode * configure.in: Add missing \. * configure: Rebuilt. 2003-01-17 Jakub Jelinek * configure.in (baseargs): Avoid using \| in sed regular expressions. * configure: Rebuilt. 2003-01-16 Jakub Jelinek * configure.in (baseargs): Remove all supported forms of --cache-file, --srcdir, --host, --build and --target options from argument lists. * configure: Rebuilt. 2003-01-15 Alexandre Oliva * configure.in (noconfigdirs): Don't skip gas on IRIX 6. * configure: Rebuilt. 2003-01-09 Nathanael Nerode * configure.in: Substitute TOPLEVEL_CONFIGURE_ARGUMENTS. * Makefile.tpl: Pass TOPLEVEL_CONFIGURE_ARGUMENTS to gcc. * Makefile.in: Regenerate. * configure: Regenerate. 2003-01-09 Christian Cornelssen * Makefile.tpl (BASE_FLAGS_TO_PASS): Also pass DESTDIR. (install-info, dir.info): Prepend $(DESTDIR) to $(infodir). * Makefile.in: Regenerate. 2003-01-09 Alexandre Oliva * configure.in: Remove Makefile in build, host and target modules unless configure was run with --no-recursion. * configure: Rebuilt. 2003-01-08 Chris Demetriou * config.guess: Update to 2003-01-03 version. * config.sub: Update to 2003-01-03 version. 2003-01-07 Christopher Faylor * configure: Regenerate with proper autoconf 2.13. 2003-01-07 Christopher Faylor * configure.in: Add AC_PREREQ for consistency. * configure: Regenerate. 2003-01-06 Andrew Cagney * configure.in (GDB_TK): Add tcl directories conditional on gdb/gdbtk directory being present. * configure: Regenerate. 2003-01-04 John David Anglin * configure.in (LD): Improve test for gcc. Try to set LD to the ld used by gcc if LD is not defined and we are not doing a Canadian Cross. * configure: Rebuilt. 2003-01-01 Daniel Jacobowitz * src-release (ETC_SUPPORT): Add fdl.texi and texi2pod.pl. 2002-12-31 Tom Tromey * Makefile.in: Rebuilt. * Makefile.def (target_modules) [libffi]: Allow installation. 2002-12-31 Andreas Schwab * configure.in: Fix use of $program_transform_name. * configure: Regenerated. 2002-12-30 Daniel Jacobowitz * configure.in (baseargs): Don't remove first configure argument. * configure: Regenerated. 2002-12-29 Alexandre Oliva * Makefile.tpl (local-distclean): Don't remove... (multilib.ts): ... this. Moved into... (multilib.out): ... this. Don't use sub-make. ($(BUILD_SUBDIR)/[+module+]/Makefile, [+module+]/Makefile, $(TARGET_SUBDIR)/[+module+]/Makefile, gcc/Makefile): Moved into... (configure-build-[+module+], configure-[+module+], configure-target-[+module+], configure-gcc): ... these. Test for Makefile existence. Drop config.status from dependencies. * Makefile.in: Rebuilt. * configure.in: Move gcc-version-trigger to the end of ac_configure_args. Add comments to maybedep.tmp and serdep.tmp. Introduce --disable-serial-configure. Remove nonopt from baseargs, matching and removing corresponding whitespace while at it. * configure: Rebuilt. 2002-12-28 Alexandre Oliva * configure.in (host_configargs): Replace reference to no-longer-defined buildopts with --build=${build_alias}. * configure: Rebuilt. 2002-12-28 Alexandre Oliva * Makefile.tpl ($(NOTPARALLEL)): Move to the end. Bring uses of program_transform_name to standard idiom. (AUTOGEN, AUTOCONF): Define. (Makefile.in): Use $(AUTOGEN). (Makefile): Depend on config.status, and use autoconf-style rule to build it. Move original commands to... (config.status): ... this new target. (configure): Add $(srcdir). Depend on config/acx.m4. Use $(AUTOCONF). * Makefile.in: Rebuilt. 2002-12-28 Nathanael Nerode * Makefile.tpl: Fix dramatic bustage due to change in program_transform_name. * Makefile.in: Regenerate. * configure.in: Remove unnecessary PATH setting. * configure: Regnerate. * configure.in: Don't default to unprefixed tools unless the native tools will work. * configure: Regenerate. * configure.in: Convert to autoconf script. Blow away lots of now-redundant Makefile fragments. * configure: Generate using Autoconf. * Makefile.tpl: Rewrite to reflect autoconfiscation. * Makefile.in: Regenerate. 2002-12-27 Nathanael Nerode * configure: Remove unneeded 'export's. Make CC_FOR_TARGET, CXX_FOR_TARGET, GCJ_FOR_TARGET substituted in configure.in only. * ChangeLog: Move a couple of entries from here to winsup/cygwin, where they belong. 2002-12-24 Andreas Schwab * Makefile.tpl (multilib.out): Fix missing space. * Makefile.in: Regenerate. 2002-12-23 Nathanael Nerode * Makefile.tpl: Use shared multilib.out. Use move-if-change for it. Convert (cd foo; make) to (cd foo && make). Clean up multilib.out. * Makefile.in: Regenerate. * configure.in: Remove unnecessary leftovers. 2002-12-21 Geoffrey Keating * configure.in (extra_ranlibflags_for_target): New variable. (*-*-darwin): Add -c to ranlib commands. * configure (tooldir): Handle extra_ranlibflags_for_target. 2002-12-20 Jeff Johnston * COPYING.NEWLIB: Updated. * COPYING.LIBGLOSS: Ditto. 2002-12-19 Nathanael Nerode * Makefile.tpl: Revert HJL's change. * Makefile.in: Regenerated. * configure.in: Put build_prefix before $(BUILD_SUBDIR) here, and always. 2002-12-19 Andreas Schwab * Makefile.tpl, configure.in: Substitute libstdcxx_incdir. * Makefile.in: Regenerate. 2002-12-18 H.J. Lu * Makefile.tpl: Add @build_prefix@ before $(BUILD_SUBDIR). * Makefile.in: Regenerated. * configure.in (build_prefix): New. Substitute. 2002-12-18 Nathanael Nerode * Makefile.tpl: Don't let real targets depend on phony targets. * Makefile.in: Regenerate. * Makefile.tpl (do-info): Depend on maybe-all-texinfo, not all-texinfo. * Makefile.in: Regenerate. 2002-12-16 Jason Merrill * Makefile.tpl (all-gcc): Use 'make quickstrap' if there was a previous 'make bootstrap'. * Makefile.in: Regenerate. 2002-12-17 Hans-Peter Nilsson * configure.in (noconfigdirs) [mmix-*-*]: Disable libgloss and gdb. 2002-12-13 Jason Merrill * Makefile.tpl (check-gcc-c++): Renamed from check-c++. Don't run library tests. (check-c++): Just depend on it and check-target-libstdc++-v3. * Makefile.in: Regenerate. 2002-12-13 Nathanael Nerode * configure.in, Makefile.tpl, Makefile.def: Remove tclX. * Makefile.in: Regenerate. 2002-12-12 Jeff Johnston * COPYING.NEWLIB: Update list of alternate Regent of California licenses and discuss official revoking of advertising clause. * COPYING.LIBGLOSS: Ditto. 2002-12-12 Alexandre Oliva * Makefile.tpl (configure-target-rda): Depend on $(ALL_GCC_C). * Makefile.in: Rebuilt. 2002-12-10 Nathanael Nerode * configure: Fix bug put in by gremlins. * Makefile.tpl: Substitute more autoconfily. * configure: Substitute more autoconfily. * Makefile.in: Regenerate. 2002-12-08 Andrew Cagney * Makefile.tpl (all-sim): Depend on maybe-configure-gdb. * Makefile.in (all-sim): Ditto. 2002-12-06 DJ Delorie * Makefile.tpl: Change configure dependencies to not have real targets depend on phony targets. 2002-12-05 Nathanael Nerode * configure.in: Revert unintentional change. * src-release: Configure host subdirs. * Makefile.tpl: Change dependency for */multilib.out so that it works when gcc isn't in the tree. * configure.in: Substitute more. * configure: Run subconfigures from the Makefile. * Makefile.tpl: Run subconfigures from the Makefile; add a few convenience targets. Make sure gcc isn't rebuilt after bootstrap. 2002-12-03 Nathanael Nerode * Makefile.tpl: Add targets for configuring host subdirs in Makefile, and corresponding dependencies. * Makefile.in: Regenerate. * configure.in (host_tools): Order binutils, gas and ld for convenience in running the testsuites. * Makefile.tpl: Introduce rules to serialize subconfigure runs. * Makefile.in: Regenerate. * configure.in: Introduce rules to serialize subconfigure runs. * configure.in: Introduce BASE_CC_FOR_TARGET. * Makefile.tpl: Reorganize and comment. Introduce HOST_CONFIGARGS. Realize configure-build-* targets. Realize configure-target-* targets. * Makefile.in: Regenerate. 2002-12-02 Nathanael Nerode * configure: Move gcc_version_trigger stuff from here... * configure.in: ...to here. * configure.in: Separate subconfigure options added by this file from options given by the user. Add machinery to put args for host subconfigures into the Makefile. * Makefile.tpl: Remove 'vault' targets. * Makefile.tpl: Reorder and comment dependencies. * Makefile.in: Regenerate. 2002-11-28 Geoffrey Keating * configure.in: Move host-specific darwin noconfigdirs into the host-specific section. 2002-12-02 Nathanael Nerode * Makefile.tpl: Restore bkorb's style patch, accidentally lost during replay. * Makefile.in: Regenerate. (finishing slow-motion replay) * configure: Remove skip-this-dir support. * Makefile.tpl: Remove skip-this-dir support. * Makefile.tpl: Remove leftover support for non-autoconfiscated subdirectories. * Makefile.in: Regenerate. * Makefile.tpl: Strip out useless setting of 'dir'. * Makefile.in: Regenerate. 2002-12-02 Nathanael Nerode (finishing slow-motion replay) * configure.in: Fix deeply stupid bug. * configure.in: Introduce RAW_CXX_FOR_TARGET and simplify embedded shell code in CXX_FOR_TARGET * Makefile.def: Introduce raw_cxx. * Makefile.tpl: Use raw_cxx to select between CXX_FOR_TARGET and RAW_CXX_FOR_TARGET. * Makefile.in: Regenerate. 2002-12-02 Nathanael Nerode (finishing slow-motion replay) * Makefile.tpl: Remove unnecessary ifs. * Makefile.in: Regenerate. * Makefile.tpl: Implement soft dependency machinery. Maybe-ize dependencies. Maybe-ize build-libiberty. Create dummy install targets for 'no_install' modules. * configure: Move GDB_TK substitution to configure.in. Move build_modules stuff to configure.in. * configure.in: Implement soft dependency machinery. Maybe-ize GDB_TK, rearrange slightly. Move build_modules stuff from configure. * Makefile.in: Regenerate. 2002-12-01 Nathanael Nerode (continuing slow-motion replay) * Makefile.tpl: Make all-target, install-target behave similarly to all, install (only hitting configured targets). Eliminate unused macro defintions. * Makefile.tpl: Add all-gcc: all-build-libiberty dependency when build != host. * Makefile.tpl: Add all-gcc: all-libiberty dependency. * ltcf-c.sh, ltcf-gcj.sh, Makefile.tpl: Correct BUILD/HOST confusion. * configure.in: Produce lists of subdir targets we're actually configuring. Remove references to "dosrel". * Makefile.tpl: Let configure set which subdir targets are hit. Remove install-cross; clean up install; remove ALL. Remove references to "dosrel". Remove "EXTRA_TARGET_HOST" hackery. Autogenerate host module targets. Remove empty dependency lines and redundant dependency; rearrange slightly. * Makefile.def: Add host-side libtermcap, utils. * Makefile.in: Regenerate. 2002-12-01 Nathanael Nerode (Continuing slow-motion replay) * Makefile.def: Add list of recursive targets to autogenerate. Add build_modules. * Makefile.tpl: Autogenerate do-* targets. Autogenerate *-target-* targets. Autogenerate *-build-* targets. * Makefile.in: Regenerate. 2002-11-30 Nathanael Nerode (Continuing slow-motion replay) * configure: More autoconf-style substitutions. * Makefile.tpl: More autoconf-style substitutions. * Makefile.in: Regenerate. 2002-11-30 Nathanael Nerode (Continuing slow-motion replay) * configure: Substitute more variables in a more autoconf-friendly way. Simplify slightly. * Makefile.tpl: Make more variables substitutable in an autoconf-friendly way. * Makefile.in: Regenerate. 2002-11-29 Nathanael Nerode (Continuing slow-motion replay) * configure.in (v810*): Remove special setting of tools. * configure: Add support for extra required flags for ar or nm. * configure.in (aix4.3+): Use above support for target-specific issues, rather than using config/mt-aix43. 2002-11-29 Nathanael Nerode (Starting slow-motion replay merge from gcc 3.4 b-i-b branch) * configure: Remove 'removing', which doesn't work. Replace $subdir with . everywhere. Replace $subdirs with ''. Replace $makesrcdir with $srcdir. Reformat indentation. Substitute some variables formerly hard-coded in the Makefile for build=host. * Makefile.tpl: Autogenerate more; make more autoconf-friendly. * Makefile.def: Autogenerate more. * Makefile.in: Regenerate. 2002-11-13 Bruce Korb * Makefile.tpl: syntactic cleanup 2002-11-04 Kevin Buettner * Makefile.def (host_modules): Add rda. * Makefile.in: Regenerate. * configure.in (target_tool): Add target-rda to list. 2002-10-25 Phil Edwards * Makefile.tpl (bootstrap): Add bubblestrap, quickstrap, cleanstrap, and restrap targets to this rule. * Makefile.in: Regenerate. 2002-10-24 Hans-Peter Nilsson * configure.in (i[3456]86-*-linux*): Add check to disable ${libgcj} for glibc1. 2002-10-07 Svein E. Seldal * configure.in: Add tic4x target. 2002-10-03 Nathanael Nerode * Makefile.tpl: Make SET_LIB_PATH substitution more autoconfy. * Makefile.tpl: Make RPATH_ENVVAR substitution more autoconfy. * configure.in: Make SET_LIB_PATH substitution more autoconfy. * configure.in: Make RPATH_ENVVAR substitution more autoconfy. * Makefile.in: Regenerate. 2002-10-02 Nathanael Nerode * Makefile.tpl: Eliminate reference to all-gui, all-libproc. * Makefile.in: Regenerate. * Makefile.def: Remove order dependency comments. * Makefile.tpl: Add explicit install-install dependencies. * Makefile.in: Regenerate. * Makefile.tpl: Remove material now in src-release. (Finally!) * Makefile.in: Regenerate. * configure: Restore my original patch by syncing with gcc version. * Bring following over from gcc: 2002-09-30 Ulrich Weigand * configure.in (s390*-*-linux*): Enable libgcj. 2002-10-02 Nathanael Nerode * Makefile.in: Regenerate. This really ought to fix things. :sigh: 2002-10-02 Alan Modra * configure: Move stray lines back to where they belong. 2002-10-01 Nathanael Nerode * Makefile.tpl: Insert configure-target target, for src-release. * configure: Finish reverting change which Andrew Cagney started reverting. Should fix bustage. * src-release (BINUTILS_SUPPORT_DIRS): Add cpu directory. * src-release: New file. Contains material for making net releases for gdb, binutils, et al., formerly in Makefile.in. 2002-09-30 Nick Clifton * cpu: New top level directory. Intended to hold input files for CGEN which have FSF copyright assignment. * Makefile.in (BINUTILS_SUPPORT_DIRS): Add cpu directory. 2002-09-29 Andrew Cagney Revert below (note that src does not contain Makefile.tpl): * Makefile.tpl: Make subsituted variables more autoconfy. * Makefile.in: Regenerate. 2002-09-29 Nathanael Nerode * configure: Revert accidentally applied changes. * Makefile.tpl: Make more autoconf-friendly. * Makefile.in: Regenerate. * configure: Make substitution more autoconf-like. 2002-09-28 Richard Earnshaw * configure.in (arm-*-coff, strongarm-*-coff, xscale-*-coff): Use a single entry to handle all these. (arm-*-elf, strongarm-*-elf, xscale-*-elf): Likewise. Also enable libjava on arm-*-elf. 2002-09-27 Geoffrey Keating * configure.in (powerpc-*-darwin*): Don't configure BFD, TK, or the things that depend on them. 2002-09-25 Nathanael Nerode * Makefile.tpl: Make subsituted variables more autoconfy. * Makefile.in: Regenerate. * configure: Make seds more autoconfy. 2002-09-25 Nathanael Nerode * Makefile.tpl: Rewrite substituted lines to look autoconfy. * Makefile.in: Regenerate. * configure.in: Rewrite sed statements to look autoconfy. * Makefile.tpl: Autogenerate *-target-* lists, dependencies of all-target-foo on configure-target-foo. * Makefile.def: Ditto. * Makefile.in: Rebuild. 2002-09-22 Nathanael Nerode * Makefile.def: New file. * Makefile.tpl: New file. * Makefile.in: Generate from Makefile.tpl with 'autogen Makefile.def'. * configure.in: Minor rearrangement. Simplify tests. 2002-09-23 Jason Thorpe * configure.in (with_headers): Skip copy if value is "yes". (with_libs): Likewise. 2002-09-20 Nathanael Nerode * configure.in (*-*-netbsd*): Use noconfigdirs, not skipdirs. * configure.in (sh*-*-pe*): Ditto. * configure.in (mips*-*-pe*): Ditto. * configure.in (*arm-wince-pe): Ditto. * configure.in: Rearrange. 2002-09-12 Nick Clifton * Import these changes from the config master repository: 2002-09-05 Svein E. Seldal * config.sub: Add tic4x target. 2002-09-03 Ben Elliston * config.guess: Detect NSR-D machines for nsr-tandem-nsk. Reported by . 2002-09-10 Jeff Johnston * COPYING.NEWLIB: More updates. 2002-09-09 Jeff Johnston * COPYING.NEWLIB: Update. 2002-08-23 Andrew Cagney * texinfo/texinfo.tex: Import version 2002-06-04.06. * config.guess: Import version 2002-08-23. * config.sub: Import version 2002-08-22. 2002-08-20 Alexandre Oliva * Makefile.in (GCC_FOR_TARGET): Prepend STAGE_CC_WRAPPER. * configure.in (CC_FOR_TARGET, GCJ_FOR_TARGET, CXX_FOR_TARGET, CXX_FOR_TARGET_FOR_RECURSIVE_MAKE): Likewise. 2002-08-06 Federico G. Schwindt * configure.in (hppa*-*-openbsd*): Treat like hppa*-*-*elf*. 2002-08-04 H.J. Lu (hjl@gnu.org) * configure.in (mips*-*-linux*): Don't skip target-libffi. 2002-07-31 Alan Modra * configure.in: Move generic linux case to end. Copy generic linux noconfigdirs to mips*-*-linux* entry and new powerpc64*-*-linux* entry. Add target-libffi for the latter. 2002-07-19 Chris Demetriou * MAINTAINERS: Clarify on config.guess and config.sub, and add one instance of them which was missed to the list to update. 2002-07-16 Chris Demetriou * config.guess: Update to 2002-07-09 version. * config.sub: Update to 2002-07-03 version. 2002-07-11 Nathanael Nerode * configure.in: Remove two redundant tests. 2002-07-11 Rainer Orth * configure.in (mips*-*-irix6*o32): Enable stabs. 2002-07-08 Nathanael Nerode * configure.in: Don't build grez. * Makefile.in: Ditto. * Makefile.in: Remove references to bsp, cygmon, libstub. * configure.in: Ditto. * configure.in: Remove leftover reference to gdbtest. 2002-07-08 Phil Edwards * configure.in (gxx_include_dir): Change to match versioned C++ headers if --enable-version-specific-runtime-libs is used. 2002-07-04 Steve Ellcey * ltcf-cxx.sh (hpux*): Modify to support ia64-*-hpux*. 2002-07-03 Nathanael Nerode * configure.in: Make --without-x work. 2002-07-03 Nick Clifton * contrib: New directory. Created to contain a copy of the texi2pod.pl script so that it is in the same place as the version in the FSF GCC sources. 2002-07-02 Nathanael Nerode * configure.in: Rearrange target Makefile fragment collection. * Makefile.in: Don't try to build gdbtest, tgas, ispell, inet, or cvs[src]. * configure.in: Ditto. 2002-07-01 Nathanael Nerode * Makefile.in: Eliminate 'apache' targets. * configure.in: Eliminate 'apache' targets. * configure.in: Eliminate redundant tests. Reorganize. * Makefile.in: Eliminate last reference to LIBGCC1_TEST. * config-ml.in: Eliminate references to Cygnus configure. * Makefile.in: Eliminate references to building emacs. 2002-07-01 Denis Chertykov * configure.in: Add support for ip2k. 2002-06-24 Ben Elliston * configure.in (host_tools): Remove cgen. * Makefile.in (all-cgen): Remove; runs from its source directory. (check-cgen, install-cgen, clean-cgen): Likewise. (all-opcodes): No not depend on all-cgen. (all-sim): Likewise. 2002-06-22 Nathanael Nerode * configure.in: Fix AIX configury bug. 2002-06-19 Nathanael Nerode * configure.in: Replace ${topsrcdir} with ${srcdir}. * configure.in: Move definition of libstdcxx_flags right above usage, rather than way earlier. * configure.in: Pull definition of is_cross_compiler earlier. * configure.in: Rearrange a little. * configure.in: Remove references to librx. * Makefile.in: Remove references to librx. 2002-06-19 Nathanael Nerode * configure.in: Eliminate ${gasdir} variable. 2002-06-18 Dave Brolley * configure.in: Add support for frv. * config.sub: Add support for frv. 2002-06-12 Kaveh R. Ghazi * Makefile.in (CFLAGS_FOR_TARGET): Add -O2. 2002-06-08 Jason Thorpe * configure.in (vax-*-netbsd*): Re-enable gas. 2002-05-31 Nathanael Nerode * Makefile.in: Replace HOST_PREFIX, HOST_PREFIX_1 with BUILD_PREFIX, BUILD_PREFIX_1, to correct nomenclature. * configure: Likewise. * Makefile.in: Eliminate version-specific references to tcl8.1, tk8.1. * configure.in: Eliminate version-specific references to tcl8.1, tk8.1. 2002-05-31 Olaf Hering * config-ml.in: Propogate DESTDIR also. 2002-05-29 Jason Thorpe * configure.in (vax-*-netbsd*): Don't build gas for this platform. 2002-05-28 Marek Michalkiewicz * configure.in (noconfigdirs): Don't compile libiberty, libstdcxx and libgcj for AVR. 2002-05-28 Nick Clifton * config.sub: Add DLX target. 2002-05-22 Jason Thorpe * config.guess: Update to 2002-05-22 version. * config.sub: Likewise. 2002-05-16 Rainer Orth * Makefile.in: Allow for PWDCMD to override hardcoded pwd. * config-ml.in: Likewise. * configure: Likewise. * configure.in: Likewise. 2002-05-13 Nathanael Nerode * configure.in: Simplify makefile fragment collection. * configure.in: Remove code to build emacs. * configure.in : Remove --srcdir argument from targargs and buildargs (it's always overridden in the Makefile anyway). Rearrange a bit. * configure: Move some logic to configure.in. * configure.in: Move some logic from configure. 2002-05-07 Jeff Johnston * COPYING.LIBGLOSS: New file. 2002-05-07 Federico G. Schwindt * Makefile.in: Honour DESTDIR. 2002-05-05 Alexandre Oliva * configure.in (noconfigdirs): Don't disable libgcj on sparc64-*-solaris* and sparcv9-*-solaris*. 2002-05-03 Alexandre Oliva * configure.in: Revert 2002-04-18's patch; fixed in libjava. 2002-05-03 Thomas Fitzsimmons * configure.in (FLAGS_FOR_TARGET): Do not add -B$$r/$(TARGET_SUBDIR)/newlib/ when compiling newlib natively on i[3456]86-*-linux*. 2002-05-01 Thomas Fitzsimmons * configure.in (noconfigdirs): Replace [ ] with test. * configure.in (noconfigdirs): Do not add target-newlib if target == i[3456]86-*-linux*, and host == target. 2002-04-29 Mark Mitchell * config.guess: Updated to 2002-04-26's version. * config.sub: Updated to 2002-04-26's version. 2002-04-29 Nathanael Nerode * configure.in: delete reference to absent file * configure.in: replace '[' with 'test' * configure.in: Eliminate references to gash. * Makefile.in: Eliminate references to gash. * configure.in: remove useless references to 'pic' makefile fragments. * configure.in: (*-*-windows*) Finish removing. * configure.in: Eliminate redundant test for libgui. 2002-04-26 Joel Sherrill * configure.in (h8300*-*-rtems*): Disable libf2c and libgcj. (sparc-*-elf*, sparc64-*-elf*): Disable libgcj. 2002-04-19 Nathanael Nerode * configure.in: remove references to dead files 2002-04-18 Tom Tromey * configure.in: Disallow configuring libgcj when it is already installed and we're using Solaris 2.8 linker. Do enable libgcj on Solaris 2.8 by default. For PR libgcj/6158. 2002-04-17 Nathanael Nerode * configure.in: Move default CC setting out of config/mh-* fragments directly into here. 2002-04-17 Nathanael Nerode * configure.in: don't even try to configure or make a subdirectory if there's no configure script for it. 2002-04-15 Mark Mitchell * MAINTAINERS: Remove chill maintainers. * Makefile.in (CHILLFLAGS): Remove. (CHILL_LIB): Remove. (TARGET_CONFIGDIRS): Remove libchill. (CHILL_FOR_TARGET): Remove. (BASE_FLAGS_TO_PASS): Don't pass CHILLFLAGS, CHILL_FOR_TARGET, or CHILL_LIB. (CONFIGURE_TARGET_MODULES): Remove configure-target-libchill. (CHECK_TARGET_MODULES): Likewise. (INSTALL_TARGET_MODULES): Likewise. (CLEAN_TARGET_MODULES): Likewise. (configure-target-libchill): Remove. (all-target-libchill): Remove. * configure.in (target_libs): Remove target-libchill. Do not compute CHILL_FOR_TARGET. * libchill: Remove directory. 2002-04-15 DJ Delorie * Makefile.in, configure.in, configure: Sync with gcc, entries follow... 2002-04-08 Tom Tromey * configure.in: Add FLAGS_FOR_TARGET to GCJ_FOR_TARGET. Fixes PR libgcj/6068. 2002-03-30 Krister Walfridsson * configure.in (i*86-*-netbsdelf*): Don't disable libgcj. 2002-03-27 Rainer Orth * configure.in (alpha*-dec-osf*): Enable libgcj. 2002-03-24 Nick Clifton Fix for: PR bootstrap/3591, target/5676 * configure.in (mcore-pe): Disable the configuration of libstdc++-v3 since exceptions are not supported. 2002-03-20 Anthony Green * configure.in: Enable libgcj for xscale-elf target. 2002-02-28 Alexandre Oliva * configure.in (libstdcxx_flags): Don't add libstdc++-v3 flags for libjava. (CXX_FOR_TARGET): Explain why -shared-libgcc here. 2002-02-22 Alexandre Oliva * configure.in (CXX_FOR_TARGET): Add -shared-libgcc for libstdc++-v3 and libjava. 2002-02-11 Adam Megacz * gcc/Makefile.in: Removed libstdc++-v3 dependancy for libjava and boehm-gc 2002-02-09 Alexandre Oliva * config.guess: Updated to 2002-01-30's version. * config.sub: Updated to 2002-02-01's version. Contribute sh64-elf. 2000-12-01 Alexandre Oliva * configure.in: Added sh64-*-*. 2002-01-17 H.J. Lu * Makefile.in (all-fastjar): Also depend on all-libiberty. (all-target-fastjar): Also depend on all-target-libiberty. Wed Dec 5 07:33:45 2001 Douglas B. Rupp * configure, configure.in: Use temp file for long sed commands. 2001-11-14 Hans-Peter Nilsson * configure.in (noconfigdirs) [h8300*-*-*, h8500-*-*]: Disable libf2c. 2001-11-03 Hans-Peter Nilsson * configure.in (noconfigdirs) [mmix-*-*]: Disable libgcj. 2001-10-11 Hans-Peter Nilsson * configure.in (noconfigdirs) [cris-*-*]: Disable libgcj. 2001-10-02 Joseph S. Myers * configure: Handle temporary files securely using mkdir. 2001-09-26 Will Cohen * configure.in (*-*-linux*): Disable configuration of target-newlib and target-libgloss. 2001-09-26 Alexandre Oliva * Makefile.in (EXTRA_TARGET_FLAGS): Pass RANLIB_FOR_TARGET for RANLIB. 2001-08-11 Graham Stott * Makefile.in (check-c++): Add missing semicolon. 2001-07-25 Andrew Haley * configure.in (sh-*-linux*): New. 2001-07-12 Stephane Carrez * configure.in (noconfigdirs): Don't compile libiberty, libstdcxx and libgcj on m68hc11/m68hc12. 2001-06-27 H.J. Lu (hjl@gnu.org) * Makefile (CFLAGS_FOR_BUILD): New. (EXTRA_GCC_FLAGS): Add CFLAGS_FOR_BUILD. 2001-06-01 Hans-Peter Nilsson * configure.in (libstdcxx_flags): Do not try to execute libstdc++-v3/testsuite_flags until it exists. 2001-05-18 Benjamin Kosnik * configure.in (libstdcxx_flags): Remove reference to libstdc++.INC. 2001-05-09 Jeffrey Oldham * ltcf-cxx.sh: Add -nostdlib to IRIX 6 archive_cmds. Mon Apr 23 09:15:03 2001 Anthony Green * configure.in: Move *-chorusos target case to the proper switch. Disable libgcj. 2001-04-13 Franz Sirl * Makefile.in (STAGE1_CFLAGS): Pass down. 2001-04-13 Alan Modra * config.guess: Add hppa64-linux support. Note for next import that this is already in the master file. * configure.in: Likewise. Accept `parisc' alias for `hppa'. 2001-03-22 Colin Howell * Makefile.in (DO_X): Do not backslash single-quotes in backquotes (two places). 2001-03-18 Laurynas Biveinis * Makefile.in (DO_X): Quote nested quotes. 2001-03-15 Laurynas Biveinis * Makefile.in (DO_X): Use double quotes for quoting "RANLIB=$${RANLIB}". 2001-03-09 Nicola Pero * configure.in: Only use `lang_requires' for languages athat are actually enabled. 2001-03-07 Tom Tromey * configure.in: Allow config-lang.in to set `lang_requires' to list of other required languages. 2001-03-06 Laurynas Biveinis * Makefile.in: Remove RANLIB definition. Use RANLIB in RANLIB_FOR_TARGET, EXTRA_HOST_FLAGS, EXTRA_TARGET_FLAGS, EXTRA_GCC_FLAGS, $(DO_X) targets only when the RANLIB is set. 2001-02-28 Benjamin Kosnik Alexandre Oliva * Makefile.in (check-c++): Use tabs, not spaces. 2001-02-19 Benjamin Kosnik * Makefile.in (check-c++): New rule. * configure.in (target_libs): Remove libg++. (noconfigdirs): Remove libg++. (noconfigdirs): Same. (noconfigdirs): Same. (noconfigdirs): Same. * config-ml.in: Remove libg++ references. * Makefile.in (TARGET_CONFIGDIRS): Remove libio, libstdc++, libg++. (ALL_TARGET_MODULES): Same. (configure-target-libg++): Remove. (all-target-libg++): Remove. (configure-target-libio): Remove. (all-target-libio): Remove. (check-target-libio): Remove. (.PHONY): Remove. (libg++.tar.bz2): Remove. (all-target-cygmon): Remove libio. (all-target-libstdc++): Remove. (configure-target-libstdc++): Remove. (TARGET_LIB_PATH): Remove libstdc++. (ALL_GCC_CXX): Remove libstdc++. (all-target-gperf): Correct. 2001-02-15 Anthony Green * configure: Introduce GCJ_FOR_TARGET. * configure.in: Ditto. * Makefile.in: Ditto. 2001-02-08 Chandrakala Chavva * configure.in: for *-chorusos, don't config target-newlib and target-libgloss. 2001-02-04 Mark Mitchell Remove V2 C++ library. * configure.in: Remove --enable-libstdcxx_v3 support. 2001-01-27 Richard Henderson * configure.in (target_makefile_frag) [alpha*-*]: Use mt-alphaieee. 2001-01-26 Tom Tromey * configure.in: Allow libgcj to be built on Sparc Solaris. 2001-01-23 Bryce McKinlay * configure.in: Enable libgcj on several additional platforms. 2001-01-22 Bryce McKinlay * configure.in: Enable libgcj for linux targets. 2001-01-09 Mike Stump * Makefile.in (CONFIGURE_TARGET_MODULES): Pass back configuration failures of subdirectories. 2001-01-02 Laurynas Biveinis * configure: handle DOS-style absolute paths. 2001-01-02 Laurynas Biveinis * configure.in: remove supported directories from $noconfigdirs for DJGPP. 2000-12-18 Benjamin Kosnik * Makefile.in (BASE_FLAGS_TO_PASS): Alphabetize. (libstdcxx_incdir): Pass down. * config.if: Remove expired bits for cxx_interface, add stub. (libstdcxx_incdir): Add variable for g++ include directory. * configure.in (gxx_include_dir): Use it. 2000-12-15 Andreas Jaeger * configure.in: Handle lang_dirs. 2000-12-13 Anthony Green * configure.in: Disable libgcj for any target not specifically listed. Disable libgcj for x86 and Alpha Linux until compatible with g++ abi. 2000-12-13 Mike Stump * Makefile.in (local-distclean): Also remove fastjar. 2000-12-10 Anthony Green * configure.in: Define libgcj. Disable libgcj target libraries for most targets. 2000-12-09 Alexandre Petit-Bianco * configure.in (target_libs): Revert 2000-12-08 patch. (noconfigdirs): Added target-libjava. 2000-12-09 Laurynas Biveinis * Makefile.in: handle DOS-style absolute paths. 2000-12-08 Alexandre Petit-Bianco * Makefile.in (TARGET_CONFIGDIRS): Wrong place. Removed note about libjava. * configure.in (target_libs): Removed `target-libjava'. 2000-12-08 Alexandre Petit-Bianco * Makefile.in (TARGET_CONFIGDIRS): Added note about libjava. (ALL_MODULES): Added fastjar. (NATIVE_CHECK_MODULES, INSTALL_MODULES, CLEAN_MODULES): Likewise. (all-target-libjava): all-fastjar replaces all-zip. (all-fastjar): Added. (configure-target-fastjar, all-target-fastjar): Likewise. * configure.in (host_tools): Added fastjar. 2000-12-07 Mike Stump * Makefile.in (local-distclean): Remove leftover built files. 2000-11-16 Fred Fish * configure.in (enable_libstdcxx_v3): Fix typo, libstd++ -> libstdc++. 2000-11-13 Joseph S. Myers * configure: Provide the original toplevel configure arguments (including $0) to subprocesses in the environment rather than through gcc/configargs.h. 2000-11-12 Mark Mitchell * configure: Turn on libstdc++ V3 by default. 2000-10-16 Michael Meissner * configure (gcc/configargs.h): Only create if there is a build GCC directory created. 2000-10-05 Phil Edwards * configure: Save configure arguments to gcc/configargs.h. 2000-10-04 Andris Pavenis * Makefile.in (bootstrap): avoid recursion if subdir missing (cross): ditto (do-proto-toplev): ditto Wed Sep 13 11:11:29 2000 Jeffrey A Law (law@cygnus.com) * configure.in: Do not build byacc for hppa64. Provide paths to the X11 libraries for hppa64. 2000-09-02 Anthony Green * Makefile.in (all-gcc): Depend on all-zlib. (CLEAN_MODULES): Add clean-zlib. (ALL_MODULES): Add all-zlib. * configure.in (host_libs): Add zlib. 2000-08-25 Alexandre Oliva * configure.in (FLAGS_FOR_TARGET): Use $target_configdirs and $targargs to tell whether newlib is going to be built. * configure.in [disable-libstdcxx-v3] (libstdcxx_flags): Search $$r/TARGET_SUBDIR/libio for _G_config.h. 2000-08-14 Zack Weinberg * configure.in (libstdcxx_flags): Remove -isystem $$s/libio/stdio. * configure: Make enable_threads and enable_shared defaults explicit. Substitute enable_threads into generated Makefiles. * configure.in: Accept *-*-linux* not just *-*-linux-gnu*. * libtool.m4: Accept *-*-linux* not just *-*-linux-gnu*. 2000-08-02 Manfred Hollstein * configure.in: Re-enable all references to libg++ and librx. 2002-04-09 Loren James Rittle * configure.in: Add *-*-freebsd* configurations. 2002-04-07 Andrew Cagney * Makefile.in (do-tar-bz2): Delete rule. Replace with ... (do-tar, do-bz2): New rules. (taz): Update. Replace do-tar-bz2 with do-tar and do-bz2. (gdb-tar): New rule. (gdb-taz): Rewrite. Use gdb-tar and do-bz2. (insight_dejagnu.tar): New rule. (insight.tar): New rule. (gdb+dejagnu.tar): New rule. (gdb.tar): New rule. 2002-04-07 Andrew Cagney * MAINTAINERS: Update dejagnu/ 2002-03-16 Alexandre Oliva * ltmain.sh (relink_command): Fix typo in previous change. 2002-03-15 Alexandre Oliva * ltmain.sh (taglist): Initialized. Don't let `CC' tag out of it. (relink_command): Added --tag flags. (mode=install): If relinking fails; error out. 2002-03-12 Richard Henderson * Makefile.in (NOTPARALLEL): New. Use it instead of explicit .NOTPARALLEL tag. (do-check): Rename from check. (check): Allow parallel check. 2002-03-11 Richard Henderson * Makefile.in (.NOTPARALLEL): Add fake tag. 2002-03-07 H.J. Lu (hjl@gnu.org) * configure.in: Enable gprof for mips*-*-linux*. 2002-02-28 Alexandre Oliva * configure.in (libstdcxx_flags): Don't add libstdc++-v3 flags for libjava. (CXX_FOR_TARGET): Add -shared-libgcc for libstdc++-v3 and libjava. 2002-02-24 Andrew Cagney * texinfo/texinfo.tex: Update to version 2002-02-14.08. 2002-02-23 Daniel Jacobowitz * config.guess: Import from master sources, rev 1.232. * config.sub: Import from master sources, rev 1.246. 2002-02-23 Alexandre Oliva * Makefile.in (MAKEINFO): Don't assume makeinfo will be built just because its Makefile is there; test for the executable instead. 2002-02-09 Alexandre Oliva Contribute sh64-elf. 2000-12-01 Alexandre Oliva * configure.in: Added sh64-*-*. 2002-02-04 Jeff Johnston * COPYING.NEWLIB: Remove advertising clause from Berkeley and Red Hat licenses. 2002-02-01 Mo DeJong * Makefile.in: Add all-tix to deps for all-snavigator so that tix is built when building snavigator. 2002-02-01 Ben Elliston * config.guess: Import from master sources, rev 1.229. * config.sub: Import from master sources, rev 1.240. 2002-01-27 Daniel Jacobowitz From Steve Ellcey : * libtool.m4 (HPUX_IA64_MODE): Set to 32 or 64 based on ABI. (lt_cv_deplibs_check_method, lt_cv_file_magic_cmd, lt_cv_file_magic_test_file): Set to appropriate values for HP-UX IA64. * ltcf-c.sh (archive_cmds, hardcode_*): Ditto. * ltconfig (shlibpath_*, dynamic_linker, library_names_spec, soname_spec, sys_lib_search_path_spec): Ditto. 2002-01-26 Jason Thorpe * configure.in (*-*-netbsd*): New. Skip target-newlib, target-libiberty, and target-libgloss. Skip Java-related libraries if not supported for NetBSD on target CPU. 2002-01-23 Nick Clifton * configure.in: Import StrongARM and XScale target_configdirs from FSF GCC version. 2002-01-16 H.J. Lu (hjl@gnu.org) * config.guess: Import from master sources, rev 1.225. * config.sub: Import from master sources, rev 1.238. * MAINTAINERS: Updated notes on config.guess and config.sub. 2002-01-11 Steve Ellcey * configure.in (ia64*-*-hpux*): New target for IA64 HP-UX, ld and gdb are not supported. 2002-01-07 Jeff Johnston * Change reference to Cygnus Solutions to be Red Hat. 2002-01-07 Jeff Johnston * COPYING.NEWLIB: Update generic copyright date. 2002-01-07 Mark Salter * configure.in: Remove target-bsp and target-cygmon from arm builds. Allow target-libgloss to be built for arm, strongarm, and xscale. 2002-01-03 Ben Elliston * MAINTAINERS: Update URL for config.* scripts. 2001-12-18 Alan Modra * config.sub: Import latest version. * config.guess: Likewise. 2001-12-13 Thomas Fitzsimmons * configure.in (FLAGS_FOR_TARGET): Remove -nostdinc and -isystem options for i[3456]86-pc-linux* native builds. 2001-12-05 Laurent Guerby * MAINTAINERS: gcc adopts symlink-tree, refer more to libiberty. Import this patch from gcc: 2000-12-09 Laurynas Biveinis * symlink-tree: handle DOS-style absolute paths. 2001-11-28 DJ Delorie Zack Weinberg When build != host, create libiberty for the build machine. * Makefile.in (TARGET_CONFIGARGS, BUILD_CONFIGARGS): Replace CONFIG_ARGUMENTS. (ALL_BUILD_MODULES_LIST, BUILD_CONFIGDIRS, BUILD_SUBDIR): New variables. (ALL_BUILD_MODULES, CONFIGURE_BUILD_MODULES): New variables and rules. (all.normal): Depend on ALL_BUILD_MODULES. (CONFIGURE_TARGET_MODULES rule): Use TARGET_CONFIGARGS. (all-build-libiberty): Depend on configure-build-libiberty. * configure: Calculate and substitute proper value for ALL_BUILD_MODULES. * configure.in: Create the build subdirectory. Calculate and substitute TARGET_CONFIGARGS (formerly CONFIG_ARGUMENTS); also BUILD_SUBDIR and BUILD_CONFIGARGS (new). 2001-11-26 Geoffrey Keating * config.sub: Update to version 1.232 on subversion. 2001-11-20 Nick Clifton * Makefile.in (do-proto-toplev): Use msgfmt to generate .gmo files from .po files for a distribution. 2001-11-19 Hans-Peter Nilsson * COPYING.NEWLIB: Mention preserved notice in specific parts. 2001-11-13 Jeff Holcomb Merged from net gcc: 2001-07-30 Jeff Sturm * ltcf-c.sh: Use $objext, not $ac_objext. 2001-07-27 Mark Kettenis * ltcf-cxx.sh: Add support for GNU. 2001-07-22 Timothy Wall * ltcf-c.sh: Don't disable shared libraries for AIX5/IA64. Preserve default settings if using GNU tools with that configuration. * ltcf-cxx.sh: Ditto. * ltcf-gcj.sh: Ditto. 2001-07-21 Michael Chastain * ltconfig: Set max_cmd_len to a maximum of 512Kb, as it seems some HPUX 11.0 systems have trouble with 1MB. Mark as gcc-local. * ltmain.sh: Mark as gcc-local. 2001-11-13 Jeff Holcomb * Makefile.in (all-bison): Revert 2001-10-24. Don't depend on texinfo. 2001-11-12 Hans-Peter Nilsson * COPYING.NEWLIB: Add BSD-style license/copyright blurb for my work. 2001-11-08 Phil Edwards * configure.in (--enable-languages): Be more permissive about syntax. Check for empty lists better. Warn about $LANGUAGES. 2001-11-06 Hans-Peter Nilsson * Makefile.in (MAKEINFO): Use "missing" for makeinfo older than 4.0. 2001-10-24 Jeff Holcomb Makefile.in (all-bison): Don't depend on texinfo. 2001-10-03 Alan Modra * gettext.m4: Test po/POTFILES.in exists before trying to read. 2001-09-29 Alexandre Oliva * Makefile.in (configure-target-gperf): Depend on $(ALL_GCC_CXX). 2001-09-28 Hans-Peter Nilsson * config.sub, config.guess: Import latest from subversions. 2001-09-21 Alexandre Oliva * Makefile.in (AS_FOR_TARGET, LD_FOR_TARGET, DLLTOOL_FOR_TARGET, WINDRES_FOR_TARGET, AR_FOR_TARGET, RANLIB_FOR_TARGET, NM_FOR_TARGET): Don't use double quotes to avoid quotes nesting problems. (NATIVE_CHECK_MODULES): Ditto, just for consistency. (DO_X): Export only variables that are set. 2001-09-19 Ben Elliston * configure.in (sparc-sun-solaris2*): Don't use /usr/bin/which on Solaris when testing for the /usr/ucb/cc compiler; it has incorrect semantics. Use the shell built-in "type" command instead. 2001-09-15 Thiemo Seufer * config.sub: Reverted the earlier change, this version is not the master file. 2001-09-14 Thiemo Seufer * config.sub: Change machine triplets from mipsel*-* to mips*el-*. Add support for mips64. 2001-09-03 Jeff Holcomb * configure.in: Enable libstdc++-v3 for h8300 targets. 2001-08-30 Eric Christopher Jason Eckhardt * config.sub: Add support for mipsisa32. 2001-08-30 Eric Christopher * config.sub, config.guess: Import latest from subversions. 2001-08-20 Alan Modra * config.sub, config.guess: Import latest from subversions. 2001-07-26 DJ Delorie * MAINTAINERS: Clarify libiberty merge rules and procedures. 2001-06-19 Alan Modra * Makefile.in: Revert 2001-06-17. (VER): If AM_INIT_AUTOMAKE uses BFD_VERSION, get version from bfd/. 2001-06-17 H.J. Lu * Makefile.in (gas.tar.bz2): Pass TOOL=bfd PACKAGE=gas to make. (gas+binutils.tar.bz2): Likewise. (binutils.tar.bz2): Pass TOOL=bfd PACKAGE=binutils to make. Fri Jun 8 11:14:02 2001 Andrew Cagney * Makefile.in (VER): When present, extract the version number from the file version.in. 2001-06-08 Alexandre Oliva , Jeff Sturm * Makefile.in (AS_FOR_TARGET, LD_FOR_TARGET, NM_FOR_TARGET): If gcc/xgcc is built, use -print-prog-name to find out the program name to use. 2001-06-04 Mark Mitchell * ltcf-c.sh (archive_cmds, archive_expsym_cmds) [solaris, with_gcc]: Use `gcc -shared' to build a shared library. 2001-06-04 John David Anglin * ltcf-c.sh (archive_cmd) [hpux, with_gcc]: Use gcc to link shared archives. 2001-05-28 Simon Patarin * ltcf-cxx.sh (osf3/osf4/osf5): Support creation of C++ shared libraries when using g++ with native linker. 2001-05-28 Alexandre Oliva * ltconfig, ltmain.sh: Upgrade to libtool 1.4a 1.641.2.256. 2001-05-24 Tom Rix * configure.in : enable ld for aix 2001-05-22 Alexandre Oliva * ltcf-cxx.sh (allow_undefined_flag, no_undefined_flag) [aix4*|aix5*]: Prepend blank. 2001-05-20 Alexandre Oliva * ltconfig, ltmain.sh, libtool.m4, ltcf-c.sh, ltcf-cxx.sh, ltcf-gcj.sh: Upgraded to libtool 1.4a 1.641.2.254. Rebuilt a number of subdir/configure scripts to use the new libtool.m4. 2001-05-14 H.J. Lu * config.if (libc_interface): Set to -libc6.2- for cross compiling to Linux/glibc 2.2. 2001-05-03 Alexandre Oliva * configure.in (noconfigdirs) [*-cygwin*, *-mingw*, *-beos]: Disable libgcj. 2001-04-26 Alexandre Oliva * configure.in (noconfigdirs): Don't reset it from scratch in the target case; only append to it. 2001-04-26 Alexandre Oliva * configure.in (noconfigdirs) [hppa*-*-*, mips*-*-irix6*, sparc-*-solaris2.8]: Disable ${libgcj}. 2001-04-25 Alexandre Oliva * configure.in (libgcj_saved): Copy from $libgcj. (libgcj): Zero out if --enable-libgcj; add to noconfigdirs is --disable-libgcj. 2001-04-20 Alexandre Oliva * ltconfig, ltmain.sh, ltcf-cxx.sh: Upgraded to libtool 1.4a 1.641.2.228. 2001-04-12 Alexandre Oliva * ltconfig, ltmain.sh, libtool.m4, ltcf-c.sh, ltcf-cxx.sh, ltcf-gcj.sh: Upgraded to libtool 1.4a 1.641.2.226. 2001-04-01 Alexandre Oliva * Makefile.in (CXX_FOR_TARGET_FOR_RECURSIVE_MAKE, RECURSE_FLAGS): New macros. (bootstrap, cross): Use RECURSE_FLAGS. * configure.in: Subst CXX_FOR_TARGET_FOR_RECURSIVE_MAKE. 2001-03-27 Alexandre Oliva * configure.in (CXX_FOR_TARGET): Use xgcc for libstdc++-v3. 2001-03-23 Nick Clifton * README-maintainer-mode: Add note about inability to use "make distclean" in maintainer mode. 2001-03-22 Alexandre Oliva Re-installed: 2001-01-02 Laurynas Biveinis * ltcf-c.sh: Clear ac_cv_prog_cc_pic for DJGPP. Do not add '-DPIC' to ac_cv_prog_cc_pic for DJGPP. * ltcf-cxx.sh: Likewise. * ltcf-gcj.sh: Likewise. 2001-03-22 Philip Blundell * config.sub, config.guess: Import latest from subversions. 2001-03-22 Alexandre Oliva * ltconfig, ltmain.sh, libtool.m4, ltcf-c.sh, ltcf-cxx.sh, ltcf-gcj.sh: Upgraded to libtool 1.4a 1.641.2.198. 2001-03-20 Michael Chastain * Makefile.in: all-m4 depends on all-texinfo. 2001-03-08 Alexandre Oliva * Makefile.in (ALL_GCC, ALL_GCC_C, ALL_GCC_CXX): Set before use. 2001-02-22 Jeff Johnston * COPYING.NEWLIB: Remove DJ Delorie's address because it is no longer valid. 2001-02-16 Nick Clifton * configure.in (noconfigdirs): Allow configuration of texinfo for Cygwin hosts. 2001-02-09 Martin Schwidefsky * config.guess: Add linux target for S/390. * config.sub: Likewise. * configure.in: Likewise. 2001-02-06 Ben Elliston * configure: Output host type to stdout, not stderr. 2001-02-04 Michael Sokolov * config.guess: Import from subversions.gnu.org (revision 1.181). * config.sub: Import from subversions.gnu.org (revision 1.199). 2001-01-30 Alan Modra * config.guess: Handle hppa64-linux systems. 2001-01-27 Michael Sokolov * ltcf-cxx.sh (ac_cv_prog_cc_pic_works, ac_cv_prog_cc_static_works): Don't unset, it's non-portable and no longer necessary, set to empty instead. 2001-01-27 Michael Sokolov , Alexandre Oliva * ltconfig: Shell portability fix for the tagname validity check. 2001-01-27 Michael Sokolov * ltcf-cxx.sh: Use parentheses around eval $ac_compile. 2001-01-27 Alexandre Oliva * ltcf-c.sh (ld_shlibs) [aix5*]: Disable on unknown CPU types. * ltcf-cxx.sh, ltcf-gcj.sh: Likewise. 2001-01-24 Alexandre Oliva * ltmain.sh (TAG disable-shared, TAG disable-static): Make sure we keep at least one of build_libtool_libs or build_old_libs set to yes. 2001-01-24 Alexandre Oliva * ltcf-gcj.sh (lt_simple_link_test_code): Remove stray `(0)'. * libtool.m4 (_AC_LIBTOOL_GCJ): Pass $CPPFLAGS on. 2000-11-07 Philip Blundell * Makefile.in (ETC_SUPPORT): Also add configbuild.* and configdev.*. 2000-11-03 Philip Blundell * Makefile.in (ETC_SUPPORT): Add configure.texi and associated info files. 2001-01-15 Jeff Johnston * COPYING.NEWLIB: Put into source repository. 2001-01-15 Ben Elliston * configure.in (host_tools): Add sid. Always configure cgen. * Makefile.in (all-sid): New target. (check-sid, clean-sid, install-sid): Likewise. 2001-01-07 Andreas Jaeger * config.sub, config.guess: Update from subversions. 2000-12-12 Alexandre Oliva * configure.in: Disable language-specific target libraries for languages that aren't enabled. 2000-11-24 Nick Clifton * configure.in (xscale-elf): Add target. (xscale-coff): Add target. (c4x, c5x, tic54x): Move after ARM targets. 2000-11-23 Alexandre Oliva * ltcf-gcj.sh: Added file, required by 2000-11-18 merge. 2000-11-20 Ian Lance Taylor * ltcf-cxx.sh: Added file, required by 2000-11-18 merge. 2000-11-18 Alexandre Oliva * Makefile.in: Merge with GCC and libgcj. (ALL_GCC_C, ALL_GCC_CXX): New macros. Use them as dependencies of configure-target- when their configure scripts need the C or C++ library to have already been built to work properly. (do_proto_toplev): Set them to an empty string. 2000-11-18 Alexandre Oliva * Makefile.in (HOST_LIB_PATH, TARGET_LIB_PATH): New macros. (REALLY_SET_LIB_PATH): Use them. 2000-11-06 Christopher Faylor * config.sub: Add support for Sun Chorus 2000-11-02 Per Lundberg * config.sub: Add support for the *-storm-chaos OS. 2000-10-30 Stephane Carrez * configure.in (noconfigdirs): Don't compile some of the libraries for 68HC11 & 68hc12 targets. 2000-09-30 Alexandre Oliva * ltconfig, ltmain.sh, libtool.m4: Updated from libtool multi-language branch, to work around Solaris' /bin/sh bug. Rebuilt all affected `configure' scripts. 2000-09-25 Alexandre Oliva * Makefile.in (DEVO_SUPPORT): Added gettext.m4, libtool.m4 and ltcf-c.sh. 2000-09-12 Philip Blundell * config.sub, config.guess: Update from subversions. 2000-09-06 Alexandre Oliva * Makefile.in (all-zlib): Added dummy target. * ltconfig, ltmain.sh, libtool.m4, ltcf-c.sh: Updated from libtool multi-language branch. 2000-09-05 Alexandre Oliva * Makefile.in (all-bootstrap): Added all-texinfo and all-zlib. (bootstrap*): Depend on all-bootstrap. 2000-09-02 Alexandre Oliva , DJ Delorie * configure.in (FLAGS_FOR_TARGET): Use -nostdinc even for Canadian crosses, but add gcc/include to the header search path for them. 2000-08-31 Alexandre Oliva * ltconfig, ltmain.sh: Updated from libtool multi-language branch. * libtool.m4, ltcf-c.sh: Copied from libtool multi-language branch. * gettext.m4: New file, extracted from aclocal.m4. 2000-08-22 Alexandre Oliva * config-ml.in (CC, CXX): Avoid trailing whitespace. (LD_LIBRARY_PATH, SHLIB_PATH): Adjust for multilibs and export to sub-configures. 2000-08-20 Doug Evans * Makefile.in (ALL_MODULES): Add all-cgen. (CROSS_CHECK_MODULES,INSTALL_MODULES,CLEAN_MODULES): Similarily. (all-cgen): New target. (all-opcodes,all-sim): Depend on all-cgen. * configure.in (host_tools): Add cgen. Only configure cgen if --enable-cgen-maint. 2000-08-17 Alexandre Oliva * config-ml.in (CC, CXX): Don't introduce a leading space. 2000-08-16 Alexandre Oliva * configure.in (libstdcxx_flags): Use libstdc++-v3/src/libstdc++.INC. 2000-08-15 Alexandre Oliva * configure.in (libstdcxx_flags): Use libstdc++-v3/src/INCLUDES. 2000-08-11 Jason Merrill * configure.in (CC_FOR_TARGET, CHILL_FOR_TARGET, CXX_FOR_TARGET): Add -B$$r/gcc/ here. (FLAGS_FOR_TARGET): Not here. (CHILL_FOR_TARGET, CXX_FOR_TARGET): Don't check the list of languages. 2000-08-07 DJ Delorie * configure.in (FLAGS_FOR_TARGET): invert test for xgcc, should mean "if we're also building gcc, and it's a gcc that will run on the build machine, we want to use its includes instead of the system's default includes". 2000-08-03 Alexandre Oliva * configure.in (libstdcxx_flags): Don't use `"'. * config-ml.in: Adjust multilib search paths to the appropriate multilib tree. 2000-08-02 Alexandre Oliva * configure.in (CHILL_FOR_TARGET, CXX_FOR_TARGET): Convert blanks to commas in $LANGUAGES. 2000-08-01 Alexandre Oliva * configure.in (qCXX_FOR_TARGET): Use echo instead of expr. 2000-07-31 Alexandre Oliva * configure.in (qCXX_FOR_TARGET): Quote `&' characters in CXX_FOR_TARGET for sed. 2000-07-30 Alexandre Oliva * configure.in (CC_FOR_TARGET, CHILL_FOR_TARGET, CXX_FOR_TARGET): Do not override if already set in the environment or in configure. Don't duplicate $(FLAGS_FOR_TARGET) if it already appears in them. (FLAGS_FOR_TARGET): Don't use host directories on Canadian crosses. 2000-07-27 Alexandre Oliva * Makefile.in (FLAGS_FOR_TARGET): New macro. (GCC_FOR_TARGET): Use it. (CC_FOR_TARGET, CXX_FOR_TARGET, CHILL_FOR_TARGET): Now defined... * configure.in: ... here. (FLAGS_FOR_TARGET): Define. Add ld build dir to -L path. (libstdcxx_flags): Define and append to CXX_FOR_TARGET. 2000-07-24 Alexandre Oliva * Makefile.in (configure-target-libf2c): Depend on $(ALL_GCC). (configure-target-libchill, configure-target-libobjc): Likewise. * configure.in: Use the same cache file for all target libs. * config-ml.in: But different cache files per multilib variant. 2000-07-23 Michael Sokolov * configure (topsrcdir): Don't use dirname. 2000-07-20 Jason Merrill * configure.in: Remove all references to libg++ and librx. * configure, configure.in, Makefile.in: Unify gcc and binutils. 2000-07-20 Hans-Peter Nilsson * config.sub: Update to subversions version 2000-07-06. 2000-07-12 Andrew Haley * configure.in (host_makefile_frag): Use mh-ia64pic on IA-64 hosts. (target_makefile_frag): Use mt-ia64pic on IA-64 targets. 2000-07-07 Phil Edwards * symlink-tree: Check number of arguments. 2000-06-06 Andrew Cagney * texinfo/texinfo.tex: Update to version 2000-05-28.15. 2000-07-05 Jim Wilson * Makefile.in (CXX_FOR_TARGET): Add libstdc++ to the library search path for a g++ extracted from the build tree. This will allow link tests run by configure scripts in subdirectories to succeed. 2000-07-01 Koundinya K * ltconfig: Add support for mips-dde-sysv4.2MP 2000-06-28 Corinna Vinschen * ltconfig: Check for host_os beeing one of `cygwin', `mingw' or `os2'. Force ac_cv_exeext to be ".exe" in that case. 2000-06-19 Timothy Wall * configure.in (noconfigdirs): Set noconfigdirs for tic54x target. * config.sub: Add tic54x target. 2000-06-07 Phillip Thomas * README-maintainer-mode: New file: Contains notes on using --enable-maintainer-mode with binutils. 2000-05-29 Andrew Cagney * texinfo/texinfo.tex: Update. Version from makeinfo 4.0. 2000-05-30 Andrew Cagney * config.sub: Import CVS version 1.167 Tue May 30 09:00:07 2000. * config.guess: Import CVS version 1.148 Tue May 30 09:00:06 2000 20000-05-21 H.J. Lu (hjl@gnu.org) * Makefile.in (CC_FOR_TARGET): Make sure as/ld in the gcc directory are used if they exist. Make sure $(build_tooldir)/include is searched for header files, $(build_tooldir)/lib/ for library files. (GCC_FOR_TARGET): Likewise. (CXX_FOR_TARGET): Likewise. 2000-05-18 Jeffrey A Law (law@cygnus.com) * configure.in (hppa*64*-*-*): Do build ld for this configuration. 2000-05-17 Alexandre Oliva * Makefile.in (configure-target-libiberty): Depend on configure-target-newlib. 2000-05-16 Alexandre Oliva * configure.in, Makefile.in: Merge all libffi-related configury stuff from the libgcj tree. 2000-05-16 Andrew Cagney Thu Apr 27 11:01:48 2000 Andrew Cagney : * Makefile.in (do-tar-bz2, do-md5sum): Skip CVS directories. 2000-05-16 Andrew Cagney Wed Apr 26 17:03:53 2000 Andrew Cagney : * Makefile.in (do-djunpack): New target. Update djunpack.bat with current version information. Add to proto-toplev directory. (gdb-taz): Build do-djunpack. 2000-05-15 David Edelsohn * configure.in: Special case powerpc*-*-aix* target_makefile_frag. 2000-05-13 Alexandre Oliva * ltmain.sh: Preserve in relink_command any environment variables that may affect the linker behavior. 2000-05-12 Jeffrey A Law (law@cygnus.com) * config.sub (basic_machine): Recognize hppa64 as a valid cpu type. 2000-05-10 Jim Wilson * configure.in (ia64*-*-elf*): Add gdb and friends to noconfigdirs. 2000-05-08 Eli Zaretskii * djunpack.bat: Change the Sed script to replace @V@ in fnchange.lst with the version name. 2000-05-01 Benjamin Kosnik * config.if: Tweak. 2000-04-23 Eli Zaretskii * djunpack.bat: New file. 2000-04-19 Andrew Cagney * Makefile.in (taz, gdb-taz, gas.tar.bz2, binutils.tar.bz2, gas+binutils.tar.bz2, libg++.tar.bz2, gnats.tar.bz2, gdb.tar.bz2, dejagnu.tar.bz2, gdb+dejagnu.tar.bz2, insight.tar.bz2, insight+dejagnu.tar.bz2, newlib.tar.bz2): Pass MD5PROG to sub-make. 2000-04-16 Dave Pitts * config.sub (case $basic_machine): Change default for "ibm-*" to "openedition". 2000-04-12 Andrew Cagney * Makefile.in (gdb-taz): New target. GDB specific archive. (do-md5sum): New target. (MD5PROG): Define. (PACKAGE): Default to TOOL. (VER): Default to a shell script. (taz): Rewrite target. Move real work to do-proto-toplev. Include md5 checksum generation. (do-proto-toplev): New target. Create $(PACKAGE)-$(VER) link. (do-tar-bz2): Delete creation of $(PACKAGE)-$(VER) link. (gdb.tar.bz2, dejagnu.tar.bz2, gdb+dejagnu.tar.bz2, insight.tar.bz2): Use gdb-taz to create archive. 2000-04-07 Andrew Cagney * configure (warn_cflags): Delete. 2000-04-05 Benjamin Kosnik Martin v. Loewis * configure.in (enable_libstdcxx_v3): Add. (target_libs): Add bits here to switch between libstdc++-v2 and libstdc++-v3. * config.if: And this file too. * Makefile.in: Add libstdc++-v3 targets. 2000-04-05 Michael Meissner * config.sub (d30v): Add d30v as a basic machine type. 2000-03-29 Jason Merrill * configure.in: -linux-gnu*, not -linux-gnu. 2000-03-03 Andrew Cagney * Makefile.in (taz): Set PACKAGE to TOOL when not defined. (do-tar-bz2): Replace TOOL with PACKAGE. (gdb.tar.bz2): Remove GDBTK from GDB package. (gdb+dejagnu.tar.bz2, insight.tar.bz2, insight+dejagnu.tar.bz2, dejagnu.tar.bz2): New packages. 2000-02-27 Andreas Jaeger * configure.in: Add entry for mips*-*-linux*, move catch all *-*-*linux* entry below this one. 2000-02-27 Ian Lance Taylor * ltconfig, ltmain.sh: Update to libtool 1.3.4. 2000-02-24 Nick Clifton * config.sub: Support an OS of "wince". 2000-02-24 Andrew Cagney * config.guess, config.sub: Updated to match config's 2000-02-15 version. 2000-02-23 Linas Vepstas * config.sub: Add support for Linux/IBM 370. * configure.in: Likewise. 2000-02-22 Nick Clifton * configure.in: Add mips-pe, sh-pe and arm-wince-pe targets. 2000-02-20 Christopher Faylor * config.guess: Guess "cygwin" rather than "cygwin32". 2000-02-16 Kaveh R. Ghazi * configure (gcc_version): When setting, narrow search to lines containing `version_string'. 2000-02-15 Denis Chertykov * config.sub: Add support for avr target. 2000-02-01 Hans-Peter Nilsson * config.sub: Add mmix-knuth-mmixware. 2000-01-27 Christopher Faylor * Makefile.in (CC_FOR_TARGET): Add new winsup directory structure stuff to -L library search. (CXX_FOR_TARGET): Ditto. (CROSS_CHECK_MODULES): Fix spelling mistake. 2000-01-24 Mark Mitchell * Makefile.in (CXX_FOR_TARGET): Use g++, not xgcc, to invoke the C++ compiler. 2000-01-12 Richard Henderson * configure.in: Don't build some bits for beos. 2000-01-12 Joel Sherrill (joel@OARcorp.com) * Makefile.in (CC_FOR_TARGET): Use newlib libraries as well as include files. 2000-01-06 Geoff Keating * configure.in: Use mt-aix43 to handle *_TARGET defs, not mh-aix43. 1999-12-14 Richard Henderson * config.guess (alpha-osf, alpha-linux): Detect ev67. * config.sub: Accept alphaev[78], alphaev8. 1999-12-03 Alexandre Oliva * config.guess, config.sub: Update from autoconf. Tue Nov 23 00:57:41 1999 Rainer Orth * config-ml.in (sparc*-*-*): Disable sparcv9 support if the necessary libraries are missing. 1999-10-25 Andreas Schwab * configure: Fix quoting inside arguments of eval. 1999-10-21 Nick Clifton * config-ml.in: Allow suppression of some ARM multilibs. Tue Sep 7 23:33:57 1999 Linas Vepstas * config.guess: Add OS/390 match pattern. * config.sub: Add mvs, openedition targets. * configure.in (i370-ibm-opened*): New. 1999-09-04 Steve Chamberlain * config.sub: Add support for configuring for pj. 1999-08-31 Nick Clifton * config.sub (maybe_os): Add support for configuring for fr30. 1999-08-25 Nick Clifton * configure.in: Do not configure or build ld for AIX platforms. ld is known to be broken on these platforms. Wed Aug 25 01:12:25 1999 Rainer Orth * config-ml.in: Pass compiler flag corresponding to multidirs to subdir configures. 1999-08-09 Ian Lance Taylor * Makefile.in (LDFLAGS): Define. 1999-08-08 Mumit Khan * configure.in (i[3456]-*-mingw32*): Don't put gprof in noconfigdirs. (*-*-cygwin*): Likewise. 1999-08-08 Ian Lance Taylor * mkdep: New file. * Makefile.in (GAS_SUPPORT_DIRS): Add mkdep. (BINUTILS_SUPPORT_DIRS): Add mkdep. From Eli Zaretskii : * configure (tmpfile): Change cONf$$ to cNf$$ to avoid an overly long file name when using DJGPP on MS-DOS. Wed Aug 4 02:07:14 1999 Jeffrey A Law (law@cygnus.com) * config.sub (vxworks case): Use os=-vxworks, not os=vxworks. 1999-07-30 Alan Modra * Makefile.in (check-target-libio): Remove all-target-libstdc++ dependency as this causes "make check" to globally "make all" Tue Jun 22 23:45:18 1999 Tom Tromey * configure.in (target_libs): Added target-zlib. * Makefile.in (ALL_TARGET_MODULES): Added zlib. (CONFIGURE_TARGET_MODULES): Likewise. (CHECK_TARGET_MODULES): Likewise. (INSTALL_TARGET_MODULES): Likewise. (CLEAN_TARGET_MODULES): Likewise. (configure-target-zlib): New target. (all-target-zlib): Likewise. (all-target-libjava): Depend on all-target-zlib. (configure-target-libjava): Depend on configure-target-zlib. * Makefile.in (configure-target-libjava): Depend on configure-target-newlib. (configure-target-boehm-gc): New target. (configure-target-qthreads): New target. * configure.in (target_libs): Added target-qthreads. * Makefile.in (ALL_TARGET_MODULES): Added qthreads. (CONFIGURE_TARGET_MODULES): Likewise. (CHECK_TARGET_MODULES): Likewise. (INSTALL_TARGET_MODULES): Likewise. (CLEAN_TARGET_MODULES): Likewise. (all-target-qthreads): New target. (configure-target-libjava): Depend on configure-target-qthreads. (all-target-libjava): Depend on all-target-qthreads. * Makefile.in (ALL_TARGET_MODULES): Added libjava, boehm-gc. (CONFIGURE_TARGET_MODULES): Likewise. (CHECK_TARGET_MODULES): Likewise. (INSTALL_TARGET_MODULES): Likewise. (CLEAN_TARGET_MODULES): Likewise. (all-target-libjava): New target. (all-target-boehm-gc): Likewise. * configure.in (target_libs): Added libjava, boehm-gc. 1999-07-22 Ian Lance Taylor * Makefile.in (binutils.tar.bz2): Don't pass makeall.bat and configure.bat in SUPPORT_FILES. (gas+binutils.tar.bz2): Likewise. * makeall.bat: Remove; obsolete. 1999-07-21 Ian Lance Taylor From Mark Elbrecht: * configure.bat: Remove; obsolete. 1999-07-11 Ian Lance Taylor * configure: Add -W -Wall to the default CFLAGS when compiling with gcc. Thu Jul 8 12:32:23 1999 John David Anglin * configure.in: Build ld, binutils & gas for hppa*-*-linux-gnu*. 1999-06-30 Mark Mitchell * configure.in: Build ld on IRIX6. 1999-06-12 Ian Lance Taylor * Makefile.in: Change distribution targets to use bzip2 instead of gzip. (TEXINFO_SUPPORT): Set to just texinfo/texinfo.tex. (taz): Don't use texinfo/gpl.texinfo or texinfo/lgpl.texinfo. 1999-06-04 Nick Clifton * config.sub: Add mcore target. 1999-05-30 Cort Dougan * config.guess (ppc-*-linux-gnu): Also use ld emul elf32ppclinux. 1999-05-25 H.J. Lu (hjl@gnu.org) * config.guess (dummy): Changed to $dummy. 1999-05-24 Nick Clifton * config.sub: Tidied up case statements. 1999-05-22 Ben Elliston * config.guess: Handle NEC UX/4800. Contributed by Jiro Takabatake . * config.guess: Merge with FSF version. Future changes will be more accurately recorded in this ChangeLog. * config.sub: Likewise. 1999-05-20 Stephen L Moshier * Makefile.in (GCC_FOR_TARGET): Add -I$(build_tooldir)/include. 1999-04-30 Tom Tromey * ltmain.sh: [mode link] Always use CC given by ltconfig. 1999-04-23 Tom Tromey * ltconfig, ltmain.sh: Update to libtool 1.2f. 1999-04-20 Drew Moseley * configure.in (noconfigdirs): Don't build libstub for arm-elf targets. (noconfigdirs): Don't build any bsp stuff for for arm-oabi targets. Bad merge removed these two changes. Tue Apr 13 22:50:54 1999 Donn Terry (donn@interix.com) Martin Heller (Ing.-Buero_Heller@t-online.de) * config.guess (interix Alpha): Add. 1999-04-11 Richard Henderson * configure.in (i?86-*-beos*): Do config gperf; don't config gdb, newlib, or libgloss. 1999-04-11 Alexandre Oliva * config-ml.in: On mips*-*-*, if multidirs contains mabi=64, try to link a trivial program with -mabi=64. If it fails, remove mabi=64 from multidirs. 1999-04-10 Philipp Thomas (kthomas@gwdg.de) * config.sub: Set basic_machine to i586 when target_alias = k6-*. 1999-04-08 Nick Clifton * config.sub: Add support for mcore targets. 1999-04-07 Michael Meissner * configure.in (d30v-*): Use config/mt-d30v as makefile fragment, not mt-ospace, in order to shut up assembler warning about using symbols that are named the same as registers. 1999-04-07 Drew Moseley * Makefile.in (all-target-cygmon): Added all-target-bsp to the dependency list for all-target-cygmon. 1999-04-05 Doug Evans * config-ml.in: Check $host, not $target, for selective multilibs. (arm-*-*): Allow disabling of biendian, h/w fp, 26 bit apcs, thumb interworking, and underscore prefix multilibs. 1999-04-04 Ian Lance Taylor * missing: Update to version from current automake. Fri Apr 2 15:11:32 1999 H.J. Lu (hjl@gnu.org) * configure (gxx_include_dir): Removed. * configure.in (gxx_include_dir): Handle it. * Makefile.in: Likewise. 1999-03-29 Gavin Romig-Koch * config.sub (mips64vr4111,mips64vr4111el) Add. 1999-03-21 Ben Elliston * config.guess: Correct typo for detecting ELF on FreeBSD. Thu Mar 18 00:17:50 1999 Mark Elbrecht * configure.in (pc-msdosdjgpp): Set host_makefile_frag to config/mh-djgpp. Thu Mar 11 18:37:23 1999 Drew Moseley * Makefile.in (all-target-bsp): Added all-gcc all-binutils and all-target-newlib to dependency list for all-target-bsp. Thu Mar 11 01:19:31 1999 Mumit Khan * config.sub: Add i386-uwin support. * config.guess: Likewise. Thu Mar 11 01:07:55 1999 Franz Sirl * configure.in: cleanup, add mh-*pic handling for arm, special case powerpc*-*-aix* Wed Mar 10 18:35:07 1999 Jeff Johnston * configure.in (noconfigdirs): Removed target-libgloss so libnosys.a can be built. Wed Mar 10 17:39:09 1999 Drew Moseley * configure.in: Added bsp support to arm-*-coff and arm-*-elf targets. 1999-03-02 Nick Clifton * config.sub: Rename CYGNUS LOCAL to EGCS LOCAL 1999-02-28 Geoffrey Noer * config.sub: Check for "cygwin*" rather than "cygwin32*" 1999-02-24 Nick Clifton * config.sub: Fix typo in arm recognition. 1999-02-24 Drew Moseley * configure.in (noconfigdirs): Changed target_configdirs to include target-bsp only for m68k-*-elf* and m68k-*-coff* rather than m68k-*-* since it is not known to work on m68k-aout. Ditto for arm-*-*oabi. 1999-02-24 Stan Shebs * configure.in (*-*-windows*): Remove, no longer used. 1999-02-19 Ben Elliston * config.guess: Automatically recognise ELF on FreeBSD. From Niall Smart and improved by Andrew Cagney. 1999-02-18 Marc Espie * config.guess: Recognize openbsd-*-hppa. 1999-02-17 H.J. Lu (hjl@gnu.org) * Makefile.in (REALLY_SET_LIB_PATH): Append $$$(RPATH_ENVVAR) only if it is not empty. 1999-02-17 Nick Clifton Patch from: Scott Bambrough * config.guess: Modified to recognize uname's armv* syntax. * config.sub: Modified to recognize uname's armv* syntax. 1999-02-17 Mark Salter * configure.in: Added target-bsp for sparclite. 1999-02-08 Richard Henderson * config.sub: Recognize alphapca5[67] and up to alphaev8. 1999-02-08 Nick Clifton * configure.in: Add support for strongarm port. * config.sub: Add support for strongarm target. 1999-02-07 Mumit Khan * configure.in (*-*-cygwin32*): Use config/mh-cygwin instead of the old name config/mh-cygwin32. Enable texinfo. 1999-02-04 Ian Lance Taylor * configure.in: Do build ld for ix86 Solaris. 1999-02-02 Jim Wilson * Makefile.in (EXTRA_GCC_FLAGS): Set AR to $AR instead of $AR_FOR_TARGET. Likewise for RANLIB. 1999-02-02 Catherine Moore * config.sub (oabi): Recognize. * configure.in (arm-*-oabi): Handle. 1999-01-30 Robert Lipe (robertlipe@usa.net) * config.guess: Improve detection of i686 on UnixWare 7. 1999-01-30 Mumit Khan * config.guess: Add support for i386-pc-interix. * config.sub: Likewise. * configure.in: Likewise. 1999-01-18 Christopher Faylor * Makefile.in: Remove unneeded all-target-libio from from all-target-winsup target since it is now unneeded. Add all-target-libtermcap in its place since it is now needed. 1998-12-30 Christopher Faylor * configure.in: makefile stub for cygwin target is probably unnecessary. Remove it for now. 1998-12-30 Christopher Faylor * configure.in: libtermcap.a should be built when cygwin is the target as well as the host. * config.guess: Allow mixed case in cygwin uname output. * Makefile.in: Add libtermcap target. 1998-12-23 Jeffrey A Law (law@cygnus.com) * config.sub: Clean up handling of hppa2.0. 1998-12-22 Rodney Brown (rodneybrown@pmsc.com) * config.guess: Use C code to identify more HP machines. Thu Dec 17 01:22:30 1998 Jeffrey A Law (law@cygnus.com) * config.sub: Handle hppa2.0. Tue Dec 15 17:02:58 1998 Bob Manson * configure.in: Add cygmon for x86-coff and x86-elf. Configure cygmon for all sparclite targets, regardless of object format. 1998-12-15 Mark Salter * configure.in: Added target-bsp for several target architectures. * Makefile.in: Added rules for bsp. Fri Dec 4 01:34:02 1998 Jeffrey A Law (law@cygnus.com) * config.guess: Improve detection of hppa2.0 processors. Fri Dec 4 01:33:05 1998 Niall Smart * config.guess: Recognize FreeBSD using ELF automatically. 1998-11-26 Manfred Hollstein * configure (skip-this-dir): Add handling for new shell script, which might be created by a sub-directory's configure to indicate, this particular directory is "unwanted". * Makefile.in ($(CONFIGURE_TARGET_MODULES)): Likewise. Wed Nov 18 18:28:45 1998 Geoffrey Noer * ltconfig: import from libtool, after changing libtool to account for the cygwin name change. Wed Nov 18 18:09:14 1998 Geoffrey Noer * Makefile.in: CC_FOR_TARGET and CXX_FOR_TARGET should also include newlib/libc/sys/cygwin and newlib/libc/sys/cygwin32. Wed Nov 18 20:13:29 1998 Christopher Faylor * configure.in: Add libtermcap to list of cygwin dependencies. 1998-11-17 Geoffrey Noer * Makefile.in: modify CC_FOR_TARGET and CXX_FOR_TARGET so that they include winsup/include when it's a cygwin target. 1998-11-12 Tom Tromey * configure.in (host_tools): Added zip. * Makefile.in (all-target-libjava): Depend on all-zip. (all-zip): New target. (ALL_MODULES): Added all-zip. (NATIVE_CHECK_MODULES): Added check-zip. (INSTALL_MODULES): Added install-zip. (CLEAN_MODULES): Added clean-zip. 1998-11-12 Geoffrey Noer * Makefile.in: lose "32" from comment about cygwin. 1998-11-05 Nick Clifton * configure.in: Use -Os to build target libraries for the fr30. 1998-11-04 Dave Brolley * config.sub: Add fr30. 1998-11-02 Geoffrey Noer * configure.in: drop "32" from config/mh-cygwin32. Check cygwin* instead of cygwin32*. * config.sub: Check cygwin* instead of cygwin32*. 1998-10-22 Robert Lipe * config.guess: Match any version of Unixware7. 1998-10-20 Syd Polk * Makefile.in configure.in: Add the ability to use tcl8.1 and tk8.1 if desired. 1998-10-18 Jeffrey A Law (law@cygnus.com) * config.if (cxx_interface, libstdcxx_interface): Do not try to set these if the appropriate directories and files to not exist. 1998-10-14 Jeffrey A Law (law@cygnus.com) * Makefile.in (DEVO_SUPPORT): Add config.if. 1998-10-13 Manfred Hollstein * configure: Add pattern to replace "build_tooldir"'s definition in the generated Makefile with "tooldir"'s actual value. Tue Oct 13 09:17:06 1998 Jeffrey A Law (law@cygnus.com) * config.sub: Bring back lost sparcv9. * Makefile.in (all-snvavigator): Remove all-flexlm dependency. Mon Oct 12 12:09:44 1998 Jeffrey A Law (law@cygnus.com) * Makefile.in (CHILL_FOR_TARGET): Mirror recent changes to CC_FOR_TARGET and friends. Mon Oct 12 12:09:30 1998 Alexandre Oliva * Makefile.in (build_tooldir): New variable, same as tooldir. (CC_FOR_TARGET, GCC_FOR_TARGET, CXX_FOR_TARGET): Add -B$(build_tooldir)/bin/. (BASE_FLAGS_TO_PASS): Pass build_tooldir down. Wed Sep 30 22:20:50 1998 Robert Lipe * config.sub: Add support for i[34567]86-pc-udk. * configure.in: Likewise. Wed Sep 30 19:23:48 1998 Geoffrey Noer * Makefile.in: add bzip2 package building bits for user tools module * configure.in: ditto Wed Sep 30 03:00:05 1998 Jeffrey A Law (law@cygnus.com) * Makefile.in (TARGET_CONFIGDIRS): Add libobjc. (ALL_TARGET_MODULES): Add all-target-libobjc. (CONFIGURE_TARGET_MODULES, CHECK_TARGET_MODULES): Similarly. (INSTALL_TARGET_MODULES, CLEAN_TARGET_MODULES): Similarly. (all-target-libchill): Add dependencies. * configure.in (target_libs): Add libchill. 1998-09-30 Manfred Hollstein * configure.in (target_subdir): Remove duplicate line. Tue Sep 29 22:45:41 1998 Felix Lee * Makefile.in (all-automake): fix dependencies. Mon Sep 28 04:04:27 1998 Jeffrey A Law (law@cygnus.com) * configure.in: Minor cleanups for building in the $(target_alias) subdir. 1998-09-22 Jim Wilson * Makefile.in (bootstrap): Set r and s before make all. Use BASE_FLAGS_TO_PASS in make all. (cross): Likewise. 1998-09-20 Mark Mitchell * Makefile.in (bootstrap): Pass TARGET_FLAGS_TO_PASS to `make all'. Sun Sep 20 00:13:02 1998 Richard Henderson * config.sub: Fix typo in last change. 1998-09-19 Michael Hayes * config.sub: Add support for C4x target. * configure.in: Likewise. 1998-09-13 David S. Miller * config.sub: Recognize sparcv9 just like sparc64. Wed Sep 9 15:44:52 1998 Robert Lipe * config.guess: Match "Pent II" or "PentII" for OpenServer. Tue Sep 8 01:18:39 1998 Jeffrey A Law (law@cygnus.com) * config.guess: Correctly identify Pentium II sco boxes. * config.guess: Fix "tr" code. From Weiwen Liu. Sat Sep 5 13:56:52 1998 John Hughes * configure.in: Do not assume x86-svr4 or x86-unixware can handle stabs. Sat Sep 5 02:12:02 1998 Jeffrey A Law (law@cygnus.com) * Makefile.in (TARGET_CONFIGDIRS): Add libchill. (ALL_TARGET_MODULES): Add all-target-libchill. (CONFIGURE_TARGET_MODULES, CHECK_TARGET_MODULES): Similarly. (INSTALL_TARGET_MODULES, CLEAN_TARGET_MODULES): Similarly. (all-target-libchill): Add dependencies. * configure.in (target_libs): Add libchill. Sun Aug 30 22:27:02 1998 Lutz Wohlrab * config.guess: Avoid assumptions about "tr" behaves when LANG is set to something other than English. Sun Aug 30 22:14:44 1998 H.J. Lu (hjl@gnu.org) * configure (gxx_include_dir): Changed to '${prefix}/include/g++'-${libstdcxx_interface}. * config.if: New to determine the interfaces. Sun Aug 30 21:15:19 1998 Mark Klein (mklein@dis.com) * config.guess: Detect and handle MPE/IX. * config.sub: Deal with MPE/IX. Sat Aug 29 14:32:55 1998 David Edelsohn * configure.in: Use mh-aix43. 1998-07-29 Manfred Hollstein * configure: Fix --without/--disable cases for gxx-include-dir. Fri Aug 28 12:28:26 1998 Per Bothner * mdata-sh: Imported. Needed for automake support. Thu Aug 13 12:49:29 1998 H.J. Lu * Makefile.in (taz): Try "chmod -R og=u ." before "chmod og=u `find . -print`". Fri Jul 31 09:38:33 1998 Catherine Moore * configure.in: Add arm-elf and thumb-elf support. Mon Jul 27 16:23:58 1998 Doug Evans * Makefile.in: Undo previous patch. Fri Jul 24 19:55:24 1998 Doug Evans * Makefile.in (INSTALL_TARGET): Move EXTRA_TARGET_HOST_INSTALL_MODULES to here ... (install-no-fixedincludes): and here (INSTALL_MODULES): ... from here. Fri Jul 24 17:01:42 1998 Ian Lance Taylor * config.sub: Merge with FSF. * config.guess: Merge with FSF. Fri Jul 24 08:43:36 1998 Doug Evans * configure (extraconfigdirs): New variable. (SUBDIRS): Add extraconfigdirs and recurse on them too. * Makefile.in (all): Move higher in file. (EXTRA_TARGET_HOST_ALL_MODULES): New variable. (EXTRA_TARGET_HOST_{INSTALL,CHECK}_MODULES): New variables. (ALL_MODULES): Add EXTRA_TARGET_HOST_ALL_MODULES. (CROSS_CHECK_MODULES): Add EXTRA_TARGET_HOST_CHECK_MODULES. (INSTALL_MODULES): Add EXTRA_TARGET_HOST_INSTALL_MODULES. 1998-07-23 Brendan Kehoe * Makefile.in (all-target-libjava): Depend on all-gcc and all-target-newlib. (configure-target-libjava): Depend on $(ALL_GCC). Sat Jul 18 14:32:43 CDT 1998 Robert Lipe * config.guess: (*-pc-sco3.2v5) Add detection for Pentium II. (*-pc-unixware7) Add detection for Pentium II, Pentium Pro. Fri Jul 17 13:30:18 1998 Ian Lance Taylor * ylwrap: Change absolute path checks to check for DOS style path names. * ylwrap: Don't use a full path name if the source file is in the same directory. From hjl@lucon.org (H.J. Lu). * config-ml.in: Default to being verbose, to match Feb 18 change to configure. Thu Jul 16 12:29:51 1998 Ian Lance Taylor Brought over from egcs: Sat Jun 27 22:46:32 1998 Jeffrey A Law (law@cygnus.com) * configure.in (target_subdir): Set to ${target_alias} instead of "libraries". Mon Sep 1 16:45:44 1997 Jim Wilson * configure.in (target_subdir): Set to libraries if enable_multilib. Wed Jul 15 01:00:54 1998 Ian Lance Taylor * Makefile.in ($(CONFIGURE_TARGET_MODULES)): If there are any multilibs, force reconfiguration the first time we create multilib.out in a subdirectory, in case TARGET_SUBDIR is `.'. Tue Jul 14 23:41:03 1998 Ian Lance Taylor * configure.in: Strip any --no option from CONFIG_ARGUMENTS, to avoid confusion with --no-recursion. Tue Jul 14 15:37:41 1998 Geoffrey Noer * configure.in: Win32 hosts shouldn't use install -x * install-sh: remove -x option, and special .exe-handling hack. Tue Jul 14 15:28:41 1998 Richard Henderson * config.guess: Recognize i586-pc-beos. * configure.in: Don't build some bits for beos. Tue Jul 14 13:22:18 1998 Ian Lance Taylor * configure: If CC is set but CFLAGS is not, and CC is gcc, make CFLAGS default to -O2. * ltmain.sh: Add some hacks to make SunOS --enable-shared work when using GNU ld. Fri Jul 10 13:18:23 1998 Ian Lance Taylor * ltmain.sh: Correct install when using a different shell. Tue Jul 7 15:24:38 1998 Ian Lance Taylor * ltconfig, ltmain.sh: Update to libtool 1.2b. Thu Jul 2 13:57:36 1998 Klaus Kaempf * makefile.vms: Update to build binutils/makefile.vms. Add install target. Wed Jul 1 16:45:21 1998 Ian Lance Taylor * ltconfig: Update to correct AIX handling. Sat Jun 27 22:46:32 1998 Jeffrey A Law (law@cygnus.com) * Makefile.in (BASE_FLAGS_TO_PASS): Add TARGET_SUBDIR. * configure.in (target_subdir): Set to ${target_alias} instead of "libraries". 1998-06-26 Manfred Hollstein * Makefile.in (BASE_FLAGS_TO_PASS): Add gcc_version_trigger. (Makefile): Depend on $(gcc_version_trigger). * configure (gcc_version): Change default initializer to empty string. (gcc_version_trigger): New variable; pass this variable down to subdir configures to enable them checking gcc's version themselves. Emit make macros for both gcc_version vars. (topsrcdir): Initialize reliably. (recursion line): Remove --with-gcc-version=${gcc_version}. 1998-06-24 Manfred Hollstein * configure (enable_version_specific_runtime_libs): Implement new flag --enable-version-specific-runtime-libs which installs C++ runtime stuff in $(libsubdir); emit definition in each generated Makefile. (gxx_include_dir): Initialize depending on $enable_version_specific_runtime_libs. 1998-06-24 Manfred Hollstein * configure (gcc_version): Initialize properly depending on how and where configure is started. (recursion line): Pass a --with-gcc-version=${gcc_version} to configures in subdirs. Wed Jun 24 16:01:59 1998 John Metzler * configure.in (noconfigdirs): Add configure pattern for mips tx39 cygmon Tue Jun 23 22:42:32 1998 Mark Alexander * configure.in: Add cygmon and libstub support for mn10200. 1998-06-19 Manfred Hollstein * configure (gcc_version): Add new variable describing the particular gcc version we're building. * Makefile.in (libsubdir): Add new macro for the directory in which the compiler finds executables, libraries, etc. (BASE_FLAGS_TO_PASS): Pass down gcc_version, target_alias and libsubdir. Fri Jun 19 02:36:59 1998 Alexandre Oliva * Makefile.in (local-clean): Remove *.log. (warning.log): Built with warn_summary from build.log. (mail-report.log): Run test_summary. (mail-report-with-warnings.log): Run test_summary including warning.log in the report. Thu Jun 18 11:26:03 1998 Robert Lipe * config.guess: Detection of Pentium II for *-sco-3.2v5*. Mon Jun 15 14:53:54 1998 Andrew Cagney * Makefile.in (grep): Grep no longer depends on libiberty. Fri Jun 12 14:03:34 1998 Syd Polk * Makefile.in: all-snavigator needs all-libgui. Thu Jun 11 19:43:47 1998 Mark Alexander * configure.in: Add cygmon and libstub support for mn10300. Wed Jun 10 11:19:47 1998 Ian Lance Taylor * missing: Update to version from automake 1.3. * ltmain.sh: On installation, don't get confused if the same name appears more than once in the list of library names. Wed Jun 3 14:51:42 1998 Ian Lance Taylor * config.sub: Accept m68060 and m5200 as CPU names. Mon Jun 1 17:25:16 1998 Ian Lance Taylor * configure: Use && rather than using -a in test, because odd strings can confuse test. * configure.in: Likewise. Thu May 28 19:31:13 1998 Ian Lance Taylor * ltconfig, ltmain.sh: Bring in Visual C++ support. Sat May 23 23:44:13 1998 Alexandre Oliva * Makefile.in (boostrap2-lean, bootstrap3-lean, bootstrap4-lean): New targets. Mon May 11 23:55:56 1998 Jeffrey A Law (law@cygnus.com) * mpw-* Delete. Not used. Mon May 11 23:11:34 1998 Jeffrey A Law (law@cygnus.com) * COPYING.LIB: Update FSF address. Fri May 8 01:30:20 1998 Ian Lance Taylor * ltconfig, ltmain.sh: Update to libtool 1.2a. * Makefile.in (GASB_SUPPORT_DIRS): Remove intl; already included via GAS_SUPPORT_DIRS. Thu May 7 17:27:35 1998 Ian Lance Taylor * ltconfig, ltmain.sh: Avoid producing a version number if -version-info was not used. Tue May 5 18:02:24 1998 Ian Lance Taylor * configure.in: Add --with-newlib to CONFIG_ARGUMENTS if we are building with newlib. 1998-04-30 Paul Eggert * Makefile.in (EXTRA_GCC_FLAGS): Remove backslash at end; Solaris `make' causes it to continue to next definition. Tue Apr 28 16:24:24 1998 Jason Molenda (crash@bugshack.cygnus.com) * Makefile.in (install-gdbtk): Call this 'install-gdb' so that the right GUI libraries and files are installed along with GDB. Tue Apr 28 18:11:24 1998 Ian Lance Taylor * configure.in: Change alpha to alpha* in several places. Tue Apr 28 07:42:00 1998 Mark Alexander * config.sub: Recognize sparc86x. Tue Apr 28 07:35:02 1998 Michael Meissner * configure.in (--enable-target-optspace): Remove debug echo. Thu Apr 23 21:31:16 1998 Jim Wilson * configure: Set CXXFLAGS from CXXFLAGS, not CFLAGS. Thu Apr 23 12:26:38 1998 Ian Lance Taylor * ltconfig: Update cygwin32 support. * Makefile.in (GAS_SUPPORT_DIRS): Add intl. (BINUTILS_SUPPORT_DIRS, GASB_SUPPORT_DIRS): Likewise. (GDB_SUPPORT_DIRS): Likewise. Wed Apr 22 12:30:10 1998 Michael Meissner * configure.in (target_makefile_frag): If --enable-target-optspace, use -Os to compile target libraries rather than -O2. Default to using -Os for d10v and m32r if --{enable,disable}-target-optspace is not used. * configure.in (target_cflags): Ditto for d30v. Tue Apr 21 23:06:54 1998 Tom Tromey * Makefile.in (all-bfd): Depend on all-intl. (all-binutils): Likewise. (all-gas): Likewise. (all-gprof): Likewise. (all-ld): Likewise. 1998-04-19 Brendan Kehoe * configure.in (host_tools): Fix typo, lbtool -> libtool. Fri Apr 17 16:20:42 1998 Ian Lance Taylor * Makefile.in (all-bfd): Depend upon all-libiberty. * ltconfig, ltmain.sh: Bring in newer cygwin32 support. Fri Apr 17 12:22:22 1998 Bob Manson * Makefile.in: Add libstub. * configure.in: Ditto. Build libstub for targets that have cygmon support. Tue Apr 14 18:01:55 1998 Ian Lance Taylor * configure.in: Don't set PICFLAG on ix86-cygwin32. Tue Apr 14 12:24:45 1998 J. Kean Johnston * configure.in: Recognise i[3456]96-*-sysv5* as a valid host, and use mh-sysv5 if specified. Support gprof on SCO Open Server. Tue Apr 14 11:33:51 1998 Krister Walfridsson * configure: Define DEFAULT_M4 by searching PATH. * Makfile.in: Use DEFAULT_M4. Mon Apr 13 15:37:24 1998 Ian Lance Taylor * ltconfig: Add cygwin32 support. * Makefile.in, configure.in: Add libtool as a native only directory to configure and build. Sun Apr 12 20:58:46 1998 Jeffrey A Law (law@cygnus.com) * Makefile.in (INSTALL_MODULES): Remove texinfo. Wed Apr 8 13:18:56 1998 Philippe De Muyter * Makefile.in (EXTRA_GCC_FLAGS): XFOO lines shortened. Thu Apr 2 14:48:44 1998 Geoffrey Noer * Makefile.in: add ash make rules * configure.in: add ash to native_only and host_tools lists Thu Mar 26 12:53:20 1998 Tom Tromey * Makefile.in (all-gettext, all-intl): New targets. (ALL_MODULES): Added all-gettext, all-intl. (CROSS_CHECK_MODULES): Added check-gettext, check-intl. (INSTALL_MODULES): Added install-gettext, install-intl. (CLEAN_MODULES): Added clean-gettext, clean-intl. * configure.in (host_tools): Added gettext. (native_only): Likewise. (noconfigdirs) [various cases]: Likewise. (host_libs): Added intl. Thu Mar 26 15:00:11 1998 Keith Seitz * configure: Do not disable building gdbtk for cygwin32 hosts. Wed Mar 25 10:04:18 1998 Nick Clifton * configure.in: Add thumb-coff target. * config.sub: Add thumb-coff target. Wed Mar 25 11:49:12 1998 Jason Molenda (crash@bugshack.cygnus.com) * Makefile.in: Revert yesterday's change. (all-target-winsup): all-target-librx stays out of here. Tue Mar 24 16:58:29 1998 Jason Molenda (crash@bugshack.cygnus.com) * Makefile.in (TARGET_CONFIGDIRS, ALL_TARGET_MODULES, CONFIGURE_TARGET_MODULES, CHECK_TARGET_MODULES, INSTALL_TARGET_MODULES, CLEAN_TARGET_MODULES, all-target-winsup): Remove references to librx and libg++. Tue Mar 24 18:28:12 1998 Eric Mumpower * Makefile.in (BASE_FLAGS_TO_PASS): Pass $(lispdir) down to recursive makes Tue Mar 24 11:37:45 1998 Ian Lance Taylor * Makefile.in (CC_FOR_TARGET): Use $(TARGET_SUBDIR) when passing -B for newlib directory. (CXX_FOR_TARGET): Likewise. Mon Mar 23 11:30:21 1998 Jeffrey A Law (law@cygnus.com) * ltconfig: Update after libtool/ltconfig.in change for hpux11. Fri Mar 20 18:51:43 1998 Ian Lance Taylor * ltconfig, ltmain.sh: Update to libtool 1.2. Fri Mar 20 09:32:14 1998 Manfred Hollstein * Makefile.in (install-gcc): Don't specify LANGUAGES here. (install-gcc-cross): Instead, override LANGUAGES here. 1998-03-18 Dave Love * Makefile.in ($(CONFIGURE_TARGET_MODULES)): Set CONFIG_SITE to a non-existent file since /dev/null loses with bash 2.0/autoconf 2.12. Wed Mar 18 09:24:59 1998 Nick Clifton * configure.in: Add Thumb-pe target. Tue Mar 17 16:59:00 1998 Syd Polk * Makefile.in - changed sn targets to snavigator * configure.in - changed sn targets to snavigator Tue Mar 17 10:33:28 1998 Manfred Hollstein * config-ml.in: After building symlink tree call make distclean if a Makefile got linked into ${ml_dir}/${ml_libdir}; this happens to be the case for libiberty. Tue Mar 17 10:22:37 1998 H.J. Lu (hjl@gnu.ai.mit.edu) * configure: When making link, also check the current directory. The configure scripts may create one. Fri Mar 6 01:02:03 1998 Richard Henderson * config.sub: Accept alphapca56 and alphaev6 properly. Fri Mar 6 00:14:55 1998 Franz Sirl * configure.in: Revert 3 Jan change for powerpc-linux-gnulibc1. Mon Feb 23 15:09:18 1998 Bruno Haible * Makefile.in (INSTALL_MODULES): Move install-tcl before install-itcl. (install-itcl): Remove dependency on install-tcl. Mon Feb 23 09:53:28 1998 Mark Alexander * configure.in: Remove libgloss from noconfigdirs for MN10300. Thu Feb 19 13:40:41 1998 Ian Lance Taylor * configure.in: Don't build libgui for a cygwin32 target when not on a cygwin32 host. Wed Feb 18 12:29:00 1998 Jason Molenda (crash@bugshack.cygnus.com) * configure (redirect): Set to null, so default behavior of configure is now --verbose. 1998-02-16 Dave Love * Makefile.in ($(CONFIGURE_TARGET_MODULES)): Run configure with CONFIG_SITE=/dev/null to forestall lossage with site configuration. Mon Feb 16 12:23:53 1998 Manfred Hollstein * Makefile.in (BASE_FLAGS_TO_PASS, EXTRA_TARGET_FLAGS): Really add this change to sync Makefile.in with its ChangeLog entries. Thu Feb 12 15:03:08 1998 H.J. Lu * ltmain.sh (mkdir): Check that the directory doesn't exist before we exit with error, so that we don't get races during parallel builds. Sat Feb 7 15:19:18 1998 Ian Lance Taylor * ltconfig, ltmain.sh: Update from libtool 1.0i. Fri Feb 6 01:33:52 1998 Manfred Hollstein * Makefile.in (BASE_FLAGS_TO_PASS): Don't pass PICFLAG and PICFLAG_FOR_TARGET. (EXTRA_TARGET_FLAGS): Don't pass PICFLAG_FOR_TARGET. * configure: Emit a definition for the new macro enable_shared into each Makefile. Thu Feb 5 17:01:12 1998 Jason Molenda (crash@bugshack.cygnus.com) * configure.in (host_tools, native_only): Add libtool. Wed Feb 4 16:53:58 1998 Geoffrey Noer * configure.in: add target-gperf to noconfigdirs for Cygwin32. Fix typo in ming config comment. Wed Feb 4 18:56:13 1998 Ian Lance Taylor * ltconfig, ltmain.sh: Update from libtool 1.0h. Mon Feb 2 19:38:19 1998 Ian Lance Taylor * config.sub: Add tic30 cases, and map c30 to tic30. Sun Feb 1 02:40:41 1998 Richard Henderson * Makefile.in (TARGET_CONFIGDIRS): Add libf2c. (ALL_TARGET_MODULES, CONFIGURE_TARGET_MODULES): Similarly (CHECK_TARGET_MODULES, INSTALL_TARGET_MODULES): Similarly (CLEAN_TARGET_MODULES): Similarly (all-target-libf2c): Add dependences. * configure.in (target_libs): Add libf2c. Fri Jan 30 17:18:32 1998 Geoffrey Noer * configure.in: Remove expect from noconfigdirs when target is cygwin32. OK to build expect and dejagnu with Canadian Cross. Wed Jan 28 12:58:49 1998 Ian Lance Taylor * configure.in: Do build expect, dejagnu, and cvssrc for a cygwin32 host. * config.guess: Use ${UNAME_MACHINE} rather than i386 for cygwin32 and mingw32. Wed Jan 28 10:26:37 1998 Manfred Hollstein * Makefile.in (BASE_FLAGS_TO_PASS): Remove passing $(local_prefix) here as it is not defined in the toplevel Makefile. Tue Jan 27 23:25:06 1998 Manfred Hollstein * configure (package_makefile_rules_frag): New variable, which names a file with generic rules, ... Change comment to mention we now have FIVE parts. * configure: Undo last change. Tue Jan 27 23:15:55 1998 Lassi A. Tuura * config.guess: More accurate determination of HP processor types. * config.sub: More accurate determination of HP processor types. Sat Jan 24 01:59:45 1998 Manfred Hollstein * configure (package_makefile_frag): Move inserting the ${package_makefile_frag} to where it should be according to the comment. Fri Jan 23 00:29:28 1998 Philip Blundell * config.guess: Add support for Linux/ARM. Thu Jan 22 15:14:01 1998 Fred Fish * .cvsignore: Remove *-info and *-install since they match release-info and mpw-install, which we don't want to just ignore. Thu Jan 22 01:38:33 1998 Richard Henderson * configure.in: Revert 3 Jan change for alpha-linux-gnulibc1. Sat Jan 17 21:28:08 1998 Pieter Nagel * Makefile.in (FLAGS_TO_PASS): Pass down gcc_include_dir and local_prefix to sub-make invocations. Sat Jan 17 21:04:59 1998 H.J. Lu (hjl@gnu.org) * configure.in: Check makefile fragments in the source directory. Fri Jan 16 00:41:37 1998 Alexandre Oliva * configure.in: Check whether host and target makefile fragments exist before adding them to *_makefile_frag. Wed Jan 14 23:39:10 1998 Bob Manson * configure.in (target_configdirs): Add cygmon for sparc64-elf. Wed Jan 14 12:48:07 1998 Keith Seitz * configure.in: Make sure we only replace RPATH_ENVVAR on lines which begin with RPATH_ENVVAR, i.e. add "^" to the regexp to sed. * Makefile.in (BASE_FLAGS_TO_PASS): Pass RRPATH_ENVVAR down to sub-makes. 1998-01-13 Lee Iverson (leei@ai.sri.com) * config-ml.in (multi-do): LDFLAGS must include multilib designator. Tue Jan 13 01:13:24 1998 Robert Lipe (robertl@dgii.com) * config.guess: Recognize i[3456]-i586-UnixWare7-sysv5. Sun Jan 4 01:06:55 1998 Mumit Khan * config.sub: Add mingw32 support. * configure.in: Likewise. Sat Jan 3 12:11:05 1998 Franz Sirl * configure.in: Finalize support for {alpha|powerpc}*-*-linux-gnulibc1 Sun Dec 28 11:28:58 1997 Jeffrey A Law (law@cygnus.com) * Makefile.in (INSTALL_TARGET): Do install-gcc first. * configure (gxx_include_dir): Provide a definition for subdirs which do not use autoconf. Wed Dec 24 22:46:55 1997 Jeffrey A Law (law@cygnus.com) * config.guess: Sync with egcs. Picks up new alpha support, BeOS & some additional linux support. Tue Dec 23 12:44:24 1997 Jeffrey A Law (law@cygnus.com) * config.guess: HP 9000/803 is a PA1.1 machine. Mon Dec 22 02:39:24 1997 Richard Henderson * configure.in: It's alpha*-... Sun Dec 21 16:53:12 1997 H.J. Lu (hjl@gnu.ai.mit.edu) * configure.in (host_makefile_frag, target_makefile_frag): Handle multiple config files. (alpha-*-linux*): Treat alpha-*-linux* as alpha-*-linux* and alpha-*-*. Thu Dec 18 13:13:03 1997 Doug Evans * mkdep: New file. Wed Dec 17 09:53:02 1997 Michael Meissner * configure.in (d30v-*-*): Allow configuring of libide, vmake, etc. Tue Dec 16 17:36:05 1997 Ian Lance Taylor * Makefile.in: Add libgui directory. (GDB_TK): Add all-libgui. * configure.in: Add libgui directory. * configure: Add all-libgui to GDB_TK. Mon Dec 15 16:12:28 1997 Nick Clifton * config-ml.in (multidirs): Add m32r to multilib list. Fri Dec 12 10:43:31 1997 Brendan Kehoe * Makefile.in (all-target-gperf): Change dependency to all-target-libstdc++. Thu Dec 11 23:30:51 1997 Fred Fish * config.guess: Add BeOS support. Wed Dec 10 15:10:38 1997 Ian Lance Taylor Source directory cvs renamed to cvssrc: * configure.in (host_tools): Change cvs to cvssrc. (native_only): Likewise. (noconfigdirs) [various cases]: Likewise. * Makefile.in (ALL_MODULES): Change all-cvs to all-cvssrc. (CROSS_CHECK_MODULES): Change check-cvs to check-cvssrc. (INSTALL_MODULES): Change install-cvs to install-cvssrc. (CLEAN_MODULES): Change clean-cvs to clean-cvssrc. (all-cvssrc): Rename target from all-cvs. Wed Dec 3 07:55:59 1997 Jeffrey A Law (law@cygnus.com) * configure (gxx_include_dir): Fix thinko. Tue Dec 2 10:55:34 1997 Jeffrey A Law (law@cygnus.com) * Makefile.in (INSTALL_TARGET_CROSS): Define. (install-cross, install-gcc-cross): New targets. Tue Dec 2 10:08:31 1997 Nick Clifton * configure.in (noconfigdirs): Add support for Thumb target. * config.sub (maybe_os): Add support for Thumb target. Sun Nov 30 16:12:27 1997 Bob Manson * Makefile.in: Add rules for cygmon. * configure.in: Build cygmon for sparc-elf and sparclite-aout. Thu Nov 27 01:31:30 1997 Jeffrey A Law (law@cygnus.com) * Makefile.in (INSTALL_TARGET): Do install-gcc first. * configure (gxx_include_dir): Provide a definition for subdirs which do not use autoconf. Wed Nov 26 11:53:33 1997 Keith Seitz * Makefile.in, configure, configure.in, ChangeLog: merge with foundry's 11/18/97 build Wed Nov 26 16:08:50 1997 Jeffrey A Law (law@cygnus.com) * From Franz Sirl. * config.guess (powerpc*-*-linux): Handle glibc2 beta release found on RedHat Linux systems. Fri Nov 21 09:51:01 1997 Jeffrey A Law (law@cygnus.com) * config.guess (alpha stuff): Merge with FSF to avoid incorrect guesses. Thu Nov 13 11:38:37 1997 Jeffrey A Law (law@cygnus.com) * configure.in (i[3456]86-ncr-sysv4.3*): Tweak. Mon Nov 10 15:23:21 1997 H.J. Lu * ltmain.sh: If mkdir fails, check whether the directory was created anyhow by some other process. Mon Nov 10 14:38:03 1997 Michael Meissner * configure.in (d30v-*-*): Configure all directories. Sun Nov 9 17:36:20 1997 Michael Meissner * configure.in (d30v-*-*): Configure newlib, libiberty directories for the D30V. Sat Nov 8 14:42:59 1997 Michael Meissner * configure.in (d30v-*-*): Configure target-libgloss on the D30V. Fri Nov 7 10:34:09 1997 Rob Savoye * include/libiberty.h: Add extern "C" { so it can be used with C++ progrms. * include/remote-sim.h: Add extern "C" { so it can be used with C++ programs. Thu Oct 30 11:09:29 1997 Michael Meissner * configure.in (d30v-*-*): Configure GCC now. Mon Oct 27 13:17:24 1997 Stan Shebs * configure.in: Remove a "second pass" of tweaking noconfigdirs, is no longer needed. Mon Oct 27 12:03:53 1997 Jason Merrill * Makefile.in: check-target-libio depends on all-target-libstdc++. Sun Oct 26 11:48:27 1997 Manfred Hollstein (manfred@s-direktnet.de) * Makefile.in (bootstrap-lean): Combined with `normal' bootstrap targets using "$@" to provide support for similar but not identical targets without having to duplicate code. Mon Oct 20 15:28:49 1997 Klaus K"ampf * makefile.vms: Fix to work with DEC C. Tue Oct 7 23:58:57 1997 Gavin Koch * config.sub: Add mips-tx39-elf to marketing names. Tue Oct 7 14:24:41 1997 Ian Lance Taylor * ltmain.sh: Handle symlinks in generated script. Wed Oct 1 13:11:27 1997 Ian Lance Taylor * configure: Handle autoconf style directory options: --bindir, --datadir, --includedir, --infodir, --libdir, --libexecdir, --mandir, --oldincludedir, --sbindir, --sharedstatedir, --sysconfdir. * Makefile.in (sbindir, libexecdir, sysconfdir): New variables. (sharedstatedir, localstatedir, oldincludedir): New variables. (BASE_FLAGS_TO_PASS): Pass down bindir, datadir, includedir, infodir, libdir, libexecdir, localstatedir, mandir, oldincludedir, sbindir, sharedstatedir, and sysconfdir. Mon Sep 29 00:38:08 1997 Aaron Jackson * Makefile.in (bootstrap-lean): New target. Wed Sep 24 18:06:27 1997 Stu Grossman * configure.in (d30v): Remove tcl, tk, expect, gdb, itcl, tix, db, sn, and gnuserv from noconfigdirs. Wed Sep 24 15:18:32 1997 Ian Lance Taylor * ltmain.sh: Tweak shell pattern to avoid bug in NetBSD /bin/sh. Thu Sep 18 23:58:27 1997 Jeffrey A Law (law@cygnus.com) * Makefile.in (cross): New target. Thu Sep 18 21:43:23 1997 Alexandre Oliva Jeff Law * Makefile.in (bootstrap2, bootstrap3): New targets. (all-bootstrap): Remove outdated and confusing target. (bootstrap, bootstrap2, bootstrap3): Don't pass BOOT_CFLAGS down. Thu Sep 18 15:37:42 1997 Andrew Cagney * configure (tooldir): enable_gdbtk=YES for cygwin32, NO for windows. Consistent with gdb/configure. 1997-09-15 02:37 Ulrich Drepper * configure.in: Name Linux target fragment. * configure: Rewrite so that project Makefile fragment is inserted first and appears last in the resulting Makefile. Tue Sep 16 09:55:07 1997 Andrew Cagney * Makefile.in (install-itcl): Install tcl first. Fri Sep 12 16:19:20 1997 Geoffrey Noer * configure.in: remove bison from noconfigdirs for Cygwin32 host Thu Sep 11 16:40:46 1997 H.J. Lu (hjl@gnu.ai.mit.edu) * Makefile.in (local-distclean): Also remove mh-frag mt-frag. * configure.in (skipdirs): Add target-librx for Linux. (alpha-*-linux*): Use config/mh-elfalphapic and config/mt-elfalphapic. Wed Sep 10 21:29:54 1997 Jeffrey A Law (law@cygnus.com) * Makefile.in (bootstrap): New target. Wed Sep 10 15:19:22 1997 Jeffrey A Law (law@cygnus.com) * config.sub: Accept 'amigados' for backward compatability. Mon Sep 8 20:46:20 1997 Ian Lance Taylor * config.guess: Merge with FSF. Sun Sep 7 23:18:32 1997 Fred Fish * config.sub: Change 'amigados' to 'amigaos' to match current usage. Sun Sep 7 15:55:28 1997 Gavin Koch * config.sub: Add "marketing-names" patch. Fri Sep 5 16:11:28 1997 Joel Sherrill (joel@OARcorp.com) * configure.in (*-*-rtems*): Do not build libgloss for rtems. Fri Sep 5 12:27:17 1997 Jeffrey A Law (law@cygnus.com) * config.sub: Handle v850-elf. Wed Sep 3 22:01:58 1997 Fred Fish * .cvsignore (*-install): Remove. Wed Sep 3 12:15:24 1997 Chris Provenzano * ltconfig: Set CONFIG_SHELL in libtool. * ltmain.sh: Use CONFIG_SHELL instead of /bin/sh Mon Sep 1 16:45:44 1997 Jim Wilson * configure.in (target_subdir): Set to libraries if enable_multilib. Wed Aug 27 16:15:11 1997 Jim Wilson * config.guess: Update from gcc directory. Tue Aug 26 16:46:46 1997 Andrew Cagney * Makefile.in (all-sim): Depends on all-readline. Wed Aug 20 19:57:37 1997 Jason Merrill * Makefile.in (BISON, YACC): Use $$s. (all-bison): Depend on all-texinfo. Tue Aug 19 01:41:32 1997 Jason Merrill * Makefile.in (BISON): Add -L flag. (YACC): Likewise. Mon Aug 18 11:30:50 1997 Nick Clifton * configure.in (noconfigdirs): Add support for v850e target. * config.sub (maybe_os): Add support for v850e target. Mon Aug 18 11:30:50 1997 Nick Clifton * configure.in (noconfigdirs): Add support for v850ea target. * config.sub (maybe_os): Add support for v850ea target. Mon Aug 18 09:24:06 1997 Gavin Koch * config.sub: Add mipstx39. Delete r3900. Mon Aug 18 17:20:10 1997 Jason Molenda (crash@godzilla.cygnus.co.jp) * Makefile.in (all-autoconf): Depends on all-texinfo. Fri Aug 15 23:09:26 1997 Michael Meissner * config-ml.in ({powerpc,rs6000}*-*-*): Update to current AIX and eabi targets. Thu Aug 14 14:42:17 1997 Ian Lance Taylor * configure: Get CFLAGS and CXXFLAGS from Makefile, if possible. * configure: When handling a Canadian Cross, handle YACC as well as BISON. Just set BISON to bison. When setting YACC, prefer bison. * Makefile.in (all-bison): Depend upon all-texinfo. Tue Aug 12 20:09:48 1997 Jason Merrill * Makefile.in (BISON): bison, not byacc or bison -y. (YACC): bison -y or byacc or yacc. (various): Add *-bison as appropriate. (taz): No need to mess with BISON anymore. Tue Aug 12 22:33:08 1997 Ian Lance Taylor * configure: If OSTYPE matches *win32*, try to find a good value for CONFIG_SHELL. Sun Aug 10 14:41:11 1997 Ian Lance Taylor * Makefile.in (taz): Get the version number from AM_INIT_AUTOMAKE in configure.in if it is present. Sat Aug 9 00:58:01 1997 Ian Lance Taylor * Makefile.in (LD_FOR_TARGET): Change ld.new to ld-new. Fri Aug 8 16:30:13 1997 Doug Evans * config.sub: Recognize `arc' cpu. * configure.in: Likewise. * config-ml.in: Likewise. Thu Aug 7 11:02:34 1997 Ian Lance Taylor * Makefile.in ($(INSTALL_X11_MODULES)): Depend upon installdirs. Wed Aug 6 16:27:29 1997 Chris Provenzano * configure: Changed sed delimiter from ':' to '|' when attempting to substitute ${config_shell} for SHELL. On NT ${config_shell} may contain a ':' in it. Wed Aug 6 12:29:05 1997 Jason Merrill * Makefile.in (EXTRA_GCC_FLAGS): Fix for non-bash shells. Wed Aug 6 00:42:35 1997 Ian Lance Taylor * Makefile.in (AS_FOR_TARGET): Change as.new to as-new. Tue Aug 5 14:08:51 1997 Ian Lance Taylor * Makefile.in (NM_FOR_TARGET): Change nm.new to nm-new. * ylwrap: If the program is a relative path, force it to be absolute. Tue Aug 5 12:12:44 1997 Andrew Cagney * configure (tooldir): Set BISON to `bison -y' and not just bison. Mon Aug 4 22:59:02 1997 Andrew Cagney * Makefile.in (CC_FOR_TARGET): When winsup/Makefile present, correctly specify the target build directory $(TARGET_SUBDIR)/winsup for libraries. Mon Aug 4 12:40:24 1997 Jason Merrill * Makefile.in (EXTRA_GCC_FLAGS): Fix handling of macros with values separated by spaces. Thu Jul 31 19:49:49 1997 Ian Lance Taylor * ylwrap: New file. * Makefile.in (DEVO_SUPPORT): Add ylwrap. * ltmain.sh: Handle /bin/sh at start of install program. * Makefile.in (DEVO_SUPPORT): Add ltconfig, ltmain.sh, and missing. * ltconfig, ltmain.sh: New files, from libtool 1.0. * missing: New file, from automake 1.2. Thu Jul 24 12:57:56 1997 Ian Lance Taylor * Makefile.in: Treat tix like tk, putting it in X11_MODULES. Add check-tk to CHECK_X11_MODULES. Wed Jul 23 17:03:29 1997 Ian Lance Taylor * config.sub: Merge with FSF. Tue Jul 22 19:08:29 1997 Ian Lance Taylor * config.guess: Merge with FSF. Tue Jul 22 14:50:42 1997 Robert Hoehne * configure: Treat msdosdjgpp like go32. * configure.in: Likewise. Don't remove gprof for go32. * configure: Change Makefile.tem2 to Makefile.tm2. Mon Jul 21 10:31:26 1997 Stephen Peters * configure.in (noconfigdirs): For alpha-dec-osf*, don't ignore grep. Tue Jul 15 14:33:03 1997 Brendan Kehoe * install-sh (chmodcmd): Set to null if the DST directory already exists. Same as Nov 11th change. Mon Jul 14 11:01:15 1997 Martin M. Hunt * configure (GDB_TK): Needs itcl and tix. Mon Jul 14 00:32:10 1997 Jason Merrill * config.guess: Update from FSF. Fri Jul 11 11:57:11 1997 Martin M. Hunt * Makefile.in (GDB_TK): Depend on itcl and tix. Fri Jul 4 13:25:31 1997 Ian Lance Taylor * Makefile.in (INSTALL_PROGRAM_ARGS): New variable. (INSTALL_PROGRAM): Use $(INSTALL_PROGRAM_ARGS). (INSTALL_SCRIPT): New variable. (BASE_FLAGS_TO_PASS): Pass down INSTALL_SCRIPT. * configure.in: If host is *-*-cygwin32*, set INSTALL_PROGRAM_ARGS to -x. * install-sh: Add support for -x option. Mon Jun 30 15:51:30 1997 Ian Lance Taylor * configure.in, Makefile.in: Treat tix like itcl. Thu Jun 26 13:59:19 1997 Ian Lance Taylor * Makefile.in (WINDRES): New variable. (WINDRES_FOR_TARGET): New variable. (BASE_FLAGS_TO_PASS): Add WINDRES_FOR_TARGET. (EXTRA_HOST_FLAGS): Add WINDRES. (EXTRA_TARGET_FLAGS): Add WINDRES. (EXTRA_GCC_FLAGS): Add WINDRES. ($(DO_X)): Pass down WINDRES. ($(CONFIGURE_TARGET_MODULES)): Set WINDRES when configuring. * configure: Treat WINDRES like DLLTOOL, and WINDRES_FOR_TARGET like DLLTOOL_FOR_TARGET. Wed Jun 25 15:01:26 1997 Felix Lee * configure.in: configure sim before gdb for win32-x-ppc Wed Jun 25 12:18:54 1997 Brendan Kehoe Move gperf into the toplevel, from libg++. * configure.in (target_tools): Add target-gperf. (native_only): Add target-gperf. * Makefile.in (all-target-gperf): New target, depend on all-target-libg++. (configure-target-gperf): Empty rule. (ALL_TARGET_MODULES): Add all-target-gperf. (CONFIGURE_TARGET_MODULES): Add configure-target-gperf. (CHECK_TARGET_MODULES): Add check-target-gperf. (INSTALL_TARGET_MODULES): Add install-target-gperf. (CLEAN_TARGET_MODULES): Add clean-target-gperf. Mon Jun 23 10:51:53 1997 Jeffrey A Law (law@cygnus.com) * config.sub (mn10200): Recognize new basic machine. Thu Jun 19 14:16:42 1997 Brendan Kehoe * configure.in: Don't set ENABLE_MULTILIB, so we'll be passing --enable-multilib down to subdirs; setting TARGET_SUBDIR was enough. Tue Jun 17 15:31:20 1997 Brendan Kehoe * configure.in: If we're building mips-sgi-irix6* native, turn on ENABLE_MULTILIB and set TARGET_SUBDIR. Tue Jun 17 12:20:59 1997 Tom Tromey * Makefile.in (all-sn): Depend on all-grep. Mon Jun 16 11:11:10 1997 Ian Lance Taylor * configure.in: Use mh-ppcpic and mt-ppcpic for powerpc*-* targets. * configure: Set CFLAGS and CXXFLAGS, and substitute them into Makefile. From Jeff Makey . * Makefile.in: Add comment for CFLAGS and CXXFLAGS. * Makefile.in (DISTBISONFILES): Remove. (taz): Don't futz with DISTBISONFILES. Change BISON to use $(DEFAULT_YACC). * configure.in: Build itl, db, sn, etc., when building for native cygwin32. * Makefile.in (LD): New variable. (EXTRA_HOST_FLAGS): Pass down LD. ($(DO_X)): Likewise. Mon Jun 16 11:10:35 1997 Philip Blundell * Makefile.in (INSTALL): Use $(SHELL) when executing install-sh. Fri Jun 13 10:22:56 1997 Bob Manson * configure.in (targargs): Strip out any supplied --build argument before adding our own. Always add --build. Thu Jun 12 21:12:28 1997 Bob Manson * configure.in (targargs): Pass --build if we're doing a cross-compile. Fri Jun 6 21:38:40 1997 Rob Savoye * configure: Use '|' instead of ":" as the separator in sed. Otherwise sed chokes on NT path names with drive designators. Also look for "?:*" as the leading characters in an absolute pathname. Mon Jun 2 13:05:20 1997 Gavin Koch * config.sub: Support for r3900. Wed May 21 17:33:31 1997 Ian Lance Taylor * configure.in: Use install-sh, not install.sh. Wed May 14 16:06:51 1997 Ian Lance Taylor * Makefile.in (taz): Improve check for BISON so it doesn't try to apply it twice. Fri May 9 17:22:05 1997 Ian Lance Taylor * Makefile.in (INSTALL_MODULES): Put install-opcodes before install-binutils. Thu May 8 17:29:50 1997 Ian Lance Taylor * Makefile.in: Add automake targets. * configure.in (host_tools): Add automake. Tue May 6 15:49:52 1997 Ian Lance Taylor * configure: Default CXX to c++, not gcc. * Makefile.in (CXX): Set to c++, not gcc. (CXX_FOR_TARGET): When cross, transform c++, not gcc. Thu May 1 10:11:43 1997 Geoffrey Noer * install-sh: try appending a .exe if source file doesn't exist Wed Apr 30 12:05:36 1997 Jason Merrill * configure.in: Turn on multilib by default. (cross_only): Remove target-libiberty. * Makefile.in (all-gcc): Don't depend on libiberty. Mon Apr 28 18:39:45 1997 Michael Snyder * config.guess: improve algorithm for recognizing Gnu Hurd x86. Thu Apr 24 19:30:07 1997 Ian Lance Taylor * Makefile.in (DEVO_SUPPORT): Add mpw-install. (DISTBISONFILES): Add ld/Makefile.in Tue Apr 22 17:17:28 1997 Geoffrey Noer * configure.in: if target is cygwin32 but host isn't cygwin32, don't configure gdb tcl tk expect, not just gdb. Mon Apr 21 13:33:39 1997 Tom Tromey * configure.in: Added gnuserv everywhere sn appears. * Makefile.in (ALL_MODULES): Added all-gnuserv. (CROSS_CHECK_MODULES): Added check-gnuserv. (INSTALL_MODULES): Added install-gnuserv. (CLEAN_MODULES): Added clean-gnuserv. (all-gnuserv): New target. Thu Apr 17 13:57:06 1997 Per Fogelstrom * config.guess: Fixes for MIPS OpenBSD systems. Tue Apr 15 12:21:07 1997 Ian Lance Taylor * Makefile.in (INSTALL_XFORM): Remove. (BASE_FLAGS_TO_PASS): Remove INSTALL_XFORM. * mkinstalldirs: New file, copied from automake. * Makefile.in (installdirs): Rename from install-dirs. Use mkinstalldirs. Change all users. (DEVO_SUPPORT): Add mkinstalldirs. Mon Apr 14 11:21:38 1997 Ian Lance Taylor * install-sh: Rename from install.sh. * Makefile.in (INSTALL): Change install.sh to install-sh. (DEVO_SUPPORT): Likewise. * configure: Use ${config_shell} with ${moveifchange}. From Thomas Graichen . Fri Apr 11 16:37:10 1997 Niklas Hallqvist * config.guess: Recognize OpenBSD systems correctly. Fri Apr 11 17:07:04 1997 Jason Molenda (crash@godzilla.cygnus.co.jp) * README, Makefile.in (ETC_SUPPORT): Remove references to cfg-paper*, configure.{texi,man,info*}._ Sun Apr 6 18:47:57 1997 Andrew Cagney * Makefile.in (all.normal): Ensure that gcc is built after all the x11 - ie gdb - targets. Tue Apr 1 16:28:50 1997 Klaus Kaempf * makefile.vms: Don't run conf-a-gas. Mon Mar 31 16:26:55 1997 Joel Sherrill * configure.in (hppa1.1-*-rtems*): New target, like hppa-*-*elf*. Sun Mar 30 12:38:27 1997 Fred Fish * configure.in: Remove noconfigdirs case since gdb also configures and builds for tic80-coff. Fri Mar 28 18:28:52 1997 Ian Lance Taylor * configure: Set cache_file to config.cache. * Makefile.in (local-distclean): Remove config.cache. Wed Mar 26 18:49:39 1997 Ian Lance Taylor * COPYING: Update FSF address. Wed Mar 26 10:38:25 1997 Michael Meissner * configure.in (tic80-*-*): Remove G++ libraries and libgloss from noconfigdirs. Mon Mar 24 15:02:39 1997 Ian Lance Taylor * Makefile.in (install-dirs): Don't crash if prefix, and hence MAKEDIRS, is empty. Mon Mar 24 12:40:55 1997 Doug Evans * config.sub: Tweak mn10300 entry. Fri Mar 21 15:35:27 1997 Michael Meissner * configure.in (host_tools): Put sim before gdb, so gdb's configure.tgt can determine if the simulator was configured. Sun Mar 16 16:07:08 1997 Fred Fish * config.sub: Move BeOS $os case to be with other Cygnus local cases. Sun Mar 16 01:34:55 1997 Martin Hunt * config.sub: Remove misplaced comment that broke Linux. Sat Mar 15 22:50:15 1997 Fred Fish * config.sub: Add BeOS support. Mon Mar 10 13:30:11 1997 Tom Tromey * Makefile.in (CHECK_X11_MODULES): Don't run check-tk. Wed Mar 5 12:09:29 1997 Martin * configure.in (noconfigdirs): Remove tcl and tk from noconfigdirs for cygwin32 builds. Fri Feb 28 18:20:15 1997 Fred Fish * configure.in (tic80-*-*): Remove ld from noconfigdirs. Thu Feb 27 14:57:26 1997 Ken Raeburn * Makefile.in (GAS_SUPPORT_DIRS, BINUTILS_SUPPORT_DIRS): Remove make-all.com, use makefile.vms instead. Tue Feb 25 18:46:14 1997 Stan Shebs * config.sub: Accept -lnews*. Tue Feb 25 13:19:14 1997 Andrew Cagney * configure.in (noconfigdirs): Disable target-newlib, target-examples and target-libiberty for d30v. Fri Feb 21 17:56:25 1997 Martin M. Hunt * configure.in (noconfigdirs): Enable ld for d30v. Fri Feb 21 20:58:51 1997 Michael Meissner * configure.in (tic80-*-*): Build compiler. Sun Feb 16 15:41:09 1997 Andrew Cagney * configure.in (d30v-*): Remove sim directory from list of unsupported d30v directories Tue Feb 18 17:32:42 1997 Martin M. Hunt * config.sub, configure.in: Add d30v target cpu. Thu Feb 13 22:04:44 1997 Klaus Kaempf * makefile.vms: New file. * make-all.com: Remove. Wed Feb 12 12:54:18 1997 Jim Wilson * Makefile.in (EXTRA_GCC_FLAGS): Add LIBGCC2_DEBUG_CFLAGS. Sat Feb 8 20:36:49 1997 Michael Meissner * Makefile.in (all-itcl): The rule is all-itcl, not all-tcl. Tue Feb 4 11:39:29 1997 Tom Tromey * Makefile.in (ALL_MODULES): Added all-db. (CROSS_CHECK_MODULES): Addec check-db. (INSTALL_MODULES): Added install-db. (CLEAN_MODULES): Added clean-db. Mon Feb 3 13:29:36 1997 Ian Lance Taylor * config.guess: Merge with latest FSF sources. Tue Jan 28 09:20:37 1997 Tom Tromey * Makefile.in (ALL_MODULES): Added all-itcl. (CROSS_CHECK_MODULES): Added check-itcl. (INSTALL_MODULES): Added install-itcl. (CLEAN_MODULES): Added clean-itcl. Thu Jan 23 01:44:27 1997 Geoffrey Noer * configure.in: build gdb for mn10200 Fri Jan 17 15:32:15 1997 Doug Evans * Makefile.in (all-target-winsup): Depend on all-target-libio. Mon Jan 13 22:46:54 1997 Michael Meissner * configure.in (tic80-*-*): Turn off most targets right now. Fri Jan 3 16:04:03 1997 Ian Lance Taylor * Makefile.in (MAKEINFO): Check for the existence of the Makefile, rather than the makeinfo program. (do-info): Depend upon all-texinfo. Tue Dec 31 16:00:31 1996 Ian Lance Taylor * configure.in: Remove uses of config/mh-linux. * config.sub, config.guess: Merge with latest FSF sources. Fri Dec 27 23:04:33 1996 Fred Fish * config.sub (case $basic_machine): Add tic80 entries. Fri Dec 27 12:07:59 1996 Ian Lance Taylor * config.sub, config.guess: Merge with latest FSF sources. Wed Dec 18 22:46:39 1996 Stan Shebs * mpw-build.in: Build ld before gcc, use NewFolderRecursive. * mpw-config.in: Test for NewFolderRecursive. * mpw-install: Use symbolic name for startup filename. * mpw-README: Add various additional details. Wed Dec 18 13:11:46 1996 Jim Wilson * configure.in (mips*-sgi-irix6*): Remove binutils from noconfigdirs. Wed Dec 18 10:29:31 1996 Jeffrey A Law (law@cygnus.com) * configure.in: Do build gcc and the target libraries for the mn10200. Wed Dec 4 16:53:05 1996 Geoffrey Noer * configure.in: don't avoid building gdb for mn10300 any more * Makefile.in: double-quote GCC_FOR_TARGET line in EXTRA_GCC_FLAGS instead of single-quoting it. Tue Dec 3 23:26:50 1996 Jason Merrill * configure.in: Don't use --with-stabs on IRIX 6. Tue Dec 3 09:05:25 1996 Doug Evans * configure.in (m32r): Build gdb, libg++ now. Sun Dec 1 00:18:59 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * configure.in (mips*-sgi-irix6*): Remove gdb and related directories from noconfigdirs. Tue Nov 26 11:45:33 1996 Kim Knuttila * config.sub (basic_machine): added mips16 configuration Sat Nov 23 19:26:22 1996 Michael Meissner * config.sub: Handle d10v-unknown. Sat Nov 23 10:23:01 1996 Gavin Koch * config.sub: Handle v850-unknown. Thu Nov 21 16:19:44 1996 Geoffrey Noer * Makefile.in: add findutils * configure.in: add findutils to list of host_tools Wed Nov 20 10:09:01 1996 Jeffrey A Law (law@cygnus.com) * config.sub: Handle mn10200 and mn10300. Tue Nov 19 16:35:14 1996 Michael Meissner * configure.in (d10v-*): Do not build librx. Mon Nov 18 13:28:41 1996 Jeffrey A Law (law@cygnus.com) * configure.in (mn10300): Build everything except gdb & libgloss. Wed Nov 13 14:59:46 1996 Per Bothner * config.guess: Patch for Dansk Data Elektronik servers, from Niels Skou Olsen . For ncr, use /bin/uname rather than uname, since GNU uname does not support -p. Suggested by Mark Mitchell . Patch for MIPS R4000 running System V, from Eric S. Raymond . Fix thinko for nextstep. Patch for OSF1 in i?86, from Dan Murphy via Harlan Stenn. Sat Jun 24 18:58:17 1995 Morten Welinder * config.guess: Guess mips-dec-mach_bsd4.3. Thu Oct 10 04:07:04 1996 Harlan Stenn * config.guess (i?86-ncr-sysv*): Emit just enough of the minor release numbers. * config.guess (mips-mips-riscos*): Emit just enough of the release number. Tue Oct 8 10:37:22 1996 Frank Vance * config.guess (sparc-auspex-sunos*): Added. (f300-fujitsu-*): Added. Wed Sep 25 22:00:35 1996 Jeff Woolsey * config.guess: Recognize a Tadpole as a sparc. Wed Nov 13 00:53:09 1996 David J. MacKenzie * config.guess: Don't assume that NextStep version is either 2 or 3. NextStep 4 (aka OpenStep 4) has come out now. Mon Nov 11 23:52:03 1996 David J. MacKenzie * config.guess: Support Cray T90 that reports itself as "CRAY TS". From Rik Faith . Fri Nov 8 11:34:58 1996 David J. MacKenzie * config.sub: Contributions from bug-gnu-utils to: Support plain "hppa" (no version given) architecture, reported by OpenStep. OpenBSD like NetBSD. LynxOs is not a hardware supplier. * config.guess: Contributions from bug-gnu-utils to add support for: OpenBSD like NetBSD. Stratus systems. More Pyramid systems. i[n>4]86 Intel chips. M680[n>4]0 Motorola chips. Use unknown instead of lynx for hardware manufacturer. Mon Nov 11 10:09:08 1996 Brendan Kehoe * install.sh (chmodcmd): Set to null if the DST directory already exists. Mon Nov 11 10:43:41 1996 Michael Meissner * configure.in (powerpc*-{eabi,elf,linux,rtem,sysv,solaris}*): Do not use mt-ppc target Makefile fragment any more. Sun Nov 3 19:17:07 1996 Stu Grossman (grossman@critters.cygnus.com) * configure.in (*-*-windows): Exclude everything but those dirs needed to build windows. Tue Oct 29 16:41:31 1996 Doug Evans * Makefile.in (all-target-winsup): Depend on all-target-librx. Mon Oct 28 17:32:46 1996 Stu Grossman (grossman@critters.cygnus.com) * configure.in: Exclude mmalloc from i386-windows. Thu Oct 24 09:22:46 1996 Stu Grossman (grossman@critters.cygnus.com) * Undo my previous change. Thu Oct 24 12:12:04 1996 Ian Lance Taylor * Makefile.in (EXTRA_GCC_FLAGS): Pass down GCC_FOR_TARGET unconditionally. (MAKEOVERRIDES): Define (revert this part of October 18 change). Thu Oct 24 09:02:07 1996 Stu Grossman (grossman@critters.cygnus.com) * Makefile.in (FLAGS_TO_PASS): Add $(HOST_FLAGS) to allow the host to add it's own flags. Tue Oct 22 15:20:26 1996 Ian Lance Taylor * configure: Handle GCC_FOR_TARGET like CC_FOR_TARGET. Fri Oct 18 13:37:13 1996 Ian Lance Taylor * Makefile.in (CC_FOR_TARGET): Check for xgcc, not Makefile. (CXX_FOR_TARGET): Likewise. (GCC_FOR_TARGET): Define. (BASE_FLAGS_TO_PASS): Remove GCC_FOR_TARGET. (EXTRA_GCC_FLAGS): Define GCC_FOR_TARGET based on whether CC_FOR_TARGET was specified on the command line. (MAKEOVERRIDES): Don't define. Thu Oct 17 10:27:56 1996 Doug Evans * configure.in (m32r): Fix spelling of libg++ libs. Thu Oct 10 10:37:17 1996 Stan Shebs * config.sub (-apple*): Remove, now redundant. Thu Oct 10 12:30:54 1996 Ian Lance Taylor * configure: Don't get confused by CPU-VENDOR-linux-gnu. * configure: Rework yesterday's sed script patch. * config.sub: Merge with FSF. Wed Oct 9 17:24:59 1996 Per Bothner * config.guess: Merge from FSF. 1996-09-12 Richard Stallman * config.guess: Use pc instead of unknown, for pc clone systems. Change linux to linux-gnu. Mon Jul 15 23:51:11 1996 Karl Heuer * config.guess: Avoid non-portable tr syntax. Wed Oct 9 06:06:46 1996 Jeffrey A Law (law@cygnus.com) * test-build.mk (HOLES): Add "xargs" for gdb. * configure: Avoid hpux10.20 sed bug. Tue Oct 8 08:32:48 1996 Stu Grossman (grossman@critters.cygnus.com) * configure.in: Add support for windows host (that is a build done under the Microsoft build environment). Tue Oct 8 10:39:08 1996 Ian Lance Taylor * Makefile.in: Replace all uses of srcroot with s, to shrink command line lengths. Patches from Geoffrey Noer : * configure.in: If configuring for newlib, pass --with-newlib to subdirectories. * Makefile.in (CC_FOR_TARGET): If winsup/Makefile exists, pass a -Bnewlib/ and -Lwinsup to gcc. (CXX_FOR_TARGET): Likewise. Mon Oct 7 10:59:35 1996 Ian Lance Taylor * Makefile.in (ETC_SUPPORT): Add configure. Fri Oct 4 12:22:58 1996 Angela Marie Thomas (angela@cygnus.com) * configure.in: Use config/mh-dgux386 for i[345]86-dg-dgux host configuration file. Thu Oct 3 09:28:25 1996 Jeffrey A Law (law@cygnus.com) * configure.in: Break mn10x00 support into separate mn10200 and mn10300 configurations. * config.sub: Likewise. Wed Oct 2 22:27:52 1996 Jeffrey A Law (law@cygnus.com) * configure.in: Add lots of stuff to noconfigdirs for the mn10x00 targets. * config.sub, configure.in: Add mn10x00 support. Wed Oct 2 15:52:36 1996 Klaus Kaempf * make-all.com: Call conf-a-gas, not config-a-gas. Tue Oct 1 01:28:41 1996 James G. Smith * configure.in (noconfigdirs): Don't build libgloss for arm-coff targets. Mon Sep 30 14:24:01 1996 Stan Shebs * mpw-README: Add much more detail for native PowerMac. * mpw-install: New file. * mpw-configure: Add --norecursion and --help options. * mpw-config.in: Translate readme and install files when copying to objdir. * mpw-build.in: Don't always depend on byacc and flex. (install-only-top): New action. Fri Sep 27 17:39:44 1996 Stu Grossman (grossman@critters.cygnus.com) * configure.in: You can now configure GDB for the v850. Tue Sep 24 19:05:12 1996 Stan Shebs * configure.in (noconfigdirs): Don't configure any C++ dirs if targeting D10V. Tue Sep 17 12:15:31 1996 Ian Lance Taylor * config.sub: Recognize mips64vr5000. Mon Sep 16 17:00:52 1996 Ian Lance Taylor * configure.in: Use a single line for host_tools and native_only. Mon Sep 9 12:21:30 1996 Doug Evans * config.sub, configure.in: Add entries for m32r. Thu Sep 5 13:52:47 1996 Tom Tromey * Makefile.in (inet-install): Don't run install-gzip. Wed Sep 4 17:26:13 1996 Stu Grossman (grossman@critters.cygnus.com) * configure.in: Don't config lots of things for *-*-windows*. Sat Aug 31 11:45:57 1996 Stan Shebs * mpw-config.in: Test for mpw-true, true, and null-command scripts. (host_libs, host_tools): Copy from configure.in. * mpw-configure: Don't complain about directories not found. Thu Aug 29 16:44:58 1996 Michael Meissner * configure.in (i[345]86): Recognize i686 for pentium pro. (i[3456]86-*-dgux*): Use config/mh-sysv for the host configuration file. * config.guess (i[345]86): Ditto. Mon Aug 26 18:34:42 1996 Martin M. Hunt * configure.in (noconfigdirs): Removed gdb for D10V. Thu Aug 22 17:13:52 1996 Jeffrey A Law (law@cygnus.com) * configure.in: Remove ld, target-libio, target-libg++, and target-libstdc++ from noconfigdirs. Wed Aug 21 18:56:38 1996 Fred Fish * configure: Fix three locations where shell scripts were being run directly rather than with config_shell. Tue Aug 20 13:08:47 1996 J.T. Conklin * configure.in (v850-*-*): Set up initial $noconfigdirs. * config.sub (basic_machine): Recognize v850. Thu Aug 15 12:19:33 1996 Stan Shebs * mpw-configure: Handle multiple enable/disable options and pass them down recursively, handle -c and -s flags appropriately depending on choice of compiler, add escape mechanism for quoted arguments to gC. Mon Aug 12 13:15:13 1996 Michael Meissner * configure.in (powerpc*-*-*): For eabi, system V.4, Linux, and solaris targets, use config/mt-ppc to set C{,XX}FLAGS_FOR_TARGETS so that -mrelocatable-lib and -mno-eabi are used. * Makefile.in (CONFIGURE_TARGET_MODULES): If target compiler does not support --print-multi-lib, don't abort. Thu Aug 8 12:18:59 1996 Klaus Kaempf * make-all.com: Run config-a-gas. * setup.com: Don't copy subdirectory files around. Tue Jul 30 17:49:31 1996 Brendan Kehoe * configure.in (*-*-ose): Remove exclusion of libgloss for this target, it now compiles correctly. Sat Jul 27 15:10:43 1996 Stan Shebs * mpw-config.in: Generate Mac include for elf/dwarf2.h. Tue Jul 23 10:47:04 1996 Martin M. Hunt * configure.in (d10v-*-*): Remove ld from $noconfigdirs. Mon Jul 22 13:28:51 1996 Brendan Kehoe * configure.in (native_only): Add prms. Mon Jul 22 12:27:58 1996 Ian Lance Taylor * Makefile.in (GAS_SUPPORT_DIRS): Add make-all.com and setup.com. (BINUTILS_SUPPORT_DIRS): Likewise. Thu Jul 18 12:55:40 1996 Michael Meissner * configure.in (d10v-*-*): Don't configure ld or gdb until the d10v support is added. Wed Jul 17 14:33:09 1996 Martin M. Hunt * configure.in (d10v-*-*): New target. Mon Jul 15 11:53:00 1996 Jeffrey A Law (law@cygnus.com) * config.guess (HP 9000/811): Recognize this as a PA1.1 machine. Fri Jul 12 23:21:17 1996 Ken Raeburn * Makefile.in (do-tar-gz): New target, split out from tail end of taz target. Run each command separately, don't use pipes. (taz): Use it. Fri Jul 12 12:08:04 1996 Stan Shebs * mpw-configure: Look for g-mpw-make.sed in config/mpw. * mpw-build.in: No builds should depend on building byacc or flex, they are assumed to be installed already. Fri Jul 12 09:52:52 1996 Michael Meissner * Makefile.in (CONFIGURE_TARGET_MODULES): Set r environment variable that CC_FOR_TARGET needs. Thu Jul 11 10:09:45 1996 Michael Meissner * Makefile.in (CONFIGURE_TARGET_MODULES): Determine if the multlib options have changed since the last time the subdirectory was configured, and if it has, reconfigure. (CLEAN_TARGET_MODULES): Delete multilib.out and tmpmulti.out, which CONFIGURE_TARGET_MODULES uses to remember the old multilib options. Wed Jul 10 18:56:59 1996 Doug Evans * Makefile.in (ALL_MODULES,CROSS_CHECK_MODULES,INSTALL_MODULES, CLEAN_MODULES): Add bash. (all-bash): New target. Mon Jul 8 17:33:14 1996 Jim Wilson * configure.in (mips-sgi-irix6*): Use mh-irix6 instead of mh-irix5. Mon Jul 1 13:31:35 1996 Michael Meissner * config.sub (basic_machine): Recognize d10v as a valid processor. Fri Jun 28 12:14:35 1996 Stan Shebs * mpw-configure: Add support for --bindir. * mpw-build.in: Use a GCC-specific build script for GCC actions. Wed Jun 26 17:20:12 1996 Geoffrey Noer * configure.in: add bash, time, gawk to list of hosttools and things to only build for native toolchains Tue Jun 25 23:09:03 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) * Makefile.in (docdir): Remove. Tue Jun 25 19:00:08 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) * Makefile.in (datadir): Set to $(prefix)/share. Mon Jun 24 23:26:07 1996 Geoffrey Noer * configure.in: build diff and patch for cygwin32-hosted toolchains. Mon Jun 24 15:01:12 1996 Joel Sherrill * config.sub: Accept -rtems*. Sun Jun 23 22:41:54 1996 Geoffrey Noer * configure.in: enable dosrel for cygwin32-hosted builds, remove diff from the list of things not buildable via Canadian Cross Sat Jun 22 11:39:01 1996 Jason Merrill * Makefile.in (TARGET_SUBDIR): Move comment to previous line so we don't get ". ". Fri Jun 21 17:24:48 1996 Jim Wilson * configure.in (mips*-sgi-irix6*): Set noconfigdirs appropriately. Thu Jun 20 16:57:40 1996 Ken Raeburn * Makefile.in (taz): Handle case where tex3patch didn't even get checked out. Also, if it was found, put the symlink in a new util subdirectory. Thu Jun 20 12:20:33 1996 Michael Meissner * config.guess (*:Linux:*:*): Add support for PowerPC Linux. Tue Jun 18 14:24:12 1996 Klaus Kaempf (kkaempf@progis.de) * config.sub: Recognize -openvms. * configure.in (alpha*-*-*vms*): Set noconfigdirs. * make-all.com, setup.com: New files. Mon Jun 17 16:34:46 1996 Jason Merrill * Makefile.in (taz): tex3patch moved to texinfo/util. Sat Jun 15 17:13:25 1996 Geoffrey Noer * configure: enable_gdbtk=no for cygwin32-hosted toolchains * configure.in: remove make from disable-if-Can-Cross list enable gdb if ${host} and ${target} are cygwin32 Fri Jun 7 18:16:52 1996 Harlan Stenn * config.guess (i?86-ncr-sysv*): Emit minor release numbers. Recognize the NCR 4850 machine and NCR Pentium-based platforms. Wed Jun 5 00:09:17 1996 Per Bothner * config.guess: Combine mips-mips-riscos cases, and use cpp to distinguish sysv/svr4/bsd variants. Based on a patch from Harlan Stenn . Fri Jun 7 14:24:49 1996 Tom Tromey * configure.in: Added copyright notice. * move-if-change: Added copyright notice. Thu Jun 6 16:27:05 1996 Michael Meissner * configure.in (powerpcle-*-solaris*): Until we get shared libraries working, don't build gdb, sim, make, tcl, tk, or expect. Tue Jun 4 20:41:45 1996 Per Bothner * config.guess: Merge with FSF: Mon Jun 3 08:49:14 1996 Karl Heuer * config.guess (*:Linux:*:*): Add guess for sparc-unknown-linux. Fri May 24 18:34:53 1996 Roland McGrath * config.guess (AViiON:dgux:*:*): Fix typo in recognizing mc88110. Fri Apr 12 20:03:59 1996 Per Bothner * config.guess: Combine two OSF1 rules. Also recognize field test versions. From mjr@zk3.dec.com. * config.guess (dgux): Use /usr/bin/uname rather than uname, because GNU uname does not support -p. From pmr@pajato.com. Tue Jun 4 11:07:25 1996 Tom Tromey * Makefile.in (MAKEDIRS): Removed $(tooldir). Tue May 28 12:30:50 1996 Stan Shebs * mpw-README: Document GCCIncludes. Sun May 26 15:16:27 1996 Fred Fish * configure.in (alpha-*-linux*): Set enable_shared to yes. Tue May 21 15:41:39 1996 Stan Shebs * mpw-configure: Handle --enable-FOO and --disable-FOO. Mon May 20 10:12:29 1996 Geoffrey Noer * configure.in (*-*-cygwin32): Configure make. Tue May 7 14:19:42 1996 Tom Tromey * Makefile.in (inet-install): Quote value of INSTALL_MODULES. Fri May 3 08:57:17 1996 Tom Tromey * Makefile.in (all-inet): Depend on all-perl. * Makefile.in (inet-install): New target. * Makefile.in (all-inet): Depend on all-tcl. (all-inet): Depend on all-send-pr. Tue Apr 30 13:55:51 1996 Michael Meissner * configure.in (powerpcle-*-solaris*): Turn off tk and tcl temporarily. Thu Apr 25 11:48:20 1996 Ian Lance Taylor * configure.in: Don't configure --with-gnu-ld on AIX. Thu Apr 25 06:33:36 1996 Michael Meissner * configure.in (powerpcle-*-solaris*): Turn off gdb temporarily. Tue Apr 23 09:07:39 1996 Tom Tromey * Makefile.in (ALL_MODULES): Added all-inet. (CROSS_CHECK_MODULES): Added check-inet. (INSTALL_MODULES): Added install-inet. (CLEAN_MODULES): Added clean-inet. (all-indent): New target. * configure.in (host_tools): Added inet. (native_only): Added inet. (noconfigdirs): Added inet. Fri Apr 19 15:35:29 1996 Ian Lance Taylor * configure.in: Don't configure libgloss if we are not configuring newlib. Wed Apr 17 19:30:01 1996 Rob Savoye * configure.in: Don't configure libgloss for unsupported architectures. Tue Apr 16 11:17:05 1996 Michael Meissner * Makefile.in (CLEAN_MODULES): Add clean-apache. Mon Apr 15 15:09:05 1996 Tom Tromey * Makefile.in (ALL_MODULES): Include all-apache. (CROSS_CHECK_MODULES): Include check-apache. (INSTALL_MODULES): Include install-apache. (all-apache): New target. * configure.in: Added apache everywhere perl is seen. Mon Apr 15 14:59:13 1996 Michael Meissner * Makefile.in: Add support for clean-{module} and clean-target-{module} rules. Wed Apr 10 21:37:41 PDT 1996 Marilyn E. Sander * configure.in (*-*-ose) do not build libgloss. Mon Apr 8 16:16:20 1996 Michael Meissner * config.guess (prep*:SunOS:5.*:*): Turn into powerpele-unknown-solaris2. Mon Apr 8 14:45:41 1996 Ian Lance Taylor * configure.in: Permit --enable-shared to specify a list of directories. Fri Apr 5 08:17:57 1996 Jason Molenda (crash@phydeaux.cygnus.com) * configure.in (host==solaris): Pass only the first word of $CC to /usr/bin/which when checking if we're using /usr/ccs/bin/cc. Fri Apr 5 03:16:13 1996 Jason Molenda (crash@phydeaux.cygnus.com) * Makefile.in (BASE_FLAGS_TO_PASS): pass down $(MAKE). Thu Mar 28 14:11:11 1996 Tom Tromey * Makefile.in (ALL_MODULES): Include all-perl. (CROSS_CHECK_MODULES): Include check-perl. (INSTALL_MODULES): Include install-perl. (ALL_X11_MODULES): Include all-guile. (CHECK_X11_MODULES): Include check-guile. (INSTALL_X11_MODULES): Include install-guile. (all-perl): New target. (all-guile): New target. * configure.in (host_tools): Include perl and guile. (native_only): Include perl and guile. (noconfigdirs): Don't build guile and perl; no ports have been done. Tue Mar 26 21:18:50 1996 Andrew Cagney * configure (--enable-*): Handle quoted option lists such as --enable-sim-cflags='-g0 -O' better. Thu Mar 21 11:53:08 1996 Michael Meissner * Makefile.in ({,inst}all-target): New rule so we can make and install all of the target directories easily. Wed Mar 20 18:10:57 1996 Andreas Schwab * configure.in: Add missing global flag in sed substitution when deleting `target-' from ${configdirs}. Thu Mar 14 19:15:06 1996 Ian Lance Taylor * Makefile.in (DO_X): Don't get confused if CC contains `=' in an option. * configure.in (mips*-nec-sysvr4*): Use a host_makefile_frag of config/mh-necv4. * install.sh: Correct misspelling of transformbasename. * config.guess: Recognize mips-*-sysv*. Mon Mar 11 15:36:42 1996 Dawn Perchik * config.sub: Recognize mon960. Sun Mar 10 13:18:38 1996 Ian Lance Taylor * configure: Restore Canadian Cross handling of BISON and LEX, removed in Feb 20 change. Fri Mar 8 20:07:09 1996 Per Bothner * README: Suggestions from Torbjorn Granlund : Mention make install. Remove the old copyright date as well the clumsy and rather pointless copyright on the README file. Fri Mar 8 17:51:35 1996 Ian Lance Taylor * Makefile.in ($(CONFIGURE_TARGET_MODULES)): If there is a Makefile after running symlink-tree, then run `make distclean' to avoid clobbering any generated files in srcdir. Tue Mar 5 08:21:44 1996 J.T. Conklin * configure.in (m68k-*-netbsd*): Build everything now. Wed Feb 28 12:25:46 1996 Jason Merrill * Makefile.in (taz): Fix quoting. Tue Feb 27 11:33:57 1996 Doug Evans * configure.in (sparclet-*-*): Build everything now. Tue Feb 27 14:31:51 1996 Andreas Schwab * configure.in (m68k-*-linux*): New host. Mon Feb 26 14:32:44 1996 Ian Lance Taylor * configure: Check for bison before byacc. Tue Feb 20 23:12:35 1996 Stu Grossman (grossman@critters.cygnus.com) * Makefile.in configure: Change the way LEX and BISON/YACC are set. configure now defines DEFAULT_LEX and DEFAULT_YACC by searching PATH. These are used as fallbacks by Makefile.in if flex/bison/byacc aren't in objdir. Mon Feb 19 11:45:30 1996 Ian Lance Taylor * Makefile.in: Make everything which depends upon all-bfd also depend upon all-opcodes, in case --with-commonbfdlib is used. Thu Feb 15 19:50:50 1996 Michael Meissner * configure.in (host *-*-cygwin32): Don't build gdb if we are building NT native compilers on Unix. Thu Feb 15 17:42:25 1996 Ian Lance Taylor * configure.in: Don't get CC from the host Makefile fragment if we can find gcc in PATH, or if this is a Canadian Cross. Move the Solaris test for /usr/ucb/cc to the post target script, just after the compiler sanity test. Wed Feb 14 16:57:40 1996 Ian Lance Taylor * config.sub: Merge with FSF. Tue Feb 13 14:27:48 1996 Ian Lance Taylor * Makefile.in (RPATH_ENVVAR): New variable. (REALLY_SET_LIB_PATH): Use it. * configure.in: On HP/UX, set RPATH_ENVVAR to SHLIB_PATH. Mon Feb 12 15:28:49 1996 Doug Evans * config.sub, configure.in: Recognize sparclet cpu. Mon Feb 12 15:33:59 1996 Christian Bauernfeind * config.guess: Support m68k-cbm-sysv4. Sat Feb 10 12:06:42 1996 Andreas Schwab * config.guess (*:Linux:*:*): Guess m68k-unknown-linux and m68k-unknown-linuxaout from linker help string. Put quotes around $ld_help_string. Thu Dec 7 09:03:24 1995 Tom Horsley * config.guess (powerpc-harris-powerunix): Add guess for port to new target. Thu Feb 8 15:37:52 1996 Brendan Kehoe * config.guess (UNAME_VERSION): Recognize X4.x as an OSF version. Mon Feb 5 16:36:51 1996 Ian Lance Taylor * configure.in: If --enable-shared was used, set SET_LIB_PATH to $(REALLY_SET_LIB_PATH) in Makefile. * Makefile.in (SET_LIB_PATH): New variable. (REALLY_SET_LIB_PATH): New variable. ($(DO_X)): Use $(SET_LIB_PATH). (install.all, gcc-no-fixedincludes, $(ALL_MODULES)): Likewise. ($(NATIVE_CHECK_MODULES), $(CROSS_CHECK_MODULES)): Likewise. ($(INSTALL_MODULES), $(CONFIGURE_TARGET_MODULES)): Likewise. ($(ALL_TARGET_MODULES), $(CHECK_TARGET_MODULES)): Likewise. ($(INSTALL_TARGET_MODULES), $(ALL_X11_MODULES)): Likewise. ($(CHECK_X11_MODULES), $(INSTALL_X11_MODULES)): Likewise. (all-gcc, all-bootstrap, check-gcc, install-gcc): Likewise. (install-dosrel): Likewise. (all-opcodes): Depend upon all-libiberty. Sun Feb 4 16:51:11 1996 Steve Chamberlain * config.guess (*:CYGWIN*): New Sat Feb 3 10:42:35 1996 Michael Meissner * Makefile.in (all-target-winsup): All all-target-libiberty. Fri Feb 2 17:58:56 1996 Michael Meissner * configure.in (noconfigdirs): Add missing # in front of comment. Thu Feb 1 14:38:13 1996 Geoffrey Noer * configure.in: add second pass to things added to noconfigdirs so *-gm-magic can exclude libgloss properly. Thu Feb 1 11:10:16 1996 Stan Shebs * mpw-configure (extralibs_name, rez_name): Set correctly for MWC68K compiler. * mpw-README: Add more info on the necessary build tools. Thu Feb 1 10:22:38 1996 Steve Chamberlain * configure.in, config.sub: Recognize cygwin32. Wed Jan 31 14:17:10 1996 Richard Henderson * config.guess, config.sub: Recognize A/UX. Wed Jan 31 13:52:14 1996 Ian Lance Taylor * config.sub: Merge with gcc/config.sub. Thu Jan 25 11:01:10 1996 Raymond Jou * mpw-build.in (do-binutils): Add build of stamps. Thu Jan 25 17:05:26 1996 James G. Smith * config.sub: Add recognition for mips64vr4100*-* targets. Wed Jan 24 12:47:55 1996 Brendan Kehoe * test-build.mk: Add checking of `hpux9' rather than just `hpux'. Add creation of gconfigargs with `--enable-shared' turned on. ($(host)-stamp-stage2-configured): Pass $(gconfigargs). ($(host)-stamp-stage3-configured): Likewise. (HOLES): Add chatr and ldd. (i386-ncr-sysv4.3*): Add use of /usr/ccs/bin in the PATH and HOLE_DIRS. Wed Jan 24 20:32:30 1996 Torbjorn Granlund * configure: Pass --nfp to recursive configures. Mon Jan 22 10:41:56 1996 Steve Chamberlain * Makefile.in (DLLTOOL): New. (DLLTOOL_FOR_TARGET): New. (EXTRA_HOST_FLAGS): Pass down DLLTOOL. (EXTRA_TARGET_FLAGS): Ditto. (EXTRA_GCC_FLAGS): Ditto. (CONFIGURE_TARGET_MODULES): Ditto. (DO_X): Ditto. * configure: Add DLLTOOL. Fri Jan 19 13:30:15 1996 Stan Shebs SCO OpenServer 5 changes from Robert Lipe : * configure.in (i[345]86-*-sco3.2v5*): Use mh-sysv instead of mh-sco, since old workarounds no longer needed, and don't build ld, since libraries have weak symbols in COFF. Sun Jan 14 23:01:31 1996 Fred Fish * Makefile.in (CONFIGURE_TARGET_MODULES): Add missing ';'. Fri Jan 12 15:25:35 1996 Ian Lance Taylor * configure.in: Make sure that ${CC} can be used to compile an executable. Sat Jan 6 07:23:33 1996 Michael Meissner * Makefile.in (all-gdb): Depend on $(GDB_TK). * configure (GDB_TK): Set GDB_TK to either "all-tcl all-tk" or nothing depending on whether gdbtk is being built. Wed Jan 3 17:54:41 1996 Doug Evans * Makefile.in (newlib.tar.gz): Delete building of newlib's info files. Mon Jan 1 19:09:14 1996 Brendan Kehoe * configure.in (noconfigdirs): Put ld or gas in this early, if the user specifically used --with-gnu-ld=no or --with-gnu-as=no. Sat Dec 30 16:08:57 1995 Doug Evans * config-ml.in: Add support for --disable-{softfloat,m68881,m68000,m68020} on m68*-*-*. Simplify setting of multidirs from --disable-foo. Fri Dec 29 07:56:11 1995 Michael Meissner * Makefile.in (EXTRA_GCC_FLAGS): If any of the make variables LANGUAGES, BOOT_CFLAGS, STMP_FIXPROTO, LIMITS_H_TEST, LIBGCC1_TEST, LIBGCC2_CFLAGS, LIBGCC2_INCLUDES, and ENQUIRE are non-empty, pass them on to the GCC make. (all-bootstrap): New rule that is like all-gcc, except it executes the GCC bootstrap rule instead of the GCC all rule. Wed Dec 27 15:51:48 1995 Doug Evans * config-ml.in (ml_realsrcdir): New, to account for ${subdir}. Tue Dec 26 11:45:31 1995 Michael Meissner * config.guess (AViiON:dgux:*:*): Update from FSF to add pentium DG/UX support. Fri Dec 15 10:01:27 1995 Stan Cox * config.sub (i*86*) Change [345] to [3456] Wed Dec 20 17:41:40 1995 Brendan Kehoe * configure.in (noconfigdirs): Add gas or ld if --with-gnu-as=no or --with-gnu-ld=no. Wed Dec 20 15:15:35 1995 Michael Meissner * config-ml.in (rs6000*, powerpc*): Add switches to control which AIX multilibs get built. Mon Dec 18 17:55:46 1995 Jason Molenda (crash@phydeaux.cygnus.com) * configure.in (i386-win32): Don't build expect if we're not building the tcl subdir. Mon Dec 18 11:47:19 1995 Stan Shebs * Makefile.in: (configure-target-examples, all-target-examples): New targets, configure and build example programs. Fri Dec 15 16:13:03 1995 Stan Shebs * mpw-configure: If an mpw-config.in generated a file mk.sed, use it as input to sedit the generated MPW makefile. * mpw-README: Add a suggestion about Gestalt.h. Wed Dec 13 16:43:51 1995 Ian Lance Taylor * config.sub: Accept *-*-ieee*. Tue Dec 12 11:52:57 1995 Ian Lance Taylor * Makefile.in (local-distclean): Remove $(TARGET_SUBDIR). From Ronald F. Guilmette . Mon Dec 11 15:31:58 1995 Jason Molenda (crash@phydeaux.cygnus.com) * configure.in (host==powerpc-pe): Add many directories to noconfigdirs for powerpc-pe native. (target==i386-win32): add tcl, make to noconfigdirs if canadian cross. (target==powerpc-pe): duplicate i386-win32 entry. Sat Dec 9 14:58:28 1995 Jim Wilson * configure.in (noconfigdirs): Exclude target-newlib for all versions of vxworks, not just vxworks5.1. Mon Dec 4 12:05:40 1995 Stan Shebs * mpw-configure: Add support for exec-prefix. Mon Dec 4 10:22:50 1995 Jeffrey A. Law * config.guess: Recognize HP model 816 machines as having a PA1.1 processor. Mon Dec 4 12:38:15 1995 Ian Lance Taylor * configure: Ignore new autoconf configure options. Thu Nov 30 16:57:33 1995 Per Bothner * config.guess: Recognize Pentium under SCO. From Robert Lipe . Wed Nov 29 13:49:08 1995 J.T. Conklin * configure.in (noconfigdirs): Disable target-libio on v810-*-*. Wed Nov 29 12:12:01 1995 Ian Lance Taylor * configure.in: Don't configure gas for alpha-dec-osf*. Tue Nov 28 17:16:48 1995 Ian Lance Taylor * configure.in: Default to --with-stabs for some targets for which it makes sense: mips*-*-*, alpha*-*-osf*, i[345]86*-*-sysv4* and i[345]86*-*-unixware*. Mon Nov 27 13:44:15 1995 Ian Lance Taylor * config-ml.in: Get list of multidirs using gcc --print-multi-lib rather than basing it on the target. Simplify handling of options controlling which directories to configure. Remove extraneous slash in multi-clean target. Fri Nov 24 17:29:29 1995 Doug Evans * config-ml.in: Prefix more variables with ml_ so they don't collide with configure's. Wed Nov 22 11:27:02 1995 Ian Lance Taylor * configure: Don't turn -v into --v. Tue Nov 21 16:48:02 1995 Doug Evans * configure.in (targargs): Fix typo. * Makefile.in (DEVO_SUPPORT): Add symlink-tree. Tue Nov 21 14:08:28 1995 Ian Lance Taylor * configure.in: Strip --host and --target options from CONFIG_ARGUMENTS, and always configure for --host only. Add --with-cross-host option when building with a cross-compiler. * configure: Canonicalize the arguments put into config.status by always using `=' for an option with an argument. Pass a presumed --host or --target explicitly. Fri Nov 17 17:50:30 1995 Stan Shebs * config.sub: Merge -macos*, -magic*, -pe*, and -win32 cases into general OS recognition case. Fri Nov 17 17:42:25 1995 Jason Molenda (crash@phydeaux.cygnus.com) * configure.in (target_configdirs): add target-winsup only for win32 target systems. Thu Nov 16 14:04:47 1995 Ian Lance Taylor * Makefile.in (all-target-libgloss): Depend upon configure-target-newlib, since when libgloss is built it looks to see if the newlib directory exists. Wed Nov 15 14:47:52 1995 Ken Raeburn * Makefile.in (DEVO_SUPPORT): Use config-ml.in instead of cfg-ml-*.in. Wed Nov 15 11:45:23 1995 Ian Lance Taylor * configure: Handle LD and LD_FOR_TARGET when configuring a Canadian Cross. Tue Nov 14 14:56:11 1995 Jason Molenda (crash@phydeaux.cygnus.com) * configure.in (target_libs): add target-winsup. (target==i386-win32): add patch diff flex make to $noconfigdirs. (target==ppcle-pe): remove ld from $noconfigdirs. Tue Nov 14 01:25:50 1995 Doug Evans * Makefile.in (CONFIGURE_TARGET_MODULES): Pass --with-target-subdir. Preserve relative path names in $srcdir. Build symlink tree if configuring cross target dir and srcdir=. (= no VPATH support). (configure-target-libg++): Depend on configure-target-librx. * cfg-ml-com.in, cfg-ml-pos.in: Deleted. * config-ml.in: New file. * symlink-tree: New file. * configure: Ensure srcdir="." if that's what it is. Mon Nov 13 12:34:20 1995 Stan Shebs * mpw-README: Clarify some phrasing, add notes about CodeWarrior includes and FLEX_SKELETON setting. * mpw-configure (--with-gnu-ld): New option, controls whether to use PPCLink or ld with PowerMac GCC. * mpw-build.in (all-grez, do-grez, install-grez): New targets. * mpw-config.in: Configure grez if targeting Mac. * config.sub: Accept pmac and pmac-mpw as names for PowerMacs, accept mpw and mac-mpw as names for m68k Macs, change macos7 to just macos. * configure.in: Configure grez resource compiler if targeting Mac. * Makefile.in (all-grez, install-grez): New targets. Wed Nov 8 17:33:51 1995 Jason Merrill * configure: CXX defaults to gcc, not g++. If we find gcc in the path, set CC to gcc -O2. Tue Nov 7 15:45:17 1995 Ian Lance Taylor * configure: Default ${build} correctly. Avoid picking up extra spaces when reading CC and CXX from Makefile. When doing a Canadian Cross, use plausible default values for numerous variables. * configure.in: When doing a Canadian Cross, don't try to configure tools whose configure script can't handle it. Mon Nov 6 19:32:17 1995 Jim Wilson * cfg-ml-com.in (sh-*-*): Add m2 and ml/m2 to multidirs. Sun Nov 5 00:15:41 1995 Per Bothner * configure: Remove dubious bug reporting address. Fri Nov 3 08:17:54 1995 Per Bothner * Makefile.in ($(CONFIGURE_TARGET_MODULES)): If subdir has configure script, run that instead of this directory's configure. In either case, print a message that we're configuring the sub-dir. Thu Nov 2 23:23:36 1995 Per Bothner * configure.in: Before checking for the existence of various files, use sed to filter out "target-". Thu Nov 2 13:24:56 1995 Ian Lance Taylor * Makefile.in (DO_X): Split rule to decrease command line length for systems with small ARG_MAX values. From phdm@info.ucl.ac.be (Philippe De Muyter). Wed Nov 1 15:18:35 1995 Jason Molenda (crash@phydeaux.cygnus.com) * Makefile.in (all-patch): depend on all-libiberty. Wed Nov 1 12:23:20 1995 Ian Lance Taylor * configure.in: If the only directory in target_configdirs which actually exists is libiberty, then set target_configdirs to empty, to avoid trying to build a target libiberty in a gas or gdb distribution. Tue Oct 31 17:52:39 1995 J.T. Conklin * configure.in (host_makefile_frag): Use m68k-sun-sunos* instead of m68k-sun-* when selecting mh-sun3 to avoid matching NetBSD/sun3 systems. Tue Oct 31 16:57:32 1995 Jim Wilson * configure.in (copy_dirs): Use sys-include instead of include for --with-headers option. Tue Oct 31 10:29:36 1995 steve chamberlain * Makefile.in, configure.in: Make winsup builds work with new scheme. Mon Oct 30 18:57:09 1995 Ian Lance Taylor * configure.in: Build the linker on AIX. Mon Oct 30 12:27:16 1995 Per Bothner * Makefile.in (CC_FOR_TARGET, CXX_FOR_TARGET): Add $(TARGET_SUBDIR) where needed. Mon Oct 30 12:45:25 1995 Doug Evans * Makefile.in (all-gcc): Fix typo. Sat Oct 28 10:27:59 1995 Per Bothner * Makefile.in ($(CHECK_TARGET_MODULES)): Fix typo. Fri Oct 27 23:14:12 1995 Per Bothner * configure.in: Rename libFOO to target-libFOO, and xiberty to target-xiberty, to provide more flexibility. (target_subdir): Define. Create if cross. Set TARGET_SUBDIR in Makefile to ${target_subdir}. * Makefile.in: Rename all-libFOO -> all-target-libFOO, all-xiberty -> all-target-libiberty, configure-libFOO -> configure-target-libFOO, check-libFOO -> check-target-libFOO, etc. ($(DO_X)): Iterate over TARGET_CONFIGDIRS after SUBDIRS. ($(CONFIGURE_TARGET_MODULES), $(CHECK_TARGET_MODULES), $(ALL_TARGET_MODULES), $(INSTALL_TARGET_MODULES)): Update accordingly. (configure-target-XXX): Depend on $(ALL_GCC), not all-gcc, to allow ALL_GCC="" to only configure. (DEVO_SUPPORT): Add cfg-ml-com.in and cfg-ml-pos.in. (ETC_SUPPORT, ETC_SUPPORT_PFX): Merge; update 'taz' accordingly. (LIBGXX_SUPPORT_DIRS): Remove xiberty. Sat Oct 28 01:53:49 1995 Ken Raeburn * Makefile.in (taz): Build "info" in etc explicitly. Fri Oct 27 09:32:30 1995 Stu Grossman (grossman@cygnus.com) * configure.in: Make sure that CC is undefined (as opposed to null) if toplevel/config/mh-{host} doesn't define it. Fixes a problem with autoconf trying to configure on a host without GCC. Thu Oct 26 22:35:01 1995 Stan Shebs * mpw-configure: Set host alias from choice of host compiler, only use generic MPW Makefile sed if present, edit a file named "hacked_Makefile.in" instead of "Makefile.in" if present. * mpw-README: Add problem notes about CW6 and CW7. Thu Oct 26 05:45:10 1995 Ken Raeburn * Makefile.in (taz): Use ";" instead of ";;". Wed Oct 25 15:18:24 1995 Per Bothner * Makefile.in (taz): Grep for '^diststuff:' or '^info:' in sub-directory Makefiles, instead of using DISTSTUFFDIRS and DISTDOCDIRS. (DISTSTUFFDIRS, DISTDOCDIRS): Removed - no longer used. (newlib.tar.gz): Don't pass DISTDOCDIRS to recursive make. Wed Oct 25 14:43:55 1995 Per Bothner * Makefile.in (DISTDOCDIRS): Remove ld gprof bnutils gas libg++ gdb and gnats, because they are now subsumed by DISTSTUFFDIRS. Move bfd to DISTSTUFFDIRS. Tue Oct 24 18:19:09 1995 Jason Molenda (crash@phydeaux.cygnus.com) * Makefile.in (X11_LIB): Removed. (X11_FLAGS_TO_PASS): pass only X11_EXTRA_CFLAGS and X11_EXTRA_LIBS. * configure.in (host_makefile_frag): mh-aix & mh-sun removed. Sun Oct 22 13:04:42 1995 Michael Meissner * cfg-ml-com.in (powerpc*): Shorten some of the multilib directory names. Fri Oct 20 18:02:10 1995 Michael Meissner * cfg-ml-com.in (powerpc*-eabi*): Add mcall-aixdesc varients. Thu Oct 19 10:40:57 1995 steve chamberlain * configure.in (i[345]86-*-win32): Always build newlib. Don't configure cvs, autoconf or texinfo. * Makefile.in (LD_FOR_TARGET): New. (BASE_FLAGS_TO_PASS, EXTRA_TARGET_FLAGS, CONFIGURE_TARGET_MODULES): Pass down LD_FOR_TARGET. Wed Oct 18 15:53:56 1995 steve chamberlain * winsup: New directory. * Makefile.in: Build winsup. * configure.in: Winsup is configured when target is win32. Can only build win32 target GDB when native. Mon Oct 16 09:42:31 1995 Jeffrey A Law (law@cygnus.com) * config.guess: Recognize HP model 819 machines as having a PA 1.1 processor. Mon Oct 16 10:49:43 1995 Ian Lance Taylor * configure: Fix sed loop which substitutes for CC and CXX to avoid bug found in various sed implementations. Wed Oct 11 16:16:20 1995 Michael Meissner * cfg-ml-com.in (powerpc-*-eabisim): Delete separate rule for simulator. Use standard powerpc-*-eabi*. Mon Oct 9 17:21:56 1995 Ian Lance Taylor * configure.in: Stop putting gas and binutils in noconfigdirs for powerpc-*-aix* and rs6000-*-*. Mon Oct 9 12:38:40 1995 Michael Meissner * cfg-ml-com.in (powerpc*-*-eabisim*): Add support for building -mcall-aixdesc libraries. Fri Oct 6 16:17:57 1995 Ken Raeburn Mon Sep 25 22:49:32 1995 Andreas Schwab * config.sub (arm | armel | armeb): Fix shell syntax. Fri Oct 6 14:40:28 1995 Michael Meissner * cfg-ml-com.in ({powerpc,rs6000}-ibm-aix*): Add multilibs for -msoft-float and -mcpu=common support. (powerpc*-*-eabisim*): Add support for building -mcall-aix libraries. Thu Oct 5 13:26:37 1995 Brendan Kehoe * configure.in: Allow configuration and build of emacs19 for the alpha. Wed Oct 4 22:05:36 1995 Jason Molenda (crash@phydeaux.cygnus.com) * configure.in (CC): Get ^CC, not just any old CC, from ${host_makefile_frag}. Wed Oct 4 21:55:00 1995 Jason Molenda (crash@phydeaux.cygnus.com) * configure.in (CC): Try to get CC from ${srcdir}/${host_makefile_frag}, not ${host_makefile_frag}. Wed Oct 4 21:44:12 1995 Jason Molenda (crash@phydeaux.cygnus.com) * Makefile.in (TARGET_CONFIGDIRS): configure targetdirs only if it exists in $(srcdir). Wed Oct 4 11:52:31 1995 Ian Lance Taylor * configure: If CC and CXX are not set in the environment, set them, based on either an existing Makefile or on searching for gcc in PATH. Substitute for CC and CXX in Makefile. * configure.in: Remove libm from target_libs. Separate target_configdirs from configdirs. If CC is not set in environment, try to get it from a host Makefile fragment. Rewrite changes of configdirs to use skipdirs instead. A few minor tweaks. Take directories out of target_configdirs as they are taken out of configdirs. Remove existing Makefile files from subdirectories. Substitute for TARGET_CONFIGDIRS and CONFIG_ARGUMENTS in Makefile. * Makefile.in (TARGET_CONFIGDIRS): New variable, automatically set by configure.in. (CONFIG_ARGUMENTS): Likewise. (CONFIGURE_TARGET_MODULES): New variable. ($(DO_X)): Loop over TARGET_CONFIGDIRS as well as SUBDIRS. ($(CONFIGURE_TARGET_MODULES)): New target. (configure-libg++, configure-libio): New targets. (all-libg++): Depend upon configure-libg++. (all-libio): Depend upon configure-libio. (configure-libgloss, all-libgloss): New targets. (configure-libstdc++): New target. (all-libstdc++): Depend upon configure-libstdc++. (configure-librx, all-librx): New targets. (configure-newlib): New target. (all-newlib): Depend upon configure-newlib (configure-xiberty): New target. (all-xiberty): Depend upon configure-xiberty. Sat Sep 30 04:32:59 1995 Jason Molenda (crash@phydeaux.cygnus.com) * configure.in (host i[345]86-*-win32): Expand the noconfigdirs again. Thu Sep 28 21:18:49 1995 Stan Shebs * mpw-configure: Fix sed command file name. Thu Sep 28 17:39:56 1995 steve chamberlain * configure.in (host i[345]86-*-win32): Reduce the noconfigdirs again. Wed Sep 27 12:24:00 1995 Ian Lance Taylor * configure.in: Don't configure ld and gdb for powerpc*-*-winnt* or powerpc*-*-pe*, since they are not yet supported. Tue Sep 26 14:30:01 1995 Stan Shebs Add PowerMac support and many other enhancements. * mpw-configure: New option --cc to select compiler to use, paste options set according to --cc into the generated Makefile, generate the Makefile by sed'ing the Unix Makefile.in if mpw-make.sed is present. * mpw-config.in: Don't test for gC1, test for mpw-touch, add forward includes for PowerPC include files. * mpw-build.in: Build using Makefile.PPC if present. (do-byacc, etc): Remove separate version resource builds. (do-gas): Build "stamps" before "all". (do-gcc): Build "stamps-h" and "stamps-c" before "all". * mpw-README: Update to reflect --cc option, PowerMac support, and recently-reported compatibility problems. Fri Sep 22 12:15:42 1995 Doug Evans * cfg-ml-com.in (m68*-*-*): Only build multilibs for embedded m68k systems (-aout, -coff, -elf, -vxworks). (--with-multilib-top): Pass to recursive invocations. Tue Sep 19 13:51:05 1995 J.T. Conklin * configure.in (noconfigdirs): Disable libg++ and libstdc++ on v810-*-*. Mon Sep 18 23:08:26 1995 J.T. Conklin * configure.in (noconfigdirs): Disable bfd, binutils, gas, gcc, gdb, ld and opcodes on v810-*-*. Tue Sep 12 18:03:31 1995 Ian Lance Taylor * Makefile.in (DO_X): Change do-realclean to do-maintainer-clean. (local-maintainer-clean): New target. (maintainer-clean): New target. (realclean): Just depend upon maintainer-clean. Fri Sep 8 17:11:14 1995 J.T. Conklin * configure.in (noconfigdirs): Disable gdb on m68k-*-netbsd*. Fri Sep 8 16:46:29 1995 Ian Lance Taylor * configure.in: Build ld in mips*-*-bsd* case. Thu Sep 7 20:03:41 1995 Ken Raeburn * config.sub: Accept -lites* OS. From Ian Dall. Fri Sep 1 08:06:58 1995 James G. Smith * config.sub: recognise mips64vr4300 and mips64vr4300el as valid targets. Wed Aug 30 21:06:50 1995 Jason Molenda (crash@phydeaux.cygnus.com) * configure.in: treat i386-win32 canadian cross the same as i386-go32 canadian cross. Thu Aug 24 14:53:20 1995 Michael Meissner * cfg-ml-com.in (powerpc*-*-eabisim): Add support for PowerPC running under the simulator to build a reduced set of libraries. (powerpc-*-eabiaix): Add fine grained multilib support added to other powerpc targets yesterday. Wed Aug 23 09:41:56 1995 Michael Meissner * cfg-ml-com.in (powerpc*): Add support for -disable-biendian, -disable-softfloat, -disable-relocatable, -disable-aix, and -disable-sysv to control which multilib libraries get built. Thu Aug 17 16:03:41 1995 Ken Raeburn * configure: Add Makefile.tem to list of files to remove in trap handler. Mon Aug 14 19:27:56 1995 Per Bothner * config.guess (*Linux*): Add missing "exit"s. Also, need specific check for alpha-unknown-linux (uses COFF). Fri Aug 11 15:38:20 1995 Per Bothner * config.guess: Merge with FSF: Wed Jun 28 17:57:27 1995 David Edelsohn * config.guess (AIX4): More robust release numbering discovery. Thu Jun 22 19:01:24 1995 Kenneth Stailey (kstailey@eagle.dol-esa.gov) * config.guess (i386-sequent-ptx): Properly get version number. Thu Jun 22 18:36:42 1995 Uwe Seimet (seimet@iris1.chemie.uni-kl.de) * config.guess (mips:*:4*:UMIPS): New case. Mon Aug 7 09:21:35 1995 Doug Evans * configure.in (i386-go32 host): Fix typo (deja-gnu -> dejagnu). (i386-win32 host): Likewise. Don't build readline. Sat Aug 5 09:51:49 1995 Fred Fish * Makefile.in (GDBTK_SUPPORT_DIRS): Define and pass as part of SUPPORT_FILES to submakes. Fri Aug 4 13:04:36 1995 Fred Fish * Makefile.in (GDB_SUPPORT_DIRS): Add utils. (DEVO_SUPPORT): Add mpw-README, mpw-build.in, mpw-config.h and mpw-configure. Wed Aug 2 16:32:40 1995 Ken Raeburn * configure.in (appdirs): Use =, not ==, in test expression when trying to build the text to print in the warning message for Solaris users. Mon Jul 31 09:56:18 1995 steve chamberlain * cfg-ml-com.in (z8k-*-coff): Add 'std' multilib build. Fri Jul 28 00:16:31 1995 Jeffrey A. Law * config.guess: Recognize lynx-2.3. Thu Jul 27 15:47:59 1995 steve chamberlain * config.sub (z8ksim): Deleted (z8k-*-coff): New, this is the one true name of the target. Thu Jul 27 14:33:33 1995 Doug Evans * cfg-ml-pos.in (dotdot): Work around SunOS sed bug. Thu Jul 27 13:31:05 1995 Fred Fish (fnf@cygnus.com) * config.guess (*:Linux:*:*): First try asking the linker what the default object file format is (elf, aout, or coff). Then if this fails, try previous methods. Thu Jul 27 11:28:17 1995 J.T. Conklin * configure.in: Don't build newlib for *-*-vxworks5.1. Thu Jul 27 11:18:47 1995 Brendan Kehoe * configure.in: Don't build newlib for a29k-*-vxworks5.1. * test-build.mk: Add setting of --with-headers for a29k-vxworks5.1. Tue Jul 25 21:25:39 1995 Doug Evans * cfg-ml-pos.in (MULTITOP): Trim excess trailing "/.". Fri Jul 21 10:41:12 1995 Doug Evans * cfg-ml-com.in: New file. * cfg-ml-pos.in: New file. Wed Jul 19 00:37:27 1995 Jeffrey A. Law * COPYING.NEWLIB: Add HP free copyright to list. Tue Jul 18 10:58:51 1995 Michael Meissner * config.sub: Recognize -eabi* for the system, not just -eabi. Mon Jul 3 13:44:51 1995 Steve Chamberlain * Makfile.in (DLLTOOL_FOR_TARGET): New name, pass it down. * config.sub, configure.in (win32): New target and host. Wed Jun 28 23:57:08 1995 Steve Chamberlain * configure.in: Add i386-pe configuration. Fri Jun 23 14:28:44 1995 Stan Shebs * mpw-build.in (install): Install GDB after LD. Thu Jun 22 17:10:53 1995 Stan Shebs * mpw-config.in (elf/mips.h): Always forward-include, needed for GDB to build. Wed Jun 21 15:17:30 1995 Rob Savoye * testsuite: New directory for customer acceptance and whole tool chain tests. Wed Jun 21 16:50:29 1995 Ken Raeburn * configure: If per-host line isn't found, but AC_OUTPUT is found and a configure script exists, run it instead. Thu Jun 15 21:09:24 1995 Per Bothner * config.guess: Update from FSF, for alpha-dec-winnt3.5 and Crays. Tue Jun 13 21:43:27 1995 Rob Savoye * configure: Set build_{cpu,vendor,os,alias} to host values when --build isn't specified. Mon Jun 5 18:26:36 1995 Jason Merrill * Makefile.in (PICFLAG, PICFLAG_FOR_TARGET): New macros. (FLAGS_TO_PASS): Pass them. (EXTRA_TARGET_FLAGS): Ditto. Wed May 31 22:27:42 1995 Jim Wilson * Makefile.in (all-libg++): Depend on all-libstdc++. Thu May 25 22:40:59 1995 J.T. Conklin * configure.in (noconfigdirs): Enable all packages for i386-unknown-netbsd. Sat May 20 13:22:31 1995 Angela Marie Thomas * configure.in (noconfigdirs): Don't configure tk for i386-go32 hosted builds (DOS builds) Thu May 18 18:08:49 1995 Ken Raeburn Changes for ARM based on patches from Richard Earnshaw: * config.sub: Handle armeb and armel. * configure.in: Omit arm linker only for riscix. Thu May 11 17:23:26 1995 Per Bothner * config.guess: Update from FSF. Tue May 9 15:52:05 1995 Michael Meissner * config.sub: Recognize powerpcle as the little endian varient of the PowerPC. Recgonize ppc as a PowerPC variant, and ppcle as a powerpcle variant. Convert pentium into i586, not i486. Add p5 alias for i586. Map new x86 variants p6, k5, nexgen into i586 temporarily. Tue May 2 16:29:41 1995 Jeff Law (law@snake.cs.utah.edu) * configure.in (hppa*-*-lites*): Treat like hppa*-*-*elf*. Sun Apr 30 21:38:09 1995 Jeff Law (law@snake.cs.utah.edu) * config.sub: Accept -lites* as a basic system type. Thu Apr 27 11:33:29 1995 Michael Meissner (meissner@cygnus.com) * config.guess (*:Linux:*:*): Check for whether the pre-BFD linker is installed, and if so return linuxoldld as the system name. Wed Apr 26 10:59:02 1995 Jeff Law (law@snake.cs.utah.edu) * config.guess: Add hppa1.1-hp-lites support. Tue Apr 25 11:08:11 1995 Rob Savoye * configure.in: Don't build newlib for m68k-vxworks5.1. Wed Apr 19 17:02:43 1995 Jim Wilson * configure.in (mips-sgi-irix6): Use mh-irix5. Fri Apr 14 15:21:17 1995 Doug Evans * Makefile.in (all-gcc): Depend on all-ld (for libgcc1-test). Wed Apr 12 16:06:01 1995 Jason Merrill * test-build.mk: Enable building of shared libraries on IRIX 5 and OSF/1. Fix compiler flags. * build-all.mk: Support Linux and OSF/1 3.0. Fix compiler flags. Tue Apr 11 18:55:40 1995 Doug Evans * configure.in: Recognize --with-newlib. (sparc-*-sunos4*): Build sim, dejagnu, expect, tcl if cross target. Mon Apr 10 14:38:20 1995 Jason Molenda (crash@phydeaux.cygnus.com) * Makefile.in: move {all,check,install}-gdb from *_MODULES to *_X11_MODULES due to gdbtk needing X include files et al. Mon Apr 10 11:42:22 1995 Stan Shebs Merge in support for Mac MPW as a host. (Old change descriptions retained for informational value.) * mpw-config.in: Add generic include forwards for cpu-specific include files in aout and elf directories. * mpw-configure: Added copyright. * mpw-config.in: Check for presence of required build tools. (target_libs): Add newlib. (target_tools): Add examples. (Read Me): Generate as "Read Me for MPW" instead. * mpw-build.in: Base sub-builds on all-foo instead of do-foo. (all-byacc, do-byacc, all-flex, do-flex, do-newlib): New actions. (do-gas, do-gcc, do-gdb, do-ld): Build Version.r first. * mpw-configure: Remove subdir-specific makefile hackery, delete mk.tmp after using it. * mpw-build.in (all): Display start and end times. * mpw-configure (host_canonical): Set. (target_cpu): Always add to makefiles. (ARCHDEFS, EMUL): Add to makefile only if nonempty. (TM_FILE, XM_FILE, NM_FILE): No longer add to makefile. (mpw-mh-mpw): Look for in srcdir and srcroot. Use sed instead of mpw-edit-prefix to edit prefix definitions. * mpw-build.in: (install-only): New target. * mpw-configure (host_alias, target_alias): Rename from hostalias and targetalias, add into generated Makefile. (mk.tmp): If present, add into generated Makefile. * mpw-build.in (all-gas): Build config.h first before gas proper. * mpw-configure (config.status): Write only if changed. * mpw-config.in (readline): Configure it (not built, just used for definitions). * mpw-config.in (elf/mips.h): Add a forward include. * mpw-config.in: Forward-include most .h files in include into extra-include. (readline): Don't build. mpw-build.in (install): Install GDB. * mpw-configure (prefix, mpw_prefix): Handle it. * mpw-config.in (mmalloc, readline): Don't configure. * mpw-build.in (thisscript): Rename to ThisScript. Use mpw-build instead of BuildProgram everywhere. (mmalloc, readline): Don't build. * mpw-README: New file, basic documentation about the MPW port. * mpw-config.in: Use forward-include to create include files. * mpw-configure: Add more things to the top of each configured Makefile, including contents of config/mpw-mh-mpw. * mpw-config.in (extra-include): Create this directory and fill it with Posix-like include files when configuring. * config.sub (apple, mac, mpw): Add various aliases. * mpw-build.in: New file, top-level build script fragment for MPW. * mpw-configure: New file, configure script for MPW. * mpw-config.in: New file, config fragment for MPW. Fri Apr 7 19:33:16 1995 Jim Kingdon (kingdon@lioth.cygnus.com) * configure.in (host_libs): Remove glob, since it is gone from the sources. Fri Mar 31 11:36:17 1995 Jason Molenda (crash@phydeaux.cygnus.com) * Makefile.in: define empty GDB_NLM_DEPS var. * configure.in(target_makefile_frag): use config/mt-netware for netware targets. Thu Mar 30 13:51:43 1995 Ian Lance Taylor * config.sub: Merge in recent FSF changes. Remove linux special cases. Tue Mar 28 14:47:34 1995 Jason Molenda (crash@phydeaux.cygnus.com) Revert this change: Tue Mar 30 10:03:09 1993 Ian Lance Taylor (ian@cygnus.com) * build-all.mk: Use CC=cc -Xs on Solaris. Tue Mar 21 10:43:32 1995 Jim Kingdon (kingdon@lioth.cygnus.com) * glob/*: Removed. Schauer's 24 Feb 1994 readline change made us stop using it. * Makefile.in: Nuke all references to glob subdirectory. Thu Mar 16 13:35:30 1995 Jason Merrill * configure.in: Fix --enable-shared logic in per-host. Mon Mar 13 12:33:15 1995 Ian Lance Taylor * configure.in (*-hp-hpux[78]*): Use mh-hpux8. Mon Mar 6 10:21:58 1995 Jim Kingdon (kingdon@lioth.cygnus.com) * configure.in (noconfigdirs): Don't build gas on AIX, for powerpc*-*-aix* as well as for rs6000*-*-aix*. Wed Mar 1 12:51:53 1995 Ian Lance Taylor * configure: Fix --cache-file to work if the file argument is a relative path. Tue Feb 28 17:36:07 1995 Ian Lance Taylor * configure: If the --cache-file is used, pass it down to configure in subdirectories. Mon Feb 27 12:52:46 1995 Kung Hsu * config.sub: add vxworks29k configuration. Fri Feb 10 16:12:26 1995 Ken Raeburn * Makefile.in (taz): Do "diststuff" part quietly. Sun Feb 5 14:16:35 1995 Doug Evans * config.sub: Mini-merge with gcc/config.sub. Sat Feb 4 12:11:35 1995 Jim Wilson * config.guess (IRIX): Sed - to _. Fri Feb 3 11:54:42 1995 J.T. Conklin * Makefile.in (source-vault, binary-vault): New targets. Thu Jan 26 13:00:11 1995 Michael Meissner * config.sub: Recognize -eabi as a basic system type. Thu Jan 12 13:13:23 1995 Jason Merrill * configure.in (enable_shared stuff): Fix typo. Thu Jan 12 01:36:51 1995 deanm@medulla.LABS.TEK.COM (Dean Messing) * Makefile.in (BASE_FLAGS_TO_PASS): Fix typo in passing LIBCXXFLAGS*. Wed Jan 11 16:29:53 1995 Jason Merrill * Makefile.in (LIBCXXFLAGS_FOR_TARGET): Add -fno-implicit-templates. Mon Jan 9 12:48:01 1995 Jim Kingdon * configure.in (rs6000-*-*): Don't build gas. Wed Jan 4 23:53:49 1995 Ian Lance Taylor * Makefile.in: Use /x/x/ instead of /brokensed/brokensed/, to reduce command line length. (AS_FOR_TARGET): Check for as.new, not Makefile. (NM_FOR_TARGET): Check for nm.new, not Makefile. Wed Jan 4 13:02:39 1995 Per Bothner * config.guess: Merge from FSF. Thu Dec 15 17:11:37 1994 Ian Lance Taylor * configure: Don't use $ when handling program_suffix. Mon Dec 12 12:09:37 1994 Stu Grossman (grossman@cygnus.com) * configure.in: Configure tk for hppa/hpux. Fri Dec 2 15:55:38 1994 Per Bothner * Makefile.in (LIBGXX_SUPPORT_DIRS): Add libstdc++. Tue Nov 29 19:37:56 1994 Per Bothner * Makefile.in: Move -fno-implicit-template from CXXFLAGS to LIBCXXFLAGS. Tests are better run without it. Wed Nov 23 10:29:25 1994 Brendan Kehoe (brendan@lisa.cygnus.com) * Makefile.in (all-ispell): Depend on all-emacs19 instead of all-emacs. Mon Nov 21 11:14:01 1994 J.T. Conklin * configure.in (*-*-netware*): Don't configure xiberty. Mon Nov 14 08:49:15 1994 Stu Grossman (grossman@cygnus.com) * configure.in: Remove tk from native_only list. Fri Nov 11 15:31:26 1994 Bill Cox (bill@rtl.cygnus.com) * build-all.mk: Add mips-ncd-elf target to sun4 targets for special NCD build. Mon Nov 7 20:58:17 1994 Ken Raeburn * Makefile.in (DEVO_SUPPORT): Remove configure.bat and makeall.bat, they're only useful for binutils snapshots. (binutils.tar.gz, gas+binutils.tar.gz): Add configure.bat and makeall.bat to specified SUPPORT_FILES. Mon Nov 7 17:25:18 1994 Bill Cox (bill@cirdan.cygnus.com) * build-all.mk: Add Ericsson targets to sun4 and solaris hosts. Add BNR's sun4 target to solaris host, so their build-from-source will be tested in-house first. Sat Nov 5 18:43:30 1994 Jason Merrill (jason@phydeaux.cygnus.com) * Makefile.in (LIBCFLAGS): New variable. (CFLAGS_FOR_TARGET): Ditto. (LIBCFLAGS_FOR_TARGET): Ditto. (LIBCXXFLAGS): Ditto. (CXXFLAGS_FOR_TARGET): Ditto. (LIBCXXFLAGS_FOR_TARGET): Ditto. (BASE_FLAGS_TO_PASS): Pass them. (EXTRA_TARGET_FLAGS): Ditto. * configure.in: Support --enable-shared. Sat Nov 5 15:44:00 1994 Per Bothner * configure.in (target_libs): Include libstdc++ again. * config.guess: Update from FSF (for FreeBSD). Thu Nov 3 16:32:30 1994 Ken Raeburn * Makefile.in (DEVO_SUPPORT): Include configure.bat and makeall.bat. (DISTDOCDIRS): Add `etc'. (ETC_SUPPORT_PFX): New variable. (taz): Include anything from etc starting with a word in ETC_SUPPORT_PFX. Wed Oct 26 16:19:35 1994 Ian Lance Taylor * config.sub: Update for recent FSF changes. Remove obsolete h8300hds entry. Add -windows* and -osx as basic os. Minor spacing changes. Thu Oct 20 18:41:56 1994 Per Bothner * configure.in (target_libs): Remove libstdc++ for libg++-2.6.1. * config.guess: Merge with FSF. * configure.in: Match on i?86-ncr-sysv4.3, not i?86-ncr-sysv43. Thu Oct 20 19:26:56 1994 Ken Raeburn * configure: Since the "trap 0" handler will override the exit status on many systems, only use it for "exit 1", and make it set a non-zero exit status; reset it before "exit 0". Also, check exit status of config.sub, and error out if it failed. Wed Oct 19 18:49:55 1994 Rob Savoye (rob@cygnus.com) * Makefile.in: (ALL_TARGET_MODULES,INSTALL_TARGET_MODULES) Build and install libgloss. Tue Oct 18 15:25:24 1994 Ian Lance Taylor * Makefile.in (all-binutils): Depend upon all-byacc. * configure.in: Don't build emacs on Irix 5. Mon Oct 17 16:22:12 1994 J.T. Conklin (jtc@phishhead.cygnus.com) * configure.in (*-*-netware*): Add libio. Thu Oct 13 15:51:20 1994 Jason Merrill (jason@phydeaux.cygnus.com) * Makefile.in (ALL_TARGET_MODULES): Add libstdc++. (CHECK_TARGET_MODULES): Ditto. (INSTALL_TARGET_MODULES): Ditto. (TARGET_LIBS): Ditto. (all-libstdc++): Note dependencies. Thu Oct 13 01:43:08 1994 Ken Raeburn * Makefile.in (BINUTILS_SUPPORT_DIRS): Add gas. Tue Oct 11 12:12:29 1994 Jason Merrill (jason@phydeaux.cygnus.com) * Makefile.in (CXXFLAGS): Use -fno-implicit-templates instead of -fexternal-templates. * configure.in (target_libs): Add libstdc++. (noconfigdirs): Add libstdc++ as appropriate. Thu Oct 6 18:00:54 1994 Per Bothner (bothner@kalessin.cygnus.com) * config.guess: Update from FSF. Tue Oct 4 12:05:42 1994 Ian Lance Taylor * configure: Use ${config_shell} when running ${configsub}. Mon Oct 3 14:28:34 1994 Doug Evans * config.sub: No longer recognize h8300h. Mon Oct 3 12:40:54 1994 Ian Lance Taylor * config.sub: Remove extraneous differences between config.sub and gcc/config.sub. Sat Oct 1 00:23:12 1994 Ken Raeburn * Makefile.in (DISTSTUFFDIRS): Add gas. Thu Sep 22 19:04:55 1994 Doug Evans (dje@canuck.cygnus.com) * COPYING.NEWLIB: New file. Mon Sep 19 18:25:40 1994 Per Bothner (bothner@kalessin.cygnus.com) * config.guess (HP-UX): Patch from Harlan Stenn to also emit release level. Wed Sep 7 13:15:25 1994 Jim Wilson (wilson@sphagnum.cygnus.com) * config.guess (sun4*:SunOS:*:*): Change '-JL' to '_JL'. Tue Sep 6 23:23:18 1994 Per Bothner (bothner@kalessin.cygnus.com) * config.sub: Merge nextstep cleanup from FSF. Mon Sep 5 05:01:30 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com) * configure.in (arm-*-*): Don't configure ld for this target. Thu Sep 1 09:35:00 1994 J.T. Conklin (jtc@phishhead.cygnus.com) * configure.in (*-*-netware): don't configure libg++, libio, librx, or newlib. Wed Aug 31 13:52:08 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) * configure.in (alpha-dec-osf*): Use osf*, not osf1*. Don't configure ld--it works, but it doesn't support shared libraries. Sun Aug 28 18:13:45 1994 Per Bothner (bothner@kalessin.cygnus.com) * config.guess (*-unknown-freebsd*): Get rid of possible trailing "(Release)" in version string. Patch from Paul Richards . Sat Aug 27 15:00:49 1994 Per Bothner (bothner@kalessin.cygnus.com) * config.guess: Fix i486-ncr-sysv43 -> i486-ncr-sysv4.3. Fix type: *-next-neststep -> *-next-nextstep. * config.guess: Merge from FSF: Fri Aug 26 18:45:25 1994 Philippe De Muyter (phdm@info.ucl.ac.be) * config.guess: Recognize powerpc-ibm-aix3.2.5. Wed Apr 20 06:36:32 1994 Philippe De Muyter (phdm@info.ucl.ac.be) * config.guess: Recognize UnixWare 1.1 (UNAME_SYSTEM is SYSTEM_V instead of UNIX_SV for UnixWare 1.0). Sat Aug 27 01:56:30 1994 Stu Grossman (grossman@cygnus.com) * Makefile.in (all-gdb): Add dependencies on all-gcc and all-ld to make gdb/nlm/* build after the compiler and linker. Fri Aug 26 14:30:05 1994 Per Bothner (bothner@kalessin.cygnus.com) * config.guess (netbsd, freebsd, linux): Accept any machine, not just i[34]86. (m68k-atari-sysv4): Relocate to match FSF version. * config.guess: More merges from the FSF: Add a space before function call or macro invocation. Tue May 10 16:53:55 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * config.guess: Add trap cmd to remove dummy.c and dummy when interrupted. Wed Apr 20 18:07:13 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * config.guess (dummy.c): Redirect stderr for `hostinfo' command. (dummy): Redirect stderr from compilation of dummy.c. Sat Apr 9 14:59:28 1994 Christian Kranz (kranz@sent5.uni-duisburg.de) * config.guess: Distinguish between NeXTStep 2.1 and 3.x. Fri Aug 26 13:42:20 1994 Ken Raeburn (raeburn@kr-laptop.cygnus.com) * configure: Accept and ignore --cache*, for compatibility with new autoconf. Fri Aug 26 13:05:27 1994 Per Bothner (bothner@kalessin.cygnus.com) * config.guess: Merge from FSF: Thu Aug 25 20:28:51 1994 Richard Stallman * config.guess (Pyramid*:OSx*:*:*): New case. (PATH): Add /.attbin at end for finding uname. (dummy.c): Handle i860-alliant-bsd. Follow whitespace conventions. Wed Aug 17 18:21:02 1994 Tor Egge (tegge@pvv.unit.no) * config.guess (M88*:DolphinOS:*:*): New case. Thu Aug 11 17:00:13 1994 Stan Cox (coxs@dg-rtp.dg.com) * config.guess (AViiON:dgux:*:*): Use TARGET_BINARY_INTERFACE to select whether to use ELF or COFF. Sun Jul 24 16:20:53 1994 Richard Stallman * config.guess: Recognize i860-stardent-sysv and i860-unknown-sysv. Sun May 1 10:23:10 1994 Richard Stallman (rms@mole.gnu.ai.mit.edu) * config.guess: Guess the OS version for HPUX. Tue Mar 1 21:53:03 1994 Karl Heuer (kwzh@hal.gnu.ai.mit.edu) * config.guess (UNAME_VERSION): Recognize aix3.2.4 and aix3.2.5. Fri Aug 26 11:19:08 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) * configure.in: Recognize --with-headers, --with-libs, and --without-newlib. * Makefile.in (all-xiberty): Depend upon all-ld. Wed Aug 24 12:36:50 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) * configure.in: Change i[34]86 to i[345]86. Mon Aug 22 10:58:33 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) * configure (version): A few more tweaks to help message. Fri Aug 19 12:40:25 1994 Per Bothner (bothner@kalessin.cygnus.com) * Makefile.in: Remove (for now) librx as a host library, now that we're building it for target. Fri Aug 19 10:49:17 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) * configure: Fix up help message; from karl@owl.hq.ileaf.com (Karl Berry). Tue Aug 16 16:11:08 1994 Per Bothner (bothner@kalessin.cygnus.com) * configure.in: Also configure librx. Mon Aug 15 16:51:45 1994 Per Bothner (bothner@kalessin.cygnus.com) * Makefile.in: Update various rules to reflect that librx is now needed for libg++. Fri Aug 12 18:07:21 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) * config.sub: Accept mips64orion and mips64orionel as a CPU name. Mon Aug 8 11:36:17 1994 Stan Shebs (shebs@andros.cygnus.com) * configure.in: Configure the examples directory. Thu Aug 4 16:12:36 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) * configure: Simplify Jun 2 1994 change. Wed Aug 3 04:58:16 1994 D. V. Henkel-Wallace (gumby@cygnus.com) * change CC to /usr/latest/bin/gcc for lynx host builds, since /bin/gcc isn't good enough to build gcc. Wed Jul 27 09:07:14 1994 Fred Fish (fnf@cygnus.com) * Makefile.in (GDB_SUPPORT_FILES): Remove (setup-dirs-gdb, gdb.tar.gz, make-gdb.tar.gz): Remove old rules. (gdb.tar.gz): Add new rule to use standard distribution building mechanism. Mon Jul 25 11:10:06 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * configure.in: Warn about use of /usr/ucb/cc on Solaris. From Bill Cox . Sat Jul 23 12:19:46 1994 Per Bothner (bothner@kalessin.cygnus.com) * config.guess: Recognize ISC. Patch from kwzh@gnu.ai.mit.edu. Fri Jul 22 17:53:59 1994 Stu Grossman (grossman@cygnus.com) * configure: Search current dir first in .gdbinit. Fri Jul 22 11:28:30 1994 Per Bothner (bothner@kalessin.cygnus.com) * config.sub: Recognize freebsd (merged from gcc config.sub). Thu Jul 21 14:10:52 1994 Per Bothner (bothner@kalessin.cygnus.com) * config.sub: Refer to NeXT's operating system as nextstep. * config.sub (case $basic_machine): Re-order the cases, to match the order in the FSF version (which is mostly alphabethical). Merge in some additions and changes from the FSF. Sat Jul 16 12:03:08 1994 Stan Shebs (shebs@andros.cygnus.com) * config.guess: Recognize m68k-atari-sysv4 and m88k-harris-csux7. * config.sub: Recognize cxux7. * configure.in: Use mh-cxux for m88k-harris-cxux*. Mon Jul 11 14:37:39 1994 Per Bothner (bothner@kalessin.cygnus.com) * config.sub: Fix typo powerpc -> powerpc-*. Sat Jul 9 13:03:43 1994 Michael Tiemann (tiemann@blues.cygnus.com) * Makefile.in: `all-emacs19' depends on `all-byacc'. * Makefile.in: Add all-emacs19 and install-emacs19 rules (in parallel with all-emacs and install-emacs). Top-level command `make all-emacs19 CC=gcc' now behaves as `make all-emacs CC=gcc'. Thu Jun 30 16:53:42 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) * test-build.mk ($(host)-stamp-stage2-installed): Remove $(relbindir)/make before doing ``make install'', and use $(GNU_MAKE) while doing it. Avoids problem on SunOS with installing over running make binary. ($(host)-stamp-stage3-installed): Likewise. Tue Jun 28 13:43:25 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * config.guess: Recognize Mach. Mon Jun 27 16:41:14 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) * configure: Check ${exec_prefixoption}, not ${exec_prefix}, to see whether --exec-prefix was used. Sun Jun 26 21:15:54 1994 Per Bothner (bothner@kalessin.cygnus.com) * README: Explicitly mention libg++/README. (Zoo's idea.) Tue Jun 21 12:45:55 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * Makefile.in: Add all-librx target similar to all-libproc. Wed Jun 8 23:11:55 1994 Stu Grossman (grossman@cygnus.com) * config.guess: Rearrange tests for Alpha-OSF1 to properly deal with post 1.2 uname bogosity. Thu Jun 9 00:27:59 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * configure: Remove temporary files on receipt of a signal. Tue Jun 7 12:06:24 1994 Ian Lance Taylor (ian@cygnus.com) * configure: If there is a package_makefile_frag, remove ${subdir}/Makefile.tem after copying it in. Mon Jun 6 21:35:02 1994 D. V. Henkel-Wallace (gumby@cygnus.com) * build_all.mk: support rs6000 lynx identifies itself as rs6000-lynx-lynxos2.2.2. Also, use /usr/cygnus/progressive/bin/gcc since /bin/gcc is too feeble to compile a modern gcc. Mon Jun 6 16:06:34 1994 Karen Christiansen (karen@cirdan.cygnus.com) * brought devo/test-build.mk update-to-date with progressive/ test-build.mk. Add lynx targets and hppa flag info. Sat Jun 4 17:23:54 1994 Per Bothner (bothner@kalessin.cygnus.com) * configure.in: Use mh-ncrsvr43. Patch from Tom McConnell . Fri Jun 3 17:47:24 1994 Per Bothner (bothner@kalessin.cygnus.com) * config.guess (i386-unknown-bsdi): No longer need to check #if defined(__bsdi__) && defined(__i386__). Thu Jun 2 18:56:46 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * configure: Set program_transform_nameoption correctly. Thu Jun 2 10:57:06 1994 Karen Christiansen (karen@cirdan.cygnus.com) * brought build-all.mk update-to-date with progressive build-all.mk, added new targets and hppa info. Thu Jun 2 00:12:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * configure: If config.guess result is a prefix of the user specified target, assume a native build and use the user specified target as the host alias. Remove SunOS patch suffix removal hack. * configure.in: Remove SunOS patch suffix removal hack. * Makefile.in (CROSS_CHECK_MODULES): Remove check-flex, since it's in NATIVE_CHECK_MODULES. Wed Jun 1 10:49:41 1994 Bill Cox (bill@rtl.cygnus.com) * Makefile.in: Rename HOST_ONLY to NATIVE. * configure: Delete SunOs patch suffix from host_canonical and build_canonical variables that are prepended to Makefiles. * configure.in: Add comments for easier maintenance. Tue May 31 19:39:47 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * Makefile.in: Add all-libproc target similar to all-gui. Tue May 31 17:16:33 1994 Tom Lord (lord@cygnus.com) * Makefile.in (CHECK_MODULES): split into HOST_ONLY_CHECK_MODULES and CROSS_CHECK_MODULES. Tue May 31 16:36:36 1994 Paul Eggert (eggert@twinsun.com) * config.guess (i386-unknown-bsdi): New system to guess. Wed May 25 16:47:10 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * Makefile.in: Add all-gui target (but not yet build by "all"). Thu May 26 08:53:19 1994 Bill Cox (bill@rtl.cygnus.com) * config.sub: Move deletion of patch suffix from here... * configure.in: To here, at Ian's suggestion. The top- level scripts might need to know of a patch level. Wed May 25 09:15:54 1994 Bill Cox (bill@rtl.cygnus.com) * config.sub: Strip off patch suffix so rtl is recognized as a sunos4.1.3 machine, even though it's been patched. Fri May 20 08:25:49 1994 Steve Chamberlain (sac@deneb.cygnus.com) * Makefile.in (INSTALL_LAST): Delete. (INSTALL_DOSREL): New. Thu May 19 17:12:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * configure.in: Use ld for i[34]86-*-sysv4* and sparc-*-solaris2*. Don't set use_gnu_ld to no for *-*-sysv4; that only controls whether we pass down --with-gnu-ld anyhow. Thu May 19 09:29:12 1994 Steve Chamberlain (sac@cygnus.com) * Makefile.in (INSTALL_LAST): Change operation so it works on more flavors of make. * configure.in (go32): Don't build libg++ or libio. Fri May 13 13:28:34 1994 Steve Chamberlain (sac@cygnus.com) * Makefile.in (Move HOST_PREFIX_1 and friends up so they can be overriden by templates. Sat May 7 16:46:44 1994 Steve Chamberlain (sac@cygnus.com) * configure.in (target==go32): Don't build gdb. * dosrel: New directory. Fri May 6 14:19:25 1994 Steve Chamberlain (sac@cygnus.com) * configure.in (host==go32): Configure dosrel too. * Makefile.in (INTALL_TARGET): Call INSTALL_LAST last. (HOST_CC, HOST_PREFIX, HOST_PREFIX_1): Undefine, they should be set by incoming names or templates. (INSTALL_LAST): New rule. Thu May 5 17:35:05 1994 Stan Shebs (shebs@andros.cygnus.com) * config.sub (sparclitefrw, sparclitefrwcompat): Don't set the os. Thu May 5 20:06:45 1994 Ken Raeburn (raeburn@cujo.cygnus.com) * configure.in (appdirs): New variable. Currently empty, but will be used in gas distribution. If nonempty, lists a set of directories at least one of which must get configured, or top level configuration is considered to have failed. (rs6000-*-lynxos*): Use new file name. Thu May 5 13:38:36 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) Eliminate XTRAFLAGS. * Makefile.in (CC_FOR_TARGET): If newlib exists, refer to the newlib include files using -idirafter, and also use -nostdinc. (CXX_FOR_TARGET): Likewise. (XTRAFLAGS): Removed. (BASE_FLAGS_TO_PASS): Remove XTRAFLAGS_FOR_TARGET. (EXTRA_HOST_FLAGS): Remove XTRAFLAGS. (EXTRA_TARGET_FLAGS, EXTRA_GCC_FLAGS): Likewise. ($(DO_X)): Don't pass down XTRAFLAGS. Thu May 5 00:16:36 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com) * configure.in (mips*-dec-bsd*): New target; do build linker. (mips*-*-bsd*): New target; don't build linker. Wed May 4 20:10:10 1994 D. V. Henkel-Wallace (gumby@cygnus.com) * configure.in: support rs6000-*-lynxos* configuration. support sunos4 as a cross target. * config.sub: look for lynx*, not lynx since the OS version may legitimately be part of the name. Tue May 3 21:48:11 1994 Ken Raeburn (raeburn@cujo.cygnus.com) * configure.in (i[34]86-*-sco*): Move to be with other i386 targets. (romp-*-*): New target. Skip various binary utilities. (vax-*-*): New target. Don't build newlib. (vax-*-vms): Renamed from *-*-vms. Don't build opcodes or newlib. Thu Apr 28 15:03:05 1994 David J. Mackenzie (djm@rtl.cygnus.com) * configure.in: Only set host_makefile_frag if config directory exists. Wed Apr 27 12:14:30 1994 David J. Mackenzie (djm@rtl.cygnus.com) * install.sh: If $dstdir exists, don't check whether each component does. Tue Apr 26 18:11:33 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * test-build.mk (HOLES): Add sleep; used by rcs/src/conf.sh. Mon Apr 25 15:06:34 1994 Stan Shebs (shebs@andros.cygnus.com) * configure.in (*-*-lynxos*): Don't configure newlib for either native or cross Lynx. Sat Apr 16 11:58:16 1994 Doug Evans (dje@canuck.cygnus.com) * config.sub (sparc64-elf): Fix os. (z8k): Remove duplicate. Thu Apr 14 23:33:17 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * Makefile.in (gcc-no-fixedincludes): Touch gcc/include/fixed, not gcc/stmp-fixproto, to try to prevent fixproto from being run. Wed Apr 13 15:14:52 1994 Bill Cox (bill@cygnus.com) * configure: Make file links cleanly even if Lynx fails on an NFS symlink (at least fail cleanly). Mon Apr 11 10:58:56 1994 Jim Wilson (wilson@sphagnum.cygnus.com) * test-build.mk (CC): For mips-sgi-irix4, change -XNh1500 to -XNh2000. Sat Apr 9 15:10:45 1994 David J. Mackenzie (djm@rtl.cygnus.com) * configure: Unknown options are fatal again. Fri Apr 8 12:01:41 1994 David J. Mackenzie (djm@cygnus.com) * configure: Ignore --x-includes and --x-libraries, for Autoconf compatibility. Thu Apr 7 17:31:43 1994 Doug Evans (dje@canuck.cygnus.com) * build-all.mk: Add `clean' target. Wed Apr 6 20:44:56 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * config.guess: Add SINIX support. * configure.in: Add mips-*-sysv4* support. Mon Apr 4 17:41:44 1994 Doug Evans (dje@canuck.cygnus.com) * build-all.mk: Document all useful targets. If canonhost is sparc-sun-solaris2.3, change it to sparc-sun-solaris2. If canonhost is mips-sgi-irix4.0.5H, change it to mips-sgi-irix4. Thu Mar 31 04:55:57 1994 David J. Mackenzie (djm@rtl.cygnus.com) * configure: Support --silent, --quiet. Wed Mar 30 21:37:38 1994 David J. Mackenzie (djm@rtl.cygnus.com) * configure: Support --disable-FEATURE. Tue Mar 29 19:15:05 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * config.guess: Recognize NCR running SVR4.3. Mon Mar 28 14:55:15 1994 Per Bothner (bothner@kalessin.cygnus.com) * config.guess: Make BSDI generate i386-unknown-bsd386. Patch from Paul Eggert . Mon Mar 28 12:54:52 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * configure.in (powerpc-*-aix*): Treat like rs6000-*-*. Sat Mar 26 11:25:48 1994 David J. Mackenzie (djm@rtl.cygnus.com) * configure: Make unrecognized options give nonfatal warnings instead of fatal errors, and pass them to any subdirectory configures in case they recognize them. Make --x equivalent to --with-x. Fri Mar 25 21:52:10 1994 David J. Mackenzie (djm@rtl.cygnus.com) * configure: Add --enable-* options. Clean up usage message and some comments. Thu Mar 24 09:12:53 1994 Doug Evans (dje@canuck.cygnus.com) * Makefile.in (NM_FOR_TARGET): Build tree version is now nm.new. Sun Mar 20 11:28:22 1994 Jeffrey A. Law (law@snake.cs.utah.edu) * configure.in (hppa*-*-*): Enable binutils. Sat Mar 19 11:50:16 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * config.sub: Recognize cisco. Fri Mar 18 16:42:32 1994 Jason Merrill (jason@deneb.cygnus.com) * Makefile.in (CXXFLAGS): Add -fexternal-templates. Tue Mar 15 11:25:55 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * config.guess: about target *-hitachi-hiuxwe2, don't print more than one configuration name. Add comment. Sun Mar 6 23:13:38 1994 Hisashi MINAMINO (minamino@sra.co.jp) * config.guess: about target *-hitachi-hiuxwe2, fixed machine guessing order. [Hitachi's CPU_IS_HP_MC68K macro is incorrect.] Sun Mar 13 09:10:08 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * Makefile.in (TAGS): Just build TAGS in each subdirectory, rather than the "make ls" stuff which used to be here. Fri Mar 11 12:52:39 1994 Per Bothner (bothner@kalessin.cygnus.com) * config.guess: Recognize i[34]86-unknown-freebsd. From Shawn M Carey . Thu Mar 3 14:24:21 1994 Per Bothner (bothner@kalessin.cygnus.com) * configure.in (noconfigdirs for alpha): Remove libg++ and libio. Wed Mar 2 13:28:48 1994 Jim Kingdon (kingdon@deneb.cygnus.com) * config.guess: Check for ptx. Mon Feb 28 16:46:50 1994 Kung Hsu (kung@mexican.cygnus.com) * config.sub: Add os9k checking. Thu Feb 24 07:09:04 1994 Jeffrey A. Law (law@snake.cs.utah.edu) * config.guess: Handle OSF1 running on HPPA processors Fri Feb 18 14:14:00 1994 Ken Raeburn (raeburn@rtl.cygnus.com) * configure: If subdir configure fails, print out a message with subdirectory name, in case subdir's configure code didn't identify itself. Fri Feb 18 12:50:15 1994 Doug Evans (dje@cygnus.com) * configure.in: Remove embedded newlines from configdirs. Avoid mismatches of substrings. Fix matching strings at end of configdirs. Fri Feb 11 15:33:33 1994 Stu Grossman (grossman at cygnus.com) * config.guess: Add Lynx/rs6000 config support. Tue Feb 8 13:41:09 1994 Ken Raeburn (raeburn@rtl.cygnus.com) * configure.in (alpha-dec-osf1*, alpha*-*-*): Build gas. Mon Feb 7 15:42:36 1994 Jeffrey A. Law (law@cygnus.com) * configure.in (hppa*-*-osf*): Treat this just like most other PA configurations (eg no binutils or ld). (hppa*-*-*elf*): These configurations have binutils and ld. Sun Feb 6 16:35:07 1994 Jeffrey A. Law (law@snake.cs.utah.edu) * config.sub (hiux): Fix typo. From m-kasahr@sramhc.sra.co.JP. Sat Feb 5 01:00:33 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * configure.in (rs6000-*-*): Build gas. Wed Feb 2 13:57:57 1994 Jeffrey A. Law (law@snake.cs.utah.edu) * Makefile.in: Avoid bug in losing hpux sed. Wed Feb 2 14:53:05 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * Makefile.in, test-build.mk: Remove MUNCH_NM; it was only needed for GDB and GDB has been fixed to not need it. Sun Jan 30 17:58:06 1994 Ken Raeburn (raeburn@cujo.cygnus.com) * config.guess: Recognize vax hosts. Fri Jan 28 15:29:38 1994 Ken Raeburn (raeburn@cujo.cygnus.com) * configure (while loop): Don't use "break 2" inside case statement -- the case statement isn't an enclosing loop. Mon Jan 24 18:40:06 1994 Per Bothner (bothner@kalessin.cygnus.com) * config.guess: Clean up NeXT support, to allow nextstep on Intel machines. Make OS be nextstep. Sun Jan 23 18:47:22 1994 Richard Kenner (kenner@vlsi1.ultra.nyu.edu) * config.guess: Add alternate forms for Convex. Thu Jan 20 16:13:41 1994 Stu Grossman (grossman at cygnus.com) * configure: Completely rewrite option processing. Take advantage of pattern-matching to avoid invoking test frequently. Also clean up host and target defaulting logic. Mon Jan 17 15:06:56 1994 Ken Raeburn (raeburn@cujo.cygnus.com) * Makefile.in: Replace all occurrances of "rootme" with "r" and "$${rootme}" with "$$r", to increase the likelihood that the do-* commands (plus user environment) will fit SCO limits. Thu Jan 6 11:20:57 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * configure.in: Don't issue warnings about directories which are not being configured if -norecursion is set. Correct test for --with-gnu-as and --with-gnu-ld to not get confused by substring matches. * configure.in: Don't build gas for alpha-dec-osf1*. Tue Jan 4 17:10:19 1994 Stu Grossman (grossman at cygnus.com) * configure: Back out Per's change of 12/19/1993. It changes the behavior of configure in unexpected and confusing ways. Also, use different delim char when calculating program_transform_name so that the name can contain slashes. Sat Jan 1 13:45:31 1994 Rob Savoye (rob@darkstar.cygnus.com) * configure.in, config.sub: Add support for VSTa micro-kernel. Sat Dec 25 20:00:47 1993 Jeffrey A. Law (law@snake.cs.utah.edu) * configure.in: Nuke hacks which were used to get a special version of GAS for HPPA configurations. Sun Dec 19 20:40:44 1993 Per Bothner (bothner@kalessin.cygnus.com) * configure: If only ${target_alias} is given, use that as the default for ${host_alias}. * configure: Add missing back-slashes before nested quotes. Wed Dec 15 18:07:18 1993 david d `zoo' zuhn (zoo@andros.cygnus.com) * Makefile.in (BASE_FLAGS_TO_PASS): add YACC=$(BISON) Tue Dec 14 21:25:33 1993 Per Bothner (bothner@cygnus.com) * config.guess: Recognize some Tektronix configurations. From Kaveh R. Ghazi . Sat Dec 11 11:18:00 1993 Steve Chamberlain (sac@thepub.cygnus.com) * config.sub: Match any flavor of SH. Thu Dec 2 17:16:58 1993 Ken Raeburn (raeburn@cujo.cygnus.com) * configure.in: Don't try to configure newlib for Alpha. Thu Dec 2 14:35:54 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * configure.in: Don't build ld for Irix 5. Don't build gas, libg++ or libio for any Alpha target. * configure.in (mips*-sgi-irix5*): New target; use mh-irix5. Wed Dec 1 17:00:33 1993 Jason Merrill (jason@deneb.cygnus.com) * Makefile.in (GZIPPROG): Renamed from GZIP, which gzip uses for default arguments -- so it tried to compress itself. Tue Nov 30 13:45:15 1993 david d `zoo' zuhn (zoo@andros.cygnus.com) * configure.in (notsupp): ensure that a space is always at the end of the configdirs list, since the grep checks for an explicit space Tue Nov 16 15:04:27 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * configure.in (target i386-sysv4.2): don't build ld, since static versions of many libraries are not available. Tue Nov 16 14:28:12 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * config.guess: Recognize Apollos (using environment variables). * configure.in: Don't configure ld, binutils, or gprof for Apollo. Thu Nov 11 12:03:50 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * config.guess: Recognize Sony news mips running newsos. Wed Nov 10 16:57:00 1993 Mark Eichin (eichin@cygnus.com) * Makefile.in (all-cygnus, build-cygnus): "fi else" needs to be "fi ; else" for bash. Tue Nov 9 15:54:01 1993 Mark Eichin (eichin@cygnus.com) * Makefile.in (BASE_FLAGS_TO_PASS): pass SHELL. Fri Nov 5 08:07:27 1993 D. V. Henkel-Wallace (gumby@blues.cygnus.com) * config.sub: accept unixware as an alias for svr4.2. Fix some inconsistancies with the gcc version. Fri Nov 5 15:14:12 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * Makefile.in (DISTDOCDIRS): Add gdb. Fri Nov 5 11:59:42 1993 Per Bothner (bothner@kalessin.cygnus.com) * Makefile.in (DISTDOCDIRS): Add libg++ and libio. Fri Nov 5 10:35:05 1993 Ken Raeburn (raeburn@rover.cygnus.com) * Makefile.in (taz): Only build "info" in DISTDOCDIRS. (DISTDOCDIRS): Don't assume libg++ and gdb folks necessarily want this now. Thu Nov 4 18:58:23 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * config.sub: Accept hiux* as an OS name. * Makefile.in: Change RUNTEST_FLAGS back to RUNTESTFLAGS per etc/make-stds.texi. The underscore came from gcc, and dje now agrees that RUNTESTFLAGS is the correct name. Thu Nov 4 10:49:01 1993 Per Bothner (bothner@kalessin.cygnus.com) * install.sh: Remove 'set -e'. It makes any conditionals in the script useless. * config.guess: Automatically recognize arm-acorn-riscix Patch from Richard Earnshaw (rwe11@cl.cam.ac.uk). Thu Nov 04 08:08:04 1993 Jeffrey Wheat (cassidy@cygnus.com) * Makefile.in: Change RUNTESTFLAGS to RUNTEST_FLAGS Wed Nov 3 22:09:46 1993 Ken Raeburn (raeburn@rtl.cygnus.com) * Makefile.in (DISTDOCDIRS): New variable. (taz): Edit local Makefile.in sooner, instead of proto-toplev Makefile.in later. Build "info" and "dvi" in DISTDOCDIRS. Wed Nov 3 21:31:52 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * configure.in (hppa target): check the source directory for the pagas sub-directory Wed Nov 3 11:12:22 1993 Doug Evans (dje@canuck.cygnus.com) * config.sub: Allow -aout* and -elf*. Wed Nov 3 11:08:33 1993 Ken Raeburn (raeburn@rtl.cygnus.com) * configure.in: Don't build ld on i386-solaris2, same as for sparc-solaris2. Tue Nov 2 14:21:25 1993 Per Bothner (bothner@kalessin.cygnus.com) * Makefile.in (taz): Add texinfo/lgpl.texinfo (for libg++). Tue Nov 2 13:38:30 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * configure.in: Configure gdb for alpha. Mon Nov 1 10:42:54 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * Makefile.in (CXXFLAGS): Add -O. Wed Oct 27 10:45:06 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * config.guess: added support for DG Aviion Tue Oct 26 14:37:37 1993 Ken Raeburn (raeburn@rover.cygnus.com) * configure.in: Produce warning message for subdirectories not configurable for this host/target combination. Don't try to configure gdb for vms. Mon Oct 25 11:22:15 1993 Ken Raeburn (raeburn@rover.cygnus.com) * Makefile.in (taz): Replace "byacc" with "bison -y" in the appropriate files before making "diststuff". (DISTBISONFILES): New var: list of files to be edited. (DISTSTUFFDIRS): Add binutils. Fri Oct 22 20:32:15 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * config.sub: also handle mipsel and mips64el (for little endian mips) Fri Oct 22 07:59:20 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * configure.in: Add * to end of all OS names. Thu Oct 21 11:38:28 1993 Stan Shebs (shebs@rtl.cygnus.com) * configure.in: Build newlib for LynxOS native. Wed Oct 20 09:56:12 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * config.guess: Add support for delta 88k running SVR3. * configure.in: Add comment about HP compiler vs. emacs. Tue Oct 19 16:02:22 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * configure.in: don't build ld on solaris2 (not a viable option due to bugs in getpwnam & getpwuid) Tue Oct 19 15:13:56 1993 Ken Raeburn (raeburn@rtl.cygnus.com) * configure.in: Accept alpha-dec-osf1*, not just -osf1, since config.guess will produce a full version number. Tue Oct 19 15:58:01 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * configure.in: Build linker and binutils for alpha-dec-osf1. Tue Oct 19 11:41:55 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * Makefile.in: Remove -O from CXXFLAGS for consistency with CFLAGS, and gdb/testsuite/Makefile.in. Sat Oct 9 18:39:07 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * configure.in: recognize mips*- instead of mips- Fri Oct 8 14:15:39 1993 Ken Raeburn (raeburn@cygnus.com) * config.sub: Accept linux*coff and linux*elf as operating systems. Thu Oct 7 12:57:19 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * config.sub: Recognize mips64, and mips3 as an alias for it. Wed Oct 6 13:54:21 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * configure.in: Remove alpha-dec-osf*, no longer necessary now that gdb knows how to handle OSF/1 shared libraries. Tue Oct 5 11:55:04 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * configure.in: Recognize hppa*-*-hiux* (currently synonym for hpux). * config.guess: Recognize Hitachi's HIUX. * config.sub: Recognize h3050r* and hppahitachi. Remove redundant cases for hp9k[23]*. Mon Oct 4 16:15:09 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * configure.in: default to '--with-gnu-as' and '--with-gnu-ld' if gas and ld are in the source tree and are in ${configdirs}. If ${use_gnu_as} or ${use_gnu_ld} are 'no', then don't set the --with options (but still pass them down on the command line, if they were explicitly specified). Fri Sep 24 19:11:13 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * configure: substitute SHELL value in Makefile.in with ${CONFIG_SHELL} Thu Sep 23 18:05:13 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * configure.in: Build gas, ld, and binutils for *-*-sysv4* and *-*-solaris2* targets. Sun Sep 19 17:01:41 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * Makefile.in: define M4, and pass it down to sub-makes; all-autoconf now depends on all-m4 Sat Sep 18 00:38:23 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * Makefile.in ({AR,RANLIB}_FOR_TARGET): make contingent on presence of {ar,ranlib} instead of a configured directory Wed Sep 15 08:41:44 1993 Jim Kingdon (kingdon@cirdan.cygnus.com) * config.guess: Accept 34?? as well as 33?? for NCR. Mon Sep 13 12:28:43 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * configure.in: grab mt-hppa for HPPA targets; use 'gas ' instead of 'gas' in sed commands, since 'gash' is now in the tree as well. Fri Sep 10 11:23:52 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * configure: grab values for $(CC) and $(CXX) from the environment, so that someone can do "CC=gcc configure; make" and have it work right (matching the way that autoconf works now) * configure.in, Makefile.in: add support for gash, the tcl interface to Galaxy * config.guess: add NetBSD variants (hp300, x86) Thu Sep 9 16:48:52 1993 Jason Merrill (jason@deneb.cygnus.com) * install.sh: Support -d option (in the manner of SunOS 4 install, as it is more deterministic than that of GNU install) (chmodcmd): Set file to mode 755 by default (should also do default chgrp and chown, but I don't feel like dealing with that now) Tue Sep 7 11:59:39 1993 Doug Evans (dje@canuck.cygnus.com) * config.sub: Remove h8300hhms alias. Tue Aug 31 11:00:09 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * configure.in: Match *-*-solaris2* not *-sun-solaris2*. Mon Aug 30 18:29:10 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * Makefile.in (gcc-no-fixedincludes): touch stmp-fixproto as well as stmp-fixinc Wed Aug 25 16:35:59 1993 K. Richard Pixley (rich@sendai.cygnus.com) * config.sub: recognize m88110-bug-coff. Tue Aug 24 10:23:24 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * Makefile.in (all-libio): all dependencies on the toolchain used to build this (gcc, gas, ld, etc) Fri Aug 20 17:24:24 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * config.guess: Deal with OSF/1 1.3 on alpha. Thu Aug 19 11:43:04 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * install.sh: add some 'else true' clauses for portability * configure.in: don't build libio for h8[35]00-*-* targets Tue Aug 17 19:02:31 1993 Per Bothner (bothner@kalessin.cygnus.com) * Makefile.in: Add support for new libio. Sun Aug 15 20:48:55 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * install.sh: If one command fails, don't try the rest. Don't try to remove $dsttmp (via trap) unless we have already created it. If $src doesn't exist, detect it and exit with an error. * config.guess: Recognize BSD on hp300. Wed Aug 11 18:35:13 1993 Per Bothner (bothner@kalessin.cygnus.com) * config.guess: Map (9000/[34]??:HP-UX:*:*) to m68k-hp-hpux. Bug report from "Hamish (H.I.) Macdonald" . Wed Aug 11 15:37:51 1993 Jason Merrill (jason@deneb.cygnus.com) * Makefile.in (all-send-pr): depends on all-prms Wed Aug 11 16:56:03 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * config.guess: Fix typo (9000/8??:4.3bsd -> 9000/7??:4.3bsd). Fri Aug 6 14:45:02 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * config.guess: From michael@mercury.cs.mun.ca (Michael Rendell): Added test for mips-mips-riscos5. Thu Aug 5 15:45:08 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * configure.in: use mh-hp300 for 68k HP hosts Mon Aug 2 11:56:53 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * configure: add support for CONFIG_SHELL, so that you can use some alternate shell for evaluating configure scripts Sun Aug 1 11:36:27 1993 Fred Fish (fnf@deneb.cygnus.com) * Makefile.in (make-gdb.tar.gz): Sed bug reporting address in configure script to bug-gdb@prep.ai.mit.edu when building distribution archive. * Makefile.in (COMPRESS): Remove def. * Makefile.in (gdb.tar.gz, make-gdb.tar.gz): Renamed from gdb.tar.Z and make-gdb.tar.Z respectively. * Makefile.in (make-gdb.tar.gz): Now only build gzip'd archive. * Makefile.in (make-gdb.tar.gz): Minor changes to move closer to convergence with 'taz' target in Makefile.in. Fri Jul 30 12:34:57 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * install.sh (dsttmp): use trap to ensure that tmp files go away on error conditions Wed Jul 28 11:57:36 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * Makefile.in (BASE_FLAGS_TO_PASS): remove LOADLIBES Tue Jul 27 12:43:40 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * Makefile.in (install-dirs): Deal with a prefix like /gnu; its parent is '/' not ''. * Makefile.in (DEVO_SUPPORT): Add comments about ChangeLog. Fri Jul 23 09:53:37 1993 Jason Merrill (jason@wahini.cygnus.com) * configure: if ${newsrcdir}/configure doesn't exist, don't assume that ${newsrcdir}/configure.in does. Tue Jul 20 11:28:50 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) * test-build.mk: support for CONFIG_SHELL Mon Jul 19 21:54:46 1993 Fred Fish (fnf@deneb.cygnus.com) * config.sub (netware): Add as a basic system type. Wed Jul 14 12:03:11 1993 K. Richard Pixley (rich@sendai.cygnus.com) * Makefile.in (Makefile): depend on configure.in. Also drop the $(srcdir)/ from the dependency on Makefile.in. Tue Jul 13 20:10:58 1993 Doug Evans (dje@canuck.cygnus.com) * config.sub: Recognize h8300hhms as h8300h-hitachi-hms. (h8300hhms is temporary until multi-libraries are implemented). * configure.in: Handle h8300h too. Sun Jul 11 17:35:27 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * config.guess: Recognize dpx/2 as m68k-bull-sysv3. Thu Jul 8 18:26:12 1993 John Gilmore (gnu@cygnus.com) * configure: Remove extraneous output when guessing host type. * config.guess: Remove extraneous output when guessing using C compiler rather than uname, or when guessing fails. Wed Jul 7 17:58:14 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com) * Makefile.in: remove all.cross and install.cross targets * configure: remove CROSS=-DCROSS_COMPILE and ALL=all.cross definitions Tue Jul 6 10:39:44 1993 Steve Chamberlain (sac@phydeaux.cygnus.com) * configure.in (target sh): Build gprof. Thu Jul 1 16:52:56 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * config.sub: change -solaris to -solaris2 Thu Jul 1 15:46:16 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * configure.in: Use config/mh-riscos for mips-*-sysv*. Wed Jun 30 09:31:58 1993 Ian Lance Taylor (ian@cygnus.com) * configure: Correct error message for missing Makefile.in to print correct directory. Tue Jun 29 13:52:16 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * install.sh: kludge around 386BSD shell bug Tue Jun 29 13:06:49 1993 Per Bothner (bothner@rtl.cygnus.com) * config.guess: Recognize NeXT. * config.guess: Recognize i486-ncr-sysv4. * Makefile.in (taz): rm $(TOOL)-$$VER before linking. Tue Jun 29 12:50:57 1993 Ian Lance Taylor (ian@cygnus.com) * Makefile.in (MAKEINFOFLAGS): New variable. (FLAGS_TO_PASS): Pass MAKEINFO as MAKEINFO MAKEINFOFLAGS. * build-all.mk, test-build.mk: Pass down --no-split as MAKEINFOFLAGS when hosted on DOS. Compile DOS hosted without -g. Thu Jun 24 13:39:11 1993 Per Bothner (bothner@rtl.cygnus.com) * Makefile.in (DEVO_SUPPORT): Add COPYING COPYING.LIB install.sh. Wed Jun 23 12:59:21 1993 Per Bothner (bothner@rtl.cygnus.com) * Makefile.in (libg++.tar.z): New rule. * Makefile.in (taz): Replace 'configure -rm' by 'make distclean'. * Makefile.in (taz): Only do a single chmod. Fri Jun 18 12:03:10 1993 david d `zoo' zuhn (zoo at majipoor.cygnus.com) * install.sh: don't use dirname anymore (replaced with sed usage) Thu Jun 17 18:43:42 1993 Fred Fish (fnf@cygnus.com) * Makefile.in: Change extension for gzip'd files from '.z' to '.gz' per new FSF standard usage. Thu Jun 17 16:58:50 1993 david d `zoo' zuhn (zoo at majipoor.cygnus.com) * configure: put quotes around the final value of program_transform_name Tue Jun 15 16:48:51 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in: new install.sh support; update install-info rules Wed Jun 9 12:31:34 1993 Ian Lance Taylor (ian@cygnus.com) * configure.in: Build diff for crosses, but not for go32 host. * configure.in: Build gprof only for native, and don't build it for mips-*-*, rs6000-*-*, or i[34]86-*-sco*. Mon Jun 7 13:12:11 1993 david d `zoo' zuhn (zoo at deneb.cygnus.com) * configure.in: don't build gas,ld,binutils on for *-*-sysv4 Mon Jun 7 11:40:11 1993 Brendan Kehoe (brendan@lisa.cygnus.com) * configure.in (host_tools): Add prms. Fri Jun 4 13:30:42 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in: install gcc, do installation of $(INSTALL_MODULES) with $(FLAGS_TO_PASS) on the command line * config.sub: Recognize lynx and lynxos Fri Jun 4 10:59:56 1993 Ian Lance Taylor (ian@cygnus.com) * config.sub: Accept -ecoff*, not just -ecoff. Thu Jun 3 17:38:54 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) * Makefile.in (taz): Use .gz suffix instead of .z. (binutils.tar.gz, gas+binutils.tar.gz, gas.tar.gz): Fixed target names. Thu Jun 3 00:27:06 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in (vault-install): add an 'else true' (for Ultrix) Wed Jun 2 18:19:16 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in (install-no-fixedincludes): install gcc last, so that rebuilds that might happen during 'make install' don't get bogus gcc include files Wed Jun 2 16:14:10 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) Change from Utah for HPPA support: * config.guess: Recognize hppa1.x-hp-bsd. Wed Jun 2 11:53:33 1993 Per Bothner (bothner@rtl.cygnus.com) * config.guess: Add support for Motorola Delta 68k, up to r3v7. Patch from pot@fly.cnuce.cnr.it (Francesco Potorti`). Tue Jun 1 17:48:42 1993 Rob Savoye (rob at darkstar.cygnus.com) * config.sub: Add support for rom68k and bug boot monitors. Mon May 31 09:36:37 1993 Jim Kingdon (kingdon@cygnus.com) * Makefile.in: Make all-opcodes depend on all-bfd. Thu May 27 08:05:31 1993 Ian Lance Taylor (ian@cygnus.com) * config.guess: Added special check for i[34]86-univel-sysv4*. Wed May 26 16:33:40 1993 Ian Lance Taylor (ian@cygnus.com) * config.guess: For i[34]86-unknown-sysv4 use UNAME_MACHINE for the processor rather than assuming i486. Wed May 26 09:40:18 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * config.guess: Recognize SunOS6 as Solaris3. Tue May 25 23:03:11 1993 Per Bothner (bothner@cygnus.com) * config.guess: Fix typo. Avoid #elif (not in K&R 1). Recognize SunOS 5.* only (and not [6-9].*) as being Solaris2. Tue May 25 12:44:18 1993 Ian Lance Taylor (ian@cygnus.com) * build-all.mk (all-cross): New target for Canadian Cross. Added Q2 go32 targets. * test-build.mk: Configure go32 cross sparclite-aout and mips-idt-ecoff -with-gnu-ld. Moved build binary directory from PARTIAL_HOLE_DIRS to BUILD_HOLES_DIRS. Mon May 24 15:30:06 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: fix Alpha GDB typo; also, don't build DejaGnu for GO32 hosted toolchains Mon May 24 14:18:41 1993 Rob Savoye (rob at darkstar.cygnus.com) * configure: change so "-exec-prefix" gets passed down rather than "-exec_prefix" so autoconf generated Makefiles get the exec_prefix set right. Fri May 21 10:42:25 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * config.guess: get the Solaris2 minor version number * Makefile.in: add standards.texi and make-stds.texi to ETC_SUPPORT Fri May 21 06:20:52 1993 Brendan Kehoe (brendan@lisa.cygnus.com) * config.guess: Recognize some Sequent platforms. Thu May 20 14:33:48 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in: added the vault-install target * configure.in: actually use the Sun3 makefile fragment that's in config, also added the release dir to configdirs Thu May 20 14:19:18 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) * Makefile.in (taz): Fix modes on stuff in $(TOOL) dir also. Tue May 18 20:26:41 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: remove some program from Alpha targetted toolchains Tue May 18 15:23:19 1993 Ken Raeburn (raeburn@cygnus.com) * Makefile.in (DISTSTUFFDIRS): Renamed from PROTODIRS. Add ld and gprof. (taz): Run "make diststuff" in those directories instead of "make proto-dir". Look for "VERSION=" only at start of line in subdir Makefile. Use "gzip -9" for compression. (TEXINFO_SUPPORT, DIST_SUPPORT, BINUTILS_SUPPORT_DIRS): New vars. (binutils.tar.z): New target. Mon May 17 17:01:15 1993 Ken Raeburn (raeburn@deneb.cygnus.com) * Makefile.in (taz): Include gpl.texinfo. Fri May 14 06:48:38 1993 Ken Raeburn (raeburn@deneb.cygnus.com) * Makefile.in (setup-dirs): Merged into "taz" target. (taz): Only do `proto-dir' stuff if a directory is actually needed for this target. Wed May 12 13:09:44 1993 Ian Lance Taylor (ian@cygnus.com) * Makefile.in (MUNCH_NM): New variable, defined to be $(NM). (FLAGS_TO_PASS): Pass down MUNCH_NM. (HOST_CC, HOST_PREFIX, HOST_PREFIX_1): New variables. (EXTRA_GCC_FLAGS): Pass down HOST_* variables. (gcc-no-fixedincludes): Correct for current gcc Makefile. Tue May 11 10:14:25 1993 Fred Fish (fnf@cygnus.com) * Makefile.in (make-gdb.tar.Z): Add configure, config.guess, config.sub, and move-if-change to gdb testsuite distribution archive, so the testsuite can be extracted, configured, and run separately from the gdb distribution. Blow away the Chill tests that require a Chill compiled executable, since GNU Chill is not yet publically available. Mon May 10 17:22:26 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * test-build.mk: set environment variables in a single command, instead of a list of assignments and exports * config.guess: recognize Alpha/OSF1 systems Mon May 10 14:55:51 1993 K. Richard Pixley (rich@rtl.cygnus.com) * configure: Change help message to prefer --options rather than -options. Mon May 10 05:58:35 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com) * config.sub: Convergent Tech. "miniframe" uses m68010, sez zippy@ecst.csuchico.edu. * config.guess: Recognize miniframe. Sun May 9 17:47:57 1993 Rob Savoye (rob at darkstar.cygnus.com) * Makefile.in: Use srcroot to find runtest rather than rootme. Pass RUNTESTFLAGS and EXPECT down in BASE_FLAGS_TO_PASS. Fri May 7 14:55:59 1993 Ian Lance Taylor (ian@cygnus.com) * test-build.mk: Extensive additions to support building on a machine other than the host. Wed May 5 08:35:04 1993 Ken Raeburn (raeburn@deneb.cygnus.com) * configure (tooldir): Fix for i386-aix again. Mon May 3 19:00:27 1993 Per Bothner (bothner@cygnus.com) * configure, Makefile.in: Change definition of $(tooldir) to match the FSF. Fri Apr 30 15:55:21 1993 Fred Fish (fnf@cygnus.com) * config.guess: Recognize i[34]86/SVR4. Fri Apr 30 15:52:46 1993 Steve Chamberlain (sac@thepub.cygnus.com) * Makefile.in (all-gdb): gdb depends on sim. Thu Apr 29 23:30:48 1993 Fred Fish (fnf@cygnus.com) * Makefile.in (gdb.tar.Z): Make prototype gdb testsuite directory at the same time we make the prototype gdb directory. * Makefile.in (make-gdb.tar.Z): Make the testsuite distribution files at the same time as the gdb base release distribution. Thu Apr 29 12:50:37 1993 Ian Lance Taylor (ian@cygnus.com) * Makefile.in (check): Use individual check targets rather than DO_X rule. (check-gcc): Added. Thu Apr 29 09:50:07 1993 Jim Kingdon (kingdon@cygnus.com) * config.sub: Use sysv3.2 not sysv32 for canonical OS for System V release 3.2. Thu Apr 29 10:33:22 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) * config.sub: Recognize hppaosf. * configure.in: Do configure ld/binutils/gas for it. Tue Apr 27 06:25:34 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com) * configure (tooldir): Alter syntax used to set this, for systems where "\$" isn't handled right, like i386-aix. Thu Apr 22 08:17:35 1993 Ian Lance Taylor (ian@cygnus.com) * configure: Pass program-transform-name, not program_transform_name, to recursive configures. Thu Apr 22 02:58:21 1993 Ken Raeburn (raeburn@cygnus.com) * Makefile.in (gas+binutils.tar.z): New rule for building snapshots of gas+ld+binutils. Mon Apr 19 17:41:30 1993 Per Bothner (bothner@cygnus.com) * config.guess: Recognize AIX3.2 as distinct from 3.1. Sat Apr 17 17:19:50 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: rename m88k-motorola-m88kbcs to m88k-motorola-sysv Tue Apr 13 16:52:16 1993 Brendan Kehoe (brendan@lisa.cygnus.com) * Makefile.in (PRMS): Set back to all-prms. Sat Apr 10 12:04:07 1993 Ian Lance Taylor (ian@cygnus.com) * test-build.mk: Pass -with-gnu-as for known MIPS native and MIPS targets, rather than for MIPS hosts. Fri Apr 9 13:51:06 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: add comment for --with-x default values * config.guess: handle Motorola Delta88 box for SVR3 and SVR4. * Makefile.in: add check-* targets for each of the directories in the tree. Add a definition of RUNTEST that will use the one we just built, if it exists. Pass this down via FLAGS_TO_PASS. Thu Apr 8 09:21:30 1993 Ian Lance Taylor (ian@cygnus.com) * configure.in: Removed obsolete references to bfd_target and target_makefile_frag. * build-all.mk: Set assorted targets for Q2. * config.sub: Recognize z8k-sim and h8300-hms. * test-build.mk: Really don't pass host to configure. (HOLES): Added uname. Wed Apr 7 15:48:19 1993 Ian Lance Taylor (ian@cygnus.com) * configure: Handle an empty program-prefix, program-suffix or program-transform-name correctly. Tue Apr 6 13:48:41 1993 Ian Lance Taylor (ian@cygnus.com) * build-all.mk: -G 8 no longer required for MIPS targets. * test-build.mk: Don't pass host argument to configure; make it guess. Tue Apr 6 10:36:53 1993 Fred Fish (fnf@cygnus.com) * Makefile.in (gdb.tar.Z): Fix for building gzip'd distribution. * Makefile.in (COMPRESS): New macro, like GZIP. Fri Apr 2 09:02:31 1993 Ian Lance Taylor (ian@cygnus.com) * test-build.mk: Use -with-gnu-as for mips-sgi-irix4 as well. * build-all.mk: Set GCC to gcc -O -G 8 for MIPS targets, since gcc with gas currently defaults to -G 0. Thu Apr 1 08:25:42 1993 Ian Lance Taylor (ian@cygnus.com) * Makefile.in (all-flex): flex depends on byacc. * build-all.mk: If host not specified, use config.guess. Pass TAG to test-build.mk as RELEASE_TAG. * test-build.mk (configargs): New variable containing arguments to pass to configure. Set to -with-gnu-as on mips-dec-ultrix. (FLAGS_TO_PASS): Pass down RELEASE_TAG. * config.guess: Use /bin/uname when checking -X argument on SCO, to avoid invoking GNU uname which doesn't understand -X. * test-build.mk: Don't use /usr/unsupported/bin/as on AIX. * configure.in: Build gas for mips-*-*. Wed Mar 31 21:20:58 1993 K. Richard Pixley (rich@rtl.cygnus.com) * Makefile.in (all.normal): insert missing backslash. Wed Mar 31 12:31:56 1993 Ian Lance Taylor (ian@cygnus.com) * build-all.mk: Bump -XNh value to 1500 to match gcc requirements. * Makefile.in: Complete overhaul to merge many almost identical targets. Tue Mar 30 20:17:01 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) * Makefile.in (setup-dirs-gdb): Renamed from setup-dirs. (gdb.tar.Z): Adjusted. * Makefile.in (setup-dirs, taz): New targets; should be general enough to adapt for gdb sometime. Build only .z file. (gas.tar.z): New target. Tue Mar 30 10:03:09 1993 Ian Lance Taylor (ian@cygnus.com) * build-all.mk: Use CC=cc -Xs on Solaris. Thu Mar 25 15:14:30 1993 Fred Fish (fnf@cygnus.com) * Makefile.in: Incorporate changes suggested by wilson@cygnus.com for handling BISON for FSF releases. Thu Mar 25 06:19:48 1993 Ken Raeburn (raeburn@kr-pc.cygnus.com) * configure: Actually implement the change zoo just documented. Wed Mar 24 13:02:44 1993 david d `zoo' zuhn (zoo at poseidon.cygnus.com) * configure: when using config.guess, only set target_alias when it's not already been set (ie, on the command line) Mon Mar 22 23:07:39 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in: add installcheck target, set PRMS to install-prms Sun Mar 21 16:46:12 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure: add support for package_makefile_fragment, handle the case where a directory has a configure.in file but no Makefile.in more gracefully (with an actual understandable error message, even); add support for --without (and add this to the usage message); also explicitly add a --host=${host_alias} to the command line when config.guess is used Sun Mar 21 12:11:58 1993 Jim Wilson (wilson@sphagnum.cygnus.com) * configure: Must use both --host and --target in recursive calls. Thu Mar 18 12:31:35 1993 Ian Lance Taylor (ian@cygnus.com) * Makefile.in: Change deja-gnu to dejagnu. Mon Mar 15 15:44:35 1993 Ian Lance Taylor (ian@cygnus.com) * configure.in (h8300-*-*, h8500-*-*): Don't build libg++. Fri Mar 12 18:30:14 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: canonicalize all instances to *-*-solaris2*, also strip out a number of tools to not build for go32 host Wed Mar 10 12:08:27 1993 K. Richard Pixley (rich@rtl.cygnus.com) * config.guess: add GPL. * Makefile.in, config.guess, config.sub, configure: bump copyrights to 93. Wed Mar 10 07:12:48 1993 Ian Lance Taylor (ian@cygnus.com) * Makefile.in (do-info): Removed obsolete check for existence of localenv file. * Makefile.in (MAKEOVERRIDES): Define to be empty. Wed Mar 10 03:11:56 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in: a couple of 'else true' for decstation, support for TclX * configure.in: configure tclX too; don't remove Tk on RS/6000 anymore Tue Mar 9 16:06:12 1993 K. Richard Pixley (rich@cygnus.com) * Makefile.in (setup-dirs): change invocation of make to $(MAKE). Mon Mar 8 14:52:11 1993 Ken Raeburn (raeburn@cambridge) * config.guess: Recognize i386-ibm-aix (PS/2). * configure.in: Use config/mh-aix386 file for it. Mon Mar 8 11:12:43 1993 Ian Lance Taylor (ian@cygnus.com) * Makefile.in (GCC_FOR_TARGET): Eliminated definition; use CC_FOR_TARGET instead. (BASE_FLAGS_TO_PASS): Pass GCC_FOR_TARGET=$(CC_FOR_TARGET). Wed Mar 3 16:00:28 1993 Steve Chamberlain (sac@ok.cygnus.com) * Makefile.in: Add sim to list of directories sent with gdb Wed Mar 3 11:42:39 1993 Ken Raeburn (raeburn@cygnus.com) * configure.in: Put back mips-dec-bsd* case. Tue Mar 2 21:15:58 1993 Fred Fish (fnf@cygnus.com) (Ultrix 2.2 support from Michael Rendell ) * configure.in (vax-*-ultrix2*): Add Ultrix 2.2 triplet. * config.guess: Change 'VAX*:ULTRIX:*:*' to 'VAX*:ULTRIX*:*:*'. Tue Mar 2 18:11:03 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: remove no-op mips-dec-bsd* in "case $target" * Makefile.in (dir.info): only run gen-info-dir if it exists, (install-info): install dir.info only if it exists, (all-expect, install-expect): pass along X11_FLAGS_TO_PASS Tue Mar 2 09:01:30 1993 Ken Raeburn (raeburn@cygnus.com) * configure.in: For vms target, skip bfd, ld, binutils. Do build gas for mips-dec-bsd. Tue Mar 2 08:35:24 1993 Ian Lance Taylor (ian@cygnus.com) * configure (makesrcdir): If ${srcdir} is relative and not ".", and ${subdir} is not ".", set makesrcdir based on ${invsubdir}. Tue Feb 23 14:18:28 1993 Mike Werner (mtw@poseidon.cygnus.com) * configure.in: Added "dejagnu" to hosttools list. Mon Feb 22 23:28:38 1993 Per Bothner (bothner@rtl.cygnus.com) * config.sub, configure.in, config.guess: Add support for Bosx, an AIX variant from Bull. Patches from F.Pierresteguy@frcl.bull.fr. Sun Feb 21 11:15:22 1993 Mike Werner (mtw@poseidon.cygnus.com) * devo/dejagnu: Initial creation of devo/dejagnu. Migrated dejagnu testcases and support files for testing software tools to reside as subdirectories, currently called "testsuite", within the directory of the software tool. Migrated all programs, support libraries, etc. beloging to dejagnu proper from devo/deja-gnu to devo/dejagnu. These files were moved "as is" with no modifications. The changes to these files which will allow them to configure, build, and execute properly will be made in a future update. Fri Feb 19 20:19:39 1993 Brendan Kehoe (brendan@lisa.cygnus.com) * Makefile.in: Change send_pr to send-pr. * configure.in: Likewise. * send_pr: Renamed directory to send-pr. Fri Feb 19 19:00:13 1993 Per Bothner (bothner@cygnus.com) * Makefile.in: Add some extra semi-colons (needed if SHELL=bash). Fri Feb 19 00:59:33 1993 John Gilmore (gnu@cygnus.com) * README: Update for gdb-4.8 release. * Makefile.in (gdb.tar.Z): Add texinfo/tex3patch. Build gdb-xxx.tar.z (gzip'd) file also. Thu Feb 18 09:16:17 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in: make all-diff depend on all-libiberty Tue Feb 16 16:06:31 1993 K. Richard Pixley (rich@cygnus.com) * config.guess: add vax-ultrix in the spirit of mips-ultrix. Tue Feb 16 05:57:15 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in, Makefile.in: add hello, tar, gzip, recode, indent Tue Feb 16 00:58:20 1993 John Gilmore (gnu@cygnus.com) * Makefile.in (DEVO_SUPPORT): Remove etc directory (ETC_SUPPORT): Only add the files GDB wants from etc/. (gdb.tar.Z): Use ETC_SUPPORT. Use byacc when building the file. Thu Feb 11 20:14:28 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in: makeinfo binary is in a new location Tue Feb 9 12:42:27 1993 Ian Lance Taylor (ian@cygnus.com) * config.sub: Accept -ecoff as an OS. * Makefile.in: Various changes to eliminate a level of make recursion and reduce the required command line length. (BASE_FLAGS_TO_PASS): New variable holding flags passed to all sub-makes. (EXTRA_HOST_FLAGS, EXTRA_TARGET_FLAGS, EXTRA_GCC_FLAGS): New variables holding settings for specific sub-makes. (FLAGS_TO_PASS, TARGET_FLAGS_TO_PASS, GCC_FLAGS_TO_PASS): Rewrote in terms of BASE_FLAGS_TO_PASS. (TARGET_LIBS): New variable listing directories which use TARGET_FLAGS_TO_PASS. (subdir_do): Eliminated. (do-*): New set of targets to replace subdir_do. (various): All targets which used subdir_do now depend on do-*. (local-clean): Renamed from do_clean. (local-distclean): New target, dependency of distclean and realclean. (install-info): Don't create directories. Depend on dir.info rather than calling make recursively. (install-dir.info): Eliminated. (install-info-dirs): Create all info directories here. (dir.info): Depend upon do-install-info. * test-build.mk (HOLES): Added false. Sat Feb 6 14:05:09 1993 Per Bothner (bothner@rtl.cygnus.com) * config.guess: Recognize BSDI and BSDJ (Jolitz 386bsd). Thu Feb 4 20:49:18 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in (info): remove dependency on all-texinfo. The problem was really in texinfo/C, not at this level. Thu Feb 4 13:38:41 1993 Ian Lance Taylor (ian@cygnus.com) * Makefile.in (info): Added dependency on all-texinfo (PR 2112). Thu Feb 4 01:50:53 1993 John Gilmore (gnu@cygnus.com) * Makefile.in (make-gdb.tar.Z): Change BISON to 'bison -y' for GDB releases. Wed Feb 3 17:22:16 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) * configure: Include srcdir in message about target of link not being found. Don't convert `-' to `_' in `with' options being passed to subdirs. Tue Feb 2 18:57:59 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: add uudecode to host_tools * Makefile.in: added {all,install}-uudecode targets, added them to the appropriate lists Tue Feb 2 11:45:53 1993 Ian Lance Taylor (ian@cygnus.com) * Makefile.in (all-gcc): Added dependency on all-gas. * configure.in (mips-*-*): Build ld and binutils. Mon Feb 1 12:35:41 1993 K. Richard Pixley (rich@rtl.cygnus.com) * configure: check return code from mkdir, print error message and exit on failure. Sat Jan 30 16:40:28 1993 John Gilmore (gnu@cygnus.com) * Makefile.in (make-gdb.tar.Z): New location for texinfo.tex. Thu Jan 28 15:09:59 1993 Ian Lance Taylor (ian@cygnus.com) * test-build.mk (HOLES): Added tar, cpio and uudecode. Wed Jan 27 16:50:32 1993 Jim Wilson (wilson@sphagnum.cygnus.com) * config.sub (h8500): Recognize this as a cpu type. Sat Jan 23 20:32:01 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure: source directory missing is no longer a warning * configure.in: recognize irix[34]* instead of irix[34] * Makefile.in: define and pass down X11_LIB Sat Jan 23 13:49:40 1993 Per Bothner (bothner@cygnus.com) * guess-systype: Renamed to ... * config.guess: ... by popular request. * configure.in, Makefile.in: Update accordingly. Thu Jan 21 12:20:55 1993 Per Bothner (bothner@cygnus.com) * guess-systype: Patches from John Eaton : + Add Convex, Cray/Unicos, and Encore/Multimax support. + Execute ./dummy instead of assuming . is in PATH. Tue Jan 19 17:18:06 1993 Per Bothner (bothner@cygnus.com) * guess-systype: New shell script. Attempts to guess the canonical host name of the executing host. Only a few hosts are supported so far. * configure: Call guess-systype if no host is specified. Tue Jan 19 08:26:07 1993 Ian Lance Taylor (ian@cygnus.com) * Makefile.in (gcc-no-fixedincludes): Made to work with current gcc Makefile. Fri Jan 15 10:27:02 1993 Ian Lance Taylor (ian@cygnus.com) * Makefile.in (GCC_FLAGS_TO_PASS): New variable. (all-gcc, install-gcc, subdir_do): Use it. Wed Jan 13 17:06:45 1993 Jim Wilson (wilson@sphagnum.cygnus.com) * Makefile.in: Rename uninstalled gcc driver from gcc to xgcc. Wed Jan 6 20:29:16 1993 Mike Werner (mtw@rtl.cygnus.com) * Makefile.in: Removed explicit setting of SUBDIRS. SUBDIRS is now set exclusively by configure, using configure.in . Wed Jan 6 13:44:11 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * test-build.mk: set $PATH for all builds * Makefile.in: pass TARGET_FLAGS_TO_PASS for xiberty and libm Wed Jan 6 11:02:10 1993 Fred Fish (fnf@cygnus.com) * Makefile.in (GCC_FOR_TARGET): Supply a default that matches the one used in gcc/Makefile.in, so that a null expansion doesn't override the one needed to build gcc with a native cc. Tue Jan 5 07:55:12 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) * configure: Accept -with arguments. Sun Jan 3 15:15:09 1993 Steve Chamberlain (sac@thepub.cygnus.com) * Makefile.in: added h8300sim Tue Dec 29 15:06:00 1992 Ian Lance Taylor (ian@cygnus.com) * build-all.mk: If canonhost is i386-unknown-sco3.2v4, change it to i386-sco3.2v4. Set TARGETS and CFLAGS for i386-sco3.2v4. (all-cygnus, native, build-cygnus): Make $(canonhost)-stamp-3stage-done, not $(host).... * test-build.mk (stamp-3stage-compared): Use tail +10c for i386-sco3.2v4. Added else true to if command. Mon Dec 28 12:08:56 1992 Ken Raeburn (raeburn@cygnus.com) * config.sub: (from FSF) Sequent uses a BSD-like OS. Mon Dec 28 08:32:06 1992 Minh Tran-Le (mtranle@paris.intellicorp.com) * configure.in (i[34]86-*-isc*): added; uses mh-sysv. Thu Dec 24 17:26:24 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: don't remove binutils from Solaris builds Thu Dec 24 14:08:38 1992 david d`zoo' zuhn (zoo@cygnus.com) * Makefile.in: get rid of earlier definitions for *clean, also handle the recursive info rule better Thu Dec 24 12:40:21 1992 Per Bothner (bothner@rtl.cygnus.com) * Makefile.in (mostlyclean, distclean, realclean): Fix to do more-or-less the right thing. Wed Dec 16 10:25:31 1992 Ian Lance Taylor (ian@cygnus.com) * Makefile.in: Add lines defining CC and CXX, and use CXX rather than gcc in definitions of CXX_FOR_BUILD and CXX_FOR_TARGET. Tue Dec 15 00:34:32 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in: change all $(host_cpu)-$(host_vendor)-$(host_os) to $(host_canonical). * configure.in: split the configdirs list into 4 categories (native v. cross, library v. tool) and handle the cross-only and native- only in more reasonable (and correct!) way. Mon Dec 14 17:04:22 1992 Stu Grossman (grossman at cygnus.com) * configure.in (hppa*-*-*): Don't remove bfd and gdb from configdirs anymore. Sun Dec 13 00:37:26 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in: extensive cleanup:: removed all of the explicit clean-* targets, collapsed many wrappers around subdir_do into one, added additional targets to satisfy standards.texi, deleted some old targets, some changes for consistency Fri Dec 11 20:18:02 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: handle some programs as cross-only, and others as native only * test-build.mk: handle partial holes in a more generic manner * Makefile.in: m4 depends on libiberty Thu Dec 3 21:52:11 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: add m4, textutils, fileutils, sed, shellutils, time, wdiff, and find to configdirs * Makefile.in: all, clean, and install rules for the new programs added to configure.in Mon Nov 30 14:54:34 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: use mh-sun for all *-sun-* hosts Fri Nov 27 18:35:54 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in: define flags for X11 include files and library file locations, pass them down to the programs that need this info * build-all.mk: added a 'native' target, to 3stage the native toolchain Sun Nov 22 18:59:13 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: start building libg++ for HP-UX targets Wed Nov 18 19:33:11 1992 John Gilmore (gnu@cygnus.com) * README: Update references to files moved into etc/. Sun Nov 15 09:36:08 1992 Fred Fish (fnf@cygnus.com) * config.sub (i386sol2, i486sol2): i[34]86-unknown-solaris2. * configure.in (i[34]86-*-solaris2*): Use config/mh-sysv4. Thu Nov 12 08:50:42 1992 Ian Lance Taylor (ian@cygnus.com) * configure: accept dash as well as underscore in long option names for FSF compatibility. Wed Nov 11 08:04:37 1992 Ian Lance Taylor (ian@cygnus.com) * config.sub: added -sco3.2v4 support from FSF. Sun Nov 8 21:14:30 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: expand the section that adds or removes directories from the list of programs to build, to handle native vs. cross in addition to host v. native Sat Nov 7 18:52:27 1992 Per Bothner (bothner@rtl.cygnus.com) * Makefile.in: Replace C++ in macro names with CXX. This is less likely to break ... Sat Nov 7 15:16:58 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * test-build.mk: add -w to GNU_MAKE Fri Nov 6 23:10:37 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * config.sub: remove 'sparc'-->'sparc-sun' default transformation, add 'sparc' to list of recognized cpus. This needed to make 'sparc-aout' expand to 'sparc-unknown-aout' instead of 'sparc-sun-aout'. Delete some redundant ose68 variants. Recognize -wrs as an os, then changes that into $CPU-wrs-vxworks. * configure.in: remove most references to gdbtest, regularize target based program removal * test-build.mk: import from p3 tree (many fixes and changes) Fri Nov 6 20:59:00 1992 david d `zoo' zuhn (zoo@cygnus.com) * Makefile.in: added rules to handle tcl, tk, and expect * configure.in: handle those directories if they exist Thu Nov 5 14:35:41 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * config.sub: removed bogus hppabsd and hppahpux names, since "hppa" is not a valid cpu (hppa1.1 or hppa1.0 are, though) Thu Oct 29 00:12:41 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in: all-gcc now depends on all-binutils. all-libg++ depends upon all-xiberty * Makefile.in: changes from p3, including: Thu Oct 8 15:00:17 1992 Ian Lance Taylor (ian@cygnus.com) * Makefile.in (XTRAFLAGS): include newlib directories if newlib/Makefile exists, rather than if host != target. Fri Sep 25 13:41:52 1992 Ian Lance Taylor (ian@cygnus.com) * Makefile.in: added -nostdinc to XTRAFLAGS if we are using gcc from the same source tree and not building a cross-compiler. This matters for the libg++ configuration if reconfiguring a tree that has already been installed. Thu Sep 10 10:35:51 1992 Ian Lance Taylor (ian@cygnus.com) * Makefile.in: added -I for newlib/targ-include to XTRAFLAGS, to pick up the machine and system specific header files. * Makefile.in: added AS_FOR_TARGET, passed down in TARGET_FLAGS_TO_PASS. Added CC_FOR_BUILD, which is intended to be the C compiler to use to create programs which are run in the build environment, set it to default to $(CC), and passed it down in FLAGS_TO_PASS and TARGET_FLAGS_TO_PASS. Mon Sep 7 22:34:42 1992 Ian Lance Taylor (ian@cirdan.cygnus.com) * Makefile.in: add $(host) = $(target) tests back to *_FOR_TARGET. We need them for unusual native builds, like systems without ranlib. * configure: also define $(host_canonical) and $(target_canonical), which are the full, canonical names for the given host and target Sun Nov 1 16:38:17 1992 Per Bothner (bothner@cygnus.com) * Makefile.in: Added separate definitions for C++. Fri Oct 30 11:37:52 1992 Fred Fish (fnf@cygnus.com) * configure.in (configdirs): Add deja-gnu. Fri Oct 23 00:39:18 1992 John Gilmore (gnu@cygnus.com) * README: Update for configure.texi and gdb-4.7 release. Wed Oct 21 21:54:27 1992 John Gilmore (gnu@cygnus.com) * Makefile.in: Move "all" target to top of file. Previously, first target was ".PHONY" which caused BSD4.4 make to build .PHONY when make was run without arguments. Mon Oct 19 01:17:54 1992 John Gilmore (gnu@cygnus.com) * Makefile.in: Add COPYING.LIB to GDB releases, now that there's Library-copylefted code in libiberty. Tue Oct 13 01:22:32 1992 John Gilmore (gnu@cygnus.com) * config.sub: Replace m68kmote with plain old m68k. Fri Oct 9 03:14:24 1992 John Gilmore (gnu@cygnus.com) * Makefile.in: Remove space from blank line, avoid Make complaints. Thu Oct 8 18:41:45 1992 Ken Raeburn (raeburn@cygnus.com) * config.sub: Complain if no argument is given. Added support for 386bsd as OS and target alias. Thu Oct 8 15:07:22 1992 Ian Lance Taylor (ian@cygnus.com) * Makefile.in (XTRAFLAGS): include newlib directories if newlib/Makefile exists, rather than if host != target. Mon Oct 5 03:00:09 1992 Mark Eichin (eichin at tweedledumber.cygnus.com) * config.sub: recognize sparclite-wrs-vxworks. * Makefile.in (install-xiberty): added *-xiberty make rules (from p3.) Added clean-xiberty to clean. Thu Oct 1 17:59:19 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: use *-*-* instead of nested cases for host and target Tue Sep 29 14:11:18 1992 Ian Lance Taylor (ian@cygnus.com) * Makefile.in: added -nostdinc to XTRAFLAGS if we are using gcc from the same source tree and not building a cross-compiler. This matters for the libg++ configuration if reconfiguring a tree that has already been installed. Sep 20 08:53:10 1992 Fred Fish (fnf@cygnus.com) * config.sub (i486v/i486v4): Merge in from FSF version. Fri Sep 18 00:32:00 1992 Mark Eichin (eichin@cygnus.com) * configure: only set PWD if it is already set. Thu Sep 17 23:05:53 1992 Mark Eichin (eichin@cygnus.com) * configure: just set PWD=`pwd` at the top, since Ultrix sh doesn't have unset and all success paths (and most error paths) out set it anyway. (Note: should change all uses of ${PWD=`pwd`} to just ${PWD} to avoid confusion.) Tue Sep 15 16:00:54 1992 Ian Lance Taylor (ian@cygnus.com) * configure: always set $(tooldir) to $(libdir)/$(target_alias), even for a native compilation. Tue Sep 15 02:22:56 1992 John Gilmore (gnu@cygnus.com) Changes to make the gdb.tar.Z rule work better. * Makefile.in (GDB_SUPPORT_DIRS): Add opcodes. (DEVO_SUPPORT): Add configure.texi. (bfd-ilrt.tar.Z): Remove ancient rule. Thu Sep 10 10:43:19 1992 Ian Lance Taylor (ian@cygnus.com) * Makefile.in: added -I for newlib/targ-include to XTRAFLAGS, to pick up the machine and system specific header files. * configure.in, config.sub: added new target m68010-adobe-scout, with alias of adobe68k. Changed configure.in to check for -scout before -sco* to avoid a false match. * Makefile.in: added AS_FOR_TARGET, passed down in TARGET_FLAGS_TO_PASS. Added CC_FOR_BUILD, which is intended to be the C compiler to use to create programs which are run in the build environment, set it to default to $(CC), and passed it down in FLAGS_TO_PASS and TARGET_FLAGS_TO_PASS. Wed Sep 9 12:21:42 1992 Ian Lance Taylor (ian@cygnus.com) * Makefile.in: added TARGET_FLAGS_TO_PASS, CC_FOR_TARGET, AR_FOR_TARGET, RANLIB_FOR_TARGET, NM_FOR_TARGET. Pass TARGET_FLAGS_TO_PASS, which defines CC, AR, RANLIB and NM as the FOR_TARGET variants, to newlib and libg++. Tue Sep 8 17:28:30 1992 Ken Raeburn (raeburn@cambridge.cygnus.com) * Makefile.in (all-gas, all-gdb): Require all-opcodes to be built first. Wed Sep 2 02:50:05 1992 John Gilmore (gnu@cygnus.com) * config.sub: Accept `elf' as an environment. Tue Sep 1 15:48:30 1992 Steve Chamberlain (sac@thepub.cygnus.com) * Makefile.in (all-opcodes): cd into the right directory Sun Aug 30 21:12:11 1992 Ian Lance Taylor (ian@cygnus.com) * configure: added -program_transform_name option, used as argument to sed when installing programs. configure.texi: added documentation for -program_prefix, -program_suffix and -program_transform_name. Thu Aug 27 21:59:44 1992 John Gilmore (gnu@cygnus.com) * config.sub: Accept i486 where i386 ok. Thu Aug 27 13:04:42 1992 Brendan Kehoe (brendan@rtl.cygnus.com) * config.sub: accept we32k Mon Aug 24 14:05:14 1992 Ian Lance Taylor (ian@cygnus.com) * config.sub, configure.in: accept OSE68000 and OSE68k. * Makefile.in: don't create all directories for ``make install''; let the subdirectories create the ones they need. Tue Aug 11 23:13:17 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * COPYING: new file, GPL v2 Tue Aug 4 01:12:43 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in: use the new gen-info-dir, which needs a template argument (which also lives in texinfo) * configure.texi, standards.texi: fix INFO-DIR-ENTRY Mon Aug 3 00:34:17 1992 Fred Fish (fnf@cygnus.com) * config.sub (ncr3000): Change i386 to i486. Thu Jul 23 00:12:17 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * Makefile.in: add install-rcs, install-grep to install-no-fixedincludes, removed install-bison and install-libgcc Tue Jul 21 01:01:50 1992 david d `zoo' zuhn (zoo@cygnus.com) * configure.in: grab the HPUX makefile fragment if on HPUX Mon Jul 20 11:02:09 1992 D. V. Henkel-Wallace (gumby@cygnus.com) * Makefile.in: eradicate bison spoor (ditto libgcc). configure.in: recognise m68{k,000}-ericsson-OSE. es1800 is alias for m68k-ericsson-OSE Sun Jul 19 17:49:02 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: rearrange the parts that remove programs from configdirs, based now on HOST==TARGET or by canonical triple. Fri Jul 17 22:52:49 1992 K. Richard Pixley (rich@rtl.cygnus.com) * test-build.mk: recurse explicitly with -f test-build.mk when appropriate. predicate stage3 and comparison on the existence of gcc. That is, if gcc isn't around, we aren't three-staging. On very clean, also remove ...stamp-co. Build in-place before doing other builds. Thu Jul 16 18:33:09 1992 Steve Chamberlain (sac@thepub.cygnus.com) * Makefile.in, configure.in: add tgas Thu Jul 16 16:05:28 1992 K. Richard Pixley (rich@rtl.cygnus.com) * Makefile.in: a number of changes merged in from progressive. * configure.in: add libm. * .cvsignore: ignore some stuff that comes from test-build.mk. Tue Jul 7 00:24:52 1992 Fred Fish (fnf@cygnus.com) * config.sub: Add es1800 (m68k-ericsson-es1800). Tue Jun 30 20:24:41 1992 D. V. Henkel-Wallace (gumby@cygnus.com) * configure: Add program_suffix (parallel to program_prefix) * Makefile.in: adjust directory-creating script for losing decstation Mon Jun 22 23:43:48 1992 Per Bothner (bothner@cygnus.com) * configure: Minor $subdir-related fixes. Mon Jun 22 18:30:26 1992 Steve Chamberlain (sac@thepub.cygnus.com) * configure: fix various problems with propogating makefile_target_frag in subdirs. * configure.in: config libgcc if its there Fri Jun 19 15:19:40 1992 Stu Grossman (grossman at cygnus.com) * config.sub: HPPA merge. Sun Jun 14 10:29:19 1992 John Gilmore (gnu at cygnus.com) * Makefile.in: Replace all-bison with all-byacc in all dependency lines for other tools (which now use byacc). Fri Jun 12 22:21:57 1992 John Gilmore (gnu at cygnus.com) * config.sub: Add sun4sol2 => sparc-sun-solaris2. Thu Jun 4 12:07:32 1992 Mark Eichin (eichin@cygnus.com) * Makefile.in: make gprof rules similar to byacc rules (instead of vestigal $(unsubdir) that didn't work...) Thu Jun 4 00:37:05 1992 Per Bothner (bothner@rtl.cygnus.com) * config.sub: Add support for Linux. * Makefile.in: Use $(FLAGS_TO_PASS) more consistently (at least for libg++). Tue Jun 02 20:03:00 1992 david d `zoo' zuhn (zoo@cygnus.com) * configure.texi: fix doc for the -nfp option to configure Tue Jun 2 17:20:52 1992 Michael Tiemann (tiemann@cygnus.com) * Makefile.in (all-binutils): ar needs flex, so depend on all-flex. Sun May 31 15:04:08 1992 Mark Eichin (eichin at cygnus.com) * config.sub: changed [^-]+ to [^-][^-]* so that it works under Sun sed. (BSD 4.3 sed doesn't handle [^-]+ either.) * configure.in: added solaris* host_makefile_frag hook. Sun May 31 01:10:34 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * config.sub: changed recognition of m68000 so that various m68k types can be specified via m680[01234]0 Sat May 30 21:01:06 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * config.sub (basic_machine): fix sed so that '-foo' isn't completely substituted out while .+'-foo' loses the '-foo' Wed May 27 23:18:52 1992 Michael Tiemann (tiemann@rtl.cygnus.com) * config.sub ($os): Add -aout. Fri May 22 14:00:02 1992 Per Bothner (bothner@cygnus.com) * configure: If host_makefile_frag is absolute, don't prefix ${invsubdir} (relevant to libg++ auto-configure). Thu May 21 18:00:09 1992 Michael Tiemann (tiemann@rtl.cygnus.com) * Makefile.in (tooldir): Define it. (all-ld): Depend on all-flex. Sun May 10 21:45:59 1992 Per Bothner (bothner@rtl.cygnus.com) * Makefile.in (check): Fix libg++ special case. Fri May 8 08:31:41 1992 K. Richard Pixley (rich@cygnus.com) * configure: do not bury `pwd` into config.status, thus do fewer pwd's. * configure: print the "Building in" message only when building in other than "." AND verbose. * configure: remove -s, rework -v to better accomodate guested configures. * standards.texi: updated to 3 may, fixed librid <-> libdir typo. Fri May 1 18:00:50 1992 K. Richard Pixley (rich@cygnus.com) * Makefile.in: macroize flags passed on recursion. remove fileutils. Thu Apr 30 08:56:20 1992 K. Richard Pixley (rich@cygnus.com) * configure: get makesrcdir right for subdirs deeper than 1. * Makefile.in: pass INSTALL, INSTALL_DATA, INSTALL_PROGRAM on install. Fri Apr 24 15:51:51 1992 K. Richard Pixley (rich@cygnus.com) * Makefile.in: don't print subdir_do or recursion lines. Fri Apr 24 15:22:04 1992 K. Richard Pixley (rich@cygnus.com) * standards.texi: added menu item. * Makefile.in: build and install standards.info. * standards.texi: new file. Wed Apr 22 18:06:55 1992 K. Richard Pixley (rich@rtl.cygnus.com) * configure: test for and move config.status pieces from ${subdir}/. Wed Apr 22 14:38:34 1992 Fred Fish (fnf@cygnus.com) * configure: Test for existance of files before trying to mv them, to avoid numerous non-existance messages. Tue Apr 21 12:31:33 1992 K. Richard Pixley (rich@cygnus.com) * configure: correct final line of config.status. * configure: patch from eggert. Avoids a protection problem if the original Makefile.in is read only. * configure: use move-if-change from gcc to create config.status. Some makefiles depend on config.status to tell if a directory has been reconfigured for a different host. This change prevents those directories from remaking everything in the case where the reconfig was only intended to rebuild a Makefile. * configure: test for config.sub with "config.sub sun4" rather than "config.sub ${host_alias}". Otherwise we can't tell a bad host alias from a missing config.sub. Mon Apr 20 18:16:36 1992 K. Richard Pixley (rich@rtl.cygnus.com) * Makefile.in: explicitly pass CFLAGS on recursion. no longer pass MINUS_G (this can be done with CFLAGS). Default CFLAGS to -g. Fri Apr 17 18:27:51 1992 Per Bothner (bothner@cygnus.com) * configure: mkdir ${subdir} as needed. Wed Apr 15 17:37:22 1992 K. Richard Pixley (rich@cygnus.com) * Makefile.in,configure.in: added autoconf. Wed Apr 15 17:27:34 1992 K. Richard Pixley (rich@rtl.cygnus.com) * Makefile.in: no longer pass against on recursion. * Makefile.in: added .NOEXPORT: so that stray makefile_frag definitions are not inherited. * configure: correct makesrcdir when subdir is . Tue Apr 14 11:56:09 1992 Per Bothner (bothner@cygnus.com) * configure: Add support for 'subdirs' variable, which is like 'configdirs', except that configure doesn't re-invoke itself for subdirs, it just creates a Makefile for each subdir. * configure.texi: Document subdirs. Mon Apr 13 18:50:16 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: added flex to configdirs Mon Apr 13 18:43:55 1992 K. Richard Pixley (rich@cygnus.com) * Makefile.in: remove clean-stamps from clean. Sat Apr 11 03:52:03 1992 John Gilmore (gnu at cygnus.com) * configure.in: Add gdbtest to configdirs. Fri Apr 10 23:11:49 1992 Fred Fish (fnf@cygnus.com) * Makefile.in (MINUS_G): Add macro, default to -g, pass on to recursive makes. * configure.in: Recognize new ncr3000 config. Wed Apr 8 23:08:12 1992 K. Richard Pixley (rich@cygnus.com) * Makefile.in, configure.in: removed references to gdbm. Tue Apr 7 16:48:20 1992 Per Bothner (bothner@cygnus.com) * config.sub: Don't canonicalize os value newsos* to bsd (readline needs to check for newsos). (This fix was earlier made Jan 31, but got re-broken.) Mon Apr 6 14:34:08 1992 Stu Grossman (grossman at cygnus.com) * configure.in: sco is an os, not a vendor! * configure: Quote $( better. Keep various shells happy. Tue Mar 31 16:32:57 1992 K. Richard Pixley (rich@cygnus.com) * Makefile.in: eliminate stamp-files. Mon Mar 30 22:20:23 1992 K. Richard Pixley (rich@cygnus.com) * Makefile.in: add send_pr. remove "force" from .stmp-gprof rule. Supress echoing of all the "if [ -d ... $(MAKE)" lines. Wed Mar 25 15:20:04 1992 Stu Grossman (grossman@cygnus.com) * config.sub: fix iris/iris3. Wed Mar 25 10:34:19 1992 K. Richard Pixley (rich@cygnus.com) * configure: re-add -rm. Tue Mar 24 23:50:16 1992 K. Richard Pixley (rich@cygnus.com) * Maskefile.in: add .stmp-rcs to all. * configure.in: remove gas from rs6000 build, use aix host fragment. Mon Mar 23 19:43:35 1992 K. Richard Pixley (rich@cygnus.com) * configure: pass down site_option during recursion. Thu Mar 19 16:49:36 1992 Stu Grossman (grossman at cygnus.com) * Makefile.in (all.cross): Add .stmp-bfd .stmp-readline. Wed Mar 18 15:29:33 1992 Mike Stump (mrs@cygnus.com) * configure: Change exec_prefix so that it really defaults to prefix. Sat Mar 14 17:20:38 1992 Fred Fish (fnf@cygnus.com) * Makefile.in, configure.in: Add support for mmalloc library. Fri Mar 13 18:44:18 1992 K. Richard Pixley (rich@cygnus.com) * Makefile.in: add stmp dependencies for a few more things. Thu Mar 12 04:56:24 1992 K. Richard Pixley (rich@cygnus.com) * configure: adjusted error message on objdir/srcdir configure collision, per john's suggestion. * Makefile.in: add libiberty stmp to all and all.cross. Wed Mar 11 02:07:52 1992 K. Richard Pixley (rich@cygnus.com) * Makefile.in: remove force dependencies, add grep to all. Tue Mar 10 21:49:18 1992 K. Richard Pixley (rich@mars.cygnus.com) * Makefile.in: drop flex. make stamp files work. * configure: added test for conflicting configuration in srcdir, remove trailing slashes from srcdir. Otherwise emacs gdb mode gets cranky. use relative paths for configure and srcdir whenever possible. Send some error messages to stderr that were going to stdout. Tue Mar 10 18:01:55 1992 Per Bothner (bothner@cygnus.com) * Makefile.in: Fix libg++ rule to check for gcc directory before using gcc/gcc. Also pass XTRAFLAGS. Thu Mar 5 21:45:07 1992 K. Richard Pixley (rich@sendai) * Makefile.in: added stmp-files so that directories aren't polled when they are already built. * configure.texi: fixed a node pointer problem. Thu Mar 5 12:05:58 1992 Stu Grossman (grossman at cygnus.com) * config.sub configure.in gdb/configure.in gdb/mips-tdep.c gdb/mipsread.c gdb/procfs.c gdb/signame.h gdb/tm-irix3.h gdb/tm-mips.h gdb/xm-irix4.h gdb/config/mt-irix3 gdb/config/mh-irix4 texinfo/configure.in: Port to SGI Irix-4.x. Wed Mar 4 02:57:46 1992 K. Richard Pixley (rich@rtl.cygnus.com) * configure: -recurring becomes -silent. corrected help message for -site= option. * Makefile.in: mkdir $(exec_prefix) and $(tooldir). Tue Mar 3 14:51:21 1992 K. Richard Pixley (rich@rtl.cygnus.com) * configure: when building Makefile for crosses, replace tooldir and program_prefix. default srcdir from location of config.sub. remove "for host in hosts" and "for target in targets" loops. Wed Feb 26 19:48:25 1992 K. Richard Pixley (rich@rtl.cygnus.com) * Makefile.in: Do not pass bindir or mandir to cvs. Wed Feb 26 18:04:40 1992 K. Richard Pixley (rich@cygnus.com) * Makefile.in, configure.in: removed traces of namesubdir, -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced copyrights to '92, changed some from Cygnus to FSF. * configure.texi: remove most references to multiple hosts, multiple targets, subdirs, etc. * configure.man: removed rcsid. reference config.sub not config.subr. * Makefile.in: mkdir $(infodir) on install-info. Wed Feb 19 15:41:13 1992 John Gilmore (gnu at cygnus.com) * configure.texi: Explain better about .gdbinit and about the environment that configure.in sections run in. Fri Feb 7 07:55:00 1992 John Gilmore (gnu at cygnus.com) * configure.in: Ultrix is only a decstation if it's a MIPS. Fri Jan 31 21:54:51 1992 John Gilmore (gnu at cygnus.com) * README: DOC.configure => cfg-paper.texi. Fri Jan 31 21:48:18 1992 Stu Grossman (grossman at cygnus.com) * config.sub (near case $os): Don't convert newsos* to bsd! Fri Jan 31 02:27:32 1992 John Gilmore (gnu at cygnus.com) * Makefile.in: Reinstall change from gdb-4.3 that reduces the number of copies of COPYING that go into the GDB tar file. Thu Jan 30 16:17:30 1992 Stu Grossman (grossman at cygnus.com) * bfd/configure.in, gdb/config/mh-i386sco, gdb/config/mt-i386v32, gdb/configure.in, readline/configure.in: Fix SCO configuration stuff. Tue Jan 28 23:51:07 1992 Per Bothner (bothner at cygnus.com) * Makefile.in: For libg++, make sure the -I pointing to the gcc directory goes *after* all the libg++-local -I flags. Also, move just-gcc dependency from just-libg++ to all-libg++. Tue Jan 28 12:56:24 1992 Stu Grossman (grossman at cygnus.com) * configure: Change -x to -f to keep Ultrix /bin/test happy. Sat Jan 18 17:45:11 1992 Stu Grossman (grossman at cygnus.com) * Makefile.in (make-gdb.tar.Z): Remove texinfo targets. Sat Jan 18 17:03:21 1992 Fred Fish (fnf at cygnus.com) * config.sub: Add stratus configuration frags. Also submitted to FSF. Sat Jan 18 15:35:29 1992 Stu Grossman (grossman at cygnus.com) * Makefile.in (DEV_SUPPORT): add configure.man. * config.sub(Decode manufacturer-specific): add -none*. Fri Jan 17 17:58:05 1992 Stu Grossman (grossman at cygnus.com) * Makefile.in: remove form feeds to make Sun's make happy. (DEVO_SUPPORT): DOC.configure => cfg-paper.texi. Sat Jan 4 16:11:44 1992 John Gilmore (gnu at cygnus.com) * Makefile.in (AR_FLAGS): Make quieter. Thu Jan 2 22:57:12 1992 John Gilmore (gnu at cygnus.com) * configure.in: Add libg++. * configure: When verbose, don't output the command line at each level; it will be unremarkably the same as the previous version, which will be the same as what the user typed. Fri Dec 27 16:26:47 1991 K. Richard Pixley (rich at cygnus.com) * configure.in, Makefile.in: fix clean-info, add flex. add fileutils. * configure: be less sensitive to spaces in Makefile.in. Do not look for sources in "..". Doing so breaks subdirectories that might have their own configure. If a subdir has it's own configure script, use it. Thu Dec 26 16:30:26 1991 K. Richard Pixley (rich at cygnus.com) * cfg-paper.texi: some changes suggested by rms. Thu Dec 26 10:13:36 1991 Fred Fish (fnf at cygnus.com) * config.sub: Merge in some small additions from the FSF version, taken from the gcc distribution, to bring the Cygnus and FSF versions into closer sync. Fri Dec 20 11:34:18 1991 Fred Fish (fnf at cygnus.com) * configure.in: Changed svr4 references to sysv4. Thu Dec 19 15:54:29 1991 K. Richard Pixley (rich at cygnus.com) * configure: added -V for version number option. Wed Dec 18 15:39:34 1991 K. Richard Pixley (rich at cygnus.com) * DOC.configure, cfg-paper.texi: revised, updated, and texinfo'd. renamed from DOC.configure to cfg-paper.texi. Mon Dec 16 23:05:19 1991 K. Richard Pixley (rich at rtl.cygnus.com) * configure, config.subr, config.sub: config.subr is now config.sub again. Fri Dec 13 01:17:06 1991 K. Richard Pixley (rich at cygnus.com) * configure.texi: new file, in progress. * Makefile.in: build info file and install the man page for configure. * configure.man: new file, first cut. * configure: find config.subr again now that configuration "none" has gone. removed all traces of the -ansi option. removed all traces of the -languages option. * config.subr: resync from rms. 1991-12-11 K. Richard Pixley (rich at rtl.cygnus.com) * configure, config.sub, config.subr: merge config.sub into config.subr, call the result config.subr, remove config.sub, use config.subr. * Makefile.in: revised install for dir.info. 1991-12-10 K. Richard Pixley (rich at rtl.cygnus.com) * configure.in: add decstation host makefile frag. * Makefile.in: BISON now bison -y again. also install-gcc on install. clean-gdbm on clean. infodir belongs in datadir. Make directories for info install. Build dir.info here then install it. 1991-12-09 K. Richard Pixley (rich at rtl.cygnus.com) * Makefile.in: fix for bad directory tests. 1991-12-07 K. Richard Pixley (rich at rtl.cygnus.com) * configure: \{1,2\} appears to be a sysv'ism. Use a different regexp. -srcdir relative was being handled incorrectly. * Makefile.in: unwrapped some for loops so that parallel makes work again and so one can focus one's attention on a particular package. 1991-12-06 K. Richard Pixley (rich at rtl.cygnus.com) * configure: added PWD as a stand in for `pwd` (for speed). use elif wherever possible. make -srcdir work without -objdir. -objdir= commented out. 1991-12-05 K. Richard Pixley (rich at rtl.cygnus.com) * configure: +options become --options. -subdirs commented out. added -host, -datadir. Renamed -destdir to -prefix. Comment in Makefile now at top of generated Makefile. Removed cvs log entries. added -srcdir. create .gdbinit only if there is one in ${srcdir}. * Makefile.in: idestdir and ddestdir go away. Added copyrights and shift gpl to v2. Added ChangeLog if it didn't exist. docdir and mandir now keyed off datadir by default. 1991-11-22 K. Richard Pixley (rich at rtl.cygnus.com) * Freshly created ChangeLog. Local Variables: mode: change-log left-margin: 8 fill-column: 76 version-control: never End: gdb-doc-7.6.2/COPYING30000644000175000017500000010451312250770606013212 0ustar zumbizumbi GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 3 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, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . gdb-doc-7.6.2/README-maintainer-mode0000644000175000017500000000170112250770606016016 0ustar zumbizumbi Notes on enabling maintainer mode Note that if you configure with --enable-maintainer-mode, you will need special versions of automake, autoconf, libtool and gettext. You will find the sources for these in the respective upstream directories: ftp://ftp.gnu.org/gnu/autoconf ftp://ftp.gnu.org/gnu/automake ftp://ftp.gnu.org/gnu/libtool ftp://ftp.gnu.org/gnu/gettext The required versions of the tools for this tree are autoconf 2.64 automake 1.11 libtool 2.2.6 gettext 0.14.5 Note - "make distclean" does not work with maintainer mode enabled. The Makefiles in the some of the po/ subdirectories depend upon the Makefiles in their parent directories, and distclean will delete the Makefiles in the parent directories before running the Makefiles in the child directories. There is no easy way around this (short of changing the automake macros) as these dependencies need to exist in order to correctly build the NLS files. gdb-doc-7.6.2/COPYING3.LIB0000644000175000017500000001672712250770606013630 0ustar zumbizumbi GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. gdb-doc-7.6.2/mkinstalldirs0000755000175000017500000000672212250770610014700 0ustar zumbizumbi#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2009-04-28.21; # UTC # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' IFS=" "" $nl" errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gdb-doc-7.6.2/config/0000755000175000017500000000000012266504077013341 5ustar zumbizumbigdb-doc-7.6.2/config/acx.m40000644000175000017500000004753712250770606014372 0ustar zumbizumbi# Autoconf M4 include file defining utility macros for complex Canadian # cross builds. dnl #### dnl # _GCC_TOPLEV_NONCANONICAL_BUILD dnl # $build_alias or canonical $build if blank. dnl # Used when we would use $build_alias, but empty is not OK. AC_DEFUN([_GCC_TOPLEV_NONCANONICAL_BUILD], [AC_REQUIRE([AC_CANONICAL_BUILD]) []dnl case ${build_alias} in "") build_noncanonical=${build} ;; *) build_noncanonical=${build_alias} ;; esac ]) []dnl # _GCC_TOPLEV_NONCANONICAL_BUILD dnl #### dnl # _GCC_TOPLEV_NONCANONICAL_HOST dnl # $host_alias, or $build_noncanonical if blank. dnl # Used when we would use $host_alias, but empty is not OK. AC_DEFUN([_GCC_TOPLEV_NONCANONICAL_HOST], [AC_REQUIRE([_GCC_TOPLEV_NONCANONICAL_BUILD]) []dnl case ${host_alias} in "") host_noncanonical=${build_noncanonical} ;; *) host_noncanonical=${host_alias} ;; esac ]) []dnl # _GCC_TOPLEV_NONCANONICAL_HOST dnl #### dnl # _GCC_TOPLEV_NONCANONICAL_TARGET dnl # $target_alias or $host_noncanonical if blank. dnl # Used when we would use $target_alias, but empty is not OK. AC_DEFUN([_GCC_TOPLEV_NONCANONICAL_TARGET], [AC_REQUIRE([_GCC_TOPLEV_NONCANONICAL_HOST]) []dnl case ${target_alias} in "") target_noncanonical=${host_noncanonical} ;; *) target_noncanonical=${target_alias} ;; esac ]) []dnl # _GCC_TOPLEV_NONCANONICAL_TARGET dnl #### dnl # ACX_NONCANONICAL_BUILD dnl # Like underscored version, but AC_SUBST's. AC_DEFUN([ACX_NONCANONICAL_BUILD], [AC_REQUIRE([_GCC_TOPLEV_NONCANONICAL_BUILD]) []dnl AC_SUBST(build_noncanonical) ]) []dnl # ACX_NONCANONICAL_BUILD dnl #### dnl # ACX_NONCANONICAL_HOST dnl # Like underscored version, but AC_SUBST's. AC_DEFUN([ACX_NONCANONICAL_HOST], [AC_REQUIRE([_GCC_TOPLEV_NONCANONICAL_HOST]) []dnl AC_SUBST(host_noncanonical) ]) []dnl # ACX_NONCANONICAL_HOST dnl #### dnl # ACX_NONCANONICAL_TARGET dnl # Like underscored version, but AC_SUBST's. AC_DEFUN([ACX_NONCANONICAL_TARGET], [AC_REQUIRE([_GCC_TOPLEV_NONCANONICAL_TARGET]) []dnl AC_SUBST(target_noncanonical) ]) []dnl # ACX_NONCANONICAL_TARGET dnl #### dnl # GCC_TOPLEV_SUBDIRS dnl # GCC & friends build 'build', 'host', and 'target' tools. These must dnl # be separated into three well-known subdirectories of the build directory: dnl # build_subdir, host_subdir, and target_subdir. The values are determined dnl # here so that they can (theoretically) be changed in the future. They dnl # were previously reproduced across many different files. dnl # dnl # This logic really amounts to very little with autoconf 2.13; it will dnl # amount to a lot more with autoconf 2.5x. AC_DEFUN([GCC_TOPLEV_SUBDIRS], [AC_REQUIRE([_GCC_TOPLEV_NONCANONICAL_TARGET]) []dnl AC_REQUIRE([_GCC_TOPLEV_NONCANONICAL_BUILD]) []dnl # post-stage1 host modules use a different CC_FOR_BUILD so, in order to # have matching libraries, they should use host libraries: Makefile.tpl # arranges to pass --with-build-libsubdir=$(HOST_SUBDIR). # However, they still use the build modules, because the corresponding # host modules (e.g. bison) are only built for the host when bootstrap # finishes. So: # - build_subdir is where we find build modules, and never changes. # - build_libsubdir is where we find build libraries, and can be overridden. # Prefix 'build-' so this never conflicts with target_subdir. build_subdir="build-${build_noncanonical}" AC_ARG_WITH(build-libsubdir, [ --with-build-libsubdir=[DIR] Directory where to find libraries for build system], build_libsubdir="$withval", build_libsubdir="$build_subdir") # --srcdir=. covers the toplevel, while "test -d" covers the subdirectories if ( test $srcdir = . && test -d gcc ) \ || test -d $srcdir/../host-${host_noncanonical}; then host_subdir="host-${host_noncanonical}" else host_subdir=. fi # No prefix. target_subdir=${target_noncanonical} AC_SUBST([build_libsubdir]) []dnl AC_SUBST([build_subdir]) []dnl AC_SUBST([host_subdir]) []dnl AC_SUBST([target_subdir]) []dnl ]) []dnl # GCC_TOPLEV_SUBDIRS #### # _NCN_TOOL_PREFIXES: Some stuff that oughtta be done in AC_CANONICAL_SYSTEM # or AC_INIT. # These demand that AC_CANONICAL_SYSTEM be called beforehand. AC_DEFUN([_NCN_TOOL_PREFIXES], [ncn_tool_prefix= test -n "$host_alias" && ncn_tool_prefix=$host_alias- ncn_target_tool_prefix= test -n "$target_alias" && ncn_target_tool_prefix=$target_alias- ]) []dnl # _NCN_TOOL_PREFIXES #### # NCN_STRICT_CHECK_TOOLS(variable, progs-to-check-for,[value-if-not-found],[path]) # Like plain AC_CHECK_TOOLS, but require prefix if build!=host. AC_DEFUN([NCN_STRICT_CHECK_TOOLS], [AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl AC_ARG_VAR([$1], [$1 for the host]) if test -n "[$]$1"; then ac_cv_prog_$1=[$]$1 elif test -n "$ac_cv_prog_$1"; then $1=$ac_cv_prog_$1 fi if test -n "$ac_cv_prog_$1"; then for ncn_progname in $2; do AC_CHECK_PROG([$1], [${ncn_progname}], [${ncn_progname}], , [$4]) done fi for ncn_progname in $2; do if test -n "$ncn_tool_prefix"; then AC_CHECK_PROG([$1], [${ncn_tool_prefix}${ncn_progname}], [${ncn_tool_prefix}${ncn_progname}], , [$4]) fi if test -z "$ac_cv_prog_$1" && test $build = $host ; then AC_CHECK_PROG([$1], [${ncn_progname}], [${ncn_progname}], , [$4]) fi test -n "$ac_cv_prog_$1" && break done if test -z "$ac_cv_prog_$1" ; then ifelse([$3],[], [set dummy $2 if test $build = $host ; then $1="[$]2" else $1="${ncn_tool_prefix}[$]2" fi], [$1="$3"]) fi ]) []dnl # NCN_STRICT_CHECK_TOOLS #### # NCN_STRICT_CHECK_TARGET_TOOLS(variable, progs-to-check-for,[value-if-not-found],[path]) # Like CVS Autoconf AC_CHECK_TARGET_TOOLS, but require prefix if build!=target. AC_DEFUN([NCN_STRICT_CHECK_TARGET_TOOLS], [AC_REQUIRE([_NCN_TOOL_PREFIXES]) []dnl AC_ARG_VAR([$1], patsubst([$1], [_FOR_TARGET$], [])[ for the target]) if test -n "[$]$1"; then ac_cv_prog_$1=[$]$1 elif test -n "$ac_cv_prog_$1"; then $1=$ac_cv_prog_$1 fi if test -n "$ac_cv_prog_$1"; then for ncn_progname in $2; do AC_CHECK_PROG([$1], [${ncn_progname}], [${ncn_progname}], , [$4]) done fi if test -z "$ac_cv_prog_$1" && test -n "$with_build_time_tools"; then for ncn_progname in $2; do AC_MSG_CHECKING([for ${ncn_progname} in $with_build_time_tools]) if test -x $with_build_time_tools/${ncn_progname}; then ac_cv_prog_$1=$with_build_time_tools/${ncn_progname} AC_MSG_RESULT(yes) break else AC_MSG_RESULT(no) fi done fi if test -z "$ac_cv_prog_$1"; then for ncn_progname in $2; do if test -n "$ncn_target_tool_prefix"; then AC_CHECK_PROG([$1], [${ncn_target_tool_prefix}${ncn_progname}], [${ncn_target_tool_prefix}${ncn_progname}], , [$4]) fi if test -z "$ac_cv_prog_$1" && test $build = $target ; then AC_CHECK_PROG([$1], [${ncn_progname}], [${ncn_progname}], , [$4]) fi test -n "$ac_cv_prog_$1" && break done fi if test -z "$ac_cv_prog_$1" ; then ifelse([$3],[], [set dummy $2 if test $build = $target ; then $1="[$]2" else $1="${ncn_target_tool_prefix}[$]2" fi], [$1="$3"]) else $1="$ac_cv_prog_$1" fi ]) []dnl # NCN_STRICT_CHECK_TARGET_TOOLS # Backported from Autoconf 2.5x; can go away when and if # we switch. Put the OS path separator in $PATH_SEPARATOR. AC_DEFUN([ACX_PATH_SEP], [ # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ]) AC_DEFUN([ACX_TOOL_DIRS], [ AC_REQUIRE([ACX_PATH_SEP]) if test "x$exec_prefix" = xNONE; then if test "x$prefix" = xNONE; then gcc_cv_tool_prefix=$ac_default_prefix else gcc_cv_tool_prefix=$prefix fi else gcc_cv_tool_prefix=$exec_prefix fi # If there is no compiler in the tree, use the PATH only. In any # case, if there is no compiler in the tree nobody should use # AS_FOR_TARGET and LD_FOR_TARGET. if test x$host = x$build && test -f $srcdir/gcc/BASE-VER; then gcc_version=`cat $srcdir/gcc/BASE-VER` gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR" gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical$PATH_SEPARATOR" gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR" gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical$PATH_SEPARATOR" gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version$PATH_SEPARATOR" gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin$PATH_SEPARATOR" else gcc_cv_tool_dirs= fi if test x$build = x$target && test -n "$md_exec_prefix"; then gcc_cv_tool_dirs="$gcc_cv_tool_dirs$md_exec_prefix$PATH_SEPARATOR" fi ]) []dnl # ACX_TOOL_DIRS # ACX_HAVE_GCC_FOR_TARGET # Check if the variable GCC_FOR_TARGET really points to a GCC binary. AC_DEFUN([ACX_HAVE_GCC_FOR_TARGET], [ cat > conftest.c << \EOF #ifdef __GNUC__ gcc_yay; #endif EOF if ($GCC_FOR_TARGET -E conftest.c | grep gcc_yay) > /dev/null 2>&1; then have_gcc_for_target=yes else GCC_FOR_TARGET=${ncn_target_tool_prefix}gcc have_gcc_for_target=no fi rm conftest.c ]) # ACX_CHECK_INSTALLED_TARGET_TOOL(VAR, PROG) # Searching for installed target binutils. We need to take extra care, # else we may find the wrong assembler, linker, etc., and lose. # # First try --with-build-time-tools, if specified. # # For build != host, we ask the installed GCC for the name of the tool it # uses, and accept it if it is an absolute path. This is because the # only good choice for a compiler is the same GCC version that is being # installed (or we couldn't make target libraries), and we assume that # on the host system we'll have not only the same GCC version, but also # the same binutils version. # # For build == host, search the same directories that the installed # compiler will search. We used to do this for the assembler, linker, # and nm only; for simplicity of configuration, however, we extend this # criterion to tools (such as ar and ranlib) that are never invoked by # the compiler, to avoid mismatches. # # Also note we have to check MD_EXEC_PREFIX before checking the user's path # if build == target. This makes the most sense only when bootstrapping, # but we also do so when build != host. In this case, we hope that the # build and host systems will have similar contents of MD_EXEC_PREFIX. # # If we do not find a suitable binary, then try the user's path. AC_DEFUN([ACX_CHECK_INSTALLED_TARGET_TOOL], [ AC_REQUIRE([ACX_TOOL_DIRS]) AC_REQUIRE([ACX_HAVE_GCC_FOR_TARGET]) if test -z "$ac_cv_path_$1" ; then if test -n "$with_build_time_tools"; then AC_MSG_CHECKING([for $2 in $with_build_time_tools]) if test -x $with_build_time_tools/$2; then $1=`cd $with_build_time_tools && pwd`/$2 ac_cv_path_$1=[$]$1 AC_MSG_RESULT([$ac_cv_path_$1]) else AC_MSG_RESULT(no) fi elif test $build != $host && test $have_gcc_for_target = yes; then $1=`$GCC_FOR_TARGET --print-prog-name=$2` test [$]$1 = $2 && $1= test -n "[$]$1" && ac_cv_path_$1=[$]$1 fi fi if test -z "$ac_cv_path_$1" && test -n "$gcc_cv_tool_dirs"; then AC_PATH_PROG([$1], [$2], [], [$gcc_cv_tool_dirs]) fi if test -z "$ac_cv_path_$1" ; then NCN_STRICT_CHECK_TARGET_TOOLS([$1], [$2]) else $1=$ac_cv_path_$1 fi ]) []dnl # ACX_CHECK_INSTALLED_TARGET_TOOL ### # AC_PROG_CPP_WERROR # Used for autoconf 2.5x to force AC_PREPROC_IFELSE to reject code which # triggers warnings from the preprocessor. Will be in autoconf 2.58. # For now, using this also overrides header checks to use only the # preprocessor (matches 2.13 behavior; matching 2.58's behavior is a # bit harder from here). # Eventually autoconf will default to checking headers with the compiler # instead, and we'll have to do this differently. AC_DEFUN([AC_PROG_CPP_WERROR], [AC_REQUIRE([AC_PROG_CPP])dnl m4_define([AC_CHECK_HEADER],m4_defn([_AC_CHECK_HEADER_OLD])) ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR # Test for GNAT. # We require the gnatbind & gnatmake programs, as well as a compiler driver # that understands Ada. We use the user's CC setting, already found, and # possibly add $1 to the command-line parameters. # # Sets the shell variable have_gnat to yes or no as appropriate, and # substitutes GNATBIND and GNATMAKE. AC_DEFUN([ACX_PROG_GNAT], [AC_REQUIRE([AC_CHECK_TOOL_PREFIX]) AC_REQUIRE([AC_PROG_CC]) AC_CHECK_TOOL(GNATBIND, gnatbind, no) AC_CHECK_TOOL(GNATMAKE, gnatmake, no) AC_CACHE_CHECK([whether compiler driver understands Ada], acx_cv_cc_gcc_supports_ada, [cat >conftest.adb <&1 || echo failure` if test x"$errors" = x && test -f conftest.$ac_objext; then acx_cv_cc_gcc_supports_ada=yes fi rm -f conftest.*]) if test "x$GNATBIND" != xno && test "x$GNATMAKE" != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then have_gnat=yes else have_gnat=no fi ]) dnl 'make compare' can be significantly faster, if cmp itself can dnl skip bytes instead of using tail. The test being performed is dnl "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2" dnl but we need to sink errors and handle broken shells. We also test dnl for the parameter format "cmp file1 file2 skip1 skip2" which is dnl accepted by cmp on some systems. AC_DEFUN([ACX_PROG_CMP_IGNORE_INITIAL], [AC_CACHE_CHECK([how to compare bootstrapped objects], gcc_cv_prog_cmp_skip, [ echo abfoo >t1 echo cdfoo >t2 gcc_cv_prog_cmp_skip='tail +16c $$f1 > tmp-foo1; tail +16c $$f2 > tmp-foo2; cmp tmp-foo1 tmp-foo2' if cmp t1 t2 2 2 > /dev/null 2>&1; then if cmp t1 t2 1 1 > /dev/null 2>&1; then : else gcc_cv_prog_cmp_skip='cmp $$f1 $$f2 16 16' fi fi if cmp --ignore-initial=2 t1 t2 > /dev/null 2>&1; then if cmp --ignore-initial=1 t1 t2 > /dev/null 2>&1; then : else gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2' fi fi rm t1 t2 ]) do_compare="$gcc_cv_prog_cmp_skip" AC_SUBST(do_compare) ]) dnl See whether we can include both string.h and strings.h. AC_DEFUN([ACX_HEADER_STRING], [AC_CACHE_CHECK([whether string.h and strings.h may both be included], gcc_cv_header_string, [AC_TRY_COMPILE([#include #include ], , gcc_cv_header_string=yes, gcc_cv_header_string=no)]) if test $gcc_cv_header_string = yes; then AC_DEFINE(STRING_WITH_STRINGS, 1, [Define if you can safely include both and .]) fi ]) dnl See if stdbool.h properly defines bool and true/false. dnl Check whether _Bool is built-in. AC_DEFUN([ACX_HEADER_STDBOOL], [AC_CACHE_CHECK([for working stdbool.h], ac_cv_header_stdbool_h, [AC_TRY_COMPILE([#include ], [bool foo = false;], ac_cv_header_stdbool_h=yes, ac_cv_header_stdbool_h=no)]) if test $ac_cv_header_stdbool_h = yes; then AC_DEFINE(HAVE_STDBOOL_H, 1, [Define if you have a working header file.]) fi AC_CACHE_CHECK(for built-in _Bool, gcc_cv_c__bool, [AC_TRY_COMPILE(, [_Bool foo;], gcc_cv_c__bool=yes, gcc_cv_c__bool=no) ]) if test $gcc_cv_c__bool = yes; then AC_DEFINE(HAVE__BOOL, 1, [Define if the \`_Bool' type is built-in.]) fi ]) dnl See if hard links work and if not, try to substitute $1 or simple copy. AC_DEFUN([ACX_PROG_LN], [AC_MSG_CHECKING(whether ln works) AC_CACHE_VAL(acx_cv_prog_LN, [rm -f conftestdata_t echo >conftestdata_f if ln conftestdata_f conftestdata_t 2>/dev/null then acx_cv_prog_LN=ln else acx_cv_prog_LN=no fi rm -f conftestdata_f conftestdata_t ])dnl if test $acx_cv_prog_LN = no; then LN="ifelse([$1],,cp,[$1])" AC_MSG_RESULT([no, using $LN]) else LN="$acx_cv_prog_LN" AC_MSG_RESULT(yes) fi AC_SUBST(LN)dnl ]) dnl GCC_TARGET_TOOL(PROGRAM, TARGET-VAR, HOST-VAR, IN-TREE-TOOL, LANGUAGE) AC_DEFUN([GCC_TARGET_TOOL], [AC_MSG_CHECKING(where to find the target $1) if test "x${build}" != "x${host}" ; then if expr "x[$]$2" : "x/" > /dev/null; then # We already found the complete path ac_dir=`dirname [$]$2` AC_MSG_RESULT(pre-installed in $ac_dir) else # Canadian cross, just use what we found AC_MSG_RESULT(pre-installed) fi else ifelse([$4],,, [ok=yes case " ${configdirs} " in *" patsubst([$4], [/.*], []) "*) ;; *) ok=no ;; esac ifelse([$5],,, [case ,${enable_languages}, in *,$5,*) ;; *) ok=no ;; esac]) if test $ok = yes; then # An in-tree tool is available and we can use it $2='$$r/$(HOST_SUBDIR)/$4' AC_MSG_RESULT(just compiled) el])if expr "x[$]$2" : "x/" > /dev/null; then # We already found the complete path ac_dir=`dirname [$]$2` AC_MSG_RESULT(pre-installed in $ac_dir) elif test "x$target" = "x$host"; then # We can use an host tool $2='$($3)' AC_MSG_RESULT(host tool) else # We need a cross tool AC_MSG_RESULT(pre-installed) fi fi AC_SUBST($2)]) dnl Locate a program and check that its version is acceptable. dnl ACX_PROG_CHECK_VER(var, name, version-switch, dnl version-extract-regexp, version-glob) AC_DEFUN([ACX_CHECK_PROG_VER],[ AC_CHECK_PROG([$1], [$2], [$2]) if test -n "[$]$1"; then # Found it, now check the version. AC_CACHE_CHECK([for modern $2], [gcc_cv_prog_$2_modern], [ac_prog_version=`eval [$]$1 $3 2>&1 | sed -n 's/^.*patsubst([[$4]],/,\/).*$/\1/p'` [case $ac_prog_version in '') gcc_cv_prog_$2_modern=no;; $5) gcc_cv_prog_$2_modern=yes;; *) gcc_cv_prog_$2_modern=no;; esac] ]) else gcc_cv_prog_$2_modern=no fi if test $gcc_cv_prog_$2_modern = no; then $1="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing $2" fi ]) dnl Support the --with-pkgversion configure option. dnl ACX_PKGVERSION(default-pkgversion) AC_DEFUN([ACX_PKGVERSION],[ AC_ARG_WITH(pkgversion, AS_HELP_STRING([--with-pkgversion=PKG], [Use PKG in the version string in place of "$1"]), [case "$withval" in yes) AC_MSG_ERROR([package version not specified]) ;; no) PKGVERSION= ;; *) PKGVERSION="($withval) " ;; esac], PKGVERSION="($1) " ) AC_SUBST(PKGVERSION) ]) dnl Support the --with-bugurl configure option. dnl ACX_BUGURL(default-bugurl) AC_DEFUN([ACX_BUGURL],[ AC_ARG_WITH(bugurl, AS_HELP_STRING([--with-bugurl=URL], [Direct users to URL to report a bug]), [case "$withval" in yes) AC_MSG_ERROR([bug URL not specified]) ;; no) BUGURL= ;; *) BUGURL="$withval" ;; esac], BUGURL="$1" ) case ${BUGURL} in "") REPORT_BUGS_TO= REPORT_BUGS_TEXI= ;; *) REPORT_BUGS_TO="<$BUGURL>" REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} ;; esac; AC_SUBST(REPORT_BUGS_TO) AC_SUBST(REPORT_BUGS_TEXI) ]) dnl #### dnl # ACX_CHECK_CYGWIN_CAT_WORKS dnl # On Cygwin hosts, check that the cat command ignores dnl # carriage returns as otherwise builds will not work. dnl # See binutils PR 4334 for more details. AC_DEFUN([ACX_CHECK_CYGWIN_CAT_WORKS],[ AC_MSG_CHECKING([to see if cat works as expected]) echo a >cygwin-cat-check if test `cat cygwin-cat-check` = a ; then rm cygwin-cat-check AC_MSG_RESULT(yes) else rm cygwin-cat-check AC_MSG_RESULT(no) AC_MSG_ERROR([The cat command does not ignore carriage return characters. Please either mount the build directory in binary mode or run the following commands before running any configure script: set -o igncr export SHELLOPTS ]) fi ]) gdb-doc-7.6.2/config/mt-mips16-compat0000644000175000017500000000043512250770606016300 0ustar zumbizumbi# Configurations use this fragment if they support MIPS16 and non-MIPS16 code, # but if the libraries are all non-MIPS16. Add -minterlink-mips16 so # that the libraries can be used with both ISA modes. CFLAGS_FOR_TARGET += -minterlink-mips16 CXXFLAGS_FOR_TARGET += -minterlink-mips16 gdb-doc-7.6.2/config/bootstrap-debug-lean.mk0000644000175000017500000000073112250770606017705 0ustar zumbizumbi# This BUILD_CONFIG option is a bit like bootstrap-debug, but rather # than comparing stripped object files, it compares compiler internal # state during stage3. Both can be used simultaneously. # This makes it slower than bootstrap-debug alone, for there's # additional dumping and recompilation during stage3. # bootstrap-debug-big can avoid the recompilation, if plenty of disk # space is available. STAGE2_CFLAGS += -fcompare-debug= STAGE3_CFLAGS += -fcompare-debug gdb-doc-7.6.2/config/mt-mips-elfoabi0000644000175000017500000000005212250770606016242 0ustar zumbizumbiinclude $(srcdir)/config/mt-mips16-compat gdb-doc-7.6.2/config/mt-mips-gnu0000644000175000017500000000011212250770606015427 0ustar zumbizumbiinclude $(srcdir)/config/mt-gnu include $(srcdir)/config/mt-mips16-compat gdb-doc-7.6.2/config/ChangeLog0000644000175000017500000014216012250773211015106 0ustar zumbizumbi2013-01-15 Richard Biener PR other/55973 * isl.m4 (ISL_INIT_FLAGS): Warn about disabled version check for in-tree build. (ISL_CHECK_VERSION): Do not use AC_CACHE_CHECK. * cloog.m4 (CLOOG_INIT_FLAGS): Disable version check for in-tree build and warn about that. (CLOOG_CHECK_VERSION): Do not use AC_CACHE_CHECK. 2013-01-07 H.J. Lu * libstdc++-raw-cxx.m4 (GCC_LIBSTDCXX_RAW_CXX_FLAGS): Remove "-I" from LIBSTDCXX_RAW_CXX_LDFLAGS. 2012-12-12 H.J. Lu * libstdc++-raw-cxx.m4 (GCC_LIBSTDCXX_RAW_CXX_FLAGS): Also AC_SUBST LIBSTDCXX_RAW_CXX_LDFLAGS. 2012-12-11 H.J. Lu PR sanitizer/55533 * libstdc++-raw-cxx.m4: New file. 2012-11-28 H.J. Lu * bootstrap-asan.mk: New file. 2012-11-04 Thomas Schwinge * dfp.m4 (enable_decimal_float): Enable for i?86*-*-gnu*. 2012-10-15 Pavel Chupin * gthr.m4: New. Define GCC_AC_THREAD_HEADER. 2012-09-19 Steve Ellcey * mt-sde: Change -mcode-xonly to -mcode-readable=pcrel. 2012-09-03 Richard Guenther PR bootstrap/54138 * config/cloog.m4: Adjust for toplevel reorg. * config/isl.m4: Adjust. 2012-08-26 Art Haas * cloog.m4 (CLOOG_INIT_FLAGS): Use = instead of == in test. 2012-07-04 Tristan Gingold * isl.m4 (ISL_CHECK_VERSION): Set to yes if cross-compiling. Fix comments. 2012-07-03 Richard Guenther * cloog.m4: Remove debugging print. 2012-07-03 Rainer Orth * isl.m4 (ISL_CHECK_VERSION): Add -lisl to LIBS, not LDFLAGS. 2012-07-02 Richard Guenther * isl.m4 (_ISL_CHECK_CT_PROG): Omit main function header/footer. Fix version test. 2012-07-02 Richard Guenther Michael Matz Tobias Grosser Sebastian Pop * cloog.m4: Set up to work against ISL only. * isl.m4: New file. 2012-05-29 Joseph Myers * mt-sde: Fix typos. * stdint.m4: Fix typos. * tcl.m4: Fix typos. 2012-05-03 Olivier Hainque * mh-ppc-aix (LDFLAGS): Quote $(CC). 2012-04-03 Tristan Gingold * mmap.m4: Use *vms* instead of vms*. 2012-04-02 Tristan Gingold * math.m4 (GCC_CHECK_MATH_FUNC): Remove if-present argument. Define the variable. 2012-03-26 Tristan Gingold * math.m4: New file. 2012-03-12 Rainer Orth * weakref.m4 (GCC_CHECK_ELF_STYLE_WEAKREF): Remove alpha*-dec-osf*. 2012-01-22 Douglas B Rupp * config/mh-interix: Remove as unneeded. * config/picflag.m4 (i[[34567]]86-*-interix3*): Change triplet to i[[34567]]86-*-interix[[3-9]]*. 2012-01-04 Andreas Krebbel PR bootstrap/51734 * picflag.m4: Remove s390 case statement. 2011-12-20 Andreas Schwab * warnings.m4 (ACX_PROG_CC_WARNING_OPTS): Avoid leading dash in expr call. 2011-12-19 Andreas Schwab PR bootstrap/51388 * warnings.m4 (ACX_PROG_CC_WARNING_OPTS) (ACX_PROG_CC_WARNING_ALMOST_PEDANTIC): Run the test without the no- prefix. 2011-12-18 Eric Botcazou * acx.m4 (Test for GNAT): Update comment and add quotes in final test. 2011-11-22 Iain Sandoe * weakref.m4: New file. 2011-11-09 Richard Henderson * asmcfi.m4: New file. 2011-11-02 Rainer Orth * mh-interix (LIBGCC2_DEBUG_CFLAGS): Remove. 2011-08-22 Rainer Orth * picflag.m4: New file. 2011-07-18 Rainer Orth * elf.m4 (target_elf): Remove *-netware*. 2011-07-06 Uros Bizjak * mt-alphaieee (GOCFLAGS_FOR_TARGET): Add -mieee. 2011-06-15 Mike Stump PR target/49461 * mh-darwin: Turn off -pie on darwin11 and later. 2011-04-20 Eric Botcazou * bootstrap-lto.mk: Remove obsolete requirement. 2011-03-24 Paolo Bonzini * mt-mep: Remove, obsolete. * mt-netware: Remove, obsolete. * mt-wince: Remove, obsolete. * mt-v810: Remove, unused. 2011-03-24 Paolo Bonzini * mh-x86omitfp: Remove. 2011-03-24 Paolo Bonzini * mh-cygwin: Remove obsolete variables and dependencies. 2011-03-24 Paolo Bonzini * mh-sysv4: Remove. * mh-solaris: Remove. 2011-03-24 Paolo Bonzini * mh-sysv4: Remove AR_CFLAGS. 2011-03-24 Joseph Myers * mh-cxux, mh-decstation, mh-dgux386, mh-lynxrs6k, mh-ncr3000, mh-necv4, mh-sco, mh-sysv5: Remove. 2011-03-05 Ralf Wildenhues Eric Blake * override.m4: Error out if a buggy M4 was detected, to avoid spurious diffs in generated files. 2011-01-25 Jakub Jelinek * cloog.m4 (CLOOG_REQUESTED): Use $2 if --without-cloog. 2011-01-10 Jan Hubicka * bootstrap-lto.mk: -fuse-linker-plugin is default now; pass -fno-lto to STAGEprofile. 2010-12-06 Dave Korn PR target/40125 PR lto/46695 * lthostflags.m4: New file. (ACX_LT_HOST_FLAGS): Define. 2010-12-02 Dave Korn * mh-cygwin (LDFLAGS): Turn up stack allocation to 12MB. (BOOT_LDFLAGS): Add matching stack size flag. * mh-mingw (LDFLAGS): Likewise. (BOOT_LDFLAGS): Likewise. 2010-11-27 Eric Botcazou * bootstrap-lto.mk (BOOT_ADAFLAGS): Delete. 2010-11-19 Tobias Grosser * cloog.m4: Use AS_HELP_STRING and fix help formatting. 2010-11-15 Andreas Schwab * cloog.m4 (CLOOG_INIT_FLAGS): Fix spelling in option names. 2010-11-12 Tobias Grosser * cloog.m4: Add -enable-cloog-backend=(isl|ppl|ppl-legacy) to define the cloog backend to use. Furthermore, only pass the ppllibs to the configure checks, if necessary. 2010-11-12 Tobias Grosser * cloog.m4: Use CLooG predefined macro to check for CLooG PPL. 2010-11-12 Tobias Grosser * cloog.m4: Fix typo. verison -> version. 2010-11-12 Tobias Grosser * cloog.m4: Pass ppl libraries to the CLooG version check. 2010-11-11 Jan Hubicka * bootstrap-lto: Use -flto. 2010-11-04 Iain Sandoe * mh-darwin: Renamed from mh-ppc-darwin. 2010-06-27 Ralf Wildenhues * po.m4 (AM_PO_SUBDIRS): Fix unportable shell quoting. 2010-09-10 Jonathan Yong * dfp.m4: Enable decimal float for i?86 cygwin and mingw, and for x86_64 mingw. 2010-09-06 H.J. Lu PR target/45524 * dfp.m4: Don't set enable_decimal_float to dpd if DFP is disabled. Set default_decimal_float. 2010-09-06 Andreas Schwab * dfp.m4: Quote argument of AC_MSG_WARN. 2010-09-03 Andreas Krebbel * dfp.m4: New file. 2010-09-01 Andi Kleen * bootstrap-lto.mk (STAGE2_CFLAGS, STAGE3_CFLAGS): Change to -fwhopr=jobserver -fuse-linker-plugin -frandom-seed=1. 2010-08-21 Ralf Wildenhues PR target/45084 * stdint.m4 (GCC_HEADER_STDINT): Use m4 quotes for arguments of AC_MSG_ERROR. 2010-07-02 Rainer Orth * gc++filt.m4: New file. 2010-06-20 Alexandre Oliva * bootstrap-lto.mk: New. 2010-06-10 Paolo Bonzini * override.m4: Remove obsolete (<2.64) definitions. 2010-06-09 Iain Sandoe PR bootstrap/43170 * tls.m4 (GCC_CHECK_TLS): Add volatile qualifier to the test references. Move the main () test reference ahead of pthread_create(). Add a comment to explain the requirements of the test. 2010-06-03 Joern Rennecke Ralf Wildenhues PR bootstrap/42798 * override.m4 (_AC_CHECK_DECL_BODY, _AC_CHECK_DECLS): Import definitions from git Autoconf. 2010-04-13 Steve Ellcey * elf.m4: Add hppa[12]*-*-hpux* to list of non-elf platforms. 2010-03-23 Kai Tietz * mh-mingw: Revert accidentally checking r156315. 2010-01-05 Rainer Orth * stdint.m4 (GCC_HEADER_STDINT): Don't typedef uint8_t etc. if corresponding macros already exist. 2010-01-02 Richard Guenther PR lto/41529 * elf.m4: New file. 2009-11-30 Joseph Myers * largefile.m4 (ACX_LARGEFILE): Require AC_CANONICAL_HOST and AC_CANONICAL_TARGET. 2009-11-24 Joel Brobecker * zlib.m4: New file. 2009-11-09 Jan Kratochvil * largefile.m4 (ACX_LARGEFILE): Call AC_PLUGINS. 2009-11-06 Jan Kratochvil Joel Brobecker Paolo Bonzini * largefile.m4: New file. 2009-10-23 Rainer Orth * acx.m4 (ACX_CHECK_CYGWIN_CAT_WORKS): Use = with test. 2009-09-09 Paolo Bonzini * stdint.m4 (GCC_HEADER_STDINT): Revert changes to this macro in the previous two patches. 2009-09-09 Paolo Bonzini * stdint.m4: Store temporary file in $tmp/_GCC_STDINT_H. 2009-09-08 Paolo Bonzini * stdint.m4: Rewrite by using autoconf 2.64 features. 2009-09-03 Alexandre Oliva * bootstrap-debug-big.mk (STAGE2_CFLAGS): Drop -gtoggle. * bootstrap-debug-lean.mk: Update comments. (STAGE2_CFLAGS): Likewise. (do-compare): Don't override. 2009-09-01 Alexandre Oliva * bootstrap-debug.mk: Add comments. * bootstrap-debug-big.mk: New. * bootstrap-debug-lean.mk: New. * bootstrap-debug-ckovw.mk: Add comments. * bootstrap-debug-lib.mk: Drop CFLAGS for stages. Use -g0 for TFLAGS in stage1. Drop -fvar-tracking-assignments-toggle. 2009-08-22 Ralf Wildenhues * override.m4 (_GCC_AUTOCONF_VERSION): Bump to 2.64. 2009-08-19 Ralf Wildenhues * override.m4 (AC_DISABLE_OPTION_CHECKING): Define to be empty if not defined, to avoid error with 2.59. (_AC_LANG_IO_PROGRAM): When the Autoconf version is exactly 2.64, avoid per-language instances to drop fopen from test program. 2009-07-30 Ralf Wildenhues * extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Do not expand for Autoconf 2.62 or newer. * tls.m4 (GCC_CHECK_TLS): Fix m4 quotation. * no-executables.m4 (_AC_COMPILER_EXEEXT): Fix m4 quotation. * override.m4 (m4_copy_force, m4_rename_force): Provide macros if not defined. (AC_PREREQ): Use m4_copy_force. 2009-07-17 Joseph Myers PR other/40784 * tls.m4 (GCC_CHECK_TLS): Add extra quoting around argument to AC_LINK_IFELSE. 2009-07-16 Joseph Myers * tls.m4 (GCC_CHECK_TLS): Also test TLS in a shared library when cross-compiling. 2009-06-25 Olivier Hainque * config/mh-ppc-aix (BOOT_ADAFLAGS): Remove -mminimal-toc. 2009-05-26 Rafael Avila de Espindola * plugins.m4: New. 2009-05-12 Alexandre Oliva * multi.m4: Save CXX, GFORTRAN and GCJ in config.status. * mt-gnu (CXXFLAGS_FOR_TARGET): Adjust. * bootstrap-O1.mk: New. * bootstrap-O3.mk: New. * bootstrap-debug.mk: New. 2009-02-02 Doug Evans * tcl.m4 (SC_PATH_TCLCONFIG): Don't exit 0 if tclconfig fails. (SC_PATH_TKCONFIG): Don't exit 0 if tkconfig fails. (SC_LOAD_TCLCONFIG): Quote all uses of TCL_BIN_DIR, it may contain "# no Tcl configs found". (SC_LOAD_TKCONFIG): Similarily for TK_BIN_DIR. 2009-04-09 Jakub Jelinek * lead-dot.m4: Change copyright header to refer to version 3 of the GNU General Public License and to point readers at the COPYING3 file and the FSF's license web page. * warnings.m4: Likewise. 2009-02-11 Kai Tietz * mh-cygwin (LDFLAGS): Add linker option to increase stack limit up to 8MB. 2009-01-23 Jie Zhang * tls.m4 (GCC_CHECK_EMUTLS): Define. 2008-12-21 Andrew Pinski PR target/38300 * unwind_ipinfo.m4: Darwin before 9 does not have _Unwind_GetIPInfo. 2008-11-21 Kai Tietz Fix PR/25502 * mh-mingw (BOOT_CFLAGS): Add -Wno-pedantic-ms-format switch. 2008-11-12 Steve Ellcey PR target/27880 * unwind_ipinfo.m4 (GCC_CHECK_UNWIND_GETIPINFO): Change from link test to target based test. 2008-08-09 Richard Sandiford * mt-mips16-compat: New file, taken from mt-mips-elfoabi. * mt-mips-elfoabi: Include mt-mips16-compat. * mt-mips-gnu: New file. 2008-08-03 Alan Modra * mt-spu (all-ld): Update for ld Makefile changes. 2008-08-02 Keith Seitz * tcl.m4 (SC_PATH_TCLCONFIG): Add some simple logic to deal with cygwin. (SC_PATH_TKCONFIG): Likewise. 2008-07-30 Paolo Bonzini * mh-pa: New, from gcc/config/pa/x-ada. * mh-pa-hpux10: New, from gcc/config/pa/x-ada-hpux10. 2008-07-25 Keith Seitz * acinclude.m4: Remove libide, libgui, and all the other Tcl functions. * tcl.m4: New file. 2008-07-11 Joseph Myers * mh-mingw (LDFLAGS): Append to rather than replacing previous value. 2008-06-17 Ralf Wildenhues * override.m4: Use m4_version_prereq throughout. (_AC_ARG_VAR_VALIDATE, AC_MSG_FAILURE): Backport from git Autoconf: output pwd along with fatal errors, so the right config.log file is hinted at more prominently. (PARSE_ARGS): Push setting of ac_pwd in this diversion. (_GCC_AUTOCONF_VERSION): New, define to 2.59 if not defined. (_GCC_AUTOCONF_VERSION_CHECK): New macro, require use of Autoconf version _GCC_AUTOCONF_VERSION throughout the tree. (m4_wrap): New override, fix for Posix semantics of m4wrap. 2008-06-11 Bernhard Fischer * tls.m4: Fix typos. 2008-06-08 Joseph Myers PR tree-optimization/36218 * mh-mingw (LDFLAGS): Define. 2008-06-05 Danny Smith PR driver/35916 * mh-mingw (CFLAGS): Add -D__USE_MINGW_ACCESS. 2008-05-12 Samuel Tardieu Paolo Bonzini PR ada/36001 * acx.m4: Add optional parameter to ACX_PROG_GNAT. 2008-04-23 Paolo Bonzini * override.m4: Apply _AC_ARG_VALIDATE fix to all versions but 2.62. 2008-04-18 Paolo Bonzini PR bootstrap/35457 * confsubdir.m4: Rename to... * override.m4: ... this. Make sure aclocal always picks it. Add more lenient precious variable check, backported from autoconf trunk. 2008-04-04 Nick Clifton PR binutils/4334 * acx.m4 (ACX_CHECK_CYGWIN_CAT_WORKS): New macro to check that cygwin builds are not running in textmode. 2008-03-27 Paolo Bonzini * extensions.m4: New. 2008-03-27 Paolo Bonzini * mh-armpic: Remove. * mh-i370pic: Remove. * mh-m68kpic: Remove. * mh-ppcpic: Remove. * mh-sparcpic: Remove. * mh-ia64pic: Remove. * mh-papic: Remove. * mh-s390pic: Remove. * mh-x86pic: Remove. 2008-03-16 Ralf Wildenhues * proginstall.m4: New file, with fixed AC_PROG_INSTALL. 2008-02-20 Uros Bizjak * mh-ppc-darwin (BOOT_CFLAGS): Use +=, not =. 2008-02-20 Paolo Bonzini PR bootstrap/32009 * mh-ppc-darwin (BOOT_CFLAGS): Reenable. 2008-01-08 Jakub Jelinek * futex.m4: New file. 2007-12-06 Richard Sandiford * mt-sde (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Use +=, not =. * mt-mips-elfoabi: Likewise. 2007-10-15 Maciej W. Rozycki * tls.m4 (GCC_CHECK_TLS): Rename have_tls to gcc_cv_have_tls. (GCC_CHECK_CC_TLS): Rename have_cc_tls to gcc_cv_have_cc_tls. 2007-10-03 Richard Sandiford * no-executables.m4 (GCC_TRY_COMPILE_OR_LINK): New function. 2007-10-03 Kazu Hirata Revert: 2007-10-02 Richard Sandiford * no-executables.m4 (GCC_TRY_COMPILE_OR_LINK): New function. 2007-10-02 Richard Sandiford * no-executables.m4 (GCC_TRY_COMPILE_OR_LINK): New function. 2007-09-21 Richard Sandiford * mt-sde (CFLAGS_FOR_TARGET): Replace -fno-optimize-sibling-calls with -minterlink-mips16. (CXXFLAGS_FOR_TARGET): Likewise. 2007-09-20 Richard Sandiford * mt-mips-elfoabi: New file. 2007-09-07 Richard Sandiford * mt-sde (CFLAGS_FOR_TARGET): Add -mno-gpopt. (CXXFLAGS_FOR_TARGET): Likewise. 2007-09-06 Francois-Xavier Coudert PR target/33281 * mh-mingw: New host makefile fragment. 2007-08-18 Paul Brook Joseph Myers * mt-gnu (CXXFLAGS_FOR_TARGET): Add $(DEBUG_PREFIX_CFLAGS_FOR_TARGET). 2007-08-17 Richard Sandiford Nigel Stephens * mt-sde: New file. 2007-07-06 H.J. Lu * tls.m4 (GCC_CHECK_CC_TLS): New. 2007-07-05 Sebastian Pop PR bootstrap/32622 * mh-x86omitfp (BOOT_CFLAGS): Add -fomit-frame-pointer, don't reset its value. 2007-06-27 Mike Stump * acx.m4 (ACX_CHECK_INSTALLED_TARGET_TOOL): Fixup logic for cross builds. 2007-06-20 Mike Stump * acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Fix incremental builds. (ACX_HAVE_GCC_FOR_TARGET): Likewise. 2007-06-14 Paolo Bonzini * acx.m4 (ACX_CHECK_PROG_VER): Remove duplicate lines. 2007-06-04 Olivier Hainque * mh-ppc-aix: Add default ADAFLAGS to BOOT_ADAFLAGS. 2007-05-27 Paolo Bonzini * confsubdir.m4: Move here from newlib. 2007-05-23 Paolo Bonzini PR bootstrap/32009 * mh-ppc-darwin: Temporarily disable. 2007-04-11 Kai Tietz * stdint.m4: Make template compatible with older cygwin types.h, wrapping each type in a __XXX_t_defined #ifdef. 2007-03-26 H.J. Lu * acx.m4 (ACX_BUGURL): Set BUGURL first. Quote $BUGURL first when setting REPORT_BUGS_TEXI. 2007-03-23 H.J. Lu * acx.m4 (ACX_BUGURL): Replace "@" with "@@" for REPORT_BUGS_TEXI. 2007-03-23 Joseph Myers * acx.m4 (ACX_PKGVERSION, ACX_BUGURL): Define. 2007-03-07 Andreas Schwab * acx.m4 (GCC_TARGET_TOOL): Expand backquotes outside AC_MSG_RESULT. 2007-02-27 Alan Modra * mt-spu (all-ld): Depend on all-binutils. 2007-02-18 Alexandre Oliva * acx.m4 (NCN_STRICT_CHECK_TOOLS): Mark environment variable as precious. Prefer it over a cached value. Use cached value verbosely. (NCN_STRICT_CHECK_TARGET_TOOLS): Likewise. Don't override environment variable with build-time tools. 2006-12-11 Alan Modra * mt-spu: New file. 2007-02-09 Daniel Jacobowitz * acx.m4 (ACX_CHECK_INSTALLED_TARGET_TOOL): Avoid AC_PATH_PROG with an empty path. 2007-02-07 Bruno Haible PR libgomp/28468 * config/tls.m4 (GCC_CHECK_TLS): Also check whether the libc supports TLS via __thread. 2007-01-31 Daniel Franke PR libgomp/30546 * acx.m4 (ACX_PROG_CHECK_VER): Locate a program and check that its version is acceptable. 2007-01-27 Paolo Bonzini * depstand.m4 (ZW_CREATE_DEPDIR): Use mkinstalldirs to make directory. 2007-01-23 Richard Guenther PR bootstrap/30541 * config/acx.m4 (ACX_PROG_GNAT): Check for gnatmake. 2007-01-14 H.J. Lu * ld-symbolic.m4: New. 2007-01-11 Paolo Bonzini * warnings.m4: Use m4_expand_once to clear the AC_SUBST'ed variable. (ACX_PROG_CC_WARNINGS_ARE_ERRORS): Fix typo. Add optional 2nd argument. 2007-01-11 Paolo Bonzini * warnings.m4: Add second parameter with name of variable. Always append to the variable if it exists. 2007-01-01 Mike Stump * mh-ppc-darwin: Remove support for building with Apple's gcc-3.1. 2006-12-04 Eric Botcazou * tls.m4 (GCC_CHECK_TLS): Do not test TLS with static linking if static linking doesn't even work. 2006-11-13 Daniel Jacobowitz * tls.m4 (GCC_CHECK_TLS): Fall back to a link test. 2006-10-14 Geoffrey Keating * multi.m4: New file, from automake version 2 branch. 2006-09-18 Tom Tromey * tls.m4 (GCC_CHECK_TLS): Pass empty argument as "help arg" to GCC_ENABLE. 2006-07-25 Paolo Bonzini PR build/26188 * stdint.m4: Test for uintptr_t even on systems with uint64_t or uint32_t. 2006-07-21 Steve Ellcey PR target/26792 * unwind_ipinfo.m4: New. 2006-07-21 David Daney PR libgcj/28426 * gxx-include-dir.m4: Use target_alias in path for cross build. 2006-07-18 Paolo Bonzini * acx.m4: Support --with-build-libsubdir and AC_SUBST build_libsubdir. 2006-06-13 Richard Earnshaw Alexandre Oliva * gettext-sister.m4 (ZW_GNU_GETTEXT_SISTER_DIR): Add optional argument for where to search for NLS config file. 2006-05-31 Daniel Jacobowitz * gettext-sister.m4 (ZW_GNU_GETTEXT_SISTER_DIR): Provide some defines otherwise gotten from AM_GNU_GETTEXT. Remove the po/ prefix from CATALOGS. 2006-02-14 Paolo Bonzini Andreas Schwab * acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Use correct program name. (ACX_CHECK_INSTALLED_TARGET_TOOL): Likewise, and always set $1. 2006-01-26 Paolo Bonzini * acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Test $with_build_time_tools. (ACX_PATH_SEP): New. (ACX_TOOL_DIRS): Move here from the gcc directory. (ACX_CHECK_INSTALLED_TARGET_TOOL): New. (GCC_TARGET_TOOL): Do not use a host tool if we found a target tool with a complete path in either $with_build_time_tools or $exec_prefix. 2006-01-02 Paolo Bonzini PR target/25259 * stdint.m4: New. 2005-12-20 Paolo Bonzini Revert Ada-related part of the previous change. * mt-ppc-aix: Delete. 2005-12-19 Paolo Bonzini * mt-ppc-aix, mh-ppc-aix: New. 2005-12-05 Paolo Bonzini * acx.m4 (GCC_TARGET_TOOL): New. 2005-09-23 Tom Tromey * enable.m4: New file. * tls.m4: New file. 2005-08-12 Paolo Bonzini * config/acx.m4 (NCN_CHECK_TARGET_TOOL, NCN_STRICT_CHECK_TOOL, NCN_STRICT_CHECK_TARGET_TOOL): Remove. (NCN_STRICT_CHECK_TOOLS, NCN_STRICT_CHECK_TARGET_TOOLS): New, based on the deleted macros. 2005-07-27 Mark Mitchell * mt-gnu (CXXFLAGS): Include SYSROOT_CFLAGS_FOR_TARGET. 2005-07-16 Kelley Cook * all files: Update FSF address. 2005-06-14 Tom Tromey PR libgcj/19877: * no-executables.m4: Call real AC_FUNC_MMAP when cache variable is set but not 'no'. 2005-06-13 Zack Weinberg * depstand.m4, lead-dot.m4: New files. 2005-05-19 Kelley Cook * accross.m4: Delete file. 2005-05-12 Ryota Kunisawa PR bootstrap/21230 * warnings.m4 (ACX_PROG_CC_WARNING_ALMOST_PEDANTIC): Add double quotes around GCC variable. 2005-04-29 Paolo Bonzini * acx.m4 (ACX_PROG_GNAT): Remove stray break. 2005-03-31 Paolo Bonzini * gcc-lib-path.m4: Remove. 2005-03-21 Zack Weinberg * gxx-include-dir.m4: In all substitutions, leave $(gcc_version) to be expanded by the Makefile. 2005-03-15 Zack Weinberg * gcc-version.m4: Delete. 2005-02-28 Paolo Bonzini PR bootstrap/17383 * acx.m4 (GCC_TOPLEV_SUBDIRS): Set HOST_SUBDIR if an in-src gcc build is going. 2005-01-23 Joseph S. Myers * warnings.m4 (ACX_PROG_CC_WARNING_ALMOST_PEDANTIC): Don't do anything for non-GCC compilers. 2004-12-03 Richard Sandiford * gxx-include-dir.m4: New file. 2004-12-02 Richard Sandiford * gcc-version.m4: New file. 2004-09-24 Zack Weinberg * warnings.m4: New file. 2004-09-23 H.J. Lu PR bootstrap/17369 * gcc-lib-path.m4: New file. 2004-09-22 Kelley Cook * gettext-sister.m4: Renamed from gettext.m4 * codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4, po.m4, inttypes.m4, inttypes-pri.m4, inttypes_h.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4, nls.m4, progtest.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4: Import from gettext-0.12.1 sources. 2004-08-31 Robert Bowdidge * mh-ppc-darwin: Add file, and override BOOT_CFLAGS. 2004-08-13 Nathanael Nerode * Add ACX_{TARGET,HOST,BUILD}_NONCANONICAL, which do an automatic AC_SUBST on _GCC_TOPLEV_*_NONCANONICAL. The intention is that we will migrate to these bit by bit. 2004-08-01 Robert Millan * mt-linux: Rename to ... * mt-gnu: ... this. 2004-06-09 Paolo Bonzini * acx.m4 (ACX_PROG_LN): From gcc, modified to accept a parameter. 2004-05-23 Paolo Bonzini * acx.m4 (ACX_HEADER_STDBOOL, ACX_HEADER_STRING): From gcc. 2004-04-16 Rainer Orth * acx.m4 (ACX_PROG_GNAT): Check if ${CC} produces object file for Ada compilation. Fix acx_cv_cc_gcc_supports_ada spelling. 2004-03-08 Paolo Bonzini PR ada/14131 Move language detection to the top level. * acx.m4 (ACX_PROG_GNAT): New macro, moved here from the gcc subdirectory. 2004-03-09 Hans-Peter Nilsson * accross.m4 (AC_C_BIGENDIAN_CROSS): Compile endian probe with "-c". Properly quote parameter for AC_MSG_ERROR. 2004-01-14 Maciej W. Rozycki * acinclude.m4: Quote names of macros to be defined by AC_DEFUN throughout. * aclocal.m4: Regenerate. * configure: Regenerate. 2003-10-14 Nathanael Nerode * gettext.m4: Properly quote arguments to AC_DEFUN. 2003-09-24 Daniel Jacobowitz * acx.m4 (AC_PROG_CPP_WERROR): New. 2003-08-27 Daniel Jacobowitz * no-executables.m4: New file. 2003-07-07 Zack Weinberg * gettext.m4: Delete all former contents. (ZW_GNU_GETTEXT_SISTER_DIR): New macro. * progtest.m4: New file. 2003-07-04 Zack Weinberg * gettext.m4: New file - copy of gettext.m4 from binutils CVS, with added AC_ISC_POSIX macro from gcc/aclocal.m4. 2003-05-14 Kelley Cook * acinclude.m4: Accept i[3456789]86 for machine type. 2003-05-18 Nathanael Nerode * acx.m4: Introduce _GCC_TOPLEV_NONCANONICAL_BUILD, _GCC_TOPLEV_NONCANOICAL_HOST, _GCC_TOPLEV_NONCANONICAL_TARGET, GCC_TOPLEV_SUBDIRS. 2003-03-04 Nathanael Nerode * mh-dgux: Delete. 2002-12-28 Alexandre Oliva * acx.m4: Name cache variables properly. (NCN_STRICT_CHECK_TOOL): If program is not found and value-if-not-found is empty, use ${ncn_tool_prefix}$2 or $2, depending on whether build != host or not. (NCN_STRICT_CHECK_TARGET_TOOL): Ditto, with the target prefix. 2002-12-28 Nathanael Nerode * acx.m4: New. * mh-a68bsd, mh-aix386, mh-apollo68, mh-delta88, mh-hp300, mh-hpux, mh-hpux8, mh-irix5, mh-irix6, mh-ncrsvr43, mh-openedition, mh-riscos, mh-sysv: Delete. * mh-cxux, mh-dgux386, mh-interix, mh-lynxrs6k, mh-ncr3000, mh-necv4, mh-sco, mh-solaris, mh-sysv4, mh-sysv5, mt-v810: Simplify. 2002-12-16 Christopher Faylor * mh-cygwin: Don't build libtermcap if it doesn't exist. 2002-12-22 Geoffrey Keating * mt-aix43: Delete. 2002-11-23 H.J. Lu * accross.m4: New. 2002-11-10 Stan Shebs Retire common MPW configury bits. * mpw-mh-mpw: Remove. * mpw: Remove directory along with all of its files. 2002-05-16 Rainer Orth * acinclude.m4: Allow for PWDCMD to override hardcoded pwd. 2002-05-13 Nathanael Nerode * mh-apollo68: remove unused HDEFINES setting. * mh-dgux: remove unused HDEFINES setting. * mh-dgux386: remove unused HDEFINES setting, duplicate RANLIB=true. 2002-04-29 Nathanael Nerode * mh-cxux: remove dead code * mh-dgux386: remove dead code * mh-hp300: remove dead code * mh-hpux: remove dead code * mh-hpux8: remove dead code * mh-irix5: remove dead code * mh-irix6: remove dead code * mh-ncr3000: remove dead code * mh-ncrsvr43: remove dead code * mh-necv4: remove dead code * mh-sco: remove dead code * mh-solaris: remove dead code * mh-sysv: remove dead code * mh-sysv4: remove dead code * mh-sysv5: remove dead code * mh-irix4: remove, contains only dead code * mt-armpic: Delete. * mt-elfalphapic: Delete. * mt-i370pic: Delete. * mt-ia64pic: Delete. * mt-m68kpic: Delete. * mt-papic: Delete. * mt-ppcpic: Delete. * mt-s390pic: Delete. * mt-sparcpic: Delete. * mt-x86pic: Delete. 2002-04-19 Nathanael Nerode * mh-a68bsd: clean out dead code * mh-apollo68: clean out dead code * mh-cxux: clean out dead code * mh-decstation: clean out dead code * mh-dgux: clean out dead code * mh-dgux386: clean out dead code * mh-hp300: clean out dead code * mh-hpux: clean out dead code * mh-hpux8: clean out dead code * mh-interix: clean out dead code * mh-irix4: clean out dead code * mh-lynxrs6k: clean out dead code * mh-mingw32: clean out dead code * mh-ncr3000: clean out dead code * mh-ncrsvr43: clean out dead code * mh-necv4: clean out dead code * mh-openedition: clean out dead code * mh-riscos: clean out dead code * mh-sco: clean out dead code * mh-sysv4: clean out dead code * mh-lynxos: removed, contained only dead code * mh-vaxult2: removed, contained only dead code * mh-sun3: removed, contained only dead code 2002-04-15 Keith Seitz * acinclude.m4 (CYG_AC_PATH_TCLCONFIG): Search the win/ directory, too. (CYG_AC_PATH_TKCONFIG): Likewise. 2001-10-07 Joseph S. Myers * acinclude.m4: Fix spelling error of "separate" as "seperate". 2001-05-22 Jason Merrill * mt-linux (CXXFLAGS_FOR_TARGET): Lose -fvtable-thunks. 2001-01-27 Richard Henderson * mt-alphaieee: New file. 2001-01-02 Laurynas Biveinis * mh-djgpp: do not set CFLAGS. 2000-08-04 Mark Elbrecht * mh-djgpp: Conditionally set 'target_alias' to djgpp. Conditionally modify 'gcc_version'. 2000-07-21 Andrew Haley * mh-ia64pic: New file. * mt-ia64pic: New file. 2001-02-09 Martin Schwidefsky * mh-s390pic: New file. * mt-s390pic: New file. 2000-09-26 David Edelsohn * mt-aix43 (NM_FOR_TARGET): Add -B bsd-style flag. 2000-07-14 Mark P Mitchell * mh-irix6 (CC): Don't set it. 2000-06-21 Branko Cibej * mh-sparcpic: Use single instead of double quotes. * mt-sparcpic: Likewise. 2000-06-19 Syd Polk * acinclude.m4: Updated for Incr Tcl 3.0. 2000-02-23 Linas Vepstas * mh-i370pic: New file. * mt-i370pic: New file. 2000-02-22 Nick Clifton * mt-wince: new file: Makefile fragment for WinCE targets. 2000-01-06 Geoff Keating * mh-aix43: Delete, move to mt-aix43. * mt-aix43: New file. Tue Sep 7 23:31:01 1999 Linas Vepstas * mh-openedition: New file. 1999-04-07 Michael Meissner * mt-d30v: New file, pass -g -Os -Wa,-C as default options. Thu Mar 18 00:17:50 1999 Mark Elbrecht * mh-go32: Delete. * mh-djgpp: New. Renamed from mh-go32. Wed Feb 24 12:52:17 1999 Stan Shebs * mh-windows: Ditto. 1999-02-08 Syd Polk * acinclude.m4: Added macros to find itcl files. Export TCL_CFLAGS from tclConfig.sh. Export TCL_LIB_FULL_PATH, TK_LIB_FULL_PATH, ITCL_LIB_FULL_PATH, ITK_LIB_FULL_PATH, and TIX_LIB_FULL_PATH Replace TIX macros with better ones from snavigator. Tue Feb 2 22:51:21 1999 Philip Blundell * mh-armpic: New file. Patch from Jim Pick . * mt-armpic: Likewise. Sat Jan 30 08:04:00 1999 Mumit Khan * mh-interix: New file. Mon Jan 18 19:41:08 1999 Christopher Faylor * cygwin.mh: Activate commented out dependencies for gdb: libtermcap. Wed Dec 30 20:34:52 1998 Christopher Faylor * mt-cygwin: Remove. Wed Dec 30 01:13:03 1998 Christopher Faylor * mt-cygwin: New file. libtermcap target info. Wed Nov 18 20:29:46 1998 Christopher Faylor * cygwin.mh: Add extra libtermcap target information. Add commented out dependency for gdb to libtermcap for future readline requirement. Mon Nov 2 15:15:33 1998 Geoffrey Noer * mh-cygwin32: delete * mh-cygwin: was mh-cygwin32 1998-10-26 Syd Polk * acinclude.m4: TCLHDIR and TKHDIR need to be run through cygpath for Microsoft builds. 1998-10-20 Syd Polk * acinclude.m4: Re-exported TCL_LIBS and TCL_LD_SEARCH_FLAGS because itcl needs them. Mon Aug 31 17:50:53 1998 David Edelsohn * mh-aix43 (NM_FOR_TARGET): Add -X32_64 as well. Sat Aug 29 14:32:55 1998 David Edelsohn * mh-aix43: New file. Mon Aug 10 00:15:47 1998 HJ Lu (hjl@gnu.org) * mt-linux (CXXFLAGS_FOR_TARGET): Add -D_GNU_SOURCE. 1998-05-29 Rob Savoye * acinclude.m4: New collection of generic autoconf macros. Wed Apr 22 12:24:28 1998 Michael Meissner * mt-ospace: New file, support using -Os instead of -O2 to compile the libraries. Wed Apr 22 10:53:14 1998 Andreas Schwab * mt-linux (CXXFLAGS_FOR_TARGET): Set this instead of CXXFLAGS. Sat Apr 11 22:43:17 1998 J. Kean Johnston * mh-svsv5: New file - support for SCO UnixWare 7 / SVR5. Thu Mar 26 01:54:25 1998 Geoffrey Noer * mh-cygwin32: stop configuring and building dosrel. Fri Feb 6 01:33:52 1998 Manfred Hollstein * mh-sparcpic (PICFLAG): Define to properly according to current multilib configuration. * mt-sparcpic (PICFLAG_FOR_TARGET): Define to properly according to current multilib configuration. Sun Jan 4 01:06:55 1998 Mumit Khan * mh-mingw32: New file. Thu Sep 11 16:43:27 1997 Jim Wilson * mh-elfalphapic, mt-elfalphapic: New files. 1997-09-15 02:37 Ulrich Drepper * mt-linux: Define CXXFLAGS to make sure -fvtable-thunks is used. Sun Sep 14 20:53:42 1997 Geoffrey Noer * mh-cygwin32: ok to build split texinfo files Wed Jul 23 12:32:18 1997 Robert Hoehne * mh-go32 (CFLAGS): Don't set -fno-omit-frame-pointer. Mon Jun 16 19:06:41 1997 Geoff Keating * mh-ppcpic: New file. * mt-ppcpic: New file. Thu Mar 27 15:52:40 1997 Geoffrey Noer * mh-cygwin32: override CXXFLAGS, setting to -O2 only (no debug) Tue Mar 25 18:16:43 1997 Geoffrey Noer * mh-cygwin32: override LIBGCC2_DEBUG_CFLAGS so debug info isn't included in cygwin32-hosted libgcc2.a by default Wed Jan 8 19:56:43 1997 Geoffrey Noer * mh-cygwin32: override CFLAGS so debug info isn't included in cygwin32-hosted tools by default Tue Dec 31 16:04:26 1996 Ian Lance Taylor * mh-linux: Remove. Mon Nov 11 10:29:51 1996 Michael Meissner * mt-ppc: Delete file, options moved to newlib configure. Mon Oct 28 17:32:46 1996 Stu Grossman (grossman@critters.cygnus.com) * mh-windows: Add rules for building MSVC makefiles. Thu Oct 24 09:02:07 1996 Stu Grossman (grossman@critters.cygnus.com) * mh-windows (HOST_FLAGS): Set srcroot, which is needed for MSVC build procedure. Tue Oct 8 08:32:48 1996 Stu Grossman (grossman@critters.cygnus.com) * mh-windows: Add support for windows host (that is a build done under the Microsoft build environment). Fri Oct 4 12:21:03 1996 Angela Marie Thomas (angela@cygnus.com) * mh-dgux386: New file. x86 dgux specific flags Mon Sep 30 15:10:07 1996 Stan Shebs * mpw-mh-mpw (EXTRALIBS_PPC_XCOFF): New, was EXTRALIBS_PPC. (EXTRALIBS_PPC): Use shared libraries instead of xcoff. Sat Aug 17 04:56:25 1996 Geoffrey Noer * mh-cygwin32: don't -D_WIN32 here anymore Sun Aug 11 20:51:50 1996 Stu Grossman (grossman@critters.cygnus.com) * mh-cygwin32 (CFLAGS): Define _WIN32 to be compatible with normal Windows compilation environment. Thu Aug 15 19:46:44 1996 Stan Shebs * mpw-mh-mpw (SEGFLAG_68K, SEGFLAG_PPC): Remove. (EXTRALIBS_PPC): Add libgcc.xcoff. Thu Aug 8 14:51:47 1996 Michael Meissner * mt-ppc: New file, add -mrelocatable-lib and -mno-eabi to all target builds for PowerPC eabi targets. Fri Jul 12 12:06:01 1996 Stan Shebs * mpw: New subdir, Mac MPW configuration support bits. Mon Jul 8 17:30:52 1996 Jim Wilson * mh-irix6: New file. Mon Jul 8 15:15:37 1996 Jason Merrill * mt-sparcpic (PICFLAG_FOR_TARGET): Use -fPIC. Fri Jul 5 11:49:02 1996 Ian Lance Taylor * mh-irix4 (RANLIB): Don't define; Irix 4 does have ranlib. Sun Jun 23 22:59:25 1996 Geoffrey Noer * mh-cygwin32: new file. Like mh-go32 without the CFLAGS entry. Tue Mar 26 14:10:41 1996 Ian Lance Taylor * mh-go32 (CFLAGS): Define. Thu Mar 14 19:20:54 1996 Ian Lance Taylor * mh-necv4: New file. Thu Feb 15 13:07:43 1996 Ian Lance Taylor * mh-cxux (CC): New variable. (CFLAGS, LDFLAGS): Remove. * mh-ncrsvr43 (CC): New variable. (CFLAGS): Remove. * mh-solaris (CFLAGS): Remove. * mh-go32: Remove most variable settings, since they presumed a Canadian Cross, which is now handled correctly by the configure script. * mh-sparcpic (PICFLAG): Set to -fPIC, not -fpic. Mon Feb 12 14:53:39 1996 Andreas Schwab * mh-m68kpic, mt-m68kpic: New files. Thu Feb 1 14:15:42 1996 Stan Shebs * mpw-mh-mpw (CC_MWC68K): Add options similar to those used in CC_MWCPPC, and -mc68020 -model far. (AR_MWLINK68K): Add -xm library. (AR_AR): Define. (CC_LD_MWLINK68K): Remove -d. (EXTRALIBS_MWC68K): Define. Thu Jan 25 16:05:33 1996 Ian Lance Taylor * mh-ncrsvr43 (CFLAGS): Remove -Hnocopyr. Thu Nov 30 14:45:25 1995 J.T. Conklin * mt-v810 (CC_FOR_TARGET): Add -ansi flag. NEC compiler defaults to K&R mode, but doesn't have varargs.h, so we have to compile in ANSI mode. Wed Nov 29 13:49:08 1995 J.T. Conklin * mt-v810 (CC_FOR_TARGET, AS_FOR_TARGET, AR_FOR_TARGET, RANLIB_FOR_TARGET): Set as appropriate for NEC v810 toolchain. Tue Nov 14 15:03:12 1995 Jason Molenda (crash@phydeaux.cygnus.com) * mh-i386win32: add LD_FOR_TARGET. Tue Nov 7 15:41:30 1995 Stan Shebs * mpw-mh-mpw (CC_MWC68K, CC_MWCPPC): Remove unused include path. (CC_MWCPPC): Add -mpw_chars, disable warnings, add comments explaining reasons for various flags. (EXTRALIBS_PPC, EXTRALIBS_MWCPPC ): Put runtime library first. Fri Oct 13 14:44:25 1995 Jason Molenda (crash@phydeaux.cygnus.com) * mh-aix, mh-sun: Removed. * mh-decstation (X11_EXTRA_CFLAGS): Define. * mh-sco, mh-solaris, mh-sysv4 (X11_EXTRA_LIBS): Define. * mh-hp300, mh-hpux, mh-hpux8, mh-solaris, mh-sun3, mh-sysv4: Don't hardcode location of X stuff here. Thu Sep 28 13:14:56 1995 Stan Shebs * mpw-mh-mpw: Add definitions for various 68K and PowerMac compilers, add definitions for library and link steps for PowerMacs. Sat Sep 16 18:31:08 PDT 1995 Angela Marie Thomas * mh-ncrsvr43: Removed AR_FLAGS Thu Sep 14 08:20:04 1995 Fred Fish * mh-hp300 (CC): Add "CC = cc -Wp,-H256000" to avoid "too much defining" errors from the HPUX compiler. Thu Aug 17 17:28:56 1995 Ken Raeburn * mh-hp300 (RANLIB): Use "ar ts", in case GNU ar was used and didn't build a symbol table. Thu Jun 22 17:47:24 1995 Stan Shebs * mpw-mh-mpw (CC): Define ANSI_PROTOTYPES. Mon Jun 5 18:26:36 1995 Jason Merrill * m?-*pic: Define PICFLAG* instead of LIB*FLAGS*. Mon Apr 10 12:29:48 1995 Stan Shebs * mpw-mh-mpw (EXTRALIBS): Always link in Math.o, CSANELIB.o, and ToolLibs.o. * mpw-mh-mpw (CC): Define ALMOST_STDC. (CFLAGS): Remove ALMOST_STDC, -mc68881. (LDFLAGS): add -w. * mpw-mh-mpw (CFLAGS): Add -b option to put strings at the ends of functions. * mpw-mh-mpw: New file, host makefile definitions for MPW. Fri Mar 31 11:35:17 1995 Jason Molenda (crash@phydeaux.cygnus.com) * mt-netware: New file. Tue Mar 28 14:47:34 1995 Jason Molenda (crash@phydeaux.cygnus.com) Revert this change: Mon Mar 29 19:59:26 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * mh-solaris: SunPRO C needs -Xs to be able to get a working xmakefile for Emacs. Mon Mar 13 12:31:29 1995 Ian Lance Taylor * mh-hpux8: New file. * mh-hpux: Use X11R5 rather than X11R4. Thu Feb 9 11:04:13 1995 Ian Lance Taylor * mh-linux (SYSV): Don't define. (RANLIB): Don't define. Wed Jan 11 16:29:34 1995 Jason Merrill * m?-*pic (LIBCXXFLAGS): Add -fno-implicit-templates. Sat Nov 5 18:43:30 1994 Jason Merrill (jason@phydeaux.cygnus.com) * m[th]-*pic: Support --enable-shared. Thu Nov 3 17:27:19 1994 Ken Raeburn * mh-irix4 (CC): Increase maximum string length. * mh-sco (CC): Define away const, it doesn't work right; elements of arrays of ptr-to-const are considered const themselves. Sat Jul 16 12:17:49 1994 Stan Shebs (shebs@andros.cygnus.com) * mh-cxux: New file, from Bob Rusk (rrusk@mail.csd.harris.com). Sat Jun 4 17:22:12 1994 Per Bothner (bothner@kalessin.cygnus.com) * mh-ncrsvr43: New file from Tom McConnell . Thu May 19 00:32:11 1994 Jeff Law (law@snake.cs.utah.edu) * mh-hpux (CC): Add -Wp,-H256000 to avoid "too much defining" errors from the HPUX 8 compilers. Fri May 6 14:19:25 1994 Steve Chamberlain (sac@cygnus.com) * mh-go32: New fragment. Thu May 5 20:06:45 1994 Ken Raeburn (raeburn@cujo.cygnus.com) * mh-lynxrs6k: Renamed from mh-lynxosrs6k, to make it unique in 8.3 naming schemes. Wed May 4 20:14:47 1994 D. V. Henkel-Wallace (gumby@cygnus.com) * mh-lynxrs6k: set SHELL to /bin/bash Tue Apr 12 12:38:17 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * mh-irix4 (CC): Change -XNh1500 to -XNh2000. Mon Jan 31 18:40:55 1994 Stu Grossman (grossman at cygnus.com) * mh-lynxosrs6k: Account for lack of ranlib! Sat Dec 25 20:03:45 1993 Jeffrey A. Law (law@snake.cs.utah.edu) * mt-hppa: Delete. Thu Dec 2 14:35:54 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * mh-irix5: New file for Irix 5. Tue Nov 16 22:54:39 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * mh-a68bsd: Define CC to gcc. Mon Nov 15 16:56:51 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * mh-linux: Don't put -static in LDFLAGS. Add comments. Mon Nov 15 13:37:58 1993 david d `zoo' zuhn (zoo@cirdan.cygnus.com) * mh-sysv4 (AR_FLAGS): change from cq to cr Fri Nov 5 08:12:32 1993 D. V. Henkel-Wallace (gumby@blues.cygnus.com) * mh-unixware: remove. It's the same as sysv4, and config.guess can't tell the difference. So don't allow skew. Wed Oct 20 20:35:14 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * mh-hp300: Revert yesterday's change, but add comment explaining. Tue Oct 19 18:58:21 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * mh-hp300: Don't define CFLAGS to empty. Why should hp300 be different from anything else? ("gdb doesn't understand the native debug format" isn't a good enough answer because we might be using gcc). Tue Oct 5 12:17:40 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * mh-alphaosf: Remove, no longer necessary now that gdb knows how to handle OSF/1 shared libraries. Tue Jul 6 11:27:33 1993 Steve Chamberlain (sac@phydeaux.cygnus.com) * mh-alphaosf: New file. Thu Jul 1 15:49:33 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * mh-riscos: New file. Mon Jun 14 12:03:18 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com) * mh-aix, mh-aix386, mh-decstation, mh-delta88, mh-hpux, mh-irix4, mh-ncr3000, mh-solaris, mh-sysv, mh-sysv4: remove INSTALL=cp line, now that we're using install.sh globally Fri Jun 4 16:09:34 1993 Ian Lance Taylor (ian@cygnus.com) * mh-sysv4 (INSTALL): Use cp, not /usr/ucb/install. Sat Apr 17 17:19:50 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * mh-delta88: remove extraneous GCC references Thu Apr 8 11:21:52 1993 Ian Lance Taylor (ian@cygnus.com) * mt-a29k, mt-ebmon29k, mt-os68k, mt-ose68000, mt-ose68k, mt-vxworks68, mt-vxworks960: Removed obsolete, unused target Makefile fragment files. Wed Mar 31 12:31:56 1993 Ian Lance Taylor (ian@cygnus.com) * mh-irix4: Bump -XNh value to 1500 to match gcc requirements. Mon Mar 29 19:59:26 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * mh-sun3: cc needs -J to compile cp-parse.c correctly * mh-solaris: SunPRO C needs -Xs to be able to get a working xmakefile for Emacs. Mon Mar 8 15:05:25 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) * mh-aix386: New file; old mh-aix, plus no-op RANLIB. Tue Mar 2 21:15:58 1993 Fred Fish (fnf@cygnus.com) * mh-vaxult2: New file. Sat Jan 23 20:32:01 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * mh-sco: define X11_LIB to the mess that SCO ODT requires Tue Dec 29 15:06:00 1992 Ian Lance Taylor (ian@cygnus.com) * mh-sco: Don't override BISON definition. Mon Dec 7 06:43:27 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * mh-sco: don't default $(CC) to gcc Mon Nov 30 14:54:34 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * mh-solaris: rework standard X location to use $OPENWINHOME, if defined. * mh-sun: handle X11 include locations * mh-decstation: define NeedFunctionPrototypes to 0, to work around dain-bramaged DECwindows include files Fri Nov 27 18:35:54 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * mh-hpux, mh-solaris: define the "standard" locations for the vendor supplied X11 headers and libraries Thu Oct 1 13:50:48 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * mh-solaris: INSTALL is NOT /usr/ucb/install Mon Aug 24 14:25:35 1992 Ian Lance Taylor (ian@cygnus.com) * mt-ose68000, mt-ose68k: renamed from mt-OSE*. Mon Aug 3 15:41:28 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * mh-solaris: removed the -xs from CFLAGS (let the people with Sun's C compiler deal with it themselved) Tue Jul 21 02:11:01 1992 D. V. Henkel-Wallace (gumby@cygnus.com) * mt-OSE68k, mt-680000: new configs. Thu Jul 16 17:12:09 1992 K. Richard Pixley (rich@rtl.cygnus.com) * mh-irix4: merged changes from progressive. Wed Jul 8 00:01:30 1992 Stu Grossman (grossman at cygnus.com) * mh-solaris: Use -xs when compiling so that Sun-C puts a symbol-table into the executable. Mon Jun 15 12:31:52 1992 Fred Fish (fnf@cygnus.com) * mh-ncr3000 (INSTALL): Don't use /usr/ucb/install, it is broken on ncr 3000's. Tue Jun 9 23:29:38 1992 Per Bothner (bothner@rtl.cygnus.com) * Everywhere: Change RANLIB=echo>/dev/null (which confuses some shells - and I don't blame them) to RANLIB=true. * mh-solaris: Use /usr/ucb/install for INSTALL. Tue Jun 9 17:18:11 1992 Fred Fish (fnf at cygnus.com) * mh-ncr3000, mh-sysv4: Add INSTALL. Sun May 31 14:45:23 1992 Mark Eichin (eichin at cygnus.com) * mh-solaris2: Add new configuration for Solaris 2 (sysv, no ranlib) Wed Apr 22 14:38:34 1992 Fred Fish (fnf@cygnus.com) * mh-delta88, mh-ncr3000: Replace MINUS_G with CFLAGS per new configuration strategy. Fri Apr 10 23:10:08 1992 Fred Fish (fnf@cygnus.com) * mh-ncr3000: Add new configuration for NCR 3000. Thu Mar 5 12:05:58 1992 Stu Grossman (grossman at cygnus.com) * mh-irix4: Port to SGI Irix-4.x. Thu Jan 30 16:17:30 1992 Stu Grossman (grossman at cygnus.com) * mh-sco: Fix SCO configuration stuff. Tue Dec 10 00:10:55 1991 K. Richard Pixley (rich at rtl.cygnus.com) * ChangeLog: fresh changelog. gdb-doc-7.6.2/config/math.m40000644000175000017500000000246512250770606014537 0ustar zumbizumbidnl GCC_CHECK_LIBM dnl dnl Check whether -lm is available. This is a pre-requisite for dnl GCC_CHECK_MATH_FUNC so that it will link with -lm. AC_DEFUN([GCC_CHECK_LIBM], [AC_CHECK_LIB([m],[sin])]) dnl GCC_CHECK_MATH_HEADERS dnl dnl Check for math.h and complex.h. This is a pre-requisite for dnl GCC_CHECK_MATH_FUNC so that it includes the right headers. dnl (Some systems, such as AIX or OpenVMS may define macro for math dnl functions). AC_DEFUN([GCC_CHECK_MATH_HEADERS], [AC_CHECK_HEADERS_ONCE(math.h complex.h)]) dnl GCC_CHECK_MATH_FUNC([name]) dnl dnl Check whether math function NAME is available on the system (by compiling dnl and linking a C program) and run define HAVE_name on success. dnl dnl Note that OpenVMS system insists on including complex.h before math.h AC_DEFUN([GCC_CHECK_MATH_FUNC], [ AC_REQUIRE([GCC_CHECK_LIBM]) AC_REQUIRE([GCC_CHECK_MATH_HEADERS]) AC_CACHE_CHECK([for $1], [gcc_cv_math_func_$1], [AC_LINK_IFELSE([ #ifdef HAVE_COMPLEX_H #include #endif #ifdef HAVE_MATH_H #include #endif int (*ptr)() = (int (*)())$1; int main () { return 0; } ], [gcc_cv_math_func_$1=yes], [gcc_cv_math_func_$1=no])]) if test $gcc_cv_math_func_$1 = yes; then AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$1),[1], [Define to 1 if you have the `$1' function.]) fi ]) gdb-doc-7.6.2/config/bootstrap-time.mk0000644000175000017500000000012112250770606016631 0ustar zumbizumbiBOOT_CFLAGS += -time=$(shell pwd)/time.log TFLAGS += -time=$(shell pwd)/time.log gdb-doc-7.6.2/config/mt-alphaieee0000644000175000017500000000013012250770606015605 0ustar zumbizumbiCFLAGS_FOR_TARGET += -mieee CXXFLAGS_FOR_TARGET += -mieee GOCFLAGS_FOR_TARGET += -mieee gdb-doc-7.6.2/config/gthr.m40000644000175000017500000000204012250770606014537 0ustar zumbizumbidnl Copyright (C) 2012 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl Define header location by thread model dnl usage: GCC_AC_THREAD_HEADER([thread_model]) AC_DEFUN([GCC_AC_THREAD_HEADER], [ case $1 in aix) thread_header=config/rs6000/gthr-aix.h ;; dce) thread_header=config/pa/gthr-dce.h ;; lynx) thread_header=config/gthr-lynx.h ;; mipssde) thread_header=config/mips/gthr-mipssde.h ;; posix) thread_header=gthr-posix.h ;; rtems) thread_header=config/gthr-rtems.h ;; single) thread_header=gthr-single.h ;; tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; win32) thread_header=config/i386/gthr-win32.h ;; esac AC_SUBST(thread_header) ]) gdb-doc-7.6.2/config/bootstrap-asan.mk0000644000175000017500000000040012250773211016610 0ustar zumbizumbi# This option enables -fsanitize=address for stage2 and stage3. STAGE2_CFLAGS += -fsanitize=address STAGE3_CFLAGS += -fsanitize=address POSTSTAGE1_LDFLAGS += -fsanitize=address -static-libasan \ -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/asan/.libs gdb-doc-7.6.2/config/inttypes.m40000644000175000017500000000171712250770606015464 0ustar zumbizumbi# inttypes.m4 serial 1 (gettext-0.11.4) dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. # Define HAVE_INTTYPES_H if exists and doesn't clash with # . AC_DEFUN([gt_HEADER_INTTYPES_H], [ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, [ AC_TRY_COMPILE( [#include #include ], [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) ]) if test $gt_cv_header_inttypes_h = yes; then AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, [Define if exists and doesn't clash with .]) fi ]) gdb-doc-7.6.2/config/iconv.m40000644000175000017500000000665312250770606014727 0ustar zumbizumbi# iconv.m4 serial AM4 (gettext-0.11.3) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_lib_iconv=yes am_cv_func_iconv=yes) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST(LIBICONV) AC_SUBST(LTLIBICONV) ]) AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([$]{ac_t:- }[$]am_cv_proto_iconv) AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi ]) gdb-doc-7.6.2/config/mh-cygwin0000644000175000017500000000033512250770606015163 0ustar zumbizumbi# Increase stack limit to a figure based on the Linux default, with 4MB added # as GCC turns out to need that much more to pass all the limits-* tests. LDFLAGS += -Wl,--stack,12582912 BOOT_LDFLAGS += -Wl,--stack,12582912 gdb-doc-7.6.2/config/override.m40000644000175000017500000000712012250770606015416 0ustar zumbizumbidnl Fix Autoconf bugs by overriding broken internal Autoconf dnl macros with backports of fixes from newer releases. dnl dnl The override bits of this file should be a no-op for the newest dnl Autoconf version, which means they can be removed once the complete dnl tree has moved to a new enough Autoconf version. dnl dnl The _GCC_AUTOCONF_VERSION_TEST ensures that exactly the desired dnl Autoconf version is used. It should be kept for consistency. dnl Use ifdef/ifelse over m4_ifdef/m4_ifelse to be clean for 2.13. ifdef([m4_PACKAGE_VERSION], [ dnl Provide m4_copy_force and m4_rename_force for old Autoconf versions. m4_ifndef([m4_copy_force], [m4_define([m4_copy_force], [m4_ifdef([$2], [m4_undefine([$2])])m4_copy($@)])]) m4_ifndef([m4_rename_force], [m4_define([m4_rename_force], [m4_ifdef([$2], [m4_undefine([$2])])m4_rename($@)])]) dnl AC_DEFUN a commonly used macro so this file is picked up. m4_copy([AC_PREREQ], [_AC_PREREQ]) AC_DEFUN([AC_PREREQ], [frob]) m4_copy_force([_AC_PREREQ], [AC_PREREQ]) dnl Ensure exactly this Autoconf version is used m4_ifndef([_GCC_AUTOCONF_VERSION], [m4_define([_GCC_AUTOCONF_VERSION], [2.64])]) dnl Test for the exact version when AC_INIT is expanded. dnl This allows to update the tree in steps (for testing) dnl by putting dnl m4_define([_GCC_AUTOCONF_VERSION], [X.Y]) dnl in configure.ac before AC_INIT, dnl without rewriting this file. dnl Or for updating the whole tree at once with the definition above. AC_DEFUN([_GCC_AUTOCONF_VERSION_CHECK], [m4_if(m4_defn([_GCC_AUTOCONF_VERSION]), m4_defn([m4_PACKAGE_VERSION]), [], [m4_fatal([Please use exactly Autoconf ]_GCC_AUTOCONF_VERSION[ instead of ]m4_defn([m4_PACKAGE_VERSION])[.])]) ]) m4_define([AC_INIT], m4_defn([AC_INIT])[ _GCC_AUTOCONF_VERSION_CHECK ]) dnl Ensure we do not use a buggy M4. m4_if(m4_index([..wi.d.], [.d.]), [-1], [m4_fatal(m4_do([m4 with buggy strstr detected. Please install GNU M4 1.4.16 or newer and set the M4 environment variable]))]) dnl Fix 2.64 cross compile detection for AVR and RTEMS dnl by not trying to compile fopen. m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.64], [m4_foreach([_GCC_LANG], [C, C++, Fortran, Fortran 77], [m4_define([_AC_LANG_IO_PROGRAM(]_GCC_LANG[)], m4_defn([AC_LANG_PROGRAM(]_GCC_LANG[)]))])]) m4_version_prereq([2.66],, [ dnl We need AC_CHECK_DECL which works for overloaded C++ functions. # _AC_CHECK_DECL_BODY # ------------------- # Shell function body for AC_CHECK_DECL. m4_define([_AC_CHECK_DECL_BODY], [ AS_LINENO_PUSH([$[]1]) [as_decl_name=`echo $][2|sed 's/ *(.*//'`] [as_decl_use=`echo $][2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`] AC_CACHE_CHECK([whether $as_decl_name is declared], [$[]3], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$[]4], [@%:@ifndef $[]as_decl_name @%:@ifdef __cplusplus (void) $[]as_decl_use; @%:@else (void) $[]as_decl_name; @%:@endif @%:@endif ])], [AS_VAR_SET([$[]3], [yes])], [AS_VAR_SET([$[]3], [no])])]) AS_LINENO_POP ])# _AC_CHECK_DECL_BODY # _AC_CHECK_DECLS(SYMBOL, ACTION-IF_FOUND, ACTION-IF-NOT-FOUND, # INCLUDES) # ------------------------------------------------------------- # Helper to AC_CHECK_DECLS, which generates the check for a single # SYMBOL with INCLUDES, performs the AC_DEFINE, then expands # ACTION-IF-FOUND or ACTION-IF-NOT-FOUND. m4_define([_AC_CHECK_DECLS], [AC_CHECK_DECL([$1], [ac_have_decl=1], [ac_have_decl=0], [$4])]dnl [AC_DEFINE_UNQUOTED(AS_TR_CPP(m4_bpatsubst(HAVE_DECL_[$1],[ *(.*])), [$ac_have_decl], [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])]dnl [m4_ifvaln([$2$3], [AS_IF([test $ac_have_decl = 1], [$2], [$3])])]) ]) ]) gdb-doc-7.6.2/config/mt-sde0000644000175000017500000000126112250770606014451 0ustar zumbizumbi# We default to building libraries optimised for size. We use # -minterlink-mips16 so that the non-MIPS16 libraries can still be # linked against partly-MIPS16 code. The -mcode-readable=pcrel option allows # MIPS16 libraries to run on Harvard-style split I/D memories, so long # as they have the D-to-I redirect for PC-relative loads. -mno-gpopt # has two purposes: it allows libraries to be used in situations where # $gp != our _gp, and it allows them to be built with -G8 while # retaining link compatibility with -G0 and -G4. CFLAGS_FOR_TARGET += -Os -minterlink-mips16 -mcode-readable=pcrel -mno-gpopt CXXFLAGS_FOR_TARGET += -Os -minterlink-mips16 -mcode-readable=pcrel -mno-gpopt gdb-doc-7.6.2/config/lead-dot.m40000644000175000017500000000212212250770606015265 0ustar zumbizumbi# -*- Autoconf -*- # Copyright (C) 2003, 2009 Free Software Foundation, Inc. # 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 3, 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; see the file COPYING3. If not see # . # serial 1 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) gdb-doc-7.6.2/config/lib-link.m40000644000175000017500000005534312250770606015312 0ustar zumbizumbi# lib-link.m4 serial 4 (gettext-0.12) dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes undefine([Name]) undefine([NAME]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. If found, it dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) undefine([Name]) undefine([NAME]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, dnl hardcode_direct, hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE(rpath, [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib$1-prefix], [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib --without-lib$1-prefix don't search for lib$1 in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/lib" fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then found_dir="$additional_libdir" found_so="$additional_libdir/lib$name.$shlibext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then found_dir="$dir" found_so="$dir/lib$name.$shlibext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */lib | */lib/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/lib"; then haveit= if test "X$additional_libdir" = "X/usr/local/lib"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) gdb-doc-7.6.2/config/gettext-sister.m40000644000175000017500000000523112250770606016573 0ustar zumbizumbi# intl sister-directory configuration rules. # # The idea behind this macro is that there's no need to repeat all the # autoconf probes done by the intl directory - it's already done them # for us. In fact, there's no need even to look at the cache for the # answers. All we need to do is nab a few pieces of information. # The intl directory is set up to make this easy, by generating a # small file which can be sourced as a shell script; then we produce # the necessary substitutions and definitions for this directory. AC_DEFUN([ZW_GNU_GETTEXT_SISTER_DIR], [# If we haven't got the data from the intl directory, # assume NLS is disabled. USE_NLS=no AC_SUBST(USE_NLS) LIBINTL= AC_SUBST(LIBINTL) LIBINTL_DEP= AC_SUBST(LIBINTL_DEP) INCINTL= AC_SUBST(INCINTL) XGETTEXT= AC_SUBST(XGETTEXT) GMSGFMT= AC_SUBST(GMSGFMT) POSUB= AC_SUBST(POSUB) if test -f ifelse([$1],,[../intl],[$1])/config.intl; then . ifelse([$1],,[../intl],[$1])/config.intl fi AC_MSG_CHECKING([whether NLS is requested]) if test x"$USE_NLS" != xyes; then AC_MSG_RESULT(no) else AC_MSG_RESULT(yes) AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.]) AC_MSG_CHECKING(for catalogs to be installed) # Look for .po and .gmo files in the source directory. CATALOGS= AC_SUBST(CATALOGS) XLINGUAS= for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do # If there aren't any .gmo files the shell will give us the # literal string "../path/to/srcdir/po/*.gmo" which has to be # weeded out. case "$cat" in *\**) continue;; esac # The quadruple backslash is collapsed to a double backslash # by the backticks, then collapsed again by the double quotes, # leaving us with one backslash in the sed expression (right # before the dot that mustn't act as a wildcard). cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` lang=`echo $cat | sed -e "s!\\\\.gmo!!"` # The user is allowed to set LINGUAS to a list of languages to # install catalogs for. If it's empty that means "all of them." if test "x$LINGUAS" = x; then CATALOGS="$CATALOGS $cat" XLINGUAS="$XLINGUAS $lang" else case "$LINGUAS" in *$lang*) CATALOGS="$CATALOGS $cat" XLINGUAS="$XLINGUAS $lang" ;; esac fi done LINGUAS="$XLINGUAS" AC_MSG_RESULT($LINGUAS) dnl Set up some additional variables which our po/Make-in files dnl may need. dnl For backward compatibility. Some Makefiles may be using these. DATADIRNAME=share AC_SUBST(DATADIRNAME) INSTOBJEXT=.mo AC_SUBST(INSTOBJEXT) GENCAT=gencat AC_SUBST(GENCAT) CATOBJEXT=.gmo AC_SUBST(CATOBJEXT) fi]) gdb-doc-7.6.2/config/lcmessage.m40000644000175000017500000000261612250770606015547 0ustar zumbizumbi# lcmessage.m4 serial 3 (gettext-0.11.3) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995. # Check whether LC_MESSAGES is available in . AC_DEFUN([AM_LC_MESSAGES], [ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi ]) gdb-doc-7.6.2/config/ld-symbolic.m40000644000175000017500000000331312250770606016015 0ustar zumbizumbidnl Copyright (C) 2007 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl Set SYMBOLIC_LDFLAGS to -Bsymbolic-functions for GNU linker if it dnl is supported. AC_DEFUN([ACX_PROG_LD_GNU_SYMBOLIC], [AC_CACHE_CHECK([if the GNU linker ($LD) supports -Bsymbolic-functions], acl_cv_prog_gnu_ld_symbolic, [ acl_cv_prog_gnu_ld_symbolic=no AC_REQUIRE([AC_LIB_PROG_LD_GNU]) if test x"$with_gnu_ld" = x"yes"; then if $LD --help 2>&1 &5; then acl_cv_prog_gnu_ld_symbolic=yes fi fi]) if test x"$acl_cv_prog_gnu_ld_symbolic" = x"yes"; then SYMBOLIC_LDFLAGS="-Wl,-Bsymbolic-functions" else SYMBOLIC_LDFLAGS='' fi ]) dnl Set DYNAMIC_LIST_CPP_NEW_LDFLAGS to --dynamic-list-cpp-new for GNU dnl linker if it is supported. AC_DEFUN([ACX_PROG_LD_GNU_DYNAMIC_LIST_CPP_NEW], [AC_CACHE_CHECK([if the GNU linker ($LD) supports --dynamic-list-cpp-new], acl_cv_prog_gnu_ld_dynamic_list_cpp_new, [ acl_cv_prog_gnu_ld_dynamic_list_cpp_new=no AC_REQUIRE([ACX_PROG_LD_GNU_SYMBOLIC]) if test x"$with_gnu_ld" = x"yes" -a \ x"$acl_cv_prog_gnu_ld_symbolic" = x"yes"; then if $LD --help 2>&1 &5; then acl_cv_prog_gnu_ld_dynamic_list_cpp_new=yes fi fi]) if test x"$acl_cv_prog_gnu_ld_dynamic_list_cpp_new" = x"yes"; then DYNAMIC_LIST_CPP_NEW_LDFLAGS="$SYMBOLIC_LDFLAGS -Wl,--dynamic-list-cpp-new" else DYNAMIC_LIST_CPP_NEW_LDFLAGS='' fi ]) gdb-doc-7.6.2/config/asmcfi.m40000644000175000017500000000073212250770606015043 0ustar zumbizumbi;; Cribbed from libffi AC_DEFUN([GCC_AS_CFI_PSEUDO_OP], [AC_CACHE_CHECK([assembler .cfi pseudo-op support], gcc_cv_as_cfi_pseudo_op, [ gcc_cv_as_cfi_pseudo_op=unknown AC_TRY_COMPILE([asm (".cfi_startproc\n\t.cfi_endproc");],, [gcc_cv_as_cfi_pseudo_op=yes], [gcc_cv_as_cfi_pseudo_op=no]) ]) if test "x$gcc_cv_as_cfi_pseudo_op" = xyes; then AC_DEFINE(HAVE_AS_CFI_PSEUDO_OP, 1, [Define if your assembler supports .cfi_* directives.]) fi ]) gdb-doc-7.6.2/config/intdiv0.m40000644000175000017500000000356512250770606015165 0ustar zumbizumbi# intdiv0.m4 serial 1 (gettext-0.11.3) dnl Copyright (C) 2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. AC_DEFUN([gt_INTDIV0], [ AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], gt_cv_int_divbyzero_sigfpe, [ AC_TRY_RUN([ #include #include static void #ifdef __cplusplus sigfpe_handler (int sig) #else sigfpe_handler (sig) int sig; #endif { /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ exit (sig != SIGFPE); } int x = 1; int y = 0; int z; int nan; int main () { signal (SIGFPE, sigfpe_handler); /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) signal (SIGTRAP, sigfpe_handler); #endif /* Linux/SPARC yields signal SIGILL. */ #if defined (__sparc__) && defined (__linux__) signal (SIGILL, sigfpe_handler); #endif z = x / y; nan = y / y; exit (1); } ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, [ # Guess based on the CPU. case "$host_cpu" in alpha* | i[34567]86 | m68k | s390*) gt_cv_int_divbyzero_sigfpe="guessing yes";; *) gt_cv_int_divbyzero_sigfpe="guessing no";; esac ]) ]) case "$gt_cv_int_divbyzero_sigfpe" in *yes) value=1;; *) value=0;; esac AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, [Define if integer division by zero raises signal SIGFPE.]) ]) gdb-doc-7.6.2/config/stdint.m40000644000175000017500000004046412250770606015114 0ustar zumbizumbiAC_DEFUN([GCC_STDINT_TYPES], [AC_REQUIRE([AC_TYPE_INT8_T]) AC_REQUIRE([AC_TYPE_INT16_T]) AC_REQUIRE([AC_TYPE_INT32_T]) AC_REQUIRE([AC_TYPE_INT64_T]) AC_REQUIRE([AC_TYPE_INTMAX_T]) AC_REQUIRE([AC_TYPE_INTPTR_T]) AC_REQUIRE([AC_TYPE_UINT8_T]) AC_REQUIRE([AC_TYPE_UINT16_T]) AC_REQUIRE([AC_TYPE_UINT32_T]) AC_REQUIRE([AC_TYPE_UINT64_T]) AC_REQUIRE([AC_TYPE_UINTMAX_T]) AC_REQUIRE([AC_TYPE_UINTPTR_T])]) dnl @synopsis GCC_HEADER_STDINT [( HEADER-TO-GENERATE [, HEADERS-TO-CHECK])] dnl dnl the "ISO C9X: 7.18 Integer types " section requires the dnl existence of an include file that defines a set of dnl typedefs, especially uint8_t,int32_t,uintptr_t. dnl Many older installations will not provide this file, but some will dnl have the very same definitions in . In other environments dnl we can use the inet-types in which would define the dnl typedefs int8_t and u_int8_t respectivly. dnl dnl This macros will create a local "_stdint.h" or the headerfile given as dnl an argument. In many cases that file will pick the definition from a dnl "#include " or "#include " statement, while dnl in other environments it will provide the set of basic 'stdint's defined: dnl int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t dnl int_least32_t.. int_fast32_t.. intmax_t dnl which may or may not rely on the definitions of other files. dnl dnl Sometimes the stdint.h or inttypes.h headers conflict with sys/types.h, dnl so we test the headers together with sys/types.h and always include it dnl into the generated header (to match the tests with the generated file). dnl Hopefully this is not a big annoyance. dnl dnl If your installed header files require the stdint-types you will want to dnl create an installable file mylib-int.h that all your other installable dnl header may include. So, for a library package named "mylib", just use dnl GCC_HEADER_STDINT(mylib-int.h) dnl in configure.in and install that header file in Makefile.am along with dnl the other headers (mylib.h). The mylib-specific headers can simply dnl use "#include " to obtain the stdint-types. dnl dnl Remember, if the system already had a valid , the generated dnl file will include it directly. No need for fuzzy HAVE_STDINT_H things... dnl dnl @author Guido Draheim , Paolo Bonzini AC_DEFUN([GCC_HEADER_STDINT], [m4_define(_GCC_STDINT_H, m4_ifval($1, $1, _stdint.h)) inttype_headers=`echo inttypes.h sys/inttypes.h $2 | sed -e 's/,/ /g'` acx_cv_header_stdint=stddef.h acx_cv_header_stdint_kind="(already complete)" for i in stdint.h $inttype_headers; do unset ac_cv_type_uintptr_t unset ac_cv_type_uintmax_t unset ac_cv_type_int_least32_t unset ac_cv_type_int_fast32_t unset ac_cv_type_uint64_t _AS_ECHO_N([looking for a compliant stdint.h in $i, ]) AC_CHECK_TYPE(uintmax_t,[acx_cv_header_stdint=$i],continue,[#include #include <$i>]) AC_CHECK_TYPE(uintptr_t,,[acx_cv_header_stdint_kind="(mostly complete)"], [#include #include <$i>]) AC_CHECK_TYPE(int_least32_t,,[acx_cv_header_stdint_kind="(mostly complete)"], [#include #include <$i>]) AC_CHECK_TYPE(int_fast32_t,,[acx_cv_header_stdint_kind="(mostly complete)"], [#include #include <$i>]) AC_CHECK_TYPE(uint64_t,,[acx_cv_header_stdint_kind="(lacks uint64_t)"], [#include #include <$i>]) break done if test "$acx_cv_header_stdint" = stddef.h; then acx_cv_header_stdint_kind="(lacks uintmax_t)" for i in stdint.h $inttype_headers; do unset ac_cv_type_uintptr_t unset ac_cv_type_uint32_t unset ac_cv_type_uint64_t _AS_ECHO_N([looking for an incomplete stdint.h in $i, ]) AC_CHECK_TYPE(uint32_t,[acx_cv_header_stdint=$i],continue,[#include #include <$i>]) AC_CHECK_TYPE(uint64_t,,,[#include #include <$i>]) AC_CHECK_TYPE(uintptr_t,,,[#include #include <$i>]) break done fi if test "$acx_cv_header_stdint" = stddef.h; then acx_cv_header_stdint_kind="(u_intXX_t style)" for i in sys/types.h $inttype_headers; do unset ac_cv_type_u_int32_t unset ac_cv_type_u_int64_t _AS_ECHO_N([looking for u_intXX_t types in $i, ]) AC_CHECK_TYPE(u_int32_t,[acx_cv_header_stdint=$i],continue,[#include #include <$i>]) AC_CHECK_TYPE(u_int64_t,,,[#include #include <$i>]) break done fi if test "$acx_cv_header_stdint" = stddef.h; then acx_cv_header_stdint_kind="(using manual detection)" fi test -z "$ac_cv_type_uintptr_t" && ac_cv_type_uintptr_t=no test -z "$ac_cv_type_uint64_t" && ac_cv_type_uint64_t=no test -z "$ac_cv_type_u_int64_t" && ac_cv_type_u_int64_t=no test -z "$ac_cv_type_int_least32_t" && ac_cv_type_int_least32_t=no test -z "$ac_cv_type_int_fast32_t" && ac_cv_type_int_fast32_t=no # ----------------- Summarize what we found so far AC_MSG_CHECKING([what to include in _GCC_STDINT_H]) case `AS_BASENAME(_GCC_STDINT_H)` in stdint.h) AC_MSG_WARN([are you sure you want it there?]) ;; inttypes.h) AC_MSG_WARN([are you sure you want it there?]) ;; *) ;; esac AC_MSG_RESULT($acx_cv_header_stdint $acx_cv_header_stdint_kind) # ----------------- done included file, check C basic types -------- # Lacking an uintptr_t? Test size of void * case "$acx_cv_header_stdint:$ac_cv_type_uintptr_t" in stddef.h:* | *:no) AC_CHECK_SIZEOF(void *) ;; esac # Lacking an uint64_t? Test size of long case "$acx_cv_header_stdint:$ac_cv_type_uint64_t:$ac_cv_type_u_int64_t" in stddef.h:*:* | *:no:no) AC_CHECK_SIZEOF(long) ;; esac if test $acx_cv_header_stdint = stddef.h; then # Lacking a good header? Test size of everything and deduce all types. AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(char) AC_MSG_CHECKING(for type equivalent to int8_t) case "$ac_cv_sizeof_char" in 1) acx_cv_type_int8_t=char ;; *) AC_MSG_ERROR([no 8-bit type, please report a bug]) esac AC_MSG_RESULT($acx_cv_type_int8_t) AC_MSG_CHECKING(for type equivalent to int16_t) case "$ac_cv_sizeof_int:$ac_cv_sizeof_short" in 2:*) acx_cv_type_int16_t=int ;; *:2) acx_cv_type_int16_t=short ;; *) AC_MSG_ERROR([no 16-bit type, please report a bug]) esac AC_MSG_RESULT($acx_cv_type_int16_t) AC_MSG_CHECKING(for type equivalent to int32_t) case "$ac_cv_sizeof_int:$ac_cv_sizeof_long" in 4:*) acx_cv_type_int32_t=int ;; *:4) acx_cv_type_int32_t=long ;; *) AC_MSG_ERROR([no 32-bit type, please report a bug]) esac AC_MSG_RESULT($acx_cv_type_int32_t) fi # These tests are here to make the output prettier if test "$ac_cv_type_uint64_t" != yes && test "$ac_cv_type_u_int64_t" != yes; then case "$ac_cv_sizeof_long" in 8) acx_cv_type_int64_t=long ;; esac AC_MSG_CHECKING(for type equivalent to int64_t) AC_MSG_RESULT(${acx_cv_type_int64_t-'using preprocessor symbols'}) fi # Now we can use the above types if test "$ac_cv_type_uintptr_t" != yes; then AC_MSG_CHECKING(for type equivalent to intptr_t) case $ac_cv_sizeof_void_p in 2) acx_cv_type_intptr_t=int16_t ;; 4) acx_cv_type_intptr_t=int32_t ;; 8) acx_cv_type_intptr_t=int64_t ;; *) AC_MSG_ERROR([no equivalent for intptr_t, please report a bug]) esac AC_MSG_RESULT($acx_cv_type_intptr_t) fi # ----------------- done all checks, emit header ------------- AC_CONFIG_COMMANDS(_GCC_STDINT_H, [ if test "$GCC" = yes; then echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h else echo "/* generated for $CC */" > tmp-stdint.h fi sed 's/^ *//' >> tmp-stdint.h < EOF if test "$acx_cv_header_stdint" != stdint.h; then echo "#include " >> tmp-stdint.h fi if test "$acx_cv_header_stdint" != stddef.h; then echo "#include <$acx_cv_header_stdint>" >> tmp-stdint.h fi sed 's/^ *//' >> tmp-stdint.h <> tmp-stdint.h <> tmp-stdint.h <> tmp-stdint.h <> tmp-stdint.h <> tmp-stdint.h <> tmp-stdint.h <> tmp-stdint.h <= 199901L #ifndef _INT64_T #define _INT64_T #ifndef __int64_t_defined #ifndef int64_t typedef long long int64_t; #endif #endif #endif #ifndef _UINT64_T #define _UINT64_T #ifndef uint64_t typedef unsigned long long uint64_t; #endif #endif #elif defined __GNUC__ && defined (__STDC__) && __STDC__-0 /* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and does not implement __extension__. But that compiler doesn't define __GNUC_MINOR__. */ # if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__) # define __extension__ # endif # ifndef _INT64_T # define _INT64_T # ifndef int64_t __extension__ typedef long long int64_t; # endif # endif # ifndef _UINT64_T # define _UINT64_T # ifndef uint64_t __extension__ typedef unsigned long long uint64_t; # endif # endif #elif !defined __STRICT_ANSI__ # if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__ # ifndef _INT64_T # define _INT64_T # ifndef int64_t typedef __int64 int64_t; # endif # endif # ifndef _UINT64_T # define _UINT64_T # ifndef uint64_t typedef unsigned __int64 uint64_t; # endif # endif # endif /* compiler */ #endif /* ANSI version */ EOF fi # ------------- done int64_t types, emit intptr types ------------ if test "$ac_cv_type_uintptr_t" != yes; then sed 's/^ *//' >> tmp-stdint.h <> tmp-stdint.h < 1. dnl Fix when strange machines are reported. sed 's/^ *//' >> tmp-stdint.h <> tmp-stdint.h <> tmp-stdint.h </dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac]) rm -rf conftest.one conftest.two conftest.dir ])dnl if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi dnl Do special magic for INSTALL instead of AC_SUBST, to get dnl relative names right. AC_MSG_RESULT([$INSTALL]) # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' AC_SUBST(INSTALL_PROGRAM)dnl test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' AC_SUBST(INSTALL_SCRIPT)dnl test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' AC_SUBST(INSTALL_DATA)dnl ])# AC_PROG_INSTALL ]) gdb-doc-7.6.2/config/lthostflags.m40000644000175000017500000000210412250770606016126 0ustar zumbizumbidnl Copyright (C) 2010 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl usage: ACX_LT_HOST_FLAGS([default_flags]) dnl Defines and AC_SUBSTs lt_host_flags AC_DEFUN([ACX_LT_HOST_FLAGS], [ AC_REQUIRE([AC_CANONICAL_SYSTEM]) case $host in *-cygwin* | *-mingw*) # 'host' will be top-level target in the case of a target lib, # we must compare to with_cross_host to decide if this is a native # or cross-compiler and select where to install dlls appropriately. if test -n "$with_cross_host" && test x"$with_cross_host" != x"no"; then lt_host_flags='-no-undefined -bindir "$(toolexeclibdir)"'; else lt_host_flags='-no-undefined -bindir "$(bindir)"'; fi ;; *) lt_host_flags=[$1] ;; esac AC_SUBST(lt_host_flags) ]) gdb-doc-7.6.2/config/bootstrap-lto.mk0000644000175000017500000000026412250773211016474 0ustar zumbizumbi# This option enables LTO for stage2 and stage3. STAGE2_CFLAGS += -flto=jobserver -frandom-seed=1 STAGE3_CFLAGS += -flto=jobserver -frandom-seed=1 STAGEprofile_CFLAGS += -fno-lto gdb-doc-7.6.2/config/largefile.m40000644000175000017500000000232112250770606015527 0ustar zumbizumbi# This macro wraps AC_SYS_LARGEFILE with one exception for Solaris. # PR 9992/binutils: We have to replicate everywhere the behaviour of # bfd's configure script so that all the directories agree on the size # of structures used to describe files. AC_DEFUN([ACX_LARGEFILE],[dnl # The tests for host and target for $enable_largefile require # canonical names. AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_CANONICAL_TARGET]) # As the $enable_largefile decision depends on --enable-plugins we must set it # even in directories otherwise not depending on the $plugins option. AC_PLUGINS case "${host}" in changequote(,)dnl sparc-*-solaris*|i[3-7]86-*-solaris*) changequote([,])dnl # On native 32bit sparc and ia32 solaris, large-file and procfs support # are mutually exclusive; and without procfs support, the bfd/ elf module # cannot provide certain routines such as elfcore_write_prpsinfo # or elfcore_write_prstatus. So unless the user explicitly requested # large-file support through the --enable-largefile switch, disable # large-file support in favor of procfs support. test "${target}" = "${host}" -a "x$plugins" = xno \ && : ${enable_largefile="no"} ;; esac AC_SYS_LARGEFILE ]) gdb-doc-7.6.2/config/bootstrap-debug-lib.mk0000644000175000017500000000076312250770606017541 0ustar zumbizumbi# This BUILD_CONFIG option tests that target libraries built during # stage3 would have generated the same executable code if they were # compiled with -g0. # It uses -g0 rather than -gtoggle because -g is default on target # library builds, and toggling it where it's supposed to be disabled # breaks e.g. crtstuff on ppc. STAGE1_TFLAGS += -g0 -fcompare-debug= STAGE2_TFLAGS += -fcompare-debug= STAGE3_TFLAGS += -fcompare-debug=-g0 do-compare = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2 gdb-doc-7.6.2/config/zlib.m40000644000175000017500000000114712250770606014542 0ustar zumbizumbidnl A function to check for zlib availability. zlib is used by default dnl unless the user configured with --disable-nls. AC_DEFUN([AM_ZLIB], [ # See if the user specified whether he wants zlib support or not. AC_ARG_WITH(zlib, [ --with-zlib include zlib support (auto/yes/no) [default=auto]], [], [with_zlib=auto]) if test "$with_zlib" != "no"; then AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)]) if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then AC_MSG_ERROR([zlib (libz) library was explicitly requested but not found]) fi fi ]) gdb-doc-7.6.2/config/libstdc++-raw-cxx.m40000644000175000017500000000235712250770606016747 0ustar zumbizumbi# This file is part of GCC. # # GCC 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 3, or (at your option) any later # version. # # GCC 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 GCC; see the file COPYING3. If not see # . # Define flags, LIBSTDCXX_RAW_CXX_CXXFLAGS and # LIBSTDCXX_RAW_CXX_LDFLAGS, # for libstdc++-v3 header files to compile and link libraries in C++ with # raw_cxx=true. AC_DEFUN([GCC_LIBSTDCXX_RAW_CXX_FLAGS], [ AC_REQUIRE([ACX_NONCANONICAL_TARGET]) LIBSTDCXX_RAW_CXX_CXXFLAGS="\ -I\$(top_builddir)/../libstdc++-v3/include \ -I\$(top_builddir)/../libstdc++-v3/include/\$(target_noncanonical) \ -I\$(top_srcdir)/../libstdc++-v3/libsupc++" LIBSTDCXX_RAW_CXX_LDFLAGS="\ \$(top_builddir)/../libstdc++-v3/src/libstdc++.la" AC_SUBST(LIBSTDCXX_RAW_CXX_CXXFLAGS) AC_SUBST(LIBSTDCXX_RAW_CXX_LDFLAGS) ]) gdb-doc-7.6.2/config/multi.m40000644000175000017500000000406712250770606014740 0ustar zumbizumbi## -*- Autoconf -*- # Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR]) # --------------------------------------------------- # Add --enable-multilib to configure. AC_DEFUN([AM_ENABLE_MULTILIB], [# Default to --enable-multilib AC_ARG_ENABLE(multilib, [ --enable-multilib build many library versions (default)], [case "$enableval" in yes) multilib=yes ;; no) multilib=no ;; *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;; esac], [multilib=yes]) # We may get other options which we leave undocumented: # --with-target-subdir, --with-multisrctop, --with-multisubdir # See config-ml.in if you want the gory details. if test "$srcdir" = "."; then if test "$with_target_subdir" != "."; then multi_basedir="$srcdir/$with_multisrctop../$2" else multi_basedir="$srcdir/$with_multisrctop$2" fi else multi_basedir="$srcdir/$2" fi AC_SUBST(multi_basedir) # Even if the default multilib is not a cross compilation, # it may be that some of the other multilibs are. if test $cross_compiling = no && test $multilib = yes \ && test "x${with_multisubdir}" != x ; then cross_compiling=maybe fi AC_OUTPUT_COMMANDS([ # Only add multilib support code if we just rebuilt the top-level # Makefile. case " $CONFIG_FILES " in *" ]m4_default([$1],Makefile)[ "*) ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in ;; esac], [ srcdir="$srcdir" host="$host" target="$target" with_multisubdir="$with_multisubdir" with_multisrctop="$with_multisrctop" with_target_subdir="$with_target_subdir" ac_configure_args="${multilib_arg} ${ac_configure_args}" multi_basedir="$multi_basedir" CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} CC="$CC" CXX="$CXX" GFORTRAN="$GFORTRAN" GCJ="$GCJ"])])dnl gdb-doc-7.6.2/config/inttypes-pri.m40000644000175000017500000000222712250770606016251 0ustar zumbizumbi# inttypes-pri.m4 serial 1 (gettext-0.11.4) dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. # Define PRI_MACROS_BROKEN if exists and defines the PRI* # macros to non-string values. This is the case on AIX 4.3.3. AC_DEFUN([gt_INTTYPES_PRI], [ AC_REQUIRE([gt_HEADER_INTTYPES_H]) if test $gt_cv_header_inttypes_h = yes; then AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], gt_cv_inttypes_pri_broken, [ AC_TRY_COMPILE([#include #ifdef PRId32 char *p = PRId32; #endif ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) ]) fi if test "$gt_cv_inttypes_pri_broken" = yes; then AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, [Define if exists and defines unusable PRI* macros.]) fi ]) gdb-doc-7.6.2/config/warnings.m40000644000175000017500000001075412250770606015436 0ustar zumbizumbi# Autoconf include file defining macros related to compile-time warnings. # Copyright 2004, 2005, 2007, 2009, 2011 Free Software Foundation, Inc. #This file is part of GCC. #GCC 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 3, or (at your option) any later #version. #GCC 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 GCC; see the file COPYING3. If not see #. # ACX_PROG_CC_WARNING_OPTS(WARNINGS, [VARIABLE = WARN_CFLAGS) # Sets @VARIABLE@ to the subset of the given options which the # compiler accepts. AC_DEFUN([ACX_PROG_CC_WARNING_OPTS], [AC_REQUIRE([AC_PROG_CC])dnl m4_pushdef([acx_Var], [m4_default([$2], [WARN_CFLAGS])])dnl AC_SUBST(acx_Var)dnl m4_expand_once([acx_Var= ],m4_quote(acx_Var=))dnl save_CFLAGS="$CFLAGS" for real_option in $1; do # Do the check with the no- prefix removed since gcc silently # accepts any -Wno-* option on purpose case $real_option in -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;; *) option=$real_option ;; esac AS_VAR_PUSHDEF([acx_Woption], [acx_cv_prog_cc_warning_$option]) AC_CACHE_CHECK([whether $CC supports $option], acx_Woption, [CFLAGS="$option" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [AS_VAR_SET(acx_Woption, yes)], [AS_VAR_SET(acx_Woption, no)]) ]) AS_IF([test AS_VAR_GET(acx_Woption) = yes], [acx_Var="$acx_Var${acx_Var:+ }$real_option"]) AS_VAR_POPDEF([acx_Woption])dnl done CFLAGS="$save_CFLAGS" m4_popdef([acx_Var])dnl ])# ACX_PROG_CC_WARNING_OPTS # ACX_PROG_CC_WARNING_ALMOST_PEDANTIC(WARNINGS, [VARIABLE = WARN_PEDANTIC]) # Append to VARIABLE "-pedantic" + the argument, if the compiler is GCC # and accepts all of those options simultaneously, otherwise to nothing. AC_DEFUN([ACX_PROG_CC_WARNING_ALMOST_PEDANTIC], [AC_REQUIRE([AC_PROG_CC])dnl m4_pushdef([acx_Var], [m4_default([$2], [WARN_PEDANTIC])])dnl AC_SUBST(acx_Var)dnl m4_expand_once([acx_Var= ],m4_quote(acx_Var=))dnl # Do the check with the no- prefix removed from the warning options # since gcc silently accepts any -Wno-* option on purpose m4_pushdef([acx_Woptions], [m4_bpatsubst([$1], [-Wno-], [-W])])dnl AS_VAR_PUSHDEF([acx_Pedantic], [acx_cv_prog_cc_pedantic_]acx_Woptions)dnl AS_IF([test "$GCC" = yes], [AC_CACHE_CHECK([whether $CC supports -pedantic ]acx_Woptions, acx_Pedantic, [save_CFLAGS="$CFLAGS" CFLAGS="-pedantic acx_Woptions" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [AS_VAR_SET(acx_Pedantic, yes)], [AS_VAR_SET(acx_Pedantic, no)]) CFLAGS="$save_CFLAGS"]) AS_IF([test AS_VAR_GET(acx_Pedantic) = yes], [acx_Var="$acx_Var${acx_Var:+ }-pedantic $1"]) ]) AS_VAR_POPDEF([acx_Pedantic])dnl m4_popdef([acx_Woptions])dnl m4_popdef([acx_Var])dnl ])# ACX_PROG_CC_WARNING_ALMOST_PEDANTIC # ACX_PROG_CC_WARNINGS_ARE_ERRORS([x.y.z], [VARIABLE = WERROR]) # sets @VARIABLE@ to "-Werror" if the compiler is GCC >=x.y.z, or if # --enable-werror-always was given on the command line, otherwise # to nothing. # If the argument is the word "manual" instead of a version number, # then @VARIABLE@ will be set to -Werror only if --enable-werror-always # appeared on the configure command line. AC_DEFUN([ACX_PROG_CC_WARNINGS_ARE_ERRORS], [AC_REQUIRE([AC_PROG_CC])dnl m4_pushdef([acx_Var], [m4_default([$2], [WERROR])])dnl AC_SUBST(acx_Var)dnl m4_expand_once([acx_Var= ],m4_quote(acx_Var=))dnl AC_ARG_ENABLE(werror-always, AS_HELP_STRING([--enable-werror-always], [enable -Werror despite compiler version]), [], [enable_werror_always=no]) AS_IF([test $enable_werror_always = yes], [acx_Var="$acx_Var${acx_Var:+ }-Werror"]) m4_if($1, [manual],, [AS_VAR_PUSHDEF([acx_GCCvers], [acx_cv_prog_cc_gcc_$1_or_newer])dnl AC_CACHE_CHECK([whether $CC is GCC >=$1], acx_GCCvers, [set fnord `echo $1 | tr '.' ' '` shift AC_PREPROC_IFELSE( [#if __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ \ < [$]1 * 10000 + [$]2 * 100 + [$]3 #error insufficient #endif], [AS_VAR_SET(acx_GCCvers, yes)], [AS_VAR_SET(acx_GCCvers, no)])]) AS_IF([test AS_VAR_GET(acx_GCCvers) = yes], [acx_Var="$acx_Var${acx_Var:+ }-Werror"]) AS_VAR_POPDEF([acx_GCCvers])]) m4_popdef([acx_Var])dnl ])# ACX_PROG_CC_WARNINGS_ARE_ERRORS gdb-doc-7.6.2/config/mmap.m40000644000175000017500000000662012250770606014535 0ustar zumbizumbidnl ---------------------------------------------------------------------- dnl This whole bit snagged from gcc dnl dnl mmap(2) blacklisting. Some platforms provide the mmap library routine dnl but don't support all of the features we need from it. dnl AC_DEFUN([GCC_AC_FUNC_MMAP_BLACKLIST], [ AC_CHECK_HEADER([sys/mman.h], [gcc_header_sys_mman_h=yes], [gcc_header_sys_mman_h=no]) AC_CHECK_FUNC([mmap], [gcc_func_mmap=yes], [gcc_func_mmap=no]) if test "$gcc_header_sys_mman_h" != yes \ || test "$gcc_func_mmap" != yes; then gcc_cv_func_mmap_file=no gcc_cv_func_mmap_dev_zero=no gcc_cv_func_mmap_anon=no else AC_CACHE_CHECK([whether read-only mmap of a plain file works], gcc_cv_func_mmap_file, [# Add a system to this blacklist if # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a # memory area containing the same data that you'd get if you applied # read() to the same fd. The only system known to have a problem here # is VMS, where text files have record structure. case "$host_os" in *vms* | ultrix*) gcc_cv_func_mmap_file=no ;; *) gcc_cv_func_mmap_file=yes;; esac]) AC_CACHE_CHECK([whether mmap from /dev/zero works], gcc_cv_func_mmap_dev_zero, [# Add a system to this blacklist if it has mmap() but /dev/zero # does not exist, or if mmapping /dev/zero does not give anonymous # zeroed pages with both the following properties: # 1. If you map N consecutive pages in with one call, and then # unmap any subset of those pages, the pages that were not # explicitly unmapped remain accessible. # 2. If you map two adjacent blocks of memory and then unmap them # both at once, they must both go away. # Systems known to be in this category are Windows (all variants), # VMS, and Darwin. case "$host_os" in *vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00) gcc_cv_func_mmap_dev_zero=no ;; *) gcc_cv_func_mmap_dev_zero=yes;; esac]) # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for. AC_CACHE_CHECK([for MAP_ANON(YMOUS)], gcc_cv_decl_map_anon, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [#include #include #include #ifndef MAP_ANONYMOUS #define MAP_ANONYMOUS MAP_ANON #endif ], [int n = MAP_ANONYMOUS;])], gcc_cv_decl_map_anon=yes, gcc_cv_decl_map_anon=no)]) if test $gcc_cv_decl_map_anon = no; then gcc_cv_func_mmap_anon=no else AC_CACHE_CHECK([whether mmap with MAP_ANON(YMOUS) works], gcc_cv_func_mmap_anon, [# Add a system to this blacklist if it has mmap() and MAP_ANON or # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) # doesn't give anonymous zeroed pages with the same properties listed # above for use of /dev/zero. # Systems known to be in this category are Windows, VMS, and SCO Unix. case "$host_os" in *vms* | cygwin* | pe | mingw* | sco* | udk* ) gcc_cv_func_mmap_anon=no ;; *) gcc_cv_func_mmap_anon=yes;; esac]) fi fi if test $gcc_cv_func_mmap_file = yes; then AC_DEFINE(HAVE_MMAP_FILE, 1, [Define if read-only mmap of a plain file works.]) fi if test $gcc_cv_func_mmap_dev_zero = yes; then AC_DEFINE(HAVE_MMAP_DEV_ZERO, 1, [Define if mmap of /dev/zero works.]) fi if test $gcc_cv_func_mmap_anon = yes; then AC_DEFINE(HAVE_MMAP_ANON, 1, [Define if mmap with MAP_ANON(YMOUS) works.]) fi ]) gdb-doc-7.6.2/config/dfp.m40000644000175000017500000000271612250773211014351 0ustar zumbizumbidnl @synopsis GCC_AC_ENABLE_DECIMAL_FLOAT([target triplet]) dnl dnl Enable C extension for decimal float if target supports it. dnl dnl @author Andreas Krebbel AC_DEFUN([GCC_AC_ENABLE_DECIMAL_FLOAT], [ AC_ARG_ENABLE(decimal-float, [ --enable-decimal-float={no,yes,bid,dpd} enable decimal float extension to C. Selecting 'bid' or 'dpd' choses which decimal floating point format to use], [ case $enable_decimal_float in yes | no | bid | dpd) default_decimal_float=$enable_decimal_float ;; *) AC_MSG_ERROR(['$enable_decimal_float' is an invalid value for --enable-decimal-float. Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;; esac ], [ case $1 in powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \ i?86*-*-gnu* | \ i?86*-*-mingw* | x86_64*-*-mingw* | \ i?86*-*-cygwin*) enable_decimal_float=yes ;; *) AC_MSG_WARN([decimal float is not supported for this target, ignored]) enable_decimal_float=no ;; esac ]) # x86's use BID format instead of DPD case x$enable_decimal_float in xyes) case $1 in i?86*-*-* | x86_64*-*-*) enable_decimal_float=bid ;; *) enable_decimal_float=dpd ;; esac default_decimal_float=$enable_decimal_float ;; xno) # ENABLE_DECIMAL_FLOAT is set to 0. But we have to have proper # dependency on libdecnumber. default_decimal_float=dpd ;; esac AC_SUBST(enable_decimal_float) ]) gdb-doc-7.6.2/config/tls.m40000644000175000017500000001154612250770606014410 0ustar zumbizumbidnl Check whether the target supports TLS. AC_DEFUN([GCC_CHECK_TLS], [ AC_REQUIRE([AC_CANONICAL_HOST]) GCC_ENABLE(tls, yes, [], [Use thread-local storage]) AC_CACHE_CHECK([whether the target supports thread-local storage], gcc_cv_have_tls, [ AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }], [dnl If the test case passed with dynamic linking, try again with dnl static linking, but only if static linking is supported (not dnl on Solaris 10). This fails with some older Red Hat releases. chktls_save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" AC_LINK_IFELSE([int main() { return 0; }], [AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }], [gcc_cv_have_tls=yes], [gcc_cv_have_tls=no],[])], [gcc_cv_have_tls=yes]) LDFLAGS="$chktls_save_LDFLAGS" if test $gcc_cv_have_tls = yes; then dnl So far, the binutils and the compiler support TLS. dnl Also check whether the libc supports TLS, i.e. whether a variable dnl with __thread linkage has a different address in different threads. dnl First, find the thread_CFLAGS necessary for linking a program that dnl calls pthread_create. chktls_save_CFLAGS="$CFLAGS" thread_CFLAGS=failed for flag in '' '-pthread' '-lpthread'; do CFLAGS="$flag $chktls_save_CFLAGS" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [#include void *g(void *d) { return NULL; }], [pthread_t t; pthread_create(&t,NULL,g,NULL);])], [thread_CFLAGS="$flag"]) if test "X$thread_CFLAGS" != Xfailed; then break fi done CFLAGS="$chktls_save_CFLAGS" if test "X$thread_CFLAGS" != Xfailed; then CFLAGS="$thread_CFLAGS $chktls_save_CFLAGS" dnl Test for an old glibc bug that violated the __thread property. dnl Use volatile to ensure the compiler won't optimize away pointer dnl accesses it might otherwise assume to be redundant, or reorder dnl them and reuse storage, which might lead to them pointing to dnl the same location. AC_RUN_IFELSE( [AC_LANG_PROGRAM( [#include __thread int a; static int *volatile a_in_other_thread; static void * thread_func (void *arg) { a_in_other_thread = &a; return (void *)0; }], [pthread_t thread; void *thread_retval; int *volatile a_in_main_thread; a_in_main_thread = &a; if (pthread_create (&thread, (pthread_attr_t *)0, thread_func, (void *)0)) return 0; if (pthread_join (thread, &thread_retval)) return 0; return (a_in_other_thread == a_in_main_thread);])], [gcc_cv_have_tls=yes], [gcc_cv_have_tls=no], []) CFLAGS="$chktls_save_CFLAGS" fi fi], [gcc_cv_have_tls=no], [dnl This is the cross-compiling case. Assume libc supports TLS if the dnl binutils and the compiler do. AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }], [chktls_save_LDFLAGS="$LDFLAGS" dnl Shared library options may depend on the host; this check dnl is only known to be needed for GNU/Linux. case $host in *-*-linux*) LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS" ;; esac chktls_save_CFLAGS="$CFLAGS" CFLAGS="-fPIC $CFLAGS" dnl If -shared works, test if TLS works in a shared library. AC_LINK_IFELSE([int f() { return 0; }], [AC_LINK_IFELSE([__thread int a; int b; int f() { return a = b; }], [gcc_cv_have_tls=yes], [gcc_cv_have_tls=no])], [gcc_cv_have_tls=yes]) CFLAGS="$chktls_save_CFLAGS" LDFLAGS="$chktls_save_LDFLAGS"], [gcc_cv_have_tls=no]) ] )]) if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then AC_DEFINE(HAVE_TLS, 1, [Define to 1 if the target supports thread-local storage.]) fi]) dnl Check whether the target assembler supports TLS. AC_DEFUN([GCC_CHECK_CC_TLS], [ GCC_ENABLE(tls, yes, [], [Use thread-local storage]) AC_CACHE_CHECK([whether the target assembler supports thread-local storage], gcc_cv_have_cc_tls, [ AC_COMPILE_IFELSE([__thread int a; int b; int main() { return a = b; }], [gcc_cv_have_cc_tls=yes], [gcc_cv_have_cc_tls=no])] )]) if test "$enable_tls $gcc_cv_have_cc_tls" = "yes yes"; then AC_DEFINE(HAVE_CC_TLS, 1, [Define to 1 if the target assembler supports thread-local storage.]) fi]) dnl Check whether TLS is emulated. AC_DEFUN([GCC_CHECK_EMUTLS], [ AC_CACHE_CHECK([whether the thread-local storage support is from emutls], gcc_cv_use_emutls, [ gcc_cv_use_emutls=no echo '__thread int a; int b; int main() { return a = b; }' > conftest.c if AC_TRY_COMMAND(${CC-cc} -Werror -S -o conftest.s conftest.c 1>&AS_MESSAGE_LOG_FD); then if grep __emutls_get_address conftest.s > /dev/null; then gcc_cv_use_emutls=yes fi fi rm -f conftest.* ]) if test "$gcc_cv_use_emutls" = "yes" ; then AC_DEFINE(USE_EMUTLS, 1, [Define to 1 if the target use emutls for thread-local storage.]) fi]) gdb-doc-7.6.2/config/codeset.m40000644000175000017500000000157612250770606015236 0ustar zumbizumbi# codeset.m4 serial AM1 (gettext-0.10.40) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, [AC_TRY_LINK([#include ], [char* cs = nl_langinfo(CODESET);], am_cv_langinfo_codeset=yes, am_cv_langinfo_codeset=no) ]) if test $am_cv_langinfo_codeset = yes; then AC_DEFINE(HAVE_LANGINFO_CODESET, 1, [Define if you have and nl_langinfo(CODESET).]) fi ]) gdb-doc-7.6.2/config/acinclude.m40000755000175000017500000005661512250773211015541 0ustar zumbizumbidnl This file is included into all any other acinclude file that needs dnl to use these macros. dnl This is copied from autoconf 2.12, but does calls our own AC_PROG_CC_WORKS, dnl and doesn't call AC_PROG_CXX_GNU, cause we test for that in AC_PROG_CC_WORKS. dnl We are probably using a cross compiler, which will not be able to fully dnl link an executable. This should really be fixed in autoconf itself. dnl Find a working G++ cross compiler. This only works for the GNU C++ compiler. AC_DEFUN([CYG_AC_PROG_CXX_CROSS], [AC_BEFORE([$0], [AC_PROG_CXXCPP]) AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++, gcc) CYG_AC_PROG_GXX_WORKS if test $ac_cv_prog_gxx = yes; then GXX=yes dnl Check whether -g works, even if CXXFLAGS is set, in case the package dnl plays around with CXXFLAGS (such as to build both debugging and dnl normal versions of a library), tasteless as that idea is. ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= AC_PROG_CXX_G if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS="$ac_save_CXXFLAGS" elif test $ac_cv_prog_cxx_g = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-O2" fi else GXX= test "${CXXFLAGS+set}" = set || CXXFLAGS="-g" fi ]) dnl See if the G++ compiler we found works. AC_DEFUN([CYG_AC_PROG_GXX_WORKS], [AC_MSG_CHECKING([whether the G++ compiler ($CXX $CXXFLAGS $LDFLAGS) actually works]) AC_LANG_SAVE AC_LANG_CPLUSPLUS dnl Try a test case. We only compile, because it's close to impossible dnl to get a correct fully linked executable with a cross compiler. For dnl most cross compilers, this test is bogus. For G++, we can use various dnl other compile line options to get a decent idea that the cross compiler dnl actually does work, even though we can't produce an executable without dnl more info about the target it's being compiled for. This only works dnl for the GNU C++ compiler. dnl Transform the name of the compiler to it's cross variant, unless dnl CXX is set. This is also what CXX gets set to in the generated dnl Makefile. if test x"${CXX}" = xc++ ; then CXX=`echo gcc | sed -e "${program_transform_name}"` fi dnl Get G++'s full path to libgcc.a libgccpath=`${CXX} --print-libgcc` dnl If we don't have a path with libgcc.a on the end, this isn't G++. if test `echo $libgccpath | sed -e 's:/.*/::'` = libgcc.a ; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no fi dnl If we are using G++, look for the files that need to exist if this dnl compiler works. if test x"${ac_cv_prog_gxx}" = xyes ; then gccfiles=`echo $libgccpath | sed -e 's:/libgcc.a::'` if test -f ${gccfiles}/specs -a -f ${gccfiles}/cpp -a -f ${gccfiles}/cc1plus; then gccfiles=yes else gccfiles=no fi gcclibs=`echo $libgccpath | sed -e 's:lib/gcc-lib/::' -e 's:/libgcc.a::' -e 's,\(.*\)/.*,\1,g'`/lib if test -d ${gcclibs}/ldscripts -a -f ${gcclibs}/libc.a -a -f ${gcclibs}/libstdc++.a ; then gcclibs=yes else gcclibs=no fi fi dnl If everything is OK, then we can safely assume the compiler works. if test x"${gccfiles}" = xno -o x"${gcclibs}" = xno; then ac_cv_prog_cxx_works=no AC_MSG_ERROR(${CXX} is a non-working cross compiler) else ac_cv_prog_cxx_works=yes fi AC_LANG_RESTORE AC_MSG_RESULT($ac_cv_prog_cxx_works) if test x"$ac_cv_prog_cxx_works" = xno; then AC_MSG_ERROR([installation or configuration problem: C++ compiler cannot create executables.]) fi AC_MSG_CHECKING([whether the G++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler]) AC_MSG_RESULT($ac_cv_prog_cxx_cross) cross_compiling=$ac_cv_prog_cxx_cross AC_SUBST(CXX) ]) dnl ==================================================================== dnl Find a working GCC cross compiler. This only works for the GNU gcc compiler. dnl This is based on the macros above for G++. AC_DEFUN([CYG_AC_PROG_CC_CROSS], [AC_BEFORE([$0], [AC_PROG_CCPP]) AC_CHECK_PROGS(CC, cc, gcc) CYG_AC_PROG_GCC_WORKS if test $ac_cv_prog_gcc = yes; then GCC=yes dnl Check whether -g works, even if CFLAGS is set, in case the package dnl plays around with CFLAGS (such as to build both debugging and dnl normal versions of a library), tasteless as that idea is. ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= AC_PROG_CC_G if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then CFLAGS="-g -O2" else CFLAGS="-O2" fi else GXX= test "${CFLAGS+set}" = set || CFLAGS="-g" fi ]) dnl See if the GCC compiler we found works. AC_DEFUN([CYG_AC_PROG_GCC_WORKS], [AC_MSG_CHECKING([whether the Gcc compiler ($CC $CFLAGS $LDFLAGS) actually works]) AC_LANG_SAVE AC_LANG_C dnl Try a test case. We only compile, because it's close to impossible dnl to get a correct fully linked executable with a cross dnl compiler. For most cross compilers, this test is bogus. For G++, dnl we can use various other compile line options to get a decent idea dnl that the cross compiler actually does work, even though we can't dnl produce an executable without more info about the target it's dnl being compiled for. This only works for the GNU C++ compiler. dnl Transform the name of the compiler to it's cross variant, unless dnl CXX is set. This is also what CC gets set to in the generated Makefile. if test x"${CC}" = xcc ; then CC=`echo gcc | sed -e "${program_transform_name}"` fi dnl Get Gcc's full path to libgcc.a libgccpath=`${CC} --print-libgcc` dnl If we don't have a path with libgcc.a on the end, this isn't G++. if test `echo $libgccpath | sed -e 's:/.*/::'` = libgcc.a ; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi dnl If we are using Gcc, look for the files that need to exist if this dnl compiler works. if test x"${ac_cv_prog_gcc}" = xyes ; then gccfiles=`echo $libgccpath | sed -e 's:/libgcc.a::'` if test -f ${gccfiles}/specs -a -f ${gccfiles}/cpp -a -f ${gccfiles}/cc1plus; then gccfiles=yes else gccfiles=no fi gcclibs=`echo $libgccpath | sed -e 's:lib/gcc-lib/::' -e 's:/libgcc.a::' -e 's,\(.*\)/.*,\1,g'`/lib if test -d ${gcclibs}/ldscripts -a -f ${gcclibs}/libc.a -a -f ${gcclibs}/libstdc++.a ; then gcclibs=yes else gcclibs=no fi fi dnl If everything is OK, then we can safely assume the compiler works. if test x"${gccfiles}" = xno -o x"${gcclibs}" = xno; then ac_cv_prog_cc_works=no AC_MSG_ERROR(${CC} is a non-working cross compiler) else ac_cv_prog_cc_works=yes fi AC_LANG_RESTORE AC_MSG_RESULT($ac_cv_prog_cc_works) if test x"$ac_cv_prog_cc_works" = xno; then AC_MSG_ERROR([installation or configuration problem: C++ compiler cannot create executables.]) fi AC_MSG_CHECKING([whether the Gcc compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler]) AC_MSG_RESULT($ac_cv_prog_cc_cross) cross_compiling=$ac_cv_prog_cc_cross AC_SUBST(CC) ]) dnl ==================================================================== dnl Find the BFD library in the build tree. This is used to access and dnl manipulate object or executable files. AC_DEFUN([CYG_AC_PATH_BFD], [ AC_MSG_CHECKING(for the bfd header in the build tree) dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." dnl Look for the header file AC_CACHE_VAL(ac_cv_c_bfdh,[ for i in $dirlist; do if test -f "$i/bfd/bfd.h" ; then ac_cv_c_bfdh=`(cd $i/bfd; ${PWDCMD-pwd})` break fi done ]) if test x"${ac_cv_c_bfdh}" != x; then BFDHDIR="-I${ac_cv_c_bfdh}" AC_MSG_RESULT(${ac_cv_c_bfdh}) else AC_MSG_RESULT(none) fi AC_SUBST(BFDHDIR) dnl Look for the library AC_MSG_CHECKING(for the bfd library in the build tree) AC_CACHE_VAL(ac_cv_c_bfdlib,[ for i in $dirlist; do if test -f "$i/bfd/Makefile" ; then ac_cv_c_bfdlib=`(cd $i/bfd; ${PWDCMD-pwd})` fi done ]) dnl We list two directories cause bfd now uses libtool if test x"${ac_cv_c_bfdlib}" != x; then BFDLIB="-L${ac_cv_c_bfdlib} -L${ac_cv_c_bfdlib}/.libs" AC_MSG_RESULT(${ac_cv_c_bfdlib}) else AC_MSG_RESULT(none) fi AC_SUBST(BFDLIB) ]) dnl ==================================================================== dnl Find the libiberty library. This defines many commonly used C dnl functions that exists in various states based on the underlying OS. AC_DEFUN([CYG_AC_PATH_LIBERTY], [ AC_MSG_CHECKING(for the liberty library in the build tree) dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." AC_CACHE_VAL(ac_cv_c_liberty,[ for i in $dirlist; do if test -f "$i/libiberty/Makefile" ; then ac_cv_c_liberty=`(cd $i/libiberty; ${PWDCMD-pwd})` fi done ]) if test x"${ac_cv_c_liberty}" != x; then LIBERTY="-L${ac_cv_c_liberty}" AC_MSG_RESULT(${ac_cv_c_liberty}) else AC_MSG_RESULT(none) fi AC_SUBST(LIBERTY) ]) dnl ==================================================================== dnl Find the opcodes library. This is used to do dissasemblies. AC_DEFUN([CYG_AC_PATH_OPCODES], [ AC_MSG_CHECKING(for the opcodes library in the build tree) dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." AC_CACHE_VAL(ac_cv_c_opc,[ for i in $dirlist; do if test -f "$i/opcodes/Makefile" ; then ac_cv_c_opc=`(cd $i/opcodes; ${PWDCMD-pwd})` fi done ]) if test x"${ac_cv_c_opc}" != x; then OPCODESLIB="-L${ac_cv_c_opc}" AC_MSG_RESULT(${ac_cv_c_opc}) else AC_MSG_RESULT(none) fi AC_SUBST(OPCODESLIB) ]) dnl ==================================================================== dnl Look for the DejaGnu header file in the source tree. This file dnl defines the functions used to testing support. AC_DEFUN([CYG_AC_PATH_DEJAGNU], [ AC_MSG_CHECKING(for the testing support files in the source tree) dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." AC_CACHE_VAL(ac_cv_c_dejagnu,[ for i in $dirlist; do if test -f "$srcdir/$i/ecc/ecc/infra/testlib/current/include/dejagnu.h" ; then ac_cv_c_dejagnu=`(cd $srcdir/$i/ecc/ecc/infra/testlib/current/include; ${PWDCMD-pwd})` fi done ]) if test x"${ac_cv_c_dejagnu}" != x; then DEJAGNUHDIR="-I${ac_cv_c_dejagnu}" AC_MSG_RESULT(${ac_cv_c_dejagnu}) else AC_MSG_RESULT(none) fi AC_CACHE_VAL(ac_cv_c_dejagnulib,[ for i in $dirlist; do if test -f "$srcdir/$i/infra/testlib/current/lib/hostutil.exp" ; then ac_cv_c_dejagnulib=`(cd $srcdir/$i/infra/testlib/current/lib; ${PWDCMD-pwd})` fi done ]) if test x"${ac_cv_c_dejagnulib}" != x; then DEJAGNULIB="${ac_cv_c_dejagnulib}" else DEJAGNULIB="" fi AC_MSG_CHECKING(for runtest in the source tree) AC_CACHE_VAL(ac_cv_c_runtest,[ for i in $dirlist; do if test -f "$srcdir/$i/dejagnu/runtest" ; then ac_cv_c_runtest=`(cd $srcdir/$i/dejagnu; ${PWDCMD-pwd})` fi done ]) if test x"${ac_cv_c_runtest}" != x; then RUNTESTDIR="${ac_cv_c_runtest}" AC_MSG_RESULT(${ac_cv_c_runtest}) else RUNTESTDIR="" AC_MSG_RESULT(none) fi AC_SUBST(RUNTESTDIR) AC_SUBST(DEJAGNULIB) AC_SUBST(DEJAGNUHDIR) ]) dnl ==================================================================== dnl Find the libintl library in the build tree. This is for dnl internationalization support. AC_DEFUN([CYG_AC_PATH_INTL], [ AC_MSG_CHECKING(for the intl header in the build tree) dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." dnl Look for the header file AC_CACHE_VAL(ac_cv_c_intlh,[ for i in $dirlist; do if test -f "$i/intl/libintl.h" ; then ac_cv_c_intlh=`(cd $i/intl; ${PWDCMD-pwd})` break fi done ]) if test x"${ac_cv_c_intlh}" != x; then INTLHDIR="-I${ac_cv_c_intlh}" AC_MSG_RESULT(${ac_cv_c_intlh}) else AC_MSG_RESULT(none) fi AC_SUBST(INTLHDIR) dnl Look for the library AC_MSG_CHECKING(for the libintl library in the build tree) AC_CACHE_VAL(ac_cv_c_intllib,[ for i in $dirlist; do if test -f "$i/intl/Makefile" ; then ac_cv_c_intllib=`(cd $i/intl; ${PWDCMD-pwd})` fi done ]) if test x"${ac_cv_c_intllib}" != x; then INTLLIB="-L${ac_cv_c_intllib} -lintl" AC_MSG_RESULT(${ac_cv_c_intllib}) else AC_MSG_RESULT(none) fi AC_SUBST(INTLLIB) ]) dnl ==================================================================== dnl Find the simulator library. AC_DEFUN([CYG_AC_PATH_SIM], [ dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.. ../../../../../../../../../.." case "$target_cpu" in powerpc) target_dir=ppc ;; sparc*) target_dir=erc32 ;; mips*) target_dir=mips ;; *) target_dir=$target_cpu ;; esac dnl First look for the header file AC_MSG_CHECKING(for the simulator header file) AC_CACHE_VAL(ac_cv_c_simh,[ for i in $dirlist; do if test -f "${srcdir}/$i/include/remote-sim.h" ; then ac_cv_c_simh=`(cd ${srcdir}/$i/include; ${PWDCMD-pwd})` break fi done ]) if test x"${ac_cv_c_simh}" != x; then SIMHDIR="-I${ac_cv_c_simh}" AC_MSG_RESULT(${ac_cv_c_simh}) else AC_MSG_RESULT(none) fi AC_SUBST(SIMHDIR) dnl See whether it's a devo or Foundry branch simulator AC_MSG_CHECKING(Whether this is a devo simulator ) AC_CACHE_VAL(ac_cv_c_simdevo,[ CPPFLAGS="$CPPFLAGS $SIMHDIR" AC_EGREP_HEADER([SIM_DESC sim_open.*struct _bfd], remote-sim.h, ac_cv_c_simdevo=yes, ac_cv_c_simdevo=no) ]) if test x"$ac_cv_c_simdevo" = x"yes" ; then AC_DEFINE(HAVE_DEVO_SIM) fi AC_MSG_RESULT(${ac_cv_c_simdevo}) AC_SUBST(HAVE_DEVO_SIM) dnl Next look for the library AC_MSG_CHECKING(for the simulator library) AC_CACHE_VAL(ac_cv_c_simlib,[ for i in $dirlist; do if test -f "$i/sim/$target_dir/Makefile" ; then ac_cv_c_simlib=`(cd $i/sim/$target_dir; ${PWDCMD-pwd})` fi done ]) if test x"${ac_cv_c_simlib}" != x; then SIMLIB="-L${ac_cv_c_simlib}" else AC_MSG_RESULT(none) dnl FIXME: this is kinda bogus, cause umtimately the TM will build dnl all the libraries for several architectures. But for now, this dnl will work till then. dnl AC_MSG_CHECKING(for the simulator installed with the compiler libraries) dnl Transform the name of the compiler to it's cross variant, unless dnl CXX is set. This is also what CXX gets set to in the generated dnl Makefile. CROSS_GCC=`echo gcc | sed -e "s/^/$target/"` dnl Get G++'s full path to libgcc.a changequote(,) gccpath=`${CROSS_GCC} --print-libgcc | sed -e 's:[a-z0-9A-Z\.\-]*/libgcc.a::' -e 's:lib/gcc-lib/::'`lib changequote([,]) if test -f $gccpath/libsim.a -o -f $gccpath/libsim.so ; then ac_cv_c_simlib="$gccpath/" SIMLIB="-L${ac_cv_c_simlib}" AC_MSG_RESULT(${ac_cv_c_simlib}) else AM_CONDITIONAL(PSIM, test x$psim = xno) SIMLIB="" AC_MSG_RESULT(none) dnl ac_cv_c_simlib=none fi fi AC_SUBST(SIMLIB) ]) dnl ==================================================================== dnl Find the libiberty library. AC_DEFUN([CYG_AC_PATH_LIBIBERTY], [ AC_MSG_CHECKING(for the libiberty library in the build tree) dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." AC_CACHE_VAL(ac_cv_c_libib,[ for i in $dirlist; do if test -f "$i/libiberty/Makefile" ; then ac_cv_c_libib=`(cd $i/libiberty/; ${PWDCMD-pwd})` fi done ]) if test x"${ac_cv_c_libib}" != x; then LIBIBERTY="-L${ac_cv_c_libib}" AC_MSG_RESULT(${ac_cv_c_libib}) else AC_MSG_RESULT(none) fi AC_SUBST(LIBIBERTY) ]) dnl ==================================================================== AC_DEFUN([CYG_AC_PATH_DEVO], [ AC_MSG_CHECKING(for devo headers in the source tree) dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." AC_CACHE_VAL(ac_cv_c_devoh,[ for i in $dirlist; do if test -f "${srcdir}/$i/include/remote-sim.h" ; then ac_cv_c_devoh=`(cd ${srcdir}/$i/include; ${PWDCMD-pwd})` fi done ]) if test x"${ac_cv_c_devoh}" != x; then DEVOHDIR="-I${ac_cv_c_devoh}" AC_MSG_RESULT(${ac_cv_c_devoh}) else AC_MSG_RESULT(none) fi AC_SUBST(DEVOHDIR) ]) dnl ==================================================================== dnl Find all the ILU headers and libraries AC_DEFUN([CYG_AC_PATH_ILU], [ AC_MSG_CHECKING(for ILU kernel headers in the source tree) dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." AC_CACHE_VAL(ac_cv_c_iluh,[ for i in $dirlist; do if test -f "${srcdir}/$i/ilu/runtime/kernel/method.h" ; then ac_cv_c_iluh=`(cd ${srcdir}/$i/ilu/runtime/kernel; ${PWDCMD-pwd})` fi done ]) if test x"${ac_cv_c_iluh}" != x; then ILUHDIR="-I${ac_cv_c_iluh}" AC_MSG_RESULT(${ac_cv_c_iluh}) else AC_MSG_RESULT(none) fi AC_MSG_CHECKING(for ILU kernel headers in the build tree) dirlist=".. ../../ ../../../ ../../../../ ../../../../../ ../../../../../../ ../../../../../../.. ../../../../../../../.. ../../../../../../../../.. ../../../../../../../../../.." AC_CACHE_VAL(ac_cv_c_iluh5,[ for i in $dirlist; do if test -f "$i/ilu/runtime/kernel/iluconf.h" ; then ac_cv_c_iluh5=`(cd $i/ilu/runtime/kernel; ${PWDCMD-pwd})` fi done ]) if test x"${ac_cv_c_iluh5}" != x; then ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh5}" AC_MSG_RESULT(${ac_cv_c_iluh5}) else AC_MSG_RESULT(none) fi AC_MSG_CHECKING(for ILU C++ headers in the source tree) AC_CACHE_VAL(ac_cv_c_iluh2,[ for i in $dirlist; do if test -f "${srcdir}/$i/ilu/stubbers/cpp/resource.h" ; then ac_cv_c_iluh2=`(cd ${srcdir}/$i/ilu/stubbers/cpp; ${PWDCMD-pwd})` fi done ]) if test x"${ac_cv_c_iluh2}" != x; then ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh2}" AC_MSG_RESULT(${ac_cv_c_iluh2}) else AC_MSG_RESULT(none) fi AC_MSG_CHECKING(for ILU C headers) AC_CACHE_VAL(ac_cv_c_iluh3,[ for i in $dirlist; do if test -f "${srcdir}/$i/ilu/stubbers/c/resource.h" ; then ac_cv_c_iluh3=`(cd ${srcdir}/$i/ilu/stubbers/c ; ${PWDCMD-pwd})` fi done ]) if test x"${ac_cv_c_iluh3}" != x; then ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh3}" AC_MSG_RESULT(${ac_cv_c_iluh3}) else AC_MSG_RESULT(none) fi AC_MSG_CHECKING(for ILU C runtime headers) AC_CACHE_VAL(ac_cv_c_iluh4,[ for i in $dirlist; do if test -f "${srcdir}/$i/ilu/runtime/c/ilucstub.h" ; then ac_cv_c_iluh4=`(cd ${srcdir}/$i/ilu/runtime/c ; ${PWDCMD-pwd})` fi done ]) if test x"${ac_cv_c_iluh4}" != x; then ILUHDIR="${ILUHDIR} -I${ac_cv_c_iluh4}" AC_MSG_RESULT(${ac_cv_c_iluh4}) else AC_MSG_RESULT(none) fi AC_CACHE_VAL(ac_cv_c_ilupath,[ for i in $dirlist; do if test -f "$i/ilu/Makefile" ; then ac_cv_c_ilupath=`(cd $i/ilu; ${PWDCMD-pwd})` break fi done ]) ILUTOP=${ac_cv_c_ilupath} AC_MSG_CHECKING(for the ILU library in the build tree) AC_CACHE_VAL(ac_cv_c_ilulib,[ if test -f "$ac_cv_c_ilupath/runtime/kernel/Makefile" ; then ac_cv_c_ilulib=`(cd $ac_cv_c_ilupath/runtime/kernel; ${PWDCMD-pwd})` AC_MSG_RESULT(found ${ac_cv_c_ilulib}/libilu.a) else AC_MSG_RESULT(no) fi]) AC_MSG_CHECKING(for the ILU C++ bindings library in the build tree) AC_CACHE_VAL(ac_cv_c_ilulib2,[ if test -f "$ac_cv_c_ilupath/runtime/cpp/Makefile" ; then ac_cv_c_ilulib2=`(cd $ac_cv_c_ilupath/runtime/cpp; ${PWDCMD-pwd})` AC_MSG_RESULT(found ${ac_cv_c_ilulib2}/libilu-c++.a) else AC_MSG_RESULT(no) fi]) AC_MSG_CHECKING(for the ILU C bindings library in the build tree) AC_CACHE_VAL(ac_cv_c_ilulib3,[ if test -f "$ac_cv_c_ilupath/runtime/c/Makefile" ; then ac_cv_c_ilulib3=`(cd $ac_cv_c_ilupath/runtime/c; ${PWDCMD-pwd})` AC_MSG_RESULT(found ${ac_cv_c_ilulib3}/libilu-c.a) else AC_MSG_RESULT(no) fi]) AC_MSG_CHECKING(for the ILU Tk bindings library in the build tree) AC_CACHE_VAL(ac_cv_c_ilulib4,[ if test -f "$ac_cv_c_ilupath/runtime/mainloop/Makefile" ; then ac_cv_c_ilulib4=`(cd $ac_cv_c_ilupath/runtime/mainloop; ${PWDCMD-pwd})` AC_MSG_RESULT(found ${ac_cv_c_ilulib4}/libilu-tk.a) else AC_MSG_RESULT(no) fi]) if test x"${ac_cv_c_ilulib}" = x -a x"${ac_cv_c_ilulib2}" = x; then ILUHDIR="" fi if test x"${ac_cv_c_ilulib}" != x -a x"${ac_cv_c_ilulib2}" != x; then ILULIB="-L${ac_cv_c_ilulib} -L${ac_cv_c_ilulib2} -L${ac_cv_c_ilulib3} -L${ac_cv_c_ilulib4}" else ILULIB="" fi if test x"${ILULIB}" = x; then AC_MSG_CHECKING(for ILU libraries installed with the compiler) AC_CACHE_VAL(ac_cv_c_ilulib5,[ NATIVE_GCC=`echo gcc | sed -e "${program_transform_name}"` dnl Get G++'s full path to it's libraries ac_cv_c_ilulib5=`${NATIVE_GCC} --print-libgcc | sed -e 's:lib/gcc-lib/.*::'`lib if test -f $ac_cv_c_ilulib5/libilu-c.a -o -f $ac_cv_c_ilulib5/libilu-c.so ; then if test x"${ILUHDIR}" = x; then ILUHDIR="-I${ac_cv_c_ilulib5}/../include" fi ILULIB="-L${ac_cv_c_ilulib5}" AC_MSG_RESULT(${ac_cv_c_ilulib5}) else ac_cv_c_ilulib=none AC_MSG_RESULT(none) fi fi]) AC_SUBST(ILUHDIR) AC_SUBST(ILULIB) AC_SUBST(ILUTOP) ]) dnl ==================================================================== dnl This defines the byte order for the host. We can't use dnl AC_C_BIGENDIAN, cause we want to create a config file and dnl substitue the real value, so the header files work right AC_DEFUN([CYG_AC_C_ENDIAN], [ AC_MSG_CHECKING(to see if this is a little endian host) AC_CACHE_VAL(ac_cv_c_little_endian, [ ac_cv_c_little_endian=unknown # See if sys/param.h defines the BYTE_ORDER macro. AC_TRY_COMPILE([#include #include ], [ #if !BYTE_ORDER || !_BIG_ENDIAN || !_LITTLE_ENDIAN bogus endian macros #endif], [# It does; now see whether it defined to _LITTLE_ENDIAN or not. AC_TRY_COMPILE([#include #include ], [ #if BYTE_ORDER != _LITTLE_ENDIAN not big endian #endif], ac_cv_c_little_endian=yes, ac_cv_c_little_endian=no) ]) if test ${ac_cv_c_little_endian} = unknown; then old_cflags=$CFLAGS CFLAGS=-g AC_TRY_RUN([ main () { /* Are we little or big endian? From Harbison&Steele. */ union { long l; char c[sizeof (long)]; } u; u.l = 1; exit (u.c[0] == 1); }], ac_cv_c_little_endian=no, ac_cv_c_little_endian=yes,[ dnl Yes, this is ugly, and only used for a canadian cross anyway. This dnl is just to keep configure from stopping here. case "${host}" in changequote(,) i[3456789]86-*-*) ac_cv_c_little_endian=yes ;; sparc*-*-*) ac_cv_c_little_endian=no ;; changequote([,]) *) AC_MSG_WARN(Can't cross compile this test) ;; esac]) CFLAGS=$old_cflags fi]) if test x"${ac_cv_c_little_endian}" = xyes; then AC_DEFINE(LITTLE_ENDIAN_HOST) ENDIAN="CYG_LSBFIRST"; else ENDIAN="CYG_MSBFIRST"; fi AC_MSG_RESULT(${ac_cv_c_little_endian}) AC_SUBST(ENDIAN) ]) dnl ==================================================================== dnl Look for the path to libgcc, so we can use it to directly link dnl in libgcc.a with LD. AC_DEFUN([CYG_AC_PATH_LIBGCC], [AC_MSG_CHECKING([Looking for the path to libgcc.a]) AC_LANG_SAVE AC_LANG_C dnl Get Gcc's full path to libgcc.a libgccpath=`${CC} --print-libgcc` dnl If we don't have a path with libgcc.a on the end, this isn't G++. if test `echo $libgccpath | sed -e 's:/.*/::'` = libgcc.a ; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi dnl if test x"${ac_cv_prog_gcc}" = xyes ; then gccpath=`echo $libgccpath | sed -e 's:/libgcc.a::'` LIBGCC="-L${gccpath}" AC_MSG_RESULT(${gccpath}) else LIBGCC="" AC_MSG_ERROR(Not using gcc) fi AC_LANG_RESTORE AC_SUBST(LIBGCC) ]) gdb-doc-7.6.2/config/unwind_ipinfo.m40000644000175000017500000000235212250770606016451 0ustar zumbizumbidnl dnl Check whether _Unwind_GetIPInfo is available without doing a link dnl test so we can use this with libstdc++-v3 and libjava. Need to dnl use $target to set defaults because automatic checking is not possible dnl without a link test (and maybe even with a link test). dnl AC_DEFUN([GCC_CHECK_UNWIND_GETIPINFO], [ AC_ARG_WITH(system-libunwind, [ --with-system-libunwind use installed libunwind]) # If system-libunwind was not specifically set, pick a default setting. if test x$with_system_libunwind = x; then case ${target} in ia64-*-hpux*) with_system_libunwind=yes ;; *) with_system_libunwind=no ;; esac fi # Based on system-libunwind and target, do we have ipinfo? if test x$with_system_libunwind = xyes; then case ${target} in ia64-*-*) have_unwind_getipinfo=no ;; *) have_unwind_getipinfo=yes ;; esac else # Darwin before version 9 does not have _Unwind_GetIPInfo. changequote(,) case ${target} in *-*-darwin[3-8]|*-*-darwin[3-8].*) have_unwind_getipinfo=no ;; *) have_unwind_getipinfo=yes ;; esac changequote([,]) fi if test x$have_unwind_getipinfo = xyes; then AC_DEFINE(HAVE_GETIPINFO, 1, [Define if _Unwind_GetIPInfo is available.]) fi ]) gdb-doc-7.6.2/config/gettext.m40000644000175000017500000004052112250770606015265 0ustar zumbizumbi# gettext.m4 serial 20 (gettext-0.12) dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define(gt_included_intl, ifelse([$1], [external], [no], [yes])) define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Set USE_NLS. AM_NLS ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH(included-gettext, [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. dnl Add a version number to the cache macros. define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, [AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], gt_cv_func_gnugettext_libc=yes, gt_cv_func_gnugettext_libc=no)]) if test "$gt_cv_func_gnugettext_libc" != "yes"; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], gt_cv_func_gnugettext_libintl, [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias ();], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], gt_cv_func_gnugettext_libintl=yes, gt_cv_func_gnugettext_libintl=no) dnl Now see whether libintl exists and depends on libiconv. if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias ();], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" gt_cv_func_gnugettext_libintl=yes ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if test "$gt_cv_func_gnugettext_libc" = "yes" \ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if test "$gt_cv_func_gnugettext_libintl" = "yes"; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if test "$gt_cv_func_gnugettext_libintl" = "yes"; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE(HAVE_GETTEXT, 1, [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE(HAVE_DCGETTEXT, 1, [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST(BUILD_INCLUDED_LIBINTL) AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(CATOBJEXT) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST(DATADIRNAME) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST(INSTOBJEXT) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST(GENCAT) dnl For backward compatibility. Some Makefiles may be using this. if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi AC_SUBST(INTLOBJS) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST(INTLLIBS) dnl Make all documented variables known to autoconf. AC_SUBST(LIBINTL) AC_SUBST(LTLIBINTL) AC_SUBST(POSUB) ]) dnl Checks for all prerequisites of the intl subdirectory, dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. AC_DEFUN([AM_INTL_SUBDIR], [ AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_MKINSTALLDIRS])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_ISC_POSIX])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_REQUIRE([jm_GLIBC21])dnl AC_REQUIRE([gt_INTDIV0])dnl AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl AC_REQUIRE([gt_INTTYPES_PRI])dnl AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ stdlib.h string.h unistd.h sys/param.h]) AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \ __fsetlocking]) AM_ICONV AM_LANGINFO_CODESET if test $ac_cv_header_locale_h = yes; then AM_LC_MESSAGES fi dnl intl/plural.c is generated from intl/plural.y. It requires bison, dnl because plural.y uses bison specific features. It requires at least dnl bison-1.26 because earlier versions generate a plural.c that doesn't dnl compile. dnl bison is only needed for the maintainer (who touches plural.y). But in dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put dnl the rule in general Makefile. Now, some people carelessly touch the dnl files or have a broken "make" program, hence the plural.c rule will dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not dnl present or too old. AC_CHECK_PROGS([INTLBISON], [bison]) if test -z "$INTLBISON"; then ac_verc_fail=yes else dnl Found it, now check the version. AC_MSG_CHECKING([version of bison]) changequote(<<,>>)dnl ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) changequote([,])dnl ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; esac AC_MSG_RESULT([$ac_prog_version]) fi if test $ac_verc_fail = yes; then INTLBISON=: fi ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) gdb-doc-7.6.2/config/bootstrap-O1.mk0000644000175000017500000000006512250770606016161 0ustar zumbizumbiBOOT_CFLAGS := -O1 $(filter-out -O%, $(BOOT_CFLAGS)) gdb-doc-7.6.2/config/mh-ppc-aix0000644000175000017500000000067012250770606015226 0ustar zumbizumbi# To prevent the Ada static runtime library from using nearly the entire # TOC, we used to compile Ada files with minimal-toc in addition to -gnatg # (mandatory to compile language defined units). This incured a performance # penalty and is not required with section anchors enabled by default so we # don't do it any more. BOOT_ADAFLAGS = -gnatapg BOOT_LDFLAGS = -Wl,-bbigtoc LDFLAGS = `case '$(CC)' in *gcc*) echo -Wl,-bbigtoc ;; esac;` gdb-doc-7.6.2/config/glibc21.m40000644000175000017500000000172712250770606015031 0ustar zumbizumbi# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. # Test for the GNU C Library, version 2.1 or newer. # From Bruno Haible. AC_DEFUN([jm_GLIBC21], [ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, ac_cv_gnu_library_2_1, [AC_EGREP_CPP([Lucky GNU user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif ], ac_cv_gnu_library_2_1=yes, ac_cv_gnu_library_2_1=no) ] ) AC_SUBST(GLIBC21) GLIBC21="$ac_cv_gnu_library_2_1" ] ) gdb-doc-7.6.2/config/mt-spu0000644000175000017500000000014512250770606014505 0ustar zumbizumbi# spu ld makefile invokes as-new and bin2c in maintainer mode. all-ld: $(MAINT) all-gas all-binutils gdb-doc-7.6.2/config/tcl.m40000644000175000017500000030165712250770606014375 0ustar zumbizumbi#------------------------------------------------------------------------ # SC_PATH_TCLCONFIG -- # # Locate the tclConfig.sh file and perform a sanity check on # the Tcl compile flags # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-tcl=... # # Defines the following vars: # TCL_BIN_DIR Full path to the directory containing # the tclConfig.sh file #------------------------------------------------------------------------ AC_DEFUN([SC_PATH_TCLCONFIG], [ # # Ok, lets find the tcl configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tcl # if test x"${no_tcl}" = x ; then # we reset no_tcl in case something fails here no_tcl=true AC_ARG_WITH(tcl, [ --with-tcl directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval}) AC_MSG_CHECKING([for Tcl configuration]) AC_CACHE_VAL(ac_cv_c_tclconfig,[ # First check to see if --with-tcl was specified. case "${host}" in *-*-cygwin*) platDir="win" ;; *) platDir="unix" ;; esac if test x"${with_tclconfig}" != x ; then if test -f "${with_tclconfig}/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` else AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh]) fi fi # then check for a private Tcl installation if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ../tcl \ `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ../../tcl \ `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ ../../../tcl \ `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/$platDir/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` break fi done fi # on Darwin, check in Framework installation locations if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ `ls -d /Library/Frameworks 2>/dev/null` \ `ls -d /Network/Library/Frameworks 2>/dev/null` \ `ls -d /System/Library/Frameworks 2>/dev/null` \ ; do if test -f "$i/Tcl.framework/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` break fi done fi # check in a few common install locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d ${exec_prefix}/lib 2>/dev/null` \ `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i; pwd)` break fi done fi # check in a few other private locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ${srcdir}/../tcl \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/$platDir/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` break fi done fi ]) if test x"${ac_cv_c_tclconfig}" = x ; then TCL_BIN_DIR="# no Tcl configs found" AC_MSG_WARN([Can't find Tcl configuration definitions]) else no_tcl= TCL_BIN_DIR=${ac_cv_c_tclconfig} AC_MSG_RESULT([found ${TCL_BIN_DIR}/tclConfig.sh]) fi fi ]) #------------------------------------------------------------------------ # SC_PATH_TKCONFIG -- # # Locate the tkConfig.sh file # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --with-tk=... # # Defines the following vars: # TK_BIN_DIR Full path to the directory containing # the tkConfig.sh file #------------------------------------------------------------------------ AC_DEFUN([SC_PATH_TKCONFIG], [ # # Ok, lets find the tk configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tk # if test x"${no_tk}" = x ; then # we reset no_tk in case something fails here no_tk=true AC_ARG_WITH(tk, [ --with-tk directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval}) AC_MSG_CHECKING([for Tk configuration]) AC_CACHE_VAL(ac_cv_c_tkconfig,[ # First check to see if --with-tkconfig was specified. if test x"${with_tkconfig}" != x ; then if test -f "${with_tkconfig}/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` else AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh]) fi fi # then check for a private Tk library case "${host}" in *-*-cygwin*) platDir="win" ;; *) platDir="unix" ;; esac if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ../tk \ `ls -dr ../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \ ../../tk \ `ls -dr ../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \ ../../../tk \ `ls -dr ../../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ../../../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/$platDir/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` break fi done fi # on Darwin, check in Framework installation locations if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ `ls -d /Library/Frameworks 2>/dev/null` \ `ls -d /Network/Library/Frameworks 2>/dev/null` \ `ls -d /System/Library/Frameworks 2>/dev/null` \ ; do if test -f "$i/Tk.framework/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` break fi done fi # check in a few common install locations if test x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d ${exec_prefix}/lib 2>/dev/null` \ `ls -d ${prefix}/lib 2>/dev/null` \ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ ; do if test -f "$i/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i; pwd)` break fi done fi # check in a few other private locations if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ${srcdir}/../tk \ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]] 2>/dev/null` \ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do if test -f "$i/$platDir/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` break fi done fi ]) if test x"${ac_cv_c_tkconfig}" = x ; then TK_BIN_DIR="# no Tk configs found" AC_MSG_WARN([Can't find Tk configuration definitions]) else no_tk= TK_BIN_DIR=${ac_cv_c_tkconfig} AC_MSG_RESULT([found ${TK_BIN_DIR}/tkConfig.sh]) fi fi ]) #------------------------------------------------------------------------ # SC_LOAD_TCLCONFIG -- # # Load the tclConfig.sh file # # Arguments: # # Requires the following vars to be set: # TCL_BIN_DIR # # Results: # # Subst the following vars: # TCL_BIN_DIR # TCL_SRC_DIR # TCL_LIB_FILE # #------------------------------------------------------------------------ AC_DEFUN([SC_LOAD_TCLCONFIG], [ AC_MSG_CHECKING([for existence of ${TCL_BIN_DIR}/tclConfig.sh]) if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then AC_MSG_RESULT([loading]) . ${TCL_BIN_DIR}/tclConfig.sh else AC_MSG_RESULT([could not find ${TCL_BIN_DIR}/tclConfig.sh]) fi # eval is required to do the TCL_DBGX substitution eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" # If the TCL_BIN_DIR is the build directory (not the install directory), # then set the common variable name to the value of the build variables. # For example, the variable TCL_LIB_SPEC will be set to the value # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC # instead of TCL_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. if test -f "${TCL_BIN_DIR}/Makefile" ; then TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} elif test "`uname -s`" = "Darwin"; then # If Tcl was built as a framework, attempt to use the libraries # from the framework at the given location so that linking works # against Tcl.framework installed in an arbitrary location. case ${TCL_DEFS} in *TCL_FRAMEWORK*) if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then for i in "`cd ${TCL_BIN_DIR}; pwd`" \ "`cd ${TCL_BIN_DIR}/../..; pwd`"; do if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" break fi done fi if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" fi ;; esac fi # eval is required to do the TCL_DBGX substitution eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" AC_SUBST(TCL_VERSION) AC_SUBST(TCL_PATCH_LEVEL) AC_SUBST(TCL_BIN_DIR) AC_SUBST(TCL_SRC_DIR) AC_SUBST(TCL_LIB_FILE) AC_SUBST(TCL_LIB_FLAG) AC_SUBST(TCL_LIB_SPEC) AC_SUBST(TCL_STUB_LIB_FILE) AC_SUBST(TCL_STUB_LIB_FLAG) AC_SUBST(TCL_STUB_LIB_SPEC) ]) #------------------------------------------------------------------------ # SC_LOAD_TKCONFIG -- # # Load the tkConfig.sh file # # Arguments: # # Requires the following vars to be set: # TK_BIN_DIR # # Results: # # Sets the following vars that should be in tkConfig.sh: # TK_BIN_DIR #------------------------------------------------------------------------ AC_DEFUN([SC_LOAD_TKCONFIG], [ AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh]) if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then AC_MSG_RESULT([loading]) . ${TK_BIN_DIR}/tkConfig.sh else AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh]) fi # eval is required to do the TK_DBGX substitution eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" # If the TK_BIN_DIR is the build directory (not the install directory), # then set the common variable name to the value of the build variables. # For example, the variable TK_LIB_SPEC will be set to the value # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC # instead of TK_BUILD_LIB_SPEC since it will work with both an # installed and uninstalled version of Tcl. if test -f "${TK_BIN_DIR}/Makefile" ; then TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} elif test "`uname -s`" = "Darwin"; then # If Tk was built as a framework, attempt to use the libraries # from the framework at the given location so that linking works # against Tk.framework installed in an arbitrary location. case ${TK_DEFS} in *TK_FRAMEWORK*) if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then for i in "`cd ${TK_BIN_DIR}; pwd`" \ "`cd ${TK_BIN_DIR}/../..; pwd`"; do if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" break fi done fi if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" fi ;; esac fi # eval is required to do the TK_DBGX substitution eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" AC_SUBST(TK_VERSION) AC_SUBST(TK_BIN_DIR) AC_SUBST(TK_SRC_DIR) AC_SUBST(TK_LIB_FILE) AC_SUBST(TK_LIB_FLAG) AC_SUBST(TK_LIB_SPEC) AC_SUBST(TK_STUB_LIB_FILE) AC_SUBST(TK_STUB_LIB_FLAG) AC_SUBST(TK_STUB_LIB_SPEC) ]) #------------------------------------------------------------------------ # SC_PROG_TCLSH # Locate a tclsh shell installed on the system path. This macro # will only find a Tcl shell that already exists on the system. # It will not find a Tcl shell in the Tcl build directory or # a Tcl shell that has been installed from the Tcl build directory. # If a Tcl shell can't be located on the PATH, then TCLSH_PROG will # be set to "". Extensions should take care not to create Makefile # rules that are run by default and depend on TCLSH_PROG. An # extension can't assume that an executable Tcl shell exists at # build time. # # Arguments # none # # Results # Subst's the following values: # TCLSH_PROG #------------------------------------------------------------------------ AC_DEFUN([SC_PROG_TCLSH], [ AC_MSG_CHECKING([for tclsh]) AC_CACHE_VAL(ac_cv_path_tclsh, [ search_path=`echo ${PATH} | sed -e 's/:/ /g'` for dir in $search_path ; do for j in `ls -r $dir/tclsh[[8-9]]* 2> /dev/null` \ `ls -r $dir/tclsh* 2> /dev/null` ; do if test x"$ac_cv_path_tclsh" = x ; then if test -f "$j" ; then ac_cv_path_tclsh=$j break fi fi done done ]) if test -f "$ac_cv_path_tclsh" ; then TCLSH_PROG="$ac_cv_path_tclsh" AC_MSG_RESULT([$TCLSH_PROG]) else # It is not an error if an installed version of Tcl can't be located. TCLSH_PROG="" AC_MSG_RESULT([No tclsh found on PATH]) fi AC_SUBST(TCLSH_PROG) ]) #------------------------------------------------------------------------ # SC_BUILD_TCLSH # Determine the fully qualified path name of the tclsh executable # in the Tcl build directory. This macro will correctly determine # the name of the tclsh executable even if tclsh has not yet # been built in the build directory. The build tclsh must be used # when running tests from an extension build directory. It is not # correct to use the TCLSH_PROG in cases like this. # # Arguments # none # # Results # Subst's the following values: # BUILD_TCLSH #------------------------------------------------------------------------ AC_DEFUN([SC_BUILD_TCLSH], [ AC_MSG_CHECKING([for tclsh in Tcl build directory]) BUILD_TCLSH=${TCL_BIN_DIR}/tclsh AC_MSG_RESULT([$BUILD_TCLSH]) AC_SUBST(BUILD_TCLSH) ]) #------------------------------------------------------------------------ # SC_ENABLE_SHARED -- # # Allows the building of shared libraries # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-shared=yes|no # # Defines the following vars: # STATIC_BUILD Used for building import/export libraries # on Windows. # # Sets the following vars: # SHARED_BUILD Value of 1 or 0 #------------------------------------------------------------------------ AC_DEFUN([SC_ENABLE_SHARED], [ AC_MSG_CHECKING([how to build libraries]) AC_ARG_ENABLE(shared, [ --enable-shared build and link with shared libraries [--enable-shared]], [tcl_ok=$enableval], [tcl_ok=yes]) if test "${enable_shared+set}" = set; then enableval="$enable_shared" tcl_ok=$enableval else tcl_ok=yes fi if test "$tcl_ok" = "yes" ; then AC_MSG_RESULT([shared]) SHARED_BUILD=1 else AC_MSG_RESULT([static]) SHARED_BUILD=0 AC_DEFINE(STATIC_BUILD) fi ]) #------------------------------------------------------------------------ # SC_ENABLE_FRAMEWORK -- # # Allows the building of shared libraries into frameworks # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-framework=yes|no # # Sets the following vars: # FRAMEWORK_BUILD Value of 1 or 0 #------------------------------------------------------------------------ AC_DEFUN([SC_ENABLE_FRAMEWORK], [ if test "`uname -s`" = "Darwin" ; then AC_MSG_CHECKING([how to package libraries]) AC_ARG_ENABLE(framework, [ --enable-framework package shared libraries in MacOSX frameworks [--disable-framework]], [enable_framework=$enableval], [enable_framework=no]) if test $enable_framework = yes; then if test $SHARED_BUILD = 0; then AC_MSG_WARN([Frameworks can only be built if --enable-shared is yes]) enable_framework=no fi if test $tcl_corefoundation = no; then AC_MSG_WARN([Frameworks can only be used when CoreFoundation is available]) enable_framework=no fi fi if test $enable_framework = yes; then AC_MSG_RESULT([framework]) FRAMEWORK_BUILD=1 else if test $SHARED_BUILD = 1; then AC_MSG_RESULT([shared library]) else AC_MSG_RESULT([static library]) fi FRAMEWORK_BUILD=0 fi fi ]) #------------------------------------------------------------------------ # SC_ENABLE_THREADS -- # # Specify if thread support should be enabled. TCL_THREADS is # checked so that if you are compiling an extension against a # threaded core, your extension must be compiled threaded as well. # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-threads # # Sets the following vars: # THREADS_LIBS Thread library(s) # # Defines the following vars: # TCL_THREADS # _REENTRANT # _THREAD_SAFE # #------------------------------------------------------------------------ AC_DEFUN([SC_ENABLE_THREADS], [ AC_ARG_ENABLE(threads, [ --enable-threads build with threads], [tcl_ok=$enableval], [tcl_ok=no]) if test "${TCL_THREADS}" = 1; then tcl_threaded_core=1; fi if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then TCL_THREADS=1 # USE_THREAD_ALLOC tells us to try the special thread-based # allocator that significantly reduces lock contention AC_DEFINE(USE_THREAD_ALLOC) AC_DEFINE(_REENTRANT) if test "`uname -s`" = "SunOS" ; then AC_DEFINE(_POSIX_PTHREAD_SEMANTICS) fi AC_DEFINE(_THREAD_SAFE) AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no) if test "$tcl_ok" = "no"; then # Check a little harder for __pthread_mutex_init in the same # library, as some systems hide it there until pthread.h is # defined. We could alternatively do an AC_TRY_COMPILE with # pthread.h, but that will work with libpthread really doesn't # exist, like AIX 4.2. [Bug: 4359] AC_CHECK_LIB(pthread, __pthread_mutex_init, tcl_ok=yes, tcl_ok=no) fi if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -lpthread" else AC_CHECK_LIB(pthreads, pthread_mutex_init, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -lpthreads" else AC_CHECK_LIB(c, pthread_mutex_init, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = "no"; then AC_CHECK_LIB(c_r, pthread_mutex_init, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = "yes"; then # The space is needed THREADS_LIBS=" -pthread" else TCL_THREADS=0 AC_MSG_WARN([Don't know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...]) fi fi fi fi # Does the pthread-implementation provide # 'pthread_attr_setstacksize' ? ac_saved_libs=$LIBS LIBS="$LIBS $THREADS_LIBS" AC_CHECK_FUNCS(pthread_attr_setstacksize) AC_CHECK_FUNCS(pthread_atfork) LIBS=$ac_saved_libs else TCL_THREADS=0 fi # Do checking message here to not mess up interleaved configure output AC_MSG_CHECKING([for building with threads]) if test "${TCL_THREADS}" = 1; then AC_DEFINE(TCL_THREADS, 1, [Are we building with threads enabled?]) if test "${tcl_threaded_core}" = 1; then AC_MSG_RESULT([yes (threaded core)]) else AC_MSG_RESULT([yes]) fi else AC_MSG_RESULT([no (default)]) fi AC_SUBST(TCL_THREADS) ]) #------------------------------------------------------------------------ # SC_ENABLE_SYMBOLS -- # # Specify if debugging symbols should be used. # Memory (TCL_MEM_DEBUG) and compile (TCL_COMPILE_DEBUG) debugging # can also be enabled. # # Arguments: # none # # Requires the following vars to be set in the Makefile: # CFLAGS_DEBUG # CFLAGS_OPTIMIZE # LDFLAGS_DEBUG # LDFLAGS_OPTIMIZE # # Results: # # Adds the following arguments to configure: # --enable-symbols # # Defines the following vars: # CFLAGS_DEFAULT Sets to $(CFLAGS_DEBUG) if true # Sets to $(CFLAGS_OPTIMIZE) if false # LDFLAGS_DEFAULT Sets to $(LDFLAGS_DEBUG) if true # Sets to $(LDFLAGS_OPTIMIZE) if false # DBGX Debug library extension # #------------------------------------------------------------------------ AC_DEFUN([SC_ENABLE_SYMBOLS], [ AC_MSG_CHECKING([for build with symbols]) AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols [--disable-symbols]], [tcl_ok=$enableval], [tcl_ok=no]) # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)' LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)' DBGX="" AC_MSG_RESULT([no]) else CFLAGS_DEFAULT='$(CFLAGS_DEBUG)' LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)' DBGX=g if test "$tcl_ok" = "yes"; then AC_MSG_RESULT([yes (standard debugging)]) fi fi AC_SUBST(CFLAGS_DEFAULT) AC_SUBST(LDFLAGS_DEFAULT) if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then AC_DEFINE(TCL_MEM_DEBUG) fi if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then AC_DEFINE(TCL_COMPILE_DEBUG) AC_DEFINE(TCL_COMPILE_STATS) fi if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then AC_MSG_RESULT([enabled symbols mem compile debugging]) else AC_MSG_RESULT([enabled $tcl_ok debugging]) fi fi ]) #------------------------------------------------------------------------ # SC_ENABLE_LANGINFO -- # # Allows use of modern nl_langinfo check for better l10n. # This is only relevant for Unix. # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-langinfo=yes|no (default is yes) # # Defines the following vars: # HAVE_LANGINFO Triggers use of nl_langinfo if defined. # #------------------------------------------------------------------------ AC_DEFUN([SC_ENABLE_LANGINFO], [ AC_ARG_ENABLE(langinfo, [ --enable-langinfo use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic], [langinfo_ok=$enableval], [langinfo_ok=yes]) HAVE_LANGINFO=0 if test "$langinfo_ok" = "yes"; then AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no]) fi AC_MSG_CHECKING([whether to use nl_langinfo]) if test "$langinfo_ok" = "yes"; then AC_CACHE_VAL(tcl_cv_langinfo_h, [ AC_TRY_COMPILE([#include ], [nl_langinfo(CODESET);], [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])]) AC_MSG_RESULT([$tcl_cv_langinfo_h]) if test $tcl_cv_langinfo_h = yes; then AC_DEFINE(HAVE_LANGINFO) fi else AC_MSG_RESULT([$langinfo_ok]) fi ]) #-------------------------------------------------------------------- # SC_CONFIG_MANPAGES # # Decide whether to use symlinks for linking the manpages, # whether to compress the manpages after installation, and # whether to add a package name suffix to the installed # manpages to avoidfile name clashes. # If compression is enabled also find out what file name suffix # the given compression program is using. # # Arguments: # none # # Results: # # Adds the following arguments to configure: # --enable-man-symlinks # --enable-man-compression=PROG # --enable-man-suffix[=STRING] # # Defines the following variable: # # MAN_FLAGS - The appropriate flags for installManPage # according to the user's selection. # #-------------------------------------------------------------------- AC_DEFUN([SC_CONFIG_MANPAGES], [ AC_MSG_CHECKING([whether to use symlinks for manpages]) AC_ARG_ENABLE(man-symlinks, [ --enable-man-symlinks use symlinks for the manpages], test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks", enableval="no") AC_MSG_RESULT([$enableval]) AC_MSG_CHECKING([whether to compress the manpages]) AC_ARG_ENABLE(man-compression, [ --enable-man-compression=PROG compress the manpages with PROG], [case $enableval in yes) AC_MSG_ERROR([missing argument to --enable-man-compression]);; no) ;; *) MAN_FLAGS="$MAN_FLAGS --compress $enableval";; esac], enableval="no") AC_MSG_RESULT([$enableval]) if test "$enableval" != "no"; then AC_MSG_CHECKING([for compressed file suffix]) touch TeST $enableval TeST Z=`ls TeST* | sed 's/^....//'` rm -f TeST* MAN_FLAGS="$MAN_FLAGS --extension $Z" AC_MSG_RESULT([$Z]) fi AC_MSG_CHECKING([whether to add a package name suffix for the manpages]) AC_ARG_ENABLE(man-suffix, [ --enable-man-suffix=STRING use STRING as a suffix to manpage file names (default: $1)], [case $enableval in yes) enableval="$1" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac], enableval="no") AC_MSG_RESULT([$enableval]) AC_SUBST(MAN_FLAGS) ]) #-------------------------------------------------------------------- # SC_CONFIG_SYSTEM # # Determine what the system is (some things cannot be easily checked # on a feature-driven basis, alas). This can usually be done via the # "uname" command, but there are a few systems, like Next, where # this doesn't work. # # Arguments: # none # # Results: # Defines the following var: # # system - System/platform/version identification code. # #-------------------------------------------------------------------- AC_DEFUN([SC_CONFIG_SYSTEM], [ AC_CACHE_CHECK([system version], tcl_cv_sys_version, [ if test -f /usr/lib/NextStep/software_version; then tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version` else tcl_cv_sys_version=`uname -s`-`uname -r` if test "$?" -ne 0 ; then AC_MSG_WARN([can't find uname command]) tcl_cv_sys_version=unknown else # Special check for weird MP-RAS system (uname returns weird # results, and the version is kept in special file). if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then tcl_cv_sys_version=MP-RAS-`awk '{print $[3]}' /etc/.relid` fi if test "`uname -s`" = "AIX" ; then tcl_cv_sys_version=AIX-`uname -v`.`uname -r` fi fi fi ]) system=$tcl_cv_sys_version ]) #-------------------------------------------------------------------- # SC_CONFIG_CFLAGS # # Try to determine the proper flags to pass to the compiler # for building shared libraries and other such nonsense. # # Arguments: # none # # Results: # # Defines and substitutes the following vars: # # DL_OBJS - Name of the object file that implements dynamic # loading for Tcl on this system. # DL_LIBS - Library file(s) to include in tclsh and other base # applications in order for the "load" command to work. # LDFLAGS - Flags to pass to the compiler when linking object # files into an executable application binary such # as tclsh. # LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib", # that tell the run-time dynamic linker where to look # for shared libraries such as libtcl.so. Depends on # the variable LIB_RUNTIME_DIR in the Makefile. Could # be the same as CC_SEARCH_FLAGS if ${CC} is used to link. # CC_SEARCH_FLAGS-Flags to pass to ${CC}, such as "-Wl,-rpath,/usr/local/tcl/lib", # that tell the run-time dynamic linker where to look # for shared libraries such as libtcl.so. Depends on # the variable LIB_RUNTIME_DIR in the Makefile. # MAKE_LIB - Command to execute to build the a library; # differs when building shared or static. # MAKE_STUB_LIB - # Command to execute to build a stub library. # INSTALL_LIB - Command to execute to install a library; # differs when building shared or static. # INSTALL_STUB_LIB - # Command to execute to install a stub library. # STLIB_LD - Base command to use for combining object files # into a static library. # SHLIB_CFLAGS - Flags to pass to cc when compiling the components # of a shared library (may request position-independent # code, among other things). # SHLIB_LD - Base command to use for combining object files # into a shared library. # SHLIB_LD_LIBS - Dependent libraries for the linker to scan when # creating shared libraries. This symbol typically # goes at the end of the "ld" commands that build # shared libraries. The value of the symbol is # "${LIBS}" if all of the dependent libraries should # be specified when creating a shared library. If # dependent libraries should not be specified (as on # SunOS 4.x, where they cause the link to fail, or in # general if Tcl and Tk aren't themselves shared # libraries), then this symbol has an empty string # as its value. # SHLIB_SUFFIX - Suffix to use for the names of dynamically loadable # extensions. An empty string means we don't know how # to use shared libraries on this platform. # TCL_SHLIB_LD_EXTRAS - Additional element which are added to SHLIB_LD_LIBS # TK_SHLIB_LD_EXTRAS for the build of Tcl and Tk, but not recorded in the # tclConfig.sh, since they are only used for the build # of Tcl and Tk. # Examples: MacOS X records the library version and # compatibility version in the shared library. But # of course the Tcl version of this is only used for Tcl. # LIB_SUFFIX - Specifies everything that comes after the "libfoo" # in a static or shared library name, using the $VERSION variable # to put the version in the right place. This is used # by platforms that need non-standard library names. # Examples: ${VERSION}.so.1.1 on NetBSD, since it needs # to have a version after the .so, and ${VERSION}.a # on AIX, since a shared library needs to have # a .a extension whereas shared objects for loadable # extensions have a .so extension. Defaults to # ${VERSION}${SHLIB_SUFFIX}. # TCL_NEEDS_EXP_FILE - # 1 means that an export file is needed to link to a # shared library. # TCL_EXP_FILE - The name of the installed export / import file which # should be used to link to the Tcl shared library. # Empty if Tcl is unshared. # TCL_BUILD_EXP_FILE - # The name of the built export / import file which # should be used to link to the Tcl shared library. # Empty if Tcl is unshared. # CFLAGS_DEBUG - # Flags used when running the compiler in debug mode # CFLAGS_OPTIMIZE - # Flags used when running the compiler in optimize mode # CFLAGS - Additional CFLAGS added as necessary (usually 64-bit) # #-------------------------------------------------------------------- AC_DEFUN([SC_CONFIG_CFLAGS], [ # Step 0.a: Enable 64 bit support? AC_MSG_CHECKING([if 64bit support is requested]) AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support (where applicable)], [do64bit=$enableval], [do64bit=no]) AC_MSG_RESULT([$do64bit]) # Step 0.b: Enable Solaris 64 bit VIS support? AC_MSG_CHECKING([if 64bit Sparc VIS support is requested]) AC_ARG_ENABLE(64bit-vis,[ --enable-64bit-vis enable 64bit Sparc VIS support], [do64bitVIS=$enableval], [do64bitVIS=no]) AC_MSG_RESULT([$do64bitVIS]) if test "$do64bitVIS" = "yes"; then # Force 64bit on with VIS do64bit=yes fi # Step 1: set the variable "system" to hold the name and version number # for the system. SC_CONFIG_SYSTEM # Step 2: check for existence of -ldl library. This is needed because # Linux can use either -ldl or -ldld for dynamic loading. AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no) # Require ranlib early so we can override it in special cases below. AC_REQUIRE([AC_PROG_RANLIB]) # Step 3: set configuration options based on system name and version. do64bit_ok=no LDFLAGS_ORIG="$LDFLAGS" TCL_EXPORT_FILE_SUFFIX="" UNSHARED_LIB_SUFFIX="" TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`' ECHO_VERSION='`echo ${VERSION}`' TCL_LIB_VERSIONS_OK=ok CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE=-O if test "$GCC" = "yes" ; then CFLAGS_WARNING="-Wall -Wno-implicit-int -fno-strict-aliasing" else CFLAGS_WARNING="" fi TCL_NEEDS_EXP_FILE=0 TCL_BUILD_EXP_FILE="" TCL_EXP_FILE="" dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed. dnl AC_CHECK_TOOL(AR, ar) AC_CHECK_PROG(AR, ar, ar) if test "${AR}" = "" ; then AC_MSG_ERROR([Required archive tool 'ar' not found on PATH.]) fi STLIB_LD='${AR} cr' LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" PLAT_OBJS="" PLAT_SRCS="" case $system in AIX-*) if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then # AIX requires the _r compiler when gcc isn't being used case "${CC}" in *_r) # ok ... ;; *) CC=${CC}_r ;; esac AC_MSG_RESULT([Using $CC for compiling with threads]) fi LIBS="$LIBS -lc" SHLIB_CFLAGS="" # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" LD_LIBRARY_PATH_VAR="LIBPATH" # Check to enable 64-bit flags for compiler/linker on AIX 4+ if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then if test "$GCC" = "yes" ; then AC_MSG_WARN([64bit mode not supported with GCC on $system]) else do64bit_ok=yes CFLAGS="$CFLAGS -q64" LDFLAGS="$LDFLAGS -q64" RANLIB="${RANLIB} -X64" AR="${AR} -X64" SHLIB_LD_FLAGS="-b64" fi fi if test "`uname -m`" = "ia64" ; then # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC SHLIB_LD="/usr/ccs/bin/ld -G -z text" # AIX-5 has dl* in libc.so DL_LIBS="" if test "$GCC" = "yes" ; then CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' else CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}' fi LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' else if test "$GCC" = "yes" ; then SHLIB_LD="gcc -shared" else SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry" fi SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}" DL_LIBS="-ldl" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} TCL_NEEDS_EXP_FILE=1 TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp' fi # AIX v<=4.1 has some different flags than 4.2+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then LIBOBJS="$LIBOBJS tclLoadAix.o" DL_LIBS="-lld" fi # On AIX <=v4 systems, libbsd.a has to be linked in to support # non-blocking file IO. This library has to be linked in after # the MATH_LIBS or it breaks the pow() function. The way to # insure proper sequencing, is to add it to the tail of MATH_LIBS. # This library also supplies gettimeofday. # # AIX does not have a timezone field in struct tm. When the AIX # bsd library is used, the timezone global and the gettimeofday # methods are to be avoided for timezone deduction instead, we # deduce the timezone by comparing the localtime result on a # known GMT value. AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no) if test $libbsd = yes; then MATH_LIBS="$MATH_LIBS -lbsd" AC_DEFINE(USE_DELTA_FOR_TZ) fi ;; BeOS*) SHLIB_CFLAGS="-fPIC" SHLIB_LD="${CC} -nostart" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" #----------------------------------------------------------- # Check for inet_ntoa in -lbind, for BeOS (which also needs # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"]) ;; BSD/OS-2.1*|BSD/OS-3*) SHLIB_CFLAGS="" SHLIB_LD="shlicc -r" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; BSD/OS-4.*) SHLIB_CFLAGS="-export-dynamic -fPIC" SHLIB_LD="cc -shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -export-dynamic" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; dgux*) SHLIB_CFLAGS="-K PIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; HP-UX-*.11.*) # Use updated header definitions where possible AC_DEFINE(_XOPEN_SOURCE) # Use the XOPEN network library AC_DEFINE(_XOPEN_SOURCE_EXTENDED) # Use the XOPEN network library LIBS="$LIBS -lxnet" # Use the XOPEN network library if test "`uname -m`" = "ia64" ; then SHLIB_SUFFIX=".so" else SHLIB_SUFFIX=".sl" fi AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = yes; then SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" LDFLAGS="$LDFLAGS -Wl,-E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" fi if test "$GCC" = "yes" ; then SHLIB_LD="gcc -shared" SHLIB_LD_LIBS='${LIBS}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} fi # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc #CFLAGS="$CFLAGS +DAportable" # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = "yes" ; then if test "$GCC" = "yes" ; then hpux_arch=`${CC} -dumpmachine` case $hpux_arch in hppa64*) # 64-bit gcc in use. Fix flags for GNU ld. do64bit_ok=yes SHLIB_LD="${CC} -shared" SHLIB_LD_LIBS='${LIBS}' CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ;; *) AC_MSG_WARN([64bit mode not supported with GCC on $system]) ;; esac else do64bit_ok=yes CFLAGS="$CFLAGS +DD64" LDFLAGS="$LDFLAGS +DD64" fi fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) if test "$tcl_ok" = yes; then SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" SHLIB_LD_LIBS="" DL_OBJS="tclLoadShl.o" DL_LIBS="-ldld" LDFLAGS="$LDFLAGS -Wl,-E" CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.' LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.' LD_LIBRARY_PATH_VAR="SHLIB_PATH" fi ;; IRIX-4.*) SHLIB_CFLAGS="-G 0" SHLIB_SUFFIX=".a" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadAout.o" DL_LIBS="" LDFLAGS="$LDFLAGS -Wl,-D,08000000" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' ;; IRIX-5.*) SHLIB_CFLAGS="" SHLIB_LD="ld -shared -rdata_shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' ;; IRIX-6.*) SHLIB_CFLAGS="" SHLIB_LD="ld -n32 -shared -rdata_shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' if test "$GCC" = "yes" ; then CFLAGS="$CFLAGS -mabi=n32" LDFLAGS="$LDFLAGS -mabi=n32" else case $system in IRIX-6.3) # Use to build 6.2 compatible binaries on 6.3. CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS" ;; *) CFLAGS="$CFLAGS -n32" ;; esac LDFLAGS="$LDFLAGS -n32" fi ;; IRIX64-6.*) SHLIB_CFLAGS="" SHLIB_LD="ld -n32 -shared -rdata_shared" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = "yes" ; then if test "$GCC" = "yes" ; then AC_MSG_WARN([64bit mode not supported by gcc]) else do64bit_ok=yes SHLIB_LD="ld -64 -shared -rdata_shared" CFLAGS="$CFLAGS -64" LDFLAGS="$LDFLAGS -64" fi fi ;; Linux*) SHLIB_CFLAGS="-fPIC" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" CFLAGS_OPTIMIZE=-O2 # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings # when you inline the string and math operations. Turn this off to # get rid of the warnings. #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" if test "$have_dl" = yes; then SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -Wl,--export-dynamic" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} else AC_CHECK_HEADER(dld.h, [ SHLIB_LD="ld -shared" DL_OBJS="tclLoadDld.o" DL_LIBS="-ldld" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS=""]) fi if test "`uname -m`" = "alpha" ; then CFLAGS="$CFLAGS -mieee" fi if test $do64bit = yes; then AC_CACHE_CHECK([if compiler accepts -m64 flag], tcl_cv_cc_m64, [ hold_cflags=$CFLAGS CFLAGS="$CFLAGS -m64" AC_TRY_LINK(,, tcl_cv_cc_m64=yes, tcl_cv_cc_m64=no) CFLAGS=$hold_cflags]) if test $tcl_cv_cc_m64 = yes; then CFLAGS="$CFLAGS -m64" do64bit_ok=yes fi fi # The combo of gcc + glibc has a bug related # to inlining of functions like strtod(). The # -fno-builtin flag should address this problem # but it does not work. The -fno-inline flag # is kind of overkill but it works. # Disable inlining only when one of the # files in compat/*.c is being linked in. if test x"${LIBOBJS}" != x ; then CFLAGS="$CFLAGS -fno-inline" fi # XIM peeking works under XFree86. AC_DEFINE(PEEK_XCLOSEIM) ;; GNU*) SHLIB_CFLAGS="-fPIC" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" if test "$have_dl" = yes; then SHLIB_LD="${CC} -shared" DL_OBJS="" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -Wl,--export-dynamic" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" else AC_CHECK_HEADER(dld.h, [ SHLIB_LD="ld -shared" DL_OBJS="" DL_LIBS="-ldld" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS=""]) fi if test "`uname -m`" = "alpha" ; then CFLAGS="$CFLAGS -mieee" fi ;; Lynx*) SHLIB_CFLAGS="-fPIC" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" CFLAGS_OPTIMIZE=-02 SHLIB_LD="${CC} -shared " DL_OBJS="tclLoadDl.o" DL_LIBS="-mshared -ldl" LD_FLAGS="-Wl,--export-dynamic" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' ;; MP-RAS-02*) SHLIB_CFLAGS="-K PIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; MP-RAS-*) SHLIB_CFLAGS="-K PIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" LDFLAGS="$LDFLAGS -Wl,-Bexport" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; NetBSD-*|FreeBSD-[[1-2]].*) # Not available on all versions: check for include file. AC_CHECK_HEADER(dlfcn.h, [ # NetBSD/SPARC needs -fPIC, -fpic will not do. SHLIB_CFLAGS="-fPIC" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [ AC_EGREP_CPP(yes, [ #ifdef __ELF__ yes #endif ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)]) if test $tcl_cv_ld_elf = yes; then SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so' else SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' fi ], [ SHLIB_CFLAGS="" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".a" DL_OBJS="tclLoadAout.o" DL_LIBS="" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' ]) # FreeBSD doesn't handle version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' TCL_LIB_VERSIONS_OK=nodots ;; OpenBSD-*) case `arch -s` in m88k|vax) SHLIB_CFLAGS="" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".a" DL_OBJS="tclLoadAout.o" DL_LIBS="" LDFLAGS="" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' ;; *) # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do. case `machine` in sparc|sparc64) SHLIB_CFLAGS="-fPIC";; *) SHLIB_CFLAGS="-fpic";; esac SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [ AC_EGREP_CPP(yes, [ #ifdef __ELF__ yes #endif ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)]) if test $tcl_cv_ld_elf = yes; then LDFLAGS=-Wl,-export-dynamic else LDFLAGS="" fi ;; esac # OpenBSD doesn't do version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' TCL_LIB_VERSIONS_OK=nodots ;; FreeBSD-*) # FreeBSD 3.* and greater have ELF. SHLIB_CFLAGS="-fPIC" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="$LDFLAGS -export-dynamic" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' if test "${TCL_THREADS}" = "1" ; then # The -pthread needs to go in the CFLAGS, not LIBS LIBS=`echo $LIBS | sed s/-pthread//` CFLAGS="$CFLAGS -pthread" LDFLAGS="$LDFLAGS -pthread" fi case $system in FreeBSD-3.*) # FreeBSD-3 doesn't handle version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so' TCL_LIB_VERSIONS_OK=nodots ;; esac ;; Darwin-*) CFLAGS_OPTIMIZE="-Os" SHLIB_CFLAGS="-fno-common" # To avoid discrepancies between what headers configure sees during # preprocessing tests and compiling tests, move any -isysroot and # -mmacosx-version-min flags from CFLAGS to CPPFLAGS: CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`" CFLAGS="`echo " ${CFLAGS}" | \ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`" if test $do64bit = yes; then case `arch` in ppc) AC_CACHE_CHECK([if compiler accepts -arch ppc64 flag], tcl_cv_cc_arch_ppc64, [ hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" AC_TRY_LINK(,, tcl_cv_cc_arch_ppc64=yes, tcl_cv_cc_arch_ppc64=no) CFLAGS=$hold_cflags]) if test $tcl_cv_cc_arch_ppc64 = yes; then CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" do64bit_ok=yes fi;; i386) AC_CACHE_CHECK([if compiler accepts -arch x86_64 flag], tcl_cv_cc_arch_x86_64, [ hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch x86_64" AC_TRY_LINK(,, tcl_cv_cc_arch_x86_64=yes, tcl_cv_cc_arch_x86_64=no) CFLAGS=$hold_cflags]) if test $tcl_cv_cc_arch_x86_64 = yes; then CFLAGS="$CFLAGS -arch x86_64" do64bit_ok=yes fi;; *) AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`]);; esac else # Check for combined 32-bit and 64-bit fat build echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \ echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \ fat_32_64=yes fi SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}' AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [ hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no) LDFLAGS=$hold_ldflags]) if test $tcl_cv_ld_single_module = yes; then SHLIB_LD="${SHLIB_LD} -Wl,-single_module" fi SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".dylib" DL_OBJS="tclLoadDyld.o" DL_LIBS="" # Don't use -prebind when building for Mac OS X 10.4 or later only: test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \ "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4 && \ LDFLAGS="$LDFLAGS -prebind" LDFLAGS="$LDFLAGS -headerpad_max_install_names" AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [ hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-search_paths_first" AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes, tcl_cv_ld_search_paths_first=no) LDFLAGS=$hold_ldflags]) if test $tcl_cv_ld_search_paths_first = yes; then LDFLAGS="$LDFLAGS -Wl,-search_paths_first" fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" PLAT_OBJS=\$\(MAC\_OSX_OBJS\) PLAT_SRCS=\$\(MAC\_OSX_SRCS\) AC_MSG_CHECKING([whether to use CoreFoundation]) AC_ARG_ENABLE(corefoundation, [ --enable-corefoundation use CoreFoundation API [--enable-corefoundation]], [tcl_corefoundation=$enableval], [tcl_corefoundation=yes]) AC_MSG_RESULT([$tcl_corefoundation]) if test $tcl_corefoundation = yes; then AC_CACHE_CHECK([for CoreFoundation.framework], tcl_cv_lib_corefoundation, [ hold_libs=$LIBS if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do # On Tiger there is no 64-bit CF, so remove 64-bit archs # from CFLAGS et al. while testing for presence of CF. # 64-bit CF is disabled in tclUnixPort.h if necessary. eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"' done; fi LIBS="$LIBS -framework CoreFoundation" AC_TRY_LINK([#include ], [CFBundleRef b = CFBundleGetMainBundle();], tcl_cv_lib_corefoundation=yes, tcl_cv_lib_corefoundation=no) if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done; fi; LIBS=$hold_libs]) if test $tcl_cv_lib_corefoundation = yes; then LIBS="$LIBS -framework CoreFoundation" AC_DEFINE(HAVE_COREFOUNDATION) else tcl_corefoundation=no fi if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then AC_CACHE_CHECK([for 64-bit CoreFoundation], tcl_cv_lib_corefoundation_64, [ for v in CFLAGS CPPFLAGS LDFLAGS; do eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' done AC_TRY_LINK([#include ], [CFBundleRef b = CFBundleGetMainBundle();], tcl_cv_lib_corefoundation_64=yes, tcl_cv_lib_corefoundation_64=no) for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done]) if test $tcl_cv_lib_corefoundation_64 = no; then AC_DEFINE(NO_COREFOUNDATION_64) fi fi fi AC_DEFINE(MAC_OSX_TCL) ;; NEXTSTEP-*) SHLIB_CFLAGS="" SHLIB_LD="cc -nostdlib -r" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadNext.o" DL_LIBS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; OS/390-*) CFLAGS_OPTIMIZE="" # Optimizer is buggy AC_DEFINE(_OE_SOCKETS) # needed in sys/socket.h ;; OSF1-1.0|OSF1-1.1|OSF1-1.2) # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 SHLIB_CFLAGS="" # Hack: make package name same as library name SHLIB_LD='ld -R -export $@:' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadOSF.o" DL_LIBS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; OSF1-1.*) # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 SHLIB_CFLAGS="-fPIC" if test "$SHARED_BUILD" = "1" ; then SHLIB_LD="ld -shared" else SHLIB_LD="ld -non_shared" fi SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; OSF1-V*) # Digital OSF/1 SHLIB_CFLAGS="" if test "$SHARED_BUILD" = "1" ; then SHLIB_LD='ld -shared -expect_unresolved "*"' else SHLIB_LD='ld -non_shared -expect_unresolved "*"' fi SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' if test "$GCC" = "yes" ; then CFLAGS="$CFLAGS -mieee" else CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee" fi # see pthread_intro(3) for pthread support on osf1, k.furukawa if test "${TCL_THREADS}" = "1" ; then CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" LIBS=`echo $LIBS | sed s/-lpthreads//` if test "$GCC" = "yes" ; then LIBS="$LIBS -lpthread -lmach -lexc" else CFLAGS="$CFLAGS -pthread" LDFLAGS="$LDFLAGS -pthread" fi fi ;; QNX-6*) # QNX RTP # This may work for all QNX, but it was only reported for v6. SHLIB_CFLAGS="-fPIC" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" # dlopen is in -lc on QNX DL_LIBS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; RISCos-*) SHLIB_CFLAGS="-G 0" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".a" DL_OBJS="tclLoadAout.o" DL_LIBS="" LDFLAGS="$LDFLAGS -Wl,-D,08000000" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ;; SCO_SV-3.2*) # Note, dlopen is available only on SCO 3.2.5 and greater. However, # this test works, since "uname -s" was non-standard in 3.2.4 and # below. if test "$GCC" = "yes" ; then SHLIB_CFLAGS="-fPIC -melf" LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" else SHLIB_CFLAGS="-Kpic -belf" LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" fi SHLIB_LD="ld -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; SINIX*5.4*) SHLIB_CFLAGS="-K PIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; SunOS-4*) SHLIB_CFLAGS="-PIC" SHLIB_LD="ld" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} # SunOS can't handle version numbers with dots in them in library # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it # requires an extra version number at the end of .so file names. # So, the library has to have a name like libtcl75.so.1.0 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' TCL_LIB_VERSIONS_OK=nodots ;; SunOS-5.[[0-6]]) # Careful to not let 5.10+ fall into this case # Note: If _REENTRANT isn't defined, then Solaris # won't define thread-safe library routines. AC_DEFINE(_REENTRANT) AC_DEFINE(_POSIX_PTHREAD_SEMANTICS) SHLIB_CFLAGS="-KPIC" # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" if test "$GCC" = "yes" ; then SHLIB_LD="$CC -shared" CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} else SHLIB_LD="/usr/ccs/bin/ld -G -z text" CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} fi ;; SunOS-5*) # Note: If _REENTRANT isn't defined, then Solaris # won't define thread-safe library routines. AC_DEFINE(_REENTRANT) AC_DEFINE(_POSIX_PTHREAD_SEMANTICS) SHLIB_CFLAGS="-KPIC" # Check to enable 64-bit flags for compiler/linker if test "$do64bit" = "yes" ; then arch=`isainfo` if test "$arch" = "sparcv9 sparc" ; then if test "$GCC" = "yes" ; then if test "`gcc -dumpversion | awk -F. '{print [$]1}'`" -lt "3" ; then AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system]) else do64bit_ok=yes CFLAGS="$CFLAGS -m64 -mcpu=v9" LDFLAGS="$LDFLAGS -m64 -mcpu=v9" SHLIB_CFLAGS="-fPIC" fi else do64bit_ok=yes if test "$do64bitVIS" = "yes" ; then CFLAGS="$CFLAGS -xarch=v9a" LDFLAGS="$LDFLAGS -xarch=v9a" else CFLAGS="$CFLAGS -xarch=v9" LDFLAGS="$LDFLAGS -xarch=v9" fi # Solaris 64 uses this as well #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64" fi elif test "$arch" = "amd64 i386" ; then if test "$GCC" = "yes" ; then AC_MSG_WARN([64bit mode not supported with GCC on $system]) else do64bit_ok=yes CFLAGS="$CFLAGS -xarch=amd64" LDFLAGS="$LDFLAGS -xarch=amd64" fi else AC_MSG_WARN([64bit mode not supported for $arch]) fi fi # Note: need the LIBS below, otherwise Tk won't find Tcl's # symbols when dynamically loaded into tclsh. SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" if test "$GCC" = "yes" ; then SHLIB_LD="$CC -shared" CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} if test "$do64bit_ok" = "yes" ; then # We need to specify -static-libgcc or we need to # add the path to the sparv9 libgcc. SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc" # for finding sparcv9 libgcc, get the regular libgcc # path, remove so name and append 'sparcv9' #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" fi else case $system in SunOS-5.[[1-9]][[0-9]]*) SHLIB_LD='${CC} -G -z text';; *) SHLIB_LD="/usr/ccs/bin/ld -G -z text";; esac CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' fi ;; ULTRIX-4.*) SHLIB_CFLAGS="-G 0" SHLIB_SUFFIX=".a" SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0" SHLIB_LD_LIBS='${LIBS}' DL_OBJS="tclLoadAout.o" DL_LIBS="" LDFLAGS="$LDFLAGS -Wl,-D,08000000" CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} if test "$GCC" != "yes" ; then CFLAGS="$CFLAGS -DHAVE_TZSET -std1" fi ;; UNIX_SV* | UnixWare-5*) SHLIB_CFLAGS="-KPIC" SHLIB_LD="cc -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="-ldl" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [ hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Bexport" AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no) LDFLAGS=$hold_ldflags]) if test $tcl_cv_ld_Bexport = yes; then LDFLAGS="$LDFLAGS -Wl,-Bexport" fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; esac if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform]) fi dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so dnl # until the end of configure, as configure's compile and link tests use dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's dnl # preprocessing tests use only CPPFLAGS. SC_CONFIG_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""]) # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic # Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop, # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need # to determine which of several header files defines the a.out file # format (a.out.h, sys/exec.h, or sys/exec_aout.h). At present, we # support only a file format that is more or less version-7-compatible. # In particular, # - a.out files must begin with `struct exec'. # - the N_TXTOFF on the `struct exec' must compute the seek address # of the text segment # - The `struct exec' must contain a_magic, a_text, a_data, a_bss # and a_entry fields. # The following compilation should succeed if and only if either sys/exec.h # or a.out.h is usable for the purpose. # # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the # `struct exec' includes a second header that contains information that # duplicates the v7 fields that are needed. if test "x$DL_OBJS" = "xtclLoadAout.o" ; then AC_CACHE_CHECK([sys/exec.h], tcl_cv_sysexec_h, [ AC_TRY_COMPILE([#include ],[ struct exec foo; unsigned long seek; int flag; #if defined(__mips) || defined(mips) seek = N_TXTOFF (foo.ex_f, foo.ex_o); #else seek = N_TXTOFF (foo); #endif flag = (foo.a_magic == OMAGIC); return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; ], tcl_cv_sysexec_h=usable, tcl_cv_sysexec_h=unusable)]) if test $tcl_cv_sysexec_h = usable; then AC_DEFINE(USE_SYS_EXEC_H) else AC_CACHE_CHECK([a.out.h], tcl_cv_aout_h, [ AC_TRY_COMPILE([#include ],[ struct exec foo; unsigned long seek; int flag; #if defined(__mips) || defined(mips) seek = N_TXTOFF (foo.ex_f, foo.ex_o); #else seek = N_TXTOFF (foo); #endif flag = (foo.a_magic == OMAGIC); return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; ], tcl_cv_aout_h=usable, tcl_cv_aout_h=unusable)]) if test $tcl_cv_aout_h = usable; then AC_DEFINE(USE_A_OUT_H) else AC_CACHE_CHECK([sys/exec_aout.h], tcl_cv_sysexecaout_h, [ AC_TRY_COMPILE([#include ],[ struct exec foo; unsigned long seek; int flag; #if defined(__mips) || defined(mips) seek = N_TXTOFF (foo.ex_f, foo.ex_o); #else seek = N_TXTOFF (foo); #endif flag = (foo.a_midmag == OMAGIC); return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry; ], tcl_cv_sysexecaout_h=usable, tcl_cv_sysexecaout_h=unusable)]) if test $tcl_cv_sysexecaout_h = usable; then AC_DEFINE(USE_SYS_EXEC_AOUT_H) else DL_OBJS="" fi fi fi fi # Step 5: disable dynamic loading if requested via a command-line switch. AC_ARG_ENABLE(load, [ --disable-load disallow dynamic loading and "load" command], [tcl_ok=$enableval], [tcl_ok=yes]) if test "$tcl_ok" = "no"; then DL_OBJS="" fi if test "x$DL_OBJS" != "x" ; then BUILD_DLTEST="\$(DLTEST_TARGETS)" else echo "Can't figure out how to do dynamic loading or shared libraries" echo "on this system." SHLIB_CFLAGS="" SHLIB_LD="" SHLIB_SUFFIX="" DL_OBJS="tclLoadNone.o" DL_LIBS="" LDFLAGS="$LDFLAGS_ORIG" CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" BUILD_DLTEST="" fi # If we're running gcc, then change the C flags for compiling shared # libraries to the right flags for gcc, instead of those for the # standard manufacturer compiler. if test "$DL_OBJS" != "tclLoadNone.o" ; then if test "$GCC" = "yes" ; then case $system in AIX-*) ;; BSD/OS*) ;; IRIX*) ;; NetBSD-*|FreeBSD-*|OpenBSD-*) ;; Darwin-*) ;; RISCos-*) ;; SCO_SV-3.2*) ;; ULTRIX-4.*) ;; *) SHLIB_CFLAGS="-fPIC" ;; esac fi fi if test "$SHARED_LIB_SUFFIX" = "" ; then SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}' fi if test "$UNSHARED_LIB_SUFFIX" = "" ; then UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a' fi if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' else LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} if test "$RANLIB" = "" ; then MAKE_LIB='$(STLIB_LD) [$]@ ${OBJS}' INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)' else MAKE_LIB='${STLIB_LD} [$]@ ${OBJS} ; ${RANLIB} [$]@' INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))' fi dnl Not at all clear what this was doing in Tcl's configure.in dnl or why it was needed was needed. In any event, this sort of dnl things needs to be done in the big loop above. dnl REMOVE THIS BLOCK LATER! (mdejong) dnl case $system in dnl BSD/OS*) dnl ;; dnl AIX-[[1-4]].*) dnl ;; dnl *) dnl SHLIB_LD_LIBS="" dnl ;; dnl esac fi # Stub lib does not depend on shared/static configuration if test "$RANLIB" = "" ; then MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS}' INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)' else MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS} ; ${RANLIB} [$]@' INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))' fi AC_SUBST(DL_LIBS) AC_SUBST(DL_OBJS) AC_SUBST(PLAT_OBJS) AC_SUBST(PLAT_SRCS) AC_SUBST(CFLAGS) AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(CFLAGS_WARNING) AC_SUBST(LDFLAGS) AC_SUBST(LDFLAGS_DEBUG) AC_SUBST(LDFLAGS_OPTIMIZE) AC_SUBST(CC_SEARCH_FLAGS) AC_SUBST(LD_SEARCH_FLAGS) AC_SUBST(STLIB_LD) AC_SUBST(SHLIB_LD) AC_SUBST(TCL_SHLIB_LD_EXTRAS) AC_SUBST(TK_SHLIB_LD_EXTRAS) AC_SUBST(SHLIB_LD_LIBS) AC_SUBST(SHLIB_CFLAGS) AC_SUBST(SHLIB_SUFFIX) AC_SUBST(MAKE_LIB) AC_SUBST(MAKE_STUB_LIB) AC_SUBST(INSTALL_LIB) AC_SUBST(INSTALL_STUB_LIB) AC_SUBST(RANLIB) ]) #-------------------------------------------------------------------- # SC_SERIAL_PORT # # Determine which interface to use to talk to the serial port. # Note that #include lines must begin in leftmost column for # some compilers to recognize them as preprocessor directives, # and some build environments have stdin not pointing at a # pseudo-terminal (usually /dev/null instead.) # # Arguments: # none # # Results: # # Defines only one of the following vars: # HAVE_SYS_MODEM_H # USE_TERMIOS # USE_TERMIO # USE_SGTTY # #-------------------------------------------------------------------- AC_DEFUN([SC_SERIAL_PORT], [ AC_CHECK_HEADERS(sys/modem.h) AC_CACHE_CHECK([termios vs. termio vs. sgtty], tcl_cv_api_serial, [ AC_TRY_RUN([ #include int main() { struct termios t; if (tcgetattr(0, &t) == 0) { cfsetospeed(&t, 0); t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no) if test $tcl_cv_api_serial = no ; then AC_TRY_RUN([ #include int main() { struct termio t; if (ioctl(0, TCGETA, &t) == 0) { t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no) fi if test $tcl_cv_api_serial = no ; then AC_TRY_RUN([ #include int main() { struct sgttyb t; if (ioctl(0, TIOCGETP, &t) == 0) { t.sg_ospeed = 0; t.sg_flags |= ODDP | EVENP | RAW; return 0; } return 1; }], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=no, tcl_cv_api_serial=no) fi if test $tcl_cv_api_serial = no ; then AC_TRY_RUN([ #include #include int main() { struct termios t; if (tcgetattr(0, &t) == 0 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { cfsetospeed(&t, 0); t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no) fi if test $tcl_cv_api_serial = no; then AC_TRY_RUN([ #include #include int main() { struct termio t; if (ioctl(0, TCGETA, &t) == 0 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB; return 0; } return 1; }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no) fi if test $tcl_cv_api_serial = no; then AC_TRY_RUN([ #include #include int main() { struct sgttyb t; if (ioctl(0, TIOCGETP, &t) == 0 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) { t.sg_ospeed = 0; t.sg_flags |= ODDP | EVENP | RAW; return 0; } return 1; }], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none) fi]) case $tcl_cv_api_serial in termios) AC_DEFINE(USE_TERMIOS);; termio) AC_DEFINE(USE_TERMIO);; sgtty) AC_DEFINE(USE_SGTTY);; esac ]) #-------------------------------------------------------------------- # SC_MISSING_POSIX_HEADERS # # Supply substitutes for missing POSIX header files. Special # notes: # - stdlib.h doesn't define strtol, strtoul, or # strtod insome versions of SunOS # - some versions of string.h don't declare procedures such # as strstr # # Arguments: # none # # Results: # # Defines some of the following vars: # NO_DIRENT_H # NO_ERRNO_H # NO_VALUES_H # HAVE_LIMITS_H or NO_LIMITS_H # NO_STDLIB_H # NO_STRING_H # NO_SYS_WAIT_H # NO_DLFCN_H # HAVE_UNISTD_H # HAVE_SYS_PARAM_H # # HAVE_STRING_H ? # #-------------------------------------------------------------------- AC_DEFUN([SC_MISSING_POSIX_HEADERS], [ AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h, [ AC_TRY_LINK([#include #include ], [ #ifndef _POSIX_SOURCE # ifdef __Lynx__ /* * Generate compilation error to make the test fail: Lynx headers * are only valid if really in the POSIX environment. */ missing_procedure(); # endif #endif DIR *d; struct dirent *entryPtr; char *p; d = opendir("foobar"); entryPtr = readdir(d); p = entryPtr->d_name; closedir(d); ], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no)]) if test $tcl_cv_dirent_h = no; then AC_DEFINE(NO_DIRENT_H) fi AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H)]) AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H)]) AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H)]) AC_CHECK_HEADER(limits.h, [AC_DEFINE(HAVE_LIMITS_H)], [AC_DEFINE(NO_LIMITS_H)]) AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0) AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0) AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0) AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0) if test $tcl_ok = 0; then AC_DEFINE(NO_STDLIB_H) fi AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0) AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0) AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0) # See also memmove check below for a place where NO_STRING_H can be # set and why. if test $tcl_ok = 0; then AC_DEFINE(NO_STRING_H) fi AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H)]) AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H)]) # OS/390 lacks sys/param.h (and doesn't need it, by chance). AC_HAVE_HEADERS(unistd.h sys/param.h) ]) #-------------------------------------------------------------------- # SC_PATH_X # # Locate the X11 header files and the X11 library archive. Try # the ac_path_x macro first, but if it doesn't find the X stuff # (e.g. because there's no xmkmf program) then check through # a list of possible directories. Under some conditions the # autoconf macro will return an include directory that contains # no include files, so double-check its result just to be safe. # # Arguments: # none # # Results: # # Sets the the following vars: # XINCLUDES # XLIBSW # #-------------------------------------------------------------------- AC_DEFUN([SC_PATH_X], [ AC_PATH_X not_really_there="" if test "$no_x" = ""; then if test "$x_includes" = ""; then AC_TRY_CPP([#include ], , not_really_there="yes") else if test ! -r $x_includes/X11/Intrinsic.h; then not_really_there="yes" fi fi fi if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then AC_MSG_CHECKING([for X11 header files]) found_xincludes="no" AC_TRY_CPP([#include ], found_xincludes="yes", found_xincludes="no") if test "$found_xincludes" = "no"; then dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include" for i in $dirs ; do if test -r $i/X11/Intrinsic.h; then AC_MSG_RESULT([$i]) XINCLUDES=" -I$i" found_xincludes="yes" break fi done fi else if test "$x_includes" != ""; then XINCLUDES="-I$x_includes" found_xincludes="yes" fi fi if test found_xincludes = "no"; then AC_MSG_RESULT([couldn't find any!]) fi if test "$no_x" = yes; then AC_MSG_CHECKING([for X11 libraries]) XLIBSW=nope dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib" for i in $dirs ; do if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then AC_MSG_RESULT([$i]) XLIBSW="-L$i -lX11" x_libraries="$i" break fi done else if test "$x_libraries" = ""; then XLIBSW=-lX11 else XLIBSW="-L$x_libraries -lX11" fi fi if test "$XLIBSW" = nope ; then AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow) fi if test "$XLIBSW" = nope ; then AC_MSG_RESULT([could not find any! Using -lX11.]) XLIBSW=-lX11 fi ]) #-------------------------------------------------------------------- # SC_BLOCKING_STYLE # # The statements below check for systems where POSIX-style # non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. # On these systems (mostly older ones), use the old BSD-style # FIONBIO approach instead. # # Arguments: # none # # Results: # # Defines some of the following vars: # HAVE_SYS_IOCTL_H # HAVE_SYS_FILIO_H # USE_FIONBIO # O_NONBLOCK # #-------------------------------------------------------------------- AC_DEFUN([SC_BLOCKING_STYLE], [ AC_CHECK_HEADERS(sys/ioctl.h) AC_CHECK_HEADERS(sys/filio.h) SC_CONFIG_SYSTEM AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O]) case $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO # code (JO, 5/31/97). OSF*) AC_DEFINE(USE_FIONBIO) AC_MSG_RESULT([FIONBIO]) ;; SunOS-4*) AC_DEFINE(USE_FIONBIO) AC_MSG_RESULT([FIONBIO]) ;; ULTRIX-4.*) AC_DEFINE(USE_FIONBIO) AC_MSG_RESULT([FIONBIO]) ;; *) AC_MSG_RESULT([O_NONBLOCK]) ;; esac ]) #-------------------------------------------------------------------- # SC_TIME_HANLDER # # Checks how the system deals with time.h, what time structures # are used on the system, and what fields the structures have. # # Arguments: # none # # Results: # # Defines some of the following vars: # USE_DELTA_FOR_TZ # HAVE_TM_GMTOFF # HAVE_TM_TZADJ # HAVE_TIMEZONE_VAR # #-------------------------------------------------------------------- AC_DEFUN([SC_TIME_HANDLER], [ AC_CHECK_HEADERS(sys/time.h) AC_HEADER_TIME AC_STRUCT_TIMEZONE AC_CHECK_FUNCS(gmtime_r localtime_r) AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj, [ AC_TRY_COMPILE([#include ], [struct tm tm; tm.tm_tzadj;], tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no)]) if test $tcl_cv_member_tm_tzadj = yes ; then AC_DEFINE(HAVE_TM_TZADJ) fi AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff, [ AC_TRY_COMPILE([#include ], [struct tm tm; tm.tm_gmtoff;], tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no)]) if test $tcl_cv_member_tm_gmtoff = yes ; then AC_DEFINE(HAVE_TM_GMTOFF) fi # # Its important to include time.h in this check, as some systems # (like convex) have timezone functions, etc. # AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [ AC_TRY_COMPILE([#include ], [extern long timezone; timezone += 1; exit (0);], tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)]) if test $tcl_cv_timezone_long = yes ; then AC_DEFINE(HAVE_TIMEZONE_VAR) else # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. # AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time, [ AC_TRY_COMPILE([#include ], [extern time_t timezone; timezone += 1; exit (0);], tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)]) if test $tcl_cv_timezone_time = yes ; then AC_DEFINE(HAVE_TIMEZONE_VAR) fi fi ]) #-------------------------------------------------------------------- # SC_BUGGY_STRTOD # # Under Solaris 2.4, strtod returns the wrong value for the # terminating character under some conditions. Check for this # and if the problem exists use a substitute procedure # "fixstrtod" (provided by Tcl) that corrects the error. # Also, on Compaq's Tru64 Unix 5.0, # strtod(" ") returns 0.0 instead of a failure to convert. # # Arguments: # none # # Results: # # Might defines some of the following vars: # strtod (=fixstrtod) # #-------------------------------------------------------------------- AC_DEFUN([SC_BUGGY_STRTOD], [ AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0) if test "$tcl_strtod" = 1; then AC_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[ AC_TRY_RUN([ extern double strtod(); int main() { char *infString="Inf", *nanString="NaN", *spaceString=" "; char *term; double value; value = strtod(infString, &term); if ((term != infString) && (term[-1] == 0)) { exit(1); } value = strtod(nanString, &term); if ((term != nanString) && (term[-1] == 0)) { exit(1); } value = strtod(spaceString, &term); if (term == (spaceString+1)) { exit(1); } exit(0); }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy, tcl_cv_strtod_buggy=buggy)]) if test "$tcl_cv_strtod_buggy" = buggy; then LIBOBJS="$LIBOBJS fixstrtod.o" AC_DEFINE(strtod, fixstrtod) fi fi ]) #-------------------------------------------------------------------- # SC_TCL_LINK_LIBS # # Search for the libraries needed to link the Tcl shell. # Things like the math library (-lm) and socket stuff (-lsocket vs. # -lnsl) are dealt with here. # # Arguments: # Requires the following vars to be set in the Makefile: # DL_LIBS # LIBS # MATH_LIBS # # Results: # # Subst's the following var: # TCL_LIBS # MATH_LIBS # # Might append to the following vars: # LIBS # # Might define the following vars: # HAVE_NET_ERRNO_H # #-------------------------------------------------------------------- AC_DEFUN([SC_TCL_LINK_LIBS], [ #-------------------------------------------------------------------- # On a few very rare systems, all of the libm.a stuff is # already in libc.a. Set compiler flags accordingly. # Also, Linux requires the "ieee" library for math to work # right (and it must appear before "-lm"). #-------------------------------------------------------------------- AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm") AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"]) #-------------------------------------------------------------------- # Interactive UNIX requires -linet instead of -lsocket, plus it # needs net/errno.h to define the socket-related error codes. #-------------------------------------------------------------------- AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"]) AC_CHECK_HEADER(net/errno.h, [AC_DEFINE(HAVE_NET_ERRNO_H)]) #-------------------------------------------------------------------- # Check for the existence of the -lsocket and -lnsl libraries. # The order here is important, so that they end up in the right # order in the command line generated by make. Here are some # special considerations: # 1. Use "connect" and "accept" to check for -lsocket, and # "gethostbyname" to check for -lnsl. # 2. Use each function name only once: can't redo a check because # autoconf caches the results of the last check and won't redo it. # 3. Use -lnsl and -lsocket only if they supply procedures that # aren't already present in the normal libraries. This is because # IRIX 5.2 has libraries, but they aren't needed and they're # bogus: they goof up name resolution if used. # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. # To get around this problem, check for both libraries together # if -lsocket doesn't work by itself. #-------------------------------------------------------------------- tcl_checkBoth=0 AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1) if test "$tcl_checkSocket" = 1; then AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt, LIBS="$LIBS -lsocket", tcl_checkBoth=1)]) fi if test "$tcl_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs]) fi AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])]) # Don't perform the eval of the libraries here because DL_LIBS # won't be set until we call SC_CONFIG_CFLAGS TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}' AC_SUBST(TCL_LIBS) AC_SUBST(MATH_LIBS) ]) #-------------------------------------------------------------------- # SC_TCL_EARLY_FLAGS # # Check for what flags are needed to be passed so the correct OS # features are available. # # Arguments: # None # # Results: # # Might define the following vars: # _ISOC99_SOURCE # _LARGEFILE64_SOURCE # _LARGEFILE_SOURCE64 # #-------------------------------------------------------------------- AC_DEFUN([SC_TCL_EARLY_FLAG],[ AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]), AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no, AC_TRY_COMPILE([[#define ]$1[ 1 ]$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no))) if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then AC_DEFINE($1) tcl_flags="$tcl_flags $1" fi ]) AC_DEFUN([SC_TCL_EARLY_FLAGS],[ AC_MSG_CHECKING([for required early compiler flags]) tcl_flags="" SC_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include ], [char *p = (char *)strtoll; char *q = (char *)strtoull;]) SC_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include ], [struct stat64 buf; int i = stat64("/", &buf);]) SC_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include ], [char *p = (char *)open64;]) if test "x${tcl_flags}" = "x" ; then AC_MSG_RESULT([none]) else AC_MSG_RESULT([${tcl_flags}]) fi ]) #-------------------------------------------------------------------- # SC_TCL_64BIT_FLAGS # # Check for what is defined in the way of 64-bit features. # # Arguments: # None # # Results: # # Might define the following vars: # TCL_WIDE_INT_IS_LONG # TCL_WIDE_INT_TYPE # HAVE_STRUCT_DIRENT64 # HAVE_STRUCT_STAT64 # HAVE_TYPE_OFF64_T # #-------------------------------------------------------------------- AC_DEFUN([SC_TCL_64BIT_FLAGS], [ AC_MSG_CHECKING([for 64-bit integer type]) AC_CACHE_VAL(tcl_cv_type_64bit,[ tcl_cv_type_64bit=none # See if the compiler knows natively about __int64 AC_TRY_COMPILE(,[__int64 value = (__int64) 0;], tcl_type_64bit=__int64, tcl_type_64bit="long long") # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... AC_TRY_COMPILE(,[switch (0) { case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ; }],tcl_cv_type_64bit=${tcl_type_64bit})]) if test "${tcl_cv_type_64bit}" = none ; then AC_DEFINE(TCL_WIDE_INT_IS_LONG) AC_MSG_RESULT([using long]) else AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit}) AC_MSG_RESULT([${tcl_cv_type_64bit}]) # Now check for auxiliary declarations AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[ AC_TRY_COMPILE([#include #include ],[struct dirent64 p;], tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)]) if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then AC_DEFINE(HAVE_STRUCT_DIRENT64) fi AC_CACHE_CHECK([for struct stat64], tcl_cv_struct_stat64,[ AC_TRY_COMPILE([#include ],[struct stat64 p; ], tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)]) if test "x${tcl_cv_struct_stat64}" = "xyes" ; then AC_DEFINE(HAVE_STRUCT_STAT64) fi AC_CHECK_FUNCS(open64 lseek64) AC_MSG_CHECKING([for off64_t]) AC_CACHE_VAL(tcl_cv_type_off64_t,[ AC_TRY_COMPILE([#include ],[off64_t offset; ], tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)]) dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the dnl functions lseek64 and open64 are defined. if test "x${tcl_cv_type_off64_t}" = "xyes" && \ test "x${ac_cv_func_lseek64}" = "xyes" && \ test "x${ac_cv_func_open64}" = "xyes" ; then AC_DEFINE(HAVE_TYPE_OFF64_T) AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi fi ]) #-------------------------------------------------------------------- # SC_TCL_GETHOSTBYADDR_R # # Check if we have MT-safe variant of gethostbyaddr(). # # Arguments: # None # # Results: # # Might define the following vars: # HAVE_GETHOSTBYADDR_R # HAVE_GETHOSTBYADDR_R_7 # HAVE_GETHOSTBYADDR_R_8 # #-------------------------------------------------------------------- AC_DEFUN([SC_TCL_GETHOSTBYADDR_R], [AC_CHECK_FUNC(gethostbyaddr_r, [ AC_CACHE_CHECK([for gethostbyaddr_r with 7 args], tcl_cv_api_gethostbyaddr_r_7, [ AC_TRY_COMPILE([ #include ], [ char *addr; int length; int type; struct hostent *result; char buffer[2048]; int buflen = 2048; int h_errnop; (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen, &h_errnop); ], tcl_cv_api_gethostbyaddr_r_7=yes, tcl_cv_api_gethostbyaddr_r_7=no)]) tcl_ok=$tcl_cv_api_gethostbyaddr_r_7 if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETHOSTBYADDR_R_7) else AC_CACHE_CHECK([for gethostbyaddr_r with 8 args], tcl_cv_api_gethostbyaddr_r_8, [ AC_TRY_COMPILE([ #include ], [ char *addr; int length; int type; struct hostent *result, *resultp; char buffer[2048]; int buflen = 2048; int h_errnop; (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen, &resultp, &h_errnop); ], tcl_cv_api_gethostbyaddr_r_8=yes, tcl_cv_api_gethostbyaddr_r_8=no)]) tcl_ok=$tcl_cv_api_gethostbyaddr_r_8 if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETHOSTBYADDR_R_8) fi fi if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETHOSTBYADDR_R) fi ])]) #-------------------------------------------------------------------- # SC_TCL_GETHOSTBYNAME_R # # Check to see what variant of gethostbyname_r() we have. # Based on David Arnold's example from the comp.programming.threads # FAQ Q213 # # Arguments: # None # # Results: # # Might define the following vars: # HAVE_GETHOSTBYADDR_R # HAVE_GETHOSTBYADDR_R_3 # HAVE_GETHOSTBYADDR_R_5 # HAVE_GETHOSTBYADDR_R_6 # #-------------------------------------------------------------------- AC_DEFUN([SC_TCL_GETHOSTBYNAME_R], [AC_CHECK_FUNC(gethostbyname_r, [ AC_CACHE_CHECK([for gethostbyname_r with 6 args], tcl_cv_api_gethostbyname_r_6, [ AC_TRY_COMPILE([ #include ], [ char *name; struct hostent *he, *res; char buffer[2048]; int buflen = 2048; int h_errnop; (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop); ], tcl_cv_api_gethostbyname_r_6=yes, tcl_cv_api_gethostbyname_r_6=no)]) tcl_ok=$tcl_cv_api_gethostbyname_r_6 if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETHOSTBYNAME_R_6) else AC_CACHE_CHECK([for gethostbyname_r with 5 args], tcl_cv_api_gethostbyname_r_5, [ AC_TRY_COMPILE([ #include ], [ char *name; struct hostent *he; char buffer[2048]; int buflen = 2048; int h_errnop; (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop); ], tcl_cv_api_gethostbyname_r_5=yes, tcl_cv_api_gethostbyname_r_5=no)]) tcl_ok=$tcl_cv_api_gethostbyname_r_5 if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETHOSTBYNAME_R_5) else AC_CACHE_CHECK([for gethostbyname_r with 3 args], tcl_cv_api_gethostbyname_r_3, [ AC_TRY_COMPILE([ #include ], [ char *name; struct hostent *he; struct hostent_data data; (void) gethostbyname_r(name, he, &data); ], tcl_cv_api_gethostbyname_r_3=yes, tcl_cv_api_gethostbyname_r_3=no)]) tcl_ok=$tcl_cv_api_gethostbyname_r_3 if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETHOSTBYNAME_R_3) fi fi fi if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETHOSTBYNAME_R) fi ])]) #-------------------------------------------------------------------- # SC_TCL_GETPWUID_R # # Check if we have MT-safe variant of getpwuid() and if yes, # which one exactly. # # Arguments: # None # # Results: # # Might define the following vars: # HAVE_GETPWUID_R # HAVE_GETPWUID_R_4 # HAVE_GETPWUID_R_5 # #-------------------------------------------------------------------- AC_DEFUN([SC_TCL_GETPWUID_R], [AC_CHECK_FUNC(getpwuid_r, [ AC_CACHE_CHECK([for getpwuid_r with 5 args], tcl_cv_api_getpwuid_r_5, [ AC_TRY_COMPILE([ #include #include ], [ uid_t uid; struct passwd pw, *pwp; char buf[512]; int buflen = 512; (void) getpwuid_r(uid, &pw, buf, buflen, &pwp); ], tcl_cv_api_getpwuid_r_5=yes, tcl_cv_api_getpwuid_r_5=no)]) tcl_ok=$tcl_cv_api_getpwuid_r_5 if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETPWUID_R_5) else AC_CACHE_CHECK([for getpwuid_r with 4 args], tcl_cv_api_getpwuid_r_4, [ AC_TRY_COMPILE([ #include #include ], [ uid_t uid; struct passwd pw; char buf[512]; int buflen = 512; (void)getpwnam_r(uid, &pw, buf, buflen); ], tcl_cv_api_getpwuid_r_4=yes, tcl_cv_api_getpwuid_r_4=no)]) tcl_ok=$tcl_cv_api_getpwuid_r_4 if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETPWUID_R_4) fi fi if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETPWUID_R) fi ])]) #-------------------------------------------------------------------- # SC_TCL_GETPWNAM_R # # Check if we have MT-safe variant of getpwnam() and if yes, # which one exactly. # # Arguments: # None # # Results: # # Might define the following vars: # HAVE_GETPWNAM_R # HAVE_GETPWNAM_R_4 # HAVE_GETPWNAM_R_5 # #-------------------------------------------------------------------- AC_DEFUN([SC_TCL_GETPWNAM_R], [AC_CHECK_FUNC(getpwnam_r, [ AC_CACHE_CHECK([for getpwnam_r with 5 args], tcl_cv_api_getpwnam_r_5, [ AC_TRY_COMPILE([ #include #include ], [ char *name; struct passwd pw, *pwp; char buf[512]; int buflen = 512; (void) getpwnam_r(name, &pw, buf, buflen, &pwp); ], tcl_cv_api_getpwnam_r_5=yes, tcl_cv_api_getpwnam_r_5=no)]) tcl_ok=$tcl_cv_api_getpwnam_r_5 if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETPWNAM_R_5) else AC_CACHE_CHECK([for getpwnam_r with 4 args], tcl_cv_api_getpwnam_r_4, [ AC_TRY_COMPILE([ #include #include ], [ char *name; struct passwd pw; char buf[512]; int buflen = 512; (void)getpwnam_r(name, &pw, buf, buflen); ], tcl_cv_api_getpwnam_r_4=yes, tcl_cv_api_getpwnam_r_4=no)]) tcl_ok=$tcl_cv_api_getpwnam_r_4 if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETPWNAM_R_4) fi fi if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETPWNAM_R) fi ])]) #-------------------------------------------------------------------- # SC_TCL_GETGRGID_R # # Check if we have MT-safe variant of getgrgid() and if yes, # which one exactly. # # Arguments: # None # # Results: # # Might define the following vars: # HAVE_GETGRGID_R # HAVE_GETGRGID_R_4 # HAVE_GETGRGID_R_5 # #-------------------------------------------------------------------- AC_DEFUN([SC_TCL_GETGRGID_R], [AC_CHECK_FUNC(getgrgid_r, [ AC_CACHE_CHECK([for getgrgid_r with 5 args], tcl_cv_api_getgrgid_r_5, [ AC_TRY_COMPILE([ #include #include ], [ gid_t gid; struct group gr, *grp; char buf[512]; int buflen = 512; (void) getgrgid_r(gid, &gr, buf, buflen, &grp); ], tcl_cv_api_getgrgid_r_5=yes, tcl_cv_api_getgrgid_r_5=no)]) tcl_ok=$tcl_cv_api_getgrgid_r_5 if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETGRGID_R_5) else AC_CACHE_CHECK([for getgrgid_r with 4 args], tcl_cv_api_getgrgid_r_4, [ AC_TRY_COMPILE([ #include #include ], [ gid_t gid; struct group gr; char buf[512]; int buflen = 512; (void)getgrgid_r(gid, &gr, buf, buflen); ], tcl_cv_api_getgrgid_r_4=yes, tcl_cv_api_getgrgid_r_4=no)]) tcl_ok=$tcl_cv_api_getgrgid_r_4 if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETGRGID_R_4) fi fi if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETGRGID_R) fi ])]) #-------------------------------------------------------------------- # SC_TCL_GETGRNAM_R # # Check if we have MT-safe variant of getgrnam() and if yes, # which one exactly. # # Arguments: # None # # Results: # # Might define the following vars: # HAVE_GETGRNAM_R # HAVE_GETGRNAM_R_4 # HAVE_GETGRNAM_R_5 # #-------------------------------------------------------------------- AC_DEFUN([SC_TCL_GETGRNAM_R], [AC_CHECK_FUNC(getgrnam_r, [ AC_CACHE_CHECK([for getgrnam_r with 5 args], tcl_cv_api_getgrnam_r_5, [ AC_TRY_COMPILE([ #include #include ], [ char *name; struct group gr, *grp; char buf[512]; int buflen = 512; (void) getgrnam_r(name, &gr, buf, buflen, &grp); ], tcl_cv_api_getgrnam_r_5=yes, tcl_cv_api_getgrnam_r_5=no)]) tcl_ok=$tcl_cv_api_getgrnam_r_5 if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETGRNAM_R_5) else AC_CACHE_CHECK([for getgrnam_r with 4 args], tcl_cv_api_getgrnam_r_4, [ AC_TRY_COMPILE([ #include #include ], [ char *name; struct group gr; char buf[512]; int buflen = 512; (void)getgrnam_r(name, &gr, buf, buflen); ], tcl_cv_api_getgrnam_r_4=yes, tcl_cv_api_getgrnam_r_4=no)]) tcl_ok=$tcl_cv_api_getgrnam_r_4 if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETGRNAM_R_4) fi fi if test "$tcl_ok" = yes; then AC_DEFINE(HAVE_GETGRNAM_R) fi ])]) #-------------------------------------------------------------------- # SC_CONFIG_COMMANDS_PRE(CMDS) # # Replacement for autoconf 2.5x AC_COMMANDS_PRE: # Commands to run right before config.status is # created. Accumulates. # # Requires presence of SC_OUTPUT_COMMANDS_PRE at the end # of configure.in (right before AC_OUTPUT). # #-------------------------------------------------------------------- AC_DEFUN([SC_CONFIG_COMMANDS_PRE], [ define([SC_OUTPUT_COMMANDS_PRE], defn([SC_OUTPUT_COMMANDS_PRE])[$1 ])]) AC_DEFUN([SC_OUTPUT_COMMANDS_PRE]) gdb-doc-7.6.2/config/bootstrap-debug.mk0000644000175000017500000000077612250770606017001 0ustar zumbizumbi# This BUILD_CONFIG option builds checks that toggling debug # information generation doesn't affect the generated object code. # It is very lightweight: in addition to not performing any additional # compilation (unlike bootstrap-debug-lean), it actually speeds up # stage2, for no debug information is generated when compiling with # the unoptimized stage1. # For more thorough testing, see bootstrap-debug-lean.mk STAGE2_CFLAGS += -gtoggle do-compare = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2 gdb-doc-7.6.2/config/mh-mingw0000644000175000017500000000064612250770606015011 0ustar zumbizumbi# Add -D__USE_MINGW_ACCESS to enable the built compiler to work on Windows # Vista (see PR33281 for details). BOOT_CFLAGS += -D__USE_MINGW_ACCESS -Wno-pedantic-ms-format CFLAGS += -D__USE_MINGW_ACCESS # Increase stack limit to a figure based on the Linux default, with 4MB added # as GCC turns out to need that much more to pass all the limits-* tests. LDFLAGS += -Wl,--stack,12582912 BOOT_LDFLAGS += -Wl,--stack,12582912 gdb-doc-7.6.2/config/inttypes_h.m40000644000175000017500000000210312250770606015761 0ustar zumbizumbi# inttypes_h.m4 serial 5 (gettext-0.12) dnl Copyright (C) 1997-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. # Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([jm_AC_HEADER_INTTYPES_H], [ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, [AC_TRY_COMPILE( [#include #include ], [uintmax_t i = (uintmax_t) -1;], jm_ac_cv_header_inttypes_h=yes, jm_ac_cv_header_inttypes_h=no)]) if test $jm_ac_cv_header_inttypes_h = yes; then AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi ]) gdb-doc-7.6.2/config/no-executables.m40000644000175000017500000000432212250770606016516 0ustar zumbizumbi# GCC_NO_EXECUTABLES # ----------------- # FIXME: The GCC team has specific needs which the current Autoconf # framework cannot solve elegantly. This macro implements a dirty # hack until Autoconf is able to provide the services its users # need. # # Several of the support libraries that are often built with GCC can't # assume the tool-chain is already capable of linking a program: the # compiler often expects to be able to link with some of such # libraries. # # In several of these libraries, workarounds have been introduced to # avoid the AC_PROG_CC_WORKS test, that would just abort their # configuration. The introduction of AC_EXEEXT, enabled either by # libtool or by CVS autoconf, have just made matters worse. # # Unlike the previous AC_NO_EXECUTABLES, this test does not # disable link tests at autoconf time, but at configure time. # This allows AC_NO_EXECUTABLES to be invoked conditionally. AC_DEFUN_ONCE([GCC_NO_EXECUTABLES], [m4_divert_push([KILL]) AC_BEFORE([$0], [_AC_COMPILER_EXEEXT]) AC_BEFORE([$0], [AC_LINK_IFELSE]) m4_define([_AC_COMPILER_EXEEXT], [AC_LANG_CONFTEST([AC_LANG_PROGRAM()]) # FIXME: Cleanup? AS_IF([AC_TRY_EVAL(ac_link)], [gcc_no_link=no], [gcc_no_link=yes]) if test x$gcc_no_link = xyes; then # Setting cross_compile will disable run tests; it will # also disable AC_CHECK_FILE but that's generally # correct if we can't link. cross_compiling=yes EXEEXT= else ]m4_defn([_AC_COMPILER_EXEEXT])dnl fi ) m4_define([AC_LINK_IFELSE], if test x$gcc_no_link = xyes; then AC_MSG_ERROR([Link tests are not allowed after [[$0]].]) fi m4_defn([AC_LINK_IFELSE])) dnl This is a shame. We have to provide a default for some link tests, dnl similar to the default for run tests. m4_define([AC_FUNC_MMAP], if test x$gcc_no_link = xyes; then if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then ac_cv_func_mmap_fixed_mapped=no fi fi if test "x${ac_cv_func_mmap_fixed_mapped}" != xno; then m4_defn([AC_FUNC_MMAP]) fi) m4_divert_pop()dnl ])# GCC_NO_EXECUTABLES # Use the strongest available test out of AC_TRY_COMPILE and AC_TRY_LINK. AC_DEFUN([GCC_TRY_COMPILE_OR_LINK], [if test x$gcc_no_link = xyes; then AC_TRY_COMPILE([$1], [$2], [$3], [$4]) else AC_TRY_LINK([$1], [$2], [$3], [$4]) fi]) gdb-doc-7.6.2/config/bootstrap-debug-ckovw.mk0000644000175000017500000000127112250770606020117 0ustar zumbizumbi# This BUILD_CONFIG option is to be used along with # bootstrap-debug-lean and bootstrap-debug-lib in a full bootstrap, to # check that all host and target files are built with -fcompare-debug. # These arrange for a simple warning to be issued if -fcompare-debug # is not given. # BOOT_CFLAGS += -fcompare-debug="-w%n-fcompare-debug not overridden" # TFLAGS += -fcompare-debug="-w%n-fcompare-debug not overridden" # GCC_COMPARE_DEBUG="-w%n-fcompare-debug not overridden"; FORCE_COMPARE_DEBUG = \ GCC_COMPARE_DEBUG=$${GCC_COMPARE_DEBUG--fcompare-debug-not-overridden}; \ export GCC_COMPARE_DEBUG; POSTSTAGE1_HOST_EXPORTS += $(FORCE_COMPARE_DEBUG) BASE_TARGET_EXPORTS += $(FORCE_COMPARE_DEBUG) gdb-doc-7.6.2/config/progtest.m40000644000175000017500000000563412250770606015456 0ustar zumbizumbi# progtest.m4 serial 3 (gettext-0.12) dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1996. # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in ifelse([$5], , $PATH, [$5]); do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) gdb-doc-7.6.2/config/isl.m40000644000175000017500000001016612250770606014372 0ustar zumbizumbi# This file is part of GCC. # # GCC 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 3, or (at your option) any later # version. # # GCC 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 GCC; see the file COPYING3. If not see # . # # Contributed by Richard Guenther # Based on cloog.m4 # ISL_INIT_FLAGS () # ------------------------- # Provide configure switches for ISL support. # Initialize isllibs/islinc according to the user input. AC_DEFUN([ISL_INIT_FLAGS], [ AC_ARG_WITH([isl-include], [AS_HELP_STRING( [--with-isl-include=PATH], [Specify directory for installed ISL include files])]) AC_ARG_WITH([isl-lib], [AS_HELP_STRING( [--with-isl-lib=PATH], [Specify the directory for the installed ISL library])]) AC_ARG_ENABLE(isl-version-check, [AS_HELP_STRING( [--disable-isl-version-check], [disable check for ISL version])], ENABLE_ISL_CHECK=$enableval, ENABLE_ISL_CHECK=yes) # Initialize isllibs and islinc. case $with_isl in no) isllibs= islinc= ;; "" | yes) ;; *) isllibs="-L$with_isl/lib" islinc="-I$with_isl/include" ;; esac if test "x${with_isl_include}" != x ; then islinc="-I$with_isl_include" fi if test "x${with_isl_lib}" != x; then isllibs="-L$with_isl_lib" fi dnl If no --with-isl flag was specified and there is in-tree ISL dnl source, set up flags to use that and skip any version tests dnl as we cannot run them before building ISL. if test "x${islinc}" = x && test "x${isllibs}" = x \ && test -d ${srcdir}/isl; then isllibs='-L$$r/$(HOST_SUBDIR)/isl/'"$lt_cv_objdir"' ' islinc='-I$$r/$(HOST_SUBDIR)/isl/include -I$$s/isl/include' ENABLE_ISL_CHECK=no AC_MSG_WARN([using in-tree ISL, disabling version check]) fi ] ) # ISL_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT) # ---------------------------------------------------- # Provide actions for failed ISL detection. AC_DEFUN([ISL_REQUESTED], [ AC_REQUIRE([ISL_INIT_FLAGS]) if test "x${with_isl}" = xno; then $2 elif test "x${with_isl}" != x \ || test "x${with_isl_include}" != x \ || test "x${with_isl_lib}" != x ; then $1 else $2 fi ] ) # _ISL_CHECK_CT_PROG(MAJOR, MINOR) # -------------------------------------------- # Helper for verifying ISL compile time version. m4_define([_ISL_CHECK_CT_PROG],[AC_LANG_PROGRAM( [#include #include ], [if (strncmp (isl_version (), "isl-$1.$2", strlen ("isl-$1.$2")) != 0) return 1; ])]) # ISL_CHECK_VERSION ISL_CHECK_VERSION (MAJOR, MINOR) # ---------------------------------------------------------------- # Test the found ISL to be exact of version MAJOR.MINOR and at least # REVISION. AC_DEFUN([ISL_CHECK_VERSION], [ if test "${ENABLE_ISL_CHECK}" = yes ; then _isl_saved_CFLAGS=$CFLAGS _isl_saved_LDFLAGS=$LDFLAGS _isl_saved_LIBS=$LIBS CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}" LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}" LIBS="${_isl_saved_LIBS} -lisl" AC_MSG_CHECKING([for version $1.$2 of ISL]) AC_RUN_IFELSE([_ISL_CHECK_CT_PROG($1,$2)], [gcc_cv_isl=yes], [gcc_cv_isl=no], [gcc_cv_isl=yes]) AC_MSG_RESULT([$gcc_cv_isl]) CFLAGS=$_isl_saved_CFLAGS LDFLAGS=$_isl_saved_LDFLAGS LIBS=$_isl_saved_LIBS fi ] ) # ISL_IF_FAILED (ACTION-IF-FAILED) # ---------------------------------- # Executes ACTION-IF-FAILED, if GRAPHITE was requested and # the checks failed. AC_DEFUN([ISL_IF_FAILED], [ ISL_REQUESTED([graphite_requested=yes], [graphite_requested=no]) if test "${gcc_cv_isl}" = no ; then isllibs= islinc= fi if test "${graphite_requested}" = yes \ && test "x${isllibs}" = x \ && test "x${islinc}" = x ; then $1 fi ] ) gdb-doc-7.6.2/config/extensions.m40000644000175000017500000000527412250770606016006 0ustar zumbizumbi# serial 6 -*- Autoconf -*- # Enable extensions on systems that normally disable them. # Copyright (C) 2003, 2006, 2007, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS # Autoconf. Perhaps we can remove this once we can assume Autoconf # 2.62 or later everywhere, but since CVS Autoconf mutates rapidly # enough in this area it's likely we'll need to redefine # AC_USE_SYSTEM_EXTENSIONS for quite some time. m4_version_prereq([2.62],, [ # AC_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. # Remember that #undef in AH_VERBATIM gets replaced with #define by # AC_DEFINE. The goal here is to define all known feature-enabling # macros, then, if reports of conflicts are made, disable macros that # cause problems on some platforms (such as __EXTENSIONS__). AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl AC_BEFORE([$0], [AC_RUN_IFELSE])dnl AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) if test "$MINIX" = yes; then AC_DEFINE([_POSIX_SOURCE], [1], [Define to 1 if you need to in order for `stat' and other things to work.]) AC_DEFINE([_POSIX_1_SOURCE], [2], [Define to 2 if the system does not provide POSIX.1 features except with this defined.]) AC_DEFINE([_MINIX], [1], [Define to 1 if on MINIX.]) fi AH_VERBATIM([__EXTENSIONS__], [/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif ]) AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], [ac_cv_safe_to_define___extensions__], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([ # define __EXTENSIONS__ 1 AC_INCLUDES_DEFAULT])], [ac_cv_safe_to_define___extensions__=yes], [ac_cv_safe_to_define___extensions__=no])]) test $ac_cv_safe_to_define___extensions__ = yes && AC_DEFINE([__EXTENSIONS__]) AC_DEFINE([_ALL_SOURCE]) AC_DEFINE([_GNU_SOURCE]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([_TANDEM_SOURCE]) ])# AC_USE_SYSTEM_EXTENSIONS ]) gdb-doc-7.6.2/config/po.m40000644000175000017500000002151612250770606014222 0ustar zumbizumbi# po.m4 serial 1 (gettext-0.12) dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_MKINSTALLDIRS])dnl AC_REQUIRE([AM_NLS])dnl dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. dnl Test whether we really found GNU msgfmt. if test "$GMSGFMT" != ":"; then dnl If it is no GNU msgfmt we define it as : so that the dnl Makefiles still can work. if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then : ; else GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` AC_MSG_RESULT( [found $GMSGFMT program is not GNU msgfmt; ignore it]) GMSGFMT=":" fi fi dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is no GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 && (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po fi AC_OUTPUT_COMMANDS([ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= GMOFILES= UPDATEPOFILES= DUMMYPOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it # from automake. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) gdb-doc-7.6.2/config/gc++filt.m40000644000175000017500000000211412250770606015173 0ustar zumbizumbi# gc++filt.m4 serial 1 -*- Autoconf -*- # Find an instance of GNU c++filt on PATH. dnl Copyright (C) 2010 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Rainer Orth. # GCC_PROG_GNU_CXXFILT # -------------------- # Check for GNU c++filt. # FIXME: Maybe need TARGET variant, though c++filt should be target # independent. AC_DEFUN([GCC_PROG_GNU_CXXFILT], [AC_ARG_VAR([CXXFILT], [Location of GNU c++filt. Defaults to the first GNU version of `c++filt', `gc++filt' on PATH.]) AC_CACHE_CHECK([for GNU c++filt], [ac_cv_path_CXXFILT], [AC_PATH_PROGS_FEATURE_CHECK([CXXFILT], [c++filt gc++filt], [_AC_PATH_PROG_FLAVOR_GNU([$ac_path_CXXFILT], [ac_cv_path_CXXFILT=$ac_path_CXXFILT && ac_path_CXXFILT_found=:])])]) CXXFILT=$ac_cv_path_CXXFILT ]) gdb-doc-7.6.2/config/mh-pa0000644000175000017500000000040412250770606014260 0ustar zumbizumbi# The ada virtual array implementation requires that indexing be disabled on # hosts such as hpux that use a segmented memory architecture. Both the c # and ada files need to be compiled with this option for correct operation. ADA_CFLAGS = -mdisable-indexing gdb-doc-7.6.2/config/ulonglong.m40000644000175000017500000000200012250770606015573 0ustar zumbizumbi# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40) dnl Copyright (C) 1999-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], [ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], [unsigned long long ullmax = (unsigned long long) -1; return ull << i | ull >> i | ullmax / ull | ullmax % ull;], ac_cv_type_unsigned_long_long=yes, ac_cv_type_unsigned_long_long=no)]) if test $ac_cv_type_unsigned_long_long = yes; then AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, [Define if you have the unsigned long long type.]) fi ]) gdb-doc-7.6.2/config/gxx-include-dir.m40000644000175000017500000000212212250770606016577 0ustar zumbizumbidnl Usage: TL_AC_GXX_INCLUDE_DIR dnl dnl Set $gxx_include_dir to the location of the installed C++ include dnl directory. The value depends on $gcc_version and the configuration dnl options --with-gxx-include-dir and --enable-version-specific-runtime-libs. dnl dnl If you change the default here, you'll need to change the gcc and dnl libstdc++-v3 subdirectories too. AC_DEFUN([TL_AC_GXX_INCLUDE_DIR], [ case "${with_gxx_include_dir}" in yes) AC_MSG_ERROR([--with-gxx-include-dir=[[dir]] requires a directory]) ;; no | "") case "${enable_version_specific_runtime_libs}" in yes) gxx_include_dir='$(libsubdir)/include/c++' ;; *) libstdcxx_incdir='c++/$(gcc_version)' gxx_include_dir='include/$(libstdcxx_incdir)' if test -n "$with_cross_host" && test x"$with_cross_host" != x"no"; then gxx_include_dir='${prefix}/${target_alias}/'"$gxx_include_dir" else gxx_include_dir='${prefix}/'"$gxx_include_dir" fi;; esac ;; *) gxx_include_dir=${with_gxx_include_dir} ;; esac AC_SUBST(gxx_include_dir) AC_SUBST(libstdcxx_incdir) ]) gdb-doc-7.6.2/config/lib-prefix.m40000644000175000017500000001250512250770606015643 0ustar zumbizumbi# lib-prefix.m4 serial 2 (gettext-0.12) dnl Copyright (C) 2001-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/lib" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/lib"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/lib"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) gdb-doc-7.6.2/config/stdint_h.m40000644000175000017500000000205312250770606015413 0ustar zumbizumbi# stdint_h.m4 serial 3 (gettext-0.12) dnl Copyright (C) 1997-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. # Define HAVE_STDINT_H_WITH_UINTMAX if exists, # doesn't clash with , and declares uintmax_t. AC_DEFUN([jm_AC_HEADER_STDINT_H], [ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, [AC_TRY_COMPILE( [#include #include ], [uintmax_t i = (uintmax_t) -1;], jm_ac_cv_header_stdint_h=yes, jm_ac_cv_header_stdint_h=no)]) if test $jm_ac_cv_header_stdint_h = yes; then AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, [Define if exists, doesn't clash with , and declares uintmax_t. ]) fi ]) gdb-doc-7.6.2/config/mh-pa-hpux100000644000175000017500000000042012250770606015401 0ustar zumbizumbi# The ada virtual array implementation requires that indexing be disabled on # hosts such as hpux that use a segmented memory architecture. Both the c # and ada files need to be compiled with this option for correct operation. ADA_CFLAGS = -mdisable-indexing -D_X_HPUX10 gdb-doc-7.6.2/config/nls.m40000644000175000017500000000350512250770606014376 0ustar zumbizumbi# nls.m4 serial 1 (gettext-0.12) dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) ]) AC_DEFUN([AM_MKINSTALLDIRS], [ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but $(top_srcdir). dnl Try to locate it. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then case "$ac_aux_dir" in /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;; *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;; esac fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) ]) gdb-doc-7.6.2/config/elf.m40000644000175000017500000000154512250770606014352 0ustar zumbizumbidnl Copyright (C) 2010, 2011 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paolo Bonzini. dnl usage: ACX_ELF_TARGET_IFELSE([if-elf], [if-not-elf]) AC_DEFUN([ACX_ELF_TARGET_IFELSE], [ AC_REQUIRE([AC_CANONICAL_TARGET]) target_elf=no case $target in *-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \ *-msdosdjgpp* | *-vms* | *-wince* | *-*-pe* | \ alpha*-dec-osf* | *-interix* | hppa[[12]]*-*-hpux*) target_elf=no ;; *) target_elf=yes ;; esac AS_IF([test $target_elf = yes], [$1], [$2]) ]) gdb-doc-7.6.2/config/cloog.m40000644000175000017500000001063512250770606014707 0ustar zumbizumbi# This file is part of GCC. # # GCC 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 3, or (at your option) any later # version. # # GCC 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 GCC; see the file COPYING3. If not see # . # # Contributed by Andreas Simbuerger # CLOOG_INIT_FLAGS () # ------------------------- # Provide configure switches for CLooG support. # Initialize clooglibs/clooginc according to the user input. AC_DEFUN([CLOOG_INIT_FLAGS], [ AC_ARG_WITH([cloog-include], [AS_HELP_STRING( [--with-cloog-include=PATH], [Specify directory for installed CLooG include files])]) AC_ARG_WITH([cloog-lib], [AS_HELP_STRING( [--with-cloog-lib=PATH], [Specify the directory for the installed CLooG library])]) AC_ARG_ENABLE(cloog-version-check, [AS_HELP_STRING( [--disable-cloog-version-check], [disable check for CLooG version])], ENABLE_CLOOG_CHECK=$enableval, ENABLE_CLOOG_CHECK=yes) # Initialize clooglibs and clooginc. case $with_cloog in no) clooglibs= clooginc= ;; "" | yes) ;; *) clooglibs="-L$with_cloog/lib" clooginc="-I$with_cloog/include" ;; esac if test "x${with_cloog_include}" != x ; then clooginc="-I$with_cloog_include" fi if test "x${with_cloog_lib}" != x; then clooglibs="-L$with_cloog_lib" fi dnl If no --with-cloog flag was specified and there is in-tree CLooG dnl source, set up flags to use that and skip any version tests dnl as we cannot run them reliably before building CLooG if test "x${clooginc}" = x && test "x${clooglibs}" = x \ && test -d ${srcdir}/cloog; then clooglibs='-L$$r/$(HOST_SUBDIR)/cloog/'"$lt_cv_objdir"' ' clooginc='-I$$r/$(HOST_SUBDIR)/cloog/include -I$$s/cloog/include -I'${srcdir}'/cloog/include ' ENABLE_CLOOG_CHECK=no AC_MSG_WARN([using in-tree CLooG, disabling version check]) fi clooginc="-DCLOOG_INT_GMP ${clooginc}" clooglibs="${clooglibs} -lcloog-isl ${isllibs} -lisl" ] ) # CLOOG_REQUESTED (ACTION-IF-REQUESTED, ACTION-IF-NOT) # ---------------------------------------------------- # Provide actions for failed CLooG detection. AC_DEFUN([CLOOG_REQUESTED], [ AC_REQUIRE([CLOOG_INIT_FLAGS]) if test "x${with_cloog}" = xno; then $2 elif test "x${with_cloog}" != x \ || test "x${with_cloog_include}" != x \ || test "x${with_cloog_lib}" != x ; then $1 else $2 fi ] ) # _CLOOG_CHECK_CT_PROG(MAJOR, MINOR, REVISION) # -------------------------------------------- # Helper for verifying CLooG's compile time version. m4_define([_CLOOG_CHECK_CT_PROG],[AC_LANG_PROGRAM( [#include "cloog/version.h"], [#if CLOOG_VERSION_MAJOR != $1 \ || CLOOG_VERSION_MINOR != $2 \ || CLOOG_VERSION_REVISION < $3 choke me #endif])]) # CLOOG_CHECK_VERSION CLOOG_CHECK_VERSION (MAJOR, MINOR, REVISION) # ---------------------------------------------------------------- # Test the found CLooG to be exact of version MAJOR.MINOR and at least # REVISION. AC_DEFUN([CLOOG_CHECK_VERSION], [ AC_REQUIRE([CLOOG_INIT_FLAGS]) if test "${ENABLE_CLOOG_CHECK}" = yes ; then _cloog_saved_CFLAGS=$CFLAGS _cloog_saved_LDFLAGS=$LDFLAGS CFLAGS="${_cloog_saved_CFLAGS} ${clooginc} ${islinc} ${gmpinc}" LDFLAGS="${_cloog_saved_LDFLAGS} ${clooglibs} ${isllibs} ${gmplib}" AC_MSG_CHECKING([for version $1.$2.$3 of CLooG]) AC_COMPILE_IFELSE([_CLOOG_CHECK_CT_PROG($1,$2,$3)], [gcc_cv_cloog=yes], [gcc_cv_cloog=no]) AC_MSG_RESULT([$gcc_cv_cloog]) CFLAGS=$_cloog_saved_CFLAGS LDFLAGS=$_cloog_saved_LDFLAGS fi ] ) # CLOOG_IF_FAILED (ACTION-IF-FAILED) # ---------------------------------- # Executes ACTION-IF-FAILED, if GRAPHITE was requested and # the checks failed. AC_DEFUN([CLOOG_IF_FAILED], [ CLOOG_REQUESTED([graphite_requested=yes], [graphite_requested=no]) if test "${gcc_cv_cloog}" = no ; then clooglibs= clooginc= fi if test "${graphite_requested}" = yes \ && test "x${clooglibs}" = x \ && test "x${clooginc}" = x ; then $1 fi ] ) gdb-doc-7.6.2/config/plugins.m40000644000175000017500000000036612250770606015265 0ustar zumbizumbiAC_DEFUN([AC_PLUGINS], [ AC_ARG_ENABLE([plugins], AS_HELP_STRING([--enable-plugins], [Enable support for plugins (defaults no)]), [case "${enableval}" in yes | "") plugins=yes ;; no) plugins=no ;; *) plugins=yes ;; esac], [plugins=no]) ]) gdb-doc-7.6.2/config/bootstrap-O3.mk0000644000175000017500000000006512250770606016163 0ustar zumbizumbiBOOT_CFLAGS := -O3 $(filter-out -O%, $(BOOT_CFLAGS)) gdb-doc-7.6.2/config/depstand.m40000644000175000017500000001317312250770606015406 0ustar zumbizumbi## -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # Based on depend.m4 from automake 1.9, modified for standalone use in # an environment where GNU make is required. # ZW_PROG_COMPILER_DEPENDENCIES # ----------------------------- # Variant of _AM_DEPENDENCIES which just does the dependency probe and # sets fooDEPMODE accordingly. Cache-variable compatible with # original; not side-effect compatible. As the users of this macro # may require accurate dependencies for correct builds, it does *not* # honor --disable-dependency-checking, and failure to detect a usable # method is an error. depcomp is assumed to be located in # $ac_aux_dir. # # FIXME: Should use the Autoconf 2.5x language-selection mechanism. AC_DEFUN([ZW_PROG_COMPILER_DEPENDENCIES], [ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) am_depcomp=$ac_aux_dir/depcomp AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do if test $depmode = none; then break; fi _AS_ECHO([$as_me:$LINENO: trying $depmode], AS_MESSAGE_LOG_FD) # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "include sub/conftest.Po" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. depcmd="depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" echo "| $depcmd" | sed -e 's/ */ /g' >&AS_MESSAGE_LOG_FD if env $depcmd > conftest.err 2>&1 && grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode _AS_ECHO([$as_me:$LINENO: success], AS_MESSAGE_LOG_FD) break fi fi _AS_ECHO([$as_me:$LINENO: failure, diagnostics are:], AS_MESSAGE_LOG_FD) sed -e 's/^/| /' < conftest.err >&AS_MESSAGE_LOG_FD done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) if test x${am_cv_$1_dependencies_compiler_type-none} = xnone then AC_MSG_ERROR([no usable dependency style found]) else AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) fi ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # ZW_CREATE_DEPDIR # ---------------- # As AM_SET_DEPDIR, but also create the directory at config.status time. AC_DEFUN([ZW_CREATE_DEPDIR], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_CONFIG_COMMANDS([depdir], [$SHELL $ac_aux_dir/mkinstalldirs $DEPDIR], [ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR]) ]) gdb-doc-7.6.2/config/mt-gnu0000644000175000017500000000006012250770606014463 0ustar zumbizumbiCXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE gdb-doc-7.6.2/config/enable.m40000644000175000017500000000216712250770606015033 0ustar zumbizumbidnl ---------------------------------------------------------------------- dnl This whole bit snagged from libstdc++-v3. dnl dnl GCC_ENABLE dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING) dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c) dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER) dnl dnl See docs/html/17_intro/configury.html#enable for documentation. dnl AC_DEFUN([GCC_ENABLE],[dnl m4_define([_g_switch],[--enable-$1])dnl m4_define([_g_help],[AC_HELP_STRING(_g_switch$3,[$4 @<:@default=$2@:>@])])dnl AC_ARG_ENABLE($1,_g_help, m4_bmatch([$5], [^permit ], [[ case "$enableval" in m4_bpatsubst([$5],[permit ])) ;; *) AC_MSG_ERROR(Unknown argument to enable/disable $1) ;; dnl Idea for future: generate a URL pointing to dnl "onlinedocs/configopts.html#whatever" esac ]], [^$], [[ case "$enableval" in yes|no) ;; *) AC_MSG_ERROR(Argument to enable/disable $1 must be yes or no) ;; esac ]], [[$5]]), [enable_]m4_bpatsubst([$1],-,_)[=][$2]) m4_undefine([_g_switch])dnl m4_undefine([_g_help])dnl ]) gdb-doc-7.6.2/config/mt-d30v0000644000175000017500000000027112250770606014452 0ustar zumbizumbi# Build libraries optimizing for space, not speed. # Turn off warnings about symbols named the same as registers CFLAGS_FOR_TARGET = -g -Os -Wa,-C CXXFLAGS_FOR_TARGET = -g -Os -Wa,-C gdb-doc-7.6.2/config/weakref.m40000644000175000017500000000326112250770606015225 0ustar zumbizumbi dnl Check if the target supports weak. AC_DEFUN([GCC_CHECK_ATTRIBUTE_WEAK], [ AC_CACHE_CHECK([whether the target supports weak], ac_cv_have_attribute_weak, [ weakref_m4_saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Werror" AC_TRY_COMPILE([void __attribute__((weak)) foo(void) { }], [], ac_cv_have_attribute_weak=yes, ac_cv_have_attribute_weak=no) CFLAGS="$weakref_m4_saved_CFLAGS"]) if test x"$ac_cv_have_attribute_weak" = xyes; then AC_DEFINE(HAVE_ATTRIBUTE_WEAK, 1, [Define to 1 if the target supports __attribute__((weak)).]) fi]) dnl Check whether weak refs work like the ELF ones. dnl This means that the weak reference works without having to satify dnl linkage for the item. dnl There are targets (at least Darwin) where we have fully functional dnl weakrefs at runtime, but must supply the referenced item at link time. AC_DEFUN([GCC_CHECK_ELF_STYLE_WEAKREF], [ AC_CACHE_CHECK([whether weak refs work like ELF], ac_cv_have_elf_style_weakref, [ weakref_m4_saved_CFLAGS="$CFLAGS" case "${host}" in *-apple-darwin*) CFLAGS="$CFLAGS -Wl,-undefined,dynamic_lookup" ;; *) ;; esac AC_RUN_IFELSE([AC_LANG_SOURCE([[ extern void fNotToBeFound(void) __attribute__((weak)); int main () { if (fNotToBeFound) return 1; else return 0; } ]])], ac_cv_have_elf_style_weakref=yes, ac_cv_have_elf_style_weakref=no, [ case "${host}" in *-apple-darwin[[89]]*) ac_cv_have_elf_style_weakref=no ;; *) ac_cv_have_elf_style_weakref=yes;; esac])CFLAGS="$weakref_m4_saved_CFLAGS"]) if test x"$ac_cv_have_elf_style_weakref" = xyes; then AC_DEFINE(HAVE_ELF_STYLE_WEAKREF, 1, [Define to 1 if target has a weakref that works like the ELF one.]) fi]) gdb-doc-7.6.2/config/mh-djgpp0000644000175000017500000000105212250770606014764 0ustar zumbizumbi# Shorten the target alias so when it is used to set 'libsubdir' # the name will work in both short and long filename environments. ifeq ($(findstring -pc-msdosdjgpp,$(target_alias)),-pc-msdosdjgpp) target_alias=djgpp endif # The version string must be modified to contain just one dot # because DOS filenames can only have one dot when long filenames # are not available. __version:=$(gcc_version) __version:=$(subst ., ,$(__version)) ifeq ($(words $(__version)),3) gcc_version=$(word 1,$(__version)).$(word 2,$(__version))$(word 3,$(__version)) endif gdb-doc-7.6.2/config/lib-ld.m40000644000175000017500000000676112250770606014754 0ustar zumbizumbi# lib-ld.m4 serial 2 (gettext-0.12) dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then acl_cv_prog_gnu_ld=yes else acl_cv_prog_gnu_ld=no fi]) with_gnu_ld=$acl_cv_prog_gnu_ld ]) dnl From libtool-1.4. Sets the variable LD. AC_DEFUN([AC_LIB_PROG_LD], [AC_ARG_WITH(gnu-ld, [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(acl_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) gdb-doc-7.6.2/config/uintmax_t.m40000644000175000017500000000235012250770606015607 0ustar zumbizumbi# uintmax_t.m4 serial 7 (gettext-0.12) dnl Copyright (C) 1997-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl From Paul Eggert. AC_PREREQ(2.13) # Define uintmax_t to 'unsigned long' or 'unsigned long long' # if it is not already defined in or . AC_DEFUN([jm_AC_TYPE_UINTMAX_T], [ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) AC_REQUIRE([jm_AC_HEADER_STDINT_H]) if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) test $ac_cv_type_unsigned_long_long = yes \ && ac_type='unsigned long long' \ || ac_type='unsigned long' AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, [Define to unsigned long or unsigned long long if and don't define.]) else AC_DEFINE(HAVE_UINTMAX_T, 1, [Define if you have the 'uintmax_t' type in or .]) fi ]) gdb-doc-7.6.2/config/futex.m40000644000175000017500000000354212250770606014736 0ustar zumbizumbidnl ---------------------------------------------------------------------- dnl This whole bit snagged from libgomp. dnl dnl GCC_LINUX_FUTEX dnl (SHELL-CODE_HANDLER) dnl AC_DEFUN([GCC_LINUX_FUTEX],[dnl GCC_ENABLE(linux-futex,default, ,[use the Linux futex system call], permit yes|no|default) case "$target" in *-linux*) case "$enable_linux_futex" in default) # If headers don't have gettid/futex syscalls definition, then # default to no, otherwise there will be compile time failures. # Otherwise, default to yes. If we don't detect we are # compiled/linked against NPTL and not cross-compiling, check # if programs are run by default against NPTL and if not, issue # a warning. enable_linux_futex=no AC_LINK_IFELSE( [AC_LANG_PROGRAM( [#include int lk;], [syscall (SYS_gettid); syscall (SYS_futex, &lk, 0, 0, 0);])], [save_LIBS="$LIBS" LIBS="-lpthread $LIBS" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [#ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif #include pthread_t th; void *status;], [pthread_tryjoin_np (th, &status);])],[enable_linux_futex=yes], [if test x$cross_compiling = xno; then if getconf GNU_LIBPTHREAD_VERSION 2>/dev/null \ | LC_ALL=C grep -i NPTL > /dev/null 2>/dev/null; then :; else AC_MSG_WARN([The kernel might not support futex or gettid syscalls. If so, please configure with --disable-linux-futex]) fi fi enable_linux_futex=yes]) LIBS="$save_LIBS"]) ;; yes) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [#include int lk;], [syscall (SYS_gettid); syscall (SYS_futex, &lk, 0, 0, 0);])],[], [AC_MSG_ERROR([SYS_gettid and SYS_futex required for --enable-linux-futex])]) ;; esac ;; *) enable_linux_futex=no ;; esac if test x$enable_linux_futex = xyes; then $1 fi ]) gdb-doc-7.6.2/config/mh-darwin0000644000175000017500000000054312250773211015143 0ustar zumbizumbi# The -mdynamic-no-pic ensures that the compiler executable is built without # position-independent-code -- the usual default on Darwin. This fix speeds # compiles by 3-5%. BOOT_CFLAGS += -mdynamic-no-pic # Ensure we don't try and use -pie, as it is incompatible with pch. BOOT_LDFLAGS += `case ${host} in *-*-darwin[1][1-9]*) echo -Wl,-no_pie ;; esac;` gdb-doc-7.6.2/COPYING.LIB0000644000175000017500000006131312250770606013534 0ustar zumbizumbi GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! gdb-doc-7.6.2/config.sub0000755000175000017500000010554612250773211014061 0ustar zumbizumbi#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012, 2013 Free Software Foundation, Inc. timestamp='2013-01-11' # This file 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 3 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, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gdb-doc-7.6.2/gdb/0000755000175000017500000000000012266504106012621 5ustar zumbizumbigdb-doc-7.6.2/gdb/.gitignore0000644000175000017500000000030512250773211014605 0ustar zumbizumbi/version.c /xml-builtin.c /ada-exp.c /ada-lex.c /c-exp.c /cp-name-parser.c /f-exp.c /gdb /gdbtui /go-exp.c /init.c /jit-reader.h /jv-exp.c /m2-exp.c /objc-exp.c /observer.h /observer.inc /p-exp.c gdb-doc-7.6.2/gdb/doc/0000755000175000017500000000000012266504103013363 5ustar zumbizumbigdb-doc-7.6.2/gdb/doc/psrc.sed0000644000175000017500000000074112250770607015040 0ustar zumbizumbi/font defs: ---/,/end font defs ---/c\ %-------------------- PostScript (K Berry names) font defs: --------------\ \\font\\bbf=ptmb at 10pt\ \\font\\vbbf=ptmb at 12pt\ \\font\\smrm=ptmr at 6pt\ \\font\\brm=ptmr at 10pt\ \\font\\rm=ptmr at 8pt\ \\font\\it=ptmri at 8pt\ \\font\\tt=pcrr at 8pt\ % Used only for \copyright, replacing plain TeX macro.\ \\font\\sym=psyr at 7pt\ \\def\\copyright{{\\sym\\char'323}}\ %-------------------- end font defs --------------------------------- gdb-doc-7.6.2/gdb/doc/Makefile.in0000644000175000017500000004265012250773211015440 0ustar zumbizumbi##Copyright (C) 1991-2013 Free Software Foundation, Inc. # Makefile for GDB documentation. # 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 3 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, see . srcdir = @srcdir@ VPATH = @srcdir@ prefix = @prefix@ infodir = @infodir@ datarootdir = @datarootdir@ docdir = @docdir@ pdfdir = @pdfdir@ htmldir = @htmldir@ SHELL = @SHELL@ LN_S = @LN_S@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ mkinstalldirs = $(SHELL) $(srcdir)/../../mkinstalldirs # main GDB source directory gdbdir = $(srcdir)/.. # where to find texinfo; GDB dist should include a recent one TEXIDIR=${gdbdir}/../texinfo # where to find makeinfo, preferably one designed for texinfo-2 MAKEINFO = @MAKEINFO@ MAKEINFOFLAGS = @MAKEINFOFLAGS@ MAKEINFO_EXTRA_FLAGS = @MAKEINFO_EXTRA_FLAGS@ MAKEINFO_CMD = $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS) MAKEHTML = $(MAKEINFO_CMD) --html MAKEHTMLFLAGS = # where to find texi2roff, ditto TEXI2ROFF=texi2roff # where to find texi2dvi, ditto TEXI2DVI=texi2dvi # Package version and bug-reporting URL. PKGVERSION = @PKGVERSION@ BUGURL_TEXI = @REPORT_BUGS_TEXI@ # Where is the source dir for the READLINE library doc? # Traditionally readline is in .. or . READLINE_DIR = ${gdbdir}/../readline/doc READLINE_TEXI_INCFLAG = @READLINE_TEXI_INCFLAG@ # The GDB/MI docs come from a sibling directory ../mi GDBMI_DIR = ${gdbdir}/mi SET_TEXINPUTS = \ TEXINPUTS=${TEXIDIR}:.:$(srcdir):$(READLINE_DIR):$(GDBMI_DIR):$$TEXINPUTS # Files which should be generated via 'info' and installed by 'install-info' INFO_DEPS = gdb.info gdbint.info stabs.info annotate.info # Files which should be generated via 'pdf' and installed by 'install-pdf' PDFFILES = gdb.pdf gdbint.pdf stabs.pdf refcard.pdf annotate.pdf # Files which should be generated via 'html' and installed by 'install-html' HTMLFILES = gdb/index.html gdbint/index.html stabs/index.html annotate/index.html HTMLFILES_INSTALL = gdb gdbint stabs annotate # There may be alternate predefined collections of switches to configure # the GDB manual. Normally this is not done in synch with the software # config system, since this choice tends to be independent; most people # want a doc config of `all' for a generic manual, regardless of sw config. DOC_CONFIG = all # This list of sed edits will edit the GDB reference card # for what fonts and what papersize to use. # By default (NO edits applied), the refcard uses: # - Computer Modern (CM) fonts # - US letter paper (8.5x11in) # List some of the following files for alternative fonts and paper: # a4rc.sed use A4 paper (297 x 210 mm) # psrc.sed use PostScript fonts (Karl Berry short TeX names) # lpsrc.sed use PostScript fonts (full PostScript names in TeX) # e.g. for A4, Postscript: REFEDITS = a4rc.sed psrc.sed # for A4, CM fonts: REFEDITS = a4rc.sed # for US, PS fonts: REFEDITS = psrc.sed # for default: REFEDITS = # Don Knuth's TeX formatter TEX = tex PDFTEX = pdftex # Program to generate Postscript files from DVI files. DVIPS = dvips # Main GDB manual # Note that this unconditionally includes the readline texi files, # even when --with-system-readline is used. This is harmless because # these are only used as dependencies. GDB_DOC_SOURCE_INCLUDES = \ $(srcdir)/fdl.texi \ $(srcdir)/gpl.texi \ $(srcdir)/agentexpr.texi \ $(READLINE_DIR)/rluser.texi \ $(READLINE_DIR)/hsuser.texi GDB_DOC_BUILD_INCLUDES = \ gdb-cfg.texi \ GDBvn.texi GDB_DOC_FILES = \ $(srcdir)/gdb.texinfo \ $(GDB_DOC_SOURCE_INCLUDES) \ $(GDB_DOC_BUILD_INCLUDES) # Internals Manual GDBINT_DOC_SOURCE_INCLUDES = \ $(srcdir)/fdl.texi \ $(srcdir)/observer.texi GDBINT_DOC_BUILD_INCLUDES = \ gdb-cfg.texi \ GDBvn.texi GDBINT_DOC_FILES = \ $(srcdir)/gdbint.texinfo \ $(GDBINT_DOC_SOURCE_INCLUDES) \ $(GDBINT_DOC_BUILD_INCLUDES) # Stabs manual: All files STABS_DOC_SOURCE_INCLUDES = \ $(srcdir)/fdl.texi STABS_DOC_BUILD_INCLUDES = STABS_DOC_FILES = \ $(srcdir)/stabs.texinfo \ $(STABS_DOC_SOURCE_INCLUDES) \ $(STABS_DOC_BUILD_INCLUDES) # Annotate migration document ANNOTATE_DOC_SOURCE_INCLUDES = \ $(srcdir)/fdl.texi ANNOTATE_DOC_BUILD_INCLUDES = \ gdb-cfg.texi \ GDBvn.texi ANNOTATE_DOC_FILES = \ $(srcdir)/annotate.texinfo \ $(ANNOTATE_DOC_SOURCE_INCLUDES) \ $(ANNOTATE_DOC_BUILD_INCLUDES) #### Host, target, and site specific Makefile fragments come in here. ### all: info: $(INFO_DEPS) dvi: gdb.dvi gdbint.dvi stabs.dvi refcard.dvi annotate.dvi ps: gdb.ps gdbint.ps stabs.ps refcard.ps annotate.ps html: $(HTMLFILES) pdf: $(PDFFILES) all-doc: info dvi ps # pdf diststuff: info rm -f gdb-cfg.texi GDBvn.texi install-info: $(INFO_DEPS) $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(infodir) @list='$(INFO_DEPS)'; \ for file in $$list; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ if test -f $$d/$$ifile; then \ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ else : ; fi; \ done; \ done $(POST_INSTALL) @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\ done; \ else : ; fi uninstall-info: $(PRE_UNINSTALL) @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ ii=yes; \ else ii=; fi; \ list='$(INFO_DEPS)'; \ for file in $$list; do \ test -z "$$ii" \ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ done $(NORMAL_UNINSTALL) list='$(INFO_DEPS)'; \ for file in $$list; do \ (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ done html__strip_dir = `echo $$p | sed -e 's|^.*/||'`; install-html: $(HTMLFILES) @$(NORMAL_INSTALL) test -z "$(htmldir)" || $(mkinstalldirs) "$(DESTDIR)$(htmldir)" @list='$(HTMLFILES_INSTALL)'; for p in $$list; do \ if test -f "$$p" || test -d "$$p"; then d=""; else d="$(srcdir)/"; fi; \ f=$(html__strip_dir) \ if test -d "$$d$$p"; then \ echo " $(mkinstalldirs) '$(DESTDIR)$(htmldir)/$$f'"; \ $(mkinstalldirs) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \ else \ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \ fi; \ done pdf__strip_dir = `echo $$p | sed -e 's|^.*/||'`; install-pdf: $(PDFFILES) @$(NORMAL_INSTALL) test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)" @list='$(PDFFILES)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(pdf__strip_dir) \ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \ done STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi *.pdf # Copy the object files from a particular stage into a subdirectory. stage1: force -mkdir stage1 -mv $(STAGESTUFF) stage1 stage2: force -mkdir stage2 -mv $(STAGESTUFF) stage2 stage3: force -mkdir stage3 -mv $(STAGESTUFF) stage3 against=stage2 comparison: force for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done de-stage1: force -(cd stage1 ; mv -f * ..) -rmdir stage1 de-stage2: force -(cd stage2 ; mv -f * ..) -rmdir stage2 de-stage3: force -(cd stage3 ; mv -f * ..) -rmdir stage3 # GDB QUICK REFERENCE (dvi output) refcard.dvi : refcard.tex $(REFEDITS) echo > tmp.sed for f in x $(REFEDITS) ; do \ test x$$f = xx && continue ; \ cat $(srcdir)/$$f >>tmp.sed ; \ done sed -f tmp.sed $(srcdir)/refcard.tex >sedref.tex $(SET_TEXINPUTS) $(TEX) sedref.tex mv sedref.dvi refcard.dvi rm -f sedref.log sedref.tex tmp.sed refcard.ps : refcard.dvi $(DVIPS) -t landscape -o $@ $? refcard.pdf : refcard.tex $(REFEDITS) echo > tmp.sed for f in x $(REFEDITS) ; do \ test x$$f = xx && continue ; \ cat $(srcdir)/$$f >>tmp.sed ; \ done sed -f tmp.sed $(srcdir)/refcard.tex >sedref.tex $(SET_TEXINPUTS) $(PDFTEX) sedref.tex mv sedref.pdf refcard.pdf rm -f sedref.log sedref.tex tmp.sed # File to record current GDB version number (copied from main dir version.in) GDBvn.texi : ${gdbdir}/version.in echo "@set GDBVN `sed q $(srcdir)/../version.in`" > ./GDBvn.new if [ -n "$(PKGVERSION)" ]; then \ echo "@set VERSION_PACKAGE $(PKGVERSION)" >> ./GDBvn.new; \ fi echo "@set BUGURL $(BUGURL_TEXI)" >> ./GDBvn.new if [ "$(BUGURL_TEXI)" = "@uref{http://www.gnu.org/software/gdb/bugs/}" ]; then \ echo "@set BUGURL_DEFAULT" >> ./GDBvn.new; \ fi if test -z "$(READLINE_TEXI_INCFLAG)"; then \ echo "@set SYSTEM_READLINE" >> ./GDBvn.new; \ fi mv GDBvn.new GDBvn.texi # Updated atomically .PRECIOUS: GDBvn.texi # Choose configuration for GDB manual (normally `all'; normally not tied into # `configure' script because most users prefer generic version of manual, # not one for their binary config---which may not be specifically # defined anyways). gdb-cfg.texi: ${srcdir}/${DOC_CONFIG}-cfg.texi (test "$(LN_S)" = "ln -s" && \ ln -s ${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi) || \ ln ${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi || \ cp ${srcdir}/${DOC_CONFIG}-cfg.texi gdb-cfg.texi # GDB MANUAL: texinfo source, using @set/@clear/@value/@ifset/@ifclear # If your texinfo or makeinfo don't support these, get a new texinfo release # # The nonsense with GDBvn.texi gets this to run with both Sun and GNU make. # Note that we can *generate* GDBvn.texi, but since we distribute one in the # source directory for the benefit of people who *don't* use this makefile, # VPATH will often tell make not to bother building it, because the one # in the srcdir is up to date. (if not, then make should build one here). # Clean these up before each run. Avoids a catch 22 with not being # able to re-generate these files (to fix a corruption) because these # files contain a corruption. GDB_TEX_TMPS = gdb.aux gdb.cp* gdb.fn* gdb.ky* gdb.log gdb.pg* gdb.toc \ gdb.tp* gdb.vr* # GDB MANUAL: TeX dvi file gdb.dvi: ${GDB_DOC_FILES} if [ ! -f ./GDBvn.texi ]; then \ (test "$(LN_S)" = "ln -s" && ln -s $(srcdir)/GDBvn.texi .) || \ ln $(srcdir)/GDBvn.texi . || \ cp $(srcdir)/GDBvn.texi . ; else true; fi rm -f $(GDB_TEX_TMPS) $(TEXI2DVI) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) \ $(srcdir)/gdb.texinfo gdb.ps: gdb.dvi $(DVIPS) -o $@ $? gdb.pdf: ${GDB_DOC_FILES} if [ ! -f ./GDBvn.texi ]; then \ (test "$(LN_S)" = "ln -s" && ln -s $(srcdir)/GDBvn.texi .) || \ ln $(srcdir)/GDBvn.texi . || \ cp $(srcdir)/GDBvn.texi . ; else true; fi rm -f $(GDB_TEX_TMPS) $(TEXI2DVI) --pdf $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) \ $(srcdir)/gdb.texinfo # GDB MANUAL: info file gdb.info: ${GDB_DOC_FILES} $(MAKEINFO_CMD) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) \ -o gdb.info $(srcdir)/gdb.texinfo # GDB MANUAL: roff translations # Try to use a recent texi2roff. v2 was put on prep in jan91. # If you want an index, see texi2roff doc for postprocessing # and add -i to texi2roff invocations below. # Workarounds for texi2roff-2 (probably fixed in later texi2roff's, delete # corresponding -e lines when later texi2roff's are current) # + @ifinfo's deleted explicitly due to texi2roff-2 bug w nested constructs. # + @c's deleted explicitly because texi2roff sees texinfo commands in them # + @ (that's at-BLANK) not recognized by texi2roff, turned into blank # + @alphaenumerate is ridiculously new, turned into @enumerate # texi2roff doesn't have a notion of include dirs, so we have to fake # it out for gdb manual's include files---but only if not configured # in main sourcedir. links2roff: $(GDB_DOC_SOURCE_INCLUDES) if [ ! -f gdb.texinfo ]; then \ (test "$(LN_S)" = "ln -s" && ln -s $(GDB_DOC_SOURCE_INCLUDES) .) || \ ln $(GDB_DOC_SOURCE_INCLUDES) . || \ cp $(GDB_DOC_SOURCE_INCLUDES) . ; \ fi touch links2roff # gdb manual suitable for [gtn]roff -me gdb.me: $(GDB_DOC_FILES) links2roff sed -e '/\\input texinfo/d' \ -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ -e '/^@ifinfo/,/^@end ifinfo/d' \ -e '/^@c /d' \ -e 's/{.*,,/{/' \ -e 's/@ / /g' \ -e 's/^@alphaenumerate/@enumerate/g' \ -e 's/^@end alphaenumerate/@end enumerate/g' \ $(srcdir)/gdb.texinfo | \ $(TEXI2ROFF) -me | \ sed -e 's/---/\\(em/g' \ >gdb.me # gdb manual suitable for [gtn]roff -ms gdb.ms: $(GDB_DOC_FILES) links2roff sed -e '/\\input texinfo/d' \ -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ -e '/^@ifinfo/,/^@end ifinfo/d' \ -e '/^@c /d' \ -e 's/{.*,,/{/' \ -e 's/@ / /g' \ -e 's/^@alphaenumerate/@enumerate/g' \ -e 's/^@end alphaenumerate/@end enumerate/g' \ $(srcdir)/gdb.texinfo | \ $(TEXI2ROFF) -ms | \ sed -e 's/---/\\(em/g' \ >gdb.ms # gdb manual suitable for [tn]roff -mm # '@noindent's removed due to texi2roff-2 mm bug; if yours is newer, # try leaving them in gdb.mm: $(GDB_DOC_FILES) links2roff sed -e '/\\input texinfo/d' \ -e '/@c TEXI2ROFF-KILL/,/@c END TEXI2ROFF-KILL/d' \ -e '/^@ifinfo/,/^@end ifinfo/d' \ -e '/^@c /d' \ -e 's/{.*,,/{/' \ -e '/@noindent/d' \ -e 's/@ / /g' \ -e 's/^@alphaenumerate/@enumerate/g' \ -e 's/^@end alphaenumerate/@end enumerate/g' \ $(srcdir)/gdb.texinfo | \ $(TEXI2ROFF) -mm | \ sed -e 's/---/\\(em/g' \ >gdb.mm # GDB MANUAL: HTML file gdb/index.html: ${GDB_DOC_FILES} $(MAKEHTML) $(MAKEHTMLFLAGS) $(READLINE_TEXI_INCFLAG) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo # Clean these up before each run. Avoids a catch 22 with not being # able to re-generate these files (to fix a corruption) because these # files contain a corruption. GDBINT_TEX_TMPS = gdbint.aux gdbint.cp* gdbint.fn* gdbint.ky* \ gdbint.log gdbint.pg* gdbint.toc gdbint.tp* gdbint.vr* # GDB INTERNALS MANUAL: TeX dvi file gdbint.dvi: $(GDBINT_DOC_FILES) rm -f $(GDBINT_TEX_TMPS) $(TEXI2DVI) -I $(srcdir) $(srcdir)/gdbint.texinfo gdbint.ps : gdbint.dvi $(DVIPS) -o $@ $? gdbint.pdf: $(GDBINT_DOC_FILES) rm -f $(GDBINT_TEX_TMPS) $(TEXI2DVI) --pdf -I $(srcdir) $(srcdir)/gdbint.texinfo # GDB INTERNALS MANUAL: info file gdbint.info: $(GDBINT_DOC_FILES) $(MAKEINFO_CMD) -I $(srcdir) -o gdbint.info $(srcdir)/gdbint.texinfo # GDB INTERNALS MANUAL: HTML file gdbint/index.html: $(GDBINT_DOC_FILES) $(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/gdbint.texinfo stabs.info: $(STABS_DOC_FILES) $(MAKEINFO_CMD) -I $(srcdir) -o stabs.info $(srcdir)/stabs.texinfo # STABS DOCUMENTATION: HTML file stabs/index.html: $(STABS_DOC_FILES) $(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/stabs.texinfo # Clean these up before each run. Avoids a catch 22 with not being # able to re-generate these files (to fix a corruption) because these # files contain a corruption. STABS_TEX_TMPS = stabs.aux stabs.cp* stabs.fn* stabs.ky* \ stabs.log stabs.pg* stabs.toc stabs.tp* stabs.vr* # STABS DOCUMENTATION: TeX dvi file stabs.dvi : $(STABS_DOC_FILES) rm -f $(STABS_TEX_TMPS) $(TEXI2DVI) -I $(srcdir) $(srcdir)/stabs.texinfo stabs.ps: stabs.dvi $(DVIPS) -o $@ $? stabs.pdf: $(STABS_DOC_FILES) rm -f $(STABS_TEX_TMPS) $(TEXI2DVI) --pdf -I $(srcdir) $(srcdir)/stabs.texinfo # Clean these up before each run. Avoids a catch 22 with not being # able to re-generate these files (to fix a corruption) because these # files contain a corruption. ANNOTATE_TEX_TMPS = annotate.aux annotate.cp* annotate.fn* annotate.ky* \ annotate.log annotate.pg* annotate.toc annotate.tp* annotate.vr* # ANNOTATE DOCUMENTATION: TeX dvi file annotate.dvi : $(ANNOTATE_DOC_FILES) rm -f $(ANNOTATE_TEX_TMPS) $(TEXI2DVI) -I $(srcdir) $(srcdir)/annotate.texinfo annotate.ps: annotate.dvi $(DVIPS) -o $@ $? annotate.pdf: $(ANNOTATE_DOC_FILES) rm -f $(ANNOTATE_TEX_TMPS) $(TEXI2DVI) --pdf -I $(srcdir) $(srcdir)/annotate.texinfo annotate.info: $(ANNOTATE_DOC_FILES) $(MAKEINFO_CMD) -I $(srcdir) -o annotate.info $(srcdir)/annotate.texinfo annotate/index.html: $(ANNOTATE_DOC_FILES) $(MAKEHTML) $(MAKEHTMLFLAGS) -I $(srcdir) $(srcdir)/annotate.texinfo force: Makefile: Makefile.in $(host_makefile_frag) ../config.status cd .. && $(SHELL) ./config.status doc/Makefile # The "least clean" level of cleaning. Get rid of files which are # automatically generated files that are just intermediate files, mostlyclean: rm -f gdb.mm gdb.ms gdb.me links2roff rm -f $(GDB_TEX_TMPS) rm -f $(GDBINT_TEX_TMPS) rm -f $(STABS_TEX_TMPS) rm -f $(ANNOTATE_TEX_TMPS) rm -f sedref.dvi sedref.tex tmp.sed clean: mostlyclean rm -f gdb-cfg.texi GDBvn.texi distclean: clean rm -f Makefile # GDBvn.texi, the dvi files, the info files, and the postscript files, # are all part of the distribution, so it should not be removed by # "clean" or "distclean". Use maintainer-clean to remove them. maintainer-clean realclean: distclean rm -f GDBvn.texi *.info* *.dvi *.ps *.html *.pdf install: install-info uninstall: uninstall-info gdb-doc-7.6.2/gdb/doc/gpl.texi0000644000175000017500000010537112250770607015056 0ustar zumbizumbi@ignore @c Set file name and title for man page. @setfilename gpl @settitle GNU General Public License @c man begin SEEALSO gfdl(7), fsf-funding(7). @c man end @c man begin COPYRIGHT Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/} Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @c man end @end ignore @node Copying @c man begin DESCRIPTION @appendix GNU GENERAL PUBLIC LICENSE @c The GNU General Public License. @center Version 3, 29 June 2007 @c This file is intended to be included within another document, @c hence no sectioning command or @node. @display Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/} Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @end display @heading Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program---to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. @heading TERMS AND CONDITIONS @enumerate 0 @item Definitions. ``This License'' refers to version 3 of the GNU General Public License. ``Copyright'' also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. ``The Program'' refers to any copyrightable work licensed under this License. Each licensee is addressed as ``you''. ``Licensees'' and ``recipients'' may be individuals or organizations. To ``modify'' a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a ``modified version'' of the earlier work or a work ``based on'' the earlier work. A ``covered work'' means either the unmodified Program or a work based on the Program. To ``propagate'' a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To ``convey'' a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays ``Appropriate Legal Notices'' to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. @item Source Code. The ``source code'' for a work means the preferred form of the work for making modifications to it. ``Object code'' means any non-source form of a work. A ``Standard Interface'' means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The ``System Libraries'' of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A ``Major Component'', in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The ``Corresponding Source'' for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. @item Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. @item Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. @item Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. @item Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: @enumerate a @item The work must carry prominent notices stating that you modified it, and giving a relevant date. @item The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to ``keep intact all notices''. @item You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. @item If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. @end enumerate A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an ``aggregate'' if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @item Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: @enumerate a @item Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. @item Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. @item Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. @item Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. @item Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. @end enumerate A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A ``User Product'' is either (1) a ``consumer product'', which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, ``normally used'' refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. ``Installation Information'' for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. @item Additional Terms. ``Additional permissions'' are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: @enumerate a @item Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or @item Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or @item Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or @item Limiting the use for publicity purposes of names of licensors or authors of the material; or @item Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or @item Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. @end enumerate All other non-permissive additional terms are considered ``further restrictions'' within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. @item Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. @item Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. @item Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An ``entity transaction'' is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. @item Patents. A ``contributor'' is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's ``contributor version''. A contributor's ``essential patent claims'' are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, ``control'' includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a ``patent license'' is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To ``grant'' such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. ``Knowingly relying'' means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is ``discriminatory'' if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. @item No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. @item Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. @item Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License ``or any later version'' applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. @item Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. @item Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. @item Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. @end enumerate @heading END OF TERMS AND CONDITIONS @heading How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the ``copyright'' line and a pointer to where the full notice is found. @smallexample @var{one line to give the program's name and a brief idea of what it does.} Copyright (C) @var{year} @var{name of author} 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 3 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, see @url{http://www.gnu.org/licenses/}. @end smallexample Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: @smallexample @var{program} Copyright (C) @var{year} @var{name of author} This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}. This is free software, and you are welcome to redistribute it under certain conditions; type @samp{show c} for details. @end smallexample The hypothetical commands @samp{show w} and @samp{show c} should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an ``about box''. You should also get your employer (if you work as a programmer) or school, if any, to sign a ``copyright disclaimer'' for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see @url{http://www.gnu.org/licenses/}. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}. @c man end gdb-doc-7.6.2/gdb/doc/ChangeLog0000644000175000017500000115351312250773211015147 0ustar zumbizumbi2013-04-12 Jan Kratochvil Eli Zaretskii * gdb.texinfo (Auto-loading safe path): Add quick -iex using command line below the sample output. 2013-04-02 Pedro Alves * gdb.texinfo (Debugging Output): Document "set/show debug aarch64", "set/show debug coff-pe-read" and "set/show debug mach-o". 2013-04-02 Pedro Alves * gdb.texinfo (Remote Configuration) : Add entry for "trace-buffer-size". 2013-03-28 Pedro Alves PR gdb/15294 * gdb.texinfo (List) : Adjust to document that listsize 0 means no limit, and remove mention of -1. 2013-03-11 Eli Zaretskii * gdb.texinfo (General Query Packets): Don't use colon in index entries visible to Info format. 2013-03-11 Markus Metzger * gdb.texinfo (Process Record and Replay): Document record changes. 2013-03-11 Markus Metzger * gdb.texinfo (Requirements): List qXfer:btrace:read requiring expat. (General Query Packets): Describe Qbtrace:bts, Qbtrace:off, and qXfer:btrace:read. 2013-03-09 Eli Zaretskii * gdb.texinfo (General Query Packets, Tracepoint Packets): Don't use colons in @anchor and @cindex entries. 2013-03-09 Hafiz Abid Qadeer * gdb.texinfo (QTBuffer:size): Add cindex and anchor. 2013-03-08 Stan Shebs Hafiz Abid Qadeer * gdb.texinfo (Starting and Stopping Trace Experiments): Document trace-buffer-size set and show commands. (Tracepoint Packets): Document QTBuffer:size. (General Query Packets): Document QTBuffer:size. 2013-02-21 Tom Tromey * gdb.texinfo: Remove bad @syncodeindex. (Values From Inferior, Types In Python, Inferiors In Python) (Events In Python, Threads In Python, Frames In Python, Blocks In Python, Symbols In Python, Symbol Tables In Python): Remove @tables. (Packets, General Query Packets, Tracepoint Packets) (Host I/O Packets): Use @w{} for empty @item. 2013-02-20 Siva Chandra Reddy * gdb.texinfo (Architectures In Python): Add description about the new method gdb.Architecture.disassemble. 2013-02-15 Pedro Alves Hafiz Abid Qadeer * gdb.texinfo (GDB/MI Tracepoint Commands) <-trace-status>: Document the "trace-file" field. 2013-02-07 Doug Evans * gdb.texinfo (Machine Code): Clarify argument to disassemble command. 2013-02-06 Yao Qi * gdb.texinfo (GDB/MI Async Records): Document new MI notification "=tsv-modified". Update the document of MI notification "=tsv-created". * observer.texi (GDB Observers): New observer tsv_modified. Update observer tsv_created and tsv_delete. 2013-02-05 Yufeng Zhang * gdb.texinfo (AArch64 Features): New section; document org.gnu.gdb.aarch64.core and org.gnu.gdb.aarch64.fpu. (Architectures): Add new AArch64 section to document AArch64 architecture specific commands. (ABI): Add description of the new OS ABI "Newlib" and its influence on the longjmp handling. 2013-02-03 Eldar Gaynetdinov Jan Kratochvil * gdb.texinfo (Backtrace): Added description of 'filename-display' variable in 'set/show backtrace' section. 2013-01-31 Tom Tromey * gdb.texinfo (Target Commands): Fix typo. 2013-01-23 Siva Chandra Reddy * doc/gdb.texinfo (Architectures In Python): New sub-sub-section describing the gdb.Architecture class. (Frames In Python): Add description about the new method gdb.Frame.architecture(). 2013-01-23 Doug Evans * gdb.texinfo (Index Section Format): Document .gdb_index version 8. 2013-01-21 Marc Khouzam * gdb.texinfo (GDB/MI Breakpoint Commands): Document new 'thread-groups' field when printing a breakpoint in MI. 2012-01-17 Sanjoy Das * gdb.texinfo (Using JIT Debug Info Readers): Change documentation to reflect that jit-reader-load now supports absolute file-names. 2013-01-16 Tom Tromey * gdb.texinfo (Set Catchpoints): Document "catch signal". (Signals): Likewise. 2013-01-16 Tom Tromey * gdb.texinfo (GDB/MI Breakpoint Information): Document "catch-type" field. (GDB/MI Catchpoint Commands): Add "catch-type" to examples. 2013-01-07 Tom Tromey * gdb.texinfo (Mode Options): Don't mention -epoch. (Data, Emacs): Remove obsolete comments. 2013-01-02 Tom Tromey * gdb.texinfo (GDB/MI Output Records): Update menu. (GDB/MI Breakpoint Information): New node. (GDB/MI Breakpoint Commands) <-break-info>: Link to new node. <-break-insert>: Likewise. 2012-12-31 Yao Qi * gdb.texinfo (Remote Non-Stop): Move paragraphs to ... (Packets): Move "vStopped" packet to ... (Notification Packets): ... here. Describe the components of notification. Add a table of supported notifications. Add an example on the process of he async notification. 2012-12-25 Jan Kratochvil * gdb.texinfo (GDB/MI Data Manipulation) (fullname): Make it always present. (GDB/MI File Commands) (-file-list-exec-source-files): Make the fullname output always present. 2012-12-23 Pierre Muller * gdbint.texinfo (Function prototypes): Require use of "extern" modifier for function prototypes in headers. 2012-12-19 Joel Brobecker * refcard.tex: Update copyright notice to GPL v3 or later. Update contact info. 2012-12-16 Jan Kratochvil * gdbint.texinfo (Coding Standards) (C Usage): New rule for 0 vs. NULL. 2012-12-15 Yao Qi * gdb.texinfo (Debugging Output): Document 'set debug notification' and 'show debug notification'. 2012-12-15 Yao Qi * gdb.texinfo (Listing Tracepoints): New item and example about 'installed on target' output. Add more in the example about 'installed on target'. (GDB/MI Breakpoint Commands): Doc about 'installed field. 2012-12-14 Tom Tromey * gdb.texinfo (SVR4 Process Information): Mention core files. 2012-12-12 Mircea Gherzan * gdb.texinfo (GDB/MI Catchpoint Commands): New section. 2012-12-11 Pedro Alves * gdb.texinfo: Remove all mentions of Unixware throughout. 2012-12-09 Jan Kratochvil * gdbint.texinfo (Host Definition): Remove CC_HAS_LONG_LONG. 2012-11-29 Tom Tromey * gdb.texinfo (SVR4 Process Information): Document missing "info proc" subcommands. 2012-11-29 Yao Qi PR gdb/1477. * gdb.texinfo (Print Settings): Correct the default 'demangle-style' to 'auto' instead of 'gnu'. 2012-11-26 Tom Tromey * gdb.texinfo (MiniDebugInfo): New node. (GDB Files): Update. 2012-11-16 Doug Evans * gdb.texinfo (System-wide configuration): If the system-wide init file lives in the data-directory, and --data-directory is provided, look for it there. 2012-11-15 Tom Tromey * gdb.texinfo (Signaling): Fix typo. 2012-11-13 Giuseppe Montalto * gdb.texinfo (GDB/MI Data Manipulation): Document new optional parameter "count" of -data-write-memory-bytes, and add an example. 2012-11-12 Tom Tromey * gdb.texinfo (Symbols): Document "info type-printers", "enable type-printer" and "disable type-printer". (Python API): Add new node to menu. (Type Printing API): New node. (Progspaces In Python): Document type_printers field. (Objfiles In Python): Likewise. (gdb.types) : Document. 2012-11-12 Tom Tromey * gdb.texinfo (Symbols): Document "set print type methods", "set print type typedefs", and flags to ptype and whatis. 2012-11-09 Andrew Burgess * gdb.texinfo (GDB/MI Data Manipulation): Add fullname field to the example -data-disassemble output. Extend the description of the -data-disassemble results to document all fields. Document the cli disassemble command as being related to -data-disassemble. 2012-11-09 Yao Qi PR gdb/14777. * gdb.texinfo (OS Information): Remove doc on command 'info udot'. 2012-11-08 Joel Brobecker * gdb.texinfo (Startup): Minor rewording, and clarify scope of gdb.ini warning for Windows port. 2012-11-08 Yao Qi * gdb.texinfo (Search): Add kindex for 'fo'. 2012-11-05 Tom Tromey PR python/14802: * gdb.texinfo (Functions In Python): Add example. 2012-11-03 Yao Qi * observer.texi (GDB Observers): Remove observer 'tracepoint_modified', 'tracepoint_created' and 'tracepoint_deleted'. 2012-10-26 Tom Tromey * gdb.texinfo (General Query Packets): Use @itemx for QAgent. 2012-10-25 Tom Tromey * gdb.texinfo (General Query Packets): Use @itemx. 2012-10-17 Yao Qi * observer.texi (GDB Observers): Update observer 'memory_changed'. * gdb.texinfo (GDB/MI Async Records): Document for "memory-changed" notification. 2012-10-15 Doug Evans * gdb.texinfo (Mode Options): Document -nh. Elaborate on docs for -nx. 2012-09-26 Siddhesh Poyarekar * observer.texi (memory_changed): Expand parameter LEN to ssize_t. 2012-09-21 Yao Qi Pedro Alves * gdb.texinfo (GDB/MI Async Records): Document notification 'record-started' and 'record-stopped'. * observer.texi (GDB Observers): New observer 'record-changed'. 2012-09-19 Thomas Schwinge * gdb.texinfo: Document the removal of SH's 'regs' command. 2012-09-18 Sergio Durigan Junior * gdb.texinfo (jump): Mention new alias `j' for `jump'. 2012-09-18 Yao Qi * gdb.texinfo (GDB/MI Async Records): Document new MI notifications '=tsv-created' and '=tsv-deleted'. * observer.texi (GDB Observers): New observer tsv_created and tsv_deleted. 2012-09-18 Yao Qi * observer.texi (GDB Observers): New observer 'traceframe_changed'. * gdb.texinfo (GDB/MI Async Records): Mention new MI notification '=traceframe-changed'. 2012-09-17 Yao Qi * gdb.texinfo (List): Describe the meaning of 0 and -1 in 'set listsize'. 2012-09-13 Jan Kratochvil Eli Zaretskii * gdbint.texinfo (Defining Other Architecture Features): Clarify *pcptr encoding for gdbarch_breakpoint_from_pc, bp_addr for gdbarch_push_dummy_call and bp_addr for gdbarch_push_dummy_code. 2012-08-27 Jan Kratochvil * gdb.texinfo (objfile-gdb.py file): New paragraph for .exe stripping. 2012-08-23 Khoo Yit Phang Document how to return from "python-interactive" to GDB. * gdb.texinfo (Python Commands): Update documentation. 2012-08-22 Khoo Yit Phang Add a new "python-interactive" command that starts a standard Python interactive prompt with "pi" as alias, and add "py" as an alias to "python". * gdb.texinfo (Python Commands): Document the new commands. 2012-08-22 Tom Tromey * gdbint.texinfo (Host Definition): Remove documentation for SIGWINCH_HANDLER and SIGWINCH_HANDLER_BODY. 2012-08-17 Keith Seitz PR c++/13356 * gdb.texinfo (Type and Range Checking): Remove warning. Remove spurious commas. Update text and examples for re-implementation of set/show check type. (C and C++ Type and Range Checks): Likewise. 2012-08-16 Yao Qi * gdb.texinfo (Types In Python): Mention gdb.TYPE_CODE_BITSTRING is deprecated. 2012-08-13 Doug Evans * gdb.texinfo (Convenience Vars): Update text for "show convenience" to include functions. 2012-08-10 Doug Evans * gdb.texinfo (Convenience Funs): New node. (Types In Python): Document Type.vector. 2012-08-09 Yao Qi * observer.texi: New observer command_param_changed. * gdb.texinfo (GDB/MI Async Records): Doc for '=cmd-param-changed'. 2012-08-07 Jan Kratochvil * gdbint.texinfo (Debugging GDB): In section 'Debugging @value{GDBN} with itself' change .gdbinit for gdb-gdb.gdb. Mention also gdb-gdb.py. 2012-08-07 Yao Qi Revert the folloing patch: 2012-08-06 Yao Qi * gdb.texinfo (Remote Configuration): Add kindex for 'set remote hardware-watchpoint-limit' and 'set remote hardware-breakpoint-limit'. 2012-08-06 Nathaniel Flath * gdb.texinfo (Working Directory): Added information about new default argument for 'cd' command. 2012-08-06 Yao Qi * gdb.texinfo (Remote Configuration): Add kindex for 'set remote hardware-watchpoint-limit' and 'set remote hardware-breakpoint-limit'. 2012-08-06 Yao Qi Fix PR14371. * gdb.texinfo (GDB/MI Async Records): Fix the doc for '=breakpoint-deleted'. 2012-08-02 Yao Qi * gdb.texinfo (Native): Remove node Neutrino. 2012-07-27 Yao Qi * gdb.texinfo (IPA Protocol Commands): Document new command 'close'. 2012-07-25 Tom Tromey * gdb.texinfo (Maintenance Commands): Document maint info bfds. 2012-07-20 Doug Evans * gdb.texinfo (Mode Options): Delete --use-deprecated-index-sections. (Index Files): Document how to control the use of deprecated index sections. (Index Section Format): Replace --use-deprecated-index-sections with "set use-deprecated-index-sections on". 2012-07-12 Eli Zaretskii * gdbint.texinfo: Remove @syncodeindex directives that put all the indices into a single node "Index". Instead, join function and variable indices into a single index, separate from the concept index. Requested in http://sourceware.org/ml/gdb-patches/2012-07/msg00146.html. (Top): Update the top-level menu: instead of one "Index" there are now separate entries "Concept Index" and "Function and Variable Index". (Concept Index, Function and Variable Index): New nodes. (Index): Node deleted. 2012-07-05 Hui Zhu * gdb.texinfo (Maintenance Commands): Change help for "maint agent" and "maint agent-eval". 2012-07-03 Eli Zaretskii * gdb.texinfo: Separate the index into 2 indices, cp and fn, to avoid file-name clashes between Index.html and index.html on case-insensitive filesystems. See the discussion starting in http://sourceware.org/ml/gdb-patches/2012-06/msg00457.html for the details of the problem. (Top): Update the master menu for the above. (Concept Index, Command and Variable Index): New nodes, instead of the old "Index" node that was deleted. All cross-references updated. 2012-07-02 Stan Shebs * gdb.texinfo (Dynamic Printf): Mention agent style and disconnected dprintf. (Maintenance Commands): Describe maint agent-printf. (General Query Packets): Mention BreakpointCommands feature. (Packets): Document commands extension to Z0 packet. * agentexpr.texi (Bytecode Descriptions): Document printf bytecode. 2012-07-02 Jan Kratochvil * gdb.texinfo (File Options): Change -ix and -iex commands that apply only after gdbinit files. (Startup): Move -iex and -iex commands down after gdbinit files. 2012-07-02 Jan Kratochvil * gdb.texinfo (Auto-loading safe path): Note the shell wildcard possibility. 2012-06-29 Tom Tromey * gdb.texinfo (Index Section Format): Update for version 7. 2012-06-28 Stan Shebs * gdb.texinfo (Miscellaneous GDB/MI Commands): Update -info-os example, add note about title column. 2012-06-26 Siva Chandra Reddy * gdb.texinfo (Symbol Tables In Python): Add description about the new 'last' attribute of gdb.Symtab_and line. 2012-06-26 Siva Chandra Reddy * gdb.texinfo (Symbol Tables In Python): Correct the description of the 'pc' attribute of gdb.Symtab_and_line. 2012-06-26 Doug Evans * gdb.texinfo (Debugging Output): Document debug options dwarf2-read and symtab-create. 2012-06-25 Keith Seitz * gdb.texinfo (GDB/MI Breakpoint Commands): Remove "-r" option from example. Remove "rbreak" from list of corresponding gdb commands. 2012-06-23 Doug Evans * gdb.texinfo (Index Section Format): Document version 7 format. 2012-06-22 Yao Qi * gdb.texinfo: Add missing cindex for some packets. 2012-06-20 Keith Seitz * gdb.texinfo (GDB/MI Breakpoint Commands): Re-order options for -break-insert and document -p. 2012-06-20 Yao Qi * gdb.texinfo (Inferiors In Python): Replace "gdb.read_memory" and "gdb.write_memory" with "Inferior.read_memory" and "Inferior.write_memory". 2012-06-15 Patrice Dumas (tiny change) * gdb.texinfo (Summary): Add a link to "Free Documentation". (Free Documentation): Add @node line. (Continuing and Stepping) : Use @item instead of @itemx. (Reverse Execution) : Use @item instead of @itemx. (Embedded Processors): Put the link to "PA" to its correct place, according to document structure. (Python API): Put the link to "Lazy Strings In Python" to its correct place. (Index): Use @@ in @tex block to get a literal @. * gdbint.texinfo: Fix the @subtitle line. * stabs.texinfo (Top): Put the link to "Symbol Types Index" to its correct place. 2012-06-08 Yao Qi * gdb.texinfo (In-Process Agent): Add 'In-Process Agent Protocol'. (In-Process Agent Protocol, IPA Protocol Objects) (IPA Protocol Commands): New nodes. (Tracepoint Packets): Add anchors. 2012-06-06 Thomas Schwinge * gdb.texinfo: Document the deprecation of SH's 'regs' command. 2012-06-06 Yao Qi * gdb.texinfo: Update copyright year. 2012-05-23 Stan Shebs Kwok Cheung Yeung * gdb.texinfo (Miscellaneous GDB/MI Commands): Document -info-os. 2012-05-20 Jan Kratochvil * gdb.texinfo (Separate Debug Files): New anchor debug-file-directory. Mention also --with-separate-debug-dir. (Auto-loading): Prepend $debugdir in the sample output. (Auto-loading safe path): Likewise. Mention also $debugdir for the auto-load safe-path variable. (objfile-gdb.py file): Remove the extra debug-file-directory paragraph. Mention also $debugdir for 'set auto-load scripts-directory'. 2012-05-19 Eli Zaretskii * gdb.texinfo (Continuing and Stepping, Selection, Byte Order) (MIPS Embedded, MIPS, MIPS Register packet Format) (Target Descriptions, MIPS Features): Use @acronym{MIPS} where appropriate. 2012-05-18 Sandra Loosemore Maciej W. Rozycki * gdb.texinfo (MIPS): Document "set mips compression" and "show mips compression". (MIPS Breakpoint Kinds): New subsubsection. 2012-05-18 Eli Zaretskii * gdb.texinfo (Architecture-Specific Protocol Details): Define nodes for subsections. Add @acronym mark-ups and adjust formatting. 2012-05-18 Jan Kratochvil Rename $ddir to $datadir. * gdb.texinfo (Auto-loading, Auto-loading safe path) (objfile-gdb.py file): Rename $ddir to $datadir. 2012-05-18 Tom Tromey * gdb.texinfo (Print Settings): Document 'set print symbol'. 2012-05-14 Stan Shebs * gdb.texinfo (Dynamic Printf): New subsection. 2012-05-13 Siva Chandra Reddy * gdb.texinfo (Basic Python): Add description about the function gdb.find_pc_line 2012-05-12 Jan Kratochvil Eli Zaretskii * gdb.texinfo (Separate Debug Files): Use plural form for global debugging information directory. 2012-05-11 Stan Shebs Kwok Cheung Yeung * gdb.texinfo (Operating System Auxiliary Information): Document new 'info os' subcommands. 2012-05-11 Jan Kratochvil * gdb.texinfo (Auto-loading, Init File in the Current Directory) (libthread_db.so.1 file, objfile-gdb.gdb file, objfile-gdb.py file) (dotdebug_gdb_scripts section): Add reference to 'Auto-loading safe path'. 2012-05-11 Jan Kratochvil Implement multi-component --with-auto-load-dir. * gdb.texinfo (Auto-loading): New references for 'set auto-load scripts-directory' and 'show auto-load scripts-directory'. (Auto-loading safe path): Describe the new default. Move $ddir substituation reference to 'objfile-gdb.py file'. (objfile-gdb.py file): Describe script-name alias. Change real-name to script-name. Describe new 'set auto-load scripts-directory' and 'show auto-load scripts-directory'. 2012-05-11 Jan Kratochvil Provide $ddir substitution for --with-auto-load-safe-path. * gdb.texinfo (Auto-loading): Replace /usr/local by $ddir/auto-load. (Auto-loading safe path): Likewise. Mention the default value, $ddir substitution, --with-auto-load-safe-path and --without-auto-load-safe-path. * observer.texi (gdb_datadir_changed): New. 2012-05-09 Jan Kratochvil * gdb.texinfo (Auto-loading): Wrap too long lines in @smallexample. Twice. * gdb.texinfo (Separate Debug Files, Auto-loading safe path): Replace directory separator by path separator. 2012-05-06 Jan Kratochvil * gdb.texinfo (Auto-loading safe path): Make 'directories' for 'set auto-load safe-path' optional. Mention if it is omitted. Change disabling security protection condition to "/", twice. 2012-05-03 Siva Chandra Reddy * gdb.texinfo (Symbol Tables In Python): Add documentation about the new methods global_block and static_block on gdb.Symtab objects. 2012-05-02 Siva Chandra Reddy * gdb.texinfo (Blocks In Python): Add a note saying that future improvements to GDB and its infrastructure can move symbols across blocks within a symbol table. 2012-04-29 Yao Qi * gdb.texinfo (Architectures): Remove menu entry `A29K'. (A29K): Remove. 2012-04-27 Sergio Durigan Junior Tom Tromey * gdb.texinfo (Static Probe Points): New entry, explaining SystemTap and generic static probe support on GDB. 2012-04-25 Doug Evans * gdb.texinfo (Go): Fix thinko. * gdb.texinfo (Supported Languages): Add Go. (Go): New node. 2012-04-25 Yao Qi * gdbint.texinfo (Testsuite): New section `Board settings'. 2012-04-23 Jan Kratochvil * gdb.texinfo (Auto-loading safe path): Remove trailing [@dots{}]. Three times. * gdb.texinfo (Auto-loading safe path): Add trailing @dots{}. Three times. 2012-04-22 Jan Kratochvil * gdb.texinfo (Auto-loading safe path): Replace @itemize @bullet by @table @asis. Fix formatting of one item. 2012-04-18 Jan Kratochvil * gdb.texinfo (Auto-loading verbose mode): Fix smallexample typo. 2012-04-17 Jan Kratochvil New option "set debug auto-load". * gdb.texinfo (Auto-loading): New menu item for auto-load verbose mode. (auto-load verbose mode): New node. 2012-04-17 Jan Kratochvil New option "set auto-load safe-path". * gdb.texinfo (Auto-loading): Extend the "show auto-load" and "info auto-load" examples for safe-path. Put there also references for "set auto-load safe-path" and "show auto-load safe-path". New menu item for Auto-loading safe path. (Auto-loading safe path): New node. (Python Auto-loading): Update the expected output from "Missing" to "No". 2012-04-17 Jan Kratochvil auto-load: Implementation. * gdb.texinfo (Mode Options): New anchor for -nx. (Startup): New anchors for Option -init-eval-command, Home Directory Init File and Init File in the Current Directory during Startup. Mention set auto-load local-gdbinit with a reference. Change the sample code to "set auto-load python-scripts". (Threads): New anchor set libthread-db-search-path. Provide references to libthread_db.so.1 file. (Controlling GDB): New menu item for Auto-loading. (Auto-loading, Init File in the Current Directory) (libthread_db.so.1 file, objfile-gdb.gdb file): New nodes. (Python): Rename the menu item Auto-loading to Python Auto-loading. (Writing a Pretty-Printer, Objfiles In Python): Update the renamed reference. (Auto-loading): Rename to ... (Python Auto-loading): ... here. Change "set auto-load-scripts" to "set auto-load python-scripts", new anchor for it. Change "show auto-load-scripts" to "show auto-load python-scripts", new anchor for it. Change "info auto-load-scripts" to "info auto-load python-scripts", new anchor for it. Change "scripts" to "Python scripts". 2012-04-14 Anton Gorenkov PR mi/13393 * gdb.texinfo (Print Settings): Extend the description for "set print object". (GDB/MI Variable Objects): Extend the description for -var-create and -var-list-children. 2012-04-11 Siva Chandra Reddy * gdb.texinfo (Examining Data): Document the 'explore' command. 2012-03-28 Joel Brobecker * gdb.texinfo (GDB/MI Variable Objects): Document what happens to the children of a varobj and its update range when -var-update returns that the varobj's type changed. 2012-03-27 Jan Kratochvil * gdb.texinfo (Auto-loading): Move @menu to the end of @node. Create two new links fir 'objfile-gdb.py file' and 'dotdebug_gdb_scripts section'. 2012-03-27 Jan Kratochvil * gdb.texinfo (Auto-loading): Rename node reference '.debug_gdb_scripts section' to 'dotdebug_gdb_scripts section'. Twice. (.debug_gdb_scripts section): Rename the node ... (dotdebug_gdb_scripts section): ... here. (Maintenance Commands): Also rename this node reference. 2012-03-22 Siva Chandra Reddy * gdb.texinfo (Python API/Values From Inferior): Add description about the new method Value.referenced_value. Add description on how Value.dereference is different (and similar) to Value.referenced_value. 2012-03-19 Jan Kratochvil * gdb.texinfo (File Options): Describe --init-command=FILE, -ix and --init-eval-command=COMMAND, -iex. (Startup): Describe -iex and -ix. Simplify the example for "set auto-load-scripts off". 2012-03-16 Gary Benson PR breakpoints/10738 * gdb.texinfo (Inline Functions): Remove the now-unnecessary @item stating that GDB cannot set breakpoints on inlined functions. (Mode Options): Document --use-deprecated-index-sections. (Index Section Format): Document new index section version format. 2012-03-15 Tom Tromey * gdb.texinfo (Debugging C Plus Plus): Document "info vtbl". 2012-03-13 Doug Evans * gdb.texinfo (Help): Change apropos example to use "alias" instead of "reload". (Symbols): Delete docs for set/show symbol-reloading. * gdbint.texinfo (Defining Other Architecture Features): Delete SYMBOL_RELOADING_DEFAULT. * refcard.tex: Delete reference to symbol-reloading. 2012-03-07 Pedro Alves * gdb.texinfo (General Query Packets): Document new QProgramSignals packet. * gdb.texinfo (Remote configuration): Mention "program-signals-packet". 2012-03-05 Tristan Gingold * gdb.texinfo (General Query Packets): Document xfer:uib:read. 2012-03-03 Yao Qi * gdb.texinfo (In-Process Agent): New node. Document new commands. (General Query Packets): Add packet `QAgent'. 2012-03-01 Maciej W. Rozycki * gdb.texinfo (MIPS Features): Add org.gnu.gdb.mips.dsp. 2012-03-01 Scott J. Goldman * gdb.texinfo (Commands In Python): Put example python macro in COMMAND_USER category rather than COMMAND_OBSCURE. Document gdb.COMMAND_USER. (User-defined Commands): Update documentation to clarify "set/show max-user-call-depth" and "show user" don't apply to python commands. Update documentation to clarify "help user-defined" may also include python commands defined as COMMAND_USER. 2012-02-25 Jan Kratochvil * gdb.texinfo (Startup): Add option -ex description to the option -x description. 2012-02-24 Luis Machado * gdb.texinfo (Setting Breakpoints): Mention and explain the condition-evaluation breakpoint parameter. Mention condition-evaluation mode being shown in "info break". (Break Conditions): Add description for target-side conditional breakpoints. (Remote Configuration): Mention conditional-breakpoints-packet. (Packets): Add cond-expr parameter to Z0/Z1 packets and explain cond-expr. (General Query Packets): Mention new ConditionalBreakpoint feature. 2012-02-22 Tom Tromey * gdb.texinfo (Blocks In Python): Clarify block iteration. 2012-02-17 Tom Tromey PR python/10753: * gdb.texinfo (objfile-gdb.py file): Fix location of auto-load directory. 2012-02-14 Stan Shebs * gdb.texinfo (Disabling Breakpoints): Document enable count. 2012-02-13 Pedro Alves * gdb.texinfo (MIPS boards): Refer to mips-elf instead of mips-idt-ecoff. 2012-02-09 Yao Qi * gdb.texinfo (Symbols In Python): Add missing `@end defvar'. 2012-02-07 Tom Tromey * gdb.texinfo (Symbols In Python): Document Symbol.needs_frame and Symbol.value. 2012-02-07 Tom Tromey * gdb.texinfo (Symbols In Python): Document Symbol.line. 2012-01-27 Thomas Schwinge * gdb.textinfo (Packets): Move vCont paragraph to the correct place. 2012-01-24 Tom Tromey * gdb.texinfo (Set Catchpoints): Document "catch load" and "catch unload". (Files): Mention new catch commands. (GDB/MI Async Records): Likewise. 2012-01-24 Gary Benson Delete #if 0'd out code. * gdb.texinfo (Frame Info): Remove "info catch". 2012-01-20 Ulrich Weigand * gdb.texinfo (Remote Configuration): Document "set remote hostio-readlink-packet" command. (General Query Packets): Document vFile:readlink packet. 2012-01-16 Tom Tromey * gdb.texinfo (Specify Location): Document relative file name handling. 2012-01-16 Tom Tromey * gdb.texinfo (gdb.printing): Document FlagEnumerationPrinter. 2012-01-13 Jan Kratochvil Eli Zaretskii * gdbint.texinfo (Coding Standards): Require braces for two lines of code. 2012-01-11 Paul Hilfinger * gdb.texinfo (Variables): Document use of :: for non-static variables. 2012-01-05 Joel Brobecker * gdbint.texinfo (Start of New Year Procedure): Update to replace use of copyright.sh by use of copyright.py. 2012-01-02 Jan Kratochvil Remove the gdbtui binary. * all-cfg.texi (GDBTUI): Remove. * gdb.texinfo (Mode Options): Remove the GDBTUI reference. (TUI): Remove GDBTUI pindex. Remove the GDBTUI reference. * gdbint.texinfo (Testsuite): Replace `gdbtui' by `gdb -tui'. 2011-12-23 Kevin Pouget Introduce gdb.FinishBreakpoint in Python. * gdb.texinfo (Finish Breakpoints in Python): New subsection. (Python API): Add menu entry for Finish Breakpoints. 2011-12-19 Jan Kratochvil * gdbint.texinfo (Testsuite): Describe KFAIL and XFAIL in Writing tests. 2011-12-16 Doug Evans * gdb.texinfo (Server): Document -/stdio argument to gdbserver. 2011-12-16 Phil Muldoon * gdb.texinfo (Python Commands): Remove "maint set/show print stack". Add documentation for "set/show python print-stack". 2011-12-14 Pedro Alves * gdb.texinfo (Implementing a Remote Stub): Explain that you should transfer control to the stub in the startup code instead of in main. Mention the need to get past the initial breakpoint. 2011-12-06 Tom Tromey * gdb.texinfo (Set Breaks): Update for new behavior. 2011-12-02 Jan Kratochvil * gdb.texinfo (Requirements, Remote Protocol): Reference also `Library List Format for SVR4 Targets'. (General Query Packets): New item qXfer:libraries-svr4:read. (Library List Format for SVR4 Targets): New node. 2011-12-01 Tom Tromey * gdb.texinfo (Writing a Pretty-Printer): Use append method, not add. 2011-11-22 Tom Tromey * gdb.texinfo (GDB/MI Async Records): Document new *stopped reasons. 2011-11-20 Stan Shebs * gdb.texinfo (Starting and Stopping Trace Experiments): Document note-related options and variables. (Tracepoint Packets): Document packet changes. 2011-11-20 Sanjoy Das * gdb.texinfo (JIT Interface): Add documentation on writing and usind JIT debug info readers. (Custom Debug Info, Using JIT Debug Info Readers, Writing JIT Debug Info Readers): New nodes. 2011-11-18 Yao Qi * gdb.texinfo (Create and Delete Tracepoints): Mention pending tracepoint. 2011-11-15 Doug Evans * gdb.texinfo (Files): Document basenames-may-differ. 2011-11-14 Doug Evans * gdb.texinfo (Shell Commands): Document "!". 2011-11-14 Stan Shebs Kwok Cheung Yeung * gdb.texinfo (Create and Delete Tracepoints): Describe what is needed to get shorter fast tracepoints. (Tracepoint Packets): Document new qTMinFTPILen packet. 2011-11-14 Yao Qi * gdb.texinfo (Create and Delete Tracepoints): Describe changed behavior of tracepoint. (General Query Packets): New feature InstallInTrace. (Remote Configuration): Document "set remote install-in-trace-packet". 2011-11-12 Matt Rice * gdb.texinfo (C Preprocessor Macros): Remove info definitions. Add arguments to info macro. 2011-11-10 Tom Tromey * gdb.texinfo (Compilation): Don't mention -gdwarf-2. Link to GCC manual. (Variables): Don't mention -gdwarf-2. Link to Compilation node. (Macros): Add a footnote. (C): Remove paragraph about compiler options. (C Constants): Mention wide character and string constants. (C Plus Plus Expressions): Update compiler option advice. Mention using declarations. Mention ADL. Remove old HP compiler information. 2011-11-10 Tom Tromey PR c++/9257: * gdb.texinfo (Print Settings): Add an extra note about the need for a vtable. 2011-11-08 Maciej W. Rozycki * gdb.texinfo (MIPS): Remove duplicate "auto" reference from "set mips abi" documentation. 2011-11-04 Doug Evans * gdb.texinfo (Maintenance Commands): Update docs of "maint time". 2011-11-03 Tom Tromey * gdb.texinfo (Stopping): Add menu entry. (Continuing and Stepping): Restore @node. Use @section, not @subsection. 2011-11-03 Maciej W. Rozycki * gdb.texinfo (Skipping Over Functions and Files): Remove node designation. Fix "Specify Location" cross-reference. 2011-11-02 Stan Shebs * gdb.texinfo (Tracepoint Action Lists): Document collect/s. (General Query Packets): Describe tracenz feature. * agentexpr.texi (Bytecode Descriptions): Describe tracenz. 2011-10-28 Paul Koning * gdb.texinfo (gdb.types): Rename deepitems to deep_items. 2011-10-27 Kevin Pouget * gdb.texinfo ((Frames In Python): Document gdb.FRAME_UNWIND_FIRST_ERROR contant. 2011-10-26 Paul Koning * gdb.texinfo (gdb.types): Document new deepitems function. 2011-10-25 Paul Koning PR python/13327 * gdb.texinfo (Values From Inferior): Add is_lazy attribute, fetch_lazy method. 2011-10-20 Phil Muldoon PR python/12656 * gdb.texinfo (Blocks In Python): Document is_static, is_global, global_block, static_block function. 2011-10-19 Tom Tromey * gdb.texinfo (Commands In Python): Add missing "@"s. 2011-10-13 Kevin Pouget PR python/13285 Document named constants for frame unwind stop reasons * gdb.texinfo (Frames In Python): Document gdb.FRAME_UNWIND_* constants. 2011-10-12 Jan Kratochvil Fix compatibility with texinfo versions older than 4.12. * Makefile.in (MAKEINFO): Set to @MAKEINFO@. (MAKEINFOFLAGS, MAKEINFO_EXTRA_FLAGS, MAKEINFO_CMD): New. (MAKEHTMLFLAGS): Use MAKEINFO_CMD. (gdb.info, gdbint.info, stabs.info, annotate.info): Use MAKEINFO_CMD. * gdb.texinfo (Tail Call Frames): Convert @arrow{} to @click, when possible. Make the conversion conditional on HAVE_MAKEINFO_CLICK, using variables CALLSEQ1A, CALLSEQ1B, CALLSEQ2A and CALLSEQ2B. 2011-10-09 Doug Evans * gdb.texinfo (Extending GDB): Document alias command. 2011-10-09 Jan Kratochvil Support @entry in input expressions. * gdb.texinfo (Variables): Describe @entry names suffix. (Print Settings): Add anchor for `set print entry-values'. 2011-10-09 Jan Kratochvil Eli Zaretskii Display @entry parameter values (without references). * gdb.texinfo (Tail Call Frames): Add anchor. Add self tail call example. (Print Settings): New description of set print entry-values and show print entry-values. 2011-10-09 Jan Kratochvil Eli Zaretskii Recognize virtual tail call frames. * gdb.texinfo (Optimized Code): Add reference to Tail Call Frames. (Tail Call Frames): New node. (Frames In Python): Add gdb.TAILCALL_FRAME. 2011-10-07 Doug Evans * gdb.texinfo (gdb.printing): Document new `replace' arg to register_pretty_printer. 2011-10-07 Phil Muldoon PR python/12930 PR python/12802 * gdb.texinfo (Breakpoints In Python): Clarify behavior in the stop method. 2011-10-07 Ulrich Weigand * gdb.texinfo (Starting your Program): "set disable-randomization" is no longer Linux-specific. (Remote Configuration): Document "set remote disable-randomization-packet". (General Query Packets): Document "QDisableRandomization" packet and add it to "qSupported" list. 2011-10-07 Kevin Pouget Allow Python notification of new object-file loadings. * gdb.texinfo (Events In Python): Document `gdb.NewObjFileEvent' event type. 2011-10-04 Kevin Pouget PR python/12691: Add the inferior to Python exited event * gdb.texinfo (Events In Python): Describe exited inferior attribute. 2011-10-03 Joel Brobecker * gdb.texinfo (GDB/MI Miscellaneous Commands): Minor rephasing. 2011-10-03 Joel Brobecker * gdb.texinfo (GDB/MI Ada Tasking Commands): New node. (GDB/MI Miscellaneous Commands): Add `ada-task-info' as possible feature returned by the `-list-features' command. 2011-09-28 Paul Koning * gdb.texinfo (gdb.Type): Document field access by dictionary key syntax. 2011-09-28 Yao Qi * gdb.texinfo (Files): Update options for `add-symbol-file'. Add one space after option `-s'. Remove @r{} markup. 2011-09-27 Stan Shebs * gdb.texinfo (Tracepoint Action Lists): Document $_ret. 2011-09-16 Hui Zhu * gdb.texinfo (Tracepoint Restrictions): Change *$esp@300 to *(unsigned char *)$esp@300. 2011-09-15 Paul Koning * gdb.texinfo: Make style of Python functions and methods match the syntax of Python. Also put class and module names explicitly on function, member, and variable names, matching Python documentation conventions. 2011-09-15 Kevin Pouget PR Python/12692 Add gdb.selected_inferior() to Python interface. * gdb.texinfo (Inferiors In Python): Describe new gdb.selected_inferior() function. 2011-09-15 Kevin Pouget Handle multiple breakpoint hits in Python interface: * gdb.texinfo (Events In Python): New function documentation: gdb.BreakpointEvent.breakpoints. Indicate that gdb.BreakpointEvent.breakpoint is now deprecated. 2011-09-04 Joel Brobecker * gdb.texinfo: Set EDITION to "Tenth" and change ISBN. 2011-08-25 Andrew Oakley * gdb.texinfo (Types In Python): Document 'bitpos' for enums. 2011-08-17 Phil Muldoon * gdb.texinfo (Prompt): Add set/show extended-prompt documentation (Basic Python): Add prompt_hook anchor. (Python modules): Reword module text to reflect multiple modules. (gdb.prompt): Document gdb.prompt module. 2011-08-14 Yao Qi * gdb.texinfo (General Query Packets): Document qXfer:fdpic:read packet. 2011-08-14 Yao Qi * gdb.texinfo (Standard Target Features): Document C6x features. (TIC6x Features): New node. 2011-08-12 Doug Evans * gdb.texinfo (Symbols In Python): Document symbol.type. 2011-08-09 Phil Muldoon * gdb.texinfo (Python): Document command and function auto-loading. 2011-07-26 Jan Kratochvil Eli Zaretskii * gdb.texinfo (whatis, ptype): Highlight their differences. Describe typedefs unrolling. Extend the sample code by an inner typedef and outer typedefs unrolling. 2011-07-26 Paul Pluzhnikov * gdb.texinfo (Caching Remote Data): Document {set,show} dcache size and line-size. 2011-07-21 Matt Rice PR macros/12999 * gdb.texinfo (Macros): Add info definitions and info macros commands. Update text and cindex entries for info macro command. 2011-07-21 Phil Muldoon * observer.texi (GDB Observers): Add before_prompt observer. * gdb.texinfo (Basic Python): Add documentation for prompt substitution. 2011-07-11 Phil Muldoon PR python/12438 * gdb.texinfo (Python Commands): Add deprecate note to maint set/show python print-stack. Document set/show python print-backtrace. 2011-07-05 Thiago Jung Bauermann * gdb.texinfo: Fix typos. 2011-07-01 Tom Tromey * gdb.texinfo (Debugging Output): Document set debug check-physname. 2011-06-29 Tom Tromey * gdb.texinfo (GDB/MI Miscellaneous Commands): Document breakpoint-notifications feature. 2011-06-29 Ulrich Weigand * gdb.texinfo (Target Description): Remove warning about possibly unstable format. 2011-06-03 Tom Tromey * gdb.texinfo (GDB/MI Async Records): Document 'exit-code' field. (Events In Python): Note that exit_code is optional. 2011-05-17 Pedro Alves * gdb.texinfo (Remote Protocol) : Mention vCont is required for multi-threading support. (Remote Protocol) : Mention that 'c', 's', 'C', 'S' and Hc are deprecated for multi-threading debugging. Point readers at the vCont packet. 2011-05-15 Doug Evans * gdb.texinfo (Auto-loading): Document printing of missing scripts. 2011-05-13 Doug Evans * gdb.texinfo (Threads): Document $sdir,$pdir. (Server): Document $pdir exception. * gdb.texinfo (Auto-loading): Document "info auto-load-scripts". * gdb.texinfo (Threads): Clarify default value for libthread-db-search-path. * gdb.texinfo (Completion): Update example. (Debugging Output): Delete `set/show debug lin-lwp-async'. 2011-05-12 Kwok Cheung Yeung * gdb.texinfo: Document change in the behaviour of the enable and disable GDB commands when applied to tracepoints. Document the EnableDisableTracepoints remote stub feature. Document QTEnable and QTDisable in the list of tracepoint packets. 2011-05-11 Jan Kratochvil * Makefile.in (GDB_DOC_SOURCE_INCLUDES): Rename inc-hist.texinfo to hsuser.texi. * gdb.texinfo : Rename inc-hist.texinfo inclusion and comment to hsuser.texi. Change rluser.texi name in the comment. 2011-05-10 Doug Evans * gdb.texinfo (Threads): If an empty path is provided for libthread-db-search-path it is reset to its default value. (Server): Ditto. 2011-05-09 Doug Evans * gdb.texinfo (Requirements): Fix typo. Mention --with-iconv-bin. 2011-05-06 Sergio Durigan Junior Thiago Jung Bauermann Implement support for PowerPC BookE masked watchpoints. * gdb.texinfo (Set Watchpoints): Document mask parameter. (PowerPC Embedded): Mention support of masked watchpoints. 2011-05-03 Joel Brobecker * gdb.texinfo (In Memoriam): Replace litteral uses of `GDB' with `@value{GDBN}'. 2011-05-03 Joel Brobecker * gdb.texinfo (titlepage): Remove dedication. (In Memoriam): New appendix. 2011-04-27 Jan Kratochvil Eli Zaretskii * gdb.texinfo (Index Section Format): Change the version to 5. Describe the different formula. 2011-04-24 Jan Kratochvil Eli Zaretskii * gdb.texinfo (Starting and Stopping Trace Experiments): New anchor for disconnected tracing. (Multi-Process Mode for @code{gdbserver}): Mention --multi and extended-remote relationship. Mention --once. (TCP port allocation lifecycle of @code{gdbserver}): New. 2011-04-23 Eli Zaretskii * gdb.texinfo (Server): Improve indexing. Index all optional switches to gdbserver. 2011-04-20 Tom Tromey * gdb.texinfo (Index Section Format): New node. (Top): Add new node to menu. 2011-04-20 Pedro Alves * gdb.texinfo (Maintenance Commands): Document `maint print remote-registers'. 2011-04-20 Tom Tromey * gdb.texinfo (Trace File Format): Move node later. 2011-04-19 Tom Tromey * gdbint.texinfo (Register Information Functions): Remove duplicate "the". * gdb.texinfo (Emacs): Remove duplicate "to". (GDB/MI Variable Objects): Remove duplicate "the". (General Query Packets): Likewise. 2011-04-02 Joel Brobecker * gdb.texinfo (GDB/MI Output Records): Fix menu entry for "GDB/MI Ada Exception Information" node. 2011-04-01 Joel Brobecker * gdb.texinfo (GDB/MI Ada Exception Information): Document the "exception-name" field in the *stopped async record. 2011-03-31 Thiago Jung Bauermann Sergio Durigan Junior Implement support for PowerPC BookE ranged breakpoints. * gdb.texinfo (PowerPC Embedded): Document ranged breakpoints. 2011-03-28 Tom Tromey * gdb.texinfo (Set Tracepoints): Fix typo. 2011-03-24 Tom Tromey * gdb.texinfo (Specify Location): Document `function:label' linespec. 2011-03-18 Phil Muldoon PR python/12149 * gdb.texinfo (Basic Python): Update gdb.write and flush text. 2011-03-17 Phil Muldoon * gdb.texinfo (Blocks In Python): Add is_valid method description. (Inferiors In Python): Likewise. (Threads In Python): Likewise. (Symbols In Python): Likewise. (Objfiles In Python): Likewise. (Symbol Tables In Python): Likewise. 2011-03-15 Pedro Alves * gdb.texinfo (Auto Display) : Explain that the commands accept number ranges. 2011-03-14 Phil Muldoon * gdb.texinfo (Breakpoints In Python): Add description and example of Python stop function operation. 2011-03-10 Phil Muldoon * gdb.texinfo (Parameters In Python): Document get_set_string and get_show_string methods. 2011-02-28 Jan Kratochvil * gdb.texinfo (Tracepoint Conditions): Fix missing parenthesis. * gdb.texinfo (Starting and Stopping Trace Experiments): Fix circular-trace-buffer name. 2011-02-28 Joel Brobecker * gdb.texinfo (Inferiors and Programs): Fix small error introduced in the previous change. 2011-02-27 Michael Snyder * gdb.texinfo (Inferiors and Programs): Update commands to show that they can accept multiple arguments. 2011-02-24 Joel Brobecker Revert the following patch (code patch was not approved): 2011-02-21 Hui Zhu * agentexpr.texi (bytecode descriptions): add printf. * gdb.texinfo (tracepoint action lists): add printf. 2011-02-23 Doug Evans * gdb.texinfo (Symbols In Python): Fix mention of C++, use C@t{++}. 2011-02-23 Michael Snyder * gdb.texinfo (Set Breaks): Add @dots{} to arguments of info break. (Set Watchpoints): Add @dots{} to argument of info watchpoints. (Listing Tracepoints): Add @dots{} to argument of info tracepoints. 2011-02-22 Doug Evans * gdb.texinfo (Symbols In Python): Document lookup_global_symbol. Clarify behaviour of lookup_symbol when `block' argument is omitted, add description of result, fix @defun formatting. 2011-02-21 Hui Zhu * agentexpr.texi (Bytecode Descriptions): Add printf. * gdb.texinfo (Tracepoint Action Lists): Add printf. 2011-02-18 Tom Tromey * agentexpr.texi (Bytecode Descriptions): Document pick and rot. 2011-02-14 Michael Snyder * gdb.texinfo (threads): Document argument for "info threads" cmd. Document new command "thread find". 2011-02-14 Michael Snyder * gdb.texinfo (Threads): Update example of new thread message. 2011-02-14 Pedro Alves * gdb.texinfo (Remote Configuration): Mention set/show remote traceframe-info. (Tools/Packages Optional for Building GDB): Mention that expat is used for traceframe info. (Remote Protocol) : Add "Traceframe Info Format". (General Query Packets) : Describe the qXfer:traceframe-info:read feature. (qXfer::read): Describe qXfer:traceframe-info:read. (Traceframe Info Format): New section. 2011-02-04 Pedro Alves * gdbint.texinfo (Formatting): Mention some formatting guidelines for casts and unary operators. 2011-02-04 Tom Tromey * gdb.texinfo (GDB/MI Async Records): Document that symbols-loaded is not useful. 2011-01-25 Pedro Alves * gdb.texinfo: s/value optimized out/optimized out/g 2011-01-21 Joel Brobecker * gdb.texinfo (Other Misc Settings): Rework part of the documentation of the "set interactive mode" command. 2011-01-19 Tom Tromey * gdb.texinfo (Threads): Document thread name output and `thread name' command. (Threads In Python): Document Thread.name attribute. (GDB/MI Thread Commands): Document thread attributes. 2011-01-12 Andrew Burgess * gdb.texinfo (GDB/MI Data Manipulation): Update to reflect changes in mi/mi-cmd-disas.c 2011-01-12 Tom Tromey * gdb.texinfo (Threads): Remove duplicate text. Update examples. Fix "thread apply" text. 2011-01-11 Sergio Durigan Junior Thiago Jung Bauermann Implement support for PowerPC BookE ranged watchpoints. * gdb.texinfo (PowerPC Embedded): Document ranged watchpoints and the "set powerpc exact-watchpoints" flag. 2011-01-07 Tom Tromey * gdb.texinfo (Python API): Add descriptions to @menu items. 2011-01-06 Tom Tromey * gdb.texinfo (Frames In Python): Document gdb.newest_thread. 2010-01-06 Paul Pluzhnikov * gdb.texinfo (Debugging Output): Document "set debug jit". 2011-01-06 Tom Tromey PR python/12133: * gdb.texinfo (Frames In Python): Document various frame constants. 2011-01-05 Joel Brobecker * doc/agentexpr.texi, doc/all-cfg.texi, doc/annotate.texinfo, doc/gdb.texinfo, doc/gdbint.texinfo, doc/observer.texi, doc/refcard.tex, doc/stabs.texinfo: Copyright year update. 2011-01-03 Jan Kratochvil * Makefile.in (diststuff): Remove gdb-cfg.texi and GDBvn.texi. (clean): Add GDBvn.texi. 2010-12-29 Joel Brobecker * gdb.texinfo (Ada Glitches): Remove paragraph describing the occasional case where the debugger prints an array address instead of the array itself. 2010-12-23 Pedro Alves * gdb.texinfo (Packets) : Document support for registers that were not collected. 2010-12-15 Doug Evans * gdb.texinfo (Startup): Document auto-loading of scripts during startup. (Auto-loading): Delete "maint set python auto-load on|off". Add "set auto-load-scripts on|off". 2010-12-07 Doug Evans * gdb.texinfo (Mode Options): Document -data-directory. (Data Files): Add reference to -data-directory. 2010-11-29 Doug Evans * gdb.texinfo (Pretty-Printer Introduction): Change printer-name:subprinter-name to printer-name;subprinter-name. 2010-11-29 Phil Muldoon PR python/12199 * gdb.texinfo (Breakpoints In Python): Document "delete" method. 2010-11-23 Tom Tromey * gdb.texinfo (Top): Check SYSTEM_READLINE. (Editing): Likewise. (Command History): Likewise. (TUI Keys): Likewise. (Bug Reporting): Conditionally include rluser.texi and inc-history.texinfo. * Makefile.in (READLINE_TEXI_INCFLAG): New variable. (GDB_DOC_SOURCE_INCLUDES): Add comment. (GDBvn.texi): Set SYSTEM_READLINE when appropriate. (gdb.dvi): Use READLINE_TEXI_INCFLAG. (gdb.pdf): Likewise. (gdb.info): Likewise. (gdb/index.html): Likewise. 2010-11-23 Tom Tromey * Makefile.in (Makefile): Run ../config.status. (distclean): Update. * configure: Remove. * configure.ac: Remove. 2010-11-12 Tom Tromey * gdb.texinfo (Basic Python): Update. Add xref. (Exception Handling): Document new exception classes. (Types In Python): Update. (Frames In Python): Update. 2010-11-11 Phil Muldoon * gdb.texinfo (Breakpoints In Python): Document "internal" parameter, and visible attribute. 2010-11-05 Doug Evans * gdb.texinfo (Source Path): Document "set directories". 2010-11-05 Ken Werner * gdb.texinfo: (Summary) Add mention about OpenCL C language support. (OpenCL C): New node. 2010-11-02 Doug Evans * gdb.texinfo (Pretty Printing): Expand into three sections, introduction, example, and commands. (Python API): Delete section Disabling Pretty-Printers, merge into Selecting Pretty-Printers. (Writing a Pretty-Printer): New section. Move the pretty-printer example here, and reformat to match python coding style. Add a second example using the gdb.printing module. (Python modules): Add gdb.printing. 2010-10-29 Doug Evans * gdb.texinfo (Python): Fix long line. 2010-10-20 Doug Evans * gdbint.texinfo (Misc Guidelines): Renamed from Coding. All references updated. Correct sections marked as subsections. (Coding Standards): New chapter. Move the coding standard related subsections here. Add section on Python coding standards. 2010-10-13 Doug Evans * gdb.texinfo (Python): Add "Python modules". (Types in Python): Add reference to gdb.types section. (Python modules): New node. 2010-10-11 Doug Evans * gdb.texinfo (Values From Inferior): Add reference to "Types in Python" from gdb.Value.type description. 2010-09-28 Joel Brobecker * gdb.texinfo (Ravenscar Profile): New node. 2010-09-22 Tom Tromey * gdb.texinfo (Values From Inferior): Mention Value.__init__. 2010-09-22 Eli Zaretskii * gdb.texinfo (Values From Inferior): Clarify that value.dynamic_type works only in C++ programs with RTTI. 2010-09-15 Paul Bolle * gdb.texinfo (Character Sets): Correctly reference host-charset in example. 2010-09-13 Tom Tromey * gdb.texinfo (GDB/MI Stack Manipulation) <-stack-list-frames>: Document "fullname" and "from". 2010-09-01 Marc Khouzam * gdb.texinfo (GDB/MI Miscellaneous Commands): Document new feature `reverse' output by -list-target-features. 2010-08-31 H.J. Lu * gdb.texinfo (i386 Features): Remove an extra "@item". 2010-08-30 Tom Tromey PR python/11792: * gdb.texinfo (Values From Inferior): Document dynamic_type. 2010-08-24 Daniel Jacobowitz * gdb.texinfo (ARM Features): Document org.gnu.gdb.arm.m-profile. 2010-08-23 Tom Tromey PR python/11145: * gdb.texinfo (Values From Inferior): Document dynamic_cast and reinterpret_cast methods. 2010-08-23 Tom Tromey PR python/11915: * gdb.texinfo (Types In Python): Document array method. 2010-08-18 Thiago Jung Bauermann * gdb.texinfo (PowerPC Embedded): Mention support for the DVC register. 2010-08-16 Tom Tromey * gdb.texinfo (Set Watchpoints): Document -location option. 2010-08-13 Doug Evans * gdb.texinfo (.debug_gdb_scripts section): Fix typo. 2010-08-13 Vladimir Prus * gdb.texinfo (GDB/MI Data Manipulation): Document -data-read-memory-raw and -data-write-memory-raw. 2010-08-11 Tom Tromey Phil Muldoon * gdb.texinfo (Basic Python): Describe post_event API. 2010-08-11 Phil Muldoon * gdb.texinfo (Basic Python): Describe solib_address and decode_line Python APIs 2010-08-10 Tom Tromey * gdb.texinfo (Pretty Printing API): Document gdb.default_visualizer. 2010-08-10 Tom Tromey Revert gdb-add-index addition: * gdb.texinfo (Index Files): Don't document gdb-add-index. 2010-08-07 Jan Kratochvil Eli Zaretskii * gdb.texinfo (Mode Options) <-batch> (Basic Python) : Describe setting width and height. 2010-07-31 Paul Pluzhnikov * gdb.texinfo (Threads): Document 'debug libthread-db'. 2010-07-30 Tom Tromey * gdb.texinfo (Index Files): Mention gdb-add-index. 2010-07-30 Hui Zhu * gdb.texinfo (Inferiors and Programs): Update the introduce of "detach inferior" and "kill inferior". 2010-07-28 CHENG Renquan * gdb.texinfo (Machine Code): Update description of two forms of arguments, and add new example to demonstrate the new form. 2010-07-27 Phil Muldoon * gdb.texinfo (Values From Inferior): Add value inferior function call description. 2010-07-19 Jan Kratochvil * gdb.texinfo (Active Targets): Fix wrong comma placement. 2010-07-19 Jan Kratochvil Eli Zaretskii Make core files the process_stratum. * gdb.texinfo (Active Targets): Remove core_stratum. Include record_stratum example. 2010-07-13 Tom Tromey * gdb.texinfo (Index Files): New node. 2010-07-13 Tom Tromey * gdb.texinfo (GDB/MI Variable Objects): Remove extra 'for'. 2010-07-13 Tom Tromey * gdb.texinfo (Specify Location): Document labels. 2010-07-01 Pedro Alves * gdb.texinfo (Create and Delete Tracepoints): Add more index entries for fast tracepoints and static tracepoints. 2010-07-01 Pedro Alves * gdb.texinfo (General Query Packets) : Spell out `l' as ell. 2010-07-01 Pedro Alves * gdb.texinfo (Convenience Variables): Document $_sdata. (Commands to Set Tracepoints): Describe static tracepoints. Add `Listing Static Tracepoint Markers' menu entry. Document "strace". (Tracepoint Action Lists): Document collecting $_sdata. (Listing Static Tracepoint Markers): New subsection. (Tracepoints support in gdbserver): Mention static tracepoints. (remote packets, enabling and disabling): Mention read-sdata-object. (General Query Packets) : Document qXfer:sdata:read and StaticTracepoint. Mention qTfSTM, qTsSTM and qTSTMat as tracepoint packets. Document qXfer:sdata:read. (Tracepoint packets): Document qTfSTM, qTsSTM and qTSTMat. 2010-06-29 Joel Brobecker * gdb.texinfo (Threads In Python): Fix unmatched @end table. 2010-06-28 Phil Muldoon Tom Tromey Thiago Jung Bauermann * gdb.texinfo (Inferiors In Python): New node. * gdb.texinfo (Threads In Python): New node. 2010-06-28 Joel Brobecker * gdb.texinfo (Python): Document what the python directory is and what its location is. (Basic Python): Document the gdb.PYTHONDIR constant. 2010-06-25 Tom Tromey PR python/10808: * gdb.texinfo (Basic Python): Document new gdb.execute argument. 2010-06-24 Hui Zhu * gdb.texinfo: (Commands for Controlled Output): Add documentation for command "eval". 2010-06-21 Stan Shebs * gdb.texinfo: Add explicit @node and @appendix for GFDL. * annotate.texinfo: Ditto. * gdbint.texinfo: Ditto. * stabs.texinfo: Ditto. 2010-06-22 Hui Zhu * gdb.texinfo: (Process Record and Replay): Add documentation for command "set record memory-query". 2010-06-21 Stan Shebs * gdb.texinfo: Relicense under GFDL version 1.3. * annotate.texinfo: Relicense under GFDL version 1.3. * gdbint.texinfo: Relicense under GFDL version 1.3. * stabs.texinfo: Relicense under GFDL version 1.3. * fdl.texi: Update to version 1.3. 2010-06-18 Stan Shebs * gdb.texinfo (Operating System Auxiliary Information): Describe "info os" when no arguments given. * gdb.texinfo (Debugging Programs with Multiple Threads): Describe $_thread. 2010-06-18 Hui Zhu * gdb.texinfo: (Process Record and Replay): Add documentation for commands "record save" and "record restore". 2010-06-16 Jan Kratochvil * gdb.texinfo: Include information about the correct use of addresses in the `watch' command. 2010-06-11 Stan Shebs * gdb.texinfo (Observer Mode): New section. (General Query Packets): Document QAllow. 2010-06-04 Doug Evans * gdb.texinfo (Python API): New node `Disabling Pretty-Printers'. 2010-06-03 Doug Evans * gdbint.texinfo (Coding): Add subsection on command names. 2010-06-02 Tom Tromey * gdb.texinfo (Maintenance Commands): Document maint set dwarf2 always-disassemble. 2010-06-01 Pedro Alves * gdb.texinfo (Set Tracepoints): Mention tracepoints support in gdbserver, and add cross reference. (Tracepoints support in gdbserver): New subsection. 2010-05-26 Pedro Alves * gdb.texinfo (General Query Packets) : Describe the `qRelocInsn' feature. (Relocate instruction reply packet): New subsection of `Tracepoint Packets'. (Tracepoint Packets): Mention that packets QTDP and QTStart support the qRelocInsn request, and add cross reference to new subsection. 2010-05-25 Doug Evans * gdb.texinfo (Exception Handling): Document gdb.GdbError. (Commands In Python): Document gdb.string_to_argv. 2010-05-02 Jan Kratochvil * gdbint.texinfo (Host Definition): Remove items NORETURN and ATTR_NORETURN. 2010-04-29 Phil Muldoon Tom Tromey Thiago Jung Bauermann * gdb.texinfo (Parameters In Python): New Node. 2010-04-29 Mihail Zenkov * gdb.texinfo: (Summary) Add mention about D language support. (Filenames): Add D suffixes. (D): New node. 2010-04-26 Pierre Muller * gdbint.texinfo (CANNOT_STEP_HW_WATCHPOINTS): Remove explanation of macro deleted from GDB code. 2010-04-24 Pedro Alves * gdb.texinfo (Commands to specify files): Describe what how GDB looks up DOS-based filesystem paths on the system root. Document the new `set/show target-file-system-kind' commands. 2010-04-23 Doug Evans * gdb.texinfo (Python): Move Auto-loading section here ... (Python API): from here. (Auto-loading): Add docs for .debug_gdb_scripts auto-loaded scripts. (Maintenance Commands): Add docs for "maint print section-scripts". 2010-04-20 Chris Moller * gdb.texinfo (Setting Breakpoints): Added description of filename-qualified rbreak. * refcard.tex (Breakpoints and Watchpoints): Added brief description of filename-qualified rbreak. 2010-04-22 Jan Kratochvil * gdb.texinfo (Data): New @menu reference to Pretty Printing. (Python API): Change the reference to Pretty Printing API. (Pretty Printing): Move the user part under the Data node. Reformat the sample output to 72 columns. Create a new reference to Pretty Printing API. Rename the API part ... (Pretty Printing API): To a new node name. (Selecting Pretty-Printers, Progspaces In Python, Objfiles In Python) (GDB/MI Variable Objects): Change references to Pretty Printing API. 2010-04-21 Stan Shebs * gdb.texinfo (Tracepoint Actions): Mention synonymy of actions and commands. (Listing Tracepoints): Update to reflect current behavior. 2010-04-22 Pierre Muller * gdb.texinfo (Examining memory): Update for change in string display with explicit size. 2010-04-19 Pedro Alves PR breakpoints/8554. * gdb.texinfo (Save Breakpoints): New node. (save-tracepoints): Rename to ... (save tracepoints): ... this. Mention that `save-tracepoints' is a deprecated alias to `save tracepoints'. 2010-04-16 Pierre Muller * gdb.texinfo ($_tlb): Document new automatic convinience variable. (info w32 thread-information-block): Document new command. (qGetTIBAddress): Document new gdbserver query. (maint set/show show-all-tib): Document new command. 2010-04-15 Doug Evans * gdb.texinfo (Python API): Add progspaces section. (Selecting Pretty-Printers): Progspace pretty-printers are searched too. (Progspaces In Python): New section. * gdb.texinfo (Command Files): Add docs for new "source -s" option. 2010-04-14 Phil Muldoon * gdb.texinfo (Pretty Printing): Document behaviour when to_string returns None. 2010-04-09 Stan Shebs * gdb.texinfo (gdb/mi Tracepoint Commands) <-trace-status>: Describe the `frames-created' field, tweak grammar. 2010-04-09 Pedro Alves * gdb.texinfo (gdb/mi Tracepoint Commands) <-trace-status>: Describe the `circular' and `disconnected' fields. 2010-04-09 H.J. Lu * gdb.texinfo (maint print registers): Mention unavailable and invisible registers. 2010-04-09 Phil Muldoon Thiago Jung Bauermann Tom Tromey * gdb.texinfo (Breakpoints In Python): New Node. 2010-04-08 Stan Shebs * gdb.texinfo (Tracepoint Packets): Describe disconn and circular trace status fields. 2010-04-08 H.J. Lu * gdb.texinfo (i386 Features): Make org.gnu.gdb.i386.avx optional. Make org.gnu.gdb.i386.avx requires org.gnu.gdb.i386.avx. 2010-04-08 Doug Evans * gdb.texinfo (Command Files): Document that gdb skips $cdir in search path, and document that gdb only scans the search path if the script's path doesn't specify a directory. 2010-04-05 Doug Evans * gdb.texinfo (maint show python auto-load): Fix typo. 2010-04-04 Stan Shebs * gdb.texinfo (Setting Breakpoints): "info watch" no longer a synonym. (Setting Watchpoints): Update description of "info watch". (Disabling Breakpoints): Only "info break" lists all. * gdb.texinfo (Tracepoint Restrictions): Document PC inference. (tdump): Explain how tdump works. 2010-04-01 Pedro Alves * gdb.texinfo (Break Commands): Clarify `commands' changes, and add cross reference. 2010-03-31 Pedro Alves * gdb.texinfo (TUI Commands): Mention that in some cases, these commands error out. 2010-03-30 H.J. Lu * gdb.texinfo (i386 Features): Add org.gnu.gdb.i386.avx. 2010-03-30 H.J. Lu * gdb.texinfo (General Query Packets): Add xmlRegisters. 2010-03-29 Stan Shebs Nathan Sidwell * gdb.texinfo (GDB/MI Tracepoint Commands): Add notes about the GDBN equivalent. (Set Tracepoints): Remove mention that conditional tracepoints don't exist. (Tracepoint Actions): Clarify when while-stepping collection happens, note that while-stepping does not automatically collect $pc. 2010-03-29 Stan Shebs * gdb.texinfo (Tracepoint Packets): Describe QTDPsrc. (General Query Packets): Describe TracepointSource. 2010-03-27 Matt Rice * gdb.texinfo (ARM): Document arguments to "target sim". (Set Catchpoints): Use @dots{} instead of @r{...}. 2010-03-26 Pedro Alves * gdb.texinfo (Tracepoint Packets): Remove mention that terror:string may be plain text, and drop mention of X prefix. 2010-03-26 Vladimir Prus * gdb.texinfo (GDB/MI Tracepoint Commands): Add comma after @xref. 2010-03-24 Stan Shebs * gdb.texinfo (Tracepoint Packets): Document trace error status. 2010-03-24 Tom Tromey PR breakpoints/9352: * gdb.texinfo (Break Commands): Update. 2010-03-24 Vladimir Prus * gdb.texinfo (GDB/MI Tracepoint Commands): Document MI tracepoint commands. 2010-03-16 Stan Shebs * gdb.texinfo (Starting and Stopping Trace Experiments): Describe circular-trace-buffer. (Tracepoint Packets): Describe QTBuffer, and details of the qTStatus reply. 2010-03-12 Stan Shebs Nathan Sidwell * gdb.texinfo (Tracepoint Actions): Clarify that while-stepping is doing instruction stepping. (Tracepoint Restrictions): New node. 2010-03-10 Tom Tromey * gdbint.texinfo (Symbol Handling): Update. 2010-03-08 Tom Tromey PR cli/9591: * gdb.texinfo (Mode Options): Mention lack of pagination and confirmation with --batch. (Screen Size): Mention --batch. (Messages/Warnings): Likewise. 2010-03-05 Tom Tromey * gdb.texinfo (Basic Python): Document target_charset and target_wide_charset. 2010-03-05 Tom Tromey * gdb.texinfo (Data): Link to pretty-printing. (Output Formats): Likewise. Correct text. 2010-03-01 Daniel Jacobowitz * gdb.texinfo (Types): Describe and . 2010-02-28 Phil Muldoon * gdb.texinfo (Frames In Python): Add block parameter and description to read_var text. 2010-02-26 Phil Muldoon Tom Tromey * gdb.texinfo (Types In Python): Describe block argument in template_argument and gdb.lookup_type. 2010-02-24 Tom Tromey * gdb.texinfo (Cygwin Native): Fix typo. 2010-02-24 Phil Muldoon * gdb.texinfo (Frames In Python): Add block, find_sal, function and select method descriptions. (Python API): Add Blocks In Python, Symbols in Python and Symbol Tables in Python to menu. (Blocks In Python): New node. (Symbols In Python): New node. (Symbol Tables in Python): New node. 2010-02-24 Vladimir Prus Multiexec MI gdb/ * breakpoint.c (clear_syscall_counts): Take struct inferior*. gdb/doc/ * gdb.texinfo (GDB/MI Command Syntax): Document notification changes. (GDB/MI Program Execution): Document current behaviour of --all and --thread-group. (GDB/MI Miscellaneous Commands): Document -add-inferior and -remove-inferior. * observer.texi (inferior_added, inferior_removed): New observers. 2010-02-19 Tom Tromey * gdbint.texinfo (Getting Started): Fix @node. (Debugging GDB): Likewise. 2010-02-13 Joel Brobecker * gdbint.texinfo (Testsuite): New section "Testsuite Configuration", documenting the gdb_test_timeout variable. 2010-02-12 Jakob Engblom * gdb.texinfo (MI commands): Added documentation of --reverse option to a set of MI commands. Restructured documentation of MI commands --exec-continue to reflect the complexity of reverse execution. 2010-02-12 Pedro Alves * gdb.texinfo (Using the Collected Data): Specify that the address range of `tfind outsize' is exclusive, and that the address range of `tfind range' is inclusive. (Tracepoint Packets): Specify that the address range of `QTFrame:range' is inclusive, and that the address range of `QTFrame:outside' is exclusive 2010-02-12 Vladimir Prus * gdb.texinfo (GDB/MI Result Records): Clarify ^running. 2010-02-10 Tom Tromey * gdb.texinfo (Debugging Output): Document set debug parser and show debug parser. 2010-02-09 H.J. Lu * gdb.texinfo (Predefined Target Types): Add i387_ext, i386_eflags and i386_mxcsr. 2010-02-08 H.J. Lu * gdb.texinfo: Document i386 target features. 2010-02-05 Doug Evans * gdbint.texinfo (Testsuite): Add a new section to document the various DejaGnu variables that may be overridden. Document INTERNAL_GDBFLAGS. 2010-02-04 Tom Tromey PR cli/8830: * gdb.texinfo (Files): -readnow comes before the filename for file and symbol-file. 2010-02-01 Daniel Jacobowitz * gdb.texinfo (Architecture-Specific Protocol Details): New section. Document ARM breakpoint types. (Register Packet Format): Move into the new section. (Packets): Describe the KIND argument for Z0, z0, Z1, and z1 packets. 2010-01-21 Joel Brobecker * gdb.texinfo (File Options): Adjust the documentation of this switch to refer to the "source" command rather than partially duplicating some of the relevant information. (Extending GDB): Introduce and document the set/show script-extension setting. (Command Files): Add note explaining that the "source" command is also used to evalute scripts written in other languages. Remove the short slightly incorrect reference to sourcing Python scripts. (Python Commands): Document how to execute a Python script from GDB. 2010-01-19 Joel Brobecker * gdb.texinfo (Command Files): Fix typo. 2010-01-18 Tom Tromey * gdb.texinfo (File Options): Document -x on .py files. (Command Files): Document handling of Python scripts. 2010-01-18 Jie Zhang * Makefile.in (ANNOTATE_DOC_BUILD_INCLUDES): Add GDBvn.texi. 2010-01-15 Stan Shebs * gdb.texinfo (Trace Files): New section. (Tracepoint Packets): Document QTSave and qTBuffer. (Trace File Format): New appendix. 2010-01-13 Phil Muldoon * gdb.texinfo (Values From Inferior): Document lazy_string value method. (Python API): Add Lazy strings menu item. (Lazy Strings In Python): New node. 2010-01-13 Vladimir Prus * gdb.texinfo (GDB/MI Thread Information): New. (GDB/MI Async Records): Document the core field in *stopped. (GDB/MI Miscellaneous Commands): Expand -list-thread-groups documentation (Process list): Document that osdata document may contain threads. (Remote Serial Protocol): Document qXfer:threads. 2010-01-06 Stan Shebs * gdb.texinfo (Starting and Stopping Trace Experiments): Document disconnected tracing. (Tracepoint Packets): Document new protocol. 2010-01-05 Stan Shebs * gdb.texinfo (Create and Delete Tracepoints): Describe fast tracepoints. (Tracepoint Packets): Describe remote protocol for fast tracepoints. 2010-01-01 Joel Brobecker Update the "Start of New Year Procedure". * gdbint.texinfo: Add the list of files that need to be updated manually. Minor reformatting. 2010-01-01 Joel Brobecker * refcard.tex: Update copyright year in header and text. 2010-01-01 Joel Brobecker * agentexpr.texi: Add 2010 to the list of copyright years. * annotate.texinfo: Likewise. * gdb.texinfo: Likewise. * gdbint.texinfo: Likewise. * observer.texi: Likewise. * stabs.texinfo: Likewise. 2009-12-31 Stan Shebs * gdb.texinfo (Tracepoint Actions): Describe teval. 2009-12-29 Stan Shebs * gdb.texinfo (Tracepoint Actions): Describe default-collect. 2009-12-28 Stan Shebs * gdb.texinfo (Trace State Variables): New section. (Tracepoint Packets): Describe trace state variable packets. * agentexpr.texi (Bytecode Descriptions): Describe trace state variable bytecodes. 2009-12-28 Daniel Jacobowitz * gdb.texinfo (Symbols): "info variables" prints definitions, not declarations. 2009-12-21 Vladimir Prus * gdb.texinfo (GDB/MI Miscellaneous Commands): Clarify that -gdb-exit behaviour. 2009-12-20 Joel Brobecker * gpl.texi: Update to version 3 of the GPL. 2009-12-20 Joel Brobecker * Makefile.in: Update copyright header. * observer.texi: Fix the copyright header of the generated files. 2009-12-08 Phil Muldoon * gdb.texinfo (Types In Python): Describe range function. 2009-12-03 Richard Ward * gdb.texinfo (Types In Python): Describe "is_base_class". 2009-12-03 Tom Tromey * gdb.texinfo (Basic Python): Document gdb.parse_and_eval. 2009-12-02 Paul Pluzhnikov * observer.texi: New memory_changed observer. 2009-12-01 Tom Tromey * gdb.texinfo (Reverse Execution): Fix typo. 2009-11-24 Daniel Jacobowitz PR gdb/8704 * gdb.texinfo (Thread-Specific Breakpoints): Thread specifiers are allowed after the breakpoint condition. 2009-11-23 Tom Tromey PR python/10782: * gdb.texinfo (Types In Python): Document Type.pointer. 2009-11-23 Paul Pluzhnikov * gdb.texinfo (Machine Code): Adjust. 2009-11-11 Pedro Alves * agentexpr.texi (Tracing On Symmetrix): Delete section. (Using Agent Expressions): Delete cross reference. 2009-11-07 Joel Brobecker * gdbint.texinfo, stabs.texinfo: Move the @setchapternewpage and @settitle directives up to help makeinfo find them. 2009-11-02 Jan Kratochvil * gdb.texinfo (set debug-file-directory, show debug-file-directory) (Auto-loading): Use plural and note one can use multiple components now. 2009-11-01 Vladimir Prus * gdb.texinfo (GDB/MI Stack Manipulation): Make -stack-list-arguments have the same documentation for parameter as -stack-list-locals. Add comas. 2009-10-27 Tom Tromey Eli Zaretskii PR python/10781 * gdb.texinfo (Values From Inferior): Document cast method. 2009-10-22 Paul Pluzhnikov * gdb.texinfo (Machine Code): Mention function name in disasssembly and adjust example. 2009-10-22 Michael Snyder * gdb.texinfo (Process Record and Replay): Document new form of info record command. Also document the new save and restore commands. 2009-10-21 Paul Pluzhnikov * gdb.texinfo (Machine Code): Mention current pc marker. (Memory): Likewise. 2009-10-19 Pedro Alves Stan Shebs * observer.texi (new_inferior): Rename to... (inferior_appeared): ... this. * gdb.texinfo (Inferiors): Rename node to ... (Inferiors and Programs): ... this. Mention running multiple programs in the same debug session. : Mention the new 'Executable' column if "info inferiors". Update examples. Document the "add-inferior", "clone-inferior", "remove-inferior" and "maint info program-spaces" commands. (Process): Rename node to... (Forks): ... this. Document "set|show follow-exec-mode". 2009-10-11 Michael Snyder * gdb.texinfo (ReverseStep): Show default as "unsupported". (ReverseContinue): Ditto. 2009-10-08 Paul Pluzhnikov * gdb.texinfo (Server): Document libthread-db-search-path. 2009-10-08 Jan Kratochvil * gdbint.texinfo (i386_stopped_by_hwbp): Remove. 2009-10-06 Michael Eager * gdb.texinfo (Contributors): Add self for Xilinx MicroBlaze. (Embedded Processors): Add MicroBlaze. (MicroBlaze): New. Describe Xilinx MicroBlaze 2009-10-04 Pedro Alves * gdb.texinfo (Remote Protocol): Don't mention vCont;T. 2009-09-26 Pierre Muller * gdb.texinfo (Cygwin Native): Mention support for Ctrl-BREAK. 2009-09-23 Joel Brobecker * observer.texi (solib_unloaded): Document explicitly the fact that this observer is called before the associated symbols are unloaded. 2009-09-19 Vladimir Prus * gdb.texinfo (GDB/MI Stack Manipulation): Document -stack-list-variables. 2009-09-18 Tom Tromey * gdb.texinfo (GDB/MI Variable Objects): -enable-pretty-printing is experimental. 2009-09-17 Paul Pluzhnikov * gdb.texinfo (convenince variables): Mention $_siginfo could be empty. 2009-09-15 Tom Tromey * gdb.texinfo (GDB/MI Variable Objects): Document -enable-pretty-printing, -var-set-update-range, dynamic varobjs. Expand -var-update documentation. 2009-09-14 Sergio Durigan Junior * gdb.texinfo (Set Catchpoints): Documentation about the catch syscall feature. 2009-09-13 Daniel Jacobowitz * gdbint.texinfo (Unwinding the Frame ID): Reference outer_frame_id. 2009-09-10 Michael Snyder * gdb.texinfo (qSupported): Mention new ReverseContinue and ReverseStep replies to the qSupported query. 2009-09-10 Joel Brobecker Add documentation for set/show interactive-mode. * gdb.texinfo (Other Misc Settings): New node. 2009-09-01 Doug Evans * gdb.texinfo (Caching Data of Remote Targets): Add note on non-stop mode's affect on remote caching. 2009-08-31 Jacob Potter Doug Evans * gdb.texinfo (Caching Data of Remote Targets): Update text. Mark `set/show remotecache' options as obsolete. Document new `set/show stack-cache' option. Update text for `info dcache'. 2009-08-27 Doug Evans * gdb.texinfo (Symbols): Delete `set print symbol-loading'. (Files): Add note on new optional regex arg to `info sharedlibrary'. 2009-08-26 Ralf Wildenhues * gdbint.texinfo (Releasing GDB): Fix confusing sentence about autoconf. 2009-08-25 Pedro Alves * gdb.texinfo (Debugging Multiple Inferiors): Add "info inferiors" small example, and describe its columns. Replace "inferior-id" by "infno" throughout. 2009-08-22 Ralf Wildenhues * gdbint.texinfo (Releasing GDB): Point to README-maintainer-mode file for required autoconf version. * configure.ac: Do not substitute datarootdir, htmldir, pdfdir, docdir. Do not process --with-datarootdir, --with-htmldir, --with-pdfdir, --with-docdir. * configure: Regenerate. * configure: Regenerate. 2009-08-20 Reid Kleckner * gdb.texinfo: Add chapter on JIT interface. 2009-08-07 Nick Roberts * gdb.texinfo (Server Prefix): Explain that server prefix suppresses confirmation request. 2009-08-05 Jeremy Bennett * gdb.texinfo (Separate Debug Files, Remote Protocol): Clarified CRC definitions. 2009-08-03 Vladimir Prus * gdb.texinfo (GDB/MI Breakpoint Commands): Document -break-commands. 2009-07-31 Ulrich Weigand * gdb.texinfo (Cell Broadband Engine SPU architecture): Document the "set spu auto-flush-cache" and "show spu auto-flush-cache" commands. 2009-07-31 Ulrich Weigand * gdb.texinfo (Cell Broadband Engine SPU architecture): Document the "set spu stop-on-load" and "show spu stop-on-load" commands. 2009-07-31 Ulrich Weigand * gdb.texinfo (Target Descriptions): Document element. 2009-07-28 Daniel Jacobowitz * gdb.texinfo (ARM Features): Document org.gnu.gdb.arm.vfp and org.gnu.gdb.arm.neon. 2009-07-20 Pedro Alves * gdb.texinfo (Target Description Format): Mention the new optional element. (subsection OS ABI): New subsection. 2009-07-14 Stan Shebs * gdb.texinfo (Tracepoint Conditions): New section. (General Query Packets): Describe ConditionalTracepoints. (Tracepoint Packets): Describe condition field. (Maintenance Commands): Describe maint agent-eval. * agentexpr.texi (Using Agent Expressions): Mention eval usage. 2009-07-11 Hui Zhu * gdb.texinfo (disassemble): Add a new modifier /r to "disassemble" command to make it print the raw instructions in hex as well as in symbolic form. 2009-07-09 Tom Tromey * gdbint.texinfo (Testsuite): Document parallel make check. 2009-07-09 Tom Tromey * gdbint.texinfo (Testsuite): Document test transcripts. 2009-07-10 Phil Muldoon * gdb.texinfo (Values From Inferior): Add length parameter description. 2009-07-04 Chris Genly * gdb.texinfo (GDB/MI Variable Objects): Document child definition in -var-list-children. Fix example according to what the code does. 2009-07-02 Pedro Alves * gdb.texinfo (Debugging multiple inferiors): Document the "inferior", "detach inferior" and "kill inferior" commands. (Debugging Programs with Multiple Processes): Adjust to mention generic "inferior" commands. Delete mention of "detach fork" and "delete fork". Cross reference to "Debugging multiple inferiors" section. 2009-07-02 Ulrich Weigand * gdbint.texinfo (Item Output Functions): Update signature for ui_out_field_core_addr. 2009-07-02 Ulrich Weigand * gdbint.texinfo (Examples of Use of @code{ui_out} functions): Update example code extrated from breakpoint.c. 2009-06-28 Paul Pluzhnikov * gdb.texinfo (GDB/MI Program Context): @ignore unimplemented MI commands. (GDB/MI Symbol Query): Likewise. (GDB/MI File Commands): Likewise. (GDB/MI File Transfer Commands): Likewise. (GDB/MI Target Manipulation): Likewise. (GDB/MI Miscellaneous Commands): Likewise. 2009-06-27 Daniel Jacobowitz * gdb.texinfo (Debugging Optimized Code): New chapter. (Compiling for Debugging): Reference it. Move some text to the new section. 2009-06-15 Phil Muldoon * doc/gdb.texinfo (Calling): Document set-unwind-on-terminating-exception usage. 2009-06-11 Pedro Alves * gdb.texinfo (All-Stop): Document new 'set schedule-multiple' command. 2009-06-07 Pedro Alves * gdbint.texinfo (TARGET_HAS_HARDWARE_WATCHPOINTS): Delete all references. 2009-06-04 Ulrich Weigand * gdbint.texinfo: Rename formal parameters to gdbarch function protoypes from "current_gdbarch" to "gdbarch". 2009-05-28 Tom Tromey * gdb.texinfo (Basic Python): Change get_parameter to parameter. 2009-05-27 Tom Tromey * gdb.texinfo (GDB/MI Miscellaneous Commands): Document "python" feature. (GDB/MI Variable Objects): Document -var-set-visualizer. 2009-04-02 Tom Tromey * gdb.texinfo (GDB/MI Miscellaneous Commands): Document "python" feature. (GDB/MI Variable Objects): Document -var-set-visualizer. 2009-05-27 Tom Tromey Thiago Jung Bauermann Phil Muldoon * gdb.texinfo (Objfiles In Python): Reference pretty printing. (Pretty Printing): New node. (Selecting Pretty-Printers): Likewise. (Python API): Update. (Output Formats): Document /r format. 2009-05-27 Thiago Jung Bauermann Tom Tromey * gdb.texinfo (Types In Python): New node. (Values From Inferior): "type" is now an attribute. (Python API): Update. 2009-05-27 Tom Tromey Thiago Jung Bauermann Phil Muldoon * gdb.texinfo: Add @syncodeindex for `tp'. (Python API): Update. (Auto-loading): New node. (Objfiles In Python): New node. 2009-05-15 Paul Pluzhnikov * gdb.texinfo (Threads): Document libthread-db-search-path. 2009-05-15 Nick Roberts * gdb.texinfo (GDB/MI General Design): Break up into four nodes. 2009-05-12 Pedro Alves * gdb.texinfo: Document 'set/show debug gnu-nat'. Replace 'maint show-debug-regs' docs by 'maint set show-debug-regs' and 'maint show show-debug-regs' docs. 2009-05-08 Eli Zaretskii * gdb.texinfo (Process Record and Replay): Add description of reverse execution. 2009-05-07 Joel Brobecker * gdbint.texinfo (Adding support for debugging core files): New node. (Native Debugging): Remove the ``Native core file Support'' section. 2009-05-01 Eli Zaretskii * gdb.texinfo (Process Record and Replay): Improve and clarify. Add index entries. 2009-04-30 Hui Zhu Michael Snyder * gdb.texinfo: (Process Record and Replay): Add documentation for process record and replay. 2009-04-29 Jan Kratochvil * gdb.texinfo (Macros): Note command-line for `info macro'. Append a new part on command-line defined macros. 2009-04-25 Eli Zaretskii * gdb.texinfo (Machine Code) : Improve and clarify the wording. 2009-04-23 Tom Tromey * gdb.texinfo (Data Files): New node. (GDB Files): Update menu. 2009-04-23 Joel Brobecker * gdbint.texinfo (Defining Other Architecture Features): Remove entry for PROCESS_LINENUMBER_HOOK. 2009-04-22 Vladimir Prus * gdb.texinfo (GDB/MI Program Execution): Document -exec-jump. 2009-04-22 Hui Zhu * gdb.texinfo (disassemble-next-line): Set the default of disassemble-next-line to off. 2009-04-21 Joseph Myers * configure.ac (--with-datarootdir, --with-docdir, --with-pdfdir, --with-htmldir): New. * configure: Regenerate. * Makefile.in (datarootdir, docdir): Define. (gdb.dvi, gdb.pdf): Use same -I options as for building gdb.info instead of $(SET_TEXINPUTS). (gdbint.dvi, gdbint.pdf): Use same -I options as for building gdbint.info instead of $(SET_TEXINPUTS). (gdbint/index.html): Use same -I options as for building gdbint.info. (stabs.dvi, stabs.pdf): Use same -I options as for building stabs.info instead of $(SET_TEXINPUTS). (stabs/index.html): Use same -I options as for building stabs.info. (annotate.dvi, annotate.pdf): Use same -I options as for building annotate.info instead of $(SET_TEXINPUTS). (annotate/index.html): Use same -I options as for building annotate.info. 2009-04-21 David Daney * gdb.texinfo (maint show-debug-regs): Remove mention of x86. 2009-04-21 Joseph Myers * gdb.texinfo (Source Path): Document --with-relocated-sources. 2009-04-18 Carlos O'Donell Joseph Myers * Makefile.in (MAKEHTML): Set to makeinfo --html. (MAKEHTMLFLAGS): Set to empty. (html__strip_dir): Define. (HTMLFILES): Define. (HTMLFILES_INSTALL): Define. (install-html): Copy new automake rule. (html): Depend on $(HTMLFILES). (gdb_toc.html): Rename to gdb/index.html. (gdbint_toc.html): Rename to gdbint/index.html. (stabs_toc.html): Rename to stabs/index.html. (annotate_toc.html): Rename to annotate/index.html. 2009-04-17 Carlos O'Donell * Makefile.in: Set pdfdir and htmldir from configure substitutions. * configure.ac: AC_SUBST datarootdir, docdir, htmldir, pdfdir. * configure: Regenerate. 2009-04-16 Joel Brobecker * gdbint.texinfo (Native Debugging): Remove entry for PROC_NAME_FMT. This macro is no longer used. 2009-04-15 Tom Tromey * gdb.texinfo (Character Sets): Document default character set. 2009-04-14 Pierre Muller * gdbint.texinfo: Change server name from sources.redhat.com to sourceware.org throughout. 2009-04-09 Joel Brobecker * gdb.texinfo (Set Breaks): Rewrite a paragraph to avoid a warning about a missing dot or coma after @xref. 2009-04-02 Joel Brobecker * gdb.texinfo (Backtrace): Add a parameter in frame 1 of the first example, and add a small explanation about it. (Print Settings): Change the documentation of the "set print frame-arguments" to reflect the fact that the default is now "scalars". 2009-04-02 Joel Brobecker * gdb.texinfo (Print Settings): Add kindex for command "set print frame-arguments". 2009-03-31 Joel Brobecker * gdb.texinfo (Ada Tasks): Add documentation about task-specific breakpoints. (Set Breaks): Add reference to thread-specific and task-specific breakpoints. 2009-03-31 Joel Brobecker * gdb.texinfo (Ada Tasks): Remove the documentation about the "Running" state, as this state has been eliminated. Now all runnable tasks are shown as "Runnable". 2009-03-30 Stan Shebs * gdb.texinfo (Tracepoints): Describe tracepoints as a special case of breakpoints. (Enable and Disable Tracepoints): Mention deprecation. (Listing Tracepoints): Update description and example. 2009-03-30 Thiago Jung Bauermann * gdb.texinfo (Frames in Python): New node. (Python API): Update. 2009-03-29 Thiago Jung Bauermann * gdb.texinfo (Values From Inferior): Change gdb.Value.address from a method to an attribute. 2009-03-26 Thiago Jung Bauermann * gdb.texinfo (Values From Inferior): Document is_optimized_out attribute. 2009-03-25 Pedro Alves * observer.texi (thread_exit): Add "silent" parameter. 2009-03-22 Pedro Alves * observer.texi (about_to_proceed): New. 2009-03-21 Jeremy Bennett * gdbint.texinfo (everywhere): Use braces {} in @deftypeXX type field throughout to handle types with spaces in them. Fix typos found by aspell. (Summary, Requirements, Contributors): New first chapter, "Summary" added, old Requirements section moved there, and new section, "Contributors" added. (Initializing a New Architecture, Register Representation) (Frame Interpretation, Inferior Call Setup, Adding a New Target) (Porting gdb): These sections extended and updated. (Compiler Characteristics): This section (empty) deleted. (Defining Other Architecture Features): This section renamed and duplicate material removed from (formerly "Target Conditionals"). Use braces {} in @deftypeXX type field throughout to handle types with spaces in them. Typos found by aspell fixed. * stack_frame.svg: New file, source of image for gdbint.texinfo. * stack_frame.pdf: Version of image for PDF output. * stack_frame.png: Version of image for HTML output and for Emacs. * stack_frame.txt: Version of image for Info output. * stack_frame.eps: Version of image for TeX DVI output. 2009-03-21 Eli Zaretskii * gdb.texinfo (Character Sets): Fix last change. 2009-03-21 Thiago Jung Bauermann * gdb.texinfo (Values From Inferior): Fix optional arguments markup. (Commands In Python): Adjust argument names of gdb.Command.__init__ to what the function accepts as keywords. 2008-03-20 Tom Tromey * gdb.texinfo (Convenience Vars): Document convenience functions. (Functions In Python): New node. (Python API): Update. 2009-03-20 Tom Tromey * gdb.texinfo (Character Sets): Remove obsolete text. Document set target-wide-charset. (Requirements): Mention iconv. 2009-03-17 Hui Zhu * gdb.texinfo: Change the introduce of "disassemble-next-line". 2009-03-17 Hui Zhu * gdb.texinfo: Add documentation for disassemble-next-line. 2009-03-16 Thiago Jung Bauermann * gdb.texinfo (Commands In Python): Remove tindex entries. 2009-03-15 Jan Kratochvil * gdb.texinfo (Returning): New description for missing debug info. 2009-03-14 Pedro Alves * gdb.texinfo (Remote Configuration): Document query-attached. (General Query Packets): Document qAttached. 2009-03-05 Pedro Alves * gdb.texinfo (Background Execution): Better describe the set target-async command. (Maintenance Commands): Delete description of the `maint set/show linux-async' and `maint set/show remote-async' commands. 2009-02-18 Vladimir Prus * gdb.texinfo (GDB/MI Async Records): Add double-spaces between sentences. 2009-02-18 Vladimir Prus * gdb.texinfo (GDB/MI Async Records): Document the =library-loaded and =library-unloaded notifications. 2009-02-17 Vladimir Prus * observer.texi (test_notification): New observer. 2009-02-14 Vladimir Prus * observer.texi: Add parameter 'print_frame' to normal_stop observer. 2009-02-07 Eli Zaretskii * gdb.texinfo (Basic Python): Fix change from 2009-02-04. (Commands In Python): Fix COMMAND_* constants in last change. Use @kbd for interactive input. Add cross-references and index entries. 2009-02-06 Pedro Alves * gdb.texinfo (Signals): Document $_siginfo. (Convenience Variables): Mention $_siginfo. (Remote Configuration): Document qXfer:siginfo:read, qXfer:siginfo:write packets, and the read-siginfo-object, write-siginfo-object commands. 2009-02-06 Pedro Alves * gdbint.texinfo (Values): New chapter. 2009-02-06 Tom Tromey * gdb.texinfo (Python API): Add entry for Commands In Python. (Commands In Python): New node. 2009-02-05 Tom Tromey * gdb.texinfo (Values From Inferior): Document Value.string. 2009-02-05 Tom Tromey * gdb.texinfo (Basic Python): Document execute's from_tty argument. 2009-02-04 Tom Tromey * gdb.texinfo (Basic Python): Document gdb.history. 2009-01-30 Vladimir Prus * gdb.texinfo (GDB/MI Thread Commands): Document the 'current-thread-id' field. Remove the example with zero threads, since current GDB won't ever report that if there's inferior. 2009-01-30 Vladimir Prus * gdb.texinfo (GDB/MI Breakpoint Commands): Document the -d option to -break-insert. 2009-01-28 Daniel Jacobowitz Jerome Guitton * gdb.texinfo (Startup): Document --with-system-gdbinit. (System-wide configuration): New section. 2009-01-26 Pedro Alves PR gdb/7580: * gdb.texinfo (Maintenance Commands): Document "maint set|show internal-error|internal-warning quit|corefile ask|yes|no". 2009-01-26 Pedro Alves * gdb.texinfo (Using the `gdbserver' Program): Document --remote-debug. 2009-01-23 Doug Evans * gdb.texinfo: Add nexti to list of commands that support background execution. 2009-01-14 Daniel Jacobowitz * gdb.texinfo (Define, Hooks): Document prefix command support. 2009-01-14 Joseph Myers Carlos O'Donell Fixes for makeinfo --html. * annotate.texinfo: Use @copying and @insertcopying. Use @ifnottex in place of @ifinfo. * gdb.texinfo: Use @copying and @insertcopying. Use @ifnottex in place of @ifinfo. Use @ifnotinfo for one index entry. * gdbint.texinfo: Use @copying and @insertcopying. Use @ifnottex in place of @ifinfo. * stabs.texinfo: Use @copying and @insertcopying. Use @ifnottex in place of @ifinfo. Include contents at start unconditionally. 2009-01-13 Pedro Alves * gdb.texinfo (General Query Packets): Remove @var{} around the "spu" literal string. 2009-01-07 Pedro Alves * gdb.texinfo (Error in Breakpoints): Delete mention of "The same program may be running in another process" errors. * gdbint.texinfo (Native Conditionals): Delete ONE_PROCESS_WRITETEXT description. 2009-01-07 Joel Brobecker * gdbint.texinfo (Start of New Year Procedure): Add the "coding" emacs local variable to be placed at the end of the ChangeLog. Add server.c and gdbreplay.c to the list of files where the copyright year needs to be updated. 2009-01-06 Sandra Loosemore * gdb.texinfo (Remote Configuration): Document new "set/show tcp auto-retry" and "set/show tcp connect-timeout" commands. 2008-12-28 Pedro Alves * gdbint.texinfo (gdbarch_cannot_fetch_register): Don't mention FETCH_INFERIOR_REGISTERS. (Native Conditionals): Remove obsolete CHILD_PREPARE_TO_STORE, FETCH_INFERIOR_REGISTERS descriptions. Remove gdbarch_get_longjmp_target descrition, since already described in Target Conditionals. Move gdbarch_fp0_regnum description to ... (Target Conditionals): ... here. 2008-12-16 Joel Brobecker * gdb.texinfo (Omissions from Ada): Add missing GDB prompt in examples. (Additions to Ada): Likewise. Add the missing opening and closing parenthesis of the GDB prompt in one of the examples. 2008-12-14 Joel Brobecker * gdb.texinfo (Omissions from Ada): Remove incorrect documentation about the result of 'Address not being of type System.Address. This problem has been fixed a while ago. 2008-12-02 Vladimir Prus MI non-stop and multiprocess docs. * gdb.texinfo (GDB/MI): New section 'GDB/MI General Design' (GDB/MI Output Records): New section 'GDB/MI Frame Information' Adjust documentation for *stopped, document =thread-created, =thread-exited, =thread-group-created and =thread-group-exited. (GDB/MI Thread Commands): Document the 'state' field in -thread-info output. (GDB/MI Program Execution): Mention --all and --thread-group options. (GDB/MI Variable Objects): Describe floating and fixed variable objects. (GDB/MI Miscellaneous Commands): Document -list-thread-groups. 2008-12-02 Vladimir Prus * gdb.texinfo (Operating System Information): New appendix. (Operating System Auxiliary Information): Document 'info os processes' (Remote Configuration): Document 'osdata' (General Query Packets): Document qXfer:osdata:read. 2008-11-27 Tristan Gingold * gdb.texinfo (Darwin): Document Darwin specific features. 2008-11-25 Jan Kratochvil * gdbint.texinfo (Target Conditionals): Extend the gdbarch_breakpoint_from_pc description. 2008-11-22 Vladimir Prus * gdb.texinfo (M68K Features): Fix typo. 2008-11-18 Paul Pluzhnikov * gdb.texinfo (Symbols): Mention printing containing image name in "info symbol". (Maint translate-address): Likewise. 2008-11-18 Joel Brobecker * gdb.texinfo (Set Catchpoints): Remove the documentation of commands "catch load" and "catch unload". 2008-11-17 Vladimir Prus * gdb.texinfo (GDB/MI Async Records): Document =thread-selected. 2008-11-17 Vladimir Prus * observer.texi (new_inferior, inferior_exit): New observers. 2008-10-27 Pedro Alves * gdbint.texinfo (Adding a New Target): Don't mention TDEPFILES, .mt files, TM_CLIBS or TM_CDEPS. (x86 Watchpoints): Don't mention TDEPFILES. 2008-10-24 Sandra Loosemore * gdb.texinfo (Remote Protocol): Add new nodes to menu. (Overview): Mention notifications and non-stop mode behavior. (Packets): Update documentation of ?, vAttach, vCont, and vRun with non-stop mode behavior. Add vStopped description. (Stop Reply Packets): Update list of packets that return stop replies. Mention non-stop behavior. (General Query Packets): Document QNonStop packet and associated qSupported query response. (Interrupts): Clarify multi-threaded behavior. Mention non-stop behavior. (Notification Packets): New section. (Remote Non-Stop): New section. (File-I/O Overview): Mention non-stop behavior. 2008-10-24 Hui Zhu Pedro Alves * gdb.texinfo (displaced-stepping): Describe the auto mode setting, and say it's the default. This is now a mainstream setting instead of a maintenance setting. 2008-10-23 Pedro Alves * observer.texi (thread_stop_requested): New. 2008-10-22 Joel Brobecker * gdb.texinfo (Ada Tasks, Ada Tasks and Core Files): New nodes. (Patching): Replace incorrect usage of @samp by @kbd. 2008-10-17 Michael Snyder * gdb.texinfo: Add documentation for reverse execution. 2008-10-16 Thiago Jung Bauermann Eli Zaretskii * gdb.texinfo. (Values From Inferior): New subsubsection. 2008-10-06 Doug Evans * gdb.texinfo (set debug dwarf2-die): Document it. 2008-10-01 Joel Brobecker * gdb.texinfo (catch) [exception]: Document how to insert a breakpoint on user-defined exceptions when the exception name is identical to one of the language-defined ones. 2008-09-27 Tom Tromey * gdb.texinfo (Macros): Remove text about stringification, varargs, and splicing. 2008-09-27 Tom Tromey * gdbint.texinfo (Language Support): Remove text about omitting support for a language. 2008-09-23 Doug Evans * gdb.texinfo (info dcache): Update. 2008-09-22 Sandra Loosemore * gdb.texinfo (Packets): Add info on thread-id syntax and multiprocess extensions. : Document multiprocess form of packet. : Use thread-id syntax. : Likewise. : Likewise. Note this is required for multiprocess. : New packet. (Stop Reply Packets) : Use thread-id syntax. : Document multiprocess form of reply. : Likewise. (General Query Packets) : Use thread-id syntax. : Likewise. : Likewise. : Likewise. : Add "multiprocess" feature. : Use thread-id syntax. 2008-09-22 Stan Shebs * gdb.texinfo (Inferiors): New section. 2008-09-12 Pedro Alves * gdbint.texinfo (Native Debugging): Mention NAT_GENERATED_FILES. 2008-09-11 Ulrich Weigand * gdbint.texinfo (Target Conditionals): Remove documentation for gdbarch_name_of_malloc. 2008-09-03 Angela Marie Thomas * gdb.texinfo (Interrupts): Mention TCP interface for sending BREAK. 2008-08-26 Ulrich Weigand * gdb.texinfo (Commands to Specify Files): Document "remote:" argument prefix to "set sysroot". 2008-08-21 Paul N. Hilfinger * gdb.texinfo (Omissions from Ada): Describe new treatment of True and False. 2008-08-20 Vladimir Prus * gdb.textinfo (GDB/MI Miscellaneous Commands): Use @table for possible features of -list-features. 2008-08-19 Vladimir Prus * gdb.texinfo (Background execution): Adjust example (GDB/MI Miscellaneous Commands): Document -list-target-features. 2008-08-19 Vladimir Prus * doc/gdb.texinfo (PowerPC): Fix typo. (PowerPC features): Fix typo. 2008-08-18 Pedro Alves * observer.texi (thread_ptid_changed): New. 2008-08-18 Luis Machado * doc/gdb.texinfo (PowerPC): Mention Extended FPR's for POWER7. (PowerPC features): Mention feature set for VSX registers. 2008-08-13 Joel Brobecker * gdb.texinfo (Ada Mode Intro): Improve the documentation regarding the direct visibility of all names in user-written packages. 2008-08-13 Pedro Alves * gdb.texinfo (breakpoint always-inserted) Describe the auto mode setting, and make it the default. (Non-Stop Mode): Remove "set breakpoints always-inserted 1" from non-stop script example. 2008-08-12 Thiago Jung Bauermann * gdbint.texinfo (Raw and Virtual Register Representations): Fix reference to the "Using Different Register and Memory Data Representation" section. 2008-08-12 Sandra Loosemore * gdb.texinfo (Remote Configuration): Document set remote noack-packet. (Remote Protocol): Add Packet Acknowledgment to menu. (Overview): Mention +/- can be disabled, and point to new section where this is discussed in detail. (General Query Packets): Document QStartNoAckMode packet, and corresponding qSupported reply. (Packet Acknowledgment): New section. 2008-08-11 Sandra Loosemore Pedro Alves * gdb.texinfo (Threads): Move paragraph about automatic thread selection to All-Stop Mode subsection. (Thread Stops): Reorganize existing material into subsections. Add introductory blurb and menu. (Non-Stop Mode): New subsection. (Background Execution): New subsection. (Maintenance Commands): Add cross-references from async mode commands to the new Background Execution section. 2008-08-06 Tom Tromey * gdb.texinfo (Extending GDB): New chapter. (Sequences): Demoted chapter, now a section under the new Extending GDB chapter. (Python): New section. 2008-07-31 Stan Shebs * gdbint.texinfo: Remove FUNCTION_EPILOGUE_SIZE. 2008-07-29 Stan Shebs * gdbint.texinfo: General round of cleanup and minor clarifications. (Breakpoint Handling): Remove mention of BREAKPOINT macro. (Longjmp Support): Update description to reflect how it is done for targets without using native header. (Symbol Handling): Add a little more general explanation. (COFF, ELF): Mention stabs encapsulation. (DWARF 3): New section. (Adding a New Host): Scrub out some obsolete bits. (Generic Host Support Files): Mention ser-pipe.c, ser-mingw.c. (Host Conditionals): Remove descriptions of NO_STD_REGS, HAVE_MMAP, HAVE_TERMIO, INT_MAX etc, LONGEST, HAVE_LONG_DOUBLE, PRINTF_HAS_LONG_DOUBLE, SCANF_HAS_LONG_DOUBLE, L_SET, SEEK_CUR, SEEK_SET, STOP_SIGNAL, USG. (Raw and Virtual Register Representations): Ditto for DEPRECATED_REGISTER_RAW_SIZE, DEPRECATED_REGISTER_VIRTUAL_SIZE, DEPRECATED_REGISTER_VIRTUAL_TYPE, REGISTER_CONVERT_TO_TYPE. (Target Conditionals): Ditto for DEPRECATED_FP_REGNUM, DEPRECATED_FRAMELESS_FUNCTION_INVOCATION, DEPRECATED_FRAME_CHAIN, DEPRECATED_FRAME_CHAIN_VALID, DEPRECATED_FRAME_INIT_SAVED_REGS, DEPRECATED_FRAME_SAVED_PC, DEPRECATED_FUNCTION_START_OFFSET, DEPRECATED_REGISTER_VIRTUAL_SIZE, DEPRECATED_REGISTER_VIRTUAL_TYPE, DEPRECATED_USE_STRUCT_CONVENTION. Describe gdbarch_deprecated_fp_regnum. Update description of gdbarch_print_insn. (Adding a New Target): Scrub out obsolete bits. (Obsolete Conditionals): Remove entire section. 2008-07-25 Tom Tromey * observer.texi (GDB Observers): Document new observers: breakpoint_created, breakpoint_deleted, breakpoint_modified, tracepoint_created, tracepoint_deleted, tracepoint_modified, architecture_changed. 2008-07-21 Stan Shebs * gdbint.texinfo: Refer to target_so_ops.in_dynsym_resolve_code instead of IN_SOLIB_DYNSYM_RESOLVE_CODE. 2008-07-21 Tom Tromey * observer.texi (GDB Observers): Remove obsolete comment. : Remove argument. 2008-07-18 Tom Tromey * gdb.texinfo (Macros): Update. Use @code rather than @command. 2008-07-10 Doug Evans * doc/gdb.texinfo: Document "set print symbol-loading on|off". 2008-07-10 Jan Kratochvil * gdb.texinfo (Starting): Document "set disable-randomization". 2008-07-07 Andreas Schwab * gdb.texinfo (GDB/MI Target Manipulation): Fix last change. 2008-07-06 Vladimir Prus * gdb.texinfo (GDB/MI Target Manipulation): Add example of -target-attach. 2008-06-10 Vladimir Prus * observer.texi (target_resumed): New observer. * gdb.texinfo (GDB/MI Output Records): Document *running. 2008-06-06 Tom Tromey * gdb.texinfo (Completion): Add field name example. 2008-06-06 Marc Khouzam * gdb.texinfo (GDB/MI Program Context): Added example to -exec-arguments 2008-06-05 Nick Roberts * annotate.texinfo (Multi-threaded Apps): Add entry for thread-changed annotation. 2008-06-05 Vladimir Prus Nathan Sidwell Joseph Myers * configure.ac: Include ../../config/acx.m4. Use ACX_PKGVERSION and ACX_BUGURL. * configure: Regenerate. * Makefile.in (PKGVERSION, BUGURL_TEXI): Define. (GDBvn.texi): Define VERSION_PACKAGE, BUGURL and BUGURL_DEFAULT. * gdb.texinfo: Use VERSION_PACKAGE and BUGURL. Remove mailing-list-specific text about bug reporting unless BUGURL_DEFAULT. 2008-06-05 Pedro Alves * gdb.texinfo (-target-select): Remove reference to target async. (Maintenance Commands): Document "maint set/show remote-async". 2008-06-04 Marc Khouzam * gdb.texinfo (GDB/MI File Transfer Commands): Typo in -target-file-get section. 2008-05-22 Pedro Alves * gdb.texinfo (vAttach, vRun): Re-remove requirement of the stub killing the inferior when it is already debugging a process. 2008-05-21 Joel Brobecker * gdb.texinfo (Continuing and Stepping): Document the new "fin" abbreviation for "finish". 2008-05-21 Nick Roberts * annotate.texinfo (Multi-threaded Apps): New node for new annotation. 2008-05-15 Daniel Jacobowitz * gdbint.texinfo (Target Conditionals): Delete entry for gdbarch_dwarf_reg_to_regnum. 2008-05-09 Doug Evans * gdb.texinfo: Document "find" command, qSearch:memory packet. 2008-05-05 Doug Evans * gdb.texinfo (disassemble): Document /m modifier. 2008-05-05 Vladimir Prus * gdb.texinfo (Maintenance Commands): Clarify that "maint time" will not report the time of commands that run the target. 2008-05-03 Vladimir Prus * gdb.texinfo (GDB/MI Output Records): Add missing semicolon. 2008-05-03 Vladimir Prus * gdb.texinfo (GDB/MI Output Records): Document =thread-create and =thread-exited. 2008-05-03 Vladimir Prus * gdb.texinfo (GDB/MI Development and Front Ends): Remove mention of dmi-discuss. 2008-05-03 Pedro Alves * observer.texi (thread_exit): New. 2008-05-02 Pedro Alves * gdb.texinfo (Debugging Output): Document "set/show debug displaced". (Maintenance Commands): Document "maint set/show can-use-displaced-stepping". 2008-05-02 Daniel Jacobowitz * gdb.texinfo (ARM): Document set/show arm fallback-mode and set/show arm force-mode. 2008-05-02 Andreas Schwab * gdbint.texinfo (Algorithms): Describe target_watchpoint_addr_within_range. 2008-04-30 Daniel Jacobowitz * gdbint.texinfo (Stack Frames): New chapter. (Algorithms): Move Frames text to the new chapter. (Target Conditionals): Delete SAVE_DUMMY_FRAME_TOS. Document gdbarch_dummy_id instead of gdbarch_unwind_dummy_id. 2008-04-24 Vladimir Prus * gdb.texinfo (GDB/MI Output Syntax): Clarify that async output does not necessary include any tokens. 2008-04-22 Corinna Vinschen * gdb.texinfo (Set SH Calling convention): New @item. (Show SH Calling convention): Ditto. 2008-04-22 Markus Deuling * gdb.texinfo (Fortran Operators): Describe '%' operator. 2008-04-20 Eli Zaretskii * gdb.texinfo (Set Breaks): Mention that multiple location breakpoints need line number info. Add index entries. 2008-04-19 Craig Silverstein * gdb.texinfo (Requirements): Add an optional requirement on zlib. * gdbint.texinfo (Debugging File Formats): Add new subsection for Compressed DWARF 2. 2008-04-16 Aleksandar Ristovski * gdb.texinfo (GDB/MI Simple Examples): Added 'disp' field to the sample output for 'stopped,reason="breakpoint-hit"' message. (GDB/MI Program Execution): Likewise. 2008-04-09 Marc Khouzam * gdb.texinfo (GDB/MI Variable Objects): Add anchor to -var-set-format. Add -f option to -var-evaluate-expression. 2008-04-03 Joel Brobecker * gdb.texinfo (Breakpoint Menus): Delete. Contents moved inside new node "Ambiguous Expressions". Replace references to this node by references to "Ambiguous Expressions" throughout. (Ambiguous Expressions): New node. 2008-03-26 Daniel Jacobowitz * gdb.texinfo (MIPS Features, PowerPC Features): Add @node. 2008-03-21 Pedro Alves * gdb.texinfo (Debugging Output): Document "set/show debug lin-lwp-async". (Maintenance Commands): Document "maint set/show linux-async". 2008-03-21 Daniel Jacobowitz * gdb.texinfo (Expressions): Update description of malloced arrays. 2008-03-15 Vladimir Prus * gdb.texinfo (Thread Commands): Document -thread-info. Remove -thread-list-all-threads. 2008-03-14 Pedro Alves Sandra Loosemore * gdb.texinfo (Library List Format): Update to mention the possibility to pass section addresses instead of segment addresses. 2008-03-10 Daniel Jacobowitz * gdb.texinfo (Starting): Document "set exec-wrapper". (Server): Document gdbserver --wrapper. 2008-03-03 Daniel Jacobowitz * gdb.texinfo (Set Watchpoints): Mention watchpoints on unreadable memory. Delete obsolete SPARClite reference. 2008-02-28 Daniel Jacobowitz * gdb.texinfo (Starting): Mention always-running targets. (Target Commands): Add an anchor for load. (Connecting): Explain continue instead of run. 2008-02-27 Daniel Jacobowitz * gdb.texinfo (Debugging Output): Document "set debug timestamp". 2008-02-26 Nick Roberts * gdb.texinfo (Set Breaks): Revert description of Enb column of breakpoint table. 2008-02-19 Pedro Alves * gdb.texinfo (vAttach, vRun): Remove requirement of the stub killing the inferior when it is already debugging a process. 2008-02-13 Markus Deuling * gdbint.texinfo (Build Script): New section. Mention new build script gdb_buildall.sh. 2008-02-01 Jim Blandy * gdb.texinfo (Help): Summarize 'info args' correctly. 2008-01-30 Thiago Jung Bauermann * gdb.texinfo: (Decimal Floating Point): Mention pseudo-registers available in PowerPC architecture. (Embedded Processors): Change node name of PowerPC item in menu. (PowerPC): Rename to... (PowerPC Embedded): this. (Architectures): Add new PowerPC item in menu. (PowerPC): New node. 2008-01-30 Daniel Jacobowitz * gdb.texinfo (Multi-Process Mode for gdbserver): Use @kbd for commands. 2008-01-30 Daniel Jacobowitz * gdb.texinfo (Setting Catchpoints): Mention features supported on GNU/Linux. 2008-01-30 Nick Roberts * gdb.texinfo (GDB/MI File Commands): Describe new output field for MI command -file-list-exec-source-file. 2008-01-29 Daniel Jacobowitz * gdb.texinfo (Using the `gdbserver' Program): Add security warning. Rearrange into subsections and subsubsections. Document --multi and --debug. Correct --with-sysroot typo. Update --attach usage. Make load reference clearer. Document monitor exit. (Remote Configuration): Document set remote exec-file, attach-packet, and run-packet. (Packets): Document vAttach and vRun. 2008-01-29 Nick Roberts * gdb.texinfo (Processes): Mention process command. detach-on-follow -> detach-on-fork. 2008-01-28 Daniel Jacobowitz * gdbint.texinfo (Native Conditionals): Remove SHELL_COMMAND_CONCAT and SHELL_FILE. 2008-01-26 Eli Zaretskii * gdb.texinfo (Specify Location): Improve wording. 2008-01-23 Chris Demetriou * gdb.texinfo (Threads): Document new "set print thread-events" and "show print thread-events" commands. 2008-01-19 Eli Zaretskii * gdb.texinfo (Specify Location): New section. (Delete Breaks, Edit, Set Breaks): Remove description of locations. Instead, add a reference to "Specify Location". (Machine Code, Jumping, Thread Stops, Continuing and Stepping) (Symbols): Refer to "Specify Location" for the valid forms of linespecs and locations. 2008-01-18 Markus Deuling * gdbint.texinfo (Target Conditionals): Replace the description of BITS_BIG_ENDIAN with a description of gdbarch_bits_big_endian. 2008-01-12 Paul Hilfinger * gdb.texinfo (C Operators): Remove incorrect parenthetical comment about &&var, which is rejected by the expression parser. 2008-01-09 Luis Machado * gdb.texinfo (Output): Update documentation on using printf with DFP types. 2008-01-07 Thiago Jung Bauermann * gdb.texinfo (C and C++): Add Decimal Floating Point format subsubsection. (Decimal Floating Point format): New subsubsection. 2008-01-05 Pedro Alves * gdb.texinfo (File Options): Remove mention of the attempt to open a core file with the -p option. Don't list -c as a valid option to attach to a process. 2008-01-05 Pedro Alves * gdbint.texinfo (Host Conditionals): Remove mention of ALIGN_STACK_ON_ENTRY. 2008-01-05 Joel Brobecker * gdbint.texinfo (Start of New Year Procedure): Add item describing how to update the source and documentation copyright notices. 2007-12-18 Jim Blandy * gdb.texinfo (Set Watchpoints): Integrate per-thread watchpoint explanation into the main description of the watchpoint command; update synopses of 'watch', 'rwatch', and 'awatch' commands. 2007-12-18 Vladimir Prus * gdb.texinfo (Miscellaneous gdb/mi Commands): Document 'pending-breakpoints' feature of -list-features. 2007-12-17 Luis Machado * gdb.texinfo: Add new parameter's description. 2007-12-16 Daniel Jacobowitz * gdb.texinfo (Overview): Clarify run-length encoding example. Remove the restriction on "+" and "-" characters. 2007-12-15 Eli Zaretskii * gdb.texinfo (Host I/O Packets): Fix xref syntax. 2007-12-14 Vladimir Prus * gdb.texinfo (GDB/MI Breakpoint Commands): Document the -f option for -break-insert, remove -r option, and clarify specification of location. 2007-11-30 Daniel Jacobowitz * gdb.texinfo (Debugging Programs with Multiple Processes): Correct formatting. (Remote Debugging): Add File Transfer section. (Remote Configuration): Document Host I/O packets. (GDB/MI): Add GDB/MI File Transfer Commands section. (Host I/O Packets): New section in "Remote Protocol". (Packets): Add vFile. 2007-11-17 Eli Zaretskii * gdb.texinfo (Set Breaks, Disabling): Clarify behavior of breakpoints with multiple locations. (Breakpoint Menus): Improve wording. (Output): Fix last change. 2007-11-17 Ulrich Weigand * Makefile.in (Makefile): Do not depend on target_makefile_frag. 2007-11-15 Doug Evans * gdb.texinfo (Symbols): Update output of "maint info symtabs". 2007-11-15 Vladimir Prus * gdbint.texinfo (Native Conditionals): Remove mention of CLEAR_SOLIB. 2007-11-11 Joel Brobecker * gdb.texinfo (Print Settings): Add documentation for "set/show print frame-arguments". 2007-11-05 Luis Machado * gdb.texinfo (Output): Update printf command's description. 2007-10-30 Daniel Jacobowitz * gdb.texinfo (PowerPC): Document "set powerpc vector-abi" and "set powerpc soft-float". 2007-10-24 Daniel Jacobowitz * gdb.texinfo (Files): Correct formatting. Mention Expat requirement. (Requirements for Building GDB): Expand the list of Expat uses. (Library List Format, Memory Map Format): Mention Expat. (Target Descriptions): Update Expat wording. 2007-10-24 Daniel Jacobowitz * gdbint.texinfo (Register and Memory Data, Target Conditionals): Document that gdbarch_convert_register_p should return zero for no-op conversions. 2007-10-22 Ulrich Weigand * gdbint.texi (Compiler Characteristics): Move documentation of set_gdbarch_sofun_address_maybe_missing back to ... (Target Conditionals): ... here to fix build break. 2007-10-19 Ulrich Weigand * gdbint.texi (Target Conditionals): Remove documentation of SOFUN_ADDRESS_MAYBE_MISSING, replaced by ... (Compiler Characteristics): ... documentation of set_gdbarch_sofun_address_maybe_missing. 2007-10-17 Daniel Jacobowitz * gdbint.texinfo (Target Conditionals): Use frame_unwind_register_unsigned in examples instead of frame_unwind_unsigned_register. 2007-10-15 Daniel Jacobowitz * gdb.texinfo (Predefined Target Types): Add int128 and uint128. (Standard Target Features): Add PowerPC features. 2007-10-15 Daniel Jacobowitz * gdb.texinfo (Maintenance Commands): Document "maint print c-tdesc". 2007-10-12 Ulrich Weigand * gdbint.texi (Target Conditionals): Remove documentation of and references to DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS, gdbarch_extract_return_value, and gdbarch_store_return_value. 2007-10-12 Ulrich Weigand * gdbint.texi (Target Conditionals): Remove documentation of and references to DEPRECATED_REG_STRUCT_HAS_ADDR. 2007-10-11 Kazu Hirata * gdb.texinfo: Mention that inaccessible-by-default is on by default. 2007-10-11 Daniel Jacobowitz * gdbint.texinfo (Target Conditionals): Remove VARIABLES_INSIDE_BLOCK. 2007-09-30 Daniel Jacobowitz * gdb.texinfo (Setting Watchpoints): Adjust warning text about multi-threaded watchpoints. * gdbint.texinfo (Watchpoints): Describe how watchpoints are checked. Describe sticky notification. Expand description of steppable and continuable watchpoints. (Watchpoints and Threads): New subsection. 2007-09-28 Vladimir Prus * gdb.texinfo (Setting Breakpoints): Revise documentation for pending breakpoints. Document breakpoints with multiple locations. 2007-09-19 Vladimir Prus * gdb.texinfo (Miscellaneous gdb/mi Commands): Document -list-features. 2007-09-15 Eli Zaretskii * gdb.texinfo (Output): Spell out which features of C's printf are not supported by GDB's printf. (Separate Debug Files): More accurate wording regarding build ID and a reference to the ld manual rather than the Fedora wiki. 2007-09-04 Daniel Jacobowitz Jim Blandy * gdb.texinfo (Output Formats): Update 'c' description. Describe 's'. (Examining Memory): Update mentions of the 's' format. (Automatic Display): Likewise. 2007-09-02 Daniel Jacobowitz * gdb.texinfo: Update the FSF's Back-Cover Text. 2007-09-02 Jan Kratochvil Eli Zaretskii * gdb.texinfo (Separate Debug Files): Cosmetic quoting removal. Fixed the ``build ID'' name. New binaries build instructions for the build ID inclusion. Explain how the commands are specific to the build ID vs. debug link. 2007-09-01 Eli Zaretskii * gdb.texinfo (Separate Debug Files): Fix last change. Add indexing for ``build ID'' support. 2007-09-01 Jan Kratochvil * gdb.texinfo (Separate Debug Files): Included a BUILD ID description. Enlisted BUILD ID to the debug file searching example. Included a BUILD ID `.note.gnu.build-id' section description. Updated/added the debug files splitting instructions for OBJCOPY. 2007-08-31 Vladimir Prus * gdb.texinfo (Variable Objects): Adjust docs for -var-info-expression and document -var-info-path-expression. 2007-08-20 Jim Blandy * gdb.texinfo (Top): Dedicate manual to the memory of Fred Fish. (title page): Include the dedication in the printed manual, as a separate page after the copyright notice. * gdb.texinfo (The F Reply Packet): Avoid confusing texi2html: don't break a @var across a line. 2007-07-25 Maciej W. Rozycki * Makefile.in (MAKEHTMLFLAGS): Also search the current directory for include files. 2007-07-12 Nick Roberts * gdb.texinfo (Server Prefix): New node. Adapt from existing node in annotate.texinfo. (Command History): Link to new node. 2007-07-05 Markus Deuling * gdbint.texinfo (PC_LOAD_SEGMENT): Remove description. 2007-07-05 Eli Zaretskii * gdbint.texinfo (Target Conditionals): Fix last change. 2007-07-03 Markus Deuling * gdb.texinfo: Replace following macros by their appropriate gdbarch routines: (TARGET_CHAR_SIGNED, CALL_DUMMY_LOCATION, CANNOT_FETCH_REGISTER) (CANNOT_STORE_REGISTER, GET_LONGJMP_TARGET, POINTER_TO_ADDRESS) (ADDRESS_TO_POINTER, INNER_THAN, FRAME_NUM_ARGS) (HAVE_NONSTEPPABLE_WATCHPOINT, TARGET_SHORT_BIT, TARGET_INT_BIT) (TARGET_LONG_BIT, TARGET_LONG_LONG_BIT, TARGET_FLOAT_BIT) (TARGET_DOUBLE_BIT, TARGET_LONG_DOUBLE_BIT, TARGET_PTR_BIT (TARGET_ADDR_BIT, SP_REGNUM, PC_REGNUM, PS_REGNUM, FP0_REGNUM) (STAB_REG_TO_REGNUM, ECOFF_REG_TO_REGNUM, DWARF_REG_TO_REGNUM) (SDB_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM, BELIEVE_PCC_PROMOTION) (CONVERT_REGISTER_P, REGISTER_TO_VALUE, VALUE_TO_REGISTER) (POINTER_TO_ADDRESS, ADDRESS_TO_POINTER, EXTRACT_RETURN_VALUE) (STORE_RETURN_VALUE, SKIP_PROLOGUE, MEMORY_INSERT_BREAKPOINT) (BREAKPOINT_FROM_PC, MEMORY_REMOVE_BREAKPOINT, DECR_PC_AFTER_BREAK) (ADDR_BITS_REMOVE, TARGET_PRINT_INSN, SKIP_TRAMPOLINE_CODE) (IN_SOLIB_RETURN_TRAMPOLINE, NAME_OF_MALLOC, ADDRESS_CLASS_TYPE_FLAGS) (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME, ADDRESS_CLASS_TYPE_FLAGS_P). (ADDRESS_CLASS_NAME_to_TYPE_FLAGS, ADJUST_BREAKPOINT_ADDRESS) (PRINT_FLOAT_INFO, PRINT_VECTOR_INFO, INTEGER_TO_ADDRESS) (SKIP_PERMANENT_BREAKPOINT, TARGET_VIRTUAL_FRAME_POINTER) (SOFTWARE_SINGLE_STEP_P) (push_dummy_call, stabs_argument_has_addr, unwind_sp, unwind_pc) (print_registers_info, push_dummy_code, unwind_dummy_id): Rework (REGISTER_CONVERT_TO_TYPE, END_OF_TEXT_DEFAULT, GDB_MULTI_ARCH) (GDB_TARGET_IS_HPPA, DEPRECATED_GET_SAVED_REGISTER) (SYMBOLS_CAN_START_WITH_DOLLAR, DEPRECATED_INIT_EXTRA_FRAME_INFO) (DEPRECATED_INIT_FRAME_PC, DEPRECATED_SIGTRAMP_START) (IN_SOLIB_CALL_TRAMPOLINE, NO_HIF_SUPPORT, REGISTER_CONVERTIBLE) (DEPRECATED_REGISTER_RAW_SIZE, PARM_BOUNDARY, DEPRECATED_STACK_ALIGN) (PROLOGUE_FIRSTLINE_OVERLAP, DEPRECATED_POP_FRAME, STEP_SKIPS_DELAY) (TARGET_COMPLEX_BIT, TARGET_DOUBLE_COMPLEX_BIT) (OS9K_VARIABLES_INSIDE_BLOCK, KERNEL_U_ADDR, KERNEL_U_ADDR_HPUX) (REGISTER_U_ADDR, U_REGS_OFFSET, DEBUG_PTRACE): Remove description. (Converting an existing Target Architecture to Multi-arch): Remove section. (gdbarch_unwind_pc, gdbarch_unwind_sp): Renew code example. (gdbarch_addr_bits_remove): Add code example. * gdb.texinfo: Replace REGISTER_NAME by gdbarch_register_name. 2007-07-02 Daniel Jacobowitz * gdb.texinfo (Remote Configuration): Document library-info-packet. Add other missing entries. Adjust the table size to fit. (Stop Reply Packets): Use @itemize instead of @enumerate. Document stop reasons including the new "library" event. (General Query Packets): Adjust table widths for qSupported. Mention qXfer:libraries:read reply to qSupported and document the new packet. (Library List Format): New section. 2007-07-01 Jan Kratochvil * gdb.texinfo (Attach): Fixed GDB exit inferior detachment. 2007-06-28 Michael Snyder * gdbint.texinfo (Table, Tuple and List Functions) Fix typo. 2007-06-25 Nick Roberts * gdbint.texinfo (Register and Memory Data): Break sections into nodes and add a menu. 2007-06-21 Maciej W. Rozycki * gdb.texinfo (Examining Memory): Document the new behaviour. 2007-06-21 Vladimir Prus * gdb.texinfo (Standard Target Features): Document m68k features. 2007-06-18 Daniel Jacobowitz * gdb.texinfo (General Query Packets): Document qOffsets changes. 2007-06-13 Daniel Jacobowitz * gdb.texinfo (Target Description Format): Add version attribute for . 2007-06-13 Daniel Jacobowitz * gdb.texinfo (MIPS Features): Document org.gnu.gdb.mips.linux. 2007-06-13 Daniel Jacobowitz * gdb.texinfo (MIPS Features): New subsection. 2007-06-12 Ulrich Weigand Markus Deuling * gdb.texinfo (General Query Packets): Document qXfer:spu:read and qXfer:spu:write packets and mention them under qSupported. 2007-06-12 Ulrich Weigand Markus Deuling * gdb.texinfo (Architectures): Add new SPU section to document Cell Broadband Engine SPU architecture specific commands. 2007-06-09 Vladimir Prus * gdb.texinfo (GDB/MI Variable Objects): Editorial comments. 2007-06-07 Nick Roberts * gdb.texinfo (Emacs): Describe GDB under Emacs 22.1. 2007-05-29 Jim Blandy * gdb.texinfo (Overview): Doc fix. 2007-05-22 Maciej W. Rozycki * gdb.texinfo (Remote Configuration): Document "set/show remoteflow". 2007-05-16 Daniel Jacobowitz * gdb.texinfo (MIPS): Remove documentation for set mips saved-gpreg-size, show mips saved-gpreg-size, and set mips stack-arg-size. 2007-05-14 Bob Wilson * all-cfg.texi (GDBTUI): New. * gdb.texinfo (Mode Options): Use GDBTUI variable. (TUI, TUI Overview, TUI Keys, TUI Single Key Mode, TUI Commands) (TUI Configuration): Edit to improve clarity and fix problems of both style and content. 2007-05-11 Ulrich Weigand * observer.texi (GDB Observers): New observer "new_objfile". 2007-05-08 Ulrich Weigand * gdbint.texinfo (Native Conditionals): Remove USE_PROC_FS. 2007-04-14 Vladimir Prus * gdb.texinfo (GDB/MI Variable Objects): Document frozen variables objects. 2007-04-13 Daniel Jacobowitz * gdb.texinfo (Memory): Reference Remote Debugging chapter. (Character Sets, Caching Data of Remote Targets): Likewise. (Targets): Delete Remote node. Move its text... (Debugging Remote Programs): ...to here. Delete description of the "remote" command. (Remote configuration): Delete description of "set remotedevice" and "show remotedevice". (Embedded Processors): Delete H8/300, H8/500, and SH nodes. 2007-04-11 Bob Wilson * gdb.texinfo (Contributors, Continuing and Stepping) (Fortran Defaults, HPPA, TUI, TUI Commands, Configure Options) (General Query Packets, File-I/O Remote Protocol Extension) (Protocol Basics, The F Reply Packet, Write) (Protocol-specific Representation of Datatypes, Memory Transfer): Fix hyphenation, punctuation and grammar problems. (Cygwin Native): Likewise. Also fix misuse of @pxref and use 'section' instead of 'subsection' in the text. (Non-debug DLL Symbols): Avoid 'subsubsection' in the text. (i386): Remove period from section name. (Installing GDB, Requirements, Running Configure, Separate Objdir) (Config Names, Configure Options): Use @file{configure}. 2007-04-11 Daniel Jacobowitz * gdbint.texinfo (Writing Tests): Mention gdb_test_multiple and tab expansion. 2007-04-10 Daniel Jacobowitz * gdbint.texinfo (SOM): Correct location of the SOM reader. 2007-04-02 Bob Wilson * gdb.texinfo: Consistently capitalize all significant words in node names, chapter titles, section titles, and headings. Update cross references to match. (Starting and Stopping Trace Experiment): Make node name plural. (Breakpoint related warnings): Hyphenate "Breakpoint-related". 2007-03-30 Pedro Alves * gdb.texinfo (WinCE): Delete obsolete subsection. 2007-03-30 Daniel Jacobowitz * gdb.texinfo (M68K): Remove obsolete ROM monitors. * gdbint.texinfo (DWARF 1): Delete section and other dwarfread.c references. 2007-03-30 Daniel Jacobowitz * gdb.texinfo (Startup): Delete references to some alternate names for .gdbinit. (Thread): Remove LynxOS reference. (Tandem ST2000): Delete target-specific documentation. * gdbint.texinfo (Symbol Handling): Remove mention of NLM. (Target Architecture Definition): Remove mention of GDB_OSABI_NETWARE and GDB_OSABI_LYNXOS. 2007-03-29 Ulrich Weigand * gdbint.texi (Native Conditionals): Remove PTRACE_ARG3_TYPE. 2007-03-27 Ulrich Weigand * gdbint.texinfo (Target Conditionals): Remove mention of DEPRECATED_REMOTE_BREAKPOINT, DEPRECATED_BIG_REMOTE_BREAKPOINT, and DEPRECATED_LITTLE_REMOTE_BREAKPOINT. 2007-03-27 Brooks Moses * Makefile.in: Add "pdfdir" installation directory, PDFTEX macro, support for "install-pdf" target, and rules for making a pdf version of refcard.texi. * refcard.tex: Specify paper size for PDF output. 2007-03-26 Bob Wilson * gdb.texinfo (Omissions from Ada, Additions to Ada): Wrap long lines. 2007-03-26 Bob Wilson * gdb.texinfo (Invoking GDB): Use @value{GDBP}. (Source Path, Character Sets, Macros, Define) (GDB/MI Result Records, GDB/MI Simple Examples) (GDB/MI Program Execution, GDB/MI File Commands) (Maintenance Commands, Packets, File-I/O Overview): Use @value{GDBN}. (Bug Reporting): Use @value{GCC}. 2007-03-26 Bob Wilson * gdb.texinfo (Help): Fix formatting of examples. (Variables): Use @ifnotinfo instead of @iftex. (Non-debug DLL symbols): Use @ref instead of @pxref. (Sparclet File): Use @samp instead of quotes. 2007-03-26 Bob Wilson * gdb.texinfo (Variables, C): Update cross reference to GCC docs. 2007-03-26 Bob Wilson * gdb.texinfo (Top): Move TUI and Annotations menu entries to match the order of the nodes. (C Operators, C Constants, Debugging C): Remove extra menus. (Method Names in Commands): Do not specify next/prev/up nodes. 2007-03-26 Bob Wilson * gdb.texinfo (File Options): Add missing parenthesis. (Breakpoints, Special Fortran commands, PowerPC): Fix typos. 2007-02-26 Daniel Jacobowitz * gdb.texinfo (Monitor commands for gdbserver): New subsection. 2007-02-26 Daniel Jacobowitz * gdb.texinfo (Standard Target Features): Mention case insensitivity. (ARM Features): Describe org.gnu.gdb.xscale.iwmmxt. 2007-02-18 Nick Roberts * gdb.texinfo (Top): Put Appendix A after numbered sections. (Files): Add section name to argument list for pxref. (Non-debug DLL symbols): Don't use `see' for pxref. (Embedded Processors): Fix typo. (GDB/MI Breakpoint Commands): Execution commands generate *stopped not ^done. 2007-02-13 Nick Roberts * gdb.texinfo (GDB/MI Variable Objects): Describe meanings of values for in_scope. Mention that only root variables can be updated. (GDB/MI Development and Front Ends): Explain new values may be added to existing fields. 2007-02-08 Daniel Jacobowitz * gdb.texinfo (-target-disconnect): Use @smallexample. (Requirements): Add anchor for Expat. Update description. (Target Descriptions): Mention Expat. (Target Description Format): Document new elements. Use @smallexample. (Predefined Target Types, Standard Target Features): New sections. * gdbint.texinfo (Target Descriptions): New section. 2007-02-07 Daniel Jacobowitz * gdb.texinfo (Target Description Format): Add section on XInclude. 2006-02-03 Nick Roberts * gdb.texinfo (GDB/MI Miscellaneous Commands): Describe the new command -enable-timings. 2007-02-02 Markus Deuling (tiny change) * gdbint.texinfo (Operation System ABI Variant Handling): Update descriptions for new/deleted elements in gdb_osabi. Add missing description for function generic_elf_osabi_sniff_abi_tag_sections. 2007-01-29 Joel Brobecker * gdb.texinfo (Maintenance Commands): Add documentation for the new "maint print target-stack" command. 2007-01-26 Jan Kratochvil Eli Zaretskii * gdb.texinfo: Describe CHAR array vs. string identification rules. 2007-01-26 Eli Zaretskii * gdb.texinfo (Compilation, Files, Bootstrapping, Bug Reporting): Use @value{NGCC} instead of @value{GCC}. 2007-01-20 Ralf Wildenhues (tiny change) * agentexpr.texi: Fix typos. * annotate.texinfo: Likewise. * gdb.texinfo: Likewise. * gdbint.texinfo: Likewise. * observer.texi: Likewise. * stabs.texinfo: Likewise. 2007-01-20 Markus Deuling (tiny change) * gdbint.texinfo (Support Libraries): Remove mmalloc entry. Describe readline library. 2007-01-09 Daniel Jacobowitz * gdb.texinfo (Target Descriptions): New section. (General Query Packets): Add QPassSignals anchor. Mention qXfer:features:read under qSupported. Expand mentions of qXfer:memory-map:read and QPassSignals. Document qXfer:features:read. 2007-01-08 Daniel Jacobowitz * gdb.texinfo (Commands to specify files): Describe "set sysroot" and "show sysroot". (Using the `gdbserver' program): Lowercase argument to @var. Expand description of setting up GDB on the host. 2007-01-05 Joel Brobecker * gdb.texinfo (Set Catchpoints): Add documentation for the new catch exception, catch exception unhandled, and catch assert commands. 2007-01-04 Daniel Jacobowitz * gdb.texinfo (Debugging Output): Document "set debug xml" and "show debug xml". 2007-01-04 Daniel Jacobowitz * gdbint.texinfo (Compiler Warnings): Update for -Wall use. 2007-01-01 Joel Brobecker * gdbint.texinfo (Start of New Year Procedure): Add missing item. 2006-12-08 Vladimir Prus * gdb.texinfo (GDB/MI Variable Objects): Wrap historical note in @ignore, to be removed later if nobody complains. 2006-12-04 Nick Roberts * gdb.texinfo (GDB/MI Variable Objects): Describe -c option of -var-delete. 2006-11-22 Vladimir Prus * gdb.texinfo (Setting breakpoints): Document automatic software/hardware breakpoint usage and the "set breakpoint auto-hw" command. 2006-11-21 Vladimir Prus * gdb.texinfo (Memory Access Checking): New. 2006-11-16 Daniel Jacobowitz * gdb.texinfo (Remote configuration): Mention "pass-signals-packet". (General Query Packets): Document QPassSignals. Fix a typo. 2006-11-14 Maxim Grigoriev * gdb.texinfo (Contributors): Add contributors of Xtensa port. 2006-11-14 Daniel Jacobowitz * gdb.texinfo (Remote configuration): Rewrite documentation for packet configuration commands. (OS Information): Adjust reference to qXfer:auxv:read. (General Query Packets): Remove references to read-aux-vector-packet and set remote get-thread-local-storage-address. 2006-11-10 Daniel Jacobowitz * gdbint.texinfo (Target Architecture Definition): Add new Initializing a New Architecture section. 2006-10-31 David Taylor * stabs.texinfo (Macro define and undefine): New node describing stabs for #define and #undef. 2006-10-27 Andreas Schwab * gdb.texinfo (Processes): Rename "detach-fork" to "detach fork". 2006-10-21 Eli Zaretskii * gdb.texinfo (Breakpoints, Set Watchpoints): Elaborate and clarify on the possible meanings of ``expression'' watched by watchpoints. Add indexing. (Prompting, Errors, Invalidation, Annotations for Running) (Source Annotations): Fix index entries by adding "annotation" to them, to discriminate from index entries that point to the more general topic descriptions. 2006-10-17 Daniel Jacobowitz * gdbint.texinfo (Target Vector Definition): Move most content into Existing Targets. Add a menu. (Existing Targets): New section, moved from Target Vector Definition. Use @subsection. (Managing Execution State): New section. 2006-10-16 Bob Wilson * gdb.texinfo (ST2000): Use Ctrl- instead of C-. 2006-10-15 Eli Zaretskii * gdb.texinfo (Sample Session, Invocation, Quitting GDB) (Command Syntax, Signals, Backtrace, Connecting) (Remote configuration, Renesas Boards, Console I/O): Fix last change: use Ctrl- instead of C-, except wrt Emacs. (File-I/O Examples): Put Ctrl-c in @kbd. (Cygwin Native, File-I/O Overview, The Ctrl-C message) (Console I/O): Use @samp with Ctrl-. (Signals, Set Breaks, Set Watchpoints): Document optional arguments to `info signals' `handle', `info breakpoints', and `info watchpoints'. 2006-10-14 Eli Zaretskii * gdb.texinfo (Backtrace): Fix last change. 2006-10-14 Nick Roberts * gdb.texinfo (Backtrace): Order correctly and add other cases. 2006-10-10 Bob Wilson * gdb.texinfo (Command Syntax, Connecting, Remote configuration) (Renesas Boards, ST2000, TUI Keys, TUI Single Key Mode) (TUI Commands, Emacs, Console I/O): Fix @key and @kbd usage. 2006-09-21 Vladimir Prus Daniel Jacobowitz * gdb.texinfo (Packets): Document vFlashErase, vFlashWrite and vFlashDone packets. (General Query Packets): Document qXfer:memory-map:read. Add a new feature for qXfer:memory-map:read. (Memory map format): New section. (Target Commands): Mention that gdb can write flash. 2006-09-21 Vladimir Prus Daniel Jacobowitz * gdb.texinfo (Memory Region Attributes): Mention target-supplied memory regions and "mem auto". 2006-09-21 Nathan Sidwell * gdbint.texinfo (Array Containers): New section. 2006-09-17 Vladimir Prus * gdb.texinfo (GDB/MI Stack Manipulation): Mention that -stack-list-arguments HIGH_FRAME argument can be larger then the actual number of frames. 2006-09-07 Vladimir Prus * gdb.texinfo (GDB/MI Stack Manipulation): Mention that -stack-list-locals HIGH_FRAME argument can be larger then the actual number of frames. 2006-09-02 Bob Wilson * gdb.texinfo (Packets, Stop Reply Packets, General Query Packets, Register Packet Format, Tracepoint Packets): Fix spelling errors. 2006-09-02 Eli Zaretskii * gdbint.texinfo (Overall Structure): New section "Source Tree Structure". 2006-08-17 Jim Blandy * gdb.texinfo (Stop Reply Packets): Note similarity of 'S' and 'T' responses. 2006-08-08 Joel Brobecker * gdb.texinfo (Source Path): Add documentation for new substitute-path commands. 2006-08-08 Daniel Jacobowitz * gdb.texinfo (Installing GDB): Update menu. Move text to... (Running Configure): ...here. (Requirements): New node. Mention expat. 2006-08-08 Vladimir Prus * gdb.texinfo (Target Commands): Remove 'set download-write-size' and 'show download-write-size'. 2006-08-01 Daniel Jacobowitz * stabs.texinfo (Member Type Descriptor): Correct example for pointer to member types. 2006-07-21 Andrew Stubbs * gdb.texinfo (Optional warnings and messages): Add 'set/show trace-commands'. (Command files): Add '-v' to source command. 2006-07-12 Daniel Jacobowitz * gdb.texinfo (OS Information): Update qPart reference to qXfer. (Remote configuration): Likewise. (Overview): Move @cindex to the start of a paragraph. Talk about binary data encoding. (Packets): Refer to the overview for the details of the X packet encoding. (General Query Packets): Remove qPart description. Add qXfer description. Add an anchor to qSupported. Correct feature table title. Add a new feature for qXfer:auxv:read. (Interrupts): Add a missing parenthesis. 2006-07-05 Daniel Jacobowitz * gdb.texinfo (KOD): Remove node. (GDB/MI Kod Commands): Remove commented out node. 2006-07-01 Eli Zaretskii * gdb.texinfo (GDB/MI Output Syntax, GDB/MI Simple Examples) (GDB/MI Breakpoint Commands, GDB/MI Program Context) (GDB/MI Thread Commands, GDB/MI Program Execution) (GDB/MI Stack Manipulation, GDB/MI Variable Objects) (GDB/MI Data Manipulation, GDB/MI Symbol Query) (GDB/MI File Commands, GDB/MI Target Manipulation) (GDB/MI Miscellaneous Commands): Change (@value{GDBP})->(gdb), since the MI prompt is hard-wired into the code. 2006-07-01 Nick Roberts * gdb.texinfo (GDB/MI Compatibility with CLI): Qualify more carefully. (GDB/MI Simple Examples): Use @subheading for "A Bad Command". (GDB/MI Data Manipulation): Remove description of unimplemented display related commands as variable objects perform this function and are superior: -display-delete, -display-disable, -display-enable, -display-insert and -display-list. Move -environment-cd, -environment-directory, -environment-path and -environment-pwd to "Program Context". (GDB/MI Program Control): Rename to "Program Execution". Move -exec-arguments -exec-abort to... (GDB/MI Program Context): ...here. New node split from "Data Manipulation". 2006-06-21 Daniel Jacobowitz * gdb.texinfo (Remote configuration): Document set / show remote supported-packets. (General Query Packets): Document qSupported packet. 2006-06-10 Sandra Loosemore * gdb.texinfo (File-I/O overview): Copy edit for grammar, spelling, and font markup. (Protocol basics): Likewise. (The F request packet): Likewise. (The F reply packet): Likewise. (Memory transfer): Move this node to be a subsubsection of "Protocol specific representation of datatypes". (The Ctrl-C message): More copy editing. (Console I/O): Likewise. (The isatty call): Delete this node, and merge its content into the "isatty" node. Fixed references elsewhere. (The system call): Delete this node, and merge its content into the "system" node. Fixed references elsewhere. (open): Reformat to use @table, and add appropriate font markup. (close): Likewise. (read): Likewise. (write): Likewise. (lseek): Likewise. (rename): Likewise. (unlink): Likewise. (stat/fstat): Likewise. (gettimeofday): Likewise. (isatty): Likewise. (system): Likewise, plus minor changes to fix confusing wording. (Integral datatypes): Fix font markup. (Pointer values): Likewise. (struct stat): Fix markup to use @table, plus minor copy editing. (struct timeval): Fix font markup, plus minor copy editing. (Constants): Minor copy editing. (Errno values): Add font markup. (File-I/O Examples): Likewise. 2006-06-10 Nick Roberts * gdb.texinfo (GDB/MI): Remove duplicate acknowledgements. (GDB/MI Simple Examples): Move node up one level. Use real examples. (GDB/MI Compatibility with CLI): Update. (GDB/MI Result Records): Add "connected" and "exit" result classes. (GDB/MI Stream Records): Clarify target output. (GDB/MI Command Description Format): Modify example description. (GDB/MI Breakpoint Table Commands): Rename to... (GDB/MI Breakpoint Commands): ...this (GDB/MI Breakpoint Commands): Add optional thread field. (GDB/MI Program Control): Add an introduction. Move "Program termination" examples into exec-run description. (GDB/MI File Commands): Mention similar CLI commands. (GDB/MI Miscellaneous Commands): Move to end. Mention "show version" is similar to "-gdb-version". 2006-06-09 Eli Zaretskii * gdb.texinfo (Symbols): Fix "(gdb)"=>"(@value{GDBP})". 2006-06-02 Nick Roberts * gdb.texinfo (GDB/MI Development and Front Ends): Use sourceware.org for mailing lists. (GDB/MI File Commands): New node split from Program Control. 2006-06-01 Nick Roberts * gdb.texinfo (GDB/MI Development and Front Ends): New node. 2006-05-22 Eli Zaretskii * gdb.texinfo (Cygwin Native): Fix last change. 2006-05-22 Christopher Faylor * gdb.texinfo (Cygwin Native): Document set/show cygwin-exceptions. 2006-05-15 Nick Roberts * gdbint.texinfo (Algorithms): Correct spelling and punctuation. (Releasing GDB, Testsuite): Remove details for including DejaGnu. 2006-05-14 Daniel Jacobowitz * gdb.texinfo (General Query Packets): Recommend not starting new packets with qC and clarify. 2006-05-13 Gaius Mulley * gdb.texinfo (M2 Types): New section. 2006-05-10 Daniel Jacobowitz * agentexpr.texi: Add a copyright and license notice. * observer.texi: Likewise, with GPL clause for function prototypes. Remove trailing whitespace. 2006-05-05 Jim Blandy * gdb.texinfo (General Query Packets): Document conventions for terminating packet names, and their violations. 2006-05-05 Daniel Jacobowitz * Makefile.in (GDB_DOC_SOURCE_INCLUDES): Update for readline 5.1. * gdb.texinfo: Likewise. 2006-05-05 Daniel Jacobowitz * gdb.texinfo (Remote Configuration): Remove "set remotedebug" and "show remotedebug". (Debugging Output): Add additional index entries. 2006-04-27 Michael Snyder * gdb.texinfo (delete-fork): Command renamed to "delete fork". 2006-04-22 Andrew Cagney * gdb.texinfo (Contributors): Credit frame unwinder contributors. * gdbint.texinfo (Algorithms): Fix errors in frame documentation. 2006-04-18 Daniel Jacobowitz * gdbint.texinfo (x86 Watchpoints, Target Conditionals): Update insert and remove breakpoint prototypes. (Watchpoints): Move description of target_insert_hw_breakpoint and target_remove_hw_breakpoint ... (Breakpoints): ... to here. Document target_insert_breakpoint and target_remove_breakpoint. 2006-04-17 Jim Blandy * gdb.texinfo (Packets): Note that 'addr' arguments to s, S, c, and C packets are optional. 2006-04-14 Frederic Riss * gdb.texinfo (Specifying source directories): Update the description of the source file search to reflect the fact that the source path always contains at least $cdir and $cwd. 2006-03-31 Michael Snyder * gdb.texinfo: Update copyright dates. 2006-03-31 Eli Zaretskii * gdb.texinfo (Overview): Add an index entry to "empty response". 2006-03-28 Jim Blandy * gdbint.texinfo (Prologue Analysis): New section. 2006-03-07 Jim Blandy * gdb.texinfo (Connecting): Document 'target remote pipe'. * gdb.texinfo (Target Commands): Update text describing how to specify a target. Refer to the detailed section on remote debugging, not the brief mention. * gdb.texinfo (Connecting): Organize the different 'target remote' connection methods into a table. Add a 'target remote' index entry. (!!!) 2006-02-17 Fred Fish * gdb.texinfo (Symbols): Update descriptions of 'whatis' and 'ptype' commands to reflect the fact that the only significant difference between them is that ptype prints the complete type description instead of just the name. 2006-02-13 Wu Zhou * gdbint.texinfo (Watchpoints): Delete TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT. 2006-02-10 Nick Roberts * gdb.texinfo (GDB/MI Breakpoint Table Commands): Add fullname and times fields where needed. Fix typos. Update general form given for output of -break-insert. (GDB/MI): Abbreviate some unnecessarily long fullnames. 2006-02-06 Daniel Jacobowitz * gdbint.texinfo (Symbol Handling): Add a section on memory management. 2006-02-06 Vladimir Prus * gdb.texinfo (Breakpoint table commands): Document the fullname field in -break-list output. 2006-02-03 Eli Zaretskii * gdb.texinfo (Cygwin Native): Fix typos. Clarify the types of debugging information produced by the various "set debug..." options. 2006-02-01 Daniel Jacobowitz * gdb.texinfo (Files): Remove obsolete bits from the description of "symbol-file". 2006-01-25 Jim Blandy * gdbint.texinfo (Testsuite): Explain how to run selected tests. 2006-01-24 Jim Blandy * gdbint.texinfo (Frames): Document the basics of GDB's register unwinding model, and explain the existence of the "sentinel" frame. 2006-01-23 Andrew Stubbs * gdb.texinfo (Choosing files): Mention that -directory is used for script files. (Specifying source directories): Likewise. (Command files): Explain how script files are found. 2006-01-21 Eli Zaretskii * gdb.texinfo (Backtrace): Describe how to get backtrace of all the threads in a multi-threaded program. (Threads): The threadno argument of "thread apply" can be a range of numbers. 2006-01-18 Jim Blandy * gdbint.texinfo (Coding): Add entry for -Wno-pointer-sign to list of warning flags. 2006-01-13 Eli Zaretskii * gdb.texinfo (Sequences): Improve menu annotations. (Define): Add index entries for arguments of user-defined commands. Move the description of flow-control commands... (Command Files): ...to here. Document loop_break and loop_continue. (Define, Command Files): Document `end' and add index entries for it. 2006-01-04 Michael Snyder * gdb.texinfo: Add documentation for linux-fork. * gdbint.texinfo: Add internal documentation for checkpoints. 2006-01-02 Paul N. Hilfinger * gdb.texinfo (Omissions from Ada): Document that there is now limited aggregate support. 2005-12-28 Eli Zaretskii * gdb.texinfo (Registers): Describe how to refer to SSE and MMX registers and the likes. 2005-12-24 Eli Zaretskii * gdb.texinfo (Target Commands, Bug Reporting, File Options) (Symbols): Fix usage of "e.g.". (Memory Region Attributes): Fix usage of "etc." * gdbint.texinfo (libgdb, Symbol Handling, Native Debugging) (Coding): Fix usage of "e.g.". 2005-12-23 Eli Zaretskii * stabs.texinfo: * refcard.tex: * gpl.texi: * gdbint.texinfo: * gdb.texinfo: * gdb-cfg.texi: * fdl.texi: * annotate.texinfo: * all-cfg.texi: * Makefile.in: Add (C) after Copyright. Update the FSF address. 2005-12-03 Eli Zaretskii * gdb.texinfo (Connecting): Explain that `monitor' is a way to extend GDB with commands for external monitor. 2005-12-02 Andrew Stubbs * gdb.texinfo (Convenience variables): Add init-if-undefined command. 2005-11-25 Joel Brobecker * gdbint.texinfo (Start of New Year Procedure): New chapter. 2005-11-21 Jim Blandy * gdb.texinfo (Tracepoint Packets): Document restrictions on placement of 'R' actions in tracepoint action packets; document dependence of 'X' and 'M' actions on a preceding 'R' action for their registers. 2005-11-19 Jim Blandy * gdb.texinfo (Tracepoint Packets): New node. (General Query Packets): Add entries for the tracepoint packets, referring to the "Tracepoint Packets" node. (Tracepoints): Add reference to "Tracepoint Packets". 2005-11-18 Kevin Buettner * gdb.texinfo (set remotebreak): Add anchor. (X packet): Likewise. (Remote Protocol): Add new section `Interrupts' and new index entry `interrupts (remote protocol)'. 2005-11-18 Jim Blandy * gdb.texinfo (Packets): Move information out of 'q' and 'Q' entries into the General Query Packets section. Add a cross-reference to that section. Drop description of replies, as these are covered in the descriptions of each packet. (General Query Packets): Add introductory text. Explain naming conventions, and how the end of a name is recognized. 2005-11-17 Kevin Buettner * gdb.texinfo (Remote configuration): Fix typo in description of "set remotebreak" command. 2005-11-16 Jim Blandy * gdb.texinfo (Packets, Stop Reply Packets) (General Query Packets): Various formatting cleanups. - Use @samp for packet contents. - Drop summaries from packet @item lines; the same information appears immediately below in the description. - Delete paragraph breaks after packet @item commands, so that the description appears directly to the right of the packet prototype in the printed manual, if it fits. - Place spaces in packet prototypes between @vars and non-@var letters, and explain that they're just for formatting. - Use @dots{} instead of '...'. - Fix uses of @code where @var was needed. - Replace "deprecated" markers with English text spelling out the packet's status and the preferred alternatives. - Remove "(reserved)" markers on 'A' and 'I' packets; it's unclear what this ever meant. - Remove "(draft)" markers on 'i' packets; nobody has commented on this for a long time. - Remove "(draft)" markers on 'z' and 'Z' packets; these have been implemented several times, and have been in use for years. 2005-11-15 Jim Blandy * gdb.texinfo (Packets): Add index entries for 'm' packet disclaimers. * gdb.texinfo (Packets): Clarify lack of restrictions on behavior of stub when processing an 'm' packet. * gdb.texinfo (Packets): Mention that packets beginning with letters are reserved once, at the top, instead of actually listing them all and saying "reserved". 2005-11-15 Andrew Stubbs * gdb.texinfo (User-defined commands): Add $argc. Add missing 'end'. Change @var{$arg0 to @code{$arg0. 2005-11-14 Wu Zhou * gdb.texinfo (Fortran): Add some words about Fortran debugging. 2005-11-12 Jim Blandy * gdb.texinfo (General Query Packets): Put packets in alphabetical order. Remove extraneous 'z'. 2005-11-07 Andrew Stubbs * gdb.texinfo (Choosing files): Add --eval-command. 2005-11-04 Andrew Stubbs * gdb.texinfo (Choosing modes): Add --return-child-result. 2005-11-01 Andrew Stubbs * gdb.texinfo (Choosing modes): Add --batch-silent. 2005-10-28 Eli Zaretskii * gdb.texinfo (GDB/MI Variable Objects): Fix @pxref usage under "The -var-update Command". 2005-10-03 Joel Brobecker * gdb.texinfo (Print Settings): Add documentation for set/show print array-indexes. 2005-09-17 Daniel Jacobowitz * gdb.texinfo (Contributors): Thank Andrew Cagney for releases 6.2 and 6.3. 2005-08-27 Eli Zaretskii * gdb.texinfo (File Options): Don't document --mapped, it's gone since 19-Jan-2004. (Files): Likewise. (Variables, Symbols): Document the "" message and its reasons. 2005-08-01 Fred Fish * gdb.texinfo (SETUP_ARBITRARY_FRAME): Remove obsolete reference. 2005-07-15 Nick Roberts * gdb.texinfo (GDB/MI Variable Objects): Describe print-values option for -var-list-children and -var-update. (GDB/MI Stack Manipulation): Simplify description of print-values option for -stack-list-locals. (GDB/MI Command Description Format): Clarify. (Mode Options): Spelling of superseded. 2005-07-12 Bob Rossi * gdb.texinfo (GDB/MI Miscellaneous Commands): Fix -inferior-tty-show corresponding GDB command comment. 2005-07-06 Bob Rossi * gdb.texinfo (GDB/MI Miscellaneous Commands): Add -inferior-tty-set and -inferior-tty-show. (Input/Output): Document "set/show inferior-tty" and tty alias. 2005-07-02 Nathan J. Williams * gdb.texinfo (Packets): Change description of 'D' packet to note that GDB does wait for a response. 2005-06-22 Nick Roberts * gdb.texinfo (History) Rename "Command History". (Command History): Move node "Server Prefix" from section on Annotations here. 2005-06-19 Nick Roberts * gdb.texinfo (GDB/MI Stack Manipulation): Re-instate -stack-info-frame with example. Say that it gets info on selected frame, not current frame. 2005-06-18 Eli Zaretskii * gdb.texinfo (Server): Clarify that `file' should be used before connecting to the server. (Files): Add an xref to the above description. (Output Formats): More detailed description of the `c' format. (Memory): List explicitly all the formats supported by `x'. (Threads): Add an @cindex entry for "thread apply". (Files): Document the possibility of loading unlinked object files. Add more indexing for solib-absolute-prefix and --with-sysroot. (Machine Code): Document possible problems with locations in shared libraries. (Backtrace): Document that free-standing environments do not need to have a `main' function. 2005-06-18 Nick Roberts * gdb.texinfo (GDB/MI Stack Manipulation): Remove reference to -stack-info-frame. 2005-06-07 Andrew Cagney * gdb.texinfo (Contributors): Note the original multi-arch contributors. 2005-06-03 Eli Zaretskii * gdb.texinfo (Registers): Add index entries for the standard registers. (Frames): Add cross-reference from frame pointer description to the Registers node. (Annotations Overview): Fix the reference to GDB name. 2005-06-01 Eli Zaretskii * gdb.texinfo (Set Watchpoints): Remove @vindex entry for can-use-hw-watchpoints. 2005-05-28 Bob Rossi * gdb.texinfo (GDB/MI Out-of-band Records): Add bullet enumerating the possible reasons why an exec async record would be returned to FE. 2005-05-26 Andrew Cagney * gdb.texinfo: Note that Elena Zannoni, Fernando Nasser, and Andrew Cagney implemented the original GDB/MI. 2005-05-23 Orjan Friberg * gdb.texinfo (CRIS): Update the cris-version and cris-dwarf2-cfi documentation. Add documentation for cris-mode. 2005-05-20 Eli Zaretskii * gdb.texinfo (Numbers): Explain the example and make the wording more acurate. 2005-05-17 Daniel Jacobowitz Dennis Brueni * gdb.texinfo (GDB/MI Breakpoint Table Commands) (GDB/MI Data Manipulation, GDB/MI Program Control) (GDB/MI Stack Manipulation): Update examples to include the fullname attribute in stack frames. 2005-05-12 Eli Zaretskii * gdb.texinfo (Startup): Fix last change. Treat gdb.ini like we do with other non-standard names of init files. 2005-05-11 Eli Zaretskii * gdb.texinfo (Command Files): Move the description of the startup from here... (Startup): ...to this new subsection of the Invocation chapter. Rearrange the description of init files more logically and add a cross-reference to "Command Files". Document the special gdbinit name for CISCO 68k. Expand the description of what GDB does during startup. (History): Add index entry for HISTSIZE. 2005-05-02 Mark Kettenis * gdb.texinfo (Files): Remove documentation for auto-solib-limit. 2005-05-02 Eli Zaretskii * gdb.texinfo (SVR4 Process Information, The isatty call) (The system call): Don't use foo(N) notation for man pages and functions. (Compilation, DJGPP Native): Improve wording. 2005-04-27 Eli Zaretskii * gdb.texinfo (Backtrace): Describe backtraces with arguments that were optimized away. 2005-04-22 Eli Zaretskii * gdb.texinfo (Remote configuration): Document "set/show get-thread-local-storage-address". Add cross-reference to the description of the qGetTLSAddr packet. (General Query Packets): Mention "set remote get-thread-local-storage-address" and add a reference to its description. 2005-04-19 Nick Roberts * gdb.texinfo (Backtrace): Describe 'bt full'. 2005-04-17 Nick Roberts * gdb.texinfo (Mode Options): Fix typo. (GDB/MI): Describe how to invoke GDB/MI. 2005-04-16 Eli Zaretskii * gdb.texinfo (OS Information): Renamed from Auxiliary Vector; all references changed. Add description of "info udot". (Files): Document "set/show stop-on-solib-events". (M32R/D): Document "set/show download-path", "set/show board-address", "set/show server-address", "upload", "tload". Document "sdireset", "sdistatus", "debug_chaos", "use_debug_dma", "use_mon_code", "use_ib_break", "use_dbt_break". (Maintenance Commands): Improve indexing. (Target Commands): Document "set/show hash", "set/show debug monitor". (SVR4 Process Information): Document "info pidlist" and "info meminfo". Document "set/show procfs-tarce" and "set/show procfs-file". Document "proc-trace-*" and "proc-untrace-*". (Symbols, The Print Command with Objective-C): Improve indexing. (Objective-C): Add references to "info classes" and "info selectors". (Debugging Output): Improve wording. Document "set/show debug solib-frv". Fix "set/show debugvarobj". (Set Breaks): Add index entry for "hardware breakpoints". (Renesas ICE): Document "e7000", "ftplogin", "ftpload", "drain", and "set/show usehardbreakpoints". (MIPS Embedded): Document "se/show syn-garbage-limit", "set/show monitor-prompt", "set/show monitor-warnings", "pmon". (ARM): Document "rdilogfile", "rdilogenable", "set/show rdiromatzero", "set/show rdiheartbeat". (PowerPC): Document SDS-specific commands "set/show sdstimeout", "sds". (Embedded Processors): Document the "sim" command. (Remote): Document the "remote" command. (DJGPP Native): Document the "info serial" command. (Threads): Document "maint info sol-threads". (Files): Document "nosharedlibrary", "add-symbol-file-from-memory". (Set Breaks): Improve indexing. (Command Syntax): Add a reference to dont-repeat. (Define): Document "dont-repeat". (TUI Commands): Document "tabset". (WinCE): New subsection. Document "set/show remotedirectory", "set/show remoteupload", "set/show remoteaddhost". 2005-04-15 Eli Zaretskii * gdb.texinfo (Hurd Native): New subsection, documents Hurd-specific commands. (Maintenance Commands): Add cross-reference to "Debugging Output". (Debugging Output): Document "set/show debug lin-lwp". (MIPS): Improve documentation of heuristic-fence-post. Document "set/show mips abi", "set/show mips saved-gpreg-size", "set/show mips stack-arg-size", "set/show mips mask-address", "set/show mips remote-mips64-transfers-32bit-regs", "set/show debug mips". (ARM): Document ARM-specific commands. (AVR): New section. Document "info io_registers". (CRIS): New section. Document "set/show cris-version" and "set/show cris-dwarf2-cfi". (HPPA): New section. Document "set/show debug hppa" and "maint print unwind". (Neutrino): New subsection. Document "set/show debug nto-debug". (Super-H): New section. Document the "regs" command. (Debugging Output): Document "set/show debug aix-thread". 2005-04-09 Eli Zaretskii * gdb.texinfo (Print Settings): Document "set/show print pascal_static-members", "set print repeats", "show print null-stop". Improve indexing. Fix documentation of "set print union". (Pascal): New section. (Supported languages): Rename from "Support"; all references updated. Add a menu item for Pascal. (Numbers): Document "set radix. (Screen Size): Document "set/show pagination". (MIPS Embedded): Remove "set processor" documentation. (Remote configuration): Document "set/show X/P/Z-packet", "set/show read-aux-vector-packet", "set/show remote symbol-lookup-packet", "set/show remote verbose-resume-packet", "set/show remoteaddresssize", "set/show remotebaud", "set/show remotedebug", "set/show remotebreak", "set/show remotedevice", "set/show remotelogfile". (Auxiliary Vector): Add reference to the description of the read-aux-vector-packet setting. (Set Watchpoints): Add a cross-reference to "set remote hardware-breakpoint-limit". (General Query Packets): Add indexing of requests and cross-references to related commands in "Remote configuration". (File-I/O Overview, The system call): Fix wording and typos. (Thread Stops): Add index entries. (Continuing and Stepping): Document "show step-mode". (i386): New node. Document "set/show struct-convention". (Files): Document "show trust-readonly-sections". (Calling): Document "set/show unwindonsignal". (Messages/Warnings): Add index entries. (Maintenance Commands): Document "set/show watchdog". (Annotations Overview): Document "show annotate". (Set Watchpoints): Add index entries. (Symbols): Fix doc of case-sensitive. (ABI): Document "show coerce-float-to-double". (Convenience Vars, Help): Improve indexing. (Machine Code): Document "show disassembly-flavor". (Debugging C plus plus): Document "show overload-resolution". (Value History, Signaling): Add index entries. 2005-04-08 Eli Zaretskii * gdb.texinfo (Show): Move @kindex entries to their proper places. (Processes): Fix wording. (History, List, Logging output, Define, Symbols, Print Settings): Improve indexing. 2005-04-03 Eli Zaretskii * gdb.texinfo (Targets): Document "set/show architecture". Remove redundant index entry for "target" command. (Backtrace): Add index entries. (Symbols, Fortran): Document the "set case-sensitive" command. (DJGPP Native): Document "set com1base", "set com1irq", etc. (Print Settings): Add index entry for "set demangle-style". (Target Commands): Document "set download-write-size". (Debugging Output): Document "set exec-done-display". 2005-04-02 Eli Zaretskii * gdb.texinfo (Files): Fix the name and documentation of add-shared-symbol-files. Document its alias assf. Update the list of OSs where GDB supports shared libraries. Fix markup. (Continuing and Stepping): Add reference to @var{location} in the text. (Dump/Restore Files): Fix reference to @{filename}. (Help): Fix wording. (Attach): Ditto. (Set Watchpoints): Ditto. (Backtrace): Remove redundant index entries. Improve index entries. (Delete Breaks): Fix wording. (Memory): Document the compare-sections command. (Memory Region Attributes): Improve wording. (Disabling): Improve wording. (Fortran): New subsection. Document the "info common" command. (Help): Document aliases "info copying" and "info warranty". (Caching Remote Data): New section. Document the "set/show remotecache" and "info dcache" commands. (Show): Fix wording of the documentation of the "set extension-language" command. (Signals): Add index entry for "info handle". (Memory Region Attributes): Fix punctuation. (Symbols): Change the arg name to "location" and refer to it in the text. Fix wording of "info types" doc. (Threads): Fix usage of @enumerate @item's. (Listing Tracepoints): Add index entry for "info tp". (Set Watchpoints): Add xref to "info break" description. (Macros): Add an index entry for "macro exp1". Document the "macro list" command. (Maintenance Commands): Document "flushregs", "maint agent", "maint check-symtabs", "maint cplus", "maint demangle", "maint deprecate", "maint undeprecate", "maint dump-me", "maint packet", "maint print architecture", "maint print objfiles", "maint print statistics", "maint print type", "maint show-debug-regs", "maint space", "maint time", and "maint translate-address". (Connecting): Document the "monitor" command. (Annotations Overview): Describe the "set annotate" command. 2005-04-01 Eli Zaretskii * gdb.texinfo (Set Watchpoints): Document can-use-hw-watchpoints. Rearrange index entries and improve wording about support for hardware watchpoints. 2005-03-10 Bob Rossi * gdb.texinfo: Update copyright 2005-02-09 Theodore A. Roth * gdb.texinfo (General Query Packets): Fix texinfo compile warning and error. 2005-02-03 Kevin Buettner * gdb.texinfo (General Query Packets): Document qGetTLSAddr packet. 2005-01-17 Michael Snyder * gdb.texinfo: Fix spelling, infinte -> infinite. 2005-01-08 Mark Kettenis * observer.texi (GDB Observers): Document "solib_loaded". 2005-01-07 Andrew Cagney * configure.ac: Rename configure.in, require autoconf 2.59. * configure: Re-generate. * configure.in: Replace configdirs with multiple references to AC_CONFIG_SUBDIRS. * configure: Re-generate. 2005-01-04 Andrew Cagney * gdbint.texinfo (Versions and Branches): Make the date (YYYYMMDD) part of the version number. 2004-12-24 Mark Kettenis * gdbint.texinfo (Algorithms): Remove description of TARGET_DISABLE_HW_WATCHPOINTS and TARGET_ENABLE_HW_WATCHPOINTS. 2004-12-07 Jim Blandy * gdb.texinfo (General Query Packets): Specify that thread ID's in the 'qC' and 'qThreadInfo' packets are unsigned hexidecimal numbers. 2004-12-07 Andreas Schwab * gdb.texinfo (Mode Options): Document -l option. 2004-12-04 Eli Zaretskii * gdbint.texinfo (Algorithms): More accurate description of STOPPED_BY_WATCHPOINT. Point out that target_stopped_data_address is not needed unless data-read and data-access watchpoints are supported. Add a description of how GDB checks whether the inferior stopped because a watchpoint was hit. 2004-11-23 Eli Zaretskii * gdb.texinfo (Files): Add cross-reference to description of -readnow command-line switch. 2004-11-10 Randolph Chung * gdb.texinfo: Document set/show backtrace past-entry commands. Rearrange index entries for set/show backtrace past-main. 2004-11-10 Jon Beniston Committed by Andrew Cagney . * gdb.texinfo (Remote Serial Protocol): Further describe binary transfer escaping mechanism . 2004-11-08 Randolph Chung * gdb.texinfo (inferior_debugging info): Document "set debug infrun" and "show debug infrun". Add index entries. 2004-10-23 Eli Zaretskii * gdb.texinfo (SVR4 Process Information): Document subcommands of "info proc" that are already implemented. Add index entries. (Working Directory): Add a cross-reference to "info proc" command. (Files): Add a tip for decreasing memory used for symtabs from shared libraries. (Starting): Fix whitespace; make "elaboration" stand out where it is first used, and add an index entry for the term. (Calling): Expand and elaborate text. Add "print". Add the description of problems with weak aliases. (Core File Generation): New section. 2004-10-12 Andrew Cagney * gdbint.texinfo (Versions and Branches): New chapter. (Releasing GDB): Delete "Versions and Branches" section. (Top): Add "Versions and Branches". 2004-10-08 Eli Zaretskii * gdb.texinfo (Editing, History): Add cross-references to the included Readline and History user documentation. Remove references to the symbol have-readline-appendices which is unused and undefined. (History): Fix indexing. 2004-10-08 Jeff Johnston * gdbint.texinfo (target_stopped_data_address): Update to new prototype. (i386_stopped_data_address): Update prototype and description. (i386_stopped_by_watchpoint): New function and description. 2004-10-03 Paul N. Hilfinger * gdb.texinfo (Filenames): Add Ada suffixes. (Ada) New section. 2004-09-27 Andrew Cagney Robert Picco * gdb.texinfo (Packets): Document the "p" packet. 2004-09-21 Jason Molenda (jmolenda@apple.com) * gdb.texinfo (Paths and Names of the Source Files): Document the meaning of values in the 'desc' field of a SO stab. 2004-09-20 Daniel Jacobowitz * gdb.texinfo (Maintenance Commands): Document "maint set dwarf2 max-cache-age" and "maint show dwarf2 max-cache-age". 2004-09-16 Eli Zaretskii * gdb.texinfo (Set Breaks): Add index entry for setting breakpoints on overloaded C++ functions that are not members of any classes. Add an example and an index entry for setting breakpoints on all program functions. (Character Sets, Macros, Overlay Commands) (Non-debug DLL symbols, GDB/MI Output Syntax) (Annotations Overview, Maintenance Commands, File-I/O Overview): Use "(@value{GDBP})" instead of a literal "(gdb)". 2004-09-12 Andrew Cagney * gdbint.texinfo (Native Debugging): Delete description of FILES_INFO_HOOK. 2004-09-11 Paul Hilfinger * gdbint.texinfo (User Interface): Change local_hex_string_custom to hex_string_custom (not historically correct, but more understandable, given the current code). 2004-09-03 Andrew Cagney * gdbint.texinfo (Native Debugging): Delete SVR4_SHARED_LIBS. 2004-09-01 Jeff Johnston * observer.texi (solib_unloaded): New observer. 2004-08-24 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Add missing comma. 2004-08-20 Michael Chastain * (Using the Testsuite): build != host is supported, but some test scripts do not support build != host. 2004-08-14 Mark Kettenis * gdbint.texinfo (Host Definition): Delete description of FCLOSE_PROVIDED and GETENV_PROVIDED. 2004-08-05 Mark Kettenis * gdbint.texinfo (Host Definition): Delete description of NO_SYS_FILE. (Native Debugging): Delete description of KERNEL_U_ADDR_BSD and PTRACE_FP_BUG. 2004-08-05 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete reference to deprecated_read_fp. 2004-08-02 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete description of DEPRECATED_REGISTER_BYTES. 2004-07-30 Baurjan Ismagulov * gdb.texinfo (Source Path): Document the new behavior of searching for the source files. 2004-07-17 Eli Zaretskii * gdb.texinfo (Edit): Fix markup of EDITOR and improve wording. (Search, Expressions, Arrays, Variables, Data, Machine Code) (Auto Display): Improve indexing. 2004-07-16 Andrew Cagney * gdb.texinfo (Mode Options): Delete documentation on "-async" and "-noasync". 2004-07-09 Eli Zaretskii * gdb.texinfo: Fix @kindex entries so that multiple commands that have the same prefix have only their prefix in the index. 2004-07-03 Mark Kettenis * gdb.texinfo (BSD libkvm Interface): New node (section) (Native): Add it to the menu. 2004-07-01 Mark Kettenis * gdbint.texinfo (Target Architecture Definition): Remove PCC_SOL_BROKEN. 2004-06-24 Mark Kettenis * gdbint.texinfo (Target Architecture Definition): Remove SUN_FIXED_LBRAC_BUG. 2004-06-26 Andrew Cagney * gdbint.texinfo (Coding): Replace xasprintf with xstrprintf. 2004-06-20 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Deprecate USE_STRUCT_CONVENTION. 2004-06-19 Michael Chastain gdb.texinfo (Bug Reporting): Mention session recording, with the script command or Emacs. 2004-06-18 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Deprecate FUNCTION_START_OFFSET. 2004-06-14 Andrew Cagney Based on changes from Karl Berry. * gdb.texinfo: Do not use @sc in a direntry. * stabs.texinfo: Change @dircateogry to "Software development". * gdbint.texinfo, gdb.texinfo, annotate.texinfo: Ditto. 2004-06-13 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete description of RETURN_VALUE_ON_STACK. 2004-06-09 Andrew Cagney * gdbint.texinfo (Native Debugging): Restore "@table @code" deleted by previous patch. 2004-06-08 Andrew Cagney * gdbint.texinfo (Native Debugging): Delete documentation on ATTACH_DETACH. 2004-06-06 Randolph Chung * gdb.texinfo (push_dummy_call): Use @code{struct value}. 2004-06-06 Randolph Chung * gdb.texinfo (push_dummy_call): Update argument list to match the new push_dummy_call method signature. Describe the function argument. 2004-05-24 Joel Brobecker * gdb.texinfo (Starting): Document new start command. 2004-05-21 Andrew Cagney * observer.texi (GDB Observers): Document "inferior_created". 2004-05-08 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete description of DO_DEFERRED_STORES. * gdbint.texinfo (Target Architecture Definition): Delete references to DEPRECATED_FIX_CALL_DUMMY. * gdbint.texinfo (Target Architecture Definition): Delete description of DEPRECATED_CALL_DUMMY_WORDS, DEPRECATED_SIZEOF_CALL_DUMMY_WORDS, and CALL_DUMMY. * gdbint.texinfo (Target Architecture Definition): Delete description of DEPRECATED_PUSH_DUMMY_FRAME. * gdbint.texinfo (Target Architecture Definition): Delete reference to DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET. 2004-05-07 Andrew Cagney * observer.texi (GDB Observers): Add "Debugging" section. Include cross reference to "set/show debug observer". * gdb.texinfo (Debugging Output): Document "set/show debug observer". 2004-05-01 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete description of DEPRECATED_PC_IN_SIGTRAMP. 2004-04-30 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete documentation for BELIEVE_PCC_PROMOTION_TYPE, no longer defined. 2004-04-30 Orjan Friberg * observer.texi (GDB Observers): Correct spelling. 2004-04-26 Orjan Friberg * observer.texi (GDB Observers): Add target_changed event. 2004-04-08 Andrew Cagney * observer.texi (GDB Observers): Rework, provide generic observer definitions and then a list of observable events. 2004-04-04 Andrew Cagney * gdbint.texinfo (Host Definition): Delete reference to NO_SIGINTERRUPT. 2004-04-02 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete reference to DEPRECATED_CALL_DUMMY_LENGTH. 2004-03-28 Stephane Carrez * gdb.texinfo (TUI Commands): Document tui reg commands. 2004-03-26 Andrew Cagney * gdb.texinfo (TUI): Delete reference to --enable-tui. Mention "gdbtui". (Mode Options): Mention "gdbtui". Use "Text" not "Terminal". (Contributors): Mention both Text and Terminal User Interface. 2004-03-23 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Deprecate references to SIGTRAMP_START and SIGTRAMP_END. 2004-03-23 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Deprecate references to PC_IN_SIGTRAMP. 2004-03-19 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete reference to GDB_TARGET_IS_HPPA. 2004-03-18 Andrew Cagney * gdbint.texinfo (Coding): Update section on gdbarch_data, describe pre_init and post_init. 2004-03-09 Daniel Jacobowitz * gdb.texinfo (Debugging Output): Document values for "set debug target". 2004-02-28 Andrew Cagney * gdb.texinfo (Contributors): Mention GDB 6.1 release engineer. 2004-02-26 Jeff Johnston * gdb.texinfo (breakpoints): Add information about the new "set breakpoint pending" and "show breakpoint pending" commands. 2004-02-26 Andrew Cagney * gdbint.texinfo (Coding): Document use of gdbarch_obstack_zalloc in Per-architecture module data section. 2004-02-25 Roland McGrath * gdb.texinfo (General Query Packets): Document qPart:... packets. 2004-02-24 Andrew Cagney * annotate.texinfo: Wrap fdl.texi include in raise/lower sections. * gdb.texinfo, gdbint.texinfo, stabs.texinfo: Ditto. * fdl.texi: Import Version 1.2, November 2002. 2004-02-17 Andrew Cagney * gdb.texinfo (Mode Options): Note that "mi1" is deprecated. 2004-02-16 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Deprecate FRAMELESS_FUNCTION_INVOCATION. 2004-02-16 Andrew Cagney * gdbint.texinfo (Coding): Mention -Wunused-function. 2004-02-14 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete description of DEPRECATED_CALL_DUMMY_STACK_ADJUST. 2004-02-12 Elena Zannoni * gdb.texinfo: Properly quote the name "C++". * gdbint.texinfo: Ditto. * stabs.texinfo: Ditto. 2004-02-11 Elena Zannoni * gdbint.texinfo (Support Libraries): Add doco about obstacks and minimal information about libiberty. 2004-02-06 Michael Chastain * gdb.texinfo (Auxiliary Vector): Fix thinko with @value{GDBN}. 2004-02-04 Roland McGrath * gdb.texinfo (Auxiliary Vector): New node (section). (Data): Add it to the menu. 2004-02-02 Jeff Johnston * gdb.texinfo (Breakpoints): Add information about pending breakpoint support. 2004-01-26 Andrew Cagney * gdb.texinfo (Overview): Delete references to the cisco protocol including the "N" response. 2004-01-26 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Rename EXTRACT_STRUCT_VALUE_ADDRESS to DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS. 2004-01-24 Eli Zaretskii * gdb.texinfo (KOD): Document "show os". Add index entries for "set/show os" and "info cisco" commands. 2004-01-21 Eli Zaretskii * Makefile.in (install-info): Prepend $(DESTDIR) to $(infodir). 2004-01-19 Michael Chastain * gdbint.texinfo: Delete USE_MMALLOC, NO_MMCHECK, MMCHECK_FORCE, MMAP_BASE_ADDRESS, MMAP_INCREMENT. 2004-01-19 Nick Roberts * gdb.texinfo (GDB/MI Stack Manipulation): Describe extension to -stack-list-locals. (GDB/MI Variable Objects): Describe extension to -var-list-children. 2004-01-17 Daniel Jacobowitz * gdbint.texinfo (DECR_PC_AFTER_HW_BREAK): Don't document. 2004-01-17 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete documentation on DEPRECATED_NPC_REGNUM. 2004-01-13 Daniel Jacobowitz * gdb.texinfo: Update copyright year. Mention that set follow-fork-mode is supported on GNU/Linux. Remove documentation of "set follow-fork-mode ask". 2004-01-13 Andrew Cagney * gdbint.texinfo: Update copyright year. (Coding): Add -Wunused-label to list of -Werror warnings. 2004-01-08 Jason Molenda Eli Zaretskii * gdb.texinfo: Update copyright. (Objective-C): "methodName" typeo fixed. Add @code/@var markup around names, as appropriate. Minor syntax cleanup of _NSPrintForDebugger explanation. Two spaces after periods. GDBN used instead of lit. "gdb". Index entries added for print-object and _NSPrintForDebugger. @noindent added in one spot. 2003-11-11 Elena Zannoni * stabs.texinfo: Add dircategory and direntry commands. * annotate.texinfo: Ditto. 2003-11-10 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Replace the return_value method's "inval" and "outval" parameters with "readbuf" and "writebuf". 2003-10-28 Jim Blandy * gdb.texinfo (The F request packet, The F reply packet): Renamed from "The `F' request packet" and "The `F' reply packet", to make texi2dvi happy. (File-I/O remote protocol extension): Update menu entries, too. 2003-10-26 Michael Chastain * gdb.texinfo (Thread Stops): Document the issue with premature return from system calls in multi-threaded programs. 2003-10-24 Andrew Cagney * annotate.texinfo: Fix "fortunatly"[sic]. 2003-10-23 Kei Sakamoto * gdb.texinfo (Contributors to GDB): Replace "Renesas" with "Hitachi" and "Mitsubishi". 2003-10-20 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Document gdbarch_return_value. Add cross references from USE_STRUCT_CONVENTION, EXTRACT_RETURN_VALUE, and STORE_RETURN_VALUE, and from/to EXTRACT_STRUCT_VALUE_ADDRESS. 2003-10-18 Mark Kettenis * gdbint.texinfo (Target Architecture Definition): Document regset_from_core_section. 2003-10-16 Kei Sakamot Sakamoto * gdb.texinfo (M32R/D): Mention m32rsdi target. 2003-10-15 Kevin Buettner From Anthony Green : * gdb.texinfo (Breakpoints related warnings): Insert into menu. 2003-10-14 Kevin Buettner * gdb.texinfo (Breakpoint related warnings): New node. * gdbint.texinfo (ADJUST_BREAKPOINT_ADDRESS): Document. 2003-10-13 Daniel Jacobowitz * gdb.texinfo (Remote Protocol): Document v and vCont. 2003-10-10 Kei Sakamoto * gdb.texinfo: Replace "Hitachi" and "Mitsubishi" with "Renesas". * gdbint.texinfo: Ditto. 2003-10-09 Andrew Cagney From 2003-09-18 David Anderson : * gdb.texinfo (GDB/MI Symbol Query): Replace "comamnd" with "command". 2003-10-03 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Deprecate IBM6000_TARGET. Mention that it implies an RS/6000 system and not just target. 2003-10-02 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Rename REGISTER_RAW_SIZE to DEPRECATED_REGISTER_RAW_SIZE. * gdb.texinfo (Packets, Stop Reply Packets): Ditto. * gdbint.texinfo (Target Architecture Definition): Rename 2003-09-30 Andrew Cagney REGISTER_VIRTUAL_SIZE to DEPRECATED_REGISTER_VIRTUAL_SIZE. (Target Architecture Definition): * gdbint.texinfo (Target Architecture Definition): Rename REGISTER_VIRTUAL_TYPE to DEPRECATED_REGISTER_VIRTUAL_TYPE. 2003-09-29 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete documentation for NEED_TEXT_START_END. * gdbint.texinfo (Target Architecture Definition): Rename NPC_REGNUM to DEPRECATED_NPC_REGNUM. Add cross reference to TARGET_WRITE_PC. 2003-09-22 Michael Chastain * gdbint.texinfo (Testsuite Organization): Change gdb.c++ to gdb.cp. 2003-09-21 Anthony Green * gdbint.texinfo (Target Architecture Definition): Fix typos. 2003-09-21 Mark Kettenis * gdbint.texinfo (Target Architecture Definition): Document stabs_argument_has_addr. 2003-09-18 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete documentation on REGISTER_NAMES. 2003-09-13 Mark Kettenis * gdbint.texinfo (Target Architecture Definition): Replace REG_STRUCT_HAS_ADDR with DEPRECATED_REG_STRUCT_HAS_ADDR. 2003-09-11 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Replace STACK_ALIGN with DEPRECATED_STACK_ALIGN. 2003-08-18 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Document "frame_red_zone_size". 2003-08-09 Andrew Cagney * gdb.texinfo (Backtrace): Replace "set/show backtrace-below-main" with "set/show backtrace past-main" and "set/show backtrace limit". 2003-08-08 H.J. Lu * Makefile.in (install-info): Support DESTDIR. (install-html): Likewise. 2003-08-07 Andrew Cagney Patch from Nick Roberts. * gdb.texinfo (Using GDB under GNU Emacs): Fix/update key bindings. Remove description of send-gdb-command. 2003-08-07 Andrew Cagney * gdb.texinfo (Mode Options): Mention that "mi2" was included in GDB 6.0. 2003-08-06 Andrew Cagney * gdb.texinfo (Mode Options): Mention that level three is the highest available and that level 2 is deprecated. (Annotations Overview): Mention annotation levels. Cross reference to "Limitations of the Annotation Interface" in annotate.texi. (TODO, Value Annotations, Frame Annotations): Delete section. (Displays, Breakpoint Info): Delete. 2003-08-04 Andrew Cagney * agentexpr.texi: Delete @bye. * Makefile.in (STABS_DOC_SOURCE_INCLUDES): Add "fdl.texi" (stabs.info): Add $(srcdir) to include search path. (html): Depend on "annotate_toc.html", and not "annotate.html". * stabs.texinfo: Ditto. Include "fdl.texi". * gdbint.texinfo: Update copyright statement's list of invariant sections. 2003-07-28 Andrew Cagney * Makefile.in (INFO_DEPS): Add annotate.info. (dvi, ps, html, pdf): Add annotate. (ANNOTATE_DOC_SOURCE_INCLUDES): New macro. (ANNOTATE_DOC_BUILD_INCLUDES): New macro. (ANNOTATE_DOC_FILES): New macro. (ANNOTATE_TEX_TMPS): New macro. (annotate.info, annotate_toc.html): Specify dependencies. (annotate.ps, annotate.pdf, annotate.dvi): Ditto. * annotate.texinfo: Rename annotate.texi. Get building. Add "Migrating to GDB/MI" and "Limitations of the Annotation Interface" chapters. Mention why it is not part of the user guide. Update copyright notice. Include "fdl.texi". 2003-07-26 Stephane Carrez * gdb.texinfo (TUI Keys): Document C-x o key to switch active window. 2003-07-24 Daniel Jacobowitz * gdbint.texinfo (libgdb components): Correct a GDB to GDBN. 2003-07-24 Daniel Jacobowitz * gdb.texinfo (Server): Mention pidof. 2003-07-22 Andrew Cagney * gdbint.texinfo (Coding): Add -Wformat-nonliteral to -Werror list. 2003-06-28 Daniel Jacobowitz * gdb.texinfo (Logging output): New chapter. 2003-06-24 Joel Brobecker * gdb.texinfo (Unsupported languages): New section. (Languages): Add link to new section. 2003-06-22 Andrew Cagney * gdb.texinfo (Contributors): Mention 6.0 release engineer. 2003-06-22 Daniel Jacobowitz * gdbint.texinfo (Coding): Clarify use of gdb_XXX.h headers. 2003-06-22 Daniel Jacobowitz * Makefile.in (SFILES_INCLUDED): Add agentexpr.texi. * agentexpr.texi: Retitle section, and change it to an appendix. Comment out texinfo initialization. Factor a @var{} into two pieces to prevent makeinfo warnings. * gdb.texinfo: Add Agent Expressions appendix. 2003-06-19 Daniel Jacobowitz * gdbint.texinfo (Native Conditionals): Remove PREPARE_TO_PROCEED. 2003-06-18 Daniel Jacobowitz * gdb.texinfo (Remote Debugging): New section "Connecting to a remote target". Document the "detach" and "disconnect" commands. (Server, Netware, Debug Session): Reference "Connecting to a remote target". (GDB/MI Target Manipulation): Document "-target-disconnect". 2003-06-13 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Deprecate REMOTE_BREAKPOINT, LITTLE_REMOTE_BREAKPOINT, and BIG_REMOTE_BREAKPOINT. Cross reference BREAKPOINT_FROM_PC. 2003-06-09 Jim Blandy * gdb.texinfo (Separate Debug Files): Remove extra semicolon. 2003-06-08 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete documentation on FRAME_ARGS_ADDRESS_CORRECT. 2003-06-08 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Document "unwind_sp". Cross reference "unwind_sp" and TARGET_READ_SP. 2003-06-07 Adam Fedor * gdb.texinfo: Add Objective-C documentation. 2003-06-01 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Add "func_addr" parameter to "push_dummy_call". Rename "dummy_addr" to "bp_addr". 2003-05-21 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete references to "extract_address" and "store_address". 2003-05-16 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Replace REGISTER_BYTES with DEPRECATED_REGISTER_BYTES. Fix typo, DEPRECATED_REGISTER_SIZE instead of REGISTER_BYTE. 2003-05-14 Theodore A. Roth * gdbint.texinfo (Breakpoint Handling): Correct a double negative. 2003-05-10 H.J. Lu * Makefile.in (gdb-cfg.texi): Replace $$LN_S with $(LN_S). (gdb.dvi): Likewise. (gdb.pdf): Likewise. (links2roff): Likewise. 2003-05-08 Jim Blandy * gdb.texinfo (Dump/Restore Files): Update documentation for 'dump', 'append', and 'restore': note that format argument is optional; simplify presentation of the command variants; and be more precise about the formats. 2003-05-07 Jim Blandy * gdb.texinfo (Symbols): Update documentation: 'maint list symtabs' and 'maint list psymtabs' have been renamed 'maint info symtabs' and 'maint info psymtabs'. 2003-05-05 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Make CALL_DUMMY_WORDS, SIZEOF_CALL_DUMMY_WORDS, CALL_DUMMY_LENGTH, FIX_CALL_DUMMY, CALL_DUMMY_BREAKPOINT_OFFSET and CALL_DUMMY_BREAKPOINT_OFFSET deprecated. 2003-05-04 Andrew Cagney * gdb.texinfo (Maintenance Commands): Document "maint print dummy-frames". 2003-05-04 Andrew Cagney * gdb.texinfo (GDB/MI Symbol Query): Use @{ and @}. 2003-05-03 J. Brobecker Thierry Schneider * gdb.texinfo (section GDB/MI Symbol Query): Add documentation for new MI command. 2003-05-03 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Document push_dummy_code. Add cross references. 2003-05-02 Elena Zannoni * gdb.texinfo (Character Sets): Update to reflect new behavior of set/show charsets commands. 2003-04-28 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Replace read_fp, TARGET_READ_FP and FP_REGNUM, with deprecated_read_fp, DEPRECATED_TARGET_READ_FP and DEPRECATED_REGNUM. 2003-04-28 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Rename "tm_print_insn" to "deprecated_tm_print_insn". 2003-04-09 Jim Blandy * gdb.texinfo (Symbols): Document 'maint list symtabs' and 'maint list psymtabs'. 2003-04-08 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete references to EXTRA_FRAME_INFO. 2003-04-08 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete PRINT_TYPELESS_INTEGER. 2003-04-02 J. Brobecker * observer.texi (GDB Observers): Adjust the documentation for the normal_stop notification to better describe reality. Fix a couple of minor typos. 2003-04-02 Bob Rossi * gdb.texinfo (GDB/MI Program Control): Add '-file-list-exec-source-file' 2003-03-31 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete references to CALL_DUMMY_P. 2003-03-30 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Remove reference to TARGET_WRITE_SP. 2003-03-27 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Remove references to write_sp. 2003-03-27 Andrew Cagney * gdb.texinfo (GDB/MI Variable Objects): Replace @include with chapter body. Use @smallexample instead of @example. (Annotations): Ditto. * Makefile.in (GDB_DOC_SOURCE_INCLUDES): Remove gdbmi.texinfo and annotate.texi. 2003-03-26 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Replace PUSH_ARGUMENTS with push_dummy_call, add gdbarch, regcache and dummy_addr parameters. 2003-03-25 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete reference to CALL_DUMMY_STACK_ADJUST_P. Rename CALL_DUMMY_STACK_ADJUST to DEPRECATED_CALL_DUMMY_STACK_ADJUST. Add reference to PUSH_ARGUMENTS. 2003-03-23 Andrew Cagney * gdbint.texinfo (Algorithms, Target Architecture Definition): Deprecate FRAME_CHAIN and FRAME_CHAIN_VALID. 2003-03-18 J. Brobecker * gdbint.texinfo (Algorithms): Add new section describing the Observer paradigm. (Top): Add menu entry to new observer appendix. * observer.texi: New file. * Makefile.in (GDBINT_DOC_SOURCE_INCLUDES): Add dependency on new observer.texi file. 2003-03-17 Andrew Cagney * gdb.texinfo (DATE): Delete. Remove date from titles. Mention that GNU Press update the manual version number. 2003-03-12 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete references to get_saved_register. Rename GET_SAVED_REGISTER to DEPRECATED_GET_SAVED_REGISTER. 2003-03-13 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Replace POP_FRAME with DEPRECATED_POP_FRAME. Update description. 2003-03-12 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Rename FRAME_SAVED_PC to DEPRECATED_FRAME_SAVED_PC. 2003-03-10 Corinna Vinschen * gdb.texinfo: Add File-I/O documentation. 2003-03-10 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Cross reference FRAME_SAVED_PC to unwind_pc. Document unwind_pc. 2003-03-07 Andrew Cagney * gdb.texinfo (Debugging Output): Mention the "set/show debug frame" command. 2003-03-05 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Document unwind_dummy_id. Cross reference unwind_dummy_id and SAVE_DUMMY_FRAME_TOS. 2003-03-05 James Ingham Daniel Jacobowitz * gdb.texinfo (Configuring the current ABI): Document "set cp-abi" and "show cp-abi". 2003-03-03 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Document register_type. 2003-03-03 Andrew Cagney * stabs.texinfo (Structures): Use @samp and separate @var's instead of a single @var containing a comma separated list. (Unions): Ditto. 2003-03-02 Daniel Jacobowitz * Makefile.in (distclean): Remove config.log. 2003-03-01 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Rename FRAME_INIT_SAVED_REGS to DEPRECATED_FRAME_INIT_SAVED_REGS. 2003-03-01 Andrew Cagney * gdbint.texinfo: Rename INIT_EXTRA_FRAME_INFO to DEPRECATED_INIT_EXTRA_FRAME_INFO. 2003-02-23 Raoul Gough * gdb.texinfo (Cygwin Native): Links to Non-debug DLL symbols. (Non-debug DLL symbols): New node, describing the minimal symbols loaded from DLLs without real debugging symbols. 2003-02-20 Andrew Cagney * gdb.texinfo (Set Breaks): Add cross reference to "set remote hardware-breakpoint-limit". (Set Watchpoints): Add cross reference to "set remote hardware-watchpoint-limit". (Remote configuration options): New section. 2003-02-04 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete descrption of IS_TRAPPED_INTERNALVAR. From Keith Seitz : * gdb.texinfo (Interpreters): New chapter. Refer the command-line option "-i"/"--interpreter" to this chapter. Include index entries. 2003-02-04 David Carlton * gdb.texinfo (C@t{++}): Recommend DWARF 2, then stabs+. (Variables): Recommend stabs+ and DWARF 2. (C plus plus expressions): Correct info about compiler versions, debug formats. (Contributors): Change 'DWARF2' to 'DWARF 2'. PR symtab/874. 2003-02-01 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete description of ADDITIONAL_OPTIONS, ADDITIONAL_OPTION_CASES, ADDITIONAL_OPTION_HANDLER, and ADDITIONAL_OPTION_HELP, and BEFORE_MAIN_LOOP_HOOK, and DBX_PARM_SYMBOL_CLASS along with references to nindy and i960. * gdb.texinfo (i960): Delete all references to i960 and nindy. 2003-02-01 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete FLOAT_INFO. 2003-01-30 Andrew Cagney * stabs.texinfo (Member Type Descriptor): Clarify description of `@'. Suggested by Ben Hutchings. 2003-01-29 Andrew Cagney * gdb.texinfo (M68K): Delete reference to es1800. 2003-01-29 Andrew Cagney * gdb.texinfo (Maintenance Commands): Document `maint print reggroups' and `maint print register-groups'. * gdbint.texinfo (Target Architecture Definition): Document register_reggroup_p. 2003-01-23 Jim Blandy * gdb.texinfo (Separate Debug Files): New section. 2003-01-22 Daniel Jacobowitz * gdb.texinfo (Maintenance Commands): Add "maint set profile" and "maint show profile". 2003-01-16 Michael Chastain * gdb.texinfo (Installing GDB): Warn against ".../gdb-VERSION/gdb/configure". (Separate Objdir): Likewise. 2003-01-15 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete definition of PRINT_REGISTER_HOOK. 2003-01-15 Elena Zannoni (OpenRISC 1000): Fix formatting of command names. 2003-01-15 Elena Zannoni * gdb.texinfo (Continuing and Stepping): Add new command 'advance'. Clarify behavior of 'until'. 2003-01-13 Daniel Jacobowitz * gdb.texinfo (Files): Document solib-absolute-prefix and solib-search-path. 2003-01-09 Michael Chastain * gdbint.texinfo (Configuring @value{GDBN} for Release): Delete. (Create a Release): Add new instructions for new @file{src-release}. Document existing instructions for @file{Makefile.in} as being for @value{GDBN} 5.3.1 or earlier. 2003-01-09 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Mention frame_saved_regs_zalloc and frame_extra_info_zalloc as the way to allocate memory. 2003-01-04 Daniel Jacobowitz * gdb.texinfo (Controlling GDB): Add @kindex for "show osabi". (Backtraces): Add @kindex's for backtrace-below-main. 2003-01-04 Daniel Jacobowitz * gdb.texinfo (Controlling GDB): Document "set osabi". 2003-01-04 Daniel Jacobowitz * gdb.texinfo (Backtraces): Document "set backtrace-below-main". * gdbint.texinfo (FRAME_CHAIN_VALID): Update documentation. 2003-01-04 Daniel Jacobowitz * gdb.texinfo (Controlling GDB): Add ABI section. Document "set coerce-float-to-double". * gdbint.texinfo (COERCE_FLOAT_TO_DOUBLE): Remove documentation. 2003-01-02 Andrew Cagney * stabs.texinfo: Remove obsolete text. * gdbint.texinfo: Ditto. * gdb.texinfo: Ditto. 2002-12-22 Mark Kettenis * gdbint.texinfo (Target Architecture Definition): Update description of gdbarch_register_osabi. 2002-12-20 Kazu Hirata * agentexpr.texi: Fix typos. * annotate.texi: Likewise. * fdl.texi: Likewise. 2002-12-10 Andrew Cagney * gdbint.texinfo (Algorithms): Replace INIT_FRAME_PC with DEPRECATED_INIT_FRAME_PC. 2002-12-01 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete PC_IN_CALL_DUMMY. 2002-11-28 Andrew Cagney * gdbint.texinfo (Host Definition): Delete documentation on USE_GENERIC_DUMMY_FRAMES. 2002-11-26 Elena Zannoni Fix PR gdb/723 and PR gdb/245. * Makefile.in (install-info): Run the install-info command as part of the post install steps only. (uninstall-info): New target. (uninstall): New target. 2002-11-22 Elena Zannoni * Makefile.in (install): Make install do some real work. 2002-11-19 Andrew Cagney Fix POSIX problem reported by Paul Eggert. * Makefile.in (GDBvn.texi): Use `sed q' instead of `head -1'. Fix PR gdb/527. 2002-10-26 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete definition of DO_REGISTERS_INFO. 2002-10-18 Kevin Buettner * gdbint.texinfo (Address Classes): Fix problems with insertion of ``{'' and ``}'' in example. 2002-10-17 Kevin Buettner * gdbint.texinfo (Address Classes): New section. (Target Conditionals): Document ADDRESS_CLASS_NAME_TO_TYPE_FLAGS, ADDRESS_CLASS_NAME_TO_TYPE_FLAGS_P, ADDRESS_CLASS_TYPE_FLAGS, ADDRESS_CLASS_TYPE_FLAGS_P, ADDRESS_CLASS_TYPE_FLAGS_TO_NAME, and ADDRESS_CLASS_TYPE_FLAGS_TO_NAME_P. 2002-10-11 Klee Dienes * gdb.texinfo (Registers): Mention vector registers as well as floating registers in the documentation for 'info registers' and 'info all-registers'. 2002-10-11 Daniel Jacobowitz * gdbint.texinfo (CPLUS_MARKER): Remove item. 2002-10-03 Jeff Johnston * gdbint.texinfo (Item Output Functions): Add new ui_out_field_fmt_int interface definition. 2002-10-03 Marko Mlinar * gdb.texinfo (Target Commands): Add or1k target specific commands. * gdb.texinfo (Contributors): Add myself to the contributors list. 2002-10-01 Andrew Cagney * gdb.texinfo (Mode Options): Update --interpreter option. "mi2" and "mi1" instead of "mi1" and "mi0". 2002-09-29 Hans-Peter Nilsson * gdb.texinfo (Packets): Fix typos "alligned". Correct z3/Z3 description. Correct z4/Z4 title. 2002-09-27 Andrew Cagney * all-cfg.texi: Use @sc for GDB and GCC. Update copyright. 2002-09-25 Kevin Buettner * gdb.texinfo: Use GNU/Linux instead of Linux. 2002-09-25 Andrew Cagney * gdb.texinfo (Packets): Replace @samp{} with ``an empty string''. 2002-09-24 Andrew Cagney * gdb.texinfo: Replace @example with @smallexample. 2002-09-20 Kevin Buettner From Eli Zaretskii : * gdb.texinfo (Character Sets): Use @smallexample instead of @example. Use GNU/Linux instead of Linux. 2002-09-20 Jim Blandy * gdb.texinfo: Add character set documentation. 2002-09-19 Andrew Cagney * gdb.texinfo (Packets): Revise `z' and `Z' packet documentation. (Packets): Add cross reference from `b' packet to `z' packets. 2002-09-19 Andrew Cagney * gdb.texinfo (Maintenance Commands): Document ``maint internal-error'' and ``maint internal-warning''. * gdbint.texinfo (Target Architecture Definition): Revise description of STACK_ALIGN. Add description of FRAME_ALIGN. 2002-09-19 Joel Brobecker * gdbint.texinfo (Target Conditionals): Document the new NAME_OF_MALLOC macro. 2002-09-05 Andrew Cagney * gdb.texinfo (Contributors): Mention 5.2 and 5.3 release engineer. 2002-09-02 Stephane Carrez * gdb.texinfo (TUI Overview): Document status line fields. 2002-09-02 Stephane Carrez * gdb.texinfo (TUI Commands): Document info win command. 2002-09-01 Stephane Carrez * gdb.texinfo (TUI Overview): Document breakpoint markers. 2002-09-01 Stephane Carrez * gdb.texinfo (TUI Single Key Mode): Document new SingleKey mode. (TUI Keys): Likewise. 2002-08-25 Andrew Cagney * gdb.texinfo (Examples): Use ``->'' for a packet send and ``<-'' for a packet receive. 2002-08-25 Andrew Cagney * Makefile.in (clean): Move to end of file. (distclean, maintainer-clean, realclean): Ditto. (mostlyclean): Move rule to end of file. Use GDB_TEX_TMPS, GDBINT_TEX_TMPS, STABS_TEX_TMPS. (gdb.dvi, gdb.pdf): Do not cleanup TeX temp files after texi2dvi. (gdbint.dvi, gdbint.pdf, stabs.dvi, stabs.pdf): Ditto. 2002-08-24 Andrew Cagney * Makefile.in (GDBINT_TEX_TMPS): Define. (gdbint.dvi, gdbint.pdf): Use (GDB_TEX_TMPS): Define. (gdb.dvi, gdb.pdf): Use. (STABS_TEX_TMPS): Define. (stabs.dvi, stabs.pdf): Use. (GDB_DOC_SOURCE_INCLUDES): New macros. (GDB_DOC_BUILD_INCLUDES, GDB_DOC_FILES): New macros. (GDBINT_DOC_FILES_INCLUDES): New macros. (GDBINT_DOC_BUILD_INCLUDES): New macros. (GDBINT_DOC_FILES, STABS_DOC_SOURCE_INCLUDES): New macros. (STABS_DOC_BUILD_INCLUDES, STABS_DOC_FILES): New macros. (SFILES_DOC, SFILES_INCLUDED, SFILES_LOCAL): Delete macros. (links2roff): Replace SFILES_INCLUDED with GDB_DOC_SOURCE_INCLUDES. (gdb.dvi, gdb_toc.html, gdb.pdf, gdb.info): Update dependencies. (gdb.me, gdb.mm, gdb.ms): Update dependencies. (gdbint.dvi, gdbint_toc.html, gdbint.pdf, gdbint.info): Update dependencies. (stabs.info, stabs_toc.html, stabs.pdf, stabs.dvi): Update dependencies. (gdbmi.texinfo): Delete rule. (inc-hist.texinfo): Delete rule. (rluser.texinfo): Delete rule. 2002-08-23 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Update STORE_RETURN_VALUE, mention regcache. 2002-08-21 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Document print_registers_info. Note that DO_REGISTERS_INFO is deprecated. 2002-08-19 Andrew Cagney * gdb.texinfo (Remote Protocol): Reformat. Use cross references. Fix minor typos. Add index entries. 2002-08-18 Andrew Cagney * gdb.texinfo (Data): Add ``Vector Unit'' to menu. 2002-08-15 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Document PRINT_VECTOR_INFO. * gdb.texinfo (Vector Unit): Document "info vectors" command. 2002-08-13 Andrew Cagney * gdb.texinfo (Maintenance Commands): Document "maint print registers", "maint print raw-registers" and "maint print cooked-registers". 2002-08-08 Grace Sainsbury From Mark Salter: * gdb.texinfo (Protocol): Document T packet extension to allow watchpoint address reporting. 2002-08-03 Andrew Cagney * gdb.texinfo (Dump/Restore Files): Move `[]' to outside of @var. 2002-08-01 Andrew Cagney * stabs.texinfo, gdb.texinfo, gdbint.texinfo: Obsolete references to CHILL. 2002-08-01 Andrew Cagney * gdbint.texinfo (Coding): Revise section "Include Files". 2002-07-24 Andrew Cagney * gdbint.texinfo: Obsolete references to m88k. * gdb.texinfo: Ditto. 2002-07-10 Joel Brobecker * gdbint.texinfo (Create a release candiate): Add the location where the proper version of autoconf can be retrieved. 2002-07-09 Don Howard * gdb.texinfo (Command Files): Further describe the behavior of sourced command files. 2002-06-27 Andrew Cagney * gdbint.texinfo (User Interface): ISO C rather than ISO-C. (Coding): Clarify ISO C version that GDB assumes. 2002-06-26 Tom Tromey * gdbint.texinfo (User Interface): Mention add_setshow_cmd and add_setshow_cmd_full. 2002-06-25 Don Howard * gdb.texinfo (Memory Region Attributes): Document new behavior for 'mem' command. 2002-06-11 Jim Blandy * gdb.texinfo (Symbols): Update documentation for `info source' command. * gdb.texinfo (Macros): Call the command `info macro', not `show macro'. 2002-06-09 Andrew Cagney * gdbint.texinfo (Coding): Add section ``Per-architecture module data''. 2002-06-09 Mark Kettenis * gdbint.texinfo (Target Architecture Definition): Document GDB_OSABI_GO32 and GDB_OSABI_NETWARE. 2002-06-08 Andrew Cagney * gdbint.texinfo (Releasing GDB): Fix typos in @itemize @bullet lists. 2002-06-08 Andrew Cagney * gdbint.texinfo (Releasing GDB): Revise the section ``Cut the Branch''. 2002-06-01 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Add section ``Converting an existing Target Architecture to Multi-arch''. 2002-05-30 Andrew Cagney * gdbint.texinfo (Releasing GDB): Rename ``Obsoleting any code'' to ``Obsoleting code''. Revise. 2002-05-17 Jim Blandy * gdb.texinfo (C Preprocessor Macros): New chapter. Include it in the main menu. (Contributors): Credit Jim Blandy with macro support. (Compilation): Explain how to get macro information into the executable. (Expressions): Note that preprocessor macros are expanded. 2002-05-14 Daniel Jacobowitz * gdb.texinfo (Debug Session): Document new `udp:' and `tcp:' options for `target remote'. 2002-05-13 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete documentation on NNPC_REGNUM. 2002-05-11 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Document REGISTER_TO_VALUE and VALUE_TO_REGISTER and CONVERT_REGISTER_P. (Target Architecture Definition): Revise section `Using Different Register and Memory Data Representations'. Add section `Raw and Virtual Register Representations'. 2002-05-11 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Mention defaults for REGISTER_VIRTUAL_SIZE and REGISTER_RAW_SIZE. (Target Architecture Definition): Mention same. Add references to web pages. 2002-05-08 Michael Snyder * stabs.texinfo (Attributes): Document new "vector" attribute. 2002-05-04 Andrew Cagney * gdbint.texinfo (Releasing GDB): Revise `Create a Release'. 2002-05-04 Andrew Cagney * gdb.texinfo: Delete obsolete references to a29k. 2002-04-24 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Replace IN_SIGTRAMP with PC_IN_SIGTRAMP. 2002-04-24 David S. Miller * gdbint.texinfo (REGISTER_IN_WINDOW): Delete definition. 2002-04-21 David S. Miller * gdbint.texinfo (SKIP_PROLOGUE_FRAMELESS_P): Delete definition. 2002-04-21 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete definition of HAVE_REGISTER_WINDOWS. 2002-04-19 Eli Zaretskii * gdbint.texinfo (Releasing GDB, Coding): Fix typos. Reported by "Theodore A. Roth" . 2002-04-15 Don Howard From Eli Zaretskii * gdb.texinfo (show max-user-call-depth): Correct formatting. Provide a better explaination of this feature. 2002-04-14 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Remove FRAME_CHAIN_COMBINE. 2002-04-12 Michael Chastain * gdbint.texinfo (Obsolete Conditionals): Remove reference to REG_STACK_SEGMENT. 2002-04-09 Michael Chastain * gdbint.texinfo (Obsolete Conditionals): Remove references to PYRAMID_* macros. 2002-04-07 Andrew Cagney * gdb.texinfo (Bug Reporting): Document that the web is the prefered way of submitting bug reports. (Bug Reporting): Delete the s-mail address as the last resort. 2002-04-05 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete references to TARGET_WRITE_FP and write_fp. 2002-03-27 Michael Snyder * gdb.texinfo: Document new commands dump, append, and restore. 2002-03-27 Andrew Cagney * gdbint.texinfo (Releasing GDB): Revise the section `Before the Branch'. 2002-03-18 Andrew Cagney * gdb.texinfo: Change all examples to @smallexample. * gdbint.texinfo: Ditto. 2002-03-18 Andrew Cagney * gdbint.texinfo (Releasing GDB): Add section ``Versions and Branches''. 2002-03-18 Andrew Cagney * gdbint.texinfo (Releasing GDB): Add the section``Branch Commit Policy''. 2002-03-04 Fred Fish * gdbint.texinfo: Fix a bunch of typos (alsways, mirrorred, expresson, suports, dependant, trhe, perhaphs, situtations, explictily, taged, oportunity, unfortunatly). 2002-02-24 Andrew Cagney * Makefile.in (gdb.info): Add explicit path to gdb.texinfo. Remove reference to 3.12. 2002-02-23 Andrew Cagney * gdbint.texinfo: Include fdl.texi. (Top): Add GNU Free Documentation License. * Makefile.in (SFILES_INCLUDED): Add gpl.texi. (gdbint.dvi, gdbint.pdf, gdbint.info): Add dependency on fdl.texi. (gdbint_toc.html): Add dependency on gdb-cfg.texi and fdl.texi. (gdbint.info): Add srcdir to include path. * gdb.texinfo: Include gpl.texi. (Top): Add Copying. * gpl.texi: New file. 2002-02-23 Andrew Cagney * gdbint.texinfo (Debugging GDB): Remove references to cygnus.com. 2002-02-19 Pierre Muller * gdb.texinfo: Document Cygwin native specific commands. 2002-02-15 Daniel Jacobowitz * gdb.texinfo: Document gdbserver ``--attach'' command. 2002-02-07 Michael Snyder * gdb.texinfo (overlays): Change @var(_ovly_debug_event) to @code(_ovly_debug_event). 2002-02-07 Andrew Cagney * gdb.texinfo (How Overlays Work): Shrink the overlay diagram. 2002-02-06 Michael Snyder * gdb.texinfo (overlays): Mention new magic symbol '_ovly_debug_event', which allows GDB to keep better track of overlays. 2002-02-03 Eli Zaretskii * gdb.texinfo (Memory Region Attributes): Fix the wording. Suggested by Dmitry Sivachenko. * (): Fix the spelling and punctuation of "i.e.". 2002-02-01 Michael Snyder * gdb.texinfo (set trust-readonly): Change value{gdbn} to value{GDBN}. 2002-01-30 Michael Snyder * gdb.texinfo: (remote protocol): Gramatical fix-up. (set trust-readonly-sections): Document. 2002-01-29 Andrew Cagney * gdbint.texinfo (Releasing GDB): Revise and update. 2002-01-28 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete description of TARGET_BYTE_ORDER_DEFAULT. 2002-01-27 Eli Zaretskii * gdb.texinfo: Fix typos and markup. From Dmitry Sivachenko . 2002-01-23 Andrew Cagney * libgdb.texinfo: Delete file. 2002-01-22 Andrew Cagney * gdb.texinfo: Remove makeinfo 3.12 hacks. * gdbint.texinfo: Ditto. Tue Jan 22 11:57:38 2002 Andrew Cagney * gdb.texinfo: Fix typo ``Remove' -> ``Remote''. 2002-01-22 Andrew Cagney * Makefile.in: Update copyright. (TEXI2DVI): Define. (gdb.dvi, gdb.pdf, stabs.dvi, stabs.pdf): Use TEXI2DVI. (gdbint.dvi, gdbint.pdf): Use TEXI2DVI. Add dependency on gdb-cfg.texi. (TEXINDEX, PDFTEX): Delete makefile variables. 2002-01-22 Andrew Cagney * gdb.texinfo (Protocol): Move section to appendix. 2002-01-21 Andrew Cagney * gdb.texinfo (Remote Debugging): Create a menu. (Top): Add ``Remote Debugging'' to menu. 2002-01-21 Andrew Cagney * gdb.texinfo (Remote): Move the sub-section ``The GDB remote serial protocol'' from here. (Remote Debugging): To here. New chapter. 2002-01-20 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Delete description of TARGET_BYTE_ORDER_SELECTABLE_P. 2002-01-20 Andrew Cagney * gdbint.texinfo (Host Definition): Revise. xm-xyz.h and xyz.mh are no longer needed. (Porting GDB): Add maintainer note about configure.host. 2002-01-20 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Remove definition of IEEE_FLOAT. 2002-01-20 Eli Zaretskii * gdb.texinfo: Beautify copyright years; fix a typo. (DJGPP Native): Fix overfull hboxes in examples. From Brian Youmans <3diff@gnu.org> 2002-01-19 Andrew Cagney * gdbint.texinfo (Host Definition): Remove references to MALLOC_INCOMPATIBLE. 2002-01-17 Andrew Cagney * gdbint.texinfo (Host Definition): Remove references to XDEPFILES and xyz-xdep.o. 2002-01-17 Andrew Cagney * gdb.texinfo (Maintenance Commands): Add appendix. (Set Breaks): Copy ``maint info breakpoint'' doco to ``Maintenance Commands'' appendix. Add reference. 2002-01-17 Andrew Cagney * fdl.texi: Remove next/prev from @node. 2002-01-17 Eli Zaretskii * gdb.texinfo: @include fdl.texi. Fixes for overfull hboxes and for monstrous @multitable (from Brian Youmans). * fdl.texi: New file. * Makefile.in (SFILES_INCLUDED): Add fdl.texi. 2002-01-15 Andrew Cagney * gdbint.texinfo (Releasing GDB): New chapter. 2002-01-14 Andrew Cagney * gdb.texinfo (Embedded Processors, Calling program functions): Obsolete references to a29k. 2002-01-13 Andrew Cagney * gdbint.texinfo (Coding): Review Cleanups section. Examples examples. Document that a code-block should do or discard its cleanups before exit. 2002-01-11 Michael Snyder * gdb.texinfo (Choosing files): Change @samp to @file. 2002-01-05 Michael Snyder * gdb.texinfo (--pid): Document new command line option (attach). 2002-01-07 Eli Zaretskii * gdb.texinfo (Tracepoints): Clarify that tracepoints need support in the stub. 2002-01-04 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Replace BIG_ENDIAN with BFD_ENDIAN_BIG. 2002-01-03 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Replace value_ptr with struct value pointer. 2002-01-02 Eli Zaretskii * gdb.texinfo (Free Software): Fix wording. 2001-12-31 Eli Zaretskii * gdb.texinfo (Free Software): New section ``Free Software Needs Free Documentation''. 2001-12-30 Eli Zaretskii * stabs.texinfo: * gdb.texinfo: * gdbint.texinfo: * libgdb.texinfo: * annotate.texi: Fix the application of GFDL in the Copyright notice. 2001-12-29 Michael Snyder * gdb.texinfo (maint info sections): Fix typo. 2001-12-26 Michael Snyder * gdb.texinfo (maint info sections): Document. * gdb.texinfo (info proc): Comment out documentation for 'info proc' sub-options that are currently not implemented. 2001-12-20 Jim Blandy * gdbint.texinfo (TARGET_CHAR_SIGNED): Document. 2001-12-15 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Replace LITTLE_ENDIAN with BFD_ENDIAN_LITTLE. 2001-12-01 Andrew Cagney * gdbint.texinfo (Host Definition): Delete documentation on HOST_BYTE_ORDER. 2001-11-30 Jim Blandy * gdb.texinfo (Overlays): New chapter, documenting GDB's overlay support. Add to top-level menu. 2001-11-26 Tom Tromey * gdb.texinfo (Command Syntax): Document C-o binding. 2001-07-26 Christopher Faylor * gdb.texinfo (Options): Eliminate attempt to explain .gdbinit/gdb.ini use since it is described in the referenced section. From Eli Zaretskii * gdb.texinfo (Command Files): Reword to make gdb.ini requirement clearer when using DJGPP. 2001-11-24 Christopher Faylor * gdb.texinfo (File Options): Change description of -nx and gdb.ini to specifically refer to MS-DOS. (command files): Mention gdb.ini is only used on MS-DOS. 2001-11-21 Tom Tromey * gdb.texinfo (Invoking GDB): Document --args. (Mode Options): Likewise. 2001-11-21 Jim Blandy * gdbint.texinfo (TARGET_RANGE_PROFITABLE_FOR_HW_WATCHPOINT): Delete documentation; this macro has been removed from the sources. 2001-11-13 Jim Blandy * gdbint.texinfo (COERCE_FLOAT_TO_DOUBLE): Clarify. 2001-11-06 Corinna Vinschen * gdb.texinfo (gdbarch_in_function_epilogue_p): Add documentation. 2001-11-05 Michael Snyder * gdb.texinfo (info functions): Document use of backslash to quote regexp chars in function names such as "operator*()". 2001-11-01 Fred Fish * gdbint.texinfo (SOLIB_ADD): Document additional new "readsyms" arg. 2001-10-30 Don Howard * gdb.texinfo: (Command Files) Added documentation for the behavior of gdb with input redirected from a file. 2001-10-28 Fred Fish * gdb.texinfo (auto-solib-add): Change docs to match implementation change. (auto-solib-limit): Add docs for new variable. 2001-10-15 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Function value_as_pointer renamed to value_as_address. 2001-10-15 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Default POINTER_TO_ADDRESS functions assume unsigned addresses. (INTEGER_TO_ADDRESS): Document. Derive pragmatics section from a posting by Jim Blandy. 2001-10-12 Jim Blandy * Makefile.in (MAKEHTMLFLAGS): Remove -glossary; the most recent version of texi2html (1.64) doesn't support this flag any more. 2001-09-08 Mark Kettenis * gdbint.texinfo (Host Definition): Remove description of MEM_FNS_DECLARED. * gdbint.texinfo (Host Definition): Remove description of R_OK. * gdbint.texinfo (Host Definition): Remove description of HAVE_SIGSETMASK. 2001-09-04 Elena Zannoni * gdbint.texinfo (Target Architecture Definition): Add explanation of TARGET_PRINT_INSN macro. 2001-08-30 Jim Blandy * gdb.texinfo (`add-symbol-file'): Correct synopsis. Explain what it means to load relocatable files. 2001-08-28 Jim Blandy * gdbint.texinfo: Bring the HTML `top' menu into sync with the info `top' menu. Wed Aug 15 10:47:28 2001 Christopher Faylor * gdbint.texinfo: Add a cautionary note about macro use. 2001-08-02 Corinna Vinschen * gdb.texinfo: Explain omitting the hostname in the `target remote' command. 2001-07-30 Daniel Jacobowitz * gdbint.texinfo: Remove extraneous START-INFO-DIR-ENTRY and END-INFO-DIR-ENTRY. 2001-07-28 Stephane Carrez * gdb.texinfo (TUI Configuration): Rename tui configuration variables. 2001-07-25 Andrew Cagney * gdbint.texinfo (libgdb): Rewrite. 2001-07-26 Eli Zaretskii * Makefile.in (gdbgui.dvi, gdb-gui, gdbgui.info): Targets deleted. 2001-07-24 Stephane Carrez * gdb.texinfo (TUI): New chapter, document the TUI. (Mode Options): Document the -tui option. 2001-07-23 Mark Kettenis * gdbint.texinfo (Host Definition): Remove description of NEED_POSIX_SETPGID. 2001-07-23 Eli Zaretskii * gdb.tex (DJGPP Native): New node, with descriptions of DJGPP-specific commands. 2001-07-19 John R. Moore * gdbint.texinfo: Three misspellings. 2001-07-06 Andrew Cagney * Makefile.in (refcard.dvi): Rewrite to avoid problems with empty `test` expressions on bash. Problem reported by Colin Walters. 2001-07-04 Andrew Cagney * gdbint.texinfo (User Interface): Update ui-out documentation to refelect recent UI/MI updates. 2001-07-04 Andrew Cagney * gdb.texinfo (Mode Options): Mention the mi0 and mi1 interpreters. 2001-06-15 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): GDBARCH is a C structure and not macros. (Host Definition): Document that much of this chapter is obsolete. (Target Architecture Definition): Update list of files that make up a target architecture. (Coding): Update. 2001-06-28 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Update EXTRACT_STRUCT_VALUE_ADDRESS and EXTRACT_STRUCT_VALUE_ADDRESS_P. The latter has been changed to a true predicate. 2001-06-17 Eli Zaretskii * annotate.texi: Add @noindent where needed. From Dmitry Sivachenko . * gdb.texinfo: Indexing fix. From Dmitry Sivachenko. 2001-06-16 Andrew Cagney * gdb.texinfo (Protocol): Fix typo. Extra parenthesis. 2001-06-14 Andrew Cagney * gdb.texinfo (Remote Protocol): Document that the ``!'' packet returns ``OK''. Document that the ``R'' packet does not reply. 2001-06-13 Michael Snyder * gdb.texinfo (Protocol): Add doc for new packet "qSymbol:". 2001-06-13 Eli Zaretskii * gdb.texinfo (Signals): Clarify the default setting of signal handling. 2001-05-14 Andrew Cagney * gdbint.texinfo (CLEAR_DEFERRED_STORES): Delete stray @item (FRAME_ARGS_ADDRESS_CORRECT): Ditto. 2001-05-12 Andrew Cagney * Makefile.in (GDBvn.texi): Set GDBVN from ../version.in. 2001-05-10 Eli Zaretskii * gdbint.texinfo (Clean Design and Portable Implementation): Renamed from "Clean Design". (Clean Design and Portable Implementation): Document portable methods of handling file names, and the associated macros. 2001-04-02 Eli Zaretskii * gdb.texinfo (Tracepoint Actions): Mention the "info scope" command and provide a cross-reference to its description. (Symbols): Note that "info scope" is useful for trace experiments. 2001-04-01 Eli Zaretskii * gdb.texinfo (Symbols): Document "info scope". (Tracepoints): New chapter. (Contributors): Update for v5.1. : Change "C++" to "C@t{++}". * gdbint.texinfo (User Interface): A new section about ui_out functions, based on text written by Fernando Nasser. * stabs.texinfo: Change Permissions to GFDL. Update Copyright. 2001-03-26 Eli Zaretskii * gdb.texinfo: Change Permissions to GFDL. Update Copyright. * gdbint.texinfo: Change Permissions to GFDL. Update Copyright. * gdbgui.texinfo: Change Permissions to GFDL. Update Copyright. Replace "GDB" with "@value{GDBN}". Fix markup. * annotate.texi: Change Permissions to GFDL. Update Copyright. * gdb.texinfo (Output Formats): Mention "info symbol" and provide a cross-reference to its description. (Symbols): Document "info symbol". 2001-03-21 Eli Zaretskii * gdbint.texinfo (Algorithms): New section "Watchpoints" and new subsection "x86 Watchpoints". (Target Architecture Definition): Document the macros I386_USE_GENERIC_WATCHPOINTS and TARGET_HAS_HARDWARE_WATCHPOINTS. (Native Debugging): Document I386_USE_GENERIC_WATCHPOINTS. 2001-03-20 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Update definition of SOFTWARE_SINGLE_STEP_P to include empty parameter list. 2001-03-06 Kevin Buettner * Makefile.in, all-cfg.texi, annotate.texi, gdb.texinfo, gdbint.texinfo, refcard.tex: Update/correct copyright notices. 2001-02-21 Eli Zaretskii * gdb.texinfo (Signals): Document "ignore", "noignore", and "all". 2001-02-11 Eli Zaretskii * gdb.texinfo (Environment): Document that `path' does not change the value of PATH in GDB's own environment (it did in the past, but that was changed on March 15, 1994). Reported by Doug Evans . * gdbint.texinfo: Fix up @itemize lists so that @item is alone on its line. Fix markup of commands and macros. Add an Index node and index entries. 2001-01-23 J.T. Conklin * gdb.texinfo (Memory region attributes): New manual section. 2001-01-04 Nicholas Duffek * gdbint.texinfo (POP_FRAME): Document use by return_command. 2000-12-25 Eli Zaretskii * refcard.tex: Version and copyright fixed. From Phil Edwards . Thu Nov 30 16:57:19 2000 Andrew Cagney * gdbint.texinfo (ECOFF_REG_TO_REGNUM, DWARF_REG_TO_REGNUM, DWARF2_REG_TO_REGNUM): Document. Mon Nov 20 21:29:35 2000 Andrew Cagney * gdbint.texinfo (Coding): Update current value of --enable-build-warnings. Mention --enable-gdb-build-warnings. 2000-11-19 Eli Zaretskii * gdb.texinfo (Continuing and Stepping): Fixed markup and typos, as suggested by Dmitry Sivachenko . 2000-11-10 Christopher Faylor * gdb.texinfo: Document new 'set step-mode' command. 2000-10-16 Eli Zaretskii * gdb.texinfo (Contributors, MIPS Embedded): Minor spelling changes from Dmitry Sivachenko . 2000-09-26 Eli Zaretskii * gdb.texinfo (Hooks): Document the new post-hook functionality. From Steven Johnson . 2000-08-10 Mark Kettenis * gdbint.texinfo (Overall Structure): Spelling fix. 2000-08-10 Eli Zaretskii * gdbint.texinfo (Target Architecture Definition): Document that REGISTER_CONVERT_TO_VIRTUAL should only be called on a register for which REGISTER_CONVERTIBLE returns a zero value. 2000-07-08 Christopher Faylor * Makefile.in (install-info): Find files to install in either the build or source directories (adapted from Makefile.am). 2000-07-07 Nicholas Duffek * stabs.texinfo: Fix spelling errors. (String Field): FILE-NUMBER starts from 0, not 1. 2000-07-05 Eli Zaretskii * refcard.tex: Remove \centerline from the blurb. Patch from Brian Youmans. 2000-06-25 Eli Zaretskii * Makefile.in (install-info): Support installation from outside of the source directory. Reported by Mark Harig . 2000-06-20 J.T. Conklin * gdb.texinfo: Fix typo, $bpnum is set to last breakpoint number. Fri May 26 15:55:33 2000 Andrew Cagney * Makefile.in (pdf, gdbint.pdf, gdb.pdf, stabs.pdf): New targets. Generate using pdftex. (PDFTEX): Define. (STAGESTUFF, maintainer-clean realclean): Add *.pdf. (gdb.texinfo, gdbint.texinfo, stabs.texinfo): When TeX insert the @contents at the start. 2000-05-24 Eli Zaretskii * gdb.texinfo: Remove duplicate @syncodeindex. From Brian Youmans. Wed May 24 21:27:58 2000 Andrew Cagney From Brian Youmans: * gdb.texinfo: Fix ``et al.''. Tue May 23 22:57:41 2000 Andrew Cagney * Makefile.in (refcard.dvi): Remove quotes around REFEDITS in for loop. 2000-05-19 Jimmy Guo * configure: Regenerate. 2000-05-17 Eli Zaretskii * Makefile.in (install-info): Run install-info on installed Info files. Fri May 12 20:18:04 2000 Andrew Cagney * gdb.texinfo: Add Stan Shebs, et.al. as authors. Mention Andrew Cagney. 2000-05-09 Eli Zaretskii * gdb.texinfo: Proofreading changes from Brian Youmans. 2000-05-01 Nick Duffek * gdb.texinfo (Command Files): Mention -x, use @enumerate for startup sequence, minor edits. 2000-05-01 Eli Zaretskii * annotate.texi: Remove "@syncodeindex fn cp", it causes grief in TeX. * gdb.texinfo: Add "@syncodeindex fn cp". Convert all entries "@kindex f" into "@kindex f (foo)", otherwise we get index entries like `n' and `s' which look weird. Convert some of the @kindex to @vindex, when they refer to variables, not commands. Sat Apr 29 17:01:04 2000 Andrew Cagney * gdbint.texinfo (Hints): Do not use @value{GDBN in @nodes. 2000-04-23 Eli Zaretskii * Makefile.in (GDBMI_DIR): New variable. (SET_TEXINPUTS): Add $(GDBMI_DIR). (SFILES_DOC): Add $(GDBMI_DIR)/gdbmi.texinfo. (gdbmi.texinfo): New target, for texi2roff. (gdb.me, gdb.ms, gdb.mm): Depend on gdbmi.texinfo. (gdb.info, gdb_toc.html): Add "-I ${GDBMI_DIR}". * gdb.texinfo (Top): Add GDB/MI to the main menu and @include gdbmi.texinfo. (Mode Options): Add xref to GDB/MI docs and remove a FIXME comment. 2000-04-17 Elena Zannoni * gdb.texinfo (Files): Update description of add-symbol-file command. 2000-04-17 Eli Zaretskii * gdb.texinfo (Porting GDB): Don't use @value in the node name, it prevents the build (and is generally a Bad Idea). 2000-04-17 Eli Zaretskii * gdb.texinfo (Protocol): Prevent makeinfo from complaining about a comma inside @var. (Command Files): Index markup changes from Dmitry Sivachenko . 2000-04-16 Eli Zaretskii * Makefile.in (LN_S): Define. (gdb-cfg.texi, gdb.dvi, links2roff, inc-hist.texinfo): Don't invoke "ln -s" unless it is known to work. * configure.in (AC_PROG_LN_S): Add. 2000-04-14 Jim Blandy * gdbint.texinfo (Pointers Are Not Always Addresses): New manual section. (Target Conditionals): Document ADDRESS_TO_POINTER, POINTER_TO_ADDRESS. 2000-04-11 Daniel Berlin * gdbint.texinfo: Replaced GDB with @value{GDBN}, @include gdb-cfg.texi to get the value. 2000-04-10 Jim Blandy * gdbint.texinfo (Target Architecture Definition): Fix cross-references. 2000-04-08 Jim Blandy * gdbint.texinfo (Using Different Register and Memory Data Representations): New section. (REGISTER_CONVERTIBLE, REGISTER_RAW_SIZE, REGISTER_VIRTUAL_SIZE, REGISTER_VIRTUAL_TYPE, REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW): Document. Mon Apr 3 19:16:32 2000 Andrew Cagney * gdb.texinfo (Protocol): Deprecate the sequence-id. Add cindex for acknowledgments. Tue Mar 28 18:28:45 2000 Andrew Cagney * gdb.texinfo (Protocol): Replace ``qfThreadExtraInfo'' with qThreadExtraInfo. 2000-03-28 J.T. Conklin * gdb.texinfo: Clarify which remote debug protocol commands are required and which are optional. Tue Mar 28 16:06:22 2000 Andrew Cagney * gdb.texinfo: Revert remainder of Fri Mar 24 18:06:34 2000 Andrew Cagney . Move @chapter and @node entries back to annotate.texi, rluser.texinfo and inc-hist.texinfo. * annotate.texi: Update. 2000-03-28 Stan Shebs * gdb.texinfo: Update dates, bump to Eighth Edition (note expectation of additional changes before release), update ISBN, add copy of top-level menu for @ifhtml, remove explicit node links, rephrase and/or shorten lines to fix formatting problem in both regular and @smallbook formats. * annotate.texi: Shorten lines in example, use smallexample consistently everywhere. * Makefile.in: Add comment about texinfo 4.0 html generation. (SFILES_INCLUDED): Add annotate.texi. 2000-03-27 Daniel Berlin * gdb.texinfo (Debugging Output): Added new section, documenting the "set/show debug" commands. Fri Mar 24 18:06:34 2000 Andrew Cagney * annotate.texi (Annotations): When GDBN omit @chapter and @node entry. * gdb.texinfo: Check for @ifinfo instead of @ifnottex. (rluser.texinfo, inc-hist.texinfo, annotate.texi): Add local @chapter and @node entries. * gdb.texinfo: Link all top-level nodes. Fri Mar 24 17:56:48 2000 Andrew Cagney * Makefile.in (install-info): Create $(infodir) before installing files. 2000-03-23 Fernando Nasser From David Whedon * gdbint.texinfo : Added paragraphs about command deprecation. 2000-03-22 Daniel Berlin * gdb.texinfo: Add documentation for the apropos command. 2000-03-20 Michael Snyder * gdb.texinfo: Add new queries ThreadInfo and ThreadExtraInfo. 2000-03-20 Michael Snyder * gdb.texinfo: Add white space to prevent overprinting in two places. 2000-03-17 Stan Shebs * gdb.texinfo: Many minor changes from Dmitry Sivachenko , also clarification of allowed content for string constants. 2000-03-16 Eli Zaretskii * gdb.texinfo (main menu): Add Annotations. (File Options): Add @cindex entries for each command-line option. Document --epoch, --annotate, --async, --interpreter, --write, --statistics, and --version. * annotate.texi: Convert to a chapter. Use @value{GDBN} instead of GDB. 2000-02-23 Jim Blandy * gdbint.texinfo (FUNCTION_START_OFFSET): Document. 2000-02-22 Jim Blandy * gdbint.texinfo: Document COERCE_FLOAT_TO_DOUBLE --- the new form. 2000-02-15 Jason Molenda (jsm@bugshack.cygnus.com) * Makefile.in (diststuff): New target. 2000-02-15 Kevin Buettner * agentexpr.texi: Fix wording regarding Intel's IA-64 architecture. [From Jim Wilson.] 2000-01-16 Tom Tromey * gdb.texinfo (Breakpoints): Mention breakpoint ranges. (Delete Breaks): Mention range arguments. (Disabling): Likewise. 2000-01-05 Dmitry Sivachenko * gdb.texinfo: Wrap "ASCII" in @sc{}; clarify a few sentences. Wed Dec 8 19:53:08 1999 Andrew Cagney * gdbint.texinfo (FRAME_CHAIN_VALID): Add the generic frame-chain valid functions. 1999-11-05 Stan Shebs * gdb.texinfo: Clarify regular expressions used in rbreak. 1999-10-15 Kevin Buettner * gdbint.texinfo (MEMORY_INSERT_BREAKPOINT, MEMORY_REMOVE_BREAKPOINT): Document. Thu Oct 14 21:17:17 1999 Andrew Cagney * gdb.texinfo (remote): Document how GDB ignores the qOffsets BSS offset re-using the DATA offset instead. 1999-10-11 Jim Kingdon * gdbint.texinfo (Target Architecture Definition): Add PARM_BOUNDARY. 1999-10-05 Stan Shebs From Dmitry Sivachenko : * gdb.texinfo: Use GDBP and GDBN everywhere, fix a couple other typos. * gdb.texinfo: Various minor wording and formatting improvements, mentions of additional command-line options. 1999-09-30 Fred Fish * gdb.texinfo: Document additional forms of specifying section names and addresses for the add-symbol-file command. 1999-09-14 Michael Snyder * gdbint.texinfo: Fix typo, add the word "have". 1999-09-14 Jim Blandy * gdbint.texinfo (Target Architecture Definition): Document the SKIP_PERMANENT_BREAKPOINT macro. 1999-09-07 Stan Shebs * gdb.texinfo: Fiks speling errers. * gdb.texinfo: Fix uses of @multitable. From Eli Zaretskii : * gdb.texinfo: Include details specific to DOS host, clarify some confusing language, fix @ref/@xref/@pxref usages, add comments about using with optimization, add more indexing, fix info about disassembly-flavor. Tue Sep 7 09:11:24 1999 Kevin Buettner * gdbint.texinfo (IN_SOLIB_DYNSYM_RESOLVE_CODE, SKIP_SOLIB_RESOLVER): Define. Fri Sep 3 18:05:14 1999 Andrew Cagney * gdb.texinfo (Protocol): Review. Add tables describing ``q'' and ``g'' packets. 1999-08-30 Stan Shebs * gdb.texinfo: Create a new "Configurations" chapter with platform-specific info, inline remote.texi and move sections of it into the new chapter, move bits about info proc, heuristic search, and register stack into the new chapter. * remote.texi: Remove, now part of gdb.texinfo. * Makefile.in (SFILES_INCLUDED): Remove ref to remote.texi. 1999-08-27 Jason Molenda (jsm@bugshack.cygnus.com) * gdbint.texinfo (GDB_TARGET_IS_SUN3, GDB_TARGET_IS_SUN386, GDB_TARGET_IS_MACH386): These kludges have gone away. Wed Aug 25 10:47:03 1999 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Mention TDEPLIBS. 1999-08-20 Stan Shebs * gdb.texinfo: Remove remaining "HPPA" conditionals, rewrite surrounding text to fit HP-UX bits into general info. (HPPA-cfg.texi): Remove, no longer useful. * gdb.texinfo: Remove explicit links from @node lines, remove HP-added "Detailed Node Listing" from main menu which confuses things. From Dmitry Sivachenko : * gdb.texinfo: Use @value{GDBN} instead of plain GDB, fix grouping in description of `set environment'. 1999-08-17 Stan Shebs * gdbint.texinfo: Update coding standard to allow pure ANSI/ISO C. 1999-08-12 Ben Elliston * gdbint.texinfo (Breakpoint Handling): Add missing words. 1999-08-10 Eli Zaretskii * gdb.texinfo (Set Watchpoints): Explain some subtleties about watch, awatch, and rwatch. Explain why the latter two cannot be set as software watchpoints. Document that watchpoints for local variables are deleted when the debuggee terminates. Wed Aug 11 13:18:14 1999 Andrew Cagney * remote.texi (Protocol): Further clarification of the "qRcmd" packet. Allow E.. response packet. "qRcmd" packet is no longer reserved. 1999-08-10 Elena Zannoni * Makefile.in: Rename inc-hist.texi to inc-hist.texinfo. * gdb.texinfo: Ditto. 1999-08-06 Tom Tromey * gdb.texinfo (KOD): New node. Fri Aug 6 17:05:48 1999 Andrew Cagney * remote.texi (Rcmd): Fix minor formatting typos. Thu Aug 5 17:57:41 1999 Andrew Cagney * remote.texi (protocol qRcmd): Allow ``OK'' and ``O...'' response packets. 1999-07-14 Jim Blandy * gdbint.texinfo (PREPARE_TO_PROCEED, ADDR_BITS_REMOVE): Doc fixes. Tue Jun 29 11:43:55 1999 Andrew Cagney * gdbint.texinfo (SAVE_DUMMY_FRAME_TOS): Define. Fri Jun 25 11:47:06 1999 Andrew Cagney * remote.texi (Communication Protocol): ``v'' is in use. Fix numerous formatting errors. Clarify ``i''. Mark ``i'', ``Z'', ``z'' and ``qRcmd'' as draft instead of reserved. Identify packets that are not supported on all hosts. Expand examples. Spell check. 1999-06-24 Jason Molenda (jsm@bugshack.cygnus.com) * Makefile.in: Recognize html, install-html. Add targets to build HTML versions of documentation via texi2html. Thu Jun 24 15:59:03 1999 Stan Shebs * gdbint.texinfo (Testsuite): New chapter, information about the testsuite. Fri Jun 25 02:40:34 1999 Andrew Cagney * remote.texi (Communication Protocol): Rewrite. Thu Jun 24 16:59:54 1999 Andrew Cagney * stabs.texinfo: Fix uses of xref. Thu Jun 17 17:23:25 1999 Stan Shebs * gdbint.texinfo: Add an anti-printf exhortation, and update the info about patch submission. Mon Jun 7 15:49:40 1999 Stan Shebs From Per Bothner : * gdb.texinfo: Document Chill support. Fri Jun 4 16:58:22 1999 Andrew Cagney * gdbint.texinfo (SP_REGNUM, FP_REGNUM, PC_REGNUM): Add reference to corresponding TARGET_READ_reg TARGET_WRITE_reg macros. Document that the value should be greater-than or equal-to zero. (NO_STD_REGS): Document. Deprecate. Tue Jun 1 15:04:15 1999 Andrew Cagney * gdbint.texinfo (TARGET_COMPLEX_BIT, TARGET_DOUBLE_COMPLEX_BIT): Document that these are not used. Thu May 27 09:28:15 1999 Andrew Cagney * gdbint.texinfo (EXTRACT_STRUCT_VALUE_ADDRESS_P): Document. Mon May 24 10:07:39 1999 Andrew Cagney * gdbint.texinfo (FRAME_NUM_ARGS): Update definition. Parameter numargs was dropped. Thu May 20 12:26:59 1999 Andrew Cagney * gdbint.texinfo (FRAMELESS_FUNCTION_INVOCATION): Update. Tue Apr 27 19:14:20 1999 Andrew Cagney * gdbint.texinfo (SKIP_PROLOGUE, SKIP_PROLOGUE_FRAMELESS_P): Update. Thu Apr 22 13:07:37 1999 Andrew Cagney * gdbint.texinfo (USE_GENERIC_DUMMY_FRAMES): Document. (GET_SAVED_REGISTER): Update, not just the a29k uses this. Wed Apr 21 13:59:01 1999 Dave Brolley * gdbint.texinfo: Fix typos: $ -> @. Tue Apr 20 11:59:38 1999 Andrew Cagney * gdbint.texinfo (REGISTER_NAMES, BREAKPOINT, BIG_BREAKPOINT, LITTLE_BREAKPOINT, LITTLE_REMOTE_BREAKPOINT, BIG_REMOTE_BREAKPOINT): Deprecate in favor of REGISTER_NAME and BREAKPOINT_FROM_PC. Mon Apr 12 16:00:44 1999 Andrew Cagney * gdbint.texinfo (CALL_DUMMY_STACK_ADJUST_P, CALL_DUMMY_STACK_ADJUST): Document. Thu Apr 8 17:23:15 1999 Andrew Cagney * gdbint.texinfo (CALL_DUMMY_P, CALL_DUMMY_WORDS, SIZEOF_CALL_DUMMY_WORDS, CALL_DUMMY): Define. 1999-04-02 Stan Shebs * gdbint.texinfo (MAINTENANCE_CMDS): Remove ref, since it no longer exists. Tue Mar 9 19:25:11 1999 Stan Shebs * gdb.texinfo, remote.texi, all-cfg.texi, HPPA-cfg.texi: Remove nearly all @ifset/@ifclear conditionals; nobody uses them, and they make the manual source incomprehensible. * h8-cfg.texi: Remove, hasn't been used in years. Thu Feb 11 18:00:59 1999 Stan Shebs * gdb.texinfo: Update the credits. Mon Feb 8 17:33:57 1999 Stan Shebs * gdb.texinfo: Fix mistakes noticed in printout of last draft, add Alpha to discussion of heuristic fence post. Fri Feb 5 17:20:00 1999 Stan Shebs * gdb.texinfo, remote.texi: Many changes; update to Seventh Edition, merge some HP changes into mainline, describe some previously undocumented features, describe more of the target commands available, eliminate obsolete section on renamed commands. * all-cfg.texi, HPPA-cfg.texi: Remove some obsolete conditionals. Wed Jan 20 17:47:45 1999 Stan Shebs * gdb.texinfo: Make many HPPA conditionals unconditional, including catchpoint description, since now on for all configs. * all-cfg.texi: @clear HPPA, since is mainly for very HP-specific specializations. Thu Jan 14 17:10:12 1999 Stan Shebs * Makefile.in (GDBvn.texi): Fix match expression to work with current format of VERSION in gdb/Makefile.in. * gdb.texinfo: Fix node ref to match new readline. Wed Jan 13 10:38:40 1999 Edith Epstein * gdb.texinfo: Changes made as part of a project to merge in changes made by HP. Documentation makes extensive use of @ifclear HPPA and @ifset HPPA. The HP manual omits doumentation on remote debugging. There are differences in documentation (HP vs. non-HP) on C++ support (aCC vs. gnu gcc++). Also, the HP manual discusses catchpoints, hardware watchpoints, and some HPUX specific limitations for shared library support. There are also a number of @node changes. 1999-01-12 Jason Molenda (jsm@bugshack.cygnus.com) * gdbint.texinfo (Formatting): Disambiguate a sentence. (C Usage): Same. Wed Jan 6 11:55:34 1999 David Taylor The following changes were made by Edith Epstein as part of a project to merge in changes made by HP. * HPPA-cfg.texi: new file. * all-cfg.texi: set HPPA for HP PA-RISC targets. * refcard.tex: change documentation about catch. removed info catch. Mon Jan 4 18:29:18 1999 Stan Shebs * gdbint.texinfo: Expand on GDB's coding standards, specify the use of arg names with prototypes. 1998-12-14 J.T. Conklin * gdb.texinfo: Fix tipo. Sun Dec 13 10:27:59 1998 Andrew Cagney * gdbint.texinfo: Document TARGET_BYTE_ORDER_DEFAULT and TARGET_BYTE_ORDER_SELECTABLE_P. Thu Dec 10 16:07:09 1998 Andrew Cagney * gdbint.texinfo (FRAME_FIND_SAVED_REGS): Document. 1998-12-09 Jim Blandy * agentexpr.texi: New file. Wed Dec 9 21:13:57 1998 Andrew Cagney * gdbint.texinfo (REGISTER_NAME): Replace REGISTER_NAMES. 1998-12-03 J.T. Conklin * remote.texi: Changed wording that implied that the GDB remote protocol caches register values instead of GDB itself. Tue Dec 1 17:45:43 1998 Stan Shebs * gdbint.texinfo: Add some info about symbol readers. (CHILL_PRODUCER, etc): Comment out descriptions, not useful. (IN_SOLIB_CALL_TRAMPOLINE): Rename info from IN_SOLIB_TRAMPOLINE. (IN_SOLIB_RETURN_TRAMPOLINE): Describe. (KERNEL_DEBUGGING, MIPSEL): No info about these, remove. Mon Nov 30 11:32:21 1998 Andrew Cagney * gdbint.texinfo (FRAME_CHAIN_VALID_ALTERNATE): Sat Nov 28 13:45:53 1998 Andrew Cagney * gdbint.texinfo (INNER_THAN): Update, now takes parameters. Fri Nov 27 12:39:45 1998 Andrew Cagney * gdbint.texinfo (NO_SINGLE_STEP): Replace with SOFTWARE_SINGLE_STEP_P and SOFTWARE_SINGLE_STEP. Wed Oct 14 10:02:40 1998 Andrew Cagney * gdbint.texinfo: Fix minor typos. Wed Sep 30 18:03:19 1998 Stan Shebs * gdbint.texinfo: Complete overhaul. Group descriptions more logically, add more info on generic algorithms, remove much obsolete and/or wrong material. Fri Jul 24 17:51:38 1998 Ian Lance Taylor * stabs.texinfo (Method Type Descriptor): Expand and correct. Mon May 4 10:37:12 1998 Brian Youmans (3diff@gnu.org) * refcard.tex: Copyright, address updates. Tue Apr 21 18:09:56 1998 Stan Shebs * gdb.texinfo (EDITION, DATE): Update and change to use ordinals for the edition instead of confusing GDB-version-like numbers. Mon Apr 13 14:05:00 1998 Fred Fish * gdb.texinfo (hbreak, watch): Fix typo, "date" -> "data". Thu Apr 2 16:52:44 1998 Jason Molenda (crash@bugshack.cygnus.com) * LRS: Reformat a bit to keep text under 80 columns. Thu Apr 2 16:10:36 1998 Stan Shebs * gdb.texinfo: Add some credits, mention bug monitor. * remote.texi: Mention mips monitor targets. * gdbint.texinfo: Describe SP_REGNUM, STEP_SKIPS_DELAY. Mon Feb 2 17:13:03 1998 Stan Shebs * gdbint.texinfo: Remove obsolete mentions of pinsn.c and opcode.h files, finish sorting of host vs target vs native macros, describe some more of them. Tue Jan 13 16:44:50 1998 Fred Fish * gdbint.texinfo (Host Conditionals): Document change from using NO_MMALLOC to it's inverse, USE_MMALLOC. Mon Nov 24 13:55:21 1997 Andrew Cagney * gdbint.texinfo (Host Conditionals): Document PRINTF_HAS_LONG_DOUBLE, SCANF_HAS_LONG_DOUBLE, HAVE_LONG_DOUBLE. Fri Jul 4 14:52:31 1997 Ian Lance Taylor * gdbint.texinfo (Host Conditionals): Add CRLF_SOURCE_LINES. Document LSEEK_NOT_LINEAR. Tue Mar 25 14:44:09 1997 Ian Lance Taylor * stabs.texinfo (Stab Section Basics): Make it clear that only some versions of the GNU linker remove the leading N_UNDF symbol. Thu Feb 27 17:45:19 1997 Ian Lance Taylor * stabs.texinfo (String Field): Document type number pairs here, instead of in the Sun specific section. (Include Files): The GNU linker supports the N_BINCL optimization. Clarify the N_BINCL value, and what it is used for. (Procedures): Document N_FUN with an empty string to mark the end of a function. (Typedefs): Mention that Sun compilers may use N_GSYM for a type. (Sun Differences): Remove this node, as the information is now elsewhere in the main document. (Stab Section Basics): Mention that the GNU linker may optimize stabs and remove the leading N_UNDF symbol. Mon Dec 9 12:23:32 1996 Roland Pesch * gdb.texinfo, refcard.tex: Restore author credit Wed Oct 2 22:01:36 1996 Fred Fish * gdbint.texinfo (SIGTRAMP_START, SIGTRAMP_END): Update documentation to account for START and END macros taking one arg. Thu Aug 22 17:59:03 1996 Fred Fish From: Eberhard Mattes * gdb.texinfo (Frames): Fix typo. Tue Jul 23 10:06:20 1996 Fred Fish * gdbint.texinfo (NO_SINGLE_STEP): Document that single_step takes a target_signal as arg type, not a pid. Fri Jul 12 11:10:05 1996 Stu Grossman (grossman@critters.cygnus.com) * gdb.texinfo: Document `set assembly-language'. Thu Jul 11 13:50:28 1996 Stan Shebs * remote.texi: Update list of stubs in the GDB distribution. Fri Jul 5 15:38:54 1996 Fred Fish * gdbint.texinfo (NO_MMCHECK): Renamed from NO_MMALLOC_CHECK. Also document that some systems can use mmalloc but must define this if their C runtime allocates memory that is later freed. (MMCHECK_FORCE): Document new macro. Fri Jun 28 22:17:10 1996 Dawn Perchik * remote.texi: Add documentation for target Sparclet. Mon Jun 24 18:12:22 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) * Makefile.in (srcdir, VPATH, prefix, infodir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf set values. * configure.in: Rewritten for autoconf. * configure: New. Mon Jun 17 10:43:41 1996 Fred Fish * Makefile.in (DVIPS): New define, set to dvips. (dvi): Add stabs.dvi. (ps): New target. (all-doc): Depend on info, dvi, and ps targets. (STAGESTUFF): Add *.ps and *.dvi files. (clean-info, clean-dvi): Remove. (mostlyclean): Does not depend upon clean-info or clean-dvi, rules completely rewritten. (maintainer-clean): Remove clean-info and clean-dvi dependencies and put their actions in the rules. (gdb.ps): New target (gdb.dvi, gdbgui.dvi, gdbint.dvi, stabs.dvi): Remove intermediate TeX files, whether they have 2 or 3 character extensions. (gdbint.ps): Add target and rules. (gdb-internals): Delete unused target. (Makefile): Depends upon config.status also. Sat Mar 30 15:46:58 1996 Fred Fish * gdbint.texinfo (CC_HAS_LONG_LONG): Clarify when/how this is set. Sat Mar 16 15:10:20 1996 Fred Fish From Peter Schauer * gdb.texinfo (Expressions): Fix erroneous array constant example. Sat Mar 16 13:28:45 1996 Fred Fish * gdb.texinfo: Add missing "@bullet" to some "@itemize" commands. Sat Feb 10 03:28:36 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * gdb.texinfo (Print settings): Document `set/show print static-members' commands. Wed Jan 10 14:16:37 1996 Fred Fish * gdbint.texinfo (Native): Document name change, coredep.c to core-aout.c. Wed Dec 13 12:35:28 1995 Ian Lance Taylor * stabs.texinfo (Include Files): Document the values the SunOS4 linker creates for N_BINCL/N_EINCL/N_EXCL stabs. Fri Dec 8 21:08:44 1995 Fred Fish * gdbint.texinfo (Releases): Change gdb.tar.Z to gdb.tar.gz. Fix typo. Fri Dec 1 11:07:50 1995 Fred Fish * gdbint.texinfo (Releases): Make "gdb.tar.gz" rather than "gdb.tar.Z". Wed Sep 20 13:14:10 1995 Ian Lance Taylor * Makefile.in (maintainer-clean): New target, synonym for realclean. Thu Aug 3 10:45:37 1995 Fred Fish * Update all FSF addresses except those in COPYING* files. Wed Jul 19 18:43:03 1995 Stan Shebs From Richard Earnshaw (rearnsha@armltd.co.uk): * gdb.texinfo (convenience variables): Document $_exitcode. (quit): Document optional expression to use as exit code. Thu Jun 22 21:27:33 1995 Victoria Mixon * gdb.texinfo, remote.texi: Brought up to date with various GDB changes. Tue Jun 20 14:35:38 1995 Stan Shebs * gdb.texinfo: Update dates and versions, fix comments about hardware watchpoints in future releases and about the sharedlibrary command. Mon May 8 09:30:36 1995 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo: Remove node `XCOFF differences'. Describe value of C_FUN stab. Other cleanups. Wed Apr 19 07:02:19 1995 Jim Kingdon (kingdon@lioth.cygnus.com) * remote.texi (Bootstrapping): Clarify that flush_i_cache is only for the sparc stub. Tue Apr 11 11:41:49 1995 Jim Kingdon (kingdon@lioth.cygnus.com) * annotate.texi: Clarify which addresses have differing formats depending on the language and which do not. Tue Mar 28 16:56:22 1995 J.T. Conklin * remote.texi (NetWare): Changed example to use BOARD= instead of NODE= argument to reflect correspoding change to gdbserve.nlm. Fri Mar 17 06:47:02 1995 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Negative Type Numbers): Mention the fact that GDB, as well as AIX dbx, supports the size type attribute. Thu Mar 16 12:11:32 1995 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Negative Type Numbers): Document types -31 to -34. Mon Mar 13 16:49:13 1995 Per Bothner * gdb.texinfo (Define): Document $arg0... arguments to commands, and new 'if' and 'while' commands. Fri Feb 17 15:24:35 1995 Per Bothner * gdb.texinfo (Artificial arrays): Note use of coerce-to-array-type. Wed Feb 15 11:59:18 1995 J.T. Conklin * all-cfg.texi: New flag, GDBSERVE, for NetWare's gdbserve.nlm. * remote.texi (NetWare): New node, how to use gdbserve.nlm on NetWare targets. Mostly stolen from the Server node. Fri Feb 10 20:20:08 1995 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.texinfo (Setting): Talk about the language of a source file versus the working language. The old documentation did not match what GDB did. Wed Feb 1 20:26:36 1995 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Source Files): Document N_SO used to mark the end of a source file. Mon Jan 23 14:23:37 1995 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.texinfo (Processes): New node. Tue Jan 17 14:09:03 1995 Ian Lance Taylor * remote.texi: Update documentation of set/show mipsfpu. Fri Jan 6 17:17:28 1995 Stan Shebs * gdbgui.texinfo: New file, manual for GUI (gdbtk) users. * Makefile.in (gdbgui.dvi, gdbgui.info): New actions. Sun Sep 4 16:47:21 1994 Stan Shebs (shebs@andros.cygnus.com) * gdbint.texinfo: Removed mentions of some incorrectly placed and obsolete conditionals, described some others. Mon Aug 1 15:42:39 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * gdbint.texinfo: Remove references to BROKEN_LARGE_ALLOCA and SET_STACK_LIMIT_HUGE; they were removed from GDB 14 May 1994. Mon Aug 1 15:12:02 1994 Stan Shebs (shebs@andros.cygnus.com) * gdbint.texinfo: Put regex conditionals in their own table. Tue Jul 26 18:32:52 1994 Stan Shebs (shebs@andros.cygnus.com) * gdbint.texinfo: Removed mentions of many obsolete conditionals, described or fixed the descriptions of many others. Sun Jul 17 14:14:03 1994 Stan Shebs (shebs@andros.cygnus.com) * gdb.texinfo: Add some more credits. * gdbint.texinfo: Capitalize GDB consistently, describe some macros and remove some. Thu Jul 14 18:43:17 1994 Stan Shebs (shebs@andros.cygnus.com) * gdbint.texinfo: Removed mentions of many incorrectly placed and obsolete conditionals, described some others. Tue Jul 12 12:23:15 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * gdb.texinfo (help targets): Changed to `help target', which is the correct gdb command. Wed Jun 22 18:00:51 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * annotate.texi (TODO): New node, for keeping track of annotations suggested but not yet implemented. Wed Jun 1 16:10:45 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Statics): Value of xcoff C_BSTAT points to another symbol, it is not the address itself. Thu May 5 20:23:36 1994 Stan Shebs (shebs@andros.cygnus.com) * stabs.texinfo (Stab Section Basics): Add comment about alignment of stabs-in-coff sections. Wed May 4 06:26:11 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * annotate.texi: Change edition to 0.5 and date to May 1994. Add index. (Frames): New node, for frame annotation. (Displays): New node, for display annotation. * remote.texi (MIPS Remote): Say that set timeout doesn't apply when waiting for your program to stop. Fri Apr 29 18:24:46 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * annotate.texi (Breakpoint Info): Document annotation of header fields and record annotation. Thu Apr 28 07:44:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * annotate.texi: New file, to document annotations. Thu Apr 21 14:20:51 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * Makefile.in (clean): Don't remove GDBvn.texi (apparently on Jan 16 I meant to make this change but did not). Do remove gdb-cfg.texi. Wed Apr 20 11:22:48 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Stab Section Basics): Say what is in .stab section, and say n_strx field is compilation unit relative. * stabs.texinfo: Don't use @code for a.out when it is the name of an object file format. Wed Apr 13 20:29:54 1994 Jim Kingdon (kingdon@deneb.cygnus.com) * gdb.texinfo: Refer to file names, not path names, per rms convention. (Arguments): Fix typo. Thu Mar 24 08:09:12 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Global Variables): Talk about stabs in files where variables are referenced, but not defined. Wed Mar 23 07:16:36 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo: Move stuff on @ and # type descriptors from node Cplusplus to new nodes Member Type Descriptor and Method Type Descriptor. Re-write stuff for #. Wed Mar 16 08:20:19 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.texinfo (Print Settings): Don't document "set print fast-symbolic-addr off". The bug which it worked around was fixed on 25 Feb 94 in coffread.c, so I'm nuking the command. * stabs.texinfo (Alternate Entry Points): New node, rewritten from N_ENTRY node. * stabs.texinfo (Type Descriptors): Add 'Y' type descriptor. Tue Mar 15 08:43:02 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * gdbint.texinfo (Host Conditionals, Target Conditionals): Remove references to ieee-float.c. Fri Mar 11 08:09:40 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.texinfo (Set Breaks): Update documentation for tbreak to match what the code actually does. Wed Mar 9 19:43:05 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Symbol Descriptors): Add OS9000 symbol descriptor s. Tue Mar 1 17:04:43 1994 Jim Kingdon (kingdon@deneb.cygnus.com) * stabs.texinfo (Type Descriptors): Add OS9000 type descriptors c, i, and b. Wed Feb 23 10:44:18 1994 Jim Kingdon (kingdon@rtl.cygnus.com) * stabs.texinfo: Document N_RBRAC as function relative for COFF as well as for ELF and SOM. Unify the descriptions of ELF and SOM as "stabs in sections" rather than just saying "ELF and SOM". Also make that stuff apply to COFF. Fri Feb 18 08:25:58 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.texinfo (Formatting Documentation): Change GhostScript to Ghostscript. Fri Feb 4 06:31:31 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.texinfo (Continuing and Stepping): When talking about "step" versus functions without line numbers, also mention stepping into them as well as "step" when you are in them. Tell the user how to deal with the situation. Add comment about "debugging information". Thu Feb 3 11:39:59 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Enumerations): Document restriction on where enumeration types can appear and still win with GDB. Wed Feb 2 11:29:17 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Negative Type Numbers): Document format for type -16. Thu Jan 27 16:53:56 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.texinfo (Selection, Frame Info): Update information about arbitrary frame specficiations. Wed Jan 26 15:31:57 1994 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdb.texinfo, remote.texi: general editing pass prior to Net release Tue Jan 25 12:12:04 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (String Field): Discuss continuing stabs with ?. Wed Jan 19 06:39:24 1994 David J. Mackenzie (djm@thepub.cygnus.com) * stabs.texinfo (Non-Stab Symbol Types): Mention N_SET* | N_EXT. Sun Jan 16 12:43:32 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo: Re-do stuff about C_BSTAT and move from XCOFF Differences node to Statics node. (Statics): Discuss XCOFF use of V symbol descriptor. * Makefile.in: Remove refcard.dvi and GDBvn.texi in realclean, not clean. Wed Jan 12 21:29:54 1994 John Gilmore (gnu@cygnus.com) * gdb.texinfo (Print Settings): Document `set print fast-symbolic-addr' and improve the doc for some other `set print's. Mon Jan 3 17:23:07 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (String Field): Talk about defining several type numbers at once. Fix lint regarding changing node ELF Transformations to ELF and SOM Transformations. Fri Dec 31 00:42:43 1993 John Gilmore (gnu@cygnus.com) * stabs.texinfo: Insert Peter Kessler's name as inventor (I think). Tue Dec 28 09:30:40 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Cross-References): `::' is for nested types only within <>. (Structures): Document static members. Mon Dec 27 13:55:04 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo: Document S type attribute. Sun Dec 26 20:46:36 1993 Jeffrey A. Law (law@snake.cs.utah.edu) * stabs.texinfo: Add notes about stabs-in-som where appropriate. Fri Dec 3 19:13:19 1993 John Gilmore (gnu@cygnus.com) * gdbint.texinfo: Fix a few typos. Sun Nov 28 18:06:25 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdb.texinfo, remote.texi: formatting improvements * gdb.texinfo (New Features): mention threads. (Summary, C): fix xrefs in newly contributed text. (Threads): index entries, clarifications, example (passim): minor typos fixed, phrasing improvements * remote.texi (Bootstrapping): rephrase text on ^C and add index entries; (Server): explain use of gdbserver w/real-time systems, add example of conflicting TCP port; (MIPS Remote) break up running text into table, highlighting commands, and add example. Wed Nov 24 14:15:56 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * refcard.tex: avoid bad linebreaks even when REFEDITS=psrc.sed Fri Nov 12 16:10:58 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Nested Symbols): New node. (String Field, Symbol Descriptors, Cross-References): Refer to it. Thu Nov 11 13:26:45 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Stabs in ELF): Clarify how Bbss.bss work with respect to picking which Bbss.bss symbol to use, and (because there seems to be no good way of doing it) re-write some of the text to make it sound like Bbss.bss isn't such a great idea after all (as currently designed). * gdb.texinfo (C): In addition to saying people have to use g++ for good results, say they have to use stabs. Specifically say cfront doesn't work well. (Summary): Merge in information on Modula-2, Pascal, and Chill from the gdb README. Add xrefs to places where the support for the various languages is described in detail. Mon Nov 8 11:47:34 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo: Clean up stuff about visibility and virtual characters. * stabs.texinfo (N_M2C): Cite Sun doc. Fri Nov 5 16:27:27 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdb.texinfo: updates re threads. * remote.texinfo: avoid index entries starting with digits. Tue Nov 2 09:08:37 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Enumerations): Talk about large, negative and octal values. Clean up cross reference to type attributes. (String Field): Say that GDB 4.11 supports size attribute. Sun Oct 31 13:31:10 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * remote.texi (VxWorks Remote): Clarify that rebuilding VxWorks kernel is a mandatory step. Make the stuff about that more concise. Wed Oct 27 00:25:46 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Class Names): New node. * gdb.texinfo (Command Files): Explain order of init file reading. * remote.texi (Bootstrapping): Talk about getting the serial driver to deal with ^C sent by gdb to stop the remote system. Mon Oct 25 03:25:41 1993 Tom Lord (lord@cygnus.com) * libgdb.texinfo (I/O): incorporated better phrasing from rich. * libgdb.texinfo (Defining Commands): made the DOC arg to gdb_define_app_command a char * instead of char ** per a suggestion from kingdon. * libgdb.texinfo: total rewrite from a different starting premise. Wed Oct 20 18:07:44 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Local Variable Parameters): Re-write paragraph on floats passed as doubles (to improve clarity). Tue Oct 19 14:21:18 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdb.texinfo (Source Path): index entries for $cwd, $pdir * a4rc.sed: update to work with Andreas Vogel papersize params * refcard.tex: use Andreas Vogel simplifications of papersize params; remove useless version info; update copyright date. Tue Oct 19 10:46:22 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.texinfo (Symbols): Add class NAME to doc for ptype. Tue Oct 12 09:11:45 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.texinfo (Files): Say what address the load command loads it at. * stabs.texinfo (Common Blocks): Minor cleanups. * stabs.texinfo: Update ld stabs in elf relocation to reflect the fact that Sun has backed away from the linker kludge and thus the relevant issue is changes to the SunPRO tools, not the Solaris linker. * stabs.texinfo (Traditional Integer Types): Clean up description of octal bounds a little bit. Document extra leading zeroes. Thu Oct 7 16:15:37 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.texinfo (Signaling): Update for symbolic symbol names and add a section explaining the difference between the GDB signal command and the shell kill utility. Wed Oct 6 13:23:01 1993 Tom Lord (lord@rtl.cygnus.com) * libgdb.texinfo: added `@' to braces that were unescaped. Mon Oct 4 10:42:18 1993 Tom Lord (lord@rtl.cygnus.com) * libgdb.texinfo: new file. Spec for the gdb library. Sun Oct 3 15:26:56 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Include Files): Fix typo (start -> end). Thu Sep 30 18:24:56 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdb.texinfo, remote.texi: assorted small improvements, mostly from Melissa at FSF's editing pass. Thu Sep 30 11:54:38 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.texinfo: Remove stuff about ar and 14 character filenames. I believe this was fixed by the 13 Sep 89 change to print_frame_info. Also, modern versions of ar like BSD 4.4 or SVR4 don't have this bug. Wed Sep 22 21:22:11 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * remote.texi (Bootstrapping): Discuss 386 call gates. Sat Sep 18 17:10:44 1993 Jim Kingdon (kingdon@poseidon.cygnus.com) * stabs.texinfo (Based Variables): New node. Thu Sep 16 17:48:55 1993 Jim Kingdon (kingdon@cirdan.cygnus.com) * stabs.texinfo (Negative Type Numbers): Re-write discussions of names, sizes, and formats to suggest how not to lose. Sat Sep 11 09:35:11 1993 Jim Kingdon (kingdon@poseidon.cygnus.com) * stabs.texinfo (Methods): Fix typo. Fri Sep 10 06:34:20 1993 David J. Mackenzie (djm@thepub.cygnus.com) * gdb.texinfo: Fix a few typos. Wed Sep 8 09:11:52 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.texinfo: Clarify how well it works with Fortran. * stabs.texinfo (Stabs In ELF, Statics, ELF Transformations): More on relocating stabs in ELF files. Tue Sep 7 13:45:02 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Stabs In ELF): Talk about N_FUN value. Mon Sep 6 19:23:18 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Local Variable Parameters): Talk about nameless parameters on VAX. Fri Sep 3 17:06:08 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdb.texinfo: @up/@down -> @raisesections/@lowersections Fri Sep 3 12:04:15 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo: Make info author notice match the TeX author notice. Tue Aug 31 13:21:06 1993 David J. Mackenzie (djm@thepub.cygnus.com) * stabs.texinfo: Initial-caps all words in node names and non-trivial words in section names. Mon Aug 30 11:13:16 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo: Many minor cleanups. * stabs.texinfo: Remove @deffn except from Expanded Reference node. Sat Aug 28 12:08:09 1993 David J. MacKenzie (djm@edison.eng.umd.edu) * stabs.texinfo: Remove full description of big example. It's not really helpful; just use pieces of it where appropriate. Add more Texinfo formatting directives (@samp, etc.). Use @deffn to define stab types. Eliminate some wordiness. Break up some nodes. Add an (alphabetized) index of symbol types. Use consistent capitalization style in node and section names. Thu Aug 26 06:36:31 1993 Fred Fish (fnf@deneb.cygnus.com) * gdb.texinfo: Change typo "Two two" to "The two". Sun Aug 22 12:15:18 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (XCOFF-differences): Remove references to non-existent types N_DECL and N_RPSYM. * stabs.texinfo (String Field): Say that type attributes bug is fixed in GDB 4.10, since it is. * stabs.texinfo: Clean up djm cleanups, and more cleanups of my own. Sat Aug 21 04:32:28 1993 David MacKenzie (djm@cygnus.com) * stabs.texinfo: Formatting cleanups. Fri Aug 20 20:49:53 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo: When explaining the n_type of a stab, standardize how we do it ('#' as a comment indicator, "36 is N_FUN" as text, no tabs, use @r). (Global Variables): Clean up. Tue Aug 17 15:57:27 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Stack Variables): Re-write. Mon Aug 16 21:20:08 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Stabs-in-elf): Talk about getting the start addresses of a source file. Also revise formatting. Change "object module" or "object file" to "source file". Various: Miscellaneous cleanups. Thu Aug 12 15:11:51 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo: Point to mangling info in gcc's gpcompare.texi. Tue Aug 10 16:57:49 1993 Stan Shebs (shebs@rtl.cygnus.com) * gdbint.texinfo: Removed many nonsensical machine-collected host and target conditionals, described some of the remainder. Tue Aug 10 13:28:30 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * gdbint.texinfo (Getting Started): Use @itemize, not @table. * gdbint.texinfo (Top): Add name to @top line, and re-write the paragraph which follows. * gdbint.texinfo (Host): Use @code not @samp for Makefile variables. Looks better and avoids overful hbox. Fri Jul 30 18:26:21 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Procedures): Improve stuff on nested functions. Thu Jul 29 15:10:58 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * remote.texi: (MIPS Remote) clearer doc for set/show timeout, retransmit-timeout Thu Jul 29 13:16:09 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * gdbint.texinfo: Update statement about `some ancient Unix systems, like Ultrix 4.0' to Ultrix 4.2. Wed Jul 28 15:26:53 1993 Roland H. Pesch (pesch@el_bosque.cygnus.com) * h8-cfg.texi, all-cfg.texi: new flag GDBSERVER * Makefile.in: depend on remote.texi rather than gdbinv-s.texi * remote.texi: (Server) New node on gdbserver. (Remote Serial, ST2000 Remote, MIPS Remote): mention `host:port' syntax for TCP. * remote.texi: new name for former gdbinv-s.texi * gdb.texinfo: use remote.texi rather than gdbinv-s.texi Wed Jul 28 08:26:24 1993 Ian Lance Taylor (ian@cygnus.com) * gdbinv-s.texi: Documented timeout and retransmit-timeout variables for MIPS remote debugging protocol. Mon Jul 26 13:00:09 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Negative Type Numbers): FORTRAN LOGICAL fix. Tue Jul 20 16:30:41 1993 Jim Kingdon (kingdon@deneb.cygnus.com) * Makefile.in (refcard.dvi): Use srcdir where necessary. Mon Jul 19 12:02:50 1993 Roland H. Pesch (pesch@cygnus.com) * gdb.texinfo: repair conditional bugs in text markup Fri Jul 16 18:57:50 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdb.texinfo, all-cfg.texi, h8-cfg.texi: introduce MOD2 switch to select Modula-2 material. Thu Jul 15 13:15:01 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo: Cleanups regarding statics. * gdbinv-s.texi (Bootstrapping): Document exceptionHandler. (Debug Session): Mention exceptionHandler. Add xref to Bootstrapping. Mon Jul 12 13:37:02 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo: N_MAIN is sometimes used for C. Fri Jul 9 09:47:02 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * gdbint.texinfo (Host, Target Conditionals): Remove TM_FILE_OVERRIDE. Tue Jul 6 12:41:28 1993 John Gilmore (gnu@cygnus.com) * gdbint.texinfo (Target Conditionals): Remove NO_TYPEDEFS, removed from the code by Kingdon. Tue Jul 6 12:24:34 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * gdb.texinfo (Break Commands): Remove stuff about flushing terminal input when evaluating breakpoint conditions; the bug has been fixed. * gdb.texinfo (Continuing and Stepping): Argument to "continue" sets the ignore count to N-1, not to N. Thu Jul 1 14:57:42 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * refcard.tex (\hoffset): correct longstanding error to match intended offset; avoids cutting off edge on some printers Wed Jun 30 18:23:06 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Parameters): Say that order of stabs is significant. Fri Jun 25 21:34:52 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Common Blocks): Say what Sun FORTRAN does. Fri Jun 25 16:15:10 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * Makefile.in: (REFEDITS) new var to control whether PS or CM fonts and whether US or A4 paper for GDB refcard; (refcard.dvi) collect sed edits if any, apply to refcard before formatting; (refcard.ps) stop implying PS fonts if PS output requested; (lrefcard.ps) delete extra target for variant PS fonts * refcard.tex: parametrize papersize dependent info, collect in easily replaced spot * a4rc.sed: new file, edits to refcard for A4 paper Fri Jun 25 14:21:46 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Negative Type Numbers): Type -16 is 4 bytes. Wed Jun 23 15:02:50 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Negative Type Numbers): Minor character cleanups. Tue Jun 22 16:31:52 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo: Express disapproval of 'D' symbol descriptor politely rather than rudely. Fri Jun 18 19:42:09 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo: Document common blocks. Fri Jun 18 12:12:57 1993 Fred Fish (fnf@cygnus.com) * stabs.texinfo: Add some basic info about stabs-in-elf. Fri Jun 18 13:57:09 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Top): Minor cleanup. Mon Jun 14 16:16:51 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com) * Makefile.in (install-info): remove parentdir support Tue Jun 15 18:11:39 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdb.texinfo (Copying): delete this node and references to it; RMS says this manual need not carry GPL. (passim): Improvements from last round at FSF, largely due to Ian Taylor review, and minor formatting improvements. * gdbinv-s.texi (passim): Improvements from last round at FSF, largely due to Ian Taylor review. (Debug Session): minor edits to new text. Sun Jun 13 12:52:39 1993 Jim Kingdon (kingdon@cygnus.com) * Makefile.in (realclean): Remove info and dvi files too. Sat Jun 12 16:09:22 1993 Jim Kingdon (kingdon@cygnus.com) * {all,h8}-config.texi: Rename to *-cfg.texi for 14 char filenames. * Makefile.in: Change accordingly. gdb-config.texi -> gdb-cfg.texi. * gdb.texinfo: Change accordingly. * stabs.texinfo: Clean up N_{L,R}BRAC. Discuss what addresses of N_{L,R}BRAC,N_SLINE are relative to. Fri Jun 11 15:15:55 1993 Jim Kingdon (kingdon@cygnus.com) * Makefile.in (GDBvn.texi): Update atomically. Wed Jun 9 10:58:16 1993 Jim Kingdon (kingdon@cygnus.com) * gdbinv-s.texi (Debug Session): Document exceptionHook. Tue Jun 8 13:42:04 1993 Jim Kingdon (kingdon@cygnus.com) * gdb.texinfo (Print Settings): Move all stuff relating to symbolic addresses together. Also motivate the set print symbol-filename command and suggest other solutions. Tue Jun 1 22:46:43 1993 Fred Fish (fnf@cygnus.com) * gdb.texinfo (set print elements): Note that the number of elements is set to unlimited by "set print elements 0". Mon May 31 08:06:55 1993 Jim Kingdon (kingdon@cygnus.com) * stabs.texinfo (Builtin Type Descriptors): Try to clarify what NF_LDOUBLE means. (Stab Types): Include Solaris stab types. (Procedures): Document Solaris extensions. Thu May 27 06:20:42 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * gdb.texinfo: Add `set print symbol-filename' doc. Wed May 26 00:26:42 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Arrays): Talk about type definition vs. type information. * stabs.texinfo (Builtin Type Descriptors): Talk about omitting the trailing semicolon. Tue May 25 14:49:42 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Line Numbers, Source Files): Re-write these two nodes and merge in other parts of the document addressing these subjects. gdbint.texinfo (XCOFF): Remove info which is now in stabs.texinfo. * stabs.texinfo (Subranges, Arrays): Try to explain about the semicolon at the end of a range type. * stabs.texinfo (Subranges): "A offset" and "T offset" are not AIX extensions. Mon May 24 09:00:33 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Stabs Format): Misc fixes. Sat May 22 10:40:56 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Constants): Allow an `e' constant to be non-enum. (Traditional builtin types): Document convex convention for long long. (Negative builtin types): Discuss type names, and misc fixes. Fri May 21 11:20:31 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Builtin Type Descriptors): Document the floating point types used with @samp{R} type descriptor. (Symbol Descriptors): Describe how to handle conflict between different meanings of @samp{P} symbol descriptor. Thu May 20 13:35:10 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo: Remove node Quick Reference and put its children directly under the main menu. * stabs.texinfo: Many more changes to bring it into line with AIX documentation and reality. I think it now has all the information from the AIX documentation, except that I burned out when I got to variant records (Pascal and Modula-2) and all the COBOL types. Oh well, we can add them later when we're worrying more about those languages. * stabs.texinfo (Automatic variables): Talk about what it means to omit the symbol descriptor. Tue May 18 17:59:18 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * stabs.texinfo (Parameters): Add "(sometimes)" when describing gcc2 behavior with promoted args. Fri May 14 21:35:29 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdb.texinfo: include readline appendices in info version of manual Fri May 7 11:56:18 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdbinv-s.texi (Remote Serial): describe new ^C behavior in target remote. * gdb.texinfo (Machine Code): more index entries for disassemble Fri May 7 10:12:30 1993 Fred Fish (fnf@cygnus.com) * Clarify the intended use of the gdb-testers and gdb-patches mailing lists, and shrink gzip comment. Thu May 6 16:39:50 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdb.texinfo (Shell Commands): do not mention SHELL env var in DOSHOST configuration of manual. * gdb.texinfo (MIPS Stack): new node. * all-config.texi (MIPS) new switch. * gdbinv-s.texi (Nindy Options) Remove two instances of future tense; (MIPS Remote) new node. * gdb.texinfo (passim) rephrases to work around makeinfo @value bug; (Environment) less passive, other small cleanups in text about .cshrc/.bashrc; (Invoking GDB) new MIPS Remote menu entry; (Remote) new MIPS Remote menu entry. Thu Apr 29 09:36:25 1993 Jim Kingdon (kingdon@cygnus.com) * stabs.texinfo: Many changes to include information from the AIX documentation. * gdb.texinfo (Environment): Mention pitfall with .cshrc. Tue Apr 27 14:02:57 1993 Jim Kingdon (kingdon@cygnus.com) * gdbint.texinfo (new node Debugging GDB, elsewhere): Move a bunch of information from ../README. (Getting Started): New node. Fri Apr 23 17:21:13 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdbinv-s.texi, gdb.texinfo: include Hitachi SH target * gdb.texinfo: advance manual revision dates to present * gdbinv-s.texi, gdb.texinfo, all-config.texi, h8-config.texi: stop using silly Roman numerals in @set variable names Fri Apr 23 07:30:01 1993 Jim Kingdon (kingdon@cygnus.com) * stabs.texinfo (Parameters): Keep trying to get this right. Wed Apr 21 15:18:47 1993 Jim Kingdon (kingdon@cygnus.com) * stabs.texinfo (Parameters): More on "local parameters". Mon Apr 19 08:00:51 1993 Jim Kingdon (kingdon@cygnus.com) * stabs.texinfo (Parameters): Re-do "local parameters" section. Sun Apr 18 09:47:45 1993 Jim Kingdon (kingdon@cygnus.com) * stabs.texinfo (Symbol descriptors): Re-do using @table and @xref. (Parameters): Rewrite. (xcoff-differences, Sun-differences): Minor changes. Thu Apr 15 02:35:24 1993 John Gilmore (gnu@cacophony.cygnus.com) * stabs.texinfo: Minor cleanup. Wed Apr 14 17:31:00 1993 Jim Kingdon (kingdon@cygnus.com) * gdbint.texinfo: Minor xcoff stuff. Wed Apr 7 14:11:07 1993 Fred Fish (fnf@cygnus.com) * gdbint.texinfo: Update for new config directory structure. Add info about internal type data structures. Mon Apr 5 09:06:30 1993 Ian Lance Taylor (ian@cygnus.com) * Makefile.in (SFILES_INCLUDED): gdb-config.texi is no longer in $(srcdir). (gdb-config.texi): Depend on file in $(srcdir). Fri Apr 2 16:55:13 1993 Jim Kingdon (kingdon@cygnus.com) * stabs.texinfo: Fixes about N_SO. Fri Mar 26 18:00:35 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdb.texinfo: include list of nonstandard init file names * *-config.texi: new switch GENERIC for text that applies *only* to (usual) multiple-target version of manual * gdb.texinfo, gdbinv-s.texi: Update conditional markup to correct h8 config * gdb.texinfo: depend on latest fixed makeinfo, use conditionals in menus (rather than conditionally selected multiple alternative menus). * Makefile.in: define and use DOC_CONFIG var to select configuration for GDB user manual. * gdb-config.texi: delete from repository, generate from Makefile. * all-config.texi: normal `generic' configuration file, formerly stored as gdb-config.texi Wed Mar 24 14:03:19 1993 david d `zoo' zuhn (zoo at poseidon.cygnus.com) * Makefile.in: add dvi target to build all .dvi files Tue Mar 23 16:03:24 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdb.texinfo, gdvinv-s.texinfo: formatting improvements. Fri Mar 19 21:46:50 1993 John Gilmore (gnu@cygnus.com) * gdbint.texinfo: Doc NO_MMALLOC and NO_MMALLOC_CHECK as host conditionals. * stabs.texinfo: More array fixes inspired by Jim's. Fri Mar 19 10:23:34 1993 Jim Kingdon (kingdon@cygnus.com) * stabs.texinfo: Fixes re arrays and continuations. * gdbint.texinfo: Add XCOFF node. Mon Mar 8 15:52:18 1993 John Gilmore (gnu@cygnus.com) * gdb.texinfo: Add `set print max-symbolic-offset' doc. Sun Feb 21 17:09:38 1993 Per Bothner (bothner@rtl.cygnus.com) * stabs.texinfo: Fix for array types to mention lower bounds. Thu Feb 18 01:19:49 1993 John Gilmore (gnu@cygnus.com) * gdbint.texinfo: Update PTRACE_ARG3_TYPE doc, pull PT_*. Wed Feb 17 08:15:24 1993 John Gilmore (gnu@cygnus.com) * gdbint.texinfo: Remove SET_STACK_LIMIT_HUGE from target defines. Thu Feb 11 10:38:40 1993 John Gilmore (gnu@cygnus.com) * gdbint.texinfo: Fix thinko (NM_FILE => NAT_FILE). Found by Michael Ben-Gershon . Wed Feb 10 23:59:19 1993 John Gilmore (gnu@cygnus.com) * gdbint.texinfo: Eliminate IBM6000_HOST, document IBM6000_TARGET. Tue Feb 9 18:26:21 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdb.texinfo, gdbinv-s.texi: misc updates Sat Feb 6 10:25:47 1993 John Gilmore (gnu@cygnus.com) * gdbint.texinfo: Brief documentation for longjmp support, from an email msg by Stu. Fri Feb 5 14:10:15 1993 John Gilmore (gnu@cygnus.com) * stabs.texinfo: Fix description of floating point "range" types (which really define basic types). Reported by Jim Meehan, . * gdbint.texinfo: Remove COFF_NO_LONG_FILE_NAMES define, now gone. Thu Feb 4 13:56:46 1993 Ian Lance Taylor (ian@cygnus.com) * gdbint.texinfo: Slightly expand section on supporting a new object file format. Thu Feb 4 01:49:04 1993 John Gilmore (gnu@cygnus.com) * Makefile.in (refcard.ps, lrefcard.ps): Remove psref.tex intermediate file. Tue Feb 2 12:18:06 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdb.texinfo, gdbinv-s.texi: miscellaneous stylistic cleanups Mon Feb 1 15:35:47 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdbinv-s.texi: z8000 simulator target name is just "sim" * gdbinv-s.texi: Mention that Z8000 simulator can simulate Z8001 as well as Z8002. Sat Nov 28 06:51:35 1992 John Gilmore (gnu@cygnus.com) * gdbint.texinfo: Add sections on clean design and on how to send in changes. Mon Nov 9 23:57:02 1992 John Gilmore (gnu@cygnus.com) * gdbint.texinfo: Add how to declare the result of make_cleanup. Mon Oct 26 11:09:47 1992 John Gilmore (gnu@cygnus.com) * gdb.texinfo: Fix typo, reported by Karl Berry. Fri Oct 23 00:41:21 1992 John Gilmore (gnu@cygnus.com) * gdb.texinfo: Add opcodes dir to GDB distribution description. Sat Oct 10 18:04:58 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * gdbint.texinfo: fixed a stray email address (needs @@), added @table @code to node "Native Conditionals" Tue Sep 22 00:34:15 1992 John Gilmore (gnu@cygnus.com) * gdbint.texinfo: Describe coding style of GDB. Mon Sep 21 19:32:16 1992 John Gilmore (gnu@cygnus.com) * stabs.texinfo: Minor wording changes. Tue Sep 15 02:57:09 1992 John Gilmore (gnu@cygnus.com) * gdbint.texinfo: Improve release doc slightly. Fri Sep 11 01:34:25 1992 John Gilmore (gnu@sphagnum.cygnus.com) * gdbint.texinfo: Improve doc of GDB config macros. Wed Sep 9 16:52:06 1992 John Gilmore (gnu@cygnus.com) * stabs.texinfo: Remove Bothner's changes for C++ nested types. These will be reinserted when examined. Mon Aug 24 01:17:55 1992 John Gilmore (gnu@cygnus.com) * gdbint.texinfo: Make a start at documenting all the #if macros in GDB. At least list them all, and start separating them into host-specific and target-specific. Tue Aug 18 15:59:13 1992 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdbinv-s.m4.in: refrain from using @cartouche for just a few examples (not consistent w others). gdb.texinfo: issue disclaimer paragraph on cmdline options only for generic vn of doc Tue Aug 18 14:53:27 1992 Ian Lance Taylor (ian@cygnus.com) * Makefile.in: always create installation directories. Tue Aug 18 14:11:50 1992 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdb.texinfo: in h8 config, do not describe searching commands. Mon Aug 17 18:07:59 1992 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdb.texinfo, none.m4, h8.m4, gdbinv-s.m4.in: improve H8/300 conditionals; introduce a few generic switches that may be useful for other cross-dev or dos-hosted configs. * gdb.texinfo: fix typo in "info reg" description Sun Aug 16 01:16:18 1992 John Gilmore (gnu@cygnus.com) * stabs.texinfo: Minor updates from running TeX over it. * Makefile.in (stabs.dvi, stabs.ps): Add. Sat Aug 15 20:52:24 1992 Per Bothner (bothner@rtl.cygnus.com) * stabs.texinfo: Stabs documentation, written by Julia Menapace. First pass at converting it to texinfo. Sat Aug 15 03:14:59 1992 John Gilmore (gnu@cygnus.com) * gdb.texinfo, refcard.tex: Document mult args on `info reg'. * Makefile.in (refcard.ps, lrefcard.ps): Add missing $(srdir). Fri Aug 14 21:08:47 1992 John Gilmore (gnu@cygnus.com) * gdbint.texinfo: Add section on partial symbol tables. Sat Jun 20 16:31:10 1992 John Gilmore (gnu at cygnus.com) * gdb.texinfo: document `set remotedebug' and `set rstack_high_address'. Thu May 14 17:09:48 1992 Roland H. Pesch (pesch@fowanton.cygnus.com) * gdb.texinfo: slight expansion of new text on reading info files * gdbinv-s.m4.in: correct and expand info on cross-debugging H8/300 from DOS. Tue May 12 12:22:47 1992 John Gilmore (gnu at cygnus.com) * gdb.texinfo: `info user' => `show user'. Noticed by David Taylor. Mon May 11 19:06:27 1992 John Gilmore (gnu at cygnus.com) * gdb.texinfo: Say how to read the `info' files. Tue May 5 12:11:38 1992 K. Richard Pixley (rich@cygnus.com) * Makefile.in: gm4 -> m4. Fri Apr 10 17:50:43 1992 John Gilmore (gnu at rtl.cygnus.com) * gdb.texinfo: Update for GDB-4.5. Move `Formatting Documentation' ahead of `Installing GDB' to match README. Update shared library doc, -readnow and -mapped, and directory structure (add glob and mmalloc). Update configure doc. Tue Mar 24 23:28:38 1992 K. Richard Pixley (rich@cygnus.com) * Makefile.in: remove $(srcdir) from gdb.info rule. Sat Mar 7 18:44:50 1992 K. Richard Pixley (rich@rtl.cygnus.com) * Makefile.in: commented out gdb-all.texinfo rule. This is temporary. Wed Feb 26 18:04:40 1992 K. Richard Pixley (rich@cygnus.com) * Makefile.in, configure.in: removed traces of namesubdir, -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced copyrights to '92, changed some from Cygnus to FSF. Fri Dec 13 09:47:31 1991 John Gilmore (gnu at cygnus.com) * gdb.texinfo: Improve how we ask for bug reports. Tue Dec 10 04:07:21 1991 K. Richard Pixley (rich at rtl.cygnus.com) * Makefile.in: infodir belongs in datadir. Fri Dec 6 23:57:34 1991 K. Richard Pixley (rich at rtl.cygnus.com) * Makefile.in: remove spaces following hyphens, bsd make can't cope. install using INSTALL_DATA. added clean-info. added standards.text support. Thu Dec 5 22:46:12 1991 K. Richard Pixley (rich at rtl.cygnus.com) * Makefile.in: idestdir and ddestdir go away. Added copyrights and shift gpl to v2. Added ChangeLog if it didn't exist. docdir and mandir now keyed off datadir by default. Local Variables: mode: change-log left-margin: 8 fill-column: 74 version-control: never End: gdb-doc-7.6.2/gdb/doc/fdl.texi0000644000175000017500000005601412250770607015040 0ustar zumbizumbi@c The GNU Free Documentation License. @center Version 1.3, 3 November 2008 @c This file is intended to be included within another document, @c hence no sectioning command or @node. @display Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. @uref{http://fsf.org/} Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @end display @enumerate 0 @item PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document @dfn{free} in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of ``copyleft'', which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. @item APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The ``Document'', below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as ``you''. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A ``Modified Version'' of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A ``Secondary Section'' is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The ``Invariant Sections'' are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The ``Cover Texts'' are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A ``Transparent'' copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not ``Transparent'' is called ``Opaque''. Examples of suitable formats for Transparent copies include plain @sc{ascii} without markup, Texinfo input format, La@TeX{} input format, @acronym{SGML} or @acronym{XML} using a publicly available @acronym{DTD}, and standard-conforming simple @acronym{HTML}, PostScript or @acronym{PDF} designed for human modification. Examples of transparent image formats include @acronym{PNG}, @acronym{XCF} and @acronym{JPG}. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, @acronym{SGML} or @acronym{XML} for which the @acronym{DTD} and/or processing tools are not generally available, and the machine-generated @acronym{HTML}, PostScript or @acronym{PDF} produced by some word processors for output purposes only. The ``Title Page'' means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, ``Title Page'' means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. The ``publisher'' means any person or entity that distributes copies of the Document to the public. A section ``Entitled XYZ'' means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as ``Acknowledgements'', ``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' of such a section when you modify the Document means that it remains a section ``Entitled XYZ'' according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. @item VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. @item COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. @item MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: @enumerate A @item Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. @item List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. @item State on the Title page the name of the publisher of the Modified Version, as the publisher. @item Preserve all the copyright notices of the Document. @item Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. @item Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. @item Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. @item Include an unaltered copy of this License. @item Preserve the section Entitled ``History'', Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled ``History'' in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. @item Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the ``History'' section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. @item For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. @item Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. @item Delete any section Entitled ``Endorsements''. Such a section may not be included in the Modified Version. @item Do not retitle any existing section to be Entitled ``Endorsements'' or to conflict in title with any Invariant Section. @item Preserve any Warranty Disclaimers. @end enumerate If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled ``Endorsements'', provided it contains nothing but endorsements of your Modified Version by various parties---for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. @item COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled ``History'' in the various original documents, forming one section Entitled ``History''; likewise combine any sections Entitled ``Acknowledgements'', and any sections Entitled ``Dedications''. You must delete all sections Entitled ``Endorsements.'' @item COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. @item AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an ``aggregate'' if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. @item TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled ``Acknowledgements'', ``Dedications'', or ``History'', the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. @item TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. @item FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See @uref{http://www.gnu.org/copyleft/}. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License ``or any later version'' applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. @item RELICENSING ``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A ``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the site means any set of copyrightable works thus published on the MMC site. ``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. ``Incorporate'' means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is ``eligible for relicensing'' if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. @end enumerate @page @heading ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: @smallexample @group Copyright (C) @var{year} @var{your name}. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end group @end smallexample If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the ``with@dots{}Texts.'' line with this: @smallexample @group with the Invariant Sections being @var{list their titles}, with the Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}. @end group @end smallexample If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. @c Local Variables: @c ispell-local-pdict: "ispell-dict" @c End: gdb-doc-7.6.2/gdb/doc/stabs.info0000644000175000017500000054647512250773371015411 0ustar zumbizumbiThis is stabs.info, produced by makeinfo version 4.13 from ./stabs.texinfo. INFO-DIR-SECTION Software development START-INFO-DIR-ENTRY * Stabs: (stabs). The "stabs" debugging information format. END-INFO-DIR-ENTRY Copyright (C) 1992-2013 Free Software Foundation, Inc. Contributed by Cygnus Support. Written by Julia Menapace, Jim Kingdon, and David MacKenzie. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This document describes the stabs debugging symbol tables. Copyright (C) 1992-2013 Free Software Foundation, Inc. Contributed by Cygnus Support. Written by Julia Menapace, Jim Kingdon, and David MacKenzie. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".  File: stabs.info, Node: Top, Next: Overview, Up: (dir) The "stabs" representation of debugging information *************************************************** This document describes the stabs debugging format. * Menu: * Overview:: Overview of stabs * Program Structure:: Encoding of the structure of the program * Constants:: Constants * Variables:: * Types:: Type definitions * Macro define and undefine:: Representation of #define and #undef * Symbol Tables:: Symbol information in symbol tables * Cplusplus:: Stabs specific to C++ * Stab Types:: Symbol types in a.out files * Symbol Descriptors:: Table of symbol descriptors * Type Descriptors:: Table of type descriptors * Expanded Reference:: Reference information by stab type * Questions:: Questions and anomalies * Stab Sections:: In some object file formats, stabs are in sections. * GNU Free Documentation License:: The license for this documentation * Symbol Types Index:: Index of symbolic stab symbol type names.  File: stabs.info, Node: Overview, Next: Program Structure, Prev: Top, Up: Top 1 Overview of Stabs ******************* "Stabs" refers to a format for information that describes a program to a debugger. This format was apparently invented by Peter Kessler at the University of California at Berkeley, for the `pdx' Pascal debugger; the format has spread widely since then. This document is one of the few published sources of documentation on stabs. It is believed to be comprehensive for stabs used by C. The lists of symbol descriptors (*note Symbol Descriptors::) and type descriptors (*note Type Descriptors::) are believed to be completely comprehensive. Stabs for COBOL-specific features and for variant records (used by Pascal and Modula-2) are poorly documented here. Other sources of information on stabs are `Dbx and Dbxtool Interfaces', 2nd edition, by Sun, 1988, and `AIX Version 3.2 Files Reference', Fourth Edition, September 1992, "dbx Stabstring Grammar" in the a.out section, page 2-31. This document is believed to incorporate the information from those two sources except where it explicitly directs you to them for more information. * Menu: * Flow:: Overview of debugging information flow * Stabs Format:: Overview of stab format * String Field:: The string field * C Example:: A simple example in C source * Assembly Code:: The simple example at the assembly level  File: stabs.info, Node: Flow, Next: Stabs Format, Up: Overview 1.1 Overview of Debugging Information Flow ========================================== The GNU C compiler compiles C source in a `.c' file into assembly language in a `.s' file, which the assembler translates into a `.o' file, which the linker combines with other `.o' files and libraries to produce an executable file. With the `-g' option, GCC puts in the `.s' file additional debugging information, which is slightly transformed by the assembler and linker, and carried through into the final executable. This debugging information describes features of the source file like line numbers, the types and scopes of variables, and function names, parameters, and scopes. For some object file formats, the debugging information is encapsulated in assembler directives known collectively as "stab" (symbol table) directives, which are interspersed with the generated code. Stabs are the native format for debugging information in the a.out and XCOFF object file formats. The GNU tools can also emit stabs in the COFF and ECOFF object file formats. The assembler adds the information from stabs to the symbol information it places by default in the symbol table and the string table of the `.o' file it is building. The linker consolidates the `.o' files into one executable file, with one symbol table and one string table. Debuggers use the symbol and string tables in the executable as a source of debugging information about the program.  File: stabs.info, Node: Stabs Format, Next: String Field, Prev: Flow, Up: Overview 1.2 Overview of Stab Format =========================== There are three overall formats for stab assembler directives, differentiated by the first word of the stab. The name of the directive describes which combination of four possible data fields follows. It is either `.stabs' (string), `.stabn' (number), or `.stabd' (dot). IBM's XCOFF assembler uses `.stabx' (and some other directives such as `.file' and `.bi') instead of `.stabs', `.stabn' or `.stabd'. The overall format of each class of stab is: .stabs "STRING",TYPE,OTHER,DESC,VALUE .stabn TYPE,OTHER,DESC,VALUE .stabd TYPE,OTHER,DESC .stabx "STRING",VALUE,TYPE,SDB-TYPE For `.stabn' and `.stabd', there is no STRING (the `n_strx' field is zero; see *note Symbol Tables::). For `.stabd', the VALUE field is implicit and has the value of the current file location. For `.stabx', the SDB-TYPE field is unused for stabs and can always be set to zero. The OTHER field is almost always unused and can be set to zero. The number in the TYPE field gives some basic information about which type of stab this is (or whether it _is_ a stab, as opposed to an ordinary symbol). Each valid type number defines a different stab type; further, the stab type defines the exact interpretation of, and possible values for, any remaining STRING, DESC, or VALUE fields present in the stab. *Note Stab Types::, for a list in numeric order of the valid TYPE field values for stab directives.  File: stabs.info, Node: String Field, Next: C Example, Prev: Stabs Format, Up: Overview 1.3 The String Field ==================== For most stabs the string field holds the meat of the debugging information. The flexible nature of this field is what makes stabs extensible. For some stab types the string field contains only a name. For other stab types the contents can be a great deal more complex. The overall format of the string field for most stab types is: "NAME:SYMBOL-DESCRIPTOR TYPE-INFORMATION" NAME is the name of the symbol represented by the stab; it can contain a pair of colons (*note Nested Symbols::). NAME can be omitted, which means the stab represents an unnamed object. For example, `:t10=*2' defines type 10 as a pointer to type 2, but does not give the type a name. Omitting the NAME field is supported by AIX dbx and GDB after about version 4.8, but not other debuggers. GCC sometimes uses a single space as the name instead of omitting the name altogether; apparently that is supported by most debuggers. The SYMBOL-DESCRIPTOR following the `:' is an alphabetic character that tells more specifically what kind of symbol the stab represents. If the SYMBOL-DESCRIPTOR is omitted, but type information follows, then the stab represents a local variable. For a list of symbol descriptors, see *note Symbol Descriptors::. The `c' symbol descriptor is an exception in that it is not followed by type information. *Note Constants::. TYPE-INFORMATION is either a TYPE-NUMBER, or `TYPE-NUMBER='. A TYPE-NUMBER alone is a type reference, referring directly to a type that has already been defined. The `TYPE-NUMBER=' form is a type definition, where the number represents a new type which is about to be defined. The type definition may refer to other types by number, and those type numbers may be followed by `=' and nested definitions. Also, the Lucid compiler will repeat `TYPE-NUMBER=' more than once if it wants to define several type numbers at once. In a type definition, if the character that follows the equals sign is non-numeric then it is a TYPE-DESCRIPTOR, and tells what kind of type is about to be defined. Any other values following the TYPE-DESCRIPTOR vary, depending on the TYPE-DESCRIPTOR. *Note Type Descriptors::, for a list of TYPE-DESCRIPTOR values. If a number follows the `=' then the number is a TYPE-REFERENCE. For a full description of types, *note Types::. A TYPE-NUMBER is often a single number. The GNU and Sun tools additionally permit a TYPE-NUMBER to be a pair (FILE-NUMBER,FILETYPE-NUMBER) (the parentheses appear in the string, and serve to distinguish the two cases). The FILE-NUMBER is 0 for the base source file, 1 for the first included file, 2 for the next, and so on. The FILETYPE-NUMBER is a number starting with 1 which is incremented for each new type defined in the file. (Separating the file number and the type number permits the `N_BINCL' optimization to succeed more often; see *note Include Files::). There is an AIX extension for type attributes. Following the `=' are any number of type attributes. Each one starts with `@' and ends with `;'. Debuggers, including AIX's dbx and GDB 4.10, skip any type attributes they do not recognize. GDB 4.9 and other versions of dbx may not do this. Because of a conflict with C++ (*note Cplusplus::), new attributes should not be defined which begin with a digit, `(', or `-'; GDB may be unable to distinguish those from the C++ type descriptor `@'. The attributes are: `aBOUNDARY' BOUNDARY is an integer specifying the alignment. I assume it applies to all variables of this type. `pINTEGER' Pointer class (for checking). Not sure what this means, or how INTEGER is interpreted. `P' Indicate this is a packed type, meaning that structure fields or array elements are placed more closely in memory, to save memory at the expense of speed. `sSIZE' Size in bits of a variable of this type. This is fully supported by GDB 4.11 and later. `S' Indicate that this type is a string instead of an array of characters, or a bitstring instead of a set. It doesn't change the layout of the data being represented, but does enable the debugger to know which type it is. `V' Indicate that this type is a vector instead of an array. The only major difference between vectors and arrays is that vectors are passed by value instead of by reference (vector coprocessor extension). All of this can make the string field quite long. All versions of GDB, and some versions of dbx, can handle arbitrarily long strings. But many versions of dbx (or assemblers or linkers, I'm not sure which) cretinously limit the strings to about 80 characters, so compilers which must work with such systems need to split the `.stabs' directive into several `.stabs' directives. Each stab duplicates every field except the string field. The string field of every stab except the last is marked as continued with a backslash at the end (in the assembly code this may be written as a double backslash, depending on the assembler). Removing the backslashes and concatenating the string fields of each stab produces the original, long string. Just to be incompatible (or so they don't have to worry about what the assembler does with backslashes), AIX can use `?' instead of backslash.  File: stabs.info, Node: C Example, Next: Assembly Code, Prev: String Field, Up: Overview 1.4 A Simple Example in C Source ================================ To get the flavor of how stabs describe source information for a C program, let's look at the simple program: main() { printf("Hello world"); } When compiled with `-g', the program above yields the following `.s' file. Line numbers have been added to make it easier to refer to parts of the `.s' file in the description of the stabs that follows.  File: stabs.info, Node: Assembly Code, Prev: C Example, Up: Overview 1.5 The Simple Example at the Assembly Level ============================================ This simple "hello world" example demonstrates several of the stab types used to describe C language source files. 1 gcc2_compiled.: 2 .stabs "/cygint/s1/users/jcm/play/",100,0,0,Ltext0 3 .stabs "hello.c",100,0,0,Ltext0 4 .text 5 Ltext0: 6 .stabs "int:t1=r1;-2147483648;2147483647;",128,0,0,0 7 .stabs "char:t2=r2;0;127;",128,0,0,0 8 .stabs "long int:t3=r1;-2147483648;2147483647;",128,0,0,0 9 .stabs "unsigned int:t4=r1;0;-1;",128,0,0,0 10 .stabs "long unsigned int:t5=r1;0;-1;",128,0,0,0 11 .stabs "short int:t6=r1;-32768;32767;",128,0,0,0 12 .stabs "long long int:t7=r1;0;-1;",128,0,0,0 13 .stabs "short unsigned int:t8=r1;0;65535;",128,0,0,0 14 .stabs "long long unsigned int:t9=r1;0;-1;",128,0,0,0 15 .stabs "signed char:t10=r1;-128;127;",128,0,0,0 16 .stabs "unsigned char:t11=r1;0;255;",128,0,0,0 17 .stabs "float:t12=r1;4;0;",128,0,0,0 18 .stabs "double:t13=r1;8;0;",128,0,0,0 19 .stabs "long double:t14=r1;8;0;",128,0,0,0 20 .stabs "void:t15=15",128,0,0,0 21 .align 4 22 LC0: 23 .ascii "Hello, world!\12\0" 24 .align 4 25 .global _main 26 .proc 1 27 _main: 28 .stabn 68,0,4,LM1 29 LM1: 30 !#PROLOGUE# 0 31 save %sp,-136,%sp 32 !#PROLOGUE# 1 33 call ___main,0 34 nop 35 .stabn 68,0,5,LM2 36 LM2: 37 LBB2: 38 sethi %hi(LC0),%o1 39 or %o1,%lo(LC0),%o0 40 call _printf,0 41 nop 42 .stabn 68,0,6,LM3 43 LM3: 44 LBE2: 45 .stabn 68,0,6,LM4 46 LM4: 47 L1: 48 ret 49 restore 50 .stabs "main:F1",36,0,0,_main 51 .stabn 192,0,0,LBB2 52 .stabn 224,0,0,LBE2  File: stabs.info, Node: Program Structure, Next: Constants, Prev: Overview, Up: Top 2 Encoding the Structure of the Program *************************************** The elements of the program structure that stabs encode include the name of the main function, the names of the source and include files, the line numbers, procedure names and types, and the beginnings and ends of blocks of code. * Menu: * Main Program:: Indicate what the main program is * Source Files:: The path and name of the source file * Include Files:: Names of include files * Line Numbers:: * Procedures:: * Nested Procedures:: * Block Structure:: * Alternate Entry Points:: Entering procedures except at the beginning.  File: stabs.info, Node: Main Program, Next: Source Files, Up: Program Structure 2.1 Main Program ================ Most languages allow the main program to have any name. The `N_MAIN' stab type tells the debugger the name that is used in this program. Only the string field is significant; it is the name of a function which is the main program. Most C compilers do not use this stab (they expect the debugger to assume that the name is `main'), but some C compilers emit an `N_MAIN' stab for the `main' function. I'm not sure how XCOFF handles this.  File: stabs.info, Node: Source Files, Next: Include Files, Prev: Main Program, Up: Program Structure 2.2 Paths and Names of the Source Files ======================================= Before any other stabs occur, there must be a stab specifying the source file. This information is contained in a symbol of stab type `N_SO'; the string field contains the name of the file. The value of the symbol is the start address of the portion of the text section corresponding to that file. Some compilers use the desc field to indicate the language of the source file. Sun's compilers started this usage, and the first constants are derived from their documentation. Languages added by gcc/gdb start at 0x32 to avoid conflict with languages Sun may add in the future. A desc field with a value 0 indicates that no language has been specified via this mechanism. `N_SO_AS' (0x1) Assembly language `N_SO_C' (0x2) K&R traditional C `N_SO_ANSI_C' (0x3) ANSI C `N_SO_CC' (0x4) C++ `N_SO_FORTRAN' (0x5) Fortran `N_SO_PASCAL' (0x6) Pascal `N_SO_FORTRAN90' (0x7) Fortran90 `N_SO_OBJC' (0x32) Objective-C `N_SO_OBJCPLUS' (0x33) Objective-C++ Some compilers (for example, GCC2 and SunOS4 `/bin/cc') also include the directory in which the source was compiled, in a second `N_SO' symbol preceding the one containing the file name. This symbol can be distinguished by the fact that it ends in a slash. Code from the `cfront' C++ compiler can have additional `N_SO' symbols for nonexistent source files after the `N_SO' for the real source file; these are believed to contain no useful information. For example: .stabs "/cygint/s1/users/jcm/play/",100,0,0,Ltext0 # 100 is N_SO .stabs "hello.c",100,0,0,Ltext0 .text Ltext0: Instead of `N_SO' symbols, XCOFF uses a `.file' assembler directive which assembles to a `C_FILE' symbol; explaining this in detail is outside the scope of this document. If it is useful to indicate the end of a source file, this is done with an `N_SO' symbol with an empty string for the name. The value is the address of the end of the text section for the file. For some systems, there is no indication of the end of a source file, and you just need to figure it ended when you see an `N_SO' for a different source file, or a symbol ending in `.o' (which at least some linkers insert to mark the start of a new `.o' file).  File: stabs.info, Node: Include Files, Next: Line Numbers, Prev: Source Files, Up: Program Structure 2.3 Names of Include Files ========================== There are several schemes for dealing with include files: the traditional `N_SOL' approach, Sun's `N_BINCL' approach, and the XCOFF `C_BINCL' approach (which despite the similar name has little in common with `N_BINCL'). An `N_SOL' symbol specifies which include file subsequent symbols refer to. The string field is the name of the file and the value is the text address corresponding to the end of the previous include file and the start of this one. To specify the main source file again, use an `N_SOL' symbol with the name of the main source file. The `N_BINCL' approach works as follows. An `N_BINCL' symbol specifies the start of an include file. In an object file, only the string is significant; the linker puts data into some of the other fields. The end of the include file is marked by an `N_EINCL' symbol (which has no string field). In an object file, there is no significant data in the `N_EINCL' symbol. `N_BINCL' and `N_EINCL' can be nested. If the linker detects that two source files have identical stabs between an `N_BINCL' and `N_EINCL' pair (as will generally be the case for a header file), then it only puts out the stabs once. Each additional occurrence is replaced by an `N_EXCL' symbol. I believe the GNU linker and the Sun (both SunOS4 and Solaris) linker are the only ones which supports this feature. A linker which supports this feature will set the value of a `N_BINCL' symbol to the total of all the characters in the stabs strings included in the header file, omitting any file numbers. The value of an `N_EXCL' symbol is the same as the value of the `N_BINCL' symbol it replaces. This information can be used to match up `N_EXCL' and `N_BINCL' symbols which have the same filename. The `N_EINCL' value, and the values of the other and description fields for all three, appear to always be zero. For the start of an include file in XCOFF, use the `.bi' assembler directive, which generates a `C_BINCL' symbol. A `.ei' directive, which generates a `C_EINCL' symbol, denotes the end of the include file. Both directives are followed by the name of the source file in quotes, which becomes the string for the symbol. The value of each symbol, produced automatically by the assembler and linker, is the offset into the executable of the beginning (inclusive, as you'd expect) or end (inclusive, as you would not expect) of the portion of the COFF line table that corresponds to this include file. `C_BINCL' and `C_EINCL' do not nest.  File: stabs.info, Node: Line Numbers, Next: Procedures, Prev: Include Files, Up: Program Structure 2.4 Line Numbers ================ An `N_SLINE' symbol represents the start of a source line. The desc field contains the line number and the value contains the code address for the start of that source line. On most machines the address is absolute; for stabs in sections (*note Stab Sections::), it is relative to the function in which the `N_SLINE' symbol occurs. GNU documents `N_DSLINE' and `N_BSLINE' symbols for line numbers in the data or bss segments, respectively. They are identical to `N_SLINE' but are relocated differently by the linker. They were intended to be used to describe the source location of a variable declaration, but I believe that GCC2 actually puts the line number in the desc field of the stab for the variable itself. GDB has been ignoring these symbols (unless they contain a string field) since at least GDB 3.5. For single source lines that generate discontiguous code, such as flow of control statements, there may be more than one line number entry for the same source line. In this case there is a line number entry at the start of each code range, each with the same line number. XCOFF does not use stabs for line numbers. Instead, it uses COFF line numbers (which are outside the scope of this document). Standard COFF line numbers cannot deal with include files, but in XCOFF this is fixed with the `C_BINCL' method of marking include files (*note Include Files::).  File: stabs.info, Node: Procedures, Next: Nested Procedures, Prev: Line Numbers, Up: Program Structure 2.5 Procedures ============== All of the following stabs normally use the `N_FUN' symbol type. However, Sun's `acc' compiler on SunOS4 uses `N_GSYM' and `N_STSYM', which means that the value of the stab for the function is useless and the debugger must get the address of the function from the non-stab symbols instead. On systems where non-stab symbols have leading underscores, the stabs will lack underscores and the debugger needs to know about the leading underscore to match up the stab and the non-stab symbol. BSD Fortran is said to use `N_FNAME' with the same restriction; the value of the symbol is not useful (I'm not sure it really does use this, because GDB doesn't handle this and no one has complained). A function is represented by an `F' symbol descriptor for a global (extern) function, and `f' for a static (local) function. For a.out, the value of the symbol is the address of the start of the function; it is already relocated. For stabs in ELF, the SunPRO compiler version 2.0.1 and GCC put out an address which gets relocated by the linker. In a future release SunPRO is planning to put out zero, in which case the address can be found from the ELF (non-stab) symbol. Because looking things up in the ELF symbols would probably be slow, I'm not sure how to find which symbol of that name is the right one, and this doesn't provide any way to deal with nested functions, it would probably be better to make the value of the stab an address relative to the start of the file, or just absolute. See *note ELF Linker Relocation:: for more information on linker relocation of stabs in ELF files. For XCOFF, the stab uses the `C_FUN' storage class and the value of the stab is meaningless; the address of the function can be found from the csect symbol (XTY_LD/XMC_PR). The type information of the stab represents the return type of the function; thus `foo:f5' means that foo is a function returning type 5. There is no need to try to get the line number of the start of the function from the stab for the function; it is in the next `N_SLINE' symbol. Some compilers (such as Sun's Solaris compiler) support an extension for specifying the types of the arguments. I suspect this extension is not used for old (non-prototyped) function definitions in C. If the extension is in use, the type information of the stab for the function is followed by type information for each argument, with each argument preceded by `;'. An argument type of 0 means that additional arguments are being passed, whose types and number may vary (`...' in ANSI C). GDB has tolerated this extension (parsed the syntax, if not necessarily used the information) since at least version 4.8; I don't know whether all versions of dbx tolerate it. The argument types given here are not redundant with the symbols for the formal parameters (*note Parameters::); they are the types of the arguments as they are passed, before any conversions might take place. For example, if a C function which is declared without a prototype takes a `float' argument, the value is passed as a `double' but then converted to a `float'. Debuggers need to use the types given in the arguments when printing values, but when calling the function they need to use the types given in the symbol defining the function. If the return type and types of arguments of a function which is defined in another source file are specified (i.e., a function prototype in ANSI C), traditionally compilers emit no stab; the only way for the debugger to find the information is if the source file where the function is defined was also compiled with debugging symbols. As an extension the Solaris compiler uses symbol descriptor `P' followed by the return type of the function, followed by the arguments, each preceded by `;', as in a stab with symbol descriptor `f' or `F'. This use of symbol descriptor `P' can be distinguished from its use for register parameters (*note Register Parameters::) by the fact that it has symbol type `N_FUN'. The AIX documentation also defines symbol descriptor `J' as an internal function. I assume this means a function nested within another function. It also says symbol descriptor `m' is a module in Modula-2 or extended Pascal. Procedures (functions which do not return values) are represented as functions returning the `void' type in C. I don't see why this couldn't be used for all languages (inventing a `void' type for this purpose if necessary), but the AIX documentation defines `I', `P', and `Q' for internal, global, and static procedures, respectively. These symbol descriptors are unusual in that they are not followed by type information. The following example shows a stab for a function `main' which returns type number `1'. The `_main' specified for the value is a reference to an assembler label which is used to fill in the start address of the function. .stabs "main:F1",36,0,0,_main # 36 is N_FUN The stab representing a procedure is located immediately following the code of the procedure. This stab is in turn directly followed by a group of other stabs describing elements of the procedure. These other stabs describe the procedure's parameters, its block local variables, and its block structure. If functions can appear in different sections, then the debugger may not be able to find the end of a function. Recent versions of GCC will mark the end of a function with an `N_FUN' symbol with an empty string for the name. The value is the address of the end of the current function. Without such a symbol, there is no indication of the address of the end of a function, and you must assume that it ended at the starting address of the next function or at the end of the text section for the program.  File: stabs.info, Node: Nested Procedures, Next: Block Structure, Prev: Procedures, Up: Program Structure 2.6 Nested Procedures ===================== For any of the symbol descriptors representing procedures, after the symbol descriptor and the type information is optionally a scope specifier. This consists of a comma, the name of the procedure, another comma, and the name of the enclosing procedure. The first name is local to the scope specified, and seems to be redundant with the name of the symbol (before the `:'). This feature is used by GCC, and presumably Pascal, Modula-2, etc., compilers, for nested functions. If procedures are nested more than one level deep, only the immediately containing scope is specified. For example, this code: int foo (int x) { int bar (int y) { int baz (int z) { return x + y + z; } return baz (x + 2 * y); } return x + bar (3 * x); } produces the stabs: .stabs "baz:f1,baz,bar",36,0,0,_baz.15 # 36 is N_FUN .stabs "bar:f1,bar,foo",36,0,0,_bar.12 .stabs "foo:F1",36,0,0,_foo  File: stabs.info, Node: Block Structure, Next: Alternate Entry Points, Prev: Nested Procedures, Up: Program Structure 2.7 Block Structure =================== The program's block structure is represented by the `N_LBRAC' (left brace) and the `N_RBRAC' (right brace) stab types. The variables defined inside a block precede the `N_LBRAC' symbol for most compilers, including GCC. Other compilers, such as the Convex, Acorn RISC machine, and Sun `acc' compilers, put the variables after the `N_LBRAC' symbol. The values of the `N_LBRAC' and `N_RBRAC' symbols are the start and end addresses of the code of the block, respectively. For most machines, they are relative to the starting address of this source file. For the Gould NP1, they are absolute. For stabs in sections (*note Stab Sections::), they are relative to the function in which they occur. The `N_LBRAC' and `N_RBRAC' stabs that describe the block scope of a procedure are located after the `N_FUN' stab that represents the procedure itself. Sun documents the desc field of `N_LBRAC' and `N_RBRAC' symbols as containing the nesting level of the block. However, dbx seems to not care, and GCC always sets desc to zero. For XCOFF, block scope is indicated with `C_BLOCK' symbols. If the name of the symbol is `.bb', then it is the beginning of the block; if the name of the symbol is `.be'; it is the end of the block.  File: stabs.info, Node: Alternate Entry Points, Prev: Block Structure, Up: Program Structure 2.8 Alternate Entry Points ========================== Some languages, like Fortran, have the ability to enter procedures at some place other than the beginning. One can declare an alternate entry point. The `N_ENTRY' stab is for this; however, the Sun FORTRAN compiler doesn't use it. According to AIX documentation, only the name of a `C_ENTRY' stab is significant; the address of the alternate entry point comes from the corresponding external symbol. A previous revision of this document said that the value of an `N_ENTRY' stab was the address of the alternate entry point, but I don't know the source for that information.  File: stabs.info, Node: Constants, Next: Variables, Prev: Program Structure, Up: Top 3 Constants *********** The `c' symbol descriptor indicates that this stab represents a constant. This symbol descriptor is an exception to the general rule that symbol descriptors are followed by type information. Instead, it is followed by `=' and one of the following: `b VALUE' Boolean constant. VALUE is a numeric value; I assume it is 0 for false or 1 for true. `c VALUE' Character constant. VALUE is the numeric value of the constant. `e TYPE-INFORMATION , VALUE' Constant whose value can be represented as integral. TYPE-INFORMATION is the type of the constant, as it would appear after a symbol descriptor (*note String Field::). VALUE is the numeric value of the constant. GDB 4.9 does not actually get the right value if VALUE does not fit in a host `int', but it does not do anything violent, and future debuggers could be extended to accept integers of any size (whether unsigned or not). This constant type is usually documented as being only for enumeration constants, but GDB has never imposed that restriction; I don't know about other debuggers. `i VALUE' Integer constant. VALUE is the numeric value. The type is some sort of generic integer type (for GDB, a host `int'); to specify the type explicitly, use `e' instead. `r VALUE' Real constant. VALUE is the real value, which can be `INF' (optionally preceded by a sign) for infinity, `QNAN' for a quiet NaN (not-a-number), or `SNAN' for a signalling NaN. If it is a normal number the format is that accepted by the C library function `atof'. `s STRING' String constant. STRING is a string enclosed in either `'' (in which case `'' characters within the string are represented as `\'' or `"' (in which case `"' characters within the string are represented as `\"'). `S TYPE-INFORMATION , ELEMENTS , BITS , PATTERN' Set constant. TYPE-INFORMATION is the type of the constant, as it would appear after a symbol descriptor (*note String Field::). ELEMENTS is the number of elements in the set (does this means how many bits of PATTERN are actually used, which would be redundant with the type, or perhaps the number of bits set in PATTERN? I don't get it), BITS is the number of bits in the constant (meaning it specifies the length of PATTERN, I think), and PATTERN is a hexadecimal representation of the set. AIX documentation refers to a limit of 32 bytes, but I see no reason why this limit should exist. This form could probably be used for arbitrary constants, not just sets; the only catch is that PATTERN should be understood to be target, not host, byte order and format. The boolean, character, string, and set constants are not supported by GDB 4.9, but it ignores them. GDB 4.8 and earlier gave an error message and refused to read symbols from the file containing the constants. The above information is followed by `;'.  File: stabs.info, Node: Variables, Next: Types, Prev: Constants, Up: Top 4 Variables *********** Different types of stabs describe the various ways that variables can be allocated: on the stack, globally, in registers, in common blocks, statically, or as arguments to a function. * Menu: * Stack Variables:: Variables allocated on the stack. * Global Variables:: Variables used by more than one source file. * Register Variables:: Variables in registers. * Common Blocks:: Variables statically allocated together. * Statics:: Variables local to one source file. * Based Variables:: Fortran pointer based variables. * Parameters:: Variables for arguments to functions.  File: stabs.info, Node: Stack Variables, Next: Global Variables, Up: Variables 4.1 Automatic Variables Allocated on the Stack ============================================== If a variable's scope is local to a function and its lifetime is only as long as that function executes (C calls such variables "automatic"), it can be allocated in a register (*note Register Variables::) or on the stack. Each variable allocated on the stack has a stab with the symbol descriptor omitted. Since type information should begin with a digit, `-', or `(', only those characters precluded from being used for symbol descriptors. However, the Acorn RISC machine (ARM) is said to get this wrong: it puts out a mere type definition here, without the preceding `TYPE-NUMBER='. This is a bad idea; there is no guarantee that type descriptors are distinct from symbol descriptors. Stabs for stack variables use the `N_LSYM' stab type, or `C_LSYM' for XCOFF. The value of the stab is the offset of the variable within the local variables. On most machines this is an offset from the frame pointer and is negative. The location of the stab specifies which block it is defined in; see *note Block Structure::. For example, the following C code: int main () { int x; } produces the following stabs: .stabs "main:F1",36,0,0,_main # 36 is N_FUN .stabs "x:1",128,0,0,-12 # 128 is N_LSYM .stabn 192,0,0,LBB2 # 192 is N_LBRAC .stabn 224,0,0,LBE2 # 224 is N_RBRAC See *note Procedures:: for more information on the `N_FUN' stab, and *note Block Structure:: for more information on the `N_LBRAC' and `N_RBRAC' stabs.  File: stabs.info, Node: Global Variables, Next: Register Variables, Prev: Stack Variables, Up: Variables 4.2 Global Variables ==================== A variable whose scope is not specific to just one source file is represented by the `G' symbol descriptor. These stabs use the `N_GSYM' stab type (C_GSYM for XCOFF). The type information for the stab (*note String Field::) gives the type of the variable. For example, the following source code: char g_foo = 'c'; yields the following assembly code: .stabs "g_foo:G2",32,0,0,0 # 32 is N_GSYM .global _g_foo .data _g_foo: .byte 99 The address of the variable represented by the `N_GSYM' is not contained in the `N_GSYM' stab. The debugger gets this information from the external symbol for the global variable. In the example above, the `.global _g_foo' and `_g_foo:' lines tell the assembler to produce an external symbol. Some compilers, like GCC, output `N_GSYM' stabs only once, where the variable is defined. Other compilers, like SunOS4 /bin/cc, output a `N_GSYM' stab for each compilation unit which references the variable.  File: stabs.info, Node: Register Variables, Next: Common Blocks, Prev: Global Variables, Up: Variables 4.3 Register Variables ====================== Register variables have their own stab type, `N_RSYM' (`C_RSYM' for XCOFF), and their own symbol descriptor, `r'. The stab's value is the number of the register where the variable data will be stored. AIX defines a separate symbol descriptor `d' for floating point registers. This seems unnecessary; why not just just give floating point registers different register numbers? I have not verified whether the compiler actually uses `d'. If the register is explicitly allocated to a global variable, but not initialized, as in: register int g_bar asm ("%g5"); then the stab may be emitted at the end of the object file, with the other bss symbols.  File: stabs.info, Node: Common Blocks, Next: Statics, Prev: Register Variables, Up: Variables 4.4 Common Blocks ================= A common block is a statically allocated section of memory which can be referred to by several source files. It may contain several variables. I believe Fortran is the only language with this feature. A `N_BCOMM' stab begins a common block and an `N_ECOMM' stab ends it. The only field that is significant in these two stabs is the string, which names a normal (non-debugging) symbol that gives the address of the common block. According to IBM documentation, only the `N_BCOMM' has the name of the common block (even though their compiler actually puts it both places). The stabs for the members of the common block are between the `N_BCOMM' and the `N_ECOMM'; the value of each stab is the offset within the common block of that variable. IBM uses the `C_ECOML' stab type, and there is a corresponding `N_ECOML' stab type, but Sun's Fortran compiler uses `N_GSYM' instead. The variables within a common block use the `V' symbol descriptor (I believe this is true of all Fortran variables). Other stabs (at least type declarations using `C_DECL') can also be between the `N_BCOMM' and the `N_ECOMM'.  File: stabs.info, Node: Statics, Next: Based Variables, Prev: Common Blocks, Up: Variables 4.5 Static Variables ==================== Initialized static variables are represented by the `S' and `V' symbol descriptors. `S' means file scope static, and `V' means procedure scope static. One exception: in XCOFF, IBM's xlc compiler always uses `V', and whether it is file scope or not is distinguished by whether the stab is located within a function. In a.out files, `N_STSYM' means the data section, `N_FUN' means the text section, and `N_LCSYM' means the bss section. For those systems with a read-only data section separate from the text section (Solaris), `N_ROSYM' means the read-only data section. For example, the source lines: static const int var_const = 5; static int var_init = 2; static int var_noinit; yield the following stabs: .stabs "var_const:S1",36,0,0,_var_const # 36 is N_FUN ... .stabs "var_init:S1",38,0,0,_var_init # 38 is N_STSYM ... .stabs "var_noinit:S1",40,0,0,_var_noinit # 40 is N_LCSYM In XCOFF files, the stab type need not indicate the section; `C_STSYM' can be used for all statics. Also, each static variable is enclosed in a static block. A `C_BSTAT' (emitted with a `.bs' assembler directive) symbol begins the static block; its value is the symbol number of the csect symbol whose value is the address of the static block, its section is the section of the variables in that static block, and its name is `.bs'. A `C_ESTAT' (emitted with a `.es' assembler directive) symbol ends the static block; its name is `.es' and its value and section are ignored. In ECOFF files, the storage class is used to specify the section, so the stab type need not indicate the section. In ELF files, for the SunPRO compiler version 2.0.1, symbol descriptor `S' means that the address is absolute (the linker relocates it) and symbol descriptor `V' means that the address is relative to the start of the relevant section for that compilation unit. SunPRO has plans to have the linker stop relocating stabs; I suspect that their the debugger gets the address from the corresponding ELF (not stab) symbol. I'm not sure how to find which symbol of that name is the right one. The clean way to do all this would be to have the value of a symbol descriptor `S' symbol be an offset relative to the start of the file, just like everything else, but that introduces obvious compatibility problems. For more information on linker stab relocation, *Note ELF Linker Relocation::.  File: stabs.info, Node: Based Variables, Next: Parameters, Prev: Statics, Up: Variables 4.6 Fortran Based Variables =========================== Fortran (at least, the Sun and SGI dialects of FORTRAN-77) has a feature which allows allocating arrays with `malloc', but which avoids blurring the line between arrays and pointers the way that C does. In stabs such a variable uses the `b' symbol descriptor. For example, the Fortran declarations real foo, foo10(10), foo10_5(10,5) pointer (foop, foo) pointer (foo10p, foo10) pointer (foo105p, foo10_5) produce the stabs foo:b6 foo10:bar3;1;10;6 foo10_5:bar3;1;5;ar3;1;10;6 In this example, `real' is type 6 and type 3 is an integral type which is the type of the subscripts of the array (probably `integer'). The `b' symbol descriptor is like `V' in that it denotes a statically allocated symbol whose scope is local to a function; see *Note Statics::. The value of the symbol, instead of being the address of the variable itself, is the address of a pointer to that variable. So in the above example, the value of the `foo' stab is the address of a pointer to a real, the value of the `foo10' stab is the address of a pointer to a 10-element array of reals, and the value of the `foo10_5' stab is the address of a pointer to a 5-element array of 10-element arrays of reals.  File: stabs.info, Node: Parameters, Prev: Based Variables, Up: Variables 4.7 Parameters ============== Formal parameters to a function are represented by a stab (or sometimes two; see below) for each parameter. The stabs are in the order in which the debugger should print the parameters (i.e., the order in which the parameters are declared in the source file). The exact form of the stab depends on how the parameter is being passed. Parameters passed on the stack use the symbol descriptor `p' and the `N_PSYM' symbol type (or `C_PSYM' for XCOFF). The value of the symbol is an offset used to locate the parameter on the stack; its exact meaning is machine-dependent, but on most machines it is an offset from the frame pointer. As a simple example, the code: main (argc, argv) int argc; char **argv; produces the stabs: .stabs "main:F1",36,0,0,_main # 36 is N_FUN .stabs "argc:p1",160,0,0,68 # 160 is N_PSYM .stabs "argv:p20=*21=*2",160,0,0,72 The type definition of `argv' is interesting because it contains several type definitions. Type 21 is pointer to type 2 (char) and `argv' (type 20) is pointer to type 21. The following symbol descriptors are also said to go with `N_PSYM'. The value of the symbol is said to be an offset from the argument pointer (I'm not sure whether this is true or not). pP (<>) pF Fortran function parameter X (function result variable) * Menu: * Register Parameters:: * Local Variable Parameters:: * Reference Parameters:: * Conformant Arrays::  File: stabs.info, Node: Register Parameters, Next: Local Variable Parameters, Up: Parameters 4.7.1 Passing Parameters in Registers ------------------------------------- If the parameter is passed in a register, then traditionally there are two symbols for each argument: .stabs "arg:p1" . . . ; N_PSYM .stabs "arg:r1" . . . ; N_RSYM Debuggers use the second one to find the value, and the first one to know that it is an argument. Because that approach is kind of ugly, some compilers use symbol descriptor `P' or `R' to indicate an argument which is in a register. Symbol type `C_RPSYM' is used in XCOFF and `N_RSYM' is used otherwise. The symbol's value is the register number. `P' and `R' mean the same thing; the difference is that `P' is a GNU invention and `R' is an IBM (XCOFF) invention. As of version 4.9, GDB should handle either one. There is at least one case where GCC uses a `p' and `r' pair rather than `P'; this is where the argument is passed in the argument list and then loaded into a register. According to the AIX documentation, symbol descriptor `D' is for a parameter passed in a floating point register. This seems unnecessary--why not just use `R' with a register number which indicates that it's a floating point register? I haven't verified whether the system actually does what the documentation indicates. On the sparc and hppa, for a `P' symbol whose type is a structure or union, the register contains the address of the structure. On the sparc, this is also true of a `p' and `r' pair (using Sun `cc') or a `p' symbol. However, if a (small) structure is really in a register, `r' is used. And, to top it all off, on the hppa it might be a structure which was passed on the stack and loaded into a register and for which there is a `p' and `r' pair! I believe that symbol descriptor `i' is supposed to deal with this case (it is said to mean "value parameter by reference, indirect access"; I don't know the source for this information), but I don't know details or what compilers or debuggers use it, if any (not GDB or GCC). It is not clear to me whether this case needs to be dealt with differently than parameters passed by reference (*note Reference Parameters::).  File: stabs.info, Node: Local Variable Parameters, Next: Reference Parameters, Prev: Register Parameters, Up: Parameters 4.7.2 Storing Parameters as Local Variables ------------------------------------------- There is a case similar to an argument in a register, which is an argument that is actually stored as a local variable. Sometimes this happens when the argument was passed in a register and then the compiler stores it as a local variable. If possible, the compiler should claim that it's in a register, but this isn't always done. If a parameter is passed as one type and converted to a smaller type by the prologue (for example, the parameter is declared as a `float', but the calling conventions specify that it is passed as a `double'), then GCC2 (sometimes) uses a pair of symbols. The first symbol uses symbol descriptor `p' and the type which is passed. The second symbol has the type and location which the parameter actually has after the prologue. For example, suppose the following C code appears with no prototypes involved: void subr (f) float f; { if `f' is passed as a double at stack offset 8, and the prologue converts it to a float in register number 0, then the stabs look like: .stabs "f:p13",160,0,3,8 # 160 is `N_PSYM', here 13 is `double' .stabs "f:r12",64,0,3,0 # 64 is `N_RSYM', here 12 is `float' In both stabs 3 is the line number where `f' is declared (*note Line Numbers::). GCC, at least on the 960, has another solution to the same problem. It uses a single `p' symbol descriptor for an argument which is stored as a local variable but uses `N_LSYM' instead of `N_PSYM'. In this case, the value of the symbol is an offset relative to the local variables for that function, not relative to the arguments; on some machines those are the same thing, but not on all. On the VAX or on other machines in which the calling convention includes the number of words of arguments actually passed, the debugger (GDB at least) uses the parameter symbols to keep track of whether it needs to print nameless arguments in addition to the formal parameters which it has printed because each one has a stab. For example, in extern int fprintf (FILE *stream, char *format, ...); ... fprintf (stdout, "%d\n", x); there are stabs for `stream' and `format'. On most machines, the debugger can only print those two arguments (because it has no way of knowing that additional arguments were passed), but on the VAX or other machines with a calling convention which indicates the number of words of arguments, the debugger can print all three arguments. To do so, the parameter symbol (symbol descriptor `p') (not necessarily `r' or symbol descriptor omitted symbols) needs to contain the actual type as passed (for example, `double' not `float' if it is passed as a double and converted to a float).  File: stabs.info, Node: Reference Parameters, Next: Conformant Arrays, Prev: Local Variable Parameters, Up: Parameters 4.7.3 Passing Parameters by Reference ------------------------------------- If the parameter is passed by reference (e.g., Pascal `VAR' parameters), then the symbol descriptor is `v' if it is in the argument list, or `a' if it in a register. Other than the fact that these contain the address of the parameter rather than the parameter itself, they are identical to `p' and `R', respectively. I believe `a' is an AIX invention; `v' is supported by all stabs-using systems as far as I know.  File: stabs.info, Node: Conformant Arrays, Prev: Reference Parameters, Up: Parameters 4.7.4 Passing Conformant Array Parameters ----------------------------------------- Conformant arrays are a feature of Modula-2, and perhaps other languages, in which the size of an array parameter is not known to the called function until run-time. Such parameters have two stabs: a `x' for the array itself, and a `C', which represents the size of the array. The value of the `x' stab is the offset in the argument list where the address of the array is stored (it this right? it is a guess); the value of the `C' stab is the offset in the argument list where the size of the array (in elements? in bytes?) is stored.  File: stabs.info, Node: Types, Next: Macro define and undefine, Prev: Variables, Up: Top 5 Defining Types **************** The examples so far have described types as references to previously defined types, or defined in terms of subranges of or pointers to previously defined types. This chapter describes the other type descriptors that may follow the `=' in a type definition. * Menu: * Builtin Types:: Integers, floating point, void, etc. * Miscellaneous Types:: Pointers, sets, files, etc. * Cross-References:: Referring to a type not yet defined. * Subranges:: A type with a specific range. * Arrays:: An aggregate type of same-typed elements. * Strings:: Like an array but also has a length. * Enumerations:: Like an integer but the values have names. * Structures:: An aggregate type of different-typed elements. * Typedefs:: Giving a type a name. * Unions:: Different types sharing storage. * Function Types::  File: stabs.info, Node: Builtin Types, Next: Miscellaneous Types, Up: Types 5.1 Builtin Types ================= Certain types are built in (`int', `short', `void', `float', etc.); the debugger recognizes these types and knows how to handle them. Thus, don't be surprised if some of the following ways of specifying builtin types do not specify everything that a debugger would need to know about the type--in some cases they merely specify enough information to distinguish the type from other types. The traditional way to define builtin types is convoluted, so new ways have been invented to describe them. Sun's `acc' uses special builtin type descriptors (`b' and `R'), and IBM uses negative type numbers. GDB accepts all three ways, as of version 4.8; dbx just accepts the traditional builtin types and perhaps one of the other two formats. The following sections describe each of these formats. * Menu: * Traditional Builtin Types:: Put on your seat belts and prepare for kludgery * Builtin Type Descriptors:: Builtin types with special type descriptors * Negative Type Numbers:: Builtin types using negative type numbers  File: stabs.info, Node: Traditional Builtin Types, Next: Builtin Type Descriptors, Up: Builtin Types 5.1.1 Traditional Builtin Types ------------------------------- This is the traditional, convoluted method for defining builtin types. There are several classes of such type definitions: integer, floating point, and `void'. * Menu: * Traditional Integer Types:: * Traditional Other Types::  File: stabs.info, Node: Traditional Integer Types, Next: Traditional Other Types, Up: Traditional Builtin Types 5.1.1.1 Traditional Integer Types ................................. Often types are defined as subranges of themselves. If the bounding values fit within an `int', then they are given normally. For example: .stabs "int:t1=r1;-2147483648;2147483647;",128,0,0,0 # 128 is N_LSYM .stabs "char:t2=r2;0;127;",128,0,0,0 Builtin types can also be described as subranges of `int': .stabs "unsigned short:t6=r1;0;65535;",128,0,0,0 If the lower bound of a subrange is 0 and the upper bound is -1, the type is an unsigned integral type whose bounds are too big to describe in an `int'. Traditionally this is only used for `unsigned int' and `unsigned long': .stabs "unsigned int:t4=r1;0;-1;",128,0,0,0 For larger types, GCC 2.4.5 puts out bounds in octal, with one or more leading zeroes. In this case a negative bound consists of a number which is a 1 bit (for the sign bit) followed by a 0 bit for each bit in the number (except the sign bit), and a positive bound is one which is a 1 bit for each bit in the number (except possibly the sign bit). All known versions of dbx and GDB version 4 accept this (at least in the sense of not refusing to process the file), but GDB 3.5 refuses to read the whole file containing such symbols. So GCC 2.3.3 did not output the proper size for these types. As an example of octal bounds, the string fields of the stabs for 64 bit integer types look like: long int:t3=r1;001000000000000000000000;000777777777777777777777; long unsigned int:t5=r1;000000000000000000000000;001777777777777777777777; If the lower bound of a subrange is 0 and the upper bound is negative, the type is an unsigned integral type whose size in bytes is the absolute value of the upper bound. I believe this is a Convex convention for `unsigned long long'. If the lower bound of a subrange is negative and the upper bound is 0, the type is a signed integral type whose size in bytes is the absolute value of the lower bound. I believe this is a Convex convention for `long long'. To distinguish this from a legitimate subrange, the type should be a subrange of itself. I'm not sure whether this is the case for Convex.  File: stabs.info, Node: Traditional Other Types, Prev: Traditional Integer Types, Up: Traditional Builtin Types 5.1.1.2 Traditional Other Types ............................... If the upper bound of a subrange is 0 and the lower bound is positive, the type is a floating point type, and the lower bound of the subrange indicates the number of bytes in the type: .stabs "float:t12=r1;4;0;",128,0,0,0 .stabs "double:t13=r1;8;0;",128,0,0,0 However, GCC writes `long double' the same way it writes `double', so there is no way to distinguish. .stabs "long double:t14=r1;8;0;",128,0,0,0 Complex types are defined the same way as floating-point types; there is no way to distinguish a single-precision complex from a double-precision floating-point type. The C `void' type is defined as itself: .stabs "void:t15=15",128,0,0,0 I'm not sure how a boolean type is represented.  File: stabs.info, Node: Builtin Type Descriptors, Next: Negative Type Numbers, Prev: Traditional Builtin Types, Up: Builtin Types 5.1.2 Defining Builtin Types Using Builtin Type Descriptors ----------------------------------------------------------- This is the method used by Sun's `acc' for defining builtin types. These are the type descriptors to define builtin types: `b SIGNED CHAR-FLAG WIDTH ; OFFSET ; NBITS ;' Define an integral type. SIGNED is `u' for unsigned or `s' for signed. CHAR-FLAG is `c' which indicates this is a character type, or is omitted. I assume this is to distinguish an integral type from a character type of the same size, for example it might make sense to set it for the C type `wchar_t' so the debugger can print such variables differently (Solaris does not do this). Sun sets it on the C types `signed char' and `unsigned char' which arguably is wrong. WIDTH and OFFSET appear to be for small objects stored in larger ones, for example a `short' in an `int' register. WIDTH is normally the number of bytes in the type. OFFSET seems to always be zero. NBITS is the number of bits in the type. Note that type descriptor `b' used for builtin types conflicts with its use for Pascal space types (*note Miscellaneous Types::); they can be distinguished because the character following the type descriptor will be a digit, `(', or `-' for a Pascal space type, or `u' or `s' for a builtin type. `w' Documented by AIX to define a wide character type, but their compiler actually uses negative type numbers (*note Negative Type Numbers::). `R FP-TYPE ; BYTES ;' Define a floating point type. FP-TYPE has one of the following values: `1 (NF_SINGLE)' IEEE 32-bit (single precision) floating point format. `2 (NF_DOUBLE)' IEEE 64-bit (double precision) floating point format. `3 (NF_COMPLEX)' `4 (NF_COMPLEX16)' `5 (NF_COMPLEX32)' These are for complex numbers. A comment in the GDB source describes them as Fortran `complex', `double complex', and `complex*16', respectively, but what does that mean? (i.e., Single precision? Double precision?). `6 (NF_LDOUBLE)' Long double. This should probably only be used for Sun format `long double', and new codes should be used for other floating point formats (`NF_DOUBLE' can be used if a `long double' is really just an IEEE double, of course). BYTES is the number of bytes occupied by the type. This allows a debugger to perform some operations with the type even if it doesn't understand FP-TYPE. `g TYPE-INFORMATION ; NBITS' Documented by AIX to define a floating type, but their compiler actually uses negative type numbers (*note Negative Type Numbers::). `c TYPE-INFORMATION ; NBITS' Documented by AIX to define a complex type, but their compiler actually uses negative type numbers (*note Negative Type Numbers::). The C `void' type is defined as a signed integral type 0 bits long: .stabs "void:t19=bs0;0;0",128,0,0,0 The Solaris compiler seems to omit the trailing semicolon in this case. Getting sloppy in this way is not a swift move because if a type is embedded in a more complex expression it is necessary to be able to tell where it ends. I'm not sure how a boolean type is represented.  File: stabs.info, Node: Negative Type Numbers, Prev: Builtin Type Descriptors, Up: Builtin Types 5.1.3 Negative Type Numbers --------------------------- This is the method used in XCOFF for defining builtin types. Since the debugger knows about the builtin types anyway, the idea of negative type numbers is simply to give a special type number which indicates the builtin type. There is no stab defining these types. There are several subtle issues with negative type numbers. One is the size of the type. A builtin type (for example the C types `int' or `long') might have different sizes depending on compiler options, the target architecture, the ABI, etc. This issue doesn't come up for IBM tools since (so far) they just target the RS/6000; the sizes indicated below for each size are what the IBM RS/6000 tools use. To deal with differing sizes, either define separate negative type numbers for each size (which works but requires changing the debugger, and, unless you get both AIX dbx and GDB to accept the change, introduces an incompatibility), or use a type attribute (*note String Field::) to define a new type with the appropriate size (which merely requires a debugger which understands type attributes, like AIX dbx or GDB). For example, .stabs "boolean:t10=@s8;-16",128,0,0,0 defines an 8-bit boolean type, and .stabs "boolean:t10=@s64;-16",128,0,0,0 defines a 64-bit boolean type. A similar issue is the format of the type. This comes up most often for floating-point types, which could have various formats (particularly extended doubles, which vary quite a bit even among IEEE systems). Again, it is best to define a new negative type number for each different format; changing the format based on the target system has various problems. One such problem is that the Alpha has both VAX and IEEE floating types. One can easily imagine one library using the VAX types and another library in the same executable using the IEEE types. Another example is that the interpretation of whether a boolean is true or false can be based on the least significant bit, most significant bit, whether it is zero, etc., and different compilers (or different options to the same compiler) might provide different kinds of boolean. The last major issue is the names of the types. The name of a given type depends _only_ on the negative type number given; these do not vary depending on the language, the target system, or anything else. One can always define separate type numbers--in the following list you will see for example separate `int' and `integer*4' types which are identical except for the name. But compatibility can be maintained by not inventing new negative type numbers and instead just defining a new type with a new name. For example: .stabs "CARDINAL:t10=-8",128,0,0,0 Here is the list of negative type numbers. The phrase "integral type" is used to mean twos-complement (I strongly suspect that all machines which use stabs use twos-complement; most machines use twos-complement these days). `-1' `int', 32 bit signed integral type. `-2' `char', 8 bit type holding a character. Both GDB and dbx on AIX treat this as signed. GCC uses this type whether `char' is signed or not, which seems like a bad idea. The AIX compiler (`xlc') seems to avoid this type; it uses -5 instead for `char'. `-3' `short', 16 bit signed integral type. `-4' `long', 32 bit signed integral type. `-5' `unsigned char', 8 bit unsigned integral type. `-6' `signed char', 8 bit signed integral type. `-7' `unsigned short', 16 bit unsigned integral type. `-8' `unsigned int', 32 bit unsigned integral type. `-9' `unsigned', 32 bit unsigned integral type. `-10' `unsigned long', 32 bit unsigned integral type. `-11' `void', type indicating the lack of a value. `-12' `float', IEEE single precision. `-13' `double', IEEE double precision. `-14' `long double', IEEE double precision. The compiler claims the size will increase in a future release, and for binary compatibility you have to avoid using `long double'. I hope when they increase it they use a new negative type number. `-15' `integer'. 32 bit signed integral type. `-16' `boolean'. 32 bit type. GDB and GCC assume that zero is false, one is true, and other values have unspecified meaning. I hope this agrees with how the IBM tools use the type. `-17' `short real'. IEEE single precision. `-18' `real'. IEEE double precision. `-19' `stringptr'. *Note Strings::. `-20' `character', 8 bit unsigned character type. `-21' `logical*1', 8 bit type. This Fortran type has a split personality in that it is used for boolean variables, but can also be used for unsigned integers. 0 is false, 1 is true, and other values are non-boolean. `-22' `logical*2', 16 bit type. This Fortran type has a split personality in that it is used for boolean variables, but can also be used for unsigned integers. 0 is false, 1 is true, and other values are non-boolean. `-23' `logical*4', 32 bit type. This Fortran type has a split personality in that it is used for boolean variables, but can also be used for unsigned integers. 0 is false, 1 is true, and other values are non-boolean. `-24' `logical', 32 bit type. This Fortran type has a split personality in that it is used for boolean variables, but can also be used for unsigned integers. 0 is false, 1 is true, and other values are non-boolean. `-25' `complex'. A complex type consisting of two IEEE single-precision floating point values. `-26' `complex'. A complex type consisting of two IEEE double-precision floating point values. `-27' `integer*1', 8 bit signed integral type. `-28' `integer*2', 16 bit signed integral type. `-29' `integer*4', 32 bit signed integral type. `-30' `wchar'. Wide character, 16 bits wide, unsigned (what format? Unicode?). `-31' `long long', 64 bit signed integral type. `-32' `unsigned long long', 64 bit unsigned integral type. `-33' `logical*8', 64 bit unsigned integral type. `-34' `integer*8', 64 bit signed integral type.  File: stabs.info, Node: Miscellaneous Types, Next: Cross-References, Prev: Builtin Types, Up: Types 5.2 Miscellaneous Types ======================= `b TYPE-INFORMATION ; BYTES' Pascal space type. This is documented by IBM; what does it mean? This use of the `b' type descriptor can be distinguished from its use for builtin integral types (*note Builtin Type Descriptors::) because the character following the type descriptor is always a digit, `(', or `-'. `B TYPE-INFORMATION' A volatile-qualified version of TYPE-INFORMATION. This is a Sun extension. References and stores to a variable with a volatile-qualified type must not be optimized or cached; they must occur as the user specifies them. `d TYPE-INFORMATION' File of type TYPE-INFORMATION. As far as I know this is only used by Pascal. `k TYPE-INFORMATION' A const-qualified version of TYPE-INFORMATION. This is a Sun extension. A variable with a const-qualified type cannot be modified. `M TYPE-INFORMATION ; LENGTH' Multiple instance type. The type seems to composed of LENGTH repetitions of TYPE-INFORMATION, for example `character*3' is represented by `M-2;3', where `-2' is a reference to a character type (*note Negative Type Numbers::). I'm not sure how this differs from an array. This appears to be a Fortran feature. LENGTH is a bound, like those in range types; see *note Subranges::. `S TYPE-INFORMATION' Pascal set type. TYPE-INFORMATION must be a small type such as an enumeration or a subrange, and the type is a bitmask whose length is specified by the number of elements in TYPE-INFORMATION. In CHILL, if it is a bitstring instead of a set, also use the `S' type attribute (*note String Field::). `* TYPE-INFORMATION' Pointer to TYPE-INFORMATION.  File: stabs.info, Node: Cross-References, Next: Subranges, Prev: Miscellaneous Types, Up: Types 5.3 Cross-References to Other Types =================================== A type can be used before it is defined; one common way to deal with that situation is just to use a type reference to a type which has not yet been defined. Another way is with the `x' type descriptor, which is followed by `s' for a structure tag, `u' for a union tag, or `e' for a enumerator tag, followed by the name of the tag, followed by `:'. If the name contains `::' between a `<' and `>' pair (for C++ templates), such a `::' does not end the name--only a single `:' ends the name; see *note Nested Symbols::. For example, the following C declarations: struct foo; struct foo *bar; produce: .stabs "bar:G16=*17=xsfoo:",32,0,0,0 Not all debuggers support the `x' type descriptor, so on some machines GCC does not use it. I believe that for the above example it would just emit a reference to type 17 and never define it, but I haven't verified that. Modula-2 imported types, at least on AIX, use the `i' type descriptor, which is followed by the name of the module from which the type is imported, followed by `:', followed by the name of the type. There is then optionally a comma followed by type information for the type. This differs from merely naming the type (*note Typedefs::) in that it identifies the module; I don't understand whether the name of the type given here is always just the same as the name we are giving it, or whether this type descriptor is used with a nameless stab (*note String Field::), or what. The symbol ends with `;'.  File: stabs.info, Node: Subranges, Next: Arrays, Prev: Cross-References, Up: Types 5.4 Subrange Types ================== The `r' type descriptor defines a type as a subrange of another type. It is followed by type information for the type of which it is a subrange, a semicolon, an integral lower bound, a semicolon, an integral upper bound, and a semicolon. The AIX documentation does not specify the trailing semicolon, in an effort to specify array indexes more cleanly, but a subrange which is not an array index has always included a trailing semicolon (*note Arrays::). Instead of an integer, either bound can be one of the following: `A OFFSET' The bound is passed by reference on the stack at offset OFFSET from the argument list. *Note Parameters::, for more information on such offsets. `T OFFSET' The bound is passed by value on the stack at offset OFFSET from the argument list. `a REGISTER-NUMBER' The bound is passed by reference in register number REGISTER-NUMBER. `t REGISTER-NUMBER' The bound is passed by value in register number REGISTER-NUMBER. `J' There is no bound. Subranges are also used for builtin types; see *note Traditional Builtin Types::.  File: stabs.info, Node: Arrays, Next: Strings, Prev: Subranges, Up: Types 5.5 Array Types =============== Arrays use the `a' type descriptor. Following the type descriptor is the type of the index and the type of the array elements. If the index type is a range type, it ends in a semicolon; otherwise (for example, if it is a type reference), there does not appear to be any way to tell where the types are separated. In an effort to clean up this mess, IBM documents the two types as being separated by a semicolon, and a range type as not ending in a semicolon (but this is not right for range types which are not array indexes, *note Subranges::). I think probably the best solution is to specify that a semicolon ends a range type, and that the index type and element type of an array are separated by a semicolon, but that if the index type is a range type, the extra semicolon can be omitted. GDB (at least through version 4.9) doesn't support any kind of index type other than a range anyway; I'm not sure about dbx. It is well established, and widely used, that the type of the index, unlike most types found in the stabs, is merely a type definition, not type information (*note String Field::) (that is, it need not start with `TYPE-NUMBER=' if it is defining a new type). According to a comment in GDB, this is also true of the type of the array elements; it gives `ar1;1;10;ar1;1;10;4' as a legitimate way to express a two dimensional array. According to AIX documentation, the element type must be type information. GDB accepts either. The type of the index is often a range type, expressed as the type descriptor `r' and some parameters. It defines the size of the array. In the example below, the range `r1;0;2;' defines an index type which is a subrange of type 1 (integer), with a lower bound of 0 and an upper bound of 2. This defines the valid range of subscripts of a three-element C array. For example, the definition: char char_vec[3] = {'a','b','c'}; produces the output: .stabs "char_vec:G19=ar1;0;2;2",32,0,0,0 .global _char_vec .align 4 _char_vec: .byte 97 .byte 98 .byte 99 If an array is "packed", the elements are spaced more closely than normal, saving memory at the expense of speed. For example, an array of 3-byte objects might, if unpacked, have each element aligned on a 4-byte boundary, but if packed, have no padding. One way to specify that something is packed is with type attributes (*note String Field::). In the case of arrays, another is to use the `P' type descriptor instead of `a'. Other than specifying a packed array, `P' is identical to `a'. An open array is represented by the `A' type descriptor followed by type information specifying the type of the array elements. An N-dimensional dynamic array is represented by D DIMENSIONS ; TYPE-INFORMATION DIMENSIONS is the number of dimensions; TYPE-INFORMATION specifies the type of the array elements. A subarray of an N-dimensional array is represented by E DIMENSIONS ; TYPE-INFORMATION DIMENSIONS is the number of dimensions; TYPE-INFORMATION specifies the type of the array elements.  File: stabs.info, Node: Strings, Next: Enumerations, Prev: Arrays, Up: Types 5.6 Strings =========== Some languages, like C or the original Pascal, do not have string types, they just have related things like arrays of characters. But most Pascals and various other languages have string types, which are indicated as follows: `n TYPE-INFORMATION ; BYTES' BYTES is the maximum length. I'm not sure what TYPE-INFORMATION is; I suspect that it means that this is a string of TYPE-INFORMATION (thus allowing a string of integers, a string of wide characters, etc., as well as a string of characters). Not sure what the format of this type is. This is an AIX feature. `z TYPE-INFORMATION ; BYTES' Just like `n' except that this is a gstring, not an ordinary string. I don't know the difference. `N' Pascal Stringptr. What is this? This is an AIX feature. Languages, such as CHILL which have a string type which is basically just an array of characters use the `S' type attribute (*note String Field::).  File: stabs.info, Node: Enumerations, Next: Structures, Prev: Strings, Up: Types 5.7 Enumerations ================ Enumerations are defined with the `e' type descriptor. The source line below declares an enumeration type at file scope. The type definition is located after the `N_RBRAC' that marks the end of the previous procedure's block scope, and before the `N_FUN' that marks the beginning of the next procedure's block scope. Therefore it does not describe a block local symbol, but a file local one. The source line: enum e_places {first,second=3,last}; generates the following stab: .stabs "e_places:T22=efirst:0,second:3,last:4,;",128,0,0,0 The symbol descriptor (`T') says that the stab describes a structure, enumeration, or union tag. The type descriptor `e', following the `22=' of the type definition narrows it down to an enumeration type. Following the `e' is a list of the elements of the enumeration. The format is `NAME:VALUE,'. The list of elements ends with `;'. The fact that VALUE is specified as an integer can cause problems if the value is large. GCC 2.5.2 tries to output it in octal in that case with a leading zero, which is probably a good thing, although GDB 4.11 supports octal only in cases where decimal is perfectly good. Negative decimal values are supported by both GDB and dbx. There is no standard way to specify the size of an enumeration type; it is determined by the architecture (normally all enumerations types are 32 bits). Type attributes can be used to specify an enumeration type of another size for debuggers which support them; see *note String Field::. Enumeration types are unusual in that they define symbols for the enumeration values (`first', `second', and `third' in the above example), and even though these symbols are visible in the file as a whole (rather than being in a more local namespace like structure member names), they are defined in the type definition for the enumeration type rather than each having their own symbol. In order to be fast, GDB will only get symbols from such types (in its initial scan of the stabs) if the type is the first thing defined after a `T' or `t' symbol descriptor (the above example fulfills this requirement). If the type does not have a name, the compiler should emit it in a nameless stab (*note String Field::); GCC does this.  File: stabs.info, Node: Structures, Next: Typedefs, Prev: Enumerations, Up: Types 5.8 Structures ============== The encoding of structures in stabs can be shown with an example. The following source code declares a structure tag and defines an instance of the structure in global scope. Then a `typedef' equates the structure tag with a new type. Separate stabs are generated for the structure tag, the structure `typedef', and the structure instance. The stabs for the tag and the `typedef' are emitted when the definitions are encountered. Since the structure elements are not initialized, the stab and code for the structure variable itself is located at the end of the program in the bss section. struct s_tag { int s_int; float s_float; char s_char_vec[8]; struct s_tag* s_next; } g_an_s; typedef struct s_tag s_typedef; The structure tag has an `N_LSYM' stab type because, like the enumeration, the symbol has file scope. Like the enumeration, the symbol descriptor is `T', for enumeration, structure, or tag type. The type descriptor `s' following the `16=' of the type definition narrows the symbol type to structure. Following the `s' type descriptor is the number of bytes the structure occupies, followed by a description of each structure element. The structure element descriptions are of the form `NAME:TYPE, BIT OFFSET FROM THE START OF THE STRUCT, NUMBER OF BITS IN THE ELEMENT'. # 128 is N_LSYM .stabs "s_tag:T16=s20s_int:1,0,32;s_float:12,32,32; s_char_vec:17=ar1;0;7;2,64,64;s_next:18=*16,128,32;;",128,0,0,0 In this example, the first two structure elements are previously defined types. For these, the type following the `NAME:' part of the element description is a simple type reference. The other two structure elements are new types. In this case there is a type definition embedded after the `NAME:'. The type definition for the array element looks just like a type definition for a stand-alone array. The `s_next' field is a pointer to the same kind of structure that the field is an element of. So the definition of structure type 16 contains a type definition for an element which is a pointer to type 16. If a field is a static member (this is a C++ feature in which a single variable appears to be a field of every structure of a given type) it still starts out with the field name, a colon, and the type, but then instead of a comma, bit position, comma, and bit size, there is a colon followed by the name of the variable which each such field refers to. If the structure has methods (a C++ feature), they follow the non-method fields; see *note Cplusplus::.  File: stabs.info, Node: Typedefs, Next: Unions, Prev: Structures, Up: Types 5.9 Giving a Type a Name ======================== To give a type a name, use the `t' symbol descriptor. The type is specified by the type information (*note String Field::) for the stab. For example, .stabs "s_typedef:t16",128,0,0,0 # 128 is N_LSYM specifies that `s_typedef' refers to type number 16. Such stabs have symbol type `N_LSYM' (or `C_DECL' for XCOFF). (The Sun documentation mentions using `N_GSYM' in some cases). If you are specifying the tag name for a structure, union, or enumeration, use the `T' symbol descriptor instead. I believe C is the only language with this feature. If the type is an opaque type (I believe this is a Modula-2 feature), AIX provides a type descriptor to specify it. The type descriptor is `o' and is followed by a name. I don't know what the name means--is it always the same as the name of the type, or is this type descriptor used with a nameless stab (*note String Field::)? There optionally follows a comma followed by type information which defines the type of this type. If omitted, a semicolon is used in place of the comma and the type information, and the type is much like a generic pointer type--it has a known size but little else about it is specified.  File: stabs.info, Node: Unions, Next: Function Types, Prev: Typedefs, Up: Types 5.10 Unions =========== union u_tag { int u_int; float u_float; char* u_char; } an_u; This code generates a stab for a union tag and a stab for a union variable. Both use the `N_LSYM' stab type. If a union variable is scoped locally to the procedure in which it is defined, its stab is located immediately preceding the `N_LBRAC' for the procedure's block start. The stab for the union tag, however, is located preceding the code for the procedure in which it is defined. The stab type is `N_LSYM'. This would seem to imply that the union type is file scope, like the struct type `s_tag'. This is not true. The contents and position of the stab for `u_type' do not convey any information about its procedure local scope. # 128 is N_LSYM .stabs "u_tag:T23=u4u_int:1,0,32;u_float:12,0,32;u_char:21,0,32;;", 128,0,0,0 The symbol descriptor `T', following the `name:' means that the stab describes an enumeration, structure, or union tag. The type descriptor `u', following the `23=' of the type definition, narrows it down to a union type definition. Following the `u' is the number of bytes in the union. After that is a list of union element descriptions. Their format is `NAME:TYPE, BIT OFFSET INTO THE UNION, NUMBER OF BYTES FOR THE ELEMENT;'. The stab for the union variable is: .stabs "an_u:23",128,0,0,-20 # 128 is N_LSYM `-20' specifies where the variable is stored (*note Stack Variables::).  File: stabs.info, Node: Function Types, Prev: Unions, Up: Types 5.11 Function Types =================== Various types can be defined for function variables. These types are not used in defining functions (*note Procedures::); they are used for things like pointers to functions. The simple, traditional, type is type descriptor `f' is followed by type information for the return type of the function, followed by a semicolon. This does not deal with functions for which the number and types of the parameters are part of the type, as in Modula-2 or ANSI C. AIX provides extensions to specify these, using the `f', `F', `p', and `R' type descriptors. First comes the type descriptor. If it is `f' or `F', this type involves a function rather than a procedure, and the type information for the return type of the function follows, followed by a comma. Then comes the number of parameters to the function and a semicolon. Then, for each parameter, there is the name of the parameter followed by a colon (this is only present for type descriptors `R' and `F' which represent Pascal function or procedure parameters), type information for the parameter, a comma, 0 if passed by reference or 1 if passed by value, and a semicolon. The type definition ends with a semicolon. For example, this variable definition: int (*g_pf)(); generates the following code: .stabs "g_pf:G24=*25=f1",32,0,0,0 .common _g_pf,4,"bss" The variable defines a new type, 24, which is a pointer to another new type, 25, which is a function returning `int'.  File: stabs.info, Node: Macro define and undefine, Next: Symbol Tables, Prev: Types, Up: Top 6 Representation of #define and #undef ************************************** This section describes the stabs support for macro define and undefine information, supported on some systems. (e.g., with `-g3' `-gstabs' when using GCC). A `#define MACRO-NAME MACRO-BODY' is represented with an `N_MAC_DEFINE' stab with a string field of `MACRO-NAME MACRO-BODY'. An `#undef MACRO-NAME' is represented with an `N_MAC_UNDEF' stabs with a string field of simply `MACRO-NAME'. For both `N_MAC_DEFINE' and `N_MAC_UNDEF', the desc field is the line number within the file where the corresponding `#define' or `#undef' occurred. For example, the following C code: #define NONE 42 #define TWO(a, b) (a + (a) + 2 * b) #define ONE(c) (c + 19) main(int argc, char *argv[]) { func(NONE, TWO(10, 11)); func(NONE, ONE(23)); #undef ONE #define ONE(c) (c + 23) func(NONE, ONE(-23)); return (0); } int global; func(int arg1, int arg2) { global = arg1 + arg2; } produces the following stabs (as well as many others): .stabs "NONE 42",54,0,1,0 .stabs "TWO(a,b) (a + (a) + 2 * b)",54,0,2,0 .stabs "ONE(c) (c + 19)",54,0,3,0 .stabs "ONE",58,0,10,0 .stabs "ONE(c) (c + 23)",54,0,11,0 NOTE: In the above example, `54' is `N_MAC_DEFINE' and `58' is `N_MAC_UNDEF'.  File: stabs.info, Node: Symbol Tables, Next: Cplusplus, Prev: Macro define and undefine, Up: Top 7 Symbol Information in Symbol Tables ************************************* This chapter describes the format of symbol table entries and how stab assembler directives map to them. It also describes the transformations that the assembler and linker make on data from stabs. * Menu: * Symbol Table Format:: * Transformations On Symbol Tables::  File: stabs.info, Node: Symbol Table Format, Next: Transformations On Symbol Tables, Up: Symbol Tables 7.1 Symbol Table Format ======================= Each time the assembler encounters a stab directive, it puts each field of the stab into a corresponding field in a symbol table entry of its output file. If the stab contains a string field, the symbol table entry for that stab points to a string table entry containing the string data from the stab. Assembler labels become relocatable addresses. Symbol table entries in a.out have the format: struct internal_nlist { unsigned long n_strx; /* index into string table of name */ unsigned char n_type; /* type of symbol */ unsigned char n_other; /* misc info (usually empty) */ unsigned short n_desc; /* description field */ bfd_vma n_value; /* value of symbol */ }; If the stab has a string, the `n_strx' field holds the offset in bytes of the string within the string table. The string is terminated by a NUL character. If the stab lacks a string (for example, it was produced by a `.stabn' or `.stabd' directive), the `n_strx' field is zero. Symbol table entries with `n_type' field values greater than 0x1f originated as stabs generated by the compiler (with one random exception). The other entries were placed in the symbol table of the executable by the assembler or the linker.  File: stabs.info, Node: Transformations On Symbol Tables, Prev: Symbol Table Format, Up: Symbol Tables 7.2 Transformations on Symbol Tables ==================================== The linker concatenates object files and does fixups of externally defined symbols. You can see the transformations made on stab data by the assembler and linker by examining the symbol table after each pass of the build. To do this, use `nm -ap', which dumps the symbol table, including debugging information, unsorted. For stab entries the columns are: VALUE, OTHER, DESC, TYPE, STRING. For assembler and linker symbols, the columns are: VALUE, TYPE, STRING. The low 5 bits of the stab type tell the linker how to relocate the value of the stab. Thus for stab types like `N_RSYM' and `N_LSYM', where the value is an offset or a register number, the low 5 bits are `N_ABS', which tells the linker not to relocate the value. Where the value of a stab contains an assembly language label, it is transformed by each build step. The assembler turns it into a relocatable address and the linker turns it into an absolute address. * Menu: * Transformations On Static Variables:: * Transformations On Global Variables:: * Stab Section Transformations:: For some object file formats, things are a bit different.  File: stabs.info, Node: Transformations On Static Variables, Next: Transformations On Global Variables, Up: Transformations On Symbol Tables 7.2.1 Transformations on Static Variables ----------------------------------------- This source line defines a static variable at file scope: static int s_g_repeat The following stab describes the symbol: .stabs "s_g_repeat:S1",38,0,0,_s_g_repeat The assembler transforms the stab into this symbol table entry in the `.o' file. The location is expressed as a data segment offset. 00000084 - 00 0000 STSYM s_g_repeat:S1 In the symbol table entry from the executable, the linker has made the relocatable address absolute. 0000e00c - 00 0000 STSYM s_g_repeat:S1  File: stabs.info, Node: Transformations On Global Variables, Next: Stab Section Transformations, Prev: Transformations On Static Variables, Up: Transformations On Symbol Tables 7.2.2 Transformations on Global Variables ----------------------------------------- Stabs for global variables do not contain location information. In this case, the debugger finds location information in the assembler or linker symbol table entry describing the variable. The source line: char g_foo = 'c'; generates the stab: .stabs "g_foo:G2",32,0,0,0 The variable is represented by two symbol table entries in the object file (see below). The first one originated as a stab. The second one is an external symbol. The upper case `D' signifies that the `n_type' field of the symbol table contains 7, `N_DATA' with local linkage. The stab's value is zero since the value is not used for `N_GSYM' stabs. The value of the linker symbol is the relocatable address corresponding to the variable. 00000000 - 00 0000 GSYM g_foo:G2 00000080 D _g_foo These entries as transformed by the linker. The linker symbol table entry now holds an absolute address: 00000000 - 00 0000 GSYM g_foo:G2 ... 0000e008 D _g_foo  File: stabs.info, Node: Stab Section Transformations, Prev: Transformations On Global Variables, Up: Transformations On Symbol Tables 7.2.3 Transformations of Stabs in separate sections --------------------------------------------------- For object file formats using stabs in separate sections (*note Stab Sections::), use `objdump --stabs' instead of `nm' to show the stabs in an object or executable file. `objdump' is a GNU utility; Sun does not provide any equivalent. The following example is for a stab whose value is an address is relative to the compilation unit (*note ELF Linker Relocation::). For example, if the source line static int ld = 5; appears within a function, then the assembly language output from the compiler contains: .Ddata.data: ... .stabs "ld:V(0,3)",0x26,0,4,.L18-Ddata.data # 0x26 is N_STSYM ... .L18: .align 4 .word 0x5 Because the value is formed by subtracting one symbol from another, the value is absolute, not relocatable, and so the object file contains Symnum n_type n_othr n_desc n_value n_strx String 31 STSYM 0 4 00000004 680 ld:V(0,3) without any relocations, and the executable file also contains Symnum n_type n_othr n_desc n_value n_strx String 31 STSYM 0 4 00000004 680 ld:V(0,3)  File: stabs.info, Node: Cplusplus, Next: Stab Types, Prev: Symbol Tables, Up: Top 8 GNU C++ Stabs *************** * Menu: * Class Names:: C++ class names are both tags and typedefs. * Nested Symbols:: C++ symbol names can be within other types. * Basic Cplusplus Types:: * Simple Classes:: * Class Instance:: * Methods:: Method definition * Method Type Descriptor:: The `#' type descriptor * Member Type Descriptor:: The `@' type descriptor * Protections:: * Method Modifiers:: * Virtual Methods:: * Inheritance:: * Virtual Base Classes:: * Static Members::  File: stabs.info, Node: Class Names, Next: Nested Symbols, Up: Cplusplus 8.1 C++ Class Names =================== In C++, a class name which is declared with `class', `struct', or `union', is not only a tag, as in C, but also a type name. Thus there should be stabs with both `t' and `T' symbol descriptors (*note Typedefs::). To save space, there is a special abbreviation for this case. If the `T' symbol descriptor is followed by `t', then the stab defines both a type name and a tag. For example, the C++ code struct foo {int x;}; can be represented as either .stabs "foo:T19=s4x:1,0,32;;",128,0,0,0 # 128 is N_LSYM .stabs "foo:t19",128,0,0,0 or .stabs "foo:Tt19=s4x:1,0,32;;",128,0,0,0  File: stabs.info, Node: Nested Symbols, Next: Basic Cplusplus Types, Prev: Class Names, Up: Cplusplus 8.2 Defining a Symbol Within Another Type ========================================= In C++, a symbol (such as a type name) can be defined within another type. In stabs, this is sometimes represented by making the name of a symbol which contains `::'. Such a pair of colons does not end the name of the symbol, the way a single colon would (*note String Field::). I'm not sure how consistently used or well thought out this mechanism is. So that a pair of colons in this position always has this meaning, `:' cannot be used as a symbol descriptor. For example, if the string for a stab is `foo::bar::baz:t5=*6', then `foo::bar::baz' is the name of the symbol, `t' is the symbol descriptor, and `5=*6' is the type information.  File: stabs.info, Node: Basic Cplusplus Types, Next: Simple Classes, Prev: Nested Symbols, Up: Cplusplus 8.3 Basic Types For C++ ======================= << the examples that follow are based on a01.C >> C++ adds two more builtin types to the set defined for C. These are the unknown type and the vtable record type. The unknown type, type 16, is defined in terms of itself like the void type. The vtable record type, type 17, is defined as a structure type and then as a structure tag. The structure has four fields: delta, index, pfn, and delta2. pfn is the function pointer. << In boilerplate $vtbl_ptr_type, what are the fields delta, index, and delta2 used for? >> This basic type is present in all C++ programs even if there are no virtual methods defined. .stabs "struct_name:sym_desc(type)type_def(17)=type_desc(struct)struct_bytes(8) elem_name(delta):type_ref(short int),bit_offset(0),field_bits(16); elem_name(index):type_ref(short int),bit_offset(16),field_bits(16); elem_name(pfn):type_def(18)=type_desc(ptr to)type_ref(void), bit_offset(32),field_bits(32); elem_name(delta2):type_def(short int);bit_offset(32),field_bits(16);;" N_LSYM, NIL, NIL .stabs "$vtbl_ptr_type:t17=s8 delta:6,0,16;index:6,16,16;pfn:18=*15,32,32;delta2:6,32,16;;" ,128,0,0,0 .stabs "name:sym_dec(struct tag)type_ref($vtbl_ptr_type)",N_LSYM,NIL,NIL,NIL .stabs "$vtbl_ptr_type:T17",128,0,0,0  File: stabs.info, Node: Simple Classes, Next: Class Instance, Prev: Basic Cplusplus Types, Up: Cplusplus 8.4 Simple Class Definition =========================== The stabs describing C++ language features are an extension of the stabs describing C. Stabs representing C++ class types elaborate extensively on the stab format used to describe structure types in C. Stabs representing class type variables look just like stabs representing C language variables. Consider the following very simple class definition. class baseA { public: int Adat; int Ameth(int in, char other); }; The class `baseA' is represented by two stabs. The first stab describes the class as a structure type. The second stab describes a structure tag of the class type. Both stabs are of stab type `N_LSYM'. Since the stab is not located between an `N_FUN' and an `N_LBRAC' stab this indicates that the class is defined at file scope. If it were, then the `N_LSYM' would signify a local variable. A stab describing a C++ class type is similar in format to a stab describing a C struct, with each class member shown as a field in the structure. The part of the struct format describing fields is expanded to include extra information relevant to C++ class members. In addition, if the class has multiple base classes or virtual functions the struct format outside of the field parts is also augmented. In this simple example the field part of the C++ class stab representing member data looks just like the field part of a C struct stab. The section on protections describes how its format is sometimes extended for member data. The field part of a C++ class stab representing a member function differs substantially from the field part of a C struct stab. It still begins with `name:' but then goes on to define a new type number for the member function, describe its return type, its argument types, its protection level, any qualifiers applied to the method definition, and whether the method is virtual or not. If the method is virtual then the method description goes on to give the vtable index of the method, and the type number of the first base class defining the method. When the field name is a method name it is followed by two colons rather than one. This is followed by a new type definition for the method. This is a number followed by an equal sign and the type of the method. Normally this will be a type declared using the `#' type descriptor; see *note Method Type Descriptor::; static member functions are declared using the `f' type descriptor instead; see *note Function Types::. The format of an overloaded operator method name differs from that of other methods. It is `op$::OPERATOR-NAME.' where OPERATOR-NAME is the operator name such as `+' or `+='. The name ends with a period, and any characters except the period can occur in the OPERATOR-NAME string. The next part of the method description represents the arguments to the method, preceded by a colon and ending with a semi-colon. The types of the arguments are expressed in the same way argument types are expressed in C++ name mangling. In this example an `int' and a `char' map to `ic'. This is followed by a number, a letter, and an asterisk or period, followed by another semicolon. The number indicates the protections that apply to the member function. Here the 2 means public. The letter encodes any qualifier applied to the method definition. In this case, `A' means that it is a normal function definition. The dot shows that the method is not virtual. The sections that follow elaborate further on these fields and describe the additional information present for virtual methods. .stabs "class_name:sym_desc(type)type_def(20)=type_desc(struct)struct_bytes(4) field_name(Adat):type(int),bit_offset(0),field_bits(32); method_name(Ameth)::type_def(21)=type_desc(method)return_type(int); :arg_types(int char); protection(public)qualifier(normal)virtual(no);;" N_LSYM,NIL,NIL,NIL .stabs "baseA:t20=s4Adat:1,0,32;Ameth::21=##1;:ic;2A.;;",128,0,0,0 .stabs "class_name:sym_desc(struct tag)",N_LSYM,NIL,NIL,NIL .stabs "baseA:T20",128,0,0,0  File: stabs.info, Node: Class Instance, Next: Methods, Prev: Simple Classes, Up: Cplusplus 8.5 Class Instance ================== As shown above, describing even a simple C++ class definition is accomplished by massively extending the stab format used in C to describe structure types. However, once the class is defined, C stabs with no modifications can be used to describe class instances. The following source: main () { baseA AbaseA; } yields the following stab describing the class instance. It looks no different from a standard C stab describing a local variable. .stabs "name:type_ref(baseA)", N_LSYM, NIL, NIL, frame_ptr_offset .stabs "AbaseA:20",128,0,0,-20  File: stabs.info, Node: Methods, Next: Method Type Descriptor, Prev: Class Instance, Up: Cplusplus 8.6 Method Definition ===================== The class definition shown above declares Ameth. The C++ source below defines Ameth: int baseA::Ameth(int in, char other) { return in; }; This method definition yields three stabs following the code of the method. One stab describes the method itself and following two describe its parameters. Although there is only one formal argument all methods have an implicit argument which is the `this' pointer. The `this' pointer is a pointer to the object on which the method was called. Note that the method name is mangled to encode the class name and argument types. Name mangling is described in the ARM (`The Annotated C++ Reference Manual', by Ellis and Stroustrup, ISBN 0-201-51459-1); `gpcompare.texi' in Cygnus GCC distributions describes the differences between GNU mangling and ARM mangling. .stabs "name:symbol_descriptor(global function)return_type(int)", N_FUN, NIL, NIL, code_addr_of_method_start .stabs "Ameth__5baseAic:F1",36,0,0,_Ameth__5baseAic Here is the stab for the `this' pointer implicit argument. The name of the `this' pointer is always `this'. Type 19, the `this' pointer is defined as a pointer to type 20, `baseA', but a stab defining `baseA' has not yet been emitted. Since the compiler knows it will be emitted shortly, here it just outputs a cross reference to the undefined symbol, by prefixing the symbol name with `xs'. .stabs "name:sym_desc(register param)type_def(19)= type_desc(ptr to)type_ref(baseA)= type_desc(cross-reference to)baseA:",N_RSYM,NIL,NIL,register_number .stabs "this:P19=*20=xsbaseA:",64,0,0,8 The stab for the explicit integer argument looks just like a parameter to a C function. The last field of the stab is the offset from the argument pointer, which in most systems is the same as the frame pointer. .stabs "name:sym_desc(value parameter)type_ref(int)", N_PSYM,NIL,NIL,offset_from_arg_ptr .stabs "in:p1",160,0,0,72 << The examples that follow are based on A1.C >>  File: stabs.info, Node: Method Type Descriptor, Next: Member Type Descriptor, Prev: Methods, Up: Cplusplus 8.7 The `#' Type Descriptor =========================== This is used to describe a class method. This is a function which takes an extra argument as its first argument, for the `this' pointer. If the `#' is immediately followed by another `#', the second one will be followed by the return type and a semicolon. The class and argument types are not specified, and must be determined by demangling the name of the method if it is available. Otherwise, the single `#' is followed by the class type, a comma, the return type, a comma, and zero or more parameter types separated by commas. The list of arguments is terminated by a semicolon. In the debugging output generated by gcc, a final argument type of `void' indicates a method which does not take a variable number of arguments. If the final argument type of `void' does not appear, the method was declared with an ellipsis. Note that although such a type will normally be used to describe fields in structures, unions, or classes, for at least some versions of the compiler it can also be used in other contexts.  File: stabs.info, Node: Member Type Descriptor, Next: Protections, Prev: Method Type Descriptor, Up: Cplusplus 8.8 The `@' Type Descriptor =========================== The `@' type descriptor is used for a pointer-to-non-static-member-data type. It is followed by type information for the class (or union), a comma, and type information for the member data. The following C++ source: typedef int A::*int_in_a; generates the following stab: .stabs "int_in_a:t20=21=@19,1",128,0,0,0 Note that there is a conflict between this and type attributes (*note String Field::); both use type descriptor `@'. Fortunately, the `@' type descriptor used in this C++ sense always will be followed by a digit, `(', or `-', and type attributes never start with those things.  File: stabs.info, Node: Protections, Next: Method Modifiers, Prev: Member Type Descriptor, Up: Cplusplus 8.9 Protections =============== In the simple class definition shown above all member data and functions were publicly accessible. The example that follows contrasts public, protected and privately accessible fields and shows how these protections are encoded in C++ stabs. If the character following the `FIELD-NAME:' part of the string is `/', then the next character is the visibility. `0' means private, `1' means protected, and `2' means public. Debuggers should ignore visibility characters they do not recognize, and assume a reasonable default (such as public) (GDB 4.11 does not, but this should be fixed in the next GDB release). If no visibility is specified the field is public. The visibility `9' means that the field has been optimized out and is public (there is no way to specify an optimized out field with a private or protected visibility). Visibility `9' is not supported by GDB 4.11; this should be fixed in the next GDB release. The following C++ source: class vis { private: int priv; protected: char prot; public: float pub; }; generates the following stab: # 128 is N_LSYM .stabs "vis:T19=s12priv:/01,0,32;prot:/12,32,8;pub:12,64,32;;",128,0,0,0 `vis:T19=s12' indicates that type number 19 is a 12 byte structure named `vis' The `priv' field has public visibility (`/0'), type int (`1'), and offset and size `,0,32;'. The `prot' field has protected visibility (`/1'), type char (`2') and offset and size `,32,8;'. The `pub' field has type float (`12'), and offset and size `,64,32;'. Protections for member functions are signified by one digit embedded in the field part of the stab describing the method. The digit is 0 if private, 1 if protected and 2 if public. Consider the C++ class definition below: class all_methods { private: int priv_meth(int in){return in;}; protected: char protMeth(char in){return in;}; public: float pubMeth(float in){return in;}; }; It generates the following stab. The digit in question is to the left of an `A' in each case. Notice also that in this case two symbol descriptors apply to the class name struct tag and struct type. .stabs "class_name:sym_desc(struct tag&type)type_def(21)= sym_desc(struct)struct_bytes(1) meth_name::type_def(22)=sym_desc(method)returning(int); :args(int);protection(private)modifier(normal)virtual(no); meth_name::type_def(23)=sym_desc(method)returning(char); :args(char);protection(protected)modifier(normal)virtual(no); meth_name::type_def(24)=sym_desc(method)returning(float); :args(float);protection(public)modifier(normal)virtual(no);;", N_LSYM,NIL,NIL,NIL .stabs "all_methods:Tt21=s1priv_meth::22=##1;:i;0A.;protMeth::23=##2;:c;1A.; pubMeth::24=##12;:f;2A.;;",128,0,0,0  File: stabs.info, Node: Method Modifiers, Next: Virtual Methods, Prev: Protections, Up: Cplusplus 8.10 Method Modifiers (`const', `volatile', `const volatile') ============================================================= << based on a6.C >> In the class example described above all the methods have the normal modifier. This method modifier information is located just after the protection information for the method. This field has four possible character values. Normal methods use `A', const methods use `B', volatile methods use `C', and const volatile methods use `D'. Consider the class definition below: class A { public: int ConstMeth (int arg) const { return arg; }; char VolatileMeth (char arg) volatile { return arg; }; float ConstVolMeth (float arg) const volatile {return arg; }; }; This class is described by the following stab: .stabs "class(A):sym_desc(struct)type_def(20)=type_desc(struct)struct_bytes(1) meth_name(ConstMeth)::type_def(21)sym_desc(method) returning(int);:arg(int);protection(public)modifier(const)virtual(no); meth_name(VolatileMeth)::type_def(22)=sym_desc(method) returning(char);:arg(char);protection(public)modifier(volatile)virt(no) meth_name(ConstVolMeth)::type_def(23)=sym_desc(method) returning(float);:arg(float);protection(public)modifier(const volatile) virtual(no);;", ... .stabs "A:T20=s1ConstMeth::21=##1;:i;2B.;VolatileMeth::22=##2;:c;2C.; ConstVolMeth::23=##12;:f;2D.;;",128,0,0,0  File: stabs.info, Node: Virtual Methods, Next: Inheritance, Prev: Method Modifiers, Up: Cplusplus 8.11 Virtual Methods ==================== << The following examples are based on a4.C >> The presence of virtual methods in a class definition adds additional data to the class description. The extra data is appended to the description of the virtual method and to the end of the class description. Consider the class definition below: class A { public: int Adat; virtual int A_virt (int arg) { return arg; }; }; This results in the stab below describing class A. It defines a new type (20) which is an 8 byte structure. The first field of the class struct is `Adat', an integer, starting at structure offset 0 and occupying 32 bits. The second field in the class struct is not explicitly defined by the C++ class definition but is implied by the fact that the class contains a virtual method. This field is the vtable pointer. The name of the vtable pointer field starts with `$vf' and continues with a type reference to the class it is part of. In this example the type reference for class A is 20 so the name of its vtable pointer field is `$vf20', followed by the usual colon. Next there is a type definition for the vtable pointer type (21). This is in turn defined as a pointer to another new type (22). Type 22 is the vtable itself, which is defined as an array, indexed by a range of integers between 0 and 1, and whose elements are of type 17. Type 17 was the vtable record type defined by the boilerplate C++ type definitions, as shown earlier. The bit offset of the vtable pointer field is 32. The number of bits in the field are not specified when the field is a vtable pointer. Next is the method definition for the virtual member function `A_virt'. Its description starts out using the same format as the non-virtual member functions described above, except instead of a dot after the `A' there is an asterisk, indicating that the function is virtual. Since is is virtual some addition information is appended to the end of the method description. The first number represents the vtable index of the method. This is a 32 bit unsigned number with the high bit set, followed by a semi-colon. The second number is a type reference to the first base class in the inheritance hierarchy defining the virtual member function. In this case the class stab describes a base class so the virtual function is not overriding any other definition of the method. Therefore the reference is to the type number of the class that the stab is describing (20). This is followed by three semi-colons. One marks the end of the current sub-section, one marks the end of the method field, and the third marks the end of the struct definition. For classes containing virtual functions the very last section of the string part of the stab holds a type reference to the first base class. This is preceded by `~%' and followed by a final semi-colon. .stabs "class_name(A):type_def(20)=sym_desc(struct)struct_bytes(8) field_name(Adat):type_ref(int),bit_offset(0),field_bits(32); field_name(A virt func ptr):type_def(21)=type_desc(ptr to)type_def(22)= sym_desc(array)index_type_ref(range of int from 0 to 1); elem_type_ref(vtbl elem type), bit_offset(32); meth_name(A_virt)::typedef(23)=sym_desc(method)returning(int); :arg_type(int),protection(public)normal(yes)virtual(yes) vtable_index(1);class_first_defining(A);;;~%first_base(A);", N_LSYM,NIL,NIL,NIL .stabs "A:t20=s8Adat:1,0,32;$vf20:21=*22=ar1;0;1;17,32; A_virt::23=##1;:i;2A*-2147483647;20;;;~%20;",128,0,0,0  File: stabs.info, Node: Inheritance, Next: Virtual Base Classes, Prev: Virtual Methods, Up: Cplusplus 8.12 Inheritance ================ Stabs describing C++ derived classes include additional sections that describe the inheritance hierarchy of the class. A derived class stab also encodes the number of base classes. For each base class it tells if the base class is virtual or not, and if the inheritance is private or public. It also gives the offset into the object of the portion of the object corresponding to each base class. This additional information is embedded in the class stab following the number of bytes in the struct. First the number of base classes appears bracketed by an exclamation point and a comma. Then for each base type there repeats a series: a virtual character, a visibility character, a number, a comma, another number, and a semi-colon. The virtual character is `1' if the base class is virtual and `0' if not. The visibility character is `2' if the derivation is public, `1' if it is protected, and `0' if it is private. Debuggers should ignore virtual or visibility characters they do not recognize, and assume a reasonable default (such as public and non-virtual) (GDB 4.11 does not, but this should be fixed in the next GDB release). The number following the virtual and visibility characters is the offset from the start of the object to the part of the object pertaining to the base class. After the comma, the second number is a type_descriptor for the base type. Finally a semi-colon ends the series, which repeats for each base class. The source below defines three base classes `A', `B', and `C' and the derived class `D'. class A { public: int Adat; virtual int A_virt (int arg) { return arg; }; }; class B { public: int B_dat; virtual int B_virt (int arg) {return arg; }; }; class C { public: int Cdat; virtual int C_virt (int arg) {return arg; }; }; class D : A, virtual B, public C { public: int Ddat; virtual int A_virt (int arg ) { return arg+1; }; virtual int B_virt (int arg) { return arg+2; }; virtual int C_virt (int arg) { return arg+3; }; virtual int D_virt (int arg) { return arg; }; }; Class stabs similar to the ones described earlier are generated for each base class. .stabs "A:T20=s8Adat:1,0,32;$vf20:21=*22=ar1;0;1;17,32; A_virt::23=##1;:i;2A*-2147483647;20;;;~%20;",128,0,0,0 .stabs "B:Tt25=s8Bdat:1,0,32;$vf25:21,32;B_virt::26=##1; :i;2A*-2147483647;25;;;~%25;",128,0,0,0 .stabs "C:Tt28=s8Cdat:1,0,32;$vf28:21,32;C_virt::29=##1; :i;2A*-2147483647;28;;;~%28;",128,0,0,0 In the stab describing derived class `D' below, the information about the derivation of this class is encoded as follows. .stabs "derived_class_name:symbol_descriptors(struct tag&type)= type_descriptor(struct)struct_bytes(32)!num_bases(3), base_virtual(no)inheritance_public(no)base_offset(0), base_class_type_ref(A); base_virtual(yes)inheritance_public(no)base_offset(NIL), base_class_type_ref(B); base_virtual(no)inheritance_public(yes)base_offset(64), base_class_type_ref(C); ... .stabs "D:Tt31=s32!3,000,20;100,25;0264,28;$vb25:24,128;Ddat: 1,160,32;A_virt::32=##1;:i;2A*-2147483647;20;;B_virt: :32:i;2A*-2147483647;25;;C_virt::32:i;2A*-2147483647; 28;;D_virt::32:i;2A*-2147483646;31;;;~%20;",128,0,0,0  File: stabs.info, Node: Virtual Base Classes, Next: Static Members, Prev: Inheritance, Up: Cplusplus 8.13 Virtual Base Classes ========================= A derived class object consists of a concatenation in memory of the data areas defined by each base class, starting with the leftmost and ending with the rightmost in the list of base classes. The exception to this rule is for virtual inheritance. In the example above, class `D' inherits virtually from base class `B'. This means that an instance of a `D' object will not contain its own `B' part but merely a pointer to a `B' part, known as a virtual base pointer. In a derived class stab, the base offset part of the derivation information, described above, shows how the base class parts are ordered. The base offset for a virtual base class is always given as 0. Notice that the base offset for `B' is given as 0 even though `B' is not the first base class. The first base class `A' starts at offset 0. The field information part of the stab for class `D' describes the field which is the pointer to the virtual base class `B'. The vbase pointer name is `$vb' followed by a type reference to the virtual base class. Since the type id for `B' in this example is 25, the vbase pointer name is `$vb25'. .stabs "D:Tt31=s32!3,000,20;100,25;0264,28;$vb25:24,128;Ddat:1, 160,32;A_virt::32=##1;:i;2A*-2147483647;20;;B_virt::32:i; 2A*-2147483647;25;;C_virt::32:i;2A*-2147483647;28;;D_virt: :32:i;2A*-2147483646;31;;;~%20;",128,0,0,0 Following the name and a semicolon is a type reference describing the type of the virtual base class pointer, in this case 24. Type 24 was defined earlier as the type of the `B' class `this' pointer. The `this' pointer for a class is a pointer to the class type. .stabs "this:P24=*25=xsB:",64,0,0,8 Finally the field offset part of the vbase pointer field description shows that the vbase pointer is the first field in the `D' object, before any data fields defined by the class. The layout of a `D' class object is a follows, `Adat' at 0, the vtable pointer for `A' at 32, `Cdat' at 64, the vtable pointer for C at 96, the virtual base pointer for `B' at 128, and `Ddat' at 160.  File: stabs.info, Node: Static Members, Prev: Virtual Base Classes, Up: Cplusplus 8.14 Static Members =================== The data area for a class is a concatenation of the space used by the data members of the class. If the class has virtual methods, a vtable pointer follows the class data. The field offset part of each field description in the class stab shows this ordering. << How is this reflected in stabs? See Cygnus bug #677 for some info. >>  File: stabs.info, Node: Stab Types, Next: Symbol Descriptors, Prev: Cplusplus, Up: Top Appendix A Table of Stab Types ****************************** The following are all the possible values for the stab type field, for a.out files, in numeric order. This does not apply to XCOFF, but it does apply to stabs in sections (*note Stab Sections::). Stabs in ECOFF use these values but add 0x8f300 to distinguish them from non-stab symbols. The symbolic names are defined in the file `include/aout/stabs.def'. * Menu: * Non-Stab Symbol Types:: Types from 0 to 0x1f * Stab Symbol Types:: Types from 0x20 to 0xff  File: stabs.info, Node: Non-Stab Symbol Types, Next: Stab Symbol Types, Up: Stab Types A.1 Non-Stab Symbol Types ========================= The following types are used by the linker and assembler, not by stab directives. Since this document does not attempt to describe aspects of object file format other than the debugging format, no details are given. `0x0 N_UNDF' Undefined symbol `0x2 N_ABS' File scope absolute symbol `0x3 N_ABS | N_EXT' External absolute symbol `0x4 N_TEXT' File scope text symbol `0x5 N_TEXT | N_EXT' External text symbol `0x6 N_DATA' File scope data symbol `0x7 N_DATA | N_EXT' External data symbol `0x8 N_BSS' File scope BSS symbol `0x9 N_BSS | N_EXT' External BSS symbol `0x0c N_FN_SEQ' Same as `N_FN', for Sequent compilers `0x0a N_INDR' Symbol is indirected to another symbol `0x12 N_COMM' Common--visible after shared library dynamic link `0x14 N_SETA' `0x15 N_SETA | N_EXT' Absolute set element `0x16 N_SETT' `0x17 N_SETT | N_EXT' Text segment set element `0x18 N_SETD' `0x19 N_SETD | N_EXT' Data segment set element `0x1a N_SETB' `0x1b N_SETB | N_EXT' BSS segment set element `0x1c N_SETV' `0x1d N_SETV | N_EXT' Pointer to set vector `0x1e N_WARNING' Print a warning message during linking `0x1f N_FN' File name of a `.o' file  File: stabs.info, Node: Stab Symbol Types, Prev: Non-Stab Symbol Types, Up: Stab Types A.2 Stab Symbol Types ===================== The following symbol types indicate that this is a stab. This is the full list of stab numbers, including stab types that are used in languages other than C. `0x20 N_GSYM' Global symbol; see *note Global Variables::. `0x22 N_FNAME' Function name (for BSD Fortran); see *note Procedures::. `0x24 N_FUN' Function name (*note Procedures::) or text segment variable (*note Statics::). `0x26 N_STSYM' Data segment file-scope variable; see *note Statics::. `0x28 N_LCSYM' BSS segment file-scope variable; see *note Statics::. `0x2a N_MAIN' Name of main routine; see *note Main Program::. `0x2c N_ROSYM' Variable in `.rodata' section; see *note Statics::. `0x30 N_PC' Global symbol (for Pascal); see *note N_PC::. `0x32 N_NSYMS' Number of symbols (according to Ultrix V4.0); see *note N_NSYMS::. `0x34 N_NOMAP' No DST map; see *note N_NOMAP::. `0x36 N_MAC_DEFINE' Name and body of a `#define'd macro; see *note Macro define and undefine::. `0x38 N_OBJ' Object file (Solaris2). `0x3a N_MAC_UNDEF' Name of an `#undef'ed macro; see *note Macro define and undefine::. `0x3c N_OPT' Debugger options (Solaris2). `0x40 N_RSYM' Register variable; see *note Register Variables::. `0x42 N_M2C' Modula-2 compilation unit; see *note N_M2C::. `0x44 N_SLINE' Line number in text segment; see *note Line Numbers::. `0x46 N_DSLINE' Line number in data segment; see *note Line Numbers::. `0x48 N_BSLINE' Line number in bss segment; see *note Line Numbers::. `0x48 N_BROWS' Sun source code browser, path to `.cb' file; see *note N_BROWS::. `0x4a N_DEFD' GNU Modula2 definition module dependency; see *note N_DEFD::. `0x4c N_FLINE' Function start/body/end line numbers (Solaris2). `0x50 N_EHDECL' GNU C++ exception variable; see *note N_EHDECL::. `0x50 N_MOD2' Modula2 info "for imc" (according to Ultrix V4.0); see *note N_MOD2::. `0x54 N_CATCH' GNU C++ `catch' clause; see *note N_CATCH::. `0x60 N_SSYM' Structure of union element; see *note N_SSYM::. `0x62 N_ENDM' Last stab for module (Solaris2). `0x64 N_SO' Path and name of source file; see *note Source Files::. `0x80 N_LSYM' Stack variable (*note Stack Variables::) or type (*note Typedefs::). `0x82 N_BINCL' Beginning of an include file (Sun only); see *note Include Files::. `0x84 N_SOL' Name of include file; see *note Include Files::. `0xa0 N_PSYM' Parameter variable; see *note Parameters::. `0xa2 N_EINCL' End of an include file; see *note Include Files::. `0xa4 N_ENTRY' Alternate entry point; see *note Alternate Entry Points::. `0xc0 N_LBRAC' Beginning of a lexical block; see *note Block Structure::. `0xc2 N_EXCL' Place holder for a deleted include file; see *note Include Files::. `0xc4 N_SCOPE' Modula2 scope information (Sun linker); see *note N_SCOPE::. `0xe0 N_RBRAC' End of a lexical block; see *note Block Structure::. `0xe2 N_BCOMM' Begin named common block; see *note Common Blocks::. `0xe4 N_ECOMM' End named common block; see *note Common Blocks::. `0xe8 N_ECOML' Member of a common block; see *note Common Blocks::. `0xea N_WITH' Pascal `with' statement: type,,0,0,offset (Solaris2). `0xf0 N_NBTEXT' Gould non-base registers; see *note Gould::. `0xf2 N_NBDATA' Gould non-base registers; see *note Gould::. `0xf4 N_NBBSS' Gould non-base registers; see *note Gould::. `0xf6 N_NBSTS' Gould non-base registers; see *note Gould::. `0xf8 N_NBLCS' Gould non-base registers; see *note Gould::.  File: stabs.info, Node: Symbol Descriptors, Next: Type Descriptors, Prev: Stab Types, Up: Top Appendix B Table of Symbol Descriptors ************************************** The symbol descriptor is the character which follows the colon in many stabs, and which tells what kind of stab it is. *Note String Field::, for more information about their use. `DIGIT' `(' `-' Variable on the stack; see *note Stack Variables::. `:' C++ nested symbol; see *Note Nested Symbols::. `a' Parameter passed by reference in register; see *note Reference Parameters::. `b' Based variable; see *note Based Variables::. `c' Constant; see *note Constants::. `C' Conformant array bound (Pascal, maybe other languages); *note Conformant Arrays::. Name of a caught exception (GNU C++). These can be distinguished because the latter uses `N_CATCH' and the former uses another symbol type. `d' Floating point register variable; see *note Register Variables::. `D' Parameter in floating point register; see *note Register Parameters::. `f' File scope function; see *note Procedures::. `F' Global function; see *note Procedures::. `G' Global variable; see *note Global Variables::. `i' *Note Register Parameters::. `I' Internal (nested) procedure; see *note Nested Procedures::. `J' Internal (nested) function; see *note Nested Procedures::. `L' Label name (documented by AIX, no further information known). `m' Module; see *note Procedures::. `p' Argument list parameter; see *note Parameters::. `pP' *Note Parameters::. `pF' Fortran Function parameter; see *note Parameters::. `P' Unfortunately, three separate meanings have been independently invented for this symbol descriptor. At least the GNU and Sun uses can be distinguished by the symbol type. Global Procedure (AIX) (symbol type used unknown); see *note Procedures::. Register parameter (GNU) (symbol type `N_PSYM'); see *note Parameters::. Prototype of function referenced by this file (Sun `acc') (symbol type `N_FUN'). `Q' Static Procedure; see *note Procedures::. `R' Register parameter; see *note Register Parameters::. `r' Register variable; see *note Register Variables::. `S' File scope variable; see *note Statics::. `s' Local variable (OS9000). `t' Type name; see *note Typedefs::. `T' Enumeration, structure, or union tag; see *note Typedefs::. `v' Parameter passed by reference; see *note Reference Parameters::. `V' Procedure scope static variable; see *note Statics::. `x' Conformant array; see *note Conformant Arrays::. `X' Function return variable; see *note Parameters::.  File: stabs.info, Node: Type Descriptors, Next: Expanded Reference, Prev: Symbol Descriptors, Up: Top Appendix C Table of Type Descriptors ************************************ The type descriptor is the character which follows the type number and an equals sign. It specifies what kind of type is being defined. *Note String Field::, for more information about their use. `DIGIT' `(' Type reference; see *note String Field::. `-' Reference to builtin type; see *note Negative Type Numbers::. `#' Method (C++); see *note Method Type Descriptor::. `*' Pointer; see *note Miscellaneous Types::. `&' Reference (C++). `@' Type Attributes (AIX); see *note String Field::. Member (class and variable) type (GNU C++); see *note Member Type Descriptor::. `a' Array; see *note Arrays::. `A' Open array; see *note Arrays::. `b' Pascal space type (AIX); see *note Miscellaneous Types::. Builtin integer type (Sun); see *note Builtin Type Descriptors::. Const and volatile qualified type (OS9000). `B' Volatile-qualified type; see *note Miscellaneous Types::. `c' Complex builtin type (AIX); see *note Builtin Type Descriptors::. Const-qualified type (OS9000). `C' COBOL Picture type. See AIX documentation for details. `d' File type; see *note Miscellaneous Types::. `D' N-dimensional dynamic array; see *note Arrays::. `e' Enumeration type; see *note Enumerations::. `E' N-dimensional subarray; see *note Arrays::. `f' Function type; see *note Function Types::. `F' Pascal function parameter; see *note Function Types:: `g' Builtin floating point type; see *note Builtin Type Descriptors::. `G' COBOL Group. See AIX documentation for details. `i' Imported type (AIX); see *note Cross-References::. Volatile-qualified type (OS9000). `k' Const-qualified type; see *note Miscellaneous Types::. `K' COBOL File Descriptor. See AIX documentation for details. `M' Multiple instance type; see *note Miscellaneous Types::. `n' String type; see *note Strings::. `N' Stringptr; see *note Strings::. `o' Opaque type; see *note Typedefs::. `p' Procedure; see *note Function Types::. `P' Packed array; see *note Arrays::. `r' Range type; see *note Subranges::. `R' Builtin floating type; see *note Builtin Type Descriptors:: (Sun). Pascal subroutine parameter; see *note Function Types:: (AIX). Detecting this conflict is possible with careful parsing (hint: a Pascal subroutine parameter type will always contain a comma, and a builtin type descriptor never will). `s' Structure type; see *note Structures::. `S' Set type; see *note Miscellaneous Types::. `u' Union; see *note Unions::. `v' Variant record. This is a Pascal and Modula-2 feature which is like a union within a struct in C. See AIX documentation for details. `w' Wide character; see *note Builtin Type Descriptors::. `x' Cross-reference; see *note Cross-References::. `Y' Used by IBM's xlC C++ compiler (for structures, I think). `z' gstring; see *note Strings::.  File: stabs.info, Node: Expanded Reference, Next: Questions, Prev: Type Descriptors, Up: Top Appendix D Expanded Reference by Stab Type ****************************************** For a full list of stab types, and cross-references to where they are described, see *note Stab Types::. This appendix just covers certain stabs which are not yet described in the main body of this document; eventually the information will all be in one place. Format of an entry: The first line is the symbol type (see `include/aout/stab.def'). The second line describes the language constructs the symbol type represents. The third line is the stab format with the significant stab fields named and the rest NIL. Subsequent lines expand upon the meaning and possible values for each significant stab field. Finally, any further information. * Menu: * N_PC:: Pascal global symbol * N_NSYMS:: Number of symbols * N_NOMAP:: No DST map * N_M2C:: Modula-2 compilation unit * N_BROWS:: Path to .cb file for Sun source code browser * N_DEFD:: GNU Modula2 definition module dependency * N_EHDECL:: GNU C++ exception variable * N_MOD2:: Modula2 information "for imc" * N_CATCH:: GNU C++ "catch" clause * N_SSYM:: Structure or union element * N_SCOPE:: Modula2 scope information (Sun only) * Gould:: non-base register symbols used on Gould systems * N_LENG:: Length of preceding entry  File: stabs.info, Node: N_PC, Next: N_NSYMS, Up: Expanded Reference D.1 N_PC ======== -- `.stabs': N_PC Global symbol (for Pascal). "name" -> "symbol_name" <> value -> supposedly the line number (stab.def is skeptical) `stabdump.c' says: global pascal symbol: name,,0,subtype,line << subtype? >>  File: stabs.info, Node: N_NSYMS, Next: N_NOMAP, Prev: N_PC, Up: Expanded Reference D.2 N_NSYMS =========== -- `.stabn': N_NSYMS Number of symbols (according to Ultrix V4.0). 0, files,,funcs,lines (stab.def)  File: stabs.info, Node: N_NOMAP, Next: N_M2C, Prev: N_NSYMS, Up: Expanded Reference D.3 N_NOMAP =========== -- `.stabs': N_NOMAP No DST map for symbol (according to Ultrix V4.0). I think this means a variable has been optimized out. name, ,0,type,ignored (stab.def)  File: stabs.info, Node: N_M2C, Next: N_BROWS, Prev: N_NOMAP, Up: Expanded Reference D.4 N_M2C ========= -- `.stabs': N_M2C Modula-2 compilation unit. "string" -> "unit_name,unit_time_stamp[,code_time_stamp]" desc -> unit_number value -> 0 (main unit) 1 (any other unit) See `Dbx and Dbxtool Interfaces', 2nd edition, by Sun, 1988, for more information.  File: stabs.info, Node: N_BROWS, Next: N_DEFD, Prev: N_M2C, Up: Expanded Reference D.5 N_BROWS =========== -- `.stabs': N_BROWS Sun source code browser, path to `.cb' file <> "path to associated `.cb' file" Note: N_BROWS has the same value as N_BSLINE.  File: stabs.info, Node: N_DEFD, Next: N_EHDECL, Prev: N_BROWS, Up: Expanded Reference D.6 N_DEFD ========== -- `.stabn': N_DEFD GNU Modula2 definition module dependency. GNU Modula-2 definition module dependency. The value is the modification time of the definition file. The other field is non-zero if it is imported with the GNU M2 keyword `%INITIALIZE'. Perhaps `N_M2C' can be used if there are enough empty fields?  File: stabs.info, Node: N_EHDECL, Next: N_MOD2, Prev: N_DEFD, Up: Expanded Reference D.7 N_EHDECL ============ -- `.stabs': N_EHDECL GNU C++ exception variable <>. "STRING is variable name" Note: conflicts with `N_MOD2'.  File: stabs.info, Node: N_MOD2, Next: N_CATCH, Prev: N_EHDECL, Up: Expanded Reference D.8 N_MOD2 ========== -- `.stab?': N_MOD2 Modula2 info "for imc" (according to Ultrix V4.0) Note: conflicts with `N_EHDECL' <>  File: stabs.info, Node: N_CATCH, Next: N_SSYM, Prev: N_MOD2, Up: Expanded Reference D.9 N_CATCH =========== -- `.stabn': N_CATCH GNU C++ `catch' clause GNU C++ `catch' clause. The value is its address. The desc field is nonzero if this entry is immediately followed by a `CAUGHT' stab saying what exception was caught. Multiple `CAUGHT' stabs means that multiple exceptions can be caught here. If desc is 0, it means all exceptions are caught here.  File: stabs.info, Node: N_SSYM, Next: N_SCOPE, Prev: N_CATCH, Up: Expanded Reference D.10 N_SSYM =========== -- `.stabn': N_SSYM Structure or union element. The value is the offset in the structure. <>  File: stabs.info, Node: N_SCOPE, Next: Gould, Prev: N_SSYM, Up: Expanded Reference D.11 N_SCOPE ============ -- `.stab?': N_SCOPE Modula2 scope information (Sun linker) <>  File: stabs.info, Node: Gould, Next: N_LENG, Prev: N_SCOPE, Up: Expanded Reference D.12 Non-base registers on Gould systems ======================================== -- `.stab?': N_NBTEXT -- `.stab?': N_NBDATA -- `.stab?': N_NBBSS -- `.stab?': N_NBSTS -- `.stab?': N_NBLCS These are used on Gould systems for non-base registers syms. However, the following values are not the values used by Gould; they are the values which GNU has been documenting for these values for a long time, without actually checking what Gould uses. I include these values only because perhaps some someone actually did something with the GNU information (I hope not, why GNU knowingly assigned wrong values to these in the header file is a complete mystery to me). 240 0xf0 N_NBTEXT ?? 242 0xf2 N_NBDATA ?? 244 0xf4 N_NBBSS ?? 246 0xf6 N_NBSTS ?? 248 0xf8 N_NBLCS ??  File: stabs.info, Node: N_LENG, Prev: Gould, Up: Expanded Reference D.13 N_LENG =========== -- `.stabn': N_LENG Second symbol entry containing a length-value for the preceding entry. The value is the length.  File: stabs.info, Node: Questions, Next: Stab Sections, Prev: Expanded Reference, Up: Top Appendix E Questions and Anomalies ********************************** * For GNU C stabs defining local and global variables (`N_LSYM' and `N_GSYM'), the desc field is supposed to contain the source line number on which the variable is defined. In reality the desc field is always 0. (This behavior is defined in `dbxout.c' and putting a line number in desc is controlled by `#ifdef WINNING_GDB', which defaults to false). GDB supposedly uses this information if you say `list VAR'. In reality, VAR can be a variable defined in the program and GDB says `function VAR not defined'. * In GNU C stabs, there seems to be no way to differentiate tag types: structures, unions, and enums (symbol descriptor `T') and typedefs (symbol descriptor `t') defined at file scope from types defined locally to a procedure or other more local scope. They all use the `N_LSYM' stab type. Types defined at procedure scope are emitted after the `N_RBRAC' of the preceding function and before the code of the procedure in which they are defined. This is exactly the same as types defined in the source file between the two procedure bodies. GDB over-compensates by placing all types in block #1, the block for symbols of file scope. This is true for default, `-ansi' and `-traditional' compiler options. (Bugs gcc/1063, gdb/1066.) * What ends the procedure scope? Is it the proc block's `N_RBRAC' or the next `N_FUN'? (I believe its the first.)  File: stabs.info, Node: Stab Sections, Next: GNU Free Documentation License, Prev: Questions, Up: Top Appendix F Using Stabs in Their Own Sections ******************************************** Many object file formats allow tools to create object files with custom sections containing any arbitrary data. For any such object file format, stabs can be embedded in special sections. This is how stabs are used with ELF and SOM, and aside from ECOFF and XCOFF, is how stabs are used with COFF. * Menu: * Stab Section Basics:: How to embed stabs in sections * ELF Linker Relocation:: Sun ELF hacks  File: stabs.info, Node: Stab Section Basics, Next: ELF Linker Relocation, Up: Stab Sections F.1 How to Embed Stabs in Sections ================================== The assembler creates two custom sections, a section named `.stab' which contains an array of fixed length structures, one struct per stab, and a section named `.stabstr' containing all the variable length strings that are referenced by stabs in the `.stab' section. The byte order of the stabs binary data depends on the object file format. For ELF, it matches the byte order of the ELF file itself, as determined from the `EI_DATA' field in the `e_ident' member of the ELF header. For SOM, it is always big-endian (is this true??? FIXME). For COFF, it matches the byte order of the COFF headers. The meaning of the fields is the same as for a.out (*note Symbol Table Format::), except that the `n_strx' field is relative to the strings for the current compilation unit (which can be found using the synthetic N_UNDF stab described below), rather than the entire string table. The first stab in the `.stab' section for each compilation unit is synthetic, generated entirely by the assembler, with no corresponding `.stab' directive as input to the assembler. This stab contains the following fields: `n_strx' Offset in the `.stabstr' section to the source filename. `n_type' `N_UNDF'. `n_other' Unused field, always zero. This may eventually be used to hold overflows from the count in the `n_desc' field. `n_desc' Count of upcoming symbols, i.e., the number of remaining stabs for this source file. `n_value' Size of the string table fragment associated with this source file, in bytes. The `.stabstr' section always starts with a null byte (so that string offsets of zero reference a null string), followed by random length strings, each of which is null byte terminated. The ELF section header for the `.stab' section has its `sh_link' member set to the section number of the `.stabstr' section, and the `.stabstr' section has its ELF section header `sh_type' member set to `SHT_STRTAB' to mark it as a string table. SOM and COFF have no way of linking the sections together or marking them as string tables. For COFF, the `.stab' and `.stabstr' sections may be simply concatenated by the linker. GDB then uses the `n_desc' fields to figure out the extent of the original sections. Similarly, the `n_value' fields of the header symbols are added together in order to get the actual position of the strings in a desired `.stabstr' section. Although this design obviates any need for the linker to relocate or otherwise manipulate `.stab' and `.stabstr' sections, it also requires some care to ensure that the offsets are calculated correctly. For instance, if the linker were to pad in between the `.stabstr' sections before concatenating, then the offsets to strings in the middle of the executable's `.stabstr' section would be wrong. The GNU linker is able to optimize stabs information by merging duplicate strings and removing duplicate header file information (*note Include Files::). When some versions of the GNU linker optimize stabs in sections, they remove the leading `N_UNDF' symbol and arranges for all the `n_strx' fields to be relative to the start of the `.stabstr' section.  File: stabs.info, Node: ELF Linker Relocation, Prev: Stab Section Basics, Up: Stab Sections F.2 Having the Linker Relocate Stabs in ELF =========================================== This section describes some Sun hacks for Stabs in ELF; it does not apply to COFF or SOM. To keep linking fast, you don't want the linker to have to relocate very many stabs. Making sure this is done for `N_SLINE', `N_RBRAC', and `N_LBRAC' stabs is the most important thing (see the descriptions of those stabs for more information). But Sun's stabs in ELF has taken this further, to make all addresses in the `n_value' field (functions and static variables) relative to the source file. For the `N_SO' symbol itself, Sun simply omits the address. To find the address of each section corresponding to a given source file, the compiler puts out symbols giving the address of each section for a given source file. Since these are ELF (not stab) symbols, the linker relocates them correctly without having to touch the stabs section. They are named `Bbss.bss' for the bss section, `Ddata.data' for the data section, and `Drodata.rodata' for the rodata section. For the text section, there is no such symbol (but there should be, see below). For an example of how these symbols work, *Note Stab Section Transformations::. GCC does not provide these symbols; it instead relies on the stabs getting relocated. Thus addresses which would normally be relative to `Bbss.bss', etc., are already relocated. The Sun linker provided with Solaris 2.2 and earlier relocates stabs using normal ELF relocation information, as it would do for any section. Sun has been threatening to kludge their linker to not do this (to speed up linking), even though the correct way to avoid having the linker do these relocations is to have the compiler no longer output relocatable values. Last I heard they had been talked out of the linker kludge. See Sun point patch 101052-01 and Sun bug 1142109. With the Sun compiler this affects `S' symbol descriptor stabs (*note Statics::) and functions (*note Procedures::). In the latter case, to adopt the clean solution (making the value of the stab relative to the start of the compilation unit), it would be necessary to invent a `Ttext.text' symbol, analogous to the `Bbss.bss', etc., symbols. I recommend this rather than using a zero value and getting the address from the ELF symbols. Finding the correct `Bbss.bss', etc., symbol is difficult, because the linker simply concatenates the `.stab' sections from each `.o' file without including any information about which part of a `.stab' section comes from which `.o' file. The way GDB does this is to look for an ELF `STT_FILE' symbol which has the same name as the last component of the file name from the `N_SO' symbol in the stabs (for example, if the file name is `../../gdb/main.c', it looks for an ELF `STT_FILE' symbol named `main.c'). This loses if different files have the same name (they could be in different directories, a library could have been copied from one system to another, etc.). It would be much cleaner to have the `Bbss.bss' symbols in the stabs themselves. Having the linker relocate them there is no more work than having the linker relocate ELF symbols, and it solves the problem of having to associate the ELF and stab symbols. However, no one has yet designed or implemented such a scheme.  File: stabs.info, Node: GNU Free Documentation License, Next: Symbol Types Index, Prev: Stab Sections, Up: Top Appendix G GNU Free Documentation License ***************************************** Version 1.3, 3 November 2008 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. `http://fsf.org/' Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. The "publisher" means any person or entity that distributes copies of the Document to the public. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements." 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See `http://www.gnu.org/copyleft/'. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. 11. RELICENSING "Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site. "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. "Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. ADDENDUM: How to use this License for your documents ==================================================== To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.  File: stabs.info, Node: Symbol Types Index, Prev: GNU Free Documentation License, Up: Top Symbol Types Index ****************** [index] * Menu: * .bb: Block Structure. (line 26) * .be: Block Structure. (line 26) * C_BCOMM: Common Blocks. (line 10) * C_BINCL: Include Files. (line 41) * C_BLOCK: Block Structure. (line 26) * C_BSTAT: Statics. (line 31) * C_DECL, for types: Typedefs. (line 6) * C_ECOML: Common Blocks. (line 17) * C_ECOMM: Common Blocks. (line 10) * C_EINCL: Include Files. (line 41) * C_ENTRY: Alternate Entry Points. (line 6) * C_ESTAT: Statics. (line 31) * C_FILE: Source Files. (line 61) * C_FUN: Procedures. (line 18) * C_GSYM: Global Variables. (line 6) * C_LSYM: Stack Variables. (line 11) * C_PSYM: Parameters. (line 12) * C_RPSYM: Register Parameters. (line 15) * C_RSYM: Register Variables. (line 6) * C_STSYM: Statics. (line 31) * N_BCOMM: Common Blocks. (line 10) * N_BINCL: Include Files. (line 17) * N_BROWS: N_BROWS. (line 7) * N_BSLINE: Line Numbers. (line 12) * N_CATCH: N_CATCH. (line 7) * N_DEFD: N_DEFD. (line 7) * N_DSLINE: Line Numbers. (line 12) * N_ECOML: Common Blocks. (line 17) * N_ECOMM: Common Blocks. (line 10) * N_EHDECL: N_EHDECL. (line 7) * N_EINCL: Include Files. (line 17) * N_ENTRY: Alternate Entry Points. (line 6) * N_EXCL: Include Files. (line 17) * N_FNAME: Procedures. (line 6) * N_FUN, for functions: Procedures. (line 6) * N_FUN, for variables: Statics. (line 12) * N_GSYM: Global Variables. (line 6) * N_GSYM, for functions (Sun acc): Procedures. (line 6) * N_LBRAC: Block Structure. (line 6) * N_LCSYM: Statics. (line 12) * N_LENG: N_LENG. (line 7) * N_LSYM, for parameter: Local Variable Parameters. (line 35) * N_LSYM, for stack variables: Stack Variables. (line 11) * N_LSYM, for types: Typedefs. (line 6) * N_M2C: N_M2C. (line 7) * N_MAC_DEFINE: Macro define and undefine. (line 11) * N_MAC_UNDEF: Macro define and undefine. (line 14) * N_MAIN: Main Program. (line 6) * N_MOD2: N_MOD2. (line 7) * N_NBBSS: Gould. (line 9) * N_NBDATA: Gould. (line 8) * N_NBLCS: Gould. (line 11) * N_NBSTS: Gould. (line 10) * N_NBTEXT: Gould. (line 7) * N_NOMAP: N_NOMAP. (line 7) * N_NSYMS: N_NSYMS. (line 7) * N_PC: N_PC. (line 7) * N_PSYM: Parameters. (line 12) * N_RBRAC: Block Structure. (line 6) * N_ROSYM: Statics. (line 12) * N_RSYM: Register Variables. (line 6) * N_RSYM, for parameters: Register Parameters. (line 15) * N_SCOPE: N_SCOPE. (line 7) * N_SLINE: Line Numbers. (line 6) * N_SO: Source Files. (line 6) * N_SOL: Include Files. (line 11) * N_SSYM: N_SSYM. (line 7) * N_STSYM: Statics. (line 12) * N_STSYM, for functions (Sun acc): Procedures. (line 6)  Tag Table: Node: Top1367 Node: Overview2414 Node: Flow3829 Node: Stabs Format5355 Node: String Field6917 Node: C Example12348 Node: Assembly Code12893 Node: Program Structure14864 Node: Main Program15590 Node: Source Files16151 Node: Include Files18603 Node: Line Numbers21268 Node: Procedures22802 Node: Nested Procedures28692 Node: Block Structure29868 Node: Alternate Entry Points31274 Node: Constants32007 Node: Variables35119 Node: Stack Variables35807 Node: Global Variables37508 Node: Register Variables38664 Node: Common Blocks39486 Node: Statics40740 Node: Based Variables43319 Node: Parameters44704 Node: Register Parameters46316 Node: Local Variable Parameters48577 Node: Reference Parameters51492 Node: Conformant Arrays52112 Node: Types52829 Node: Builtin Types53776 Node: Traditional Builtin Types54922 Node: Traditional Integer Types55323 Node: Traditional Other Types57631 Node: Builtin Type Descriptors58545 Node: Negative Type Numbers62045 Node: Miscellaneous Types68400 Node: Cross-References70286 Node: Subranges71961 Node: Arrays73200 Node: Strings76425 Node: Enumerations77487 Node: Structures79872 Node: Typedefs82579 Node: Unions83903 Node: Function Types85484 Node: Macro define and undefine87066 Node: Symbol Tables88643 Node: Symbol Table Format89095 Node: Transformations On Symbol Tables90543 Node: Transformations On Static Variables91897 Node: Transformations On Global Variables92633 Node: Stab Section Transformations93876 Node: Cplusplus95259 Node: Class Names95842 Node: Nested Symbols96587 Node: Basic Cplusplus Types97433 Node: Simple Classes98993 Node: Class Instance103287 Node: Methods104004 Node: Method Type Descriptor106223 Node: Member Type Descriptor107423 Node: Protections108215 Node: Method Modifiers111305 Node: Virtual Methods112933 Node: Inheritance116734 Node: Virtual Base Classes120430 Node: Static Members122674 Node: Stab Types123144 Node: Non-Stab Symbol Types123768 Node: Stab Symbol Types125199 Node: Symbol Descriptors129130 Node: Type Descriptors131909 Node: Expanded Reference135121 Node: N_PC136539 Node: N_NSYMS136907 Node: N_NOMAP137148 Node: N_M2C137454 Node: N_BROWS137888 Node: N_DEFD138171 Node: N_EHDECL138628 Node: N_MOD2138879 Node: N_CATCH139117 Node: N_SSYM139611 Node: N_SCOPE139896 Node: Gould140086 Node: N_LENG141078 Node: Questions141306 Node: Stab Sections142950 Node: Stab Section Basics143560 Node: ELF Linker Relocation146901 Node: GNU Free Documentation License150311 Node: Symbol Types Index175490  End Tag Table gdb-doc-7.6.2/gdb/doc/gdb.info-40000644000175000017500000111004712250773371015151 0ustar zumbizumbiThis is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo. INFO-DIR-SECTION Software development START-INFO-DIR-ENTRY * Gdb: (gdb). The GNU debugger. END-INFO-DIR-ENTRY Copyright (C) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom." This file documents the GNU debugger GDB. This is the Tenth Edition, of `Debugging with GDB: the GNU Source-Level Debugger' for GDB (GDB) Version 7.6.2. Copyright (C) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom."  File: gdb.info, Node: Breakpoints In Python, Next: Finish Breakpoints in Python, Prev: Symbol Tables In Python, Up: Python API 23.2.2.21 Manipulating breakpoints using Python ............................................... Python code can manipulate breakpoints via the `gdb.Breakpoint' class. -- Function: Breakpoint.__init__ (spec [, type [, wp_class [,internal]]]) Create a new breakpoint. SPEC is a string naming the location of the breakpoint, or an expression that defines a watchpoint. The contents can be any location recognized by the `break' command, or in the case of a watchpoint, by the `watch' command. The optional TYPE denotes the breakpoint to create from the types defined later in this chapter. This argument can be either: `gdb.BP_BREAKPOINT' or `gdb.BP_WATCHPOINT'. TYPE defaults to `gdb.BP_BREAKPOINT'. The optional INTERNAL argument allows the breakpoint to become invisible to the user. The breakpoint will neither be reported when created, nor will it be listed in the output from `info breakpoints' (but will be listed with the `maint info breakpoints' command). The optional WP_CLASS argument defines the class of watchpoint to create, if TYPE is `gdb.BP_WATCHPOINT'. If a watchpoint class is not provided, it is assumed to be a `gdb.WP_WRITE' class. -- Function: Breakpoint.stop (self) The `gdb.Breakpoint' class can be sub-classed and, in particular, you may choose to implement the `stop' method. If this method is defined as a sub-class of `gdb.Breakpoint', it will be called when the inferior reaches any location of a breakpoint which instantiates that sub-class. If the method returns `True', the inferior will be stopped at the location of the breakpoint, otherwise the inferior will continue. If there are multiple breakpoints at the same location with a `stop' method, each one will be called regardless of the return status of the previous. This ensures that all `stop' methods have a chance to execute at that location. In this scenario if one of the methods returns `True' but the others return `False', the inferior will still be stopped. You should not alter the execution state of the inferior (i.e., step, next, etc.), alter the current frame context (i.e., change the current active frame), or alter, add or delete any breakpoint. As a general rule, you should not alter any data within GDB or the inferior at this time. Example `stop' implementation: class MyBreakpoint (gdb.Breakpoint): def stop (self): inf_val = gdb.parse_and_eval("foo") if inf_val == 3: return True return False The available watchpoint types represented by constants are defined in the `gdb' module: `gdb.WP_READ' Read only watchpoint. `gdb.WP_WRITE' Write only watchpoint. `gdb.WP_ACCESS' Read/Write watchpoint. -- Function: Breakpoint.is_valid () Return `True' if this `Breakpoint' object is valid, `False' otherwise. A `Breakpoint' object can become invalid if the user deletes the breakpoint. In this case, the object still exists, but the underlying breakpoint does not. In the cases of watchpoint scope, the watchpoint remains valid even if execution of the inferior leaves the scope of that watchpoint. -- Function: Breakpoint.delete Permanently deletes the GDB breakpoint. This also invalidates the Python `Breakpoint' object. Any further access to this object's attributes or methods will raise an error. -- Variable: Breakpoint.enabled This attribute is `True' if the breakpoint is enabled, and `False' otherwise. This attribute is writable. -- Variable: Breakpoint.silent This attribute is `True' if the breakpoint is silent, and `False' otherwise. This attribute is writable. Note that a breakpoint can also be silent if it has commands and the first command is `silent'. This is not reported by the `silent' attribute. -- Variable: Breakpoint.thread If the breakpoint is thread-specific, this attribute holds the thread id. If the breakpoint is not thread-specific, this attribute is `None'. This attribute is writable. -- Variable: Breakpoint.task If the breakpoint is Ada task-specific, this attribute holds the Ada task id. If the breakpoint is not task-specific (or the underlying language is not Ada), this attribute is `None'. This attribute is writable. -- Variable: Breakpoint.ignore_count This attribute holds the ignore count for the breakpoint, an integer. This attribute is writable. -- Variable: Breakpoint.number This attribute holds the breakpoint's number -- the identifier used by the user to manipulate the breakpoint. This attribute is not writable. -- Variable: Breakpoint.type This attribute holds the breakpoint's type -- the identifier used to determine the actual breakpoint type or use-case. This attribute is not writable. -- Variable: Breakpoint.visible This attribute tells whether the breakpoint is visible to the user when set, or when the `info breakpoints' command is run. This attribute is not writable. The available types are represented by constants defined in the `gdb' module: `gdb.BP_BREAKPOINT' Normal code breakpoint. `gdb.BP_WATCHPOINT' Watchpoint breakpoint. `gdb.BP_HARDWARE_WATCHPOINT' Hardware assisted watchpoint. `gdb.BP_READ_WATCHPOINT' Hardware assisted read watchpoint. `gdb.BP_ACCESS_WATCHPOINT' Hardware assisted access watchpoint. -- Variable: Breakpoint.hit_count This attribute holds the hit count for the breakpoint, an integer. This attribute is writable, but currently it can only be set to zero. -- Variable: Breakpoint.location This attribute holds the location of the breakpoint, as specified by the user. It is a string. If the breakpoint does not have a location (that is, it is a watchpoint) the attribute's value is `None'. This attribute is not writable. -- Variable: Breakpoint.expression This attribute holds a breakpoint expression, as specified by the user. It is a string. If the breakpoint does not have an expression (the breakpoint is not a watchpoint) the attribute's value is `None'. This attribute is not writable. -- Variable: Breakpoint.condition This attribute holds the condition of the breakpoint, as specified by the user. It is a string. If there is no condition, this attribute's value is `None'. This attribute is writable. -- Variable: Breakpoint.commands This attribute holds the commands attached to the breakpoint. If there are commands, this attribute's value is a string holding all the commands, separated by newlines. If there are no commands, this attribute is `None'. This attribute is not writable.  File: gdb.info, Node: Finish Breakpoints in Python, Next: Lazy Strings In Python, Prev: Breakpoints In Python, Up: Python API 23.2.2.22 Finish Breakpoints ............................ A finish breakpoint is a temporary breakpoint set at the return address of a frame, based on the `finish' command. `gdb.FinishBreakpoint' extends `gdb.Breakpoint'. The underlying breakpoint will be disabled and deleted when the execution will run out of the breakpoint scope (i.e. `Breakpoint.stop' or `FinishBreakpoint.out_of_scope' triggered). Finish breakpoints are thread specific and must be create with the right thread selected. -- Function: FinishBreakpoint.__init__ ([frame] [, internal]) Create a finish breakpoint at the return address of the `gdb.Frame' object FRAME. If FRAME is not provided, this defaults to the newest frame. The optional INTERNAL argument allows the breakpoint to become invisible to the user. *Note Breakpoints In Python::, for further details about this argument. -- Function: FinishBreakpoint.out_of_scope (self) In some circumstances (e.g. `longjmp', C++ exceptions, GDB `return' command, ...), a function may not properly terminate, and thus never hit the finish breakpoint. When GDB notices such a situation, the `out_of_scope' callback will be triggered. You may want to sub-class `gdb.FinishBreakpoint' and override this method: class MyFinishBreakpoint (gdb.FinishBreakpoint) def stop (self): print "normal finish" return True def out_of_scope (): print "abnormal finish" -- Variable: FinishBreakpoint.return_value When GDB is stopped at a finish breakpoint and the frame used to build the `gdb.FinishBreakpoint' object had debug symbols, this attribute will contain a `gdb.Value' object corresponding to the return value of the function. The value will be `None' if the function return type is `void' or if the return value was not computable. This attribute is not writable.  File: gdb.info, Node: Lazy Strings In Python, Next: Architectures In Python, Prev: Finish Breakpoints in Python, Up: Python API 23.2.2.23 Python representation of lazy strings. ................................................ A "lazy string" is a string whose contents is not retrieved or encoded until it is needed. A `gdb.LazyString' is represented in GDB as an `address' that points to a region of memory, an `encoding' that will be used to encode that region of memory, and a `length' to delimit the region of memory that represents the string. The difference between a `gdb.LazyString' and a string wrapped within a `gdb.Value' is that a `gdb.LazyString' will be treated differently by GDB when printing. A `gdb.LazyString' is retrieved and encoded during printing, while a `gdb.Value' wrapping a string is immediately retrieved and encoded on creation. A `gdb.LazyString' object has the following functions: -- Function: LazyString.value () Convert the `gdb.LazyString' to a `gdb.Value'. This value will point to the string in memory, but will lose all the delayed retrieval, encoding and handling that GDB applies to a `gdb.LazyString'. -- Variable: LazyString.address This attribute holds the address of the string. This attribute is not writable. -- Variable: LazyString.length This attribute holds the length of the string in characters. If the length is -1, then the string will be fetched and encoded up to the first null of appropriate width. This attribute is not writable. -- Variable: LazyString.encoding This attribute holds the encoding that will be applied to the string when the string is printed by GDB. If the encoding is not set, or contains an empty string, then GDB will select the most appropriate encoding when the string is printed. This attribute is not writable. -- Variable: LazyString.type This attribute holds the type that is represented by the lazy string's type. For a lazy string this will always be a pointer type. To resolve this to the lazy string's character type, use the type's `target' method. *Note Types In Python::. This attribute is not writable.  File: gdb.info, Node: Architectures In Python, Prev: Lazy Strings In Python, Up: Python API 23.2.2.24 Python representation of architectures ................................................ GDB uses architecture specific parameters and artifacts in a number of its various computations. An architecture is represented by an instance of the `gdb.Architecture' class. A `gdb.Architecture' class has the following methods: -- Function: Architecture.name () Return the name (string value) of the architecture. -- Function: Architecture.disassemble (START_PC [, END_PC [, COUNT]]) Return a list of disassembled instructions starting from the memory address START_PC. The optional arguments END_PC and COUNT determine the number of instructions in the returned list. If both the optional arguments END_PC and COUNT are specified, then a list of at most COUNT disassembled instructions whose start address falls in the closed memory address interval from START_PC to END_PC are returned. If END_PC is not specified, but COUNT is specified, then COUNT number of instructions starting from the address START_PC are returned. If COUNT is not specified but END_PC is specified, then all instructions whose start address falls in the closed memory address interval from START_PC to END_PC are returned. If neither END_PC nor COUNT are specified, then a single instruction at START_PC is returned. For all of these cases, each element of the returned list is a Python `dict' with the following string keys: `addr' The value corresponding to this key is a Python long integer capturing the memory address of the instruction. `asm' The value corresponding to this key is a string value which represents the instruction with assembly language mnemonics. The assembly language flavor used is the same as that specified by the current CLI variable `disassembly-flavor'. *Note Machine Code::. `length' The value corresponding to this key is the length (integer value) of the instruction in bytes.  File: gdb.info, Node: Python Auto-loading, Next: Python modules, Prev: Python API, Up: Python 23.2.3 Python Auto-loading -------------------------- When a new object file is read (for example, due to the `file' command, or because the inferior has loaded a shared library), GDB will look for Python support scripts in several ways: `OBJFILE-gdb.py' (*note objfile-gdb.py file::) and `.debug_gdb_scripts' section (*note dotdebug_gdb_scripts section::). The auto-loading feature is useful for supplying application-specific debugging commands and scripts. Auto-loading can be enabled or disabled, and the list of auto-loaded scripts can be printed. `set auto-load python-scripts [on|off]' Enable or disable the auto-loading of Python scripts. `show auto-load python-scripts' Show whether auto-loading of Python scripts is enabled or disabled. `info auto-load python-scripts [REGEXP]' Print the list of all Python scripts that GDB auto-loaded. Also printed is the list of Python scripts that were mentioned in the `.debug_gdb_scripts' section and were not found (*note dotdebug_gdb_scripts section::). This is useful because their names are not printed when GDB tries to load them and fails. There may be many of them, and printing an error message for each one is problematic. If REGEXP is supplied only Python scripts with matching names are printed. Example: (gdb) info auto-load python-scripts Loaded Script Yes py-section-script.py full name: /tmp/py-section-script.py No my-foo-pretty-printers.py When reading an auto-loaded file, GDB sets the "current objfile". This is available via the `gdb.current_objfile' function (*note Objfiles In Python::). This can be useful for registering objfile-specific pretty-printers. * Menu: * objfile-gdb.py file:: The `OBJFILE-gdb.py' file * dotdebug_gdb_scripts section:: The `.debug_gdb_scripts' section * Which flavor to choose?::  File: gdb.info, Node: objfile-gdb.py file, Next: dotdebug_gdb_scripts section, Up: Python Auto-loading 23.2.3.1 The `OBJFILE-gdb.py' file .................................. When a new object file is read, GDB looks for a file named `OBJFILE-gdb.py' (we call it SCRIPT-NAME below), where OBJFILE is the object file's real name, formed by ensuring that the file name is absolute, following all symlinks, and resolving `.' and `..' components. If this file exists and is readable, GDB will evaluate it as a Python script. If this file does not exist, then GDB will look for SCRIPT-NAME file in all of the directories as specified below. Note that loading of this script file also requires accordingly configured `auto-load safe-path' (*note Auto-loading safe path::). For object files using `.exe' suffix GDB tries to load first the scripts normally according to its `.exe' filename. But if no scripts are found GDB also tries script filenames matching the object file without its `.exe' suffix. This `.exe' stripping is case insensitive and it is attempted on any platform. This makes the script filenames compatible between Unix and MS-Windows hosts. `set auto-load scripts-directory [DIRECTORIES]' Control GDB auto-loaded scripts location. Multiple directory entries may be delimited by the host platform path separator in use (`:' on Unix, `;' on MS-Windows and MS-DOS). Each entry here needs to be covered also by the security setting `set auto-load safe-path' (*note set auto-load safe-path::). This variable defaults to `$debugdir:$datadir/auto-load'. The default `set auto-load safe-path' value can be also overriden by GDB configuration option `--with-auto-load-dir'. Any reference to `$debugdir' will get replaced by DEBUG-FILE-DIRECTORY value (*note Separate Debug Files::) and any reference to `$datadir' will get replaced by DATA-DIRECTORY which is determined at GDB startup (*note Data Files::). `$debugdir' and `$datadir' must be placed as a directory component -- either alone or delimited by `/' or `\' directory separators, depending on the host platform. The list of directories uses path separator (`:' on GNU and Unix systems, `;' on MS-Windows and MS-DOS) to separate directories, similarly to the `PATH' environment variable. `show auto-load scripts-directory' Show GDB auto-loaded scripts location. GDB does not track which files it has already auto-loaded this way. GDB will load the associated script every time the corresponding OBJFILE is opened. So your `-gdb.py' file should be careful to avoid errors if it is evaluated more than once.  File: gdb.info, Node: dotdebug_gdb_scripts section, Next: Which flavor to choose?, Prev: objfile-gdb.py file, Up: Python Auto-loading 23.2.3.2 The `.debug_gdb_scripts' section ......................................... For systems using file formats like ELF and COFF, when GDB loads a new object file it will look for a special section named `.debug_gdb_scripts'. If this section exists, its contents is a list of names of scripts to load. GDB will look for each specified script file first in the current directory and then along the source search path (*note Specifying Source Directories: Source Path.), except that `$cdir' is not searched, since the compilation directory is not relevant to scripts. Entries can be placed in section `.debug_gdb_scripts' with, for example, this GCC macro: /* Note: The "MS" section flags are to remove duplicates. */ #define DEFINE_GDB_SCRIPT(script_name) \ asm("\ .pushsection \".debug_gdb_scripts\", \"MS\",@progbits,1\n\ .byte 1\n\ .asciz \"" script_name "\"\n\ .popsection \n\ "); Then one can reference the macro in a header or source file like this: DEFINE_GDB_SCRIPT ("my-app-scripts.py") The script name may include directories if desired. Note that loading of this script file also requires accordingly configured `auto-load safe-path' (*note Auto-loading safe path::). If the macro is put in a header, any application or library using this header will get a reference to the specified script.  File: gdb.info, Node: Which flavor to choose?, Prev: dotdebug_gdb_scripts section, Up: Python Auto-loading 23.2.3.3 Which flavor to choose? ................................ Given the multiple ways of auto-loading Python scripts, it might not always be clear which one to choose. This section provides some guidance. Benefits of the `-gdb.py' way: * Can be used with file formats that don't support multiple sections. * Ease of finding scripts for public libraries. Scripts specified in the `.debug_gdb_scripts' section are searched for in the source search path. For publicly installed libraries, e.g., `libstdc++', there typically isn't a source directory in which to find the script. * Doesn't require source code additions. Benefits of the `.debug_gdb_scripts' way: * Works with static linking. Scripts for libraries done the `-gdb.py' way require an objfile to trigger their loading. When an application is statically linked the only objfile available is the executable, and it is cumbersome to attach all the scripts from all the input libraries to the executable's `-gdb.py' script. * Works with classes that are entirely inlined. Some classes can be entirely inlined, and thus there may not be an associated shared library to attach a `-gdb.py' script to. * Scripts needn't be copied out of the source tree. In some circumstances, apps can be built out of large collections of internal libraries, and the build infrastructure necessary to install the `-gdb.py' scripts in a place where GDB can find them is cumbersome. It may be easier to specify the scripts in the `.debug_gdb_scripts' section as relative paths, and add a path to the top of the source tree to the source search path.  File: gdb.info, Node: Python modules, Prev: Python Auto-loading, Up: Python 23.2.4 Python modules --------------------- GDB comes with several modules to assist writing Python code. * Menu: * gdb.printing:: Building and registering pretty-printers. * gdb.types:: Utilities for working with types. * gdb.prompt:: Utilities for prompt value substitution.  File: gdb.info, Node: gdb.printing, Next: gdb.types, Up: Python modules 23.2.4.1 gdb.printing ..................... This module provides a collection of utilities for working with pretty-printers. `PrettyPrinter (NAME, SUBPRINTERS=None)' This class specifies the API that makes `info pretty-printer', `enable pretty-printer' and `disable pretty-printer' work. Pretty-printers should generally inherit from this class. `SubPrettyPrinter (NAME)' For printers that handle multiple types, this class specifies the corresponding API for the subprinters. `RegexpCollectionPrettyPrinter (NAME)' Utility class for handling multiple printers, all recognized via regular expressions. *Note Writing a Pretty-Printer::, for an example. `FlagEnumerationPrinter (NAME)' A pretty-printer which handles printing of `enum' values. Unlike GDB's built-in `enum' printing, this printer attempts to work properly when there is some overlap between the enumeration constants. NAME is the name of the printer and also the name of the `enum' type to look up. `register_pretty_printer (OBJ, PRINTER, REPLACE=False)' Register PRINTER with the pretty-printer list of OBJ. If REPLACE is `True' then any existing copy of the printer is replaced. Otherwise a `RuntimeError' exception is raised if a printer with the same name already exists.  File: gdb.info, Node: gdb.types, Next: gdb.prompt, Prev: gdb.printing, Up: Python modules 23.2.4.2 gdb.types .................. This module provides a collection of utilities for working with `gdb.Type' objects. `get_basic_type (TYPE)' Return TYPE with const and volatile qualifiers stripped, and with typedefs and C++ references converted to the underlying type. C++ example: typedef const int const_int; const_int foo (3); const_int& foo_ref (foo); int main () { return 0; } Then in gdb: (gdb) start (gdb) python import gdb.types (gdb) python foo_ref = gdb.parse_and_eval("foo_ref") (gdb) python print gdb.types.get_basic_type(foo_ref.type) int `has_field (TYPE, FIELD)' Return `True' if TYPE, assumed to be a type with fields (e.g., a structure or union), has field FIELD. `make_enum_dict (ENUM_TYPE)' Return a Python `dictionary' type produced from ENUM_TYPE. `deep_items (TYPE)' Returns a Python iterator similar to the standard `gdb.Type.iteritems' method, except that the iterator returned by `deep_items' will recursively traverse anonymous struct or union fields. For example: struct A { int a; union { int b0; int b1; }; }; Then in GDB: (gdb) python import gdb.types (gdb) python struct_a = gdb.lookup_type("struct A") (gdb) python print struct_a.keys () {['a', '']} (gdb) python print [k for k,v in gdb.types.deep_items(struct_a)] {['a', 'b0', 'b1']} `get_type_recognizers ()' Return a list of the enabled type recognizers for the current context. This is called by GDB during the type-printing process (*note Type Printing API::). `apply_type_recognizers (recognizers, type_obj)' Apply the type recognizers, RECOGNIZERS, to the type object TYPE_OBJ. If any recognizer returns a string, return that string. Otherwise, return `None'. This is called by GDB during the type-printing process (*note Type Printing API::). `register_type_printer (locus, printer)' This is a convenience function to register a type printer. PRINTER is the type printer to register. It must implement the type printer protocol. LOCUS is either a `gdb.Objfile', in which case the printer is registered with that objfile; a `gdb.Progspace', in which case the printer is registered with that progspace; or `None', in which case the printer is registered globally. `TypePrinter' This is a base class that implements the type printer protocol. Type printers are encouraged, but not required, to derive from this class. It defines a constructor: -- Method on TypePrinter: __init__ (self, name) Initialize the type printer with the given name. The new printer starts in the enabled state.  File: gdb.info, Node: gdb.prompt, Prev: gdb.types, Up: Python modules 23.2.4.3 gdb.prompt ................... This module provides a method for prompt value-substitution. `substitute_prompt (STRING)' Return STRING with escape sequences substituted by values. Some escape sequences take arguments. You can specify arguments inside "{}" immediately following the escape sequence. The escape sequences you can pass to this function are: `\\' Substitute a backslash. `\e' Substitute an ESC character. `\f' Substitute the selected frame; an argument names a frame parameter. `\n' Substitute a newline. `\p' Substitute a parameter's value; the argument names the parameter. `\r' Substitute a carriage return. `\t' Substitute the selected thread; an argument names a thread parameter. `\v' Substitute the version of GDB. `\w' Substitute the current working directory. `\[' Begin a sequence of non-printing characters. These sequences are typically used with the ESC character, and are not counted in the string length. Example: "\[\e[0;34m\](gdb)\[\e[0m\]" will return a blue-colored "(gdb)" prompt where the length is five. `\]' End a sequence of non-printing characters. For example: substitute_prompt (``frame: \f, print arguments: \p{print frame-arguments}'') will return the string: "frame: main, print arguments: scalars"  File: gdb.info, Node: Aliases, Prev: Python, Up: Extending GDB 23.3 Creating new spellings of existing commands ================================================ It is often useful to define alternate spellings of existing commands. For example, if a new GDB command defined in Python has a long name to type, it is handy to have an abbreviated version of it that involves less typing. GDB itself uses aliases. For example `s' is an alias of the `step' command even though it is otherwise an ambiguous abbreviation of other commands like `set' and `show'. Aliases are also used to provide shortened or more common versions of multi-word commands. For example, GDB provides the `tty' alias of the `set inferior-tty' command. You can define a new alias with the `alias' command. `alias [-a] [--] ALIAS = COMMAND' ALIAS specifies the name of the new alias. Each word of ALIAS must consist of letters, numbers, dashes and underscores. COMMAND specifies the name of an existing command that is being aliased. The `-a' option specifies that the new alias is an abbreviation of the command. Abbreviations are not shown in command lists displayed by the `help' command. The `--' option specifies the end of options, and is useful when ALIAS begins with a dash. Here is a simple example showing how to make an abbreviation of a command so that there is less to type. Suppose you were tired of typing `disas', the current shortest unambiguous abbreviation of the `disassemble' command and you wanted an even shorter version named `di'. The following will accomplish this. (gdb) alias -a di = disas Note that aliases are different from user-defined commands. With a user-defined command, you also need to write documentation for it with the `document' command. An alias automatically picks up the documentation of the existing command. Here is an example where we make `elms' an abbreviation of `elements' in the `set print elements' command. This is to show that you can make an abbreviation of any part of a command. (gdb) alias -a set print elms = set print elements (gdb) alias -a show print elms = show print elements (gdb) set p elms 20 (gdb) show p elms Limit on string chars or array elements to print is 200. Note that if you are defining an alias of a `set' command, and you want to have an alias for the corresponding `show' command, then you need to define the latter separately. Unambiguously abbreviated commands are allowed in COMMAND and ALIAS, just as they are normally. (gdb) alias -a set pr elms = set p ele Finally, here is an example showing the creation of a one word alias for a more complex command. This creates alias `spe' of the command `set print elements'. (gdb) alias spe = set print elements (gdb) spe 20  File: gdb.info, Node: Interpreters, Next: TUI, Prev: Extending GDB, Up: Top 24 Command Interpreters *********************** GDB supports multiple command interpreters, and some command infrastructure to allow users or user interface writers to switch between interpreters or run commands in other interpreters. GDB currently supports two command interpreters, the console interpreter (sometimes called the command-line interpreter or CLI) and the machine interface interpreter (or GDB/MI). This manual describes both of these interfaces in great detail. By default, GDB will start with the console interpreter. However, the user may choose to start GDB with another interpreter by specifying the `-i' or `--interpreter' startup options. Defined interpreters include: `console' The traditional console or command-line interpreter. This is the most often used interpreter with GDB. With no interpreter specified at runtime, GDB will use this interpreter. `mi' The newest GDB/MI interface (currently `mi2'). Used primarily by programs wishing to use GDB as a backend for a debugger GUI or an IDE. For more information, see *note The GDB/MI Interface: GDB/MI. `mi2' The current GDB/MI interface. `mi1' The GDB/MI interface included in GDB 5.1, 5.2, and 5.3. The interpreter being used by GDB may not be dynamically switched at runtime. Although possible, this could lead to a very precarious situation. Consider an IDE using GDB/MI. If a user enters the command "interpreter-set console" in a console view, GDB would switch to using the console interpreter, rendering the IDE inoperable! Although you may only choose a single interpreter at startup, you may execute commands in any interpreter from the current interpreter using the appropriate command. If you are running the console interpreter, simply use the `interpreter-exec' command: interpreter-exec mi "-data-list-register-names" GDB/MI has a similar command, although it is only available in versions of GDB which support GDB/MI version 2 (or greater).  File: gdb.info, Node: TUI, Next: Emacs, Prev: Interpreters, Up: Top 25 GDB Text User Interface ************************** * Menu: * TUI Overview:: TUI overview * TUI Keys:: TUI key bindings * TUI Single Key Mode:: TUI single key mode * TUI Commands:: TUI-specific commands * TUI Configuration:: TUI configuration variables The GDB Text User Interface (TUI) is a terminal interface which uses the `curses' library to show the source file, the assembly output, the program registers and GDB commands in separate text windows. The TUI mode is supported only on platforms where a suitable version of the `curses' library is available. The TUI mode is enabled by default when you invoke GDB as `gdb -tui'. You can also switch in and out of TUI mode while GDB runs by using various TUI commands and key bindings, such as `C-x C-a'. *Note TUI Key Bindings: TUI Keys.  File: gdb.info, Node: TUI Overview, Next: TUI Keys, Up: TUI 25.1 TUI Overview ================= In TUI mode, GDB can display several text windows: _command_ This window is the GDB command window with the GDB prompt and the GDB output. The GDB input is still managed using readline. _source_ The source window shows the source file of the program. The current line and active breakpoints are displayed in this window. _assembly_ The assembly window shows the disassembly output of the program. _register_ This window shows the processor registers. Registers are highlighted when their values change. The source and assembly windows show the current program position by highlighting the current line and marking it with a `>' marker. Breakpoints are indicated with two markers. The first marker indicates the breakpoint type: `B' Breakpoint which was hit at least once. `b' Breakpoint which was never hit. `H' Hardware breakpoint which was hit at least once. `h' Hardware breakpoint which was never hit. The second marker indicates whether the breakpoint is enabled or not: `+' Breakpoint is enabled. `-' Breakpoint is disabled. The source, assembly and register windows are updated when the current thread changes, when the frame changes, or when the program counter changes. These windows are not all visible at the same time. The command window is always visible. The others can be arranged in several layouts: * source only, * assembly only, * source and assembly, * source and registers, or * assembly and registers. A status line above the command window shows the following information: _target_ Indicates the current GDB target. (*note Specifying a Debugging Target: Targets.). _process_ Gives the current process or thread number. When no process is being debugged, this field is set to `No process'. _function_ Gives the current function name for the selected frame. The name is demangled if demangling is turned on (*note Print Settings::). When there is no symbol corresponding to the current program counter, the string `??' is displayed. _line_ Indicates the current line number for the selected frame. When the current line number is not known, the string `??' is displayed. _pc_ Indicates the current program counter address.  File: gdb.info, Node: TUI Keys, Next: TUI Single Key Mode, Prev: TUI Overview, Up: TUI 25.2 TUI Key Bindings ===================== The TUI installs several key bindings in the readline keymaps (*note Command Line Editing::). The following key bindings are installed for both TUI mode and the GDB standard mode. `C-x C-a' `C-x a' `C-x A' Enter or leave the TUI mode. When leaving the TUI mode, the curses window management stops and GDB operates using its standard mode, writing on the terminal directly. When reentering the TUI mode, control is given back to the curses windows. The screen is then refreshed. `C-x 1' Use a TUI layout with only one window. The layout will either be `source' or `assembly'. When the TUI mode is not active, it will switch to the TUI mode. Think of this key binding as the Emacs `C-x 1' binding. `C-x 2' Use a TUI layout with at least two windows. When the current layout already has two windows, the next layout with two windows is used. When a new layout is chosen, one window will always be common to the previous layout and the new one. Think of it as the Emacs `C-x 2' binding. `C-x o' Change the active window. The TUI associates several key bindings (like scrolling and arrow keys) with the active window. This command gives the focus to the next TUI window. Think of it as the Emacs `C-x o' binding. `C-x s' Switch in and out of the TUI SingleKey mode that binds single keys to GDB commands (*note TUI Single Key Mode::). The following key bindings only work in the TUI mode: Scroll the active window one page up. Scroll the active window one page down. Scroll the active window one line up. Scroll the active window one line down. Scroll the active window one column left. Scroll the active window one column right. `C-L' Refresh the screen. Because the arrow keys scroll the active window in the TUI mode, they are not available for their normal use by readline unless the command window has the focus. When another window is active, you must use other readline key bindings such as `C-p', `C-n', `C-b' and `C-f' to control the command window.  File: gdb.info, Node: TUI Single Key Mode, Next: TUI Commands, Prev: TUI Keys, Up: TUI 25.3 TUI Single Key Mode ======================== The TUI also provides a "SingleKey" mode, which binds several frequently used GDB commands to single keys. Type `C-x s' to switch into this mode, where the following key bindings are used: `c' continue `d' down `f' finish `n' next `q' exit the SingleKey mode. `r' run `s' step `u' up `v' info locals `w' where Other keys temporarily switch to the GDB command prompt. The key that was pressed is inserted in the editing buffer so that it is possible to type most GDB commands without interaction with the TUI SingleKey mode. Once the command is entered the TUI SingleKey mode is restored. The only way to permanently leave this mode is by typing `q' or `C-x s'.  File: gdb.info, Node: TUI Commands, Next: TUI Configuration, Prev: TUI Single Key Mode, Up: TUI 25.4 TUI-specific Commands ========================== The TUI has specific commands to control the text windows. These commands are always available, even when GDB is not in the TUI mode. When GDB is in the standard mode, most of these commands will automatically switch to the TUI mode. Note that if GDB's `stdout' is not connected to a terminal, or GDB has been started with the machine interface interpreter (*note The GDB/MI Interface: GDB/MI.), most of these commands will fail with an error, because it would not be possible or desirable to enable curses window management. `info win' List and give the size of all displayed windows. `layout next' Display the next layout. `layout prev' Display the previous layout. `layout src' Display the source window only. `layout asm' Display the assembly window only. `layout split' Display the source and assembly window. `layout regs' Display the register window together with the source or assembly window. `focus next' Make the next window active for scrolling. `focus prev' Make the previous window active for scrolling. `focus src' Make the source window active for scrolling. `focus asm' Make the assembly window active for scrolling. `focus regs' Make the register window active for scrolling. `focus cmd' Make the command window active for scrolling. `refresh' Refresh the screen. This is similar to typing `C-L'. `tui reg float' Show the floating point registers in the register window. `tui reg general' Show the general registers in the register window. `tui reg next' Show the next register group. The list of register groups as well as their order is target specific. The predefined register groups are the following: `general', `float', `system', `vector', `all', `save', `restore'. `tui reg system' Show the system registers in the register window. `update' Update the source window and the current execution point. `winheight NAME +COUNT' `winheight NAME -COUNT' Change the height of the window NAME by COUNT lines. Positive counts increase the height, while negative counts decrease it. `tabset NCHARS' Set the width of tab stops to be NCHARS characters.  File: gdb.info, Node: TUI Configuration, Prev: TUI Commands, Up: TUI 25.5 TUI Configuration Variables ================================ Several configuration variables control the appearance of TUI windows. `set tui border-kind KIND' Select the border appearance for the source, assembly and register windows. The possible values are the following: `space' Use a space character to draw the border. `ascii' Use ASCII characters `+', `-' and `|' to draw the border. `acs' Use the Alternate Character Set to draw the border. The border is drawn using character line graphics if the terminal supports them. `set tui border-mode MODE' `set tui active-border-mode MODE' Select the display attributes for the borders of the inactive windows or the active window. The MODE can be one of the following: `normal' Use normal attributes to display the border. `standout' Use standout mode. `reverse' Use reverse video mode. `half' Use half bright mode. `half-standout' Use half bright and standout mode. `bold' Use extra bright or bold mode. `bold-standout' Use extra bright or bold and standout mode.  File: gdb.info, Node: Emacs, Next: GDB/MI, Prev: TUI, Up: Top 26 Using GDB under GNU Emacs **************************** A special interface allows you to use GNU Emacs to view (and edit) the source files for the program you are debugging with GDB. To use this interface, use the command `M-x gdb' in Emacs. Give the executable file you want to debug as an argument. This command starts GDB as a subprocess of Emacs, with input and output through a newly created Emacs buffer. Running GDB under Emacs can be just like running GDB normally except for two things: * All "terminal" input and output goes through an Emacs buffer, called the GUD buffer. This applies both to GDB commands and their output, and to the input and output done by the program you are debugging. This is useful because it means that you can copy the text of previous commands and input them again; you can even use parts of the output in this way. All the facilities of Emacs' Shell mode are available for interacting with your program. In particular, you can send signals the usual way--for example, `C-c C-c' for an interrupt, `C-c C-z' for a stop. * GDB displays source code through Emacs. Each time GDB displays a stack frame, Emacs automatically finds the source file for that frame and puts an arrow (`=>') at the left margin of the current line. Emacs uses a separate buffer for source display, and splits the screen to show both your GDB session and the source. Explicit GDB `list' or search commands still produce output as usual, but you probably have no reason to use them from Emacs. We call this "text command mode". Emacs 22.1, and later, also uses a graphical mode, enabled by default, which provides further buffers that can control the execution and describe the state of your program. *Note GDB Graphical Interface: (Emacs)GDB Graphical Interface. If you specify an absolute file name when prompted for the `M-x gdb' argument, then Emacs sets your current working directory to where your program resides. If you only specify the file name, then Emacs sets your current working directory to the directory associated with the previous buffer. In this case, GDB may find your program by searching your environment's `PATH' variable, but on some operating systems it might not find the source. So, although the GDB input and output session proceeds normally, the auxiliary buffer does not display the current source and line of execution. The initial working directory of GDB is printed on the top line of the GUD buffer and this serves as a default for the commands that specify files for GDB to operate on. *Note Commands to Specify Files: Files. By default, `M-x gdb' calls the program called `gdb'. If you need to call GDB by a different name (for example, if you keep several configurations around, with different names) you can customize the Emacs variable `gud-gdb-command-name' to run the one you want. In the GUD buffer, you can use these special Emacs commands in addition to the standard Shell mode commands: `C-h m' Describe the features of Emacs' GUD Mode. `C-c C-s' Execute to another source line, like the GDB `step' command; also update the display window to show the current file and location. `C-c C-n' Execute to next source line in this function, skipping all function calls, like the GDB `next' command. Then update the display window to show the current file and location. `C-c C-i' Execute one instruction, like the GDB `stepi' command; update display window accordingly. `C-c C-f' Execute until exit from the selected stack frame, like the GDB `finish' command. `C-c C-r' Continue execution of your program, like the GDB `continue' command. `C-c <' Go up the number of frames indicated by the numeric argument (*note Numeric Arguments: (Emacs)Arguments.), like the GDB `up' command. `C-c >' Go down the number of frames indicated by the numeric argument, like the GDB `down' command. In any source file, the Emacs command `C-x ' (`gud-break') tells GDB to set a breakpoint on the source line point is on. In text command mode, if you type `M-x speedbar', Emacs displays a separate frame which shows a backtrace when the GUD buffer is current. Move point to any frame in the stack and type to make it become the current frame and display the associated source in the source buffer. Alternatively, click `Mouse-2' to make the selected frame become the current one. In graphical mode, the speedbar displays watch expressions. If you accidentally delete the source-display buffer, an easy way to get it back is to type the command `f' in the GDB buffer, to request a frame display; when you run under Emacs, this recreates the source buffer if necessary to show you the context of the current frame. The source files displayed in Emacs are in ordinary Emacs buffers which are visiting the source files in the usual way. You can edit the files with these buffers if you wish; but keep in mind that GDB communicates with Emacs in terms of line numbers. If you add or delete lines from the text, the line numbers that GDB knows cease to correspond properly with the code. A more detailed description of Emacs' interaction with GDB is given in the Emacs manual (*note Debuggers: (Emacs)Debuggers.).  File: gdb.info, Node: GDB/MI, Next: Annotations, Prev: Emacs, Up: Top 27 The GDB/MI Interface *********************** Function and Purpose ==================== GDB/MI is a line based machine oriented text interface to GDB and is activated by specifying using the `--interpreter' command line option (*note Mode Options::). It is specifically intended to support the development of systems which use the debugger as just one small component of a larger system. This chapter is a specification of the GDB/MI interface. It is written in the form of a reference manual. Note that GDB/MI is still under construction, so some of the features described below are incomplete and subject to change (*note GDB/MI Development and Front Ends: GDB/MI Development and Front Ends.). Notation and Terminology ======================== This chapter uses the following notation: * `|' separates two alternatives. * `[ SOMETHING ]' indicates that SOMETHING is optional: it may or may not be given. * `( GROUP )*' means that GROUP inside the parentheses may repeat zero or more times. * `( GROUP )+' means that GROUP inside the parentheses may repeat one or more times. * `"STRING"' means a literal STRING. * Menu: * GDB/MI General Design:: * GDB/MI Command Syntax:: * GDB/MI Compatibility with CLI:: * GDB/MI Development and Front Ends:: * GDB/MI Output Records:: * GDB/MI Simple Examples:: * GDB/MI Command Description Format:: * GDB/MI Breakpoint Commands:: * GDB/MI Catchpoint Commands:: * GDB/MI Program Context:: * GDB/MI Thread Commands:: * GDB/MI Ada Tasking Commands:: * GDB/MI Program Execution:: * GDB/MI Stack Manipulation:: * GDB/MI Variable Objects:: * GDB/MI Data Manipulation:: * GDB/MI Tracepoint Commands:: * GDB/MI Symbol Query:: * GDB/MI File Commands:: * GDB/MI Target Manipulation:: * GDB/MI File Transfer Commands:: * GDB/MI Miscellaneous Commands::  File: gdb.info, Node: GDB/MI General Design, Next: GDB/MI Command Syntax, Up: GDB/MI 27.1 GDB/MI General Design ========================== Interaction of a GDB/MI frontend with GDB involves three parts--commands sent to GDB, responses to those commands and notifications. Each command results in exactly one response, indicating either successful completion of the command, or an error. For the commands that do not resume the target, the response contains the requested information. For the commands that resume the target, the response only indicates whether the target was successfully resumed. Notifications is the mechanism for reporting changes in the state of the target, or in GDB state, that cannot conveniently be associated with a command and reported as part of that command response. The important examples of notifications are: * Exec notifications. These are used to report changes in target state--when a target is resumed, or stopped. It would not be feasible to include this information in response of resuming commands, because one resume commands can result in multiple events in different threads. Also, quite some time may pass before any event happens in the target, while a frontend needs to know whether the resuming command itself was successfully executed. * Console output, and status notifications. Console output notifications are used to report output of CLI commands, as well as diagnostics for other commands. Status notifications are used to report the progress of a long-running operation. Naturally, including this information in command response would mean no output is produced until the command is finished, which is undesirable. * General notifications. Commands may have various side effects on the GDB or target state beyond their official purpose. For example, a command may change the selected thread. Although such changes can be included in command response, using notification allows for more orthogonal frontend design. There's no guarantee that whenever an MI command reports an error, GDB or the target are in any specific state, and especially, the state is not reverted to the state before the MI command was processed. Therefore, whenever an MI command results in an error, we recommend that the frontend refreshes all the information shown in the user interface. * Menu: * Context management:: * Asynchronous and non-stop modes:: * Thread groups::  File: gdb.info, Node: Context management, Next: Asynchronous and non-stop modes, Up: GDB/MI General Design 27.1.1 Context management ------------------------- In most cases when GDB accesses the target, this access is done in context of a specific thread and frame (*note Frames::). Often, even when accessing global data, the target requires that a thread be specified. The CLI interface maintains the selected thread and frame, and supplies them to target on each command. This is convenient, because a command line user would not want to specify that information explicitly on each command, and because user interacts with GDB via a single terminal, so no confusion is possible as to what thread and frame are the current ones. In the case of MI, the concept of selected thread and frame is less useful. First, a frontend can easily remember this information itself. Second, a graphical frontend can have more than one window, each one used for debugging a different thread, and the frontend might want to access additional threads for internal purposes. This increases the risk that by relying on implicitly selected thread, the frontend may be operating on a wrong one. Therefore, each MI command should explicitly specify which thread and frame to operate on. To make it possible, each MI command accepts the `--thread' and `--frame' options, the value to each is GDB identifier for thread and frame to operate on. Usually, each top-level window in a frontend allows the user to select a thread and a frame, and remembers the user selection for further operations. However, in some cases GDB may suggest that the current thread be changed. For example, when stopping on a breakpoint it is reasonable to switch to the thread where breakpoint is hit. For another example, if the user issues the CLI `thread' command via the frontend, it is desirable to change the frontend's selected thread to the one specified by user. GDB communicates the suggestion to change current thread using the `=thread-selected' notification. No such notification is available for the selected frame at the moment. Note that historically, MI shares the selected thread with CLI, so frontends used the `-thread-select' to execute commands in the right context. However, getting this to work right is cumbersome. The simplest way is for frontend to emit `-thread-select' command before every command. This doubles the number of commands that need to be sent. The alternative approach is to suppress `-thread-select' if the selected thread in GDB is supposed to be identical to the thread the frontend wants to operate on. However, getting this optimization right can be tricky. In particular, if the frontend sends several commands to GDB, and one of the commands changes the selected thread, then the behaviour of subsequent commands will change. So, a frontend should either wait for response from such problematic commands, or explicitly add `-thread-select' for all subsequent commands. No frontend is known to do this exactly right, so it is suggested to just always pass the `--thread' and `--frame' options.  File: gdb.info, Node: Asynchronous and non-stop modes, Next: Thread groups, Prev: Context management, Up: GDB/MI General Design 27.1.2 Asynchronous command execution and non-stop mode ------------------------------------------------------- On some targets, GDB is capable of processing MI commands even while the target is running. This is called "asynchronous command execution" (*note Background Execution::). The frontend may specify a preferrence for asynchronous execution using the `-gdb-set target-async 1' command, which should be emitted before either running the executable or attaching to the target. After the frontend has started the executable or attached to the target, it can find if asynchronous execution is enabled using the `-list-target-features' command. Even if GDB can accept a command while target is running, many commands that access the target do not work when the target is running. Therefore, asynchronous command execution is most useful when combined with non-stop mode (*note Non-Stop Mode::). Then, it is possible to examine the state of one thread, while other threads are running. When a given thread is running, MI commands that try to access the target in the context of that thread may not work, or may work only on some targets. In particular, commands that try to operate on thread's stack will not work, on any target. Commands that read memory, or modify breakpoints, may work or not work, depending on the target. Note that even commands that operate on global state, such as `print', `set', and breakpoint commands, still access the target in the context of a specific thread, so frontend should try to find a stopped thread and perform the operation on that thread (using the `--thread' option). Which commands will work in the context of a running thread is highly target dependent. However, the two commands `-exec-interrupt', to stop a thread, and `-thread-info', to find the state of a thread, will always work.  File: gdb.info, Node: Thread groups, Prev: Asynchronous and non-stop modes, Up: GDB/MI General Design 27.1.3 Thread groups -------------------- GDB may be used to debug several processes at the same time. On some platfroms, GDB may support debugging of several hardware systems, each one having several cores with several different processes running on each core. This section describes the MI mechanism to support such debugging scenarios. The key observation is that regardless of the structure of the target, MI can have a global list of threads, because most commands that accept the `--thread' option do not need to know what process that thread belongs to. Therefore, it is not necessary to introduce neither additional `--process' option, nor an notion of the current process in the MI interface. The only strictly new feature that is required is the ability to find how the threads are grouped into processes. To allow the user to discover such grouping, and to support arbitrary hierarchy of machines/cores/processes, MI introduces the concept of a "thread group". Thread group is a collection of threads and other thread groups. A thread group always has a string identifier, a type, and may have additional attributes specific to the type. A new command, `-list-thread-groups', returns the list of top-level thread groups, which correspond to processes that GDB is debugging at the moment. By passing an identifier of a thread group to the `-list-thread-groups' command, it is possible to obtain the members of specific thread group. To allow the user to easily discover processes, and other objects, he wishes to debug, a concept of "available thread group" is introduced. Available thread group is an thread group that GDB is not debugging, but that can be attached to, using the `-target-attach' command. The list of available top-level thread groups can be obtained using `-list-thread-groups --available'. In general, the content of a thread group may be only retrieved only after attaching to that thread group. Thread groups are related to inferiors (*note Inferiors and Programs::). Each inferior corresponds to a thread group of a special type `process', and some additional operations are permitted on such thread groups.  File: gdb.info, Node: GDB/MI Command Syntax, Next: GDB/MI Compatibility with CLI, Prev: GDB/MI General Design, Up: GDB/MI 27.2 GDB/MI Command Syntax ========================== * Menu: * GDB/MI Input Syntax:: * GDB/MI Output Syntax::  File: gdb.info, Node: GDB/MI Input Syntax, Next: GDB/MI Output Syntax, Up: GDB/MI Command Syntax 27.2.1 GDB/MI Input Syntax -------------------------- `COMMAND ==>' `CLI-COMMAND | MI-COMMAND' `CLI-COMMAND ==>' `[ TOKEN ] CLI-COMMAND NL', where CLI-COMMAND is any existing GDB CLI command. `MI-COMMAND ==>' `[ TOKEN ] "-" OPERATION ( " " OPTION )* `[' " --" `]' ( " " PARAMETER )* NL' `TOKEN ==>' "any sequence of digits" `OPTION ==>' `"-" PARAMETER [ " " PARAMETER ]' `PARAMETER ==>' `NON-BLANK-SEQUENCE | C-STRING' `OPERATION ==>' _any of the operations described in this chapter_ `NON-BLANK-SEQUENCE ==>' _anything, provided it doesn't contain special characters such as "-", NL, """ and of course " "_ `C-STRING ==>' `""" SEVEN-BIT-ISO-C-STRING-CONTENT """' `NL ==>' `CR | CR-LF' Notes: * The CLI commands are still handled by the MI interpreter; their output is described below. * The `TOKEN', when present, is passed back when the command finishes. * Some MI commands accept optional arguments as part of the parameter list. Each option is identified by a leading `-' (dash) and may be followed by an optional argument parameter. Options occur first in the parameter list and can be delimited from normal parameters using `--' (this is useful when some parameters begin with a dash). Pragmatics: * We want easy access to the existing CLI syntax (for debugging). * We want it to be easy to spot a MI operation.  File: gdb.info, Node: GDB/MI Output Syntax, Prev: GDB/MI Input Syntax, Up: GDB/MI Command Syntax 27.2.2 GDB/MI Output Syntax --------------------------- The output from GDB/MI consists of zero or more out-of-band records followed, optionally, by a single result record. This result record is for the most recent command. The sequence of output records is terminated by `(gdb)'. If an input command was prefixed with a `TOKEN' then the corresponding output for that command will also be prefixed by that same TOKEN. `OUTPUT ==>' `( OUT-OF-BAND-RECORD )* [ RESULT-RECORD ] "(gdb)" NL' `RESULT-RECORD ==>' ` [ TOKEN ] "^" RESULT-CLASS ( "," RESULT )* NL' `OUT-OF-BAND-RECORD ==>' `ASYNC-RECORD | STREAM-RECORD' `ASYNC-RECORD ==>' `EXEC-ASYNC-OUTPUT | STATUS-ASYNC-OUTPUT | NOTIFY-ASYNC-OUTPUT' `EXEC-ASYNC-OUTPUT ==>' `[ TOKEN ] "*" ASYNC-OUTPUT' `STATUS-ASYNC-OUTPUT ==>' `[ TOKEN ] "+" ASYNC-OUTPUT' `NOTIFY-ASYNC-OUTPUT ==>' `[ TOKEN ] "=" ASYNC-OUTPUT' `ASYNC-OUTPUT ==>' `ASYNC-CLASS ( "," RESULT )* NL' `RESULT-CLASS ==>' `"done" | "running" | "connected" | "error" | "exit"' `ASYNC-CLASS ==>' `"stopped" | OTHERS' (where OTHERS will be added depending on the needs--this is still in development). `RESULT ==>' ` VARIABLE "=" VALUE' `VARIABLE ==>' ` STRING ' `VALUE ==>' ` CONST | TUPLE | LIST ' `CONST ==>' `C-STRING' `TUPLE ==>' ` "{}" | "{" RESULT ( "," RESULT )* "}" ' `LIST ==>' ` "[]" | "[" VALUE ( "," VALUE )* "]" | "[" RESULT ( "," RESULT )* "]" ' `STREAM-RECORD ==>' `CONSOLE-STREAM-OUTPUT | TARGET-STREAM-OUTPUT | LOG-STREAM-OUTPUT' `CONSOLE-STREAM-OUTPUT ==>' `"~" C-STRING' `TARGET-STREAM-OUTPUT ==>' `"@" C-STRING' `LOG-STREAM-OUTPUT ==>' `"&" C-STRING' `NL ==>' `CR | CR-LF' `TOKEN ==>' _any sequence of digits_. Notes: * All output sequences end in a single line containing a period. * The `TOKEN' is from the corresponding request. Note that for all async output, while the token is allowed by the grammar and may be output by future versions of GDB for select async output messages, it is generally omitted. Frontends should treat all async output as reporting general changes in the state of the target and there should be no need to associate async output to any prior command. * STATUS-ASYNC-OUTPUT contains on-going status information about the progress of a slow operation. It can be discarded. All status output is prefixed by `+'. * EXEC-ASYNC-OUTPUT contains asynchronous state change on the target (stopped, started, disappeared). All async output is prefixed by `*'. * NOTIFY-ASYNC-OUTPUT contains supplementary information that the client should handle (e.g., a new breakpoint information). All notify output is prefixed by `='. * CONSOLE-STREAM-OUTPUT is output that should be displayed as is in the console. It is the textual response to a CLI command. All the console output is prefixed by `~'. * TARGET-STREAM-OUTPUT is the output produced by the target program. All the target output is prefixed by `@'. * LOG-STREAM-OUTPUT is output text coming from GDB's internals, for instance messages that should be displayed as part of an error log. All the log output is prefixed by `&'. * New GDB/MI commands should only output LISTS containing VALUES. *Note GDB/MI Stream Records: GDB/MI Stream Records, for more details about the various output records.  File: gdb.info, Node: GDB/MI Compatibility with CLI, Next: GDB/MI Development and Front Ends, Prev: GDB/MI Command Syntax, Up: GDB/MI 27.3 GDB/MI Compatibility with CLI ================================== For the developers convenience CLI commands can be entered directly, but there may be some unexpected behaviour. For example, commands that query the user will behave as if the user replied yes, breakpoint command lists are not executed and some CLI commands, such as `if', `when' and `define', prompt for further input with `>', which is not valid MI output. This feature may be removed at some stage in the future and it is recommended that front ends use the `-interpreter-exec' command (*note -interpreter-exec::).  File: gdb.info, Node: GDB/MI Development and Front Ends, Next: GDB/MI Output Records, Prev: GDB/MI Compatibility with CLI, Up: GDB/MI 27.4 GDB/MI Development and Front Ends ====================================== The application which takes the MI output and presents the state of the program being debugged to the user is called a "front end". Although GDB/MI is still incomplete, it is currently being used by a variety of front ends to GDB. This makes it difficult to introduce new functionality without breaking existing usage. This section tries to minimize the problems by describing how the protocol might change. Some changes in MI need not break a carefully designed front end, and for these the MI version will remain unchanged. The following is a list of changes that may occur within one level, so front ends should parse MI output in a way that can handle them: * New MI commands may be added. * New fields may be added to the output of any MI command. * The range of values for fields with specified values, e.g., `in_scope' (*note -var-update::) may be extended. If the changes are likely to break front ends, the MI version level will be increased by one. This will allow the front end to parse the output according to the MI version. Apart from mi0, new versions of GDB will not support old versions of MI and it will be the responsibility of the front end to work with the new one. The best way to avoid unexpected changes in MI that might break your front end is to make your project known to GDB developers and follow development on and .  File: gdb.info, Node: GDB/MI Output Records, Next: GDB/MI Simple Examples, Prev: GDB/MI Development and Front Ends, Up: GDB/MI 27.5 GDB/MI Output Records ========================== * Menu: * GDB/MI Result Records:: * GDB/MI Stream Records:: * GDB/MI Async Records:: * GDB/MI Breakpoint Information:: * GDB/MI Frame Information:: * GDB/MI Thread Information:: * GDB/MI Ada Exception Information::  File: gdb.info, Node: GDB/MI Result Records, Next: GDB/MI Stream Records, Up: GDB/MI Output Records 27.5.1 GDB/MI Result Records ---------------------------- In addition to a number of out-of-band notifications, the response to a GDB/MI command includes one of the following result indications: `"^done" [ "," RESULTS ]' The synchronous operation was successful, `RESULTS' are the return values. `"^running"' This result record is equivalent to `^done'. Historically, it was output instead of `^done' if the command has resumed the target. This behaviour is maintained for backward compatibility, but all frontends should treat `^done' and `^running' identically and rely on the `*running' output record to determine which threads are resumed. `"^connected"' GDB has connected to a remote target. `"^error" "," C-STRING' The operation failed. The `C-STRING' contains the corresponding error message. `"^exit"' GDB has terminated.  File: gdb.info, Node: GDB/MI Stream Records, Next: GDB/MI Async Records, Prev: GDB/MI Result Records, Up: GDB/MI Output Records 27.5.2 GDB/MI Stream Records ---------------------------- GDB internally maintains a number of output streams: the console, the target, and the log. The output intended for each of these streams is funneled through the GDB/MI interface using "stream records". Each stream record begins with a unique "prefix character" which identifies its stream (*note GDB/MI Output Syntax: GDB/MI Output Syntax.). In addition to the prefix, each stream record contains a `STRING-OUTPUT'. This is either raw text (with an implicit new line) or a quoted C string (which does not contain an implicit newline). `"~" STRING-OUTPUT' The console output stream contains text that should be displayed in the CLI console window. It contains the textual responses to CLI commands. `"@" STRING-OUTPUT' The target output stream contains any textual output from the running target. This is only present when GDB's event loop is truly asynchronous, which is currently only the case for remote targets. `"&" STRING-OUTPUT' The log stream contains debugging messages being produced by GDB's internals.  File: gdb.info, Node: GDB/MI Async Records, Next: GDB/MI Breakpoint Information, Prev: GDB/MI Stream Records, Up: GDB/MI Output Records 27.5.3 GDB/MI Async Records --------------------------- "Async" records are used to notify the GDB/MI client of additional changes that have occurred. Those changes can either be a consequence of GDB/MI commands (e.g., a breakpoint modified) or a result of target activity (e.g., target stopped). The following is the list of possible async records: `*running,thread-id="THREAD"' The target is now running. The THREAD field tells which specific thread is now running, and can be `all' if all threads are running. The frontend should assume that no interaction with a running thread is possible after this notification is produced. The frontend should not assume that this notification is output only once for any command. GDB may emit this notification several times, either for different threads, because it cannot resume all threads together, or even for a single thread, if the thread must be stepped though some code before letting it run freely. `*stopped,reason="REASON",thread-id="ID",stopped-threads="STOPPED",core="CORE"' The target has stopped. The REASON field can have one of the following values: `breakpoint-hit' A breakpoint was reached. `watchpoint-trigger' A watchpoint was triggered. `read-watchpoint-trigger' A read watchpoint was triggered. `access-watchpoint-trigger' An access watchpoint was triggered. `function-finished' An -exec-finish or similar CLI command was accomplished. `location-reached' An -exec-until or similar CLI command was accomplished. `watchpoint-scope' A watchpoint has gone out of scope. `end-stepping-range' An -exec-next, -exec-next-instruction, -exec-step, -exec-step-instruction or similar CLI command was accomplished. `exited-signalled' The inferior exited because of a signal. `exited' The inferior exited. `exited-normally' The inferior exited normally. `signal-received' A signal was received by the inferior. `solib-event' The inferior has stopped due to a library being loaded or unloaded. This can happen when `stop-on-solib-events' (*note Files::) is set or when a `catch load' or `catch unload' catchpoint is in use (*note Set Catchpoints::). `fork' The inferior has forked. This is reported when `catch fork' (*note Set Catchpoints::) has been used. `vfork' The inferior has vforked. This is reported in when `catch vfork' (*note Set Catchpoints::) has been used. `syscall-entry' The inferior entered a system call. This is reported when `catch syscall' (*note Set Catchpoints::) has been used. `syscall-entry' The inferior returned from a system call. This is reported when `catch syscall' (*note Set Catchpoints::) has been used. `exec' The inferior called `exec'. This is reported when `catch exec' (*note Set Catchpoints::) has been used. The ID field identifies the thread that directly caused the stop - for example by hitting a breakpoint. Depending on whether all-stop mode is in effect (*note All-Stop Mode::), GDB may either stop all threads, or only the thread that directly triggered the stop. If all threads are stopped, the STOPPED field will have the value of `"all"'. Otherwise, the value of the STOPPED field will be a list of thread identifiers. Presently, this list will always include a single thread, but frontend should be prepared to see several threads in the list. The CORE field reports the processor core on which the stop event has happened. This field may be absent if such information is not available. `=thread-group-added,id="ID"' `=thread-group-removed,id="ID"' A thread group was either added or removed. The ID field contains the GDB identifier of the thread group. When a thread group is added, it generally might not be associated with a running process. When a thread group is removed, its id becomes invalid and cannot be used in any way. `=thread-group-started,id="ID",pid="PID"' A thread group became associated with a running program, either because the program was just started or the thread group was attached to a program. The ID field contains the GDB identifier of the thread group. The PID field contains process identifier, specific to the operating system. `=thread-group-exited,id="ID"[,exit-code="CODE"]' A thread group is no longer associated with a running program, either because the program has exited, or because it was detached from. The ID field contains the GDB identifier of the thread group. CODE is the exit code of the inferior; it exists only when the inferior exited with some code. `=thread-created,id="ID",group-id="GID"' `=thread-exited,id="ID",group-id="GID"' A thread either was created, or has exited. The ID field contains the GDB identifier of the thread. The GID field identifies the thread group this thread belongs to. `=thread-selected,id="ID"' Informs that the selected thread was changed as result of the last command. This notification is not emitted as result of `-thread-select' command but is emitted whenever an MI command that is not documented to change the selected thread actually changes it. In particular, invoking, directly or indirectly (via user-defined command), the CLI `thread' command, will generate this notification. We suggest that in response to this notification, front ends highlight the selected thread and cause subsequent commands to apply to that thread. `=library-loaded,...' Reports that a new library file was loaded by the program. This notification has 4 fields--ID, TARGET-NAME, HOST-NAME, and SYMBOLS-LOADED. The ID field is an opaque identifier of the library. For remote debugging case, TARGET-NAME and HOST-NAME fields give the name of the library file on the target, and on the host respectively. For native debugging, both those fields have the same value. The SYMBOLS-LOADED field is emitted only for backward compatibility and should not be relied on to convey any useful information. The THREAD-GROUP field, if present, specifies the id of the thread group in whose context the library was loaded. If the field is absent, it means the library was loaded in the context of all present thread groups. `=library-unloaded,...' Reports that a library was unloaded by the program. This notification has 3 fields--ID, TARGET-NAME and HOST-NAME with the same meaning as for the `=library-loaded' notification. The THREAD-GROUP field, if present, specifies the id of the thread group in whose context the library was unloaded. If the field is absent, it means the library was unloaded in the context of all present thread groups. `=traceframe-changed,num=TFNUM,tracepoint=TPNUM' `=traceframe-changed,end' Reports that the trace frame was changed and its new number is TFNUM. The number of the tracepoint associated with this trace frame is TPNUM. `=tsv-created,name=NAME,initial=INITIAL' Reports that the new trace state variable NAME is created with initial value INITIAL. `=tsv-deleted,name=NAME' `=tsv-deleted' Reports that the trace state variable NAME is deleted or all trace state variables are deleted. `=tsv-modified,name=NAME,initial=INITIAL[,current=CURRENT]' Reports that the trace state variable NAME is modified with the initial value INITIAL. The current value CURRENT of trace state variable is optional and is reported if the current value of trace state variable is known. `=breakpoint-created,bkpt={...}' `=breakpoint-modified,bkpt={...}' `=breakpoint-deleted,id=NUMBER' Reports that a breakpoint was created, modified, or deleted, respectively. Only user-visible breakpoints are reported to the MI user. The BKPT argument is of the same form as returned by the various breakpoint commands; *Note GDB/MI Breakpoint Commands::. The NUMBER is the ordinal number of the breakpoint. Note that if a breakpoint is emitted in the result record of a command, then it will not also be emitted in an async record. `=record-started,thread-group="ID"' `=record-stopped,thread-group="ID"' Execution log recording was either started or stopped on an inferior. The ID is the GDB identifier of the thread group corresponding to the affected inferior. `=cmd-param-changed,param=PARAM,value=VALUE' Reports that a parameter of the command `set PARAM' is changed to VALUE. In the multi-word `set' command, the PARAM is the whole parameter list to `set' command. For example, In command `set check type on', PARAM is `check type' and VALUE is `on'. `=memory-changed,thread-group=ID,addr=ADDR,len=LEN[,type="code"]' Reports that bytes from ADDR to DATA + LEN were written in an inferior. The ID is the identifier of the thread group corresponding to the affected inferior. The optional `type="code"' part is reported if the memory written to holds executable code.  File: gdb.info, Node: GDB/MI Breakpoint Information, Next: GDB/MI Frame Information, Prev: GDB/MI Async Records, Up: GDB/MI Output Records 27.5.4 GDB/MI Breakpoint Information ------------------------------------ When GDB reports information about a breakpoint, a tracepoint, a watchpoint, or a catchpoint, it uses a tuple with the following fields: `number' The breakpoint number. For a breakpoint that represents one location of a multi-location breakpoint, this will be a dotted pair, like `1.2'. `type' The type of the breakpoint. For ordinary breakpoints this will be `breakpoint', but many values are possible. `catch-type' If the type of the breakpoint is `catchpoint', then this indicates the exact type of catchpoint. `disp' This is the breakpoint disposition--either `del', meaning that the breakpoint will be deleted at the next stop, or `keep', meaning that the breakpoint will not be deleted. `enabled' This indicates whether the breakpoint is enabled, in which case the value is `y', or disabled, in which case the value is `n'. Note that this is not the same as the field `enable'. `addr' The address of the breakpoint. This may be a hexidecimal number, giving the address; or the string `', for a pending breakpoint; or the string `', for a breakpoint with multiple locations. This field will not be present if no address can be determined. For example, a watchpoint does not have an address. `func' If known, the function in which the breakpoint appears. If not known, this field is not present. `filename' The name of the source file which contains this function, if known. If not known, this field is not present. `fullname' The full file name of the source file which contains this function, if known. If not known, this field is not present. `line' The line number at which this breakpoint appears, if known. If not known, this field is not present. `at' If the source file is not known, this field may be provided. If provided, this holds the address of the breakpoint, possibly followed by a symbol name. `pending' If this breakpoint is pending, this field is present and holds the text used to set the breakpoint, as entered by the user. `evaluated-by' Where this breakpoint's condition is evaluated, either `host' or `target'. `thread' If this is a thread-specific breakpoint, then this identifies the thread in which the breakpoint can trigger. `task' If this breakpoint is restricted to a particular Ada task, then this field will hold the task identifier. `cond' If the breakpoint is conditional, this is the condition expression. `ignore' The ignore count of the breakpoint. `enable' The enable count of the breakpoint. `traceframe-usage' FIXME. `static-tracepoint-marker-string-id' For a static tracepoint, the name of the static tracepoint marker. `mask' For a masked watchpoint, this is the mask. `pass' A tracepoint's pass count. `original-location' The location of the breakpoint as originally specified by the user. This field is optional. `times' The number of times the breakpoint has been hit. `installed' This field is only given for tracepoints. This is either `y', meaning that the tracepoint is installed, or `n', meaning that it is not. `what' Some extra data, the exact contents of which are type-dependent. For example, here is what the output of `-break-insert' (*note GDB/MI Breakpoint Commands::) might be: -> -break-insert main <- ^done,bkpt={number="1",type="breakpoint",disp="keep", enabled="y",addr="0x08048564",func="main",file="myprog.c", fullname="/home/nickrob/myprog.c",line="68",thread-groups=["i1"], times="0"} <- (gdb)  File: gdb.info, Node: GDB/MI Frame Information, Next: GDB/MI Thread Information, Prev: GDB/MI Breakpoint Information, Up: GDB/MI Output Records 27.5.5 GDB/MI Frame Information ------------------------------- Response from many MI commands includes an information about stack frame. This information is a tuple that may have the following fields: `level' The level of the stack frame. The innermost frame has the level of zero. This field is always present. `func' The name of the function corresponding to the frame. This field may be absent if GDB is unable to determine the function name. `addr' The code address for the frame. This field is always present. `file' The name of the source files that correspond to the frame's code address. This field may be absent. `line' The source line corresponding to the frames' code address. This field may be absent. `from' The name of the binary file (either executable or shared library) the corresponds to the frame's code address. This field may be absent.  File: gdb.info, Node: GDB/MI Thread Information, Next: GDB/MI Ada Exception Information, Prev: GDB/MI Frame Information, Up: GDB/MI Output Records 27.5.6 GDB/MI Thread Information -------------------------------- Whenever GDB has to report an information about a thread, it uses a tuple with the following fields: `id' The numeric id assigned to the thread by GDB. This field is always present. `target-id' Target-specific string identifying the thread. This field is always present. `details' Additional information about the thread provided by the target. It is supposed to be human-readable and not interpreted by the frontend. This field is optional. `state' Either `stopped' or `running', depending on whether the thread is presently running. This field is always present. `core' The value of this field is an integer number of the processor core the thread was last seen on. This field is optional.  File: gdb.info, Node: GDB/MI Ada Exception Information, Prev: GDB/MI Thread Information, Up: GDB/MI Output Records 27.5.7 GDB/MI Ada Exception Information --------------------------------------- Whenever a `*stopped' record is emitted because the program stopped after hitting an exception catchpoint (*note Set Catchpoints::), GDB provides the name of the exception that was raised via the `exception-name' field.  File: gdb.info, Node: GDB/MI Simple Examples, Next: GDB/MI Command Description Format, Prev: GDB/MI Output Records, Up: GDB/MI 27.6 Simple Examples of GDB/MI Interaction ========================================== This subsection presents several simple examples of interaction using the GDB/MI interface. In these examples, `->' means that the following line is passed to GDB/MI as input, while `<-' means the output received from GDB/MI. Note the line breaks shown in the examples are here only for readability, they don't appear in the real output. Setting a Breakpoint -------------------- Setting a breakpoint generates synchronous output which contains detailed information of the breakpoint. -> -break-insert main <- ^done,bkpt={number="1",type="breakpoint",disp="keep", enabled="y",addr="0x08048564",func="main",file="myprog.c", fullname="/home/nickrob/myprog.c",line="68",thread-groups=["i1"], times="0"} <- (gdb) Program Execution ----------------- Program execution generates asynchronous records and MI gives the reason that execution stopped. -> -exec-run <- ^running <- (gdb) <- *stopped,reason="breakpoint-hit",disp="keep",bkptno="1",thread-id="0", frame={addr="0x08048564",func="main", args=[{name="argc",value="1"},{name="argv",value="0xbfc4d4d4"}], file="myprog.c",fullname="/home/nickrob/myprog.c",line="68"} <- (gdb) -> -exec-continue <- ^running <- (gdb) <- *stopped,reason="exited-normally" <- (gdb) Quitting GDB ------------ Quitting GDB just prints the result class `^exit'. -> (gdb) <- -gdb-exit <- ^exit Please note that `^exit' is printed immediately, but it might take some time for GDB to actually exit. During that time, GDB performs necessary cleanups, including killing programs being debugged or disconnecting from debug hardware, so the frontend should wait till GDB exits and should only forcibly kill GDB if it fails to exit in reasonable time. A Bad Command ------------- Here's what happens if you pass a non-existent command: -> -rubbish <- ^error,msg="Undefined MI command: rubbish" <- (gdb)  File: gdb.info, Node: GDB/MI Command Description Format, Next: GDB/MI Breakpoint Commands, Prev: GDB/MI Simple Examples, Up: GDB/MI 27.7 GDB/MI Command Description Format ====================================== The remaining sections describe blocks of commands. Each block of commands is laid out in a fashion similar to this section. Motivation ---------- The motivation for this collection of commands. Introduction ------------ A brief introduction to this collection of commands as a whole. Commands -------- For each command in the block, the following is described: Synopsis ........ -command ARGS... Result ...... GDB Command ........... The corresponding GDB CLI command(s), if any. Example ....... Example(s) formatted for readability. Some of the described commands have not been implemented yet and these are labeled N.A. (not available).  File: gdb.info, Node: GDB/MI Breakpoint Commands, Next: GDB/MI Catchpoint Commands, Prev: GDB/MI Command Description Format, Up: GDB/MI 27.8 GDB/MI Breakpoint Commands =============================== This section documents GDB/MI commands for manipulating breakpoints. The `-break-after' Command -------------------------- Synopsis ........ -break-after NUMBER COUNT The breakpoint number NUMBER is not in effect until it has been hit COUNT times. To see how this is reflected in the output of the `-break-list' command, see the description of the `-break-list' command below. GDB Command ........... The corresponding GDB command is `ignore'. Example ....... (gdb) -break-insert main ^done,bkpt={number="1",type="breakpoint",disp="keep", enabled="y",addr="0x000100d0",func="main",file="hello.c", fullname="/home/foo/hello.c",line="5",thread-groups=["i1"], times="0"} (gdb) -break-after 1 3 ~ ^done (gdb) -break-list ^done,BreakpointTable={nr_rows="1",nr_cols="6", hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"}, {width="14",alignment="-1",col_name="type",colhdr="Type"}, {width="4",alignment="-1",col_name="disp",colhdr="Disp"}, {width="3",alignment="-1",col_name="enabled",colhdr="Enb"}, {width="10",alignment="-1",col_name="addr",colhdr="Address"}, {width="40",alignment="2",col_name="what",colhdr="What"}], body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y", addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c", line="5",thread-groups=["i1"],times="0",ignore="3"}]} (gdb) The `-break-commands' Command ----------------------------- Synopsis ........ -break-commands NUMBER [ COMMAND1 ... COMMANDN ] Specifies the CLI commands that should be executed when breakpoint NUMBER is hit. The parameters COMMAND1 to COMMANDN are the commands. If no command is specified, any previously-set commands are cleared. *Note Break Commands::. Typical use of this functionality is tracing a program, that is, printing of values of some variables whenever breakpoint is hit and then continuing. GDB Command ........... The corresponding GDB command is `commands'. Example ....... (gdb) -break-insert main ^done,bkpt={number="1",type="breakpoint",disp="keep", enabled="y",addr="0x000100d0",func="main",file="hello.c", fullname="/home/foo/hello.c",line="5",thread-groups=["i1"], times="0"} (gdb) -break-commands 1 "print v" "continue" ^done (gdb) The `-break-condition' Command ------------------------------ Synopsis ........ -break-condition NUMBER EXPR Breakpoint NUMBER will stop the program only if the condition in EXPR is true. The condition becomes part of the `-break-list' output (see the description of the `-break-list' command below). GDB Command ........... The corresponding GDB command is `condition'. Example ....... (gdb) -break-condition 1 1 ^done (gdb) -break-list ^done,BreakpointTable={nr_rows="1",nr_cols="6", hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"}, {width="14",alignment="-1",col_name="type",colhdr="Type"}, {width="4",alignment="-1",col_name="disp",colhdr="Disp"}, {width="3",alignment="-1",col_name="enabled",colhdr="Enb"}, {width="10",alignment="-1",col_name="addr",colhdr="Address"}, {width="40",alignment="2",col_name="what",colhdr="What"}], body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y", addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c", line="5",cond="1",thread-groups=["i1"],times="0",ignore="3"}]} (gdb) The `-break-delete' Command --------------------------- Synopsis ........ -break-delete ( BREAKPOINT )+ Delete the breakpoint(s) whose number(s) are specified in the argument list. This is obviously reflected in the breakpoint list. GDB Command ........... The corresponding GDB command is `delete'. Example ....... (gdb) -break-delete 1 ^done (gdb) -break-list ^done,BreakpointTable={nr_rows="0",nr_cols="6", hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"}, {width="14",alignment="-1",col_name="type",colhdr="Type"}, {width="4",alignment="-1",col_name="disp",colhdr="Disp"}, {width="3",alignment="-1",col_name="enabled",colhdr="Enb"}, {width="10",alignment="-1",col_name="addr",colhdr="Address"}, {width="40",alignment="2",col_name="what",colhdr="What"}], body=[]} (gdb) The `-break-disable' Command ---------------------------- Synopsis ........ -break-disable ( BREAKPOINT )+ Disable the named BREAKPOINT(s). The field `enabled' in the break list is now set to `n' for the named BREAKPOINT(s). GDB Command ........... The corresponding GDB command is `disable'. Example ....... (gdb) -break-disable 2 ^done (gdb) -break-list ^done,BreakpointTable={nr_rows="1",nr_cols="6", hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"}, {width="14",alignment="-1",col_name="type",colhdr="Type"}, {width="4",alignment="-1",col_name="disp",colhdr="Disp"}, {width="3",alignment="-1",col_name="enabled",colhdr="Enb"}, {width="10",alignment="-1",col_name="addr",colhdr="Address"}, {width="40",alignment="2",col_name="what",colhdr="What"}], body=[bkpt={number="2",type="breakpoint",disp="keep",enabled="n", addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c", line="5",thread-groups=["i1"],times="0"}]} (gdb) The `-break-enable' Command --------------------------- Synopsis ........ -break-enable ( BREAKPOINT )+ Enable (previously disabled) BREAKPOINT(s). GDB Command ........... The corresponding GDB command is `enable'. Example ....... (gdb) -break-enable 2 ^done (gdb) -break-list ^done,BreakpointTable={nr_rows="1",nr_cols="6", hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"}, {width="14",alignment="-1",col_name="type",colhdr="Type"}, {width="4",alignment="-1",col_name="disp",colhdr="Disp"}, {width="3",alignment="-1",col_name="enabled",colhdr="Enb"}, {width="10",alignment="-1",col_name="addr",colhdr="Address"}, {width="40",alignment="2",col_name="what",colhdr="What"}], body=[bkpt={number="2",type="breakpoint",disp="keep",enabled="y", addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c", line="5",thread-groups=["i1"],times="0"}]} (gdb) The `-break-info' Command ------------------------- Synopsis ........ -break-info BREAKPOINT Get information about a single breakpoint. The result is a table of breakpoints. *Note GDB/MI Breakpoint Information::, for details on the format of each breakpoint in the table. GDB Command ........... The corresponding GDB command is `info break BREAKPOINT'. Example ....... N.A. The `-break-insert' Command --------------------------- Synopsis ........ -break-insert [ -t ] [ -h ] [ -f ] [ -d ] [ -a ] [ -c CONDITION ] [ -i IGNORE-COUNT ] [ -p THREAD-ID ] [ LOCATION ] If specified, LOCATION, can be one of: * function * filename:linenum * filename:function * *address The possible optional parameters of this command are: `-t' Insert a temporary breakpoint. `-h' Insert a hardware breakpoint. `-f' If LOCATION cannot be parsed (for example if it refers to unknown files or functions), create a pending breakpoint. Without this flag, GDB will report an error, and won't create a breakpoint, if LOCATION cannot be parsed. `-d' Create a disabled breakpoint. `-a' Create a tracepoint. *Note Tracepoints::. When this parameter is used together with `-h', a fast tracepoint is created. `-c CONDITION' Make the breakpoint conditional on CONDITION. `-i IGNORE-COUNT' Initialize the IGNORE-COUNT. `-p THREAD-ID' Restrict the breakpoint to the specified THREAD-ID. Result ...... *Note GDB/MI Breakpoint Information::, for details on the format of the resulting breakpoint. Note: this format is open to change. GDB Command ........... The corresponding GDB commands are `break', `tbreak', `hbreak', and `thbreak'. Example ....... (gdb) -break-insert main ^done,bkpt={number="1",addr="0x0001072c",file="recursive2.c", fullname="/home/foo/recursive2.c,line="4",thread-groups=["i1"], times="0"} (gdb) -break-insert -t foo ^done,bkpt={number="2",addr="0x00010774",file="recursive2.c", fullname="/home/foo/recursive2.c,line="11",thread-groups=["i1"], times="0"} (gdb) -break-list ^done,BreakpointTable={nr_rows="2",nr_cols="6", hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"}, {width="14",alignment="-1",col_name="type",colhdr="Type"}, {width="4",alignment="-1",col_name="disp",colhdr="Disp"}, {width="3",alignment="-1",col_name="enabled",colhdr="Enb"}, {width="10",alignment="-1",col_name="addr",colhdr="Address"}, {width="40",alignment="2",col_name="what",colhdr="What"}], body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y", addr="0x0001072c", func="main",file="recursive2.c", fullname="/home/foo/recursive2.c,"line="4",thread-groups=["i1"], times="0"}, bkpt={number="2",type="breakpoint",disp="del",enabled="y", addr="0x00010774",func="foo",file="recursive2.c", fullname="/home/foo/recursive2.c",line="11",thread-groups=["i1"], times="0"}]} (gdb) The `-break-list' Command ------------------------- Synopsis ........ -break-list Displays the list of inserted breakpoints, showing the following fields: `Number' number of the breakpoint `Type' type of the breakpoint: `breakpoint' or `watchpoint' `Disposition' should the breakpoint be deleted or disabled when it is hit: `keep' or `nokeep' `Enabled' is the breakpoint enabled or no: `y' or `n' `Address' memory location at which the breakpoint is set `What' logical location of the breakpoint, expressed by function name, file name, line number `Thread-groups' list of thread groups to which this breakpoint applies `Times' number of times the breakpoint has been hit If there are no breakpoints or watchpoints, the `BreakpointTable' `body' field is an empty list. GDB Command ........... The corresponding GDB command is `info break'. Example ....... (gdb) -break-list ^done,BreakpointTable={nr_rows="2",nr_cols="6", hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"}, {width="14",alignment="-1",col_name="type",colhdr="Type"}, {width="4",alignment="-1",col_name="disp",colhdr="Disp"}, {width="3",alignment="-1",col_name="enabled",colhdr="Enb"}, {width="10",alignment="-1",col_name="addr",colhdr="Address"}, {width="40",alignment="2",col_name="what",colhdr="What"}], body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y", addr="0x000100d0",func="main",file="hello.c",line="5",thread-groups=["i1"], times="0"}, bkpt={number="2",type="breakpoint",disp="keep",enabled="y", addr="0x00010114",func="foo",file="hello.c",fullname="/home/foo/hello.c", line="13",thread-groups=["i1"],times="0"}]} (gdb) Here's an example of the result when there are no breakpoints: (gdb) -break-list ^done,BreakpointTable={nr_rows="0",nr_cols="6", hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"}, {width="14",alignment="-1",col_name="type",colhdr="Type"}, {width="4",alignment="-1",col_name="disp",colhdr="Disp"}, {width="3",alignment="-1",col_name="enabled",colhdr="Enb"}, {width="10",alignment="-1",col_name="addr",colhdr="Address"}, {width="40",alignment="2",col_name="what",colhdr="What"}], body=[]} (gdb) The `-break-passcount' Command ------------------------------ Synopsis ........ -break-passcount TRACEPOINT-NUMBER PASSCOUNT Set the passcount for tracepoint TRACEPOINT-NUMBER to PASSCOUNT. If the breakpoint referred to by TRACEPOINT-NUMBER is not a tracepoint, error is emitted. This corresponds to CLI command `passcount'. The `-break-watch' Command -------------------------- Synopsis ........ -break-watch [ -a | -r ] Create a watchpoint. With the `-a' option it will create an "access" watchpoint, i.e., a watchpoint that triggers either on a read from or on a write to the memory location. With the `-r' option, the watchpoint created is a "read" watchpoint, i.e., it will trigger only when the memory location is accessed for reading. Without either of the options, the watchpoint created is a regular watchpoint, i.e., it will trigger when the memory location is accessed for writing. *Note Setting Watchpoints: Set Watchpoints. Note that `-break-list' will report a single list of watchpoints and breakpoints inserted. GDB Command ........... The corresponding GDB commands are `watch', `awatch', and `rwatch'. Example ....... Setting a watchpoint on a variable in the `main' function: (gdb) -break-watch x ^done,wpt={number="2",exp="x"} (gdb) -exec-continue ^running (gdb) *stopped,reason="watchpoint-trigger",wpt={number="2",exp="x"}, value={old="-268439212",new="55"}, frame={func="main",args=[],file="recursive2.c", fullname="/home/foo/bar/recursive2.c",line="5"} (gdb) Setting a watchpoint on a variable local to a function. GDB will stop the program execution twice: first for the variable changing value, then for the watchpoint going out of scope. (gdb) -break-watch C ^done,wpt={number="5",exp="C"} (gdb) -exec-continue ^running (gdb) *stopped,reason="watchpoint-trigger", wpt={number="5",exp="C"},value={old="-276895068",new="3"}, frame={func="callee4",args=[], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="13"} (gdb) -exec-continue ^running (gdb) *stopped,reason="watchpoint-scope",wpnum="5", frame={func="callee3",args=[{name="strarg", value="0x11940 \"A string argument.\""}], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="18"} (gdb) Listing breakpoints and watchpoints, at different points in the program execution. Note that once the watchpoint goes out of scope, it is deleted. (gdb) -break-watch C ^done,wpt={number="2",exp="C"} (gdb) -break-list ^done,BreakpointTable={nr_rows="2",nr_cols="6", hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"}, {width="14",alignment="-1",col_name="type",colhdr="Type"}, {width="4",alignment="-1",col_name="disp",colhdr="Disp"}, {width="3",alignment="-1",col_name="enabled",colhdr="Enb"}, {width="10",alignment="-1",col_name="addr",colhdr="Address"}, {width="40",alignment="2",col_name="what",colhdr="What"}], body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y", addr="0x00010734",func="callee4", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/devo/gdb/testsuite/gdb.mi/basics.c"line="8",thread-groups=["i1"], times="1"}, bkpt={number="2",type="watchpoint",disp="keep", enabled="y",addr="",what="C",thread-groups=["i1"],times="0"}]} (gdb) -exec-continue ^running (gdb) *stopped,reason="watchpoint-trigger",wpt={number="2",exp="C"}, value={old="-276895068",new="3"}, frame={func="callee4",args=[], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="13"} (gdb) -break-list ^done,BreakpointTable={nr_rows="2",nr_cols="6", hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"}, {width="14",alignment="-1",col_name="type",colhdr="Type"}, {width="4",alignment="-1",col_name="disp",colhdr="Disp"}, {width="3",alignment="-1",col_name="enabled",colhdr="Enb"}, {width="10",alignment="-1",col_name="addr",colhdr="Address"}, {width="40",alignment="2",col_name="what",colhdr="What"}], body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y", addr="0x00010734",func="callee4", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/devo/gdb/testsuite/gdb.mi/basics.c",line="8",thread-groups=["i1"], times="1"}, bkpt={number="2",type="watchpoint",disp="keep", enabled="y",addr="",what="C",thread-groups=["i1"],times="-5"}]} (gdb) -exec-continue ^running ^done,reason="watchpoint-scope",wpnum="2", frame={func="callee3",args=[{name="strarg", value="0x11940 \"A string argument.\""}], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="18"} (gdb) -break-list ^done,BreakpointTable={nr_rows="1",nr_cols="6", hdr=[{width="3",alignment="-1",col_name="number",colhdr="Num"}, {width="14",alignment="-1",col_name="type",colhdr="Type"}, {width="4",alignment="-1",col_name="disp",colhdr="Disp"}, {width="3",alignment="-1",col_name="enabled",colhdr="Enb"}, {width="10",alignment="-1",col_name="addr",colhdr="Address"}, {width="40",alignment="2",col_name="what",colhdr="What"}], body=[bkpt={number="1",type="breakpoint",disp="keep",enabled="y", addr="0x00010734",func="callee4", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/devo/gdb/testsuite/gdb.mi/basics.c",line="8", thread-groups=["i1"],times="1"}]} (gdb)  File: gdb.info, Node: GDB/MI Catchpoint Commands, Next: GDB/MI Program Context, Prev: GDB/MI Breakpoint Commands, Up: GDB/MI 27.9 GDB/MI Catchpoint Commands =============================== This section documents GDB/MI commands for manipulating catchpoints. The `-catch-load' Command ------------------------- Synopsis ........ -catch-load [ -t ] [ -d ] REGEXP Add a catchpoint for library load events. If the `-t' option is used, the catchpoint is a temporary one (*note Setting Breakpoints: Set Breaks.). If the `-d' option is used, the catchpoint is created in a disabled state. The `regexp' argument is a regular expression used to match the name of the loaded library. GDB Command ........... The corresponding GDB command is `catch load'. Example ....... -catch-load -t foo.so ^done,bkpt={number="1",type="catchpoint",disp="del",enabled="y", what="load of library matching foo.so",catch-type="load",times="0"} (gdb) The `-catch-unload' Command --------------------------- Synopsis ........ -catch-unload [ -t ] [ -d ] REGEXP Add a catchpoint for library unload events. If the `-t' option is used, the catchpoint is a temporary one (*note Setting Breakpoints: Set Breaks.). If the `-d' option is used, the catchpoint is created in a disabled state. The `regexp' argument is a regular expression used to match the name of the unloaded library. GDB Command ........... The corresponding GDB command is `catch unload'. Example ....... -catch-unload -d bar.so ^done,bkpt={number="2",type="catchpoint",disp="keep",enabled="n", what="load of library matching bar.so",catch-type="unload",times="0"} (gdb)  File: gdb.info, Node: GDB/MI Program Context, Next: GDB/MI Thread Commands, Prev: GDB/MI Catchpoint Commands, Up: GDB/MI 27.10 GDB/MI Program Context ============================= The `-exec-arguments' Command ----------------------------- Synopsis ........ -exec-arguments ARGS Set the inferior program arguments, to be used in the next `-exec-run'. GDB Command ........... The corresponding GDB command is `set args'. Example ....... (gdb) -exec-arguments -v word ^done (gdb) The `-environment-cd' Command ----------------------------- Synopsis ........ -environment-cd PATHDIR Set GDB's working directory. GDB Command ........... The corresponding GDB command is `cd'. Example ....... (gdb) -environment-cd /kwikemart/marge/ezannoni/flathead-dev/devo/gdb ^done (gdb) The `-environment-directory' Command ------------------------------------ Synopsis ........ -environment-directory [ -r ] [ PATHDIR ]+ Add directories PATHDIR to beginning of search path for source files. If the `-r' option is used, the search path is reset to the default search path. If directories PATHDIR are supplied in addition to the `-r' option, the search path is first reset and then addition occurs as normal. Multiple directories may be specified, separated by blanks. Specifying multiple directories in a single command results in the directories added to the beginning of the search path in the same order they were presented in the command. If blanks are needed as part of a directory name, double-quotes should be used around the name. In the command output, the path will show up separated by the system directory-separator character. The directory-separator character must not be used in any directory name. If no directories are specified, the current search path is displayed. GDB Command ........... The corresponding GDB command is `dir'. Example ....... (gdb) -environment-directory /kwikemart/marge/ezannoni/flathead-dev/devo/gdb ^done,source-path="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb:$cdir:$cwd" (gdb) -environment-directory "" ^done,source-path="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb:$cdir:$cwd" (gdb) -environment-directory -r /home/jjohnstn/src/gdb /usr/src ^done,source-path="/home/jjohnstn/src/gdb:/usr/src:$cdir:$cwd" (gdb) -environment-directory -r ^done,source-path="$cdir:$cwd" (gdb) The `-environment-path' Command ------------------------------- Synopsis ........ -environment-path [ -r ] [ PATHDIR ]+ Add directories PATHDIR to beginning of search path for object files. If the `-r' option is used, the search path is reset to the original search path that existed at gdb start-up. If directories PATHDIR are supplied in addition to the `-r' option, the search path is first reset and then addition occurs as normal. Multiple directories may be specified, separated by blanks. Specifying multiple directories in a single command results in the directories added to the beginning of the search path in the same order they were presented in the command. If blanks are needed as part of a directory name, double-quotes should be used around the name. In the command output, the path will show up separated by the system directory-separator character. The directory-separator character must not be used in any directory name. If no directories are specified, the current path is displayed. GDB Command ........... The corresponding GDB command is `path'. Example ....... (gdb) -environment-path ^done,path="/usr/bin" (gdb) -environment-path /kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb /bin ^done,path="/kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb:/bin:/usr/bin" (gdb) -environment-path -r /usr/local/bin ^done,path="/usr/local/bin:/usr/bin" (gdb) The `-environment-pwd' Command ------------------------------ Synopsis ........ -environment-pwd Show the current working directory. GDB Command ........... The corresponding GDB command is `pwd'. Example ....... (gdb) -environment-pwd ^done,cwd="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb" (gdb)  File: gdb.info, Node: GDB/MI Thread Commands, Next: GDB/MI Ada Tasking Commands, Prev: GDB/MI Program Context, Up: GDB/MI 27.11 GDB/MI Thread Commands ============================ The `-thread-info' Command -------------------------- Synopsis ........ -thread-info [ THREAD-ID ] Reports information about either a specific thread, if the THREAD-ID parameter is present, or about all threads. When printing information about all threads, also reports the current thread. GDB Command ........... The `info thread' command prints the same information about all threads. Result ...... The result is a list of threads. The following attributes are defined for a given thread: `current' This field exists only for the current thread. It has the value `*'. `id' The identifier that GDB uses to refer to the thread. `target-id' The identifier that the target uses to refer to the thread. `details' Extra information about the thread, in a target-specific format. This field is optional. `name' The name of the thread. If the user specified a name using the `thread name' command, then this name is given. Otherwise, if GDB can extract the thread name from the target, then that name is given. If GDB cannot find the thread name, then this field is omitted. `frame' The stack frame currently executing in the thread. `state' The thread's state. The `state' field may have the following values: `stopped' The thread is stopped. Frame information is available for stopped threads. `running' The thread is running. There's no frame information for running threads. `core' If GDB can find the CPU core on which this thread is running, then this field is the core identifier. This field is optional. Example ....... -thread-info ^done,threads=[ {id="2",target-id="Thread 0xb7e14b90 (LWP 21257)", frame={level="0",addr="0xffffe410",func="__kernel_vsyscall", args=[]},state="running"}, {id="1",target-id="Thread 0xb7e156b0 (LWP 21254)", frame={level="0",addr="0x0804891f",func="foo", args=[{name="i",value="10"}], file="/tmp/a.c",fullname="/tmp/a.c",line="158"}, state="running"}], current-thread-id="1" (gdb) The `-thread-list-ids' Command ------------------------------ Synopsis ........ -thread-list-ids Produces a list of the currently known GDB thread ids. At the end of the list it also prints the total number of such threads. This command is retained for historical reasons, the `-thread-info' command should be used instead. GDB Command ........... Part of `info threads' supplies the same information. Example ....... (gdb) -thread-list-ids ^done,thread-ids={thread-id="3",thread-id="2",thread-id="1"}, current-thread-id="1",number-of-threads="3" (gdb) The `-thread-select' Command ---------------------------- Synopsis ........ -thread-select THREADNUM Make THREADNUM the current thread. It prints the number of the new current thread, and the topmost frame for that thread. This command is deprecated in favor of explicitly using the `--thread' option to each command. GDB Command ........... The corresponding GDB command is `thread'. Example ....... (gdb) -exec-next ^running (gdb) *stopped,reason="end-stepping-range",thread-id="2",line="187", file="../../../devo/gdb/testsuite/gdb.threads/linux-dp.c" (gdb) -thread-list-ids ^done, thread-ids={thread-id="3",thread-id="2",thread-id="1"}, number-of-threads="3" (gdb) -thread-select 3 ^done,new-thread-id="3", frame={level="0",func="vprintf", args=[{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""}, {name="arg",value="0x2"}],file="vprintf.c",line="31"} (gdb)  File: gdb.info, Node: GDB/MI Ada Tasking Commands, Next: GDB/MI Program Execution, Prev: GDB/MI Thread Commands, Up: GDB/MI 27.12 GDB/MI Ada Tasking Commands ================================= The `-ada-task-info' Command ---------------------------- Synopsis ........ -ada-task-info [ TASK-ID ] Reports information about either a specific Ada task, if the TASK-ID parameter is present, or about all Ada tasks. GDB Command ........... The `info tasks' command prints the same information about all Ada tasks (*note Ada Tasks::). Result ...... The result is a table of Ada tasks. The following columns are defined for each Ada task: `current' This field exists only for the current thread. It has the value `*'. `id' The identifier that GDB uses to refer to the Ada task. `task-id' The identifier that the target uses to refer to the Ada task. `thread-id' The identifier of the thread corresponding to the Ada task. This field should always exist, as Ada tasks are always implemented on top of a thread. But if GDB cannot find this corresponding thread for any reason, the field is omitted. `parent-id' This field exists only when the task was created by another task. In this case, it provides the ID of the parent task. `priority' The base priority of the task. `state' The current state of the task. For a detailed description of the possible states, see *note Ada Tasks::. `name' The name of the task. Example ....... -ada-task-info ^done,tasks={nr_rows="3",nr_cols="8", hdr=[{width="1",alignment="-1",col_name="current",colhdr=""}, {width="3",alignment="1",col_name="id",colhdr="ID"}, {width="9",alignment="1",col_name="task-id",colhdr="TID"}, {width="4",alignment="1",col_name="thread-id",colhdr=""}, {width="4",alignment="1",col_name="parent-id",colhdr="P-ID"}, {width="3",alignment="1",col_name="priority",colhdr="Pri"}, {width="22",alignment="-1",col_name="state",colhdr="State"}, {width="1",alignment="2",col_name="name",colhdr="Name"}], body=[{current="*",id="1",task-id=" 644010",thread-id="1",priority="48", state="Child Termination Wait",name="main_task"}]} (gdb)  File: gdb.info, Node: GDB/MI Program Execution, Next: GDB/MI Stack Manipulation, Prev: GDB/MI Ada Tasking Commands, Up: GDB/MI 27.13 GDB/MI Program Execution ============================== These are the asynchronous commands which generate the out-of-band record `*stopped'. Currently GDB only really executes asynchronously with remote targets and this interaction is mimicked in other cases. The `-exec-continue' Command ---------------------------- Synopsis ........ -exec-continue [--reverse] [--all|--thread-group N] Resumes the execution of the inferior program, which will continue to execute until it reaches a debugger stop event. If the `--reverse' option is specified, execution resumes in reverse until it reaches a stop event. Stop events may include * breakpoints or watchpoints * signals or exceptions * the end of the process (or its beginning under `--reverse') * the end or beginning of a replay log if one is being used. In all-stop mode (*note All-Stop Mode::), may resume only one thread, or all threads, depending on the value of the `scheduler-locking' variable. If `--all' is specified, all threads (in all inferiors) will be resumed. The `--all' option is ignored in all-stop mode. If the `--thread-group' options is specified, then all threads in that thread group are resumed. GDB Command ........... The corresponding GDB corresponding is `continue'. Example ....... -exec-continue ^running (gdb) @Hello world *stopped,reason="breakpoint-hit",disp="keep",bkptno="2",frame={ func="foo",args=[],file="hello.c",fullname="/home/foo/bar/hello.c", line="13"} (gdb) The `-exec-finish' Command -------------------------- Synopsis ........ -exec-finish [--reverse] Resumes the execution of the inferior program until the current function is exited. Displays the results returned by the function. If the `--reverse' option is specified, resumes the reverse execution of the inferior program until the point where current function was called. GDB Command ........... The corresponding GDB command is `finish'. Example ....... Function returning `void'. -exec-finish ^running (gdb) @hello from foo *stopped,reason="function-finished",frame={func="main",args=[], file="hello.c",fullname="/home/foo/bar/hello.c",line="7"} (gdb) Function returning other than `void'. The name of the internal GDB variable storing the result is printed, together with the value itself. -exec-finish ^running (gdb) *stopped,reason="function-finished",frame={addr="0x000107b0",func="foo", args=[{name="a",value="1"],{name="b",value="9"}}, file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"}, gdb-result-var="$1",return-value="0" (gdb) The `-exec-interrupt' Command ----------------------------- Synopsis ........ -exec-interrupt [--all|--thread-group N] Interrupts the background execution of the target. Note how the token associated with the stop message is the one for the execution command that has been interrupted. The token for the interrupt itself only appears in the `^done' output. If the user is trying to interrupt a non-running program, an error message will be printed. Note that when asynchronous execution is enabled, this command is asynchronous just like other execution commands. That is, first the `^done' response will be printed, and the target stop will be reported after that using the `*stopped' notification. In non-stop mode, only the context thread is interrupted by default. All threads (in all inferiors) will be interrupted if the `--all' option is specified. If the `--thread-group' option is specified, all threads in that group will be interrupted. GDB Command ........... The corresponding GDB command is `interrupt'. Example ....... (gdb) 111-exec-continue 111^running (gdb) 222-exec-interrupt 222^done (gdb) 111*stopped,signal-name="SIGINT",signal-meaning="Interrupt", frame={addr="0x00010140",func="foo",args=[],file="try.c", fullname="/home/foo/bar/try.c",line="13"} (gdb) (gdb) -exec-interrupt ^error,msg="mi_cmd_exec_interrupt: Inferior not executing." (gdb) The `-exec-jump' Command ------------------------ Synopsis ........ -exec-jump LOCATION Resumes execution of the inferior program at the location specified by parameter. *Note Specify Location::, for a description of the different forms of LOCATION. GDB Command ........... The corresponding GDB command is `jump'. Example ....... -exec-jump foo.c:10 *running,thread-id="all" ^running The `-exec-next' Command ------------------------ Synopsis ........ -exec-next [--reverse] Resumes execution of the inferior program, stopping when the beginning of the next source line is reached. If the `--reverse' option is specified, resumes reverse execution of the inferior program, stopping at the beginning of the previous source line. If you issue this command on the first line of a function, it will take you back to the caller of that function, to the source line where the function was called. GDB Command ........... The corresponding GDB command is `next'. Example ....... -exec-next ^running (gdb) *stopped,reason="end-stepping-range",line="8",file="hello.c" (gdb) The `-exec-next-instruction' Command ------------------------------------ Synopsis ........ -exec-next-instruction [--reverse] Executes one machine instruction. If the instruction is a function call, continues until the function returns. If the program stops at an instruction in the middle of a source line, the address will be printed as well. If the `--reverse' option is specified, resumes reverse execution of the inferior program, stopping at the previous instruction. If the previously executed instruction was a return from another function, it will continue to execute in reverse until the call to that function (from the current stack frame) is reached. GDB Command ........... The corresponding GDB command is `nexti'. Example ....... (gdb) -exec-next-instruction ^running (gdb) *stopped,reason="end-stepping-range", addr="0x000100d4",line="5",file="hello.c" (gdb) The `-exec-return' Command -------------------------- Synopsis ........ -exec-return Makes current function return immediately. Doesn't execute the inferior. Displays the new current frame. GDB Command ........... The corresponding GDB command is `return'. Example ....... (gdb) 200-break-insert callee4 200^done,bkpt={number="1",addr="0x00010734", file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"} (gdb) 000-exec-run 000^running (gdb) 000*stopped,reason="breakpoint-hit",disp="keep",bkptno="1", frame={func="callee4",args=[], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="8"} (gdb) 205-break-delete 205^done (gdb) 111-exec-return 111^done,frame={level="0",func="callee3", args=[{name="strarg", value="0x11940 \"A string argument.\""}], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="18"} (gdb) The `-exec-run' Command ----------------------- Synopsis ........ -exec-run [--all | --thread-group N] Starts execution of the inferior from the beginning. The inferior executes until either a breakpoint is encountered or the program exits. In the latter case the output will include an exit code, if the program has exited exceptionally. When no option is specified, the current inferior is started. If the `--thread-group' option is specified, it should refer to a thread group of type `process', and that thread group will be started. If the `--all' option is specified, then all inferiors will be started. GDB Command ........... The corresponding GDB command is `run'. Examples ........ (gdb) -break-insert main ^done,bkpt={number="1",addr="0x0001072c",file="recursive2.c",line="4"} (gdb) -exec-run ^running (gdb) *stopped,reason="breakpoint-hit",disp="keep",bkptno="1", frame={func="main",args=[],file="recursive2.c", fullname="/home/foo/bar/recursive2.c",line="4"} (gdb) Program exited normally: (gdb) -exec-run ^running (gdb) x = 55 *stopped,reason="exited-normally" (gdb) Program exited exceptionally: (gdb) -exec-run ^running (gdb) x = 55 *stopped,reason="exited",exit-code="01" (gdb) Another way the program can terminate is if it receives a signal such as `SIGINT'. In this case, GDB/MI displays this: (gdb) *stopped,reason="exited-signalled",signal-name="SIGINT", signal-meaning="Interrupt" The `-exec-step' Command ------------------------ Synopsis ........ -exec-step [--reverse] Resumes execution of the inferior program, stopping when the beginning of the next source line is reached, if the next source line is not a function call. If it is, stop at the first instruction of the called function. If the `--reverse' option is specified, resumes reverse execution of the inferior program, stopping at the beginning of the previously executed source line. GDB Command ........... The corresponding GDB command is `step'. Example ....... Stepping into a function: -exec-step ^running (gdb) *stopped,reason="end-stepping-range", frame={func="foo",args=[{name="a",value="10"}, {name="b",value="0"}],file="recursive2.c", fullname="/home/foo/bar/recursive2.c",line="11"} (gdb) Regular stepping: -exec-step ^running (gdb) *stopped,reason="end-stepping-range",line="14",file="recursive2.c" (gdb) The `-exec-step-instruction' Command ------------------------------------ Synopsis ........ -exec-step-instruction [--reverse] Resumes the inferior which executes one machine instruction. If the `--reverse' option is specified, resumes reverse execution of the inferior program, stopping at the previously executed instruction. The output, once GDB has stopped, will vary depending on whether we have stopped in the middle of a source line or not. In the former case, the address at which the program stopped will be printed as well. GDB Command ........... The corresponding GDB command is `stepi'. Example ....... (gdb) -exec-step-instruction ^running (gdb) *stopped,reason="end-stepping-range", frame={func="foo",args=[],file="try.c", fullname="/home/foo/bar/try.c",line="10"} (gdb) -exec-step-instruction ^running (gdb) *stopped,reason="end-stepping-range", frame={addr="0x000100f4",func="foo",args=[],file="try.c", fullname="/home/foo/bar/try.c",line="10"} (gdb) The `-exec-until' Command ------------------------- Synopsis ........ -exec-until [ LOCATION ] Executes the inferior until the LOCATION specified in the argument is reached. If there is no argument, the inferior executes until a source line greater than the current one is reached. The reason for stopping in this case will be `location-reached'. GDB Command ........... The corresponding GDB command is `until'. Example ....... (gdb) -exec-until recursive2.c:6 ^running (gdb) x = 55 *stopped,reason="location-reached",frame={func="main",args=[], file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="6"} (gdb)  File: gdb.info, Node: GDB/MI Stack Manipulation, Next: GDB/MI Variable Objects, Prev: GDB/MI Program Execution, Up: GDB/MI 27.14 GDB/MI Stack Manipulation Commands ======================================== The `-stack-info-frame' Command ------------------------------- Synopsis ........ -stack-info-frame Get info on the selected frame. GDB Command ........... The corresponding GDB command is `info frame' or `frame' (without arguments). Example ....... (gdb) -stack-info-frame ^done,frame={level="1",addr="0x0001076c",func="callee3", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="17"} (gdb) The `-stack-info-depth' Command ------------------------------- Synopsis ........ -stack-info-depth [ MAX-DEPTH ] Return the depth of the stack. If the integer argument MAX-DEPTH is specified, do not count beyond MAX-DEPTH frames. GDB Command ........... There's no equivalent GDB command. Example ....... For a stack with frame levels 0 through 11: (gdb) -stack-info-depth ^done,depth="12" (gdb) -stack-info-depth 4 ^done,depth="4" (gdb) -stack-info-depth 12 ^done,depth="12" (gdb) -stack-info-depth 11 ^done,depth="11" (gdb) -stack-info-depth 13 ^done,depth="12" (gdb) The `-stack-list-arguments' Command ----------------------------------- Synopsis ........ -stack-list-arguments PRINT-VALUES [ LOW-FRAME HIGH-FRAME ] Display a list of the arguments for the frames between LOW-FRAME and HIGH-FRAME (inclusive). If LOW-FRAME and HIGH-FRAME are not provided, list the arguments for the whole call stack. If the two arguments are equal, show the single frame at the corresponding level. It is an error if LOW-FRAME is larger than the actual number of frames. On the other hand, HIGH-FRAME may be larger than the actual number of frames, in which case only existing frames will be returned. If PRINT-VALUES is 0 or `--no-values', print only the names of the variables; if it is 1 or `--all-values', print also their values; and if it is 2 or `--simple-values', print the name, type and value for simple data types, and the name and type for arrays, structures and unions. Use of this command to obtain arguments in a single frame is deprecated in favor of the `-stack-list-variables' command. GDB Command ........... GDB does not have an equivalent command. `gdbtk' has a `gdb_get_args' command which partially overlaps with the functionality of `-stack-list-arguments'. Example ....... (gdb) -stack-list-frames ^done, stack=[ frame={level="0",addr="0x00010734",func="callee4", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="8"}, frame={level="1",addr="0x0001076c",func="callee3", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="17"}, frame={level="2",addr="0x0001078c",func="callee2", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="22"}, frame={level="3",addr="0x000107b4",func="callee1", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="27"}, frame={level="4",addr="0x000107e0",func="main", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="32"}] (gdb) -stack-list-arguments 0 ^done, stack-args=[ frame={level="0",args=[]}, frame={level="1",args=[name="strarg"]}, frame={level="2",args=[name="intarg",name="strarg"]}, frame={level="3",args=[name="intarg",name="strarg",name="fltarg"]}, frame={level="4",args=[]}] (gdb) -stack-list-arguments 1 ^done, stack-args=[ frame={level="0",args=[]}, frame={level="1", args=[{name="strarg",value="0x11940 \"A string argument.\""}]}, frame={level="2",args=[ {name="intarg",value="2"}, {name="strarg",value="0x11940 \"A string argument.\""}]}, {frame={level="3",args=[ {name="intarg",value="2"}, {name="strarg",value="0x11940 \"A string argument.\""}, {name="fltarg",value="3.5"}]}, frame={level="4",args=[]}] (gdb) -stack-list-arguments 0 2 2 ^done,stack-args=[frame={level="2",args=[name="intarg",name="strarg"]}] (gdb) -stack-list-arguments 1 2 2 ^done,stack-args=[frame={level="2", args=[{name="intarg",value="2"}, {name="strarg",value="0x11940 \"A string argument.\""}]}] (gdb) The `-stack-list-frames' Command -------------------------------- Synopsis ........ -stack-list-frames [ LOW-FRAME HIGH-FRAME ] List the frames currently on the stack. For each frame it displays the following info: `LEVEL' The frame number, 0 being the topmost frame, i.e., the innermost function. `ADDR' The `$pc' value for that frame. `FUNC' Function name. `FILE' File name of the source file where the function lives. `FULLNAME' The full file name of the source file where the function lives. `LINE' Line number corresponding to the `$pc'. `FROM' The shared library where this function is defined. This is only given if the frame's function is not known. If invoked without arguments, this command prints a backtrace for the whole stack. If given two integer arguments, it shows the frames whose levels are between the two arguments (inclusive). If the two arguments are equal, it shows the single frame at the corresponding level. It is an error if LOW-FRAME is larger than the actual number of frames. On the other hand, HIGH-FRAME may be larger than the actual number of frames, in which case only existing frames will be returned. GDB Command ........... The corresponding GDB commands are `backtrace' and `where'. Example ....... Full stack backtrace: (gdb) -stack-list-frames ^done,stack= [frame={level="0",addr="0x0001076c",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="11"}, frame={level="1",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"}, frame={level="2",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"}, frame={level="3",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"}, frame={level="4",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"}, frame={level="5",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"}, frame={level="6",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"}, frame={level="7",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"}, frame={level="8",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"}, frame={level="9",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"}, frame={level="10",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"}, frame={level="11",addr="0x00010738",func="main", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="4"}] (gdb) Show frames between LOW_FRAME and HIGH_FRAME: (gdb) -stack-list-frames 3 5 ^done,stack= [frame={level="3",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"}, frame={level="4",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"}, frame={level="5",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"}] (gdb) Show a single frame: (gdb) -stack-list-frames 3 3 ^done,stack= [frame={level="3",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"}] (gdb) The `-stack-list-locals' Command -------------------------------- Synopsis ........ -stack-list-locals PRINT-VALUES Display the local variable names for the selected frame. If PRINT-VALUES is 0 or `--no-values', print only the names of the variables; if it is 1 or `--all-values', print also their values; and if it is 2 or `--simple-values', print the name, type and value for simple data types, and the name and type for arrays, structures and unions. In this last case, a frontend can immediately display the value of simple data types and create variable objects for other data types when the user wishes to explore their values in more detail. This command is deprecated in favor of the `-stack-list-variables' command. GDB Command ........... `info locals' in GDB, `gdb_get_locals' in `gdbtk'. Example ....... (gdb) -stack-list-locals 0 ^done,locals=[name="A",name="B",name="C"] (gdb) -stack-list-locals --all-values ^done,locals=[{name="A",value="1"},{name="B",value="2"}, {name="C",value="{1, 2, 3}"}] -stack-list-locals --simple-values ^done,locals=[{name="A",type="int",value="1"}, {name="B",type="int",value="2"},{name="C",type="int [3]"}] (gdb) The `-stack-list-variables' Command ----------------------------------- Synopsis ........ -stack-list-variables PRINT-VALUES Display the names of local variables and function arguments for the selected frame. If PRINT-VALUES is 0 or `--no-values', print only the names of the variables; if it is 1 or `--all-values', print also their values; and if it is 2 or `--simple-values', print the name, type and value for simple data types, and the name and type for arrays, structures and unions. Example ....... (gdb) -stack-list-variables --thread 1 --frame 0 --all-values ^done,variables=[{name="x",value="11"},{name="s",value="{a = 1, b = 2}"}] (gdb) The `-stack-select-frame' Command --------------------------------- Synopsis ........ -stack-select-frame FRAMENUM Change the selected frame. Select a different frame FRAMENUM on the stack. This command in deprecated in favor of passing the `--frame' option to every command. GDB Command ........... The corresponding GDB commands are `frame', `up', `down', `select-frame', `up-silent', and `down-silent'. Example ....... (gdb) -stack-select-frame 2 ^done (gdb)  File: gdb.info, Node: GDB/MI Variable Objects, Next: GDB/MI Data Manipulation, Prev: GDB/MI Stack Manipulation, Up: GDB/MI 27.15 GDB/MI Variable Objects ============================= Introduction to Variable Objects -------------------------------- Variable objects are "object-oriented" MI interface for examining and changing values of expressions. Unlike some other MI interfaces that work with expressions, variable objects are specifically designed for simple and efficient presentation in the frontend. A variable object is identified by string name. When a variable object is created, the frontend specifies the expression for that variable object. The expression can be a simple variable, or it can be an arbitrary complex expression, and can even involve CPU registers. After creating a variable object, the frontend can invoke other variable object operations--for example to obtain or change the value of a variable object, or to change display format. Variable objects have hierarchical tree structure. Any variable object that corresponds to a composite type, such as structure in C, has a number of child variable objects, for example corresponding to each element of a structure. A child variable object can itself have children, recursively. Recursion ends when we reach leaf variable objects, which always have built-in types. Child variable objects are created only by explicit request, so if a frontend is not interested in the children of a particular variable object, no child will be created. For a leaf variable object it is possible to obtain its value as a string, or set the value from a string. String value can be also obtained for a non-leaf variable object, but it's generally a string that only indicates the type of the object, and does not list its contents. Assignment to a non-leaf variable object is not allowed. A frontend does not need to read the values of all variable objects each time the program stops. Instead, MI provides an update command that lists all variable objects whose values has changed since the last update operation. This considerably reduces the amount of data that must be transferred to the frontend. As noted above, children variable objects are created on demand, and only leaf variable objects have a real value. As result, gdb will read target memory only for leaf variables that frontend has created. The automatic update is not always desirable. For example, a frontend might want to keep a value of some expression for future reference, and never update it. For another example, fetching memory is relatively slow for embedded targets, so a frontend might want to disable automatic update for the variables that are either not visible on the screen, or "closed". This is possible using so called "frozen variable objects". Such variable objects are never implicitly updated. Variable objects can be either "fixed" or "floating". For the fixed variable object, the expression is parsed when the variable object is created, including associating identifiers to specific variables. The meaning of expression never changes. For a floating variable object the values of variables whose names appear in the expressions are re-evaluated every time in the context of the current frame. Consider this example: void do_work(...) { struct work_state state; if (...) do_work(...); } If a fixed variable object for the `state' variable is created in this function, and we enter the recursive call, the variable object will report the value of `state' in the top-level `do_work' invocation. On the other hand, a floating variable object will report the value of `state' in the current frame. If an expression specified when creating a fixed variable object refers to a local variable, the variable object becomes bound to the thread and frame in which the variable object is created. When such variable object is updated, GDB makes sure that the thread/frame combination the variable object is bound to still exists, and re-evaluates the variable object in context of that thread/frame. The following is the complete set of GDB/MI operations defined to access this functionality: *Operation* *Description* `-enable-pretty-printing' enable Python-based pretty-printing `-var-create' create a variable object `-var-delete' delete the variable object and/or its children `-var-set-format' set the display format of this variable `-var-show-format' show the display format of this variable `-var-info-num-children' tells how many children this object has `-var-list-children' return a list of the object's children `-var-info-type' show the type of this variable object `-var-info-expression' print parent-relative expression that this variable object represents `-var-info-path-expression' print full expression that this variable object represents `-var-show-attributes' is this variable editable? does it exist here? `-var-evaluate-expression' get the value of this variable `-var-assign' set the value of this variable `-var-update' update the variable and its children `-var-set-frozen' set frozeness attribute `-var-set-update-range' set range of children to display on update In the next subsection we describe each operation in detail and suggest how it can be used. Description And Use of Operations on Variable Objects ----------------------------------------------------- The `-enable-pretty-printing' Command ------------------------------------- -enable-pretty-printing GDB allows Python-based visualizers to affect the output of the MI variable object commands. However, because there was no way to implement this in a fully backward-compatible way, a front end must request that this functionality be enabled. Once enabled, this feature cannot be disabled. Note that if Python support has not been compiled into GDB, this command will still succeed (and do nothing). This feature is currently (as of GDB 7.0) experimental, and may work differently in future versions of GDB. The `-var-create' Command ------------------------- Synopsis ........ -var-create {NAME | "-"} {FRAME-ADDR | "*" | "@"} EXPRESSION This operation creates a variable object, which allows the monitoring of a variable, the result of an expression, a memory cell or a CPU register. The NAME parameter is the string by which the object can be referenced. It must be unique. If `-' is specified, the varobj system will generate a string "varNNNNNN" automatically. It will be unique provided that one does not specify NAME of that format. The command fails if a duplicate name is found. The frame under which the expression should be evaluated can be specified by FRAME-ADDR. A `*' indicates that the current frame should be used. A `@' indicates that a floating variable object must be created. EXPRESSION is any expression valid on the current language set (must not begin with a `*'), or one of the following: * `*ADDR', where ADDR is the address of a memory cell * `*ADDR-ADDR' -- a memory address range (TBD) * `$REGNAME' -- a CPU register name A varobj's contents may be provided by a Python-based pretty-printer. In this case the varobj is known as a "dynamic varobj". Dynamic varobjs have slightly different semantics in some cases. If the `-enable-pretty-printing' command is not sent, then GDB will never create a dynamic varobj. This ensures backward compatibility for existing clients. Result ...... This operation returns attributes of the newly-created varobj. These are: `name' The name of the varobj. `numchild' The number of children of the varobj. This number is not necessarily reliable for a dynamic varobj. Instead, you must examine the `has_more' attribute. `value' The varobj's scalar value. For a varobj whose type is some sort of aggregate (e.g., a `struct'), or for a dynamic varobj, this value will not be interesting. `type' The varobj's type. This is a string representation of the type, as would be printed by the GDB CLI. If `print object' (*note set print object: Print Settings.) is set to `on', the _actual_ (derived) type of the object is shown rather than the _declared_ one. `thread-id' If a variable object is bound to a specific thread, then this is the thread's identifier. `has_more' For a dynamic varobj, this indicates whether there appear to be any children available. For a non-dynamic varobj, this will be 0. `dynamic' This attribute will be present and have the value `1' if the varobj is a dynamic varobj. If the varobj is not a dynamic varobj, then this attribute will not be present. `displayhint' A dynamic varobj can supply a display hint to the front end. The value comes directly from the Python pretty-printer object's `display_hint' method. *Note Pretty Printing API::. Typical output will look like this: name="NAME",numchild="N",type="TYPE",thread-id="M", has_more="HAS_MORE" The `-var-delete' Command ------------------------- Synopsis ........ -var-delete [ -c ] NAME Deletes a previously created variable object and all of its children. With the `-c' option, just deletes the children. Returns an error if the object NAME is not found. The `-var-set-format' Command ----------------------------- Synopsis ........ -var-set-format NAME FORMAT-SPEC Sets the output format for the value of the object NAME to be FORMAT-SPEC. The syntax for the FORMAT-SPEC is as follows: FORMAT-SPEC ==> {binary | decimal | hexadecimal | octal | natural} The natural format is the default format choosen automatically based on the variable type (like decimal for an `int', hex for pointers, etc.). For a variable with children, the format is set only on the variable itself, and the children are not affected. The `-var-show-format' Command ------------------------------ Synopsis ........ -var-show-format NAME Returns the format used to display the value of the object NAME. FORMAT ==> FORMAT-SPEC The `-var-info-num-children' Command ------------------------------------ Synopsis ........ -var-info-num-children NAME Returns the number of children of a variable object NAME: numchild=N Note that this number is not completely reliable for a dynamic varobj. It will return the current number of children, but more children may be available. The `-var-list-children' Command -------------------------------- Synopsis ........ -var-list-children [PRINT-VALUES] NAME [FROM TO] Return a list of the children of the specified variable object and create variable objects for them, if they do not already exist. With a single argument or if PRINT-VALUES has a value of 0 or `--no-values', print only the names of the variables; if PRINT-VALUES is 1 or `--all-values', also print their values; and if it is 2 or `--simple-values' print the name and value for simple data types and just the name for arrays, structures and unions. FROM and TO, if specified, indicate the range of children to report. If FROM or TO is less than zero, the range is reset and all children will be reported. Otherwise, children starting at FROM (zero-based) and up to and excluding TO will be reported. If a child range is requested, it will only affect the current call to `-var-list-children', but not future calls to `-var-update'. For this, you must instead use `-var-set-update-range'. The intent of this approach is to enable a front end to implement any update approach it likes; for example, scrolling a view may cause the front end to request more children with `-var-list-children', and then the front end could call `-var-set-update-range' with a different range to ensure that future updates are restricted to just the visible items. For each child the following results are returned: NAME Name of the variable object created for this child. EXP The expression to be shown to the user by the front end to designate this child. For example this may be the name of a structure member. For a dynamic varobj, this value cannot be used to form an expression. There is no way to do this at all with a dynamic varobj. For C/C++ structures there are several pseudo children returned to designate access qualifiers. For these pseudo children EXP is `public', `private', or `protected'. In this case the type and value are not present. A dynamic varobj will not report the access qualifying pseudo-children, regardless of the language. This information is not available at all with a dynamic varobj. NUMCHILD Number of children this child has. For a dynamic varobj, this will be 0. TYPE The type of the child. If `print object' (*note set print object: Print Settings.) is set to `on', the _actual_ (derived) type of the object is shown rather than the _declared_ one. VALUE If values were requested, this is the value. THREAD-ID If this variable object is associated with a thread, this is the thread id. Otherwise this result is not present. FROZEN If the variable object is frozen, this variable will be present with a value of 1. The result may have its own attributes: `displayhint' A dynamic varobj can supply a display hint to the front end. The value comes directly from the Python pretty-printer object's `display_hint' method. *Note Pretty Printing API::. `has_more' This is an integer attribute which is nonzero if there are children remaining after the end of the selected range. Example ....... (gdb) -var-list-children n ^done,numchild=N,children=[child={name=NAME,exp=EXP, numchild=N,type=TYPE},(repeats N times)] (gdb) -var-list-children --all-values n ^done,numchild=N,children=[child={name=NAME,exp=EXP, numchild=N,value=VALUE,type=TYPE},(repeats N times)] The `-var-info-type' Command ---------------------------- Synopsis ........ -var-info-type NAME Returns the type of the specified variable NAME. The type is returned as a string in the same format as it is output by the GDB CLI: type=TYPENAME The `-var-info-expression' Command ---------------------------------- Synopsis ........ -var-info-expression NAME Returns a string that is suitable for presenting this variable object in user interface. The string is generally not valid expression in the current language, and cannot be evaluated. For example, if `a' is an array, and variable object `A' was created for `a', then we'll get this output: (gdb) -var-info-expression A.1 ^done,lang="C",exp="1" Here, the values of `lang' can be `{"C" | "C++" | "Java"}'. Note that the output of the `-var-list-children' command also includes those expressions, so the `-var-info-expression' command is of limited use. The `-var-info-path-expression' Command --------------------------------------- Synopsis ........ -var-info-path-expression NAME Returns an expression that can be evaluated in the current context and will yield the same value that a variable object has. Compare this with the `-var-info-expression' command, which result can be used only for UI presentation. Typical use of the `-var-info-path-expression' command is creating a watchpoint from a variable object. This command is currently not valid for children of a dynamic varobj, and will give an error when invoked on one. For example, suppose `C' is a C++ class, derived from class `Base', and that the `Base' class has a member called `m_size'. Assume a variable `c' is has the type of `C' and a variable object `C' was created for variable `c'. Then, we'll get this output: (gdb) -var-info-path-expression C.Base.public.m_size ^done,path_expr=((Base)c).m_size) The `-var-show-attributes' Command ---------------------------------- Synopsis ........ -var-show-attributes NAME List attributes of the specified variable object NAME: status=ATTR [ ( ,ATTR )* ] where ATTR is `{ { editable | noneditable } | TBD }'. The `-var-evaluate-expression' Command -------------------------------------- Synopsis ........ -var-evaluate-expression [-f FORMAT-SPEC] NAME Evaluates the expression that is represented by the specified variable object and returns its value as a string. The format of the string can be specified with the `-f' option. The possible values of this option are the same as for `-var-set-format' (*note -var-set-format::). If the `-f' option is not specified, the current display format will be used. The current display format can be changed using the `-var-set-format' command. value=VALUE Note that one must invoke `-var-list-children' for a variable before the value of a child variable can be evaluated. The `-var-assign' Command ------------------------- Synopsis ........ -var-assign NAME EXPRESSION Assigns the value of EXPRESSION to the variable object specified by NAME. The object must be `editable'. If the variable's value is altered by the assign, the variable will show up in any subsequent `-var-update' list. Example ....... (gdb) -var-assign var1 3 ^done,value="3" (gdb) -var-update * ^done,changelist=[{name="var1",in_scope="true",type_changed="false"}] (gdb) The `-var-update' Command ------------------------- Synopsis ........ -var-update [PRINT-VALUES] {NAME | "*"} Reevaluate the expressions corresponding to the variable object NAME and all its direct and indirect children, and return the list of variable objects whose values have changed; NAME must be a root variable object. Here, "changed" means that the result of `-var-evaluate-expression' before and after the `-var-update' is different. If `*' is used as the variable object names, all existing variable objects are updated, except for frozen ones (*note -var-set-frozen::). The option PRINT-VALUES determines whether both names and values, or just names are printed. The possible values of this option are the same as for `-var-list-children' (*note -var-list-children::). It is recommended to use the `--all-values' option, to reduce the number of MI commands needed on each program stop. With the `*' parameter, if a variable object is bound to a currently running thread, it will not be updated, without any diagnostic. If `-var-set-update-range' was previously used on a varobj, then only the selected range of children will be reported. `-var-update' reports all the changed varobjs in a tuple named `changelist'. Each item in the change list is itself a tuple holding: `name' The name of the varobj. `value' If values were requested for this update, then this field will be present and will hold the value of the varobj. `in_scope' This field is a string which may take one of three values: `"true"' The variable object's current value is valid. `"false"' The variable object does not currently hold a valid value but it may hold one in the future if its associated expression comes back into scope. `"invalid"' The variable object no longer holds a valid value. This can occur when the executable file being debugged has changed, either through recompilation or by using the GDB `file' command. The front end should normally choose to delete these variable objects. In the future new values may be added to this list so the front should be prepared for this possibility. *Note GDB/MI Development and Front Ends: GDB/MI Development and Front Ends. `type_changed' This is only present if the varobj is still valid. If the type changed, then this will be the string `true'; otherwise it will be `false'. When a varobj's type changes, its children are also likely to have become incorrect. Therefore, the varobj's children are automatically deleted when this attribute is `true'. Also, the varobj's update range, when set using the `-var-set-update-range' command, is unset. `new_type' If the varobj's type changed, then this field will be present and will hold the new type. `new_num_children' For a dynamic varobj, if the number of children changed, or if the type changed, this will be the new number of children. The `numchild' field in other varobj responses is generally not valid for a dynamic varobj - it will show the number of children that GDB knows about, but because dynamic varobjs lazily instantiate their children, this will not reflect the number of children which may be available. The `new_num_children' attribute only reports changes to the number of children known by GDB. This is the only way to detect whether an update has removed children (which necessarily can only happen at the end of the update range). `displayhint' The display hint, if any. `has_more' This is an integer value, which will be 1 if there are more children available outside the varobj's update range. `dynamic' This attribute will be present and have the value `1' if the varobj is a dynamic varobj. If the varobj is not a dynamic varobj, then this attribute will not be present. `new_children' If new children were added to a dynamic varobj within the selected update range (as set by `-var-set-update-range'), then they will be listed in this attribute. Example ....... (gdb) -var-assign var1 3 ^done,value="3" (gdb) -var-update --all-values var1 ^done,changelist=[{name="var1",value="3",in_scope="true", type_changed="false"}] (gdb) The `-var-set-frozen' Command ----------------------------- Synopsis ........ -var-set-frozen NAME FLAG Set the frozenness flag on the variable object NAME. The FLAG parameter should be either `1' to make the variable frozen or `0' to make it unfrozen. If a variable object is frozen, then neither itself, nor any of its children, are implicitly updated by `-var-update' of a parent variable or by `-var-update *'. Only `-var-update' of the variable itself will update its value and values of its children. After a variable object is unfrozen, it is implicitly updated by all subsequent `-var-update' operations. Unfreezing a variable does not update it, only subsequent `-var-update' does. Example ....... (gdb) -var-set-frozen V 1 ^done (gdb) The `-var-set-update-range' command ----------------------------------- Synopsis ........ -var-set-update-range NAME FROM TO Set the range of children to be returned by future invocations of `-var-update'. FROM and TO indicate the range of children to report. If FROM or TO is less than zero, the range is reset and all children will be reported. Otherwise, children starting at FROM (zero-based) and up to and excluding TO will be reported. Example ....... (gdb) -var-set-update-range V 1 2 ^done The `-var-set-visualizer' command --------------------------------- Synopsis ........ -var-set-visualizer NAME VISUALIZER Set a visualizer for the variable object NAME. VISUALIZER is the visualizer to use. The special value `None' means to disable any visualizer in use. If not `None', VISUALIZER must be a Python expression. This expression must evaluate to a callable object which accepts a single argument. GDB will call this object with the value of the varobj NAME as an argument (this is done so that the same Python pretty-printing code can be used for both the CLI and MI). When called, this object must return an object which conforms to the pretty-printing interface (*note Pretty Printing API::). The pre-defined function `gdb.default_visualizer' may be used to select a visualizer by following the built-in process (*note Selecting Pretty-Printers::). This is done automatically when a varobj is created, and so ordinarily is not needed. This feature is only available if Python support is enabled. The MI command `-list-features' (*note GDB/MI Miscellaneous Commands::) can be used to check this. Example ....... Resetting the visualizer: (gdb) -var-set-visualizer V None ^done Reselecting the default (type-based) visualizer: (gdb) -var-set-visualizer V gdb.default_visualizer ^done Suppose `SomeClass' is a visualizer class. A lambda expression can be used to instantiate this class for a varobj: (gdb) -var-set-visualizer V "lambda val: SomeClass()" ^done  File: gdb.info, Node: GDB/MI Data Manipulation, Next: GDB/MI Tracepoint Commands, Prev: GDB/MI Variable Objects, Up: GDB/MI 27.16 GDB/MI Data Manipulation ============================== This section describes the GDB/MI commands that manipulate data: examine memory and registers, evaluate expressions, etc. The `-data-disassemble' Command ------------------------------- Synopsis ........ -data-disassemble [ -s START-ADDR -e END-ADDR ] | [ -f FILENAME -l LINENUM [ -n LINES ] ] -- MODE Where: `START-ADDR' is the beginning address (or `$pc') `END-ADDR' is the end address `FILENAME' is the name of the file to disassemble `LINENUM' is the line number to disassemble around `LINES' is the number of disassembly lines to be produced. If it is -1, the whole function will be disassembled, in case no END-ADDR is specified. If END-ADDR is specified as a non-zero value, and LINES is lower than the number of disassembly lines between START-ADDR and END-ADDR, only LINES lines are displayed; if LINES is higher than the number of lines between START-ADDR and END-ADDR, only the lines up to END-ADDR are displayed. `MODE' is either 0 (meaning only disassembly), 1 (meaning mixed source and disassembly), 2 (meaning disassembly with raw opcodes), or 3 (meaning mixed source and disassembly with raw opcodes). Result ...... The result of the `-data-disassemble' command will be a list named `asm_insns', the contents of this list depend on the MODE used with the `-data-disassemble' command. For modes 0 and 2 the `asm_insns' list contains tuples with the following fields: `address' The address at which this instruction was disassembled. `func-name' The name of the function this instruction is within. `offset' The decimal offset in bytes from the start of `func-name'. `inst' The text disassembly for this `address'. `opcodes' This field is only present for mode 2. This contains the raw opcode bytes for the `inst' field. For modes 1 and 3 the `asm_insns' list contains tuples named `src_and_asm_line', each of which has the following fields: `line' The line number within `file'. `file' The file name from the compilation unit. This might be an absolute file name or a relative file name depending on the compile command used. `fullname' Absolute file name of `file'. It is converted to a canonical form using the source file search path (*note Specifying Source Directories: Source Path.) and after resolving all the symbolic links. If the source file is not found this field will contain the path as present in the debug information. `line_asm_insn' This is a list of tuples containing the disassembly for `line' in `file'. The fields of each tuple are the same as for `-data-disassemble' in MODE 0 and 2, so `address', `func-name', `offset', `inst', and optionally `opcodes'. Note that whatever included in the `inst' field, is not manipulated directly by GDB/MI, i.e., it is not possible to adjust its format. GDB Command ........... The corresponding GDB command is `disassemble'. Example ....... Disassemble from the current value of `$pc' to `$pc + 20': (gdb) -data-disassemble -s $pc -e "$pc + 20" -- 0 ^done, asm_insns=[ {address="0x000107c0",func-name="main",offset="4", inst="mov 2, %o0"}, {address="0x000107c4",func-name="main",offset="8", inst="sethi %hi(0x11800), %o2"}, {address="0x000107c8",func-name="main",offset="12", inst="or %o2, 0x140, %o1\t! 0x11940 <_lib_version+8>"}, {address="0x000107cc",func-name="main",offset="16", inst="sethi %hi(0x11800), %o2"}, {address="0x000107d0",func-name="main",offset="20", inst="or %o2, 0x168, %o4\t! 0x11968 <_lib_version+48>"}] (gdb) Disassemble the whole `main' function. Line 32 is part of `main'. -data-disassemble -f basics.c -l 32 -- 0 ^done,asm_insns=[ {address="0x000107bc",func-name="main",offset="0", inst="save %sp, -112, %sp"}, {address="0x000107c0",func-name="main",offset="4", inst="mov 2, %o0"}, {address="0x000107c4",func-name="main",offset="8", inst="sethi %hi(0x11800), %o2"}, [...] {address="0x0001081c",func-name="main",offset="96",inst="ret "}, {address="0x00010820",func-name="main",offset="100",inst="restore "}] (gdb) Disassemble 3 instructions from the start of `main': (gdb) -data-disassemble -f basics.c -l 32 -n 3 -- 0 ^done,asm_insns=[ {address="0x000107bc",func-name="main",offset="0", inst="save %sp, -112, %sp"}, {address="0x000107c0",func-name="main",offset="4", inst="mov 2, %o0"}, {address="0x000107c4",func-name="main",offset="8", inst="sethi %hi(0x11800), %o2"}] (gdb) Disassemble 3 instructions from the start of `main' in mixed mode: (gdb) -data-disassemble -f basics.c -l 32 -n 3 -- 1 ^done,asm_insns=[ src_and_asm_line={line="31", file="../../../src/gdb/testsuite/gdb.mi/basics.c", fullname="/absolute/path/to/src/gdb/testsuite/gdb.mi/basics.c", line_asm_insn=[{address="0x000107bc", func-name="main",offset="0",inst="save %sp, -112, %sp"}]}, src_and_asm_line={line="32", file="../../../src/gdb/testsuite/gdb.mi/basics.c", fullname="/absolute/path/to/src/gdb/testsuite/gdb.mi/basics.c", line_asm_insn=[{address="0x000107c0", func-name="main",offset="4",inst="mov 2, %o0"}, {address="0x000107c4",func-name="main",offset="8", inst="sethi %hi(0x11800), %o2"}]}] (gdb) The `-data-evaluate-expression' Command --------------------------------------- Synopsis ........ -data-evaluate-expression EXPR Evaluate EXPR as an expression. The expression could contain an inferior function call. The function call will execute synchronously. If the expression contains spaces, it must be enclosed in double quotes. GDB Command ........... The corresponding GDB commands are `print', `output', and `call'. In `gdbtk' only, there's a corresponding `gdb_eval' command. Example ....... In the following example, the numbers that precede the commands are the "tokens" described in *note GDB/MI Command Syntax: GDB/MI Command Syntax. Notice how GDB/MI returns the same tokens in its output. 211-data-evaluate-expression A 211^done,value="1" (gdb) 311-data-evaluate-expression &A 311^done,value="0xefffeb7c" (gdb) 411-data-evaluate-expression A+3 411^done,value="4" (gdb) 511-data-evaluate-expression "A + 3" 511^done,value="4" (gdb) The `-data-list-changed-registers' Command ------------------------------------------ Synopsis ........ -data-list-changed-registers Display a list of the registers that have changed. GDB Command ........... GDB doesn't have a direct analog for this command; `gdbtk' has the corresponding command `gdb_changed_register_list'. Example ....... On a PPC MBX board: (gdb) -exec-continue ^running (gdb) *stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={ func="main",args=[],file="try.c",fullname="/home/foo/bar/try.c", line="5"} (gdb) -data-list-changed-registers ^done,changed-registers=["0","1","2","4","5","6","7","8","9", "10","11","13","14","15","16","17","18","19","20","21","22","23", "24","25","26","27","28","30","31","64","65","66","67","69"] (gdb) The `-data-list-register-names' Command --------------------------------------- Synopsis ........ -data-list-register-names [ ( REGNO )+ ] Show a list of register names for the current target. If no arguments are given, it shows a list of the names of all the registers. If integer numbers are given as arguments, it will print a list of the names of the registers corresponding to the arguments. To ensure consistency between a register name and its number, the output list may include empty register names. GDB Command ........... GDB does not have a command which corresponds to `-data-list-register-names'. In `gdbtk' there is a corresponding command `gdb_regnames'. Example ....... For the PPC MBX board: (gdb) -data-list-register-names ^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7", "r8","r9","r10","r11","r12","r13","r14","r15","r16","r17","r18", "r19","r20","r21","r22","r23","r24","r25","r26","r27","r28","r29", "r30","r31","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9", "f10","f11","f12","f13","f14","f15","f16","f17","f18","f19","f20", "f21","f22","f23","f24","f25","f26","f27","f28","f29","f30","f31", "", "pc","ps","cr","lr","ctr","xer"] (gdb) -data-list-register-names 1 2 3 ^done,register-names=["r1","r2","r3"] (gdb) The `-data-list-register-values' Command ---------------------------------------- Synopsis ........ -data-list-register-values FMT [ ( REGNO )*] Display the registers' contents. FMT is the format according to which the registers' contents are to be returned, followed by an optional list of numbers specifying the registers to display. A missing list of numbers indicates that the contents of all the registers must be returned. Allowed formats for FMT are: `x' Hexadecimal `o' Octal `t' Binary `d' Decimal `r' Raw `N' Natural GDB Command ........... The corresponding GDB commands are `info reg', `info all-reg', and (in `gdbtk') `gdb_fetch_registers'. Example ....... For a PPC MBX board (note: line breaks are for readability only, they don't appear in the actual output): (gdb) -data-list-register-values r 64 65 ^done,register-values=[{number="64",value="0xfe00a300"}, {number="65",value="0x00029002"}] (gdb) -data-list-register-values x ^done,register-values=[{number="0",value="0xfe0043c8"}, {number="1",value="0x3fff88"},{number="2",value="0xfffffffe"}, {number="3",value="0x0"},{number="4",value="0xa"}, {number="5",value="0x3fff68"},{number="6",value="0x3fff58"}, {number="7",value="0xfe011e98"},{number="8",value="0x2"}, {number="9",value="0xfa202820"},{number="10",value="0xfa202808"}, {number="11",value="0x1"},{number="12",value="0x0"}, {number="13",value="0x4544"},{number="14",value="0xffdfffff"}, {number="15",value="0xffffffff"},{number="16",value="0xfffffeff"}, {number="17",value="0xefffffed"},{number="18",value="0xfffffffe"}, {number="19",value="0xffffffff"},{number="20",value="0xffffffff"}, {number="21",value="0xffffffff"},{number="22",value="0xfffffff7"}, {number="23",value="0xffffffff"},{number="24",value="0xffffffff"}, {number="25",value="0xffffffff"},{number="26",value="0xfffffffb"}, {number="27",value="0xffffffff"},{number="28",value="0xf7bfffff"}, {number="29",value="0x0"},{number="30",value="0xfe010000"}, {number="31",value="0x0"},{number="32",value="0x0"}, {number="33",value="0x0"},{number="34",value="0x0"}, {number="35",value="0x0"},{number="36",value="0x0"}, {number="37",value="0x0"},{number="38",value="0x0"}, {number="39",value="0x0"},{number="40",value="0x0"}, {number="41",value="0x0"},{number="42",value="0x0"}, {number="43",value="0x0"},{number="44",value="0x0"}, {number="45",value="0x0"},{number="46",value="0x0"}, {number="47",value="0x0"},{number="48",value="0x0"}, {number="49",value="0x0"},{number="50",value="0x0"}, {number="51",value="0x0"},{number="52",value="0x0"}, {number="53",value="0x0"},{number="54",value="0x0"}, {number="55",value="0x0"},{number="56",value="0x0"}, {number="57",value="0x0"},{number="58",value="0x0"}, {number="59",value="0x0"},{number="60",value="0x0"}, {number="61",value="0x0"},{number="62",value="0x0"}, {number="63",value="0x0"},{number="64",value="0xfe00a300"}, {number="65",value="0x29002"},{number="66",value="0x202f04b5"}, {number="67",value="0xfe0043b0"},{number="68",value="0xfe00b3e4"}, {number="69",value="0x20002b03"}] (gdb) The `-data-read-memory' Command ------------------------------- This command is deprecated, use `-data-read-memory-bytes' instead. Synopsis ........ -data-read-memory [ -o BYTE-OFFSET ] ADDRESS WORD-FORMAT WORD-SIZE NR-ROWS NR-COLS [ ASCHAR ] where: `ADDRESS' An expression specifying the address of the first memory word to be read. Complex expressions containing embedded white space should be quoted using the C convention. `WORD-FORMAT' The format to be used to print the memory words. The notation is the same as for GDB's `print' command (*note Output Formats: Output Formats.). `WORD-SIZE' The size of each memory word in bytes. `NR-ROWS' The number of rows in the output table. `NR-COLS' The number of columns in the output table. `ASCHAR' If present, indicates that each row should include an ASCII dump. The value of ASCHAR is used as a padding character when a byte is not a member of the printable ASCII character set (printable ASCII characters are those whose code is between 32 and 126, inclusively). `BYTE-OFFSET' An offset to add to the ADDRESS before fetching memory. This command displays memory contents as a table of NR-ROWS by NR-COLS words, each word being WORD-SIZE bytes. In total, `NR-ROWS * NR-COLS * WORD-SIZE' bytes are read (returned as `total-bytes'). Should less than the requested number of bytes be returned by the target, the missing words are identified using `N/A'. The number of bytes read from the target is returned in `nr-bytes' and the starting address used to read memory in `addr'. The address of the next/previous row or page is available in `next-row' and `prev-row', `next-page' and `prev-page'. GDB Command ........... The corresponding GDB command is `x'. `gdbtk' has `gdb_get_mem' memory read command. Example ....... Read six bytes of memory starting at `bytes+6' but then offset by `-6' bytes. Format as three rows of two columns. One byte per word. Display each word in hex. (gdb) 9-data-read-memory -o -6 -- bytes+6 x 1 3 2 9^done,addr="0x00001390",nr-bytes="6",total-bytes="6", next-row="0x00001396",prev-row="0x0000138e",next-page="0x00001396", prev-page="0x0000138a",memory=[ {addr="0x00001390",data=["0x00","0x01"]}, {addr="0x00001392",data=["0x02","0x03"]}, {addr="0x00001394",data=["0x04","0x05"]}] (gdb) Read two bytes of memory starting at address `shorts + 64' and display as a single word formatted in decimal. (gdb) 5-data-read-memory shorts+64 d 2 1 1 5^done,addr="0x00001510",nr-bytes="2",total-bytes="2", next-row="0x00001512",prev-row="0x0000150e", next-page="0x00001512",prev-page="0x0000150e",memory=[ {addr="0x00001510",data=["128"]}] (gdb) Read thirty two bytes of memory starting at `bytes+16' and format as eight rows of four columns. Include a string encoding with `x' used as the non-printable character. (gdb) 4-data-read-memory bytes+16 x 1 8 4 x 4^done,addr="0x000013a0",nr-bytes="32",total-bytes="32", next-row="0x000013c0",prev-row="0x0000139c", next-page="0x000013c0",prev-page="0x00001380",memory=[ {addr="0x000013a0",data=["0x10","0x11","0x12","0x13"],ascii="xxxx"}, {addr="0x000013a4",data=["0x14","0x15","0x16","0x17"],ascii="xxxx"}, {addr="0x000013a8",data=["0x18","0x19","0x1a","0x1b"],ascii="xxxx"}, {addr="0x000013ac",data=["0x1c","0x1d","0x1e","0x1f"],ascii="xxxx"}, {addr="0x000013b0",data=["0x20","0x21","0x22","0x23"],ascii=" !\"#"}, {addr="0x000013b4",data=["0x24","0x25","0x26","0x27"],ascii="$%&'"}, {addr="0x000013b8",data=["0x28","0x29","0x2a","0x2b"],ascii="()*+"}, {addr="0x000013bc",data=["0x2c","0x2d","0x2e","0x2f"],ascii=",-./"}] (gdb) The `-data-read-memory-bytes' Command ------------------------------------- Synopsis ........ -data-read-memory-bytes [ -o BYTE-OFFSET ] ADDRESS COUNT where: `ADDRESS' An expression specifying the address of the first memory word to be read. Complex expressions containing embedded white space should be quoted using the C convention. `COUNT' The number of bytes to read. This should be an integer literal. `BYTE-OFFSET' The offsets in bytes relative to ADDRESS at which to start reading. This should be an integer literal. This option is provided so that a frontend is not required to first evaluate address and then perform address arithmetics itself. This command attempts to read all accessible memory regions in the specified range. First, all regions marked as unreadable in the memory map (if one is defined) will be skipped. *Note Memory Region Attributes::. Second, GDB will attempt to read the remaining regions. For each one, if reading full region results in an errors, GDB will try to read a subset of the region. In general, every single byte in the region may be readable or not, and the only way to read every readable byte is to try a read at every address, which is not practical. Therefore, GDB will attempt to read all accessible bytes at either beginning or the end of the region, using a binary division scheme. This heuristic works well for reading accross a memory map boundary. Note that if a region has a readable range that is neither at the beginning or the end, GDB will not read it. The result record (*note GDB/MI Result Records::) that is output of the command includes a field named `memory' whose content is a list of tuples. Each tuple represent a successfully read memory block and has the following fields: `begin' The start address of the memory block, as hexadecimal literal. `end' The end address of the memory block, as hexadecimal literal. `offset' The offset of the memory block, as hexadecimal literal, relative to the start address passed to `-data-read-memory-bytes'. `contents' The contents of the memory block, in hex. GDB Command ........... The corresponding GDB command is `x'. Example ....... (gdb) -data-read-memory-bytes &a 10 ^done,memory=[{begin="0xbffff154",offset="0x00000000", end="0xbffff15e", contents="01000000020000000300"}] (gdb) The `-data-write-memory-bytes' Command -------------------------------------- Synopsis ........ -data-write-memory-bytes ADDRESS CONTENTS -data-write-memory-bytes ADDRESS CONTENTS [COUNT] where: `ADDRESS' An expression specifying the address of the first memory word to be read. Complex expressions containing embedded white space should be quoted using the C convention. `CONTENTS' The hex-encoded bytes to write. `COUNT' Optional argument indicating the number of bytes to be written. If COUNT is greater than CONTENTS' length, GDB will repeatedly write CONTENTS until it fills COUNT bytes. GDB Command ........... There's no corresponding GDB command. Example ....... (gdb) -data-write-memory-bytes &a "aabbccdd" ^done (gdb) (gdb) -data-write-memory-bytes &a "aabbccdd" 16e ^done (gdb)  File: gdb.info, Node: GDB/MI Tracepoint Commands, Next: GDB/MI Symbol Query, Prev: GDB/MI Data Manipulation, Up: GDB/MI 27.17 GDB/MI Tracepoint Commands ================================ The commands defined in this section implement MI support for tracepoints. For detailed introduction, see *note Tracepoints::. The `-trace-find' Command ------------------------- Synopsis ........ -trace-find MODE [PARAMETERS...] Find a trace frame using criteria defined by MODE and PARAMETERS. The following table lists permissible modes and their parameters. For details of operation, see *note tfind::. `none' No parameters are required. Stops examining trace frames. `frame-number' An integer is required as parameter. Selects tracepoint frame with that index. `tracepoint-number' An integer is required as parameter. Finds next trace frame that corresponds to tracepoint with the specified number. `pc' An address is required as parameter. Finds next trace frame that corresponds to any tracepoint at the specified address. `pc-inside-range' Two addresses are required as parameters. Finds next trace frame that corresponds to a tracepoint at an address inside the specified range. Both bounds are considered to be inside the range. `pc-outside-range' Two addresses are required as parameters. Finds next trace frame that corresponds to a tracepoint at an address outside the specified range. Both bounds are considered to be inside the range. `line' Line specification is required as parameter. *Note Specify Location::. Finds next trace frame that corresponds to a tracepoint at the specified location. If `none' was passed as MODE, the response does not have fields. Otherwise, the response may have the following fields: `found' This field has either `0' or `1' as the value, depending on whether a matching tracepoint was found. `traceframe' The index of the found traceframe. This field is present iff the `found' field has value of `1'. `tracepoint' The index of the found tracepoint. This field is present iff the `found' field has value of `1'. `frame' The information about the frame corresponding to the found trace frame. This field is present only if a trace frame was found. *Note GDB/MI Frame Information::, for description of this field. GDB Command ........... The corresponding GDB command is `tfind'. -trace-define-variable ---------------------- Synopsis ........ -trace-define-variable NAME [ VALUE ] Create trace variable NAME if it does not exist. If VALUE is specified, sets the initial value of the specified trace variable to that value. Note that the NAME should start with the `$' character. GDB Command ........... The corresponding GDB command is `tvariable'. -trace-list-variables --------------------- Synopsis ........ -trace-list-variables Return a table of all defined trace variables. Each element of the table has the following fields: `name' The name of the trace variable. This field is always present. `initial' The initial value. This is a 64-bit signed integer. This field is always present. `current' The value the trace variable has at the moment. This is a 64-bit signed integer. This field is absent iff current value is not defined, for example if the trace was never run, or is presently running. GDB Command ........... The corresponding GDB command is `tvariables'. Example ....... (gdb) -trace-list-variables ^done,trace-variables={nr_rows="1",nr_cols="3", hdr=[{width="15",alignment="-1",col_name="name",colhdr="Name"}, {width="11",alignment="-1",col_name="initial",colhdr="Initial"}, {width="11",alignment="-1",col_name="current",colhdr="Current"}], body=[variable={name="$trace_timestamp",initial="0"} variable={name="$foo",initial="10",current="15"}]} (gdb) -trace-save ----------- Synopsis ........ -trace-save [-r ] FILENAME Saves the collected trace data to FILENAME. Without the `-r' option, the data is downloaded from the target and saved in a local file. With the `-r' option the target is asked to perform the save. GDB Command ........... The corresponding GDB command is `tsave'. -trace-start ------------ Synopsis ........ -trace-start Starts a tracing experiments. The result of this command does not have any fields. GDB Command ........... The corresponding GDB command is `tstart'. -trace-status ------------- Synopsis ........ -trace-status Obtains the status of a tracing experiment. The result may include the following fields: `supported' May have a value of either `0', when no tracing operations are supported, `1', when all tracing operations are supported, or `file' when examining trace file. In the latter case, examining of trace frame is possible but new tracing experiement cannot be started. This field is always present. `running' May have a value of either `0' or `1' depending on whether tracing experiement is in progress on target. This field is present if `supported' field is not `0'. `stop-reason' Report the reason why the tracing was stopped last time. This field may be absent iff tracing was never stopped on target yet. The value of `request' means the tracing was stopped as result of the `-trace-stop' command. The value of `overflow' means the tracing buffer is full. The value of `disconnection' means tracing was automatically stopped when GDB has disconnected. The value of `passcount' means tracing was stopped when a tracepoint was passed a maximal number of times for that tracepoint. This field is present if `supported' field is not `0'. `stopping-tracepoint' The number of tracepoint whose passcount as exceeded. This field is present iff the `stop-reason' field has the value of `passcount'. `frames' `frames-created' The `frames' field is a count of the total number of trace frames in the trace buffer, while `frames-created' is the total created during the run, including ones that were discarded, such as when a circular trace buffer filled up. Both fields are optional. `buffer-size' `buffer-free' These fields tell the current size of the tracing buffer and the remaining space. These fields are optional. `circular' The value of the circular trace buffer flag. `1' means that the trace buffer is circular and old trace frames will be discarded if necessary to make room, `0' means that the trace buffer is linear and may fill up. `disconnected' The value of the disconnected tracing flag. `1' means that tracing will continue after GDB disconnects, `0' means that the trace run will stop. `trace-file' The filename of the trace file being examined. This field is optional, and only present when examining a trace file. GDB Command ........... The corresponding GDB command is `tstatus'. -trace-stop ----------- Synopsis ........ -trace-stop Stops a tracing experiment. The result of this command has the same fields as `-trace-status', except that the `supported' and `running' fields are not output. GDB Command ........... The corresponding GDB command is `tstop'.  File: gdb.info, Node: GDB/MI Symbol Query, Next: GDB/MI File Commands, Prev: GDB/MI Tracepoint Commands, Up: GDB/MI 27.18 GDB/MI Symbol Query Commands ================================== The `-symbol-list-lines' Command -------------------------------- Synopsis ........ -symbol-list-lines FILENAME Print the list of lines that contain code and their associated program addresses for the given source filename. The entries are sorted in ascending PC order. GDB Command ........... There is no corresponding GDB command. Example ....... (gdb) -symbol-list-lines basics.c ^done,lines=[{pc="0x08048554",line="7"},{pc="0x0804855a",line="8"}] (gdb)  File: gdb.info, Node: GDB/MI File Commands, Next: GDB/MI Target Manipulation, Prev: GDB/MI Symbol Query, Up: GDB/MI 27.19 GDB/MI File Commands ========================== This section describes the GDB/MI commands to specify executable file names and to read in and obtain symbol table information. The `-file-exec-and-symbols' Command ------------------------------------ Synopsis ........ -file-exec-and-symbols FILE Specify the executable file to be debugged. This file is the one from which the symbol table is also read. If no file is specified, the command clears the executable and symbol information. If breakpoints are set when using this command with no arguments, GDB will produce error messages. Otherwise, no output is produced, except a completion notification. GDB Command ........... The corresponding GDB command is `file'. Example ....... (gdb) -file-exec-and-symbols /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx ^done (gdb) The `-file-exec-file' Command ----------------------------- Synopsis ........ -file-exec-file FILE Specify the executable file to be debugged. Unlike `-file-exec-and-symbols', the symbol table is _not_ read from this file. If used without argument, GDB clears the information about the executable file. No output is produced, except a completion notification. GDB Command ........... The corresponding GDB command is `exec-file'. Example ....... (gdb) -file-exec-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx ^done (gdb) The `-file-list-exec-source-file' Command ----------------------------------------- Synopsis ........ -file-list-exec-source-file List the line number, the current source file, and the absolute path to the current source file for the current executable. The macro information field has a value of `1' or `0' depending on whether or not the file includes preprocessor macro information. GDB Command ........... The GDB equivalent is `info source' Example ....... (gdb) 123-file-list-exec-source-file 123^done,line="1",file="foo.c",fullname="/home/bar/foo.c,macro-info="1" (gdb) The `-file-list-exec-source-files' Command ------------------------------------------ Synopsis ........ -file-list-exec-source-files List the source files for the current executable. It will always output both the filename and fullname (absolute file name) of a source file. GDB Command ........... The GDB equivalent is `info sources'. `gdbtk' has an analogous command `gdb_listfiles'. Example ....... (gdb) -file-list-exec-source-files ^done,files=[ {file=foo.c,fullname=/home/foo.c}, {file=/home/bar.c,fullname=/home/bar.c}, {file=gdb_could_not_find_fullpath.c}] (gdb) The `-file-symbol-file' Command ------------------------------- Synopsis ........ -file-symbol-file FILE Read symbol table info from the specified FILE argument. When used without arguments, clears GDB's symbol table info. No output is produced, except for a completion notification. GDB Command ........... The corresponding GDB command is `symbol-file'. Example ....... (gdb) -file-symbol-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx ^done (gdb)  File: gdb.info, Node: GDB/MI Target Manipulation, Next: GDB/MI File Transfer Commands, Prev: GDB/MI File Commands, Up: GDB/MI 27.20 GDB/MI Target Manipulation Commands ========================================= The `-target-attach' Command ---------------------------- Synopsis ........ -target-attach PID | GID | FILE Attach to a process PID or a file FILE outside of GDB, or a thread group GID. If attaching to a thread group, the id previously returned by `-list-thread-groups --available' must be used. GDB Command ........... The corresponding GDB command is `attach'. Example ....... (gdb) -target-attach 34 =thread-created,id="1" *stopped,thread-id="1",frame={addr="0xb7f7e410",func="bar",args=[]} ^done (gdb) The `-target-detach' Command ---------------------------- Synopsis ........ -target-detach [ PID | GID ] Detach from the remote target which normally resumes its execution. If either PID or GID is specified, detaches from either the specified process, or specified thread group. There's no output. GDB Command ........... The corresponding GDB command is `detach'. Example ....... (gdb) -target-detach ^done (gdb) The `-target-disconnect' Command -------------------------------- Synopsis ........ -target-disconnect Disconnect from the remote target. There's no output and the target is generally not resumed. GDB Command ........... The corresponding GDB command is `disconnect'. Example ....... (gdb) -target-disconnect ^done (gdb) The `-target-download' Command ------------------------------ Synopsis ........ -target-download Loads the executable onto the remote target. It prints out an update message every half second, which includes the fields: `section' The name of the section. `section-sent' The size of what has been sent so far for that section. `section-size' The size of the section. `total-sent' The total size of what was sent so far (the current and the previous sections). `total-size' The size of the overall executable to download. Each message is sent as status record (*note GDB/MI Output Syntax: GDB/MI Output Syntax.). In addition, it prints the name and size of the sections, as they are downloaded. These messages include the following fields: `section' The name of the section. `section-size' The size of the section. `total-size' The size of the overall executable to download. At the end, a summary is printed. GDB Command ........... The corresponding GDB command is `load'. Example ....... Note: each status message appears on a single line. Here the messages have been broken down so that they can fit onto a page. (gdb) -target-download +download,{section=".text",section-size="6668",total-size="9880"} +download,{section=".text",section-sent="512",section-size="6668", total-sent="512",total-size="9880"} +download,{section=".text",section-sent="1024",section-size="6668", total-sent="1024",total-size="9880"} +download,{section=".text",section-sent="1536",section-size="6668", total-sent="1536",total-size="9880"} +download,{section=".text",section-sent="2048",section-size="6668", total-sent="2048",total-size="9880"} +download,{section=".text",section-sent="2560",section-size="6668", total-sent="2560",total-size="9880"} +download,{section=".text",section-sent="3072",section-size="6668", total-sent="3072",total-size="9880"} +download,{section=".text",section-sent="3584",section-size="6668", total-sent="3584",total-size="9880"} +download,{section=".text",section-sent="4096",section-size="6668", total-sent="4096",total-size="9880"} +download,{section=".text",section-sent="4608",section-size="6668", total-sent="4608",total-size="9880"} +download,{section=".text",section-sent="5120",section-size="6668", total-sent="5120",total-size="9880"} +download,{section=".text",section-sent="5632",section-size="6668", total-sent="5632",total-size="9880"} +download,{section=".text",section-sent="6144",section-size="6668", total-sent="6144",total-size="9880"} +download,{section=".text",section-sent="6656",section-size="6668", total-sent="6656",total-size="9880"} +download,{section=".init",section-size="28",total-size="9880"} +download,{section=".fini",section-size="28",total-size="9880"} +download,{section=".data",section-size="3156",total-size="9880"} +download,{section=".data",section-sent="512",section-size="3156", total-sent="7236",total-size="9880"} +download,{section=".data",section-sent="1024",section-size="3156", total-sent="7748",total-size="9880"} +download,{section=".data",section-sent="1536",section-size="3156", total-sent="8260",total-size="9880"} +download,{section=".data",section-sent="2048",section-size="3156", total-sent="8772",total-size="9880"} +download,{section=".data",section-sent="2560",section-size="3156", total-sent="9284",total-size="9880"} +download,{section=".data",section-sent="3072",section-size="3156", total-sent="9796",total-size="9880"} ^done,address="0x10004",load-size="9880",transfer-rate="6586", write-rate="429" (gdb) GDB Command ........... No equivalent. Example ....... N.A. The `-target-select' Command ---------------------------- Synopsis ........ -target-select TYPE PARAMETERS ... Connect GDB to the remote target. This command takes two args: `TYPE' The type of target, for instance `remote', etc. `PARAMETERS' Device names, host names and the like. *Note Commands for Managing Targets: Target Commands, for more details. The output is a connection notification, followed by the address at which the target program is, in the following form: ^connected,addr="ADDRESS",func="FUNCTION NAME", args=[ARG LIST] GDB Command ........... The corresponding GDB command is `target'. Example ....... (gdb) -target-select remote /dev/ttya ^connected,addr="0xfe00a300",func="??",args=[] (gdb)  File: gdb.info, Node: GDB/MI File Transfer Commands, Next: GDB/MI Miscellaneous Commands, Prev: GDB/MI Target Manipulation, Up: GDB/MI 27.21 GDB/MI File Transfer Commands =================================== The `-target-file-put' Command ------------------------------ Synopsis ........ -target-file-put HOSTFILE TARGETFILE Copy file HOSTFILE from the host system (the machine running GDB) to TARGETFILE on the target system. GDB Command ........... The corresponding GDB command is `remote put'. Example ....... (gdb) -target-file-put localfile remotefile ^done (gdb) The `-target-file-get' Command ------------------------------ Synopsis ........ -target-file-get TARGETFILE HOSTFILE Copy file TARGETFILE from the target system to HOSTFILE on the host system. GDB Command ........... The corresponding GDB command is `remote get'. Example ....... (gdb) -target-file-get remotefile localfile ^done (gdb) The `-target-file-delete' Command --------------------------------- Synopsis ........ -target-file-delete TARGETFILE Delete TARGETFILE from the target system. GDB Command ........... The corresponding GDB command is `remote delete'. Example ....... (gdb) -target-file-delete remotefile ^done (gdb)  File: gdb.info, Node: GDB/MI Miscellaneous Commands, Prev: GDB/MI File Transfer Commands, Up: GDB/MI 27.22 Miscellaneous GDB/MI Commands =================================== The `-gdb-exit' Command ----------------------- Synopsis ........ -gdb-exit Exit GDB immediately. GDB Command ........... Approximately corresponds to `quit'. Example ....... (gdb) -gdb-exit ^exit The `-gdb-set' Command ---------------------- Synopsis ........ -gdb-set Set an internal GDB variable. GDB Command ........... The corresponding GDB command is `set'. Example ....... (gdb) -gdb-set $foo=3 ^done (gdb) The `-gdb-show' Command ----------------------- Synopsis ........ -gdb-show Show the current value of a GDB variable. GDB Command ........... The corresponding GDB command is `show'. Example ....... (gdb) -gdb-show annotate ^done,value="0" (gdb) The `-gdb-version' Command -------------------------- Synopsis ........ -gdb-version Show version information for GDB. Used mostly in testing. GDB Command ........... The GDB equivalent is `show version'. GDB by default shows this information when you start an interactive session. Example ....... (gdb) -gdb-version ~GNU gdb 5.2.1 ~Copyright 2000 Free Software Foundation, Inc. ~GDB is free software, covered by the GNU General Public License, and ~you are welcome to change it and/or distribute copies of it under ~ certain conditions. ~Type "show copying" to see the conditions. ~There is absolutely no warranty for GDB. Type "show warranty" for ~ details. ~This GDB was configured as "--host=sparc-sun-solaris2.5.1 --target=ppc-eabi". ^done (gdb) The `-list-features' Command ---------------------------- Returns a list of particular features of the MI protocol that this version of gdb implements. A feature can be a command, or a new field in an output of some command, or even an important bugfix. While a frontend can sometimes detect presence of a feature at runtime, it is easier to perform detection at debugger startup. The command returns a list of strings, with each string naming an available feature. Each returned string is just a name, it does not have any internal structure. The list of possible feature names is given below. Example output: (gdb) -list-features ^done,result=["feature1","feature2"] The current list of features is: `frozen-varobjs' Indicates support for the `-var-set-frozen' command, as well as possible presense of the `frozen' field in the output of `-varobj-create'. `pending-breakpoints' Indicates support for the `-f' option to the `-break-insert' command. `python' Indicates Python scripting support, Python-based pretty-printing commands, and possible presence of the `display_hint' field in the output of `-var-list-children' `thread-info' Indicates support for the `-thread-info' command. `data-read-memory-bytes' Indicates support for the `-data-read-memory-bytes' and the `-data-write-memory-bytes' commands. `breakpoint-notifications' Indicates that changes to breakpoints and breakpoints created via the CLI will be announced via async records. `ada-task-info' Indicates support for the `-ada-task-info' command. The `-list-target-features' Command ----------------------------------- Returns a list of particular features that are supported by the target. Those features affect the permitted MI commands, but unlike the features reported by the `-list-features' command, the features depend on which target GDB is using at the moment. Whenever a target can change, due to commands such as `-target-select', `-target-attach' or `-exec-run', the list of target features may change, and the frontend should obtain it again. Example output: (gdb) -list-features ^done,result=["async"] The current list of features is: `async' Indicates that the target is capable of asynchronous command execution, which means that GDB will accept further commands while the target is running. `reverse' Indicates that the target is capable of reverse execution. *Note Reverse Execution::, for more information. The `-list-thread-groups' Command --------------------------------- Synopsis -------- -list-thread-groups [ --available ] [ --recurse 1 ] [ GROUP ... ] Lists thread groups (*note Thread groups::). When a single thread group is passed as the argument, lists the children of that group. When several thread group are passed, lists information about those thread groups. Without any parameters, lists information about all top-level thread groups. Normally, thread groups that are being debugged are reported. With the `--available' option, GDB reports thread groups available on the target. The output of this command may have either a `threads' result or a `groups' result. The `thread' result has a list of tuples as value, with each tuple describing a thread (*note GDB/MI Thread Information::). The `groups' result has a list of tuples as value, each tuple describing a thread group. If top-level groups are requested (that is, no parameter is passed), or when several groups are passed, the output always has a `groups' result. The format of the `group' result is described below. To reduce the number of roundtrips it's possible to list thread groups together with their children, by passing the `--recurse' option and the recursion depth. Presently, only recursion depth of 1 is permitted. If this option is present, then every reported thread group will also include its children, either as `group' or `threads' field. In general, any combination of option and parameters is permitted, with the following caveats: * When a single thread group is passed, the output will typically be the `threads' result. Because threads may not contain anything, the `recurse' option will be ignored. * When the `--available' option is passed, limited information may be available. In particular, the list of threads of a process might be inaccessible. Further, specifying specific thread groups might not give any performance advantage over listing all thread groups. The frontend should assume that `-list-thread-groups --available' is always an expensive operation and cache the results. The `groups' result is a list of tuples, where each tuple may have the following fields: `id' Identifier of the thread group. This field is always present. The identifier is an opaque string; frontends should not try to convert it to an integer, even though it might look like one. `type' The type of the thread group. At present, only `process' is a valid type. `pid' The target-specific process identifier. This field is only present for thread groups of type `process' and only if the process exists. `num_children' The number of children this thread group has. This field may be absent for an available thread group. `threads' This field has a list of tuples as value, each tuple describing a thread. It may be present if the `--recurse' option is specified, and it's actually possible to obtain the threads. `cores' This field is a list of integers, each identifying a core that one thread of the group is running on. This field may be absent if such information is not available. `executable' The name of the executable file that corresponds to this thread group. The field is only present for thread groups of type `process', and only if there is a corresponding executable file. Example ------- gdb -list-thread-groups ^done,groups=[{id="17",type="process",pid="yyy",num_children="2"}] -list-thread-groups 17 ^done,threads=[{id="2",target-id="Thread 0xb7e14b90 (LWP 21257)", frame={level="0",addr="0xffffe410",func="__kernel_vsyscall",args=[]},state="running"}, {id="1",target-id="Thread 0xb7e156b0 (LWP 21254)", frame={level="0",addr="0x0804891f",func="foo",args=[{name="i",value="10"}], file="/tmp/a.c",fullname="/tmp/a.c",line="158"},state="running"}]] -list-thread-groups --available ^done,groups=[{id="17",type="process",pid="yyy",num_children="2",cores=[1,2]}] -list-thread-groups --available --recurse 1 ^done,groups=[{id="17", types="process",pid="yyy",num_children="2",cores=[1,2], threads=[{id="1",target-id="Thread 0xb7e14b90",cores=[1]}, {id="2",target-id="Thread 0xb7e14b90",cores=[2]}]},..] -list-thread-groups --available --recurse 1 17 18 ^done,groups=[{id="17", types="process",pid="yyy",num_children="2",cores=[1,2], threads=[{id="1",target-id="Thread 0xb7e14b90",cores=[1]}, {id="2",target-id="Thread 0xb7e14b90",cores=[2]}]},...] The `-info-os' Command ---------------------- Synopsis ........ -info-os [ TYPE ] If no argument is supplied, the command returns a table of available operating-system-specific information types. If one of these types is supplied as an argument TYPE, then the command returns a table of data of that type. The types of information available depend on the target operating system. GDB Command ........... The corresponding GDB command is `info os'. Example ....... When run on a GNU/Linux system, the output will look something like this: gdb -info-os ^done,OSDataTable={nr_rows="9",nr_cols="3", hdr=[{width="10",alignment="-1",col_name="col0",colhdr="Type"}, {width="10",alignment="-1",col_name="col1",colhdr="Description"}, {width="10",alignment="-1",col_name="col2",colhdr="Title"}], body=[item={col0="processes",col1="Listing of all processes", col2="Processes"}, item={col0="procgroups",col1="Listing of all process groups", col2="Process groups"}, item={col0="threads",col1="Listing of all threads", col2="Threads"}, item={col0="files",col1="Listing of all file descriptors", col2="File descriptors"}, item={col0="sockets",col1="Listing of all internet-domain sockets", col2="Sockets"}, item={col0="shm",col1="Listing of all shared-memory regions", col2="Shared-memory regions"}, item={col0="semaphores",col1="Listing of all semaphores", col2="Semaphores"}, item={col0="msg",col1="Listing of all message queues", col2="Message queues"}, item={col0="modules",col1="Listing of all loaded kernel modules", col2="Kernel modules"}]} gdb -info-os processes ^done,OSDataTable={nr_rows="190",nr_cols="4", hdr=[{width="10",alignment="-1",col_name="col0",colhdr="pid"}, {width="10",alignment="-1",col_name="col1",colhdr="user"}, {width="10",alignment="-1",col_name="col2",colhdr="command"}, {width="10",alignment="-1",col_name="col3",colhdr="cores"}], body=[item={col0="1",col1="root",col2="/sbin/init",col3="0"}, item={col0="2",col1="root",col2="[kthreadd]",col3="1"}, item={col0="3",col1="root",col2="[ksoftirqd/0]",col3="0"}, ... item={col0="26446",col1="stan",col2="bash",col3="0"}, item={col0="28152",col1="stan",col2="bash",col3="1"}]} (gdb) (Note that the MI output here includes a `"Title"' column that does not appear in command-line `info os'; this column is useful for MI clients that want to enumerate the types of data, such as in a popup menu, but is needless clutter on the command line, and `info os' omits it.) The `-add-inferior' Command --------------------------- Synopsis -------- -add-inferior Creates a new inferior (*note Inferiors and Programs::). The created inferior is not associated with any executable. Such association may be established with the `-file-exec-and-symbols' command (*note GDB/MI File Commands::). The command response has a single field, `thread-group', whose value is the identifier of the thread group corresponding to the new inferior. Example ------- gdb -add-inferior ^done,thread-group="i3" The `-interpreter-exec' Command ------------------------------- Synopsis -------- -interpreter-exec INTERPRETER COMMAND Execute the specified COMMAND in the given INTERPRETER. GDB Command ----------- The corresponding GDB command is `interpreter-exec'. Example ------- (gdb) -interpreter-exec console "break main" &"During symbol reading, couldn't parse type; debugger out of date?.\n" &"During symbol reading, bad structure-type format.\n" ~"Breakpoint 1 at 0x8074fc6: file ../../src/gdb/main.c, line 743.\n" ^done (gdb) The `-inferior-tty-set' Command ------------------------------- Synopsis -------- -inferior-tty-set /dev/pts/1 Set terminal for future runs of the program being debugged. GDB Command ----------- The corresponding GDB command is `set inferior-tty' /dev/pts/1. Example ------- (gdb) -inferior-tty-set /dev/pts/1 ^done (gdb) The `-inferior-tty-show' Command -------------------------------- Synopsis -------- -inferior-tty-show Show terminal for future runs of program being debugged. GDB Command ----------- The corresponding GDB command is `show inferior-tty'. Example ------- (gdb) -inferior-tty-set /dev/pts/1 ^done (gdb) -inferior-tty-show ^done,inferior_tty_terminal="/dev/pts/1" (gdb) The `-enable-timings' Command ----------------------------- Synopsis -------- -enable-timings [yes | no] Toggle the printing of the wallclock, user and system times for an MI command as a field in its output. This command is to help frontend developers optimize the performance of their code. No argument is equivalent to `yes'. GDB Command ----------- No equivalent. Example ------- (gdb) -enable-timings ^done (gdb) -break-insert main ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y", addr="0x080484ed",func="main",file="myprog.c", fullname="/home/nickrob/myprog.c",line="73",thread-groups=["i1"], times="0"}, time={wallclock="0.05185",user="0.00800",system="0.00000"} (gdb) -enable-timings no ^done (gdb) -exec-run ^running (gdb) *stopped,reason="breakpoint-hit",disp="keep",bkptno="1",thread-id="0", frame={addr="0x080484ed",func="main",args=[{name="argc",value="1"}, {name="argv",value="0xbfb60364"}],file="myprog.c", fullname="/home/nickrob/myprog.c",line="73"} (gdb)  File: gdb.info, Node: Annotations, Next: JIT Interface, Prev: GDB/MI, Up: Top 28 GDB Annotations ****************** This chapter describes annotations in GDB. Annotations were designed to interface GDB to graphical user interfaces or other similar programs which want to interact with GDB at a relatively high level. The annotation mechanism has largely been superseded by GDB/MI (*note GDB/MI::). * Menu: * Annotations Overview:: What annotations are; the general syntax. * Server Prefix:: Issuing a command without affecting user state. * Prompting:: Annotations marking GDB's need for input. * Errors:: Annotations for error messages. * Invalidation:: Some annotations describe things now invalid. * Annotations for Running:: Whether the program is running, how it stopped, etc. * Source Annotations:: Annotations describing source code.  File: gdb.info, Node: Annotations Overview, Next: Server Prefix, Up: Annotations 28.1 What is an Annotation? =========================== Annotations start with a newline character, two `control-z' characters, and the name of the annotation. If there is no additional information associated with this annotation, the name of the annotation is followed immediately by a newline. If there is additional information, the name of the annotation is followed by a space, the additional information, and a newline. The additional information cannot contain newline characters. Any output not beginning with a newline and two `control-z' characters denotes literal output from GDB. Currently there is no need for GDB to output a newline followed by two `control-z' characters, but if there was such a need, the annotations could be extended with an `escape' annotation which means those three characters as output. The annotation LEVEL, which is specified using the `--annotate' command line option (*note Mode Options::), controls how much information GDB prints together with its prompt, values of expressions, source lines, and other types of output. Level 0 is for no annotations, level 1 is for use when GDB is run as a subprocess of GNU Emacs, level 3 is the maximum annotation suitable for programs that control GDB, and level 2 annotations have been made obsolete (*note Limitations of the Annotation Interface: (annotate)Limitations.). `set annotate LEVEL' The GDB command `set annotate' sets the level of annotations to the specified LEVEL. `show annotate' Show the current annotation level. This chapter describes level 3 annotations. A simple example of starting up GDB with annotations is: $ gdb --annotate=3 GNU gdb 6.0 Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-pc-linux-gnu" ^Z^Zpre-prompt (gdb) ^Z^Zprompt quit ^Z^Zpost-prompt $ Here `quit' is input to GDB; the rest is output from GDB. The three lines beginning `^Z^Z' (where `^Z' denotes a `control-z' character) are annotations; the rest is output from GDB.  File: gdb.info, Node: Server Prefix, Next: Prompting, Prev: Annotations Overview, Up: Annotations 28.2 The Server Prefix ====================== If you prefix a command with `server ' then it will not affect the command history, nor will it affect GDB's notion of which command to repeat if is pressed on a line by itself. This means that commands can be run behind a user's back by a front-end in a transparent manner. The `server ' prefix does not affect the recording of values into the value history; to print a value without recording it into the value history, use the `output' command instead of the `print' command. Using this prefix also disables confirmation requests (*note confirmation requests::).  File: gdb.info, Node: Prompting, Next: Errors, Prev: Server Prefix, Up: Annotations 28.3 Annotation for GDB Input ============================= When GDB prompts for input, it annotates this fact so it is possible to know when to send output, when the output from a given command is over, etc. Different kinds of input each have a different "input type". Each input type has three annotations: a `pre-' annotation, which denotes the beginning of any prompt which is being output, a plain annotation, which denotes the end of the prompt, and then a `post-' annotation which denotes the end of any echo which may (or may not) be associated with the input. For example, the `prompt' input type features the following annotations: ^Z^Zpre-prompt ^Z^Zprompt ^Z^Zpost-prompt The input types are `prompt' When GDB is prompting for a command (the main GDB prompt). `commands' When GDB prompts for a set of commands, like in the `commands' command. The annotations are repeated for each command which is input. `overload-choice' When GDB wants the user to select between various overloaded functions. `query' When GDB wants the user to confirm a potentially dangerous operation. `prompt-for-continue' When GDB is asking the user to press return to continue. Note: Don't expect this to work well; instead use `set height 0' to disable prompting. This is because the counting of lines is buggy in the presence of annotations.  File: gdb.info, Node: Errors, Next: Invalidation, Prev: Prompting, Up: Annotations 28.4 Errors =========== ^Z^Zquit This annotation occurs right before GDB responds to an interrupt. ^Z^Zerror This annotation occurs right before GDB responds to an error. Quit and error annotations indicate that any annotations which GDB was in the middle of may end abruptly. For example, if a `value-history-begin' annotation is followed by a `error', one cannot expect to receive the matching `value-history-end'. One cannot expect not to receive it either, however; an error annotation does not necessarily mean that GDB is immediately returning all the way to the top level. A quit or error annotation may be preceded by ^Z^Zerror-begin Any output between that and the quit or error annotation is the error message. Warning messages are not yet annotated.  File: gdb.info, Node: Invalidation, Next: Annotations for Running, Prev: Errors, Up: Annotations 28.5 Invalidation Notices ========================= The following annotations say that certain pieces of state may have changed. `^Z^Zframes-invalid' The frames (for example, output from the `backtrace' command) may have changed. `^Z^Zbreakpoints-invalid' The breakpoints may have changed. For example, the user just added or deleted a breakpoint.  File: gdb.info, Node: Annotations for Running, Next: Source Annotations, Prev: Invalidation, Up: Annotations 28.6 Running the Program ======================== When the program starts executing due to a GDB command such as `step' or `continue', ^Z^Zstarting is output. When the program stops, ^Z^Zstopped is output. Before the `stopped' annotation, a variety of annotations describe how the program stopped. `^Z^Zexited EXIT-STATUS' The program exited, and EXIT-STATUS is the exit status (zero for successful exit, otherwise nonzero). `^Z^Zsignalled' The program exited with a signal. After the `^Z^Zsignalled', the annotation continues: INTRO-TEXT ^Z^Zsignal-name NAME ^Z^Zsignal-name-end MIDDLE-TEXT ^Z^Zsignal-string STRING ^Z^Zsignal-string-end END-TEXT where NAME is the name of the signal, such as `SIGILL' or `SIGSEGV', and STRING is the explanation of the signal, such as `Illegal Instruction' or `Segmentation fault'. INTRO-TEXT, MIDDLE-TEXT, and END-TEXT are for the user's benefit and have no particular format. `^Z^Zsignal' The syntax of this annotation is just like `signalled', but GDB is just saying that the program received the signal, not that it was terminated with it. `^Z^Zbreakpoint NUMBER' The program hit breakpoint number NUMBER. `^Z^Zwatchpoint NUMBER' The program hit watchpoint number NUMBER.  File: gdb.info, Node: Source Annotations, Prev: Annotations for Running, Up: Annotations 28.7 Displaying Source ====================== The following annotation is used instead of displaying source code: ^Z^Zsource FILENAME:LINE:CHARACTER:MIDDLE:ADDR where FILENAME is an absolute file name indicating which source file, LINE is the line number within that file (where 1 is the first line in the file), CHARACTER is the character position within the file (where 0 is the first character in the file) (for most debug formats this will necessarily point to the beginning of a line), MIDDLE is `middle' if ADDR is in the middle of the line, or `beg' if ADDR is at the beginning of the line, and ADDR is the address in the target program associated with the source which is being displayed. ADDR is in the form `0x' followed by one or more lowercase hex digits (note that this does not depend on the language).  File: gdb.info, Node: JIT Interface, Next: In-Process Agent, Prev: Annotations, Up: Top 29 JIT Compilation Interface **************************** This chapter documents GDB's "just-in-time" (JIT) compilation interface. A JIT compiler is a program or library that generates native executable code at runtime and executes it, usually in order to achieve good performance while maintaining platform independence. Programs that use JIT compilation are normally difficult to debug because portions of their code are generated at runtime, instead of being loaded from object files, which is where GDB normally finds the program's symbols and debug information. In order to debug programs that use JIT compilation, GDB has an interface that allows the program to register in-memory symbol files with GDB at runtime. If you are using GDB to debug a program that uses this interface, then it should work transparently so long as you have not stripped the binary. If you are developing a JIT compiler, then the interface is documented in the rest of this chapter. At this time, the only known client of this interface is the LLVM JIT. Broadly speaking, the JIT interface mirrors the dynamic loader interface. The JIT compiler communicates with GDB by writing data into a global variable and calling a fuction at a well-known symbol. When GDB attaches, it reads a linked list of symbol files from the global variable to find existing code, and puts a breakpoint in the function so that it can find out about additional code. * Menu: * Declarations:: Relevant C struct declarations * Registering Code:: Steps to register code * Unregistering Code:: Steps to unregister code * Custom Debug Info:: Emit debug information in a custom format  File: gdb.info, Node: Declarations, Next: Registering Code, Up: JIT Interface 29.1 JIT Declarations ===================== These are the relevant struct declarations that a C program should include to implement the interface: typedef enum { JIT_NOACTION = 0, JIT_REGISTER_FN, JIT_UNREGISTER_FN } jit_actions_t; struct jit_code_entry { struct jit_code_entry *next_entry; struct jit_code_entry *prev_entry; const char *symfile_addr; uint64_t symfile_size; }; struct jit_descriptor { uint32_t version; /* This type should be jit_actions_t, but we use uint32_t to be explicit about the bitwidth. */ uint32_t action_flag; struct jit_code_entry *relevant_entry; struct jit_code_entry *first_entry; }; /* GDB puts a breakpoint in this function. */ void __attribute__((noinline)) __jit_debug_register_code() { }; /* Make sure to specify the version statically, because the debugger may check the version before we can set it. */ struct jit_descriptor __jit_debug_descriptor = { 1, 0, 0, 0 }; If the JIT is multi-threaded, then it is important that the JIT synchronize any modifications to this global data properly, which can easily be done by putting a global mutex around modifications to these structures.  File: gdb.info, Node: Registering Code, Next: Unregistering Code, Prev: Declarations, Up: JIT Interface 29.2 Registering Code ===================== To register code with GDB, the JIT should follow this protocol: * Generate an object file in memory with symbols and other desired debug information. The file must include the virtual addresses of the sections. * Create a code entry for the file, which gives the start and size of the symbol file. * Add it to the linked list in the JIT descriptor. * Point the relevant_entry field of the descriptor at the entry. * Set `action_flag' to `JIT_REGISTER' and call `__jit_debug_register_code'. When GDB is attached and the breakpoint fires, GDB uses the `relevant_entry' pointer so it doesn't have to walk the list looking for new code. However, the linked list must still be maintained in order to allow GDB to attach to a running process and still find the symbol files.  File: gdb.info, Node: Unregistering Code, Next: Custom Debug Info, Prev: Registering Code, Up: JIT Interface 29.3 Unregistering Code ======================= If code is freed, then the JIT should use the following protocol: * Remove the code entry corresponding to the code from the linked list. * Point the `relevant_entry' field of the descriptor at the code entry. * Set `action_flag' to `JIT_UNREGISTER' and call `__jit_debug_register_code'. If the JIT frees or recompiles code without unregistering it, then GDB and the JIT will leak the memory used for the associated symbol files.  File: gdb.info, Node: Custom Debug Info, Prev: Unregistering Code, Up: JIT Interface 29.4 Custom Debug Info ====================== Generating debug information in platform-native file formats (like ELF or COFF) may be an overkill for JIT compilers; especially if all the debug info is used for is displaying a meaningful backtrace. The issue can be resolved by having the JIT writers decide on a debug info format and also provide a reader that parses the debug info generated by the JIT compiler. This section gives a brief overview on writing such a parser. More specific details can be found in the source file `gdb/jit-reader.in', which is also installed as a header at `INCLUDEDIR/gdb/jit-reader.h' for easy inclusion. The reader is implemented as a shared object (so this functionality is not available on platforms which don't allow loading shared objects at runtime). Two GDB commands, `jit-reader-load' and `jit-reader-unload' are provided, to be used to load and unload the readers from a preconfigured directory. Once loaded, the shared object is used the parse the debug information emitted by the JIT compiler. * Menu: * Using JIT Debug Info Readers:: How to use supplied readers correctly * Writing JIT Debug Info Readers:: Creating a debug-info reader  File: gdb.info, Node: Using JIT Debug Info Readers, Next: Writing JIT Debug Info Readers, Up: Custom Debug Info 29.4.1 Using JIT Debug Info Readers ----------------------------------- Readers can be loaded and unloaded using the `jit-reader-load' and `jit-reader-unload' commands. `jit-reader-load READER' Load the JIT reader named READER. READER is a shared object specified as either an absolute or a relative file name. In the latter case, GDB will try to load the reader from a pre-configured directory, usually `LIBDIR/gdb/' on a UNIX system (here LIBDIR is the system library directory, often `/usr/local/lib'). Only one reader can be active at a time; trying to load a second reader when one is already loaded will result in GDB reporting an error. A new JIT reader can be loaded by first unloading the current one using `jit-reader-unload' and then invoking `jit-reader-load'. `jit-reader-unload' Unload the currently loaded JIT reader.  File: gdb.info, Node: Writing JIT Debug Info Readers, Prev: Using JIT Debug Info Readers, Up: Custom Debug Info 29.4.2 Writing JIT Debug Info Readers ------------------------------------- As mentioned, a reader is essentially a shared object conforming to a certain ABI. This ABI is described in `jit-reader.h'. `jit-reader.h' defines the structures, macros and functions required to write a reader. It is installed (along with GDB), in `INCLUDEDIR/gdb' where INCLUDEDIR is the system include directory. Readers need to be released under a GPL compatible license. A reader can be declared as released under such a license by placing the macro `GDB_DECLARE_GPL_COMPATIBLE_READER' in a source file. The entry point for readers is the symbol `gdb_init_reader', which is expected to be a function with the prototype extern struct gdb_reader_funcs *gdb_init_reader (void); `struct gdb_reader_funcs' contains a set of pointers to callback functions. These functions are executed to read the debug info generated by the JIT compiler (`read'), to unwind stack frames (`unwind') and to create canonical frame IDs (`get_Frame_id'). It also has a callback that is called when the reader is being unloaded (`destroy'). The struct looks like this struct gdb_reader_funcs { /* Must be set to GDB_READER_INTERFACE_VERSION. */ int reader_version; /* For use by the reader. */ void *priv_data; gdb_read_debug_info *read; gdb_unwind_frame *unwind; gdb_get_frame_id *get_frame_id; gdb_destroy_reader *destroy; }; The callbacks are provided with another set of callbacks by GDB to do their job. For `read', these callbacks are passed in a `struct gdb_symbol_callbacks' and for `unwind' and `get_frame_id', in a `struct gdb_unwind_callbacks'. `struct gdb_symbol_callbacks' has callbacks to create new object files and new symbol tables inside those object files. `struct gdb_unwind_callbacks' has callbacks to read registers off the current frame and to write out the values of the registers in the previous frame. Both have a callback (`target_read') to read bytes off the target's address space.  File: gdb.info, Node: In-Process Agent, Next: GDB Bugs, Prev: JIT Interface, Up: Top 30 In-Process Agent ******************* The traditional debugging model is conceptually low-speed, but works fine, because most bugs can be reproduced in debugging-mode execution. However, as multi-core or many-core processors are becoming mainstream, and multi-threaded programs become more and more popular, there should be more and more bugs that only manifest themselves at normal-mode execution, for example, thread races, because debugger's interference with the program's timing may conceal the bugs. On the other hand, in some applications, it is not feasible for the debugger to interrupt the program's execution long enough for the developer to learn anything helpful about its behavior. If the program's correctness depends on its real-time behavior, delays introduced by a debugger might cause the program to fail, even when the code itself is correct. It is useful to be able to observe the program's behavior without interrupting it. Therefore, traditional debugging model is too intrusive to reproduce some bugs. In order to reduce the interference with the program, we can reduce the number of operations performed by debugger. The "In-Process Agent", a shared library, is running within the same process with inferior, and is able to perform some debugging operations itself. As a result, debugger is only involved when necessary, and performance of debugging can be improved accordingly. Note that interference with program can be reduced but can't be removed completely, because the in-process agent will still stop or slow down the program. The in-process agent can interpret and execute Agent Expressions (*note Agent Expressions::) during performing debugging operations. The agent expressions can be used for different purposes, such as collecting data in tracepoints, and condition evaluation in breakpoints. You can control whether the in-process agent is used as an aid for debugging with the following commands: `set agent on' Causes the in-process agent to perform some operations on behalf of the debugger. Just which operations requested by the user will be done by the in-process agent depends on the its capabilities. For example, if you request to evaluate breakpoint conditions in the in-process agent, and the in-process agent has such capability as well, then breakpoint conditions will be evaluated in the in-process agent. `set agent off' Disables execution of debugging operations by the in-process agent. All of the operations will be performed by GDB. `show agent' Display the current setting of execution of debugging operations by the in-process agent. * Menu: * In-Process Agent Protocol::  File: gdb.info, Node: In-Process Agent Protocol, Up: In-Process Agent 30.1 In-Process Agent Protocol ============================== The in-process agent is able to communicate with both GDB and GDBserver (*note In-Process Agent::). This section documents the protocol used for communications between GDB or GDBserver and the IPA. In general, GDB or GDBserver sends commands (*note IPA Protocol Commands::) and data to in-process agent, and then in-process agent replies back with the return result of the command, or some other information. The data sent to in-process agent is composed of primitive data types, such as 4-byte or 8-byte type, and composite types, which are called objects (*note IPA Protocol Objects::). * Menu: * IPA Protocol Objects:: * IPA Protocol Commands::  File: gdb.info, Node: IPA Protocol Objects, Next: IPA Protocol Commands, Up: In-Process Agent Protocol 30.1.1 IPA Protocol Objects --------------------------- The commands sent to and results received from agent may contain some complex data types called "objects". The in-process agent is running on the same machine with GDB or GDBserver, so it doesn't have to handle as much differences between two ends as remote protocol (*note Remote Protocol::) tries to handle. However, there are still some differences of two ends in two processes: 1. word size. On some 64-bit machines, GDB or GDBserver can be compiled as a 64-bit executable, while in-process agent is a 32-bit one. 2. ABI. Some machines may have multiple types of ABI, GDB or GDBserver is compiled with one, and in-process agent is compiled with the other one. Here are the IPA Protocol Objects: 1. agent expression object. It represents an agent expression (*note Agent Expressions::). 2. tracepoint action object. It represents a tracepoint action (*note Tracepoint Action Lists: Tracepoint Actions.) to collect registers, memory, static trace data and to evaluate expression. 3. tracepoint object. It represents a tracepoint (*note Tracepoints::). The following table describes important attributes of each IPA protocol object: Name Size Description --------------------------------------------------------------------------- _agent expression object_ length 4 length of bytes code byte code LENGTH contents of byte code _tracepoint action for collecting memory_ 'M' 1 type of tracepoint action addr 8 if BASEREG is `-1', ADDR is the address of the lowest byte to collect, otherwise ADDR is the offset of BASEREG for memory collecting. len 8 length of memory for collecting basereg 4 the register number containing the starting memory address for collecting. _tracepoint action for collecting registers_ 'R' 1 type of tracepoint action _tracepoint action for collecting static trace data_ 'L' 1 type of tracepoint action _tracepoint action for expression evaluation_ 'X' 1 type of tracepoint action agent expression length of *note agent expression object:: _tracepoint object_ number 4 number of tracepoint address 8 address of tracepoint inserted on type 4 type of tracepoint enabled 1 enable or disable of tracepoint step_count 8 step pass_count 8 pass numactions 4 number of tracepoint actions hit count 8 hit count trace frame usage 8 trace frame usage compiled_cond 8 compiled condition orig_size 8 orig size condition 4 if zero if condition is NULL, condition is otherwise is *note agent expression NULL object:: otherwise length of *note agent expression object:: actions variable numactions number of *note tracepoint action object::  File: gdb.info, Node: IPA Protocol Commands, Prev: IPA Protocol Objects, Up: In-Process Agent Protocol 30.1.2 IPA Protocol Commands ---------------------------- The spaces in each command are delimiters to ease reading this commands specification. They don't exist in real commands. `FastTrace:TRACEPOINT_OBJECT GDB_JUMP_PAD_HEAD' Installs a new fast tracepoint described by TRACEPOINT_OBJECT (*note tracepoint object::). GDB_JUMP_PAD_HEAD, 8-byte long, is the head of "jumppad", which is used to jump to data collection routine in IPA finally. Replies: `OK TARGET_ADDRESS GDB_JUMP_PAD_HEAD FJUMP_SIZE FJUMP' TARGET_ADDRESS is address of tracepoint in the inferior. GDB_JUMP_PAD_HEAD is updated head of jumppad. Both of TARGET_ADDRESS and GDB_JUMP_PAD_HEAD are 8-byte long. FJUMP contains a sequence of instructions jump to jumppad entry. FJUMP_SIZE, 4-byte long, is the size of FJUMP. `E NN' for an error `close' Closes the in-process agent. This command is sent when GDB or GDBserver is about to kill inferiors. `qTfSTM' *Note qTfSTM::. `qTsSTM' *Note qTsSTM::. `qTSTMat' *Note qTSTMat::. `probe_marker_at:ADDRESS' Asks in-process agent to probe the marker at ADDRESS. Replies: `E NN' for an error `unprobe_marker_at:ADDRESS' Asks in-process agent to unprobe the marker at ADDRESS.  File: gdb.info, Node: GDB Bugs, Next: Command Line Editing, Prev: In-Process Agent, Up: Top 31 Reporting Bugs in GDB ************************ Your bug reports play an essential role in making GDB reliable. Reporting a bug may help you by bringing a solution to your problem, or it may not. But in any case the principal function of a bug report is to help the entire community by making the next version of GDB work better. Bug reports are your contribution to the maintenance of GDB. In order for a bug report to serve its purpose, you must include the information that enables us to fix the bug. * Menu: * Bug Criteria:: Have you found a bug? * Bug Reporting:: How to report bugs  File: gdb.info, Node: Bug Criteria, Next: Bug Reporting, Up: GDB Bugs 31.1 Have You Found a Bug? ========================== If you are not sure whether you have found a bug, here are some guidelines: * If the debugger gets a fatal signal, for any input whatever, that is a GDB bug. Reliable debuggers never crash. * If GDB produces an error message for valid input, that is a bug. (Note that if you're cross debugging, the problem may also be somewhere in the connection to the target.) * If GDB does not produce an error message for invalid input, that is a bug. However, you should note that your idea of "invalid input" might be our idea of "an extension" or "support for traditional practice". * If you are an experienced user of debugging tools, your suggestions for improvement of GDB are welcome in any case.  File: gdb.info, Node: Bug Reporting, Prev: Bug Criteria, Up: GDB Bugs 31.2 How to Report Bugs ======================= A number of companies and individuals offer support for GNU products. If you obtained GDB from a support organization, we recommend you contact that organization first. You can find contact information for many support companies and individuals in the file `etc/SERVICE' in the GNU Emacs distribution. In any event, we also recommend that you submit bug reports for GDB. The preferred method is to submit them directly using GDB's Bugs web page (http://www.gnu.org/software/gdb/bugs/). Alternatively, the e-mail gateway can be used. *Do not send bug reports to `info-gdb', or to `help-gdb', or to any newsgroups.* Most users of GDB do not want to receive bug reports. Those that do have arranged to receive `bug-gdb'. The mailing list `bug-gdb' has a newsgroup `gnu.gdb.bug' which serves as a repeater. The mailing list and the newsgroup carry exactly the same messages. Often people think of posting bug reports to the newsgroup instead of mailing them. This appears to work, but it has one problem which can be crucial: a newsgroup posting often lacks a mail path back to the sender. Thus, if we need to ask for more information, we may be unable to reach you. For this reason, it is better to send bug reports to the mailing list. The fundamental principle of reporting bugs usefully is this: *report all the facts*. If you are not sure whether to state a fact or leave it out, state it! Often people omit facts because they think they know what causes the problem and assume that some details do not matter. Thus, you might assume that the name of the variable you use in an example does not matter. Well, probably it does not, but one cannot be sure. Perhaps the bug is a stray memory reference which happens to fetch from the location where that name is stored in memory; perhaps, if the name were different, the contents of that location would fool the debugger into doing the right thing despite the bug. Play it safe and give a specific, complete example. That is the easiest thing for you to do, and the most helpful. Keep in mind that the purpose of a bug report is to enable us to fix the bug. It may be that the bug has been reported previously, but neither you nor we can know that unless your bug report is complete and self-contained. Sometimes people give a few sketchy facts and ask, "Does this ring a bell?" Those bug reports are useless, and we urge everyone to _refuse to respond to them_ except to chide the sender to report bugs properly. To enable us to fix the bug, you should include all these things: * The version of GDB. GDB announces it if you start with no arguments; you can also print it at any time using `show version'. Without this, we will not know whether there is any point in looking for the bug in the current version of GDB. * The type of machine you are using, and the operating system name and version number. * What compiler (and its version) was used to compile GDB--e.g. "gcc-2.8.1". * What compiler (and its version) was used to compile the program you are debugging--e.g. "gcc-2.8.1", or "HP92453-01 A.10.32.03 HP C Compiler". For GCC, you can say `gcc --version' to get this information; for other compilers, see the documentation for those compilers. * The command arguments you gave the compiler to compile your example and observe the bug. For example, did you use `-O'? To guarantee you will not omit something important, list them all. A copy of the Makefile (or the output from make) is sufficient. If we were to try to guess the arguments, we would probably guess wrong and then we might not encounter the bug. * A complete input script, and all necessary source files, that will reproduce the bug. * A description of what behavior you observe that you believe is incorrect. For example, "It gets a fatal signal." Of course, if the bug is that GDB gets a fatal signal, then we will certainly notice it. But if the bug is incorrect output, we might not notice unless it is glaringly wrong. You might as well not give us a chance to make a mistake. Even if the problem you experience is a fatal signal, you should still say so explicitly. Suppose something strange is going on, such as, your copy of GDB is out of synch, or you have encountered a bug in the C library on your system. (This has happened!) Your copy might crash and ours would not. If you told us to expect a crash, then when ours fails to crash, we would know that the bug was not happening for us. If you had not told us to expect a crash, then we would not be able to draw any conclusion from our observations. To collect all this information, you can use a session recording program such as `script', which is available on many Unix systems. Just run your GDB session inside `script' and then include the `typescript' file with your bug report. Another way to record a GDB session is to run GDB inside Emacs and then save the entire buffer to a file. * If you wish to suggest changes to the GDB source, send us context diffs. If you even discuss something in the GDB source, refer to it by context, not by line number. The line numbers in our development sources will not match those in your sources. Your line numbers would convey no useful information to us. Here are some things that are not necessary: * A description of the envelope of the bug. Often people who encounter a bug spend a lot of time investigating which changes to the input file will make the bug go away and which changes will not affect it. This is often time consuming and not very useful, because the way we will find the bug is by running a single example under the debugger with breakpoints, not by pure deduction from a series of examples. We recommend that you save your time for something else. Of course, if you can find a simpler example to report _instead_ of the original one, that is a convenience for us. Errors in the output will be easier to spot, running under the debugger will take less time, and so on. However, simplification is not vital; if you do not want to do this, report the bug anyway and send us the entire test case you used. * A patch for the bug. A patch for the bug does help us if it is a good one. But do not omit the necessary information, such as the test case, on the assumption that a patch is all we need. We might see problems with your patch and decide to fix the problem another way, or we might not understand it at all. Sometimes with a program as complicated as GDB it is very hard to construct an example that will make the program follow a certain path through the code. If you do not send us the example, we will not be able to construct one, so we will not be able to verify that the bug is fixed. And if we cannot understand what bug you are trying to fix, or why your patch should be an improvement, we will not install it. A test case will help us to understand. * A guess about what the bug is or what it depends on. Such guesses are usually wrong. Even we cannot guess right about such things without first using the debugger to find the facts.  File: gdb.info, Node: Command Line Editing, Next: Using History Interactively, Prev: GDB Bugs, Up: Top 32 Command Line Editing *********************** This chapter describes the basic features of the GNU command line editing interface. * 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.  File: gdb.info, Node: Introduction and Notation, Next: Readline Interaction, Up: Command Line Editing 32.1 Introduction to Line Editing ================================= The following paragraphs describe the notation used to represent keystrokes. The text `C-k' is read as `Control-K' and describes the character produced when the key is pressed while the Control key is depressed. The text `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 is pressed. The Meta key is labeled on many keyboards. On keyboards with two keys labeled (usually to either side of the space bar), the on the left side is generally set to work as a Meta key. The 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, or another key working as a Meta key, the identical keystroke can be generated by typing _first_, and then typing . Either process is known as "metafying" the key. The text `M-C-k' is read as `Meta-Control-k' and describes the character produced by "metafying" `C-k'. In addition, several keys have their own names. Specifically, , , , , , and all stand for themselves when seen in this text, or in an init file (*note Readline Init File::). If your keyboard lacks a key, typing will produce the desired character. The key may be labeled or on some keyboards.  File: gdb.info, Node: Readline Interaction, Next: Readline Init File, Prev: Introduction and Notation, Up: Command Line Editing 32.2 Readline Interaction ========================= 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 . You do not have to be at the end of the line to press ; 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.  File: gdb.info, Node: Readline Bare Essentials, Next: Readline Movement Commands, Up: Readline Interaction 32.2.1 Readline Bare Essentials ------------------------------- 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 `C-b' to move the cursor to the left, and then correct your mistake. Afterwards, you can move the cursor to the right with `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. `C-b' Move back one character. `C-f' Move forward one character. or Delete the character to the left of the cursor. `C-d' Delete the character underneath the cursor. Printing characters Insert the character into the line at the cursor. `C-_' or `C-x C-u' Undo the last editing command. You can undo all the way back to an empty line. (Depending on your configuration, the key be set to delete the character to the left of the cursor and the key set to delete the character underneath the cursor, like `C-d', rather than the character to the left of the cursor.)  File: gdb.info, Node: Readline Movement Commands, Next: Readline Killing Commands, Prev: Readline Bare Essentials, Up: Readline Interaction 32.2.2 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 `C-b', `C-f', `C-d', and . Here are some commands for moving more rapidly about the line. `C-a' Move to the start of the line. `C-e' Move to the end of the line. `M-f' Move forward a word, where a word is composed of letters and digits. `M-b' Move backward a word. `C-l' Clear the screen, reprinting the current line at the top. Notice how `C-f' moves forward a character, while `M-f' moves forward a word. It is a loose convention that control keystrokes operate on characters while meta keystrokes operate on words.  File: gdb.info, Node: Readline Killing Commands, Next: Readline Arguments, Prev: Readline Movement Commands, Up: Readline Interaction 32.2.3 Readline Killing Commands -------------------------------- "Killing" text means to delete the text from the line, but to save it away for later use, usually by "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 "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. Here is the list of commands for killing text. `C-k' Kill the text from the current cursor position to the end of the line. `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 `M-f'. `M-' 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 `M-b'. `C-w' Kill from the cursor to the previous whitespace. This is different than `M-' because the word boundaries differ. Here is how to "yank" the text back into the line. Yanking means to copy the most-recently-killed text from the kill buffer. `C-y' Yank the most recently killed text back into the buffer at the cursor. `M-y' Rotate the kill-ring, and yank the new top. You can only do this if the prior command is `C-y' or `M-y'.  File: gdb.info, Node: Readline Arguments, Next: Searching, Prev: Readline Killing Commands, Up: Readline Interaction 32.2.4 Readline Arguments ------------------------- You can pass numeric arguments to Readline commands. Sometimes the argument acts as a repeat count, other times it is the 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 `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 (`-'), 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 `C-d' command an argument of 10, you could type `M-1 0 C-d', which will delete the next ten characters on the input line.  File: gdb.info, Node: Searching, Prev: Readline Arguments, Up: Readline Interaction 32.2.5 Searching for Commands in the History -------------------------------------------- Readline provides commands for searching through the command history for lines containing a specified string. There are two search modes: "incremental" and "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 `C-r'. Typing `C-s' searches forward through the history. The characters present in the value of the `isearch-terminators' variable are used to terminate an incremental search. If that variable has not been assigned a value, the and `C-J' characters will terminate an incremental search. `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 `C-r' or `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 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 `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.  File: gdb.info, Node: Readline Init File, Next: Bindable Readline Commands, Prev: Readline Interaction, Up: Command Line Editing 32.3 Readline Init File ======================= 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 "inputrc" file, conventionally in his home directory. The name of this file is taken from the value of the environment variable `INPUTRC'. If that variable is unset, the default is `~/.inputrc'. If that file does not exist or cannot be read, the ultimate default is `/etc/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 `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.  File: gdb.info, Node: Readline Init File Syntax, Next: Conditional Init Constructs, Up: Readline Init File 32.3.1 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 `#' are comments. Lines beginning with a `$' indicate conditional constructs (*note Conditional Init Constructs::). Other lines denote variable settings and key bindings. Variable Settings You can modify the run-time behavior of Readline by altering the values of variables in Readline using the `set' command within the init file. The syntax is simple: set VARIABLE VALUE Here, for example, is how to change from the default Emacs-like key binding to use `vi' line editing commands: set editing-mode vi Variable names and values, where appropriate, are recognized without regard to case. Unrecognized variable names are ignored. Boolean variables (those that can be set to on or off) are set to on if the value is null or empty, ON (case-insensitive), or 1. Any other value results in the variable being set to off. A great deal of run-time behavior is changeable with the following variables. `bell-style' Controls what happens when Readline wants to ring the terminal bell. If set to `none', Readline never rings the bell. If set to `visible', Readline uses a visible bell if one is available. If set to `audible' (the default), Readline attempts to ring the terminal's bell. `bind-tty-special-chars' If set to `on', Readline attempts to bind the control characters treated specially by the kernel's terminal driver to their Readline equivalents. `comment-begin' The string to insert at the beginning of the line when the `insert-comment' command is executed. The default value is `"#"'. `completion-display-width' The number of screen columns used to display possible matches when performing completion. The value is ignored if it is less than 0 or greater than the terminal screen width. A value of 0 will cause matches to be displayed one per line. The default value is -1. `completion-ignore-case' If set to `on', Readline performs filename matching and completion in a case-insensitive fashion. The default value is `off'. `completion-map-case' If set to `on', and COMPLETION-IGNORE-CASE is enabled, Readline treats hyphens (`-') and underscores (`_') as equivalent when performing case-insensitive filename matching and completion. `completion-prefix-display-length' The length in characters of the common prefix of a list of possible completions that is displayed without modification. When set to a value greater than zero, common prefixes longer than this value are replaced with an ellipsis when displaying possible completions. `completion-query-items' The number of possible completions that determines when the user is asked whether the list of possibilities should be displayed. 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. A negative value means Readline should never ask. The default limit is `100'. `convert-meta' If set to `on', Readline will convert characters with the eighth bit set to an ASCII key sequence by stripping the eighth bit and prefixing an character, converting them to a meta-prefixed key sequence. The default value is `on'. `disable-completion' If set to `On', Readline will inhibit word completion. Completion characters will be inserted into the line as if they had been mapped to `self-insert'. The default is `off'. `editing-mode' The `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 `emacs' or `vi'. `echo-control-characters' When set to `on', on operating systems that indicate they support it, readline echoes a character corresponding to a signal generated from the keyboard. The default is `on'. `enable-keypad' When set to `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 `off'. `enable-meta-key' When set to `on', Readline will try to enable any meta modifier key the terminal claims to support when it is called. On many terminals, the meta key is used to send eight-bit characters. The default is `on'. `expand-tilde' If set to `on', tilde expansion is performed when Readline attempts word completion. The default is `off'. `history-preserve-point' If set to `on', the history code attempts to place the point (the current cursor position) at the same location on each history line retrieved with `previous-history' or `next-history'. The default is `off'. `history-size' Set the maximum number of history entries saved in the history list. If set to zero, the number of entries in the history list is not limited. `horizontal-scroll-mode' This variable can be set to either `on' or `off'. Setting it to `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 `off'. `input-meta' If set to `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 `off'. The name `meta-flag' is a synonym for this variable. `isearch-terminators' The string of characters that should terminate an incremental search without subsequently executing the character as a command (*note Searching::). If this variable has not been given a value, the characters and `C-J' will terminate an incremental search. `keymap' Sets Readline's idea of the current keymap for key binding commands. Acceptable `keymap' names are `emacs', `emacs-standard', `emacs-meta', `emacs-ctlx', `vi', `vi-move', `vi-command', and `vi-insert'. `vi' is equivalent to `vi-command'; `emacs' is equivalent to `emacs-standard'. The default value is `emacs'. The value of the `editing-mode' variable also affects the default keymap. `mark-directories' If set to `on', completed directory names have a slash appended. The default is `on'. `mark-modified-lines' This variable, when set to `on', causes Readline to display an asterisk (`*') at the start of history lines which have been modified. This variable is `off' by default. `mark-symlinked-directories' If set to `on', completed names which are symbolic links to directories have a slash appended (subject to the value of `mark-directories'). The default is `off'. `match-hidden-files' This variable, when set to `on', causes Readline to match files whose names begin with a `.' (hidden files) when performing filename completion. If set to `off', the leading `.' must be supplied by the user in the filename to be completed. This variable is `on' by default. `menu-complete-display-prefix' If set to `on', menu completion displays the common prefix of the list of possible completions (which may be empty) before cycling through the list. The default is `off'. `output-meta' If set to `on', Readline will display characters with the eighth bit set directly rather than as a meta-prefixed escape sequence. The default is `off'. `page-completions' If set to `on', Readline uses an internal `more'-like pager to display a screenful of possible completions at a time. This variable is `on' by default. `print-completions-horizontally' If set to `on', Readline will display completions with matches sorted horizontally in alphabetical order, rather than down the screen. The default is `off'. `revert-all-at-newline' If set to `on', Readline will undo all changes to history lines before returning when `accept-line' is executed. By default, history lines may be modified and retain individual undo lists across calls to `readline'. The default is `off'. `show-all-if-ambiguous' This alters the default behavior of the completion functions. If set to `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 `off'. `show-all-if-unmodified' This alters the default behavior of the completion functions in a fashion similar to SHOW-ALL-IF-AMBIGUOUS. If set to `on', words which have more than one possible completion without any possible partial completion (the possible completions don't share a common prefix) cause the matches to be listed immediately instead of ringing the bell. The default value is `off'. `skip-completed-text' If set to `on', this alters the default completion behavior when inserting a single match into the line. It's only active when performing completion in the middle of a word. If enabled, readline does not insert characters from the completion that match characters after point in the word being completed, so portions of the word following the cursor are not duplicated. For instance, if this is enabled, attempting completion when the cursor is after the `e' in `Makefile' will result in `Makefile' rather than `Makefilefile', assuming there is a single possible completion. The default value is `off'. `visible-stats' If set to `on', a character denoting a file's type is appended to the filename when listing possible completions. The default is `off'. 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. There can be no space between the key name and the colon - that will be interpreted as part of the key name. 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 MACRO). KEYNAME: FUNCTION-NAME or MACRO KEYNAME is the name of a key spelled out in English. For example: Control-u: universal-argument Meta-Rubout: backward-kill-word Control-o: "> output" In the above example, `C-u' is bound to the function `universal-argument', `M-DEL' is bound to the function `backward-kill-word', and `C-o' is bound to run the macro expressed on the right hand side (that is, to insert the text `> output' into the line). A number of symbolic character names are recognized while processing this key binding syntax: DEL, ESC, ESCAPE, LFD, NEWLINE, RET, RETURN, RUBOUT, SPACE, SPC, and TAB. "KEYSEQ": FUNCTION-NAME or MACRO KEYSEQ differs from KEYNAME above in that strings denoting an entire key sequence can be specified, by placing the key sequence in double quotes. Some GNU Emacs style key escapes can be used, as in the following example, but the special character names are not recognized. "\C-u": universal-argument "\C-x\C-r": re-read-init-file "\e[11~": "Function Key 1" In the above example, `C-u' is again bound to the function `universal-argument' (just as it was in the first example), `C-x C-r' is bound to the function `re-read-init-file', and ` <[> <1> <1> <~>' is bound to insert the text `Function Key 1'. The following GNU Emacs style escape sequences are available when specifying key sequences: `\C-' control prefix `\M-' meta prefix `\e' an escape character `\\' backslash `\"' <">, a double quotation mark `\'' <'>, a single quote or apostrophe In addition to the GNU Emacs style escape sequences, a second set of backslash escapes is available: `\a' alert (bell) `\b' backspace `\d' delete `\f' form feed `\n' newline `\r' carriage return `\t' horizontal tab `\v' vertical tab `\NNN' the eight-bit character whose value is the octal value NNN (one to three digits) `\xHH' the eight-bit character whose value is the hexadecimal value HH (one or two hex digits) 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 `"' and `''. For example, the following binding will make `C-x \' insert a single `\' into the line: "\C-x\\": "\\"  File: gdb.info, Node: Conditional Init Constructs, Next: Sample Init File, Prev: Readline Init File Syntax, Up: Readline Init File 32.3.2 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. `$if' The `$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. `mode' The `mode=' form of the `$if' directive is used to test whether Readline is in `emacs' or `vi' mode. This may be used in conjunction with the `set keymap' command, for instance, to set bindings in the `emacs-standard' and `emacs-ctlx' keymaps only if Readline is starting out in `emacs' mode. `term' The `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 `=' is tested against both the full name of the terminal and the portion of the terminal name before the first `-'. This allows `sun' to match both `sun' and `sun-cmd', for instance. `application' The APPLICATION construct is used to include application-specific settings. Each program using the Readline library sets the 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: $if Bash # Quote the current or previous word "\C-xq": "\eb\"\ef\"" $endif `$endif' This command, as seen in the previous example, terminates an `$if' command. `$else' Commands in this branch of the `$if' directive are executed if the test fails. `$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 `/etc/inputrc': $include /etc/inputrc  File: gdb.info, Node: Sample Init File, Prev: Conditional Init Constructs, Up: Readline Init File 32.3.3 Sample Init File ----------------------- Here is an example of an INPUTRC file. This illustrates key binding, variable assignment, and conditional syntax. # 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  File: gdb.info, Node: Bindable Readline Commands, Next: Readline vi Mode, Prev: Readline Init File, Up: Command Line Editing 32.4 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. This section describes Readline commands that may be bound to key sequences. Command names without an accompanying key sequence are unbound by default. In the following descriptions, "point" refers to the current cursor position, and "mark" refers to a cursor position saved by the `set-mark' command. The text between the point and mark is referred to as the "region".  File: gdb.info, Node: Commands For Moving, Next: Commands For History, Up: Bindable Readline Commands 32.4.1 Commands For Moving -------------------------- `beginning-of-line (C-a)' Move to the start of the current line. `end-of-line (C-e)' Move to the end of the line. `forward-char (C-f)' Move forward a character. `backward-char (C-b)' Move back a character. `forward-word (M-f)' Move forward to the end of the next word. Words are composed of letters and digits. `backward-word (M-b)' Move back to the start of the current or previous word. Words are composed of letters and digits. `clear-screen (C-l)' Clear the screen and redraw the current line, leaving the current line at the top of the screen. `redraw-current-line ()' Refresh the current line. By default, this is unbound.  File: gdb.info, Node: Commands For History, Next: Commands For Text, Prev: Commands For Moving, Up: Bindable Readline Commands 32.4.2 Commands For Manipulating The History -------------------------------------------- `accept-line (Newline or Return)' 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 `add_history()'. If this line is a modified history line, the history line is restored to its original state. `previous-history (C-p)' Move `back' through the history list, fetching the previous command. `next-history (C-n)' Move `forward' through the history list, fetching the next command. `beginning-of-history (M-<)' Move to the first line in the history. `end-of-history (M->)' Move to the end of the input history, i.e., the line currently being entered. `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. `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. `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. `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. `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. `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. `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 N, insert the Nth word from the previous command (the words in the previous command begin with word 0). A negative argument inserts the Nth word from the end of the previous command. Once the argument N is computed, the argument is extracted as if the `!N' history expansion had been specified. `yank-last-arg (M-. or M-_)' Insert last argument to the previous command (the last word of the previous history entry). With a numeric argument, behave exactly like `yank-nth-arg'. Successive calls to `yank-last-arg' move back through the history list, inserting the last word (or the word specified by the argument to the first call) of each line in turn. Any numeric argument supplied to these successive calls determines the direction to move through the history. A negative argument switches the direction through the history (back or forward). The history expansion facilities are used to extract the last argument, as if the `!$' history expansion had been specified. gdb-doc-7.6.2/gdb/doc/stack_frame.svg0000644000175000017500000013541012250770607016376 0ustar zumbizumbi image/svg+xml Overview of a Stack Frame 16 March 2009 Jeremy Bennett Free Software Foundation Free Software Foundation www.gnu.org stack frame A diagram showing all the key features of a stack frame in a compiled l Jeremy Bennett n = 0 n = 1 n = 2 n = 3 i = 3 int fact( int n ){ if( 0 == n ) { return 1; } else { return n * fact( n - 1 ); }}main(){ int i; for( i = 0 ; i < 10 ; i++ ) { int f = fact( i ); printf( "%d! = %d\n", i, f ); }} FP PC SP fact (0) fact (1) fact (2) fact (3) main () #-1 #0 #1 #2 #3 #4 FrameNumber Direction ofstack growth f = ? Red Zone gdb-doc-7.6.2/gdb/doc/observer.texi0000644000175000017500000002456512250773211016122 0ustar zumbizumbi@c -*-texinfo-*- @c This file is part of the GDB manual. @c @c Copyright (C) 2003-2013 Free Software Foundation, Inc. @c @c See the file gdbint.texinfo for copying conditions. @c @c Also, the @deftypefun lines from this file are processed into a @c header file during the GDB build process. Permission is granted @c to redistribute and/or modify those lines under the terms of the @c GNU General Public License as published by the Free Software @c Foundation; either version 3 of the License, or (at your option) @c any later version. @node GDB Observers @appendix @value{GDBN} Currently available observers @section Implementation rationale @cindex observers implementation rationale An @dfn{observer} is an entity which is interested in being notified when GDB reaches certain states, or certain events occur in GDB. The entity being observed is called the @dfn{subject}. To receive notifications, the observer attaches a callback to the subject. One subject can have several observers. @file{observer.c} implements an internal generic low-level event notification mechanism. This generic event notification mechanism is then re-used to implement the exported high-level notification management routines for all possible notifications. The current implementation of the generic observer provides support for contextual data. This contextual data is given to the subject when attaching the callback. In return, the subject will provide this contextual data back to the observer as a parameter of the callback. Note that the current support for the contextual data is only partial, as it lacks a mechanism that would deallocate this data when the callback is detached. This is not a problem so far, as this contextual data is only used internally to hold a function pointer. Later on, if a certain observer needs to provide support for user-level contextual data, then the generic notification mechanism will need to be enhanced to allow the observer to provide a routine to deallocate the data when attaching the callback. The observer implementation is also currently not reentrant. In particular, it is therefore not possible to call the attach or detach routines during a notification. @section Debugging Observer notifications can be traced using the command @samp{set debug observer 1} (@pxref{Debugging Output, , Optional messages about internal happenings, gdb, Debugging with @var{GDBN}}). @section @code{normal_stop} Notifications @cindex @code{normal_stop} observer @cindex notification about inferior execution stop @value{GDBN} notifies all @code{normal_stop} observers when the inferior execution has just stopped, the associated messages and annotations have been printed, and the control is about to be returned to the user. Note that the @code{normal_stop} notification is not emitted when the execution stops due to a breakpoint, and this breakpoint has a condition that is not met. If the breakpoint has any associated commands list, the commands are executed after the notification is emitted. The following interfaces are available to manage observers: @deftypefun extern struct observer *observer_attach_@var{event} (observer_@var{event}_ftype *@var{f}) Using the function @var{f}, create an observer that is notified when ever @var{event} occurs, return the observer. @end deftypefun @deftypefun extern void observer_detach_@var{event} (struct observer *@var{observer}); Remove @var{observer} from the list of observers to be notified when @var{event} occurs. @end deftypefun @deftypefun extern void observer_notify_@var{event} (void); Send a notification to all @var{event} observers. @end deftypefun The following observable events are defined: @deftypefun void normal_stop (struct bpstats *@var{bs}, int @var{print_frame}) The inferior has stopped for real. The @var{bs} argument describes the breakpoints were are stopped at, if any. Second argument @var{print_frame} non-zero means display the location where the inferior has stopped. @end deftypefun @deftypefun void target_changed (struct target_ops *@var{target}) The target's register contents have changed. @end deftypefun @deftypefun void executable_changed (void) The executable being debugged by GDB has changed: The user decided to debug a different program, or the program he was debugging has been modified since being loaded by the debugger (by being recompiled, for instance). @end deftypefun @deftypefun void inferior_created (struct target_ops *@var{objfile}, int @var{from_tty}) @value{GDBN} has just connected to an inferior. For @samp{run}, @value{GDBN} calls this observer while the inferior is still stopped at the entry-point instruction. For @samp{attach} and @samp{core}, @value{GDBN} calls this observer immediately after connecting to the inferior, and before any information on the inferior has been printed. @end deftypefun @deftypefun void record_changed (struct inferior *@var{inferior}, int @var{started}) The status of process record for inferior @var{inferior} in @value{GDBN} has changed. The process record is started if @var{started} is true, and the process record is stopped if @var{started} is false. @end deftypefun @deftypefun void solib_loaded (struct so_list *@var{solib}) The shared library specified by @var{solib} has been loaded. Note that when @value{GDBN} calls this observer, the library's symbols probably haven't been loaded yet. @end deftypefun @deftypefun void solib_unloaded (struct so_list *@var{solib}) The shared library specified by @var{solib} has been unloaded. Note that when @value{GDBN} calls this observer, the library's symbols have not been unloaded yet, and thus are still available. @end deftypefun @deftypefun void new_objfile (struct objfile *@var{objfile}) The symbol file specified by @var{objfile} has been loaded. Called with @var{objfile} equal to @code{NULL} to indicate previously loaded symbol table data has now been invalidated. @end deftypefun @deftypefun void new_thread (struct thread_info *@var{t}) The thread specified by @var{t} has been created. @end deftypefun @deftypefun void thread_exit (struct thread_info *@var{t}, int @var{silent}) The thread specified by @var{t} has exited. The @var{silent} argument indicates that @value{GDBN} is removing the thread from its tables without wanting to notify the user about it. @end deftypefun @deftypefun void thread_stop_requested (ptid_t @var{ptid}) An explicit stop request was issued to @var{ptid}. If @var{ptid} equals @var{minus_one_ptid}, the request applied to all threads. If @code{ptid_is_pid(ptid)} returns true, the request applied to all threads of the process pointed at by @var{ptid}. Otherwise, the request applied to the single thread pointed at by @var{ptid}. @end deftypefun @deftypefun void target_resumed (ptid_t @var{ptid}) The target was resumed. The @var{ptid} parameter specifies which thread was resume, and may be RESUME_ALL if all threads are resumed. @end deftypefun @deftypefun void about_to_proceed (void) The target is about to be proceeded. @end deftypefun @deftypefun void breakpoint_created (struct breakpoint *@var{b}) A new breakpoint @var{b} has been created. @end deftypefun @deftypefun void breakpoint_deleted (struct breakpoint *@var{b}) A breakpoint has been destroyed. The argument @var{b} is the pointer to the destroyed breakpoint. @end deftypefun @deftypefun void breakpoint_modified (struct breakpoint *@var{b}) A breakpoint has been modified in some way. The argument @var{b} is the modified breakpoint. @end deftypefun @deftypefun void traceframe_changed (int @var{tfnum}, int @var{tpnum}) The trace frame is changed to @var{tfnum} (e.g., by using the @code{tfind} command). If @var{tfnum} is negative, it means @value{GDBN} resumes live debugging. The number of the tracepoint associated with this traceframe is @var{tpnum}. @end deftypefun @deftypefun void architecture_changed (struct gdbarch *@var{newarch}) The current architecture has changed. The argument @var{newarch} is a pointer to the new architecture. @end deftypefun @deftypefun void thread_ptid_changed (ptid_t @var{old_ptid}, ptid_t @var{new_ptid}) The thread's ptid has changed. The @var{old_ptid} parameter specifies the old value, and @var{new_ptid} specifies the new value. @end deftypefun @deftypefun void inferior_added (struct inferior *@var{inf}) The inferior @var{inf} has been added to the list of inferiors. At this point, it might not be associated with any process. @end deftypefun @deftypefun void inferior_appeared (struct inferior *@var{inf}) The inferior identified by @var{inf} has been attached to a process. @end deftypefun @deftypefun void inferior_exit (struct inferior *@var{inf}) Either the inferior associated with @var{inf} has been detached from the process, or the process has exited. @end deftypefun @deftypefun void inferior_removed (struct inferior *@var{inf}) The inferior @var{inf} has been removed from the list of inferiors. This method is called immediately before freeing @var{inf}. @end deftypefun @deftypefun void memory_changed (struct inferior *@var{inferior}, CORE_ADDR @var{addr}, ssize_t @var{len}, const bfd_byte *@var{data}) Bytes from @var{data} to @var{data} + @var{len} have been written to the @var{inferior} at @var{addr}. @end deftypefun @deftypefun void before_prompt (const char *@var{current_prompt}) Called before a top-level prompt is displayed. @var{current_prompt} is the current top-level prompt. @end deftypefun @deftypefun void gdb_datadir_changed (void) Variable gdb_datadir has been set. The value may not necessarily change. @end deftypefun @deftypefun void command_param_changed (const char *@var{param}, const char *@var{value}) The parameter of some @code{set} commands in console are changed. This method is called after a command @code{set @var{param} @var{value}}. @var{param} is the parameter of @code{set} command, and @var{value} is the value of changed parameter. @end deftypefun @deftypefun void tsv_created (const struct trace_state_variable *@var{tsv}) The new trace state variable @var{tsv} is created. @end deftypefun @deftypefun void tsv_deleted (const struct trace_state_variable *@var{tsv}) The trace state variable @var{tsv} is deleted. If @var{tsv} is @code{NULL}, all trace state variables are deleted. @end deftypefun @deftypefun void tsv_modified (const struct trace_state_variable *@var{tsv}) The trace state value @var{tsv} is modified. @end deftypefun @deftypefun void test_notification (int @var{somearg}) This observer is used for internal testing. Do not use. See testsuite/gdb.gdb/observer.exp. @end deftypefun gdb-doc-7.6.2/gdb/doc/gdb.info-30000644000175000017500000107774312250773371015167 0ustar zumbizumbiThis is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo. INFO-DIR-SECTION Software development START-INFO-DIR-ENTRY * Gdb: (gdb). The GNU debugger. END-INFO-DIR-ENTRY Copyright (C) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom." This file documents the GNU debugger GDB. This is the Tenth Edition, of `Debugging with GDB: the GNU Source-Level Debugger' for GDB (GDB) Version 7.6.2. Copyright (C) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom."  File: gdb.info, Node: MiniDebugInfo, Next: Index Files, Prev: Separate Debug Files, Up: GDB Files 18.3 Debugging information in a special section =============================================== Some systems ship pre-built executables and libraries that have a special `.gnu_debugdata' section. This feature is called "MiniDebugInfo". This section holds an LZMA-compressed object and is used to supply extra symbols for backtraces. The intent of this section is to provide extra minimal debugging information for use in simple backtraces. It is not intended to be a replacement for full separate debugging information (*note Separate Debug Files::). The example below shows the intended use; however, GDB does not currently put restrictions on what sort of debugging information might be included in the section. GDB has support for this extension. If the section exists, then it is used provided that no other source of debugging information can be found, and that GDB was configured with LZMA support. This section can be easily created using `objcopy' and other standard utilities: # Extract the dynamic symbols from the main binary, there is no need # to also have these in the normal symbol table nm -D BINARY --format=posix --defined-only \ | awk '{ print $1 }' | sort > dynsyms # Extract all the text (i.e. function) symbols from the debuginfo . nm BINARY --format=posix --defined-only \ | awk '{ if ($2 == "T" || $2 == "t") print $1 }' \ | sort > funcsyms # Keep all the function symbols not already in the dynamic symbol # table. comm -13 dynsyms funcsyms > keep_symbols # Copy the full debuginfo, keeping only a minimal set of symbols and # removing some unnecessary sections. objcopy -S --remove-section .gdb_index --remove-section .comment \ --keep-symbols=keep_symbols BINARY mini_debuginfo # Inject the compressed data into the .gnu_debugdata section of the # original binary. xz mini_debuginfo objcopy --add-section .gnu_debugdata=mini_debuginfo.xz BINARY  File: gdb.info, Node: Index Files, Next: Symbol Errors, Prev: MiniDebugInfo, Up: GDB Files 18.4 Index Files Speed Up GDB ============================= When GDB finds a symbol file, it scans the symbols in the file in order to construct an internal symbol table. This lets most GDB operations work quickly--at the cost of a delay early on. For large programs, this delay can be quite lengthy, so GDB provides a way to build an index, which speeds up startup. The index is stored as a section in the symbol file. GDB can write the index to a file, then you can put it into the symbol file using `objcopy'. To create an index file, use the `save gdb-index' command: `save gdb-index DIRECTORY' Create an index file for each symbol file currently known by GDB. Each file is named after its corresponding symbol file, with `.gdb-index' appended, and is written into the given DIRECTORY. Once you have created an index file you can merge it into your symbol file, here named `symfile', using `objcopy': $ objcopy --add-section .gdb_index=symfile.gdb-index \ --set-section-flags .gdb_index=readonly symfile symfile GDB will normally ignore older versions of `.gdb_index' sections that have been deprecated. Usually they are deprecated because they are missing a new feature or have performance issues. To tell GDB to use a deprecated index section anyway specify `set use-deprecated-index-sections on'. The default is `off'. This can speed up startup, but may result in some functionality being lost. *Note Index Section Format::. _Warning:_ Setting `use-deprecated-index-sections' to `on' must be done before gdb reads the file. The following will not work: $ gdb -ex "set use-deprecated-index-sections on" Instead you must do, for example, $ gdb -iex "set use-deprecated-index-sections on" There are currently some limitation on indices. They only work when for DWARF debugging information, not stabs. And, they do not currently work for programs using Ada.  File: gdb.info, Node: Symbol Errors, Next: Data Files, Prev: Index Files, Up: GDB Files 18.5 Errors Reading Symbol Files ================================ While reading a symbol file, GDB occasionally encounters problems, such as symbol types it does not recognize, or known bugs in compiler output. By default, GDB does not notify you of such problems, since they are relatively common and primarily of interest to people debugging compilers. If you are interested in seeing information about ill-constructed symbol tables, you can either ask GDB to print only one message about each such type of problem, no matter how many times the problem occurs; or you can ask GDB to print more messages, to see how many times the problems occur, with the `set complaints' command (*note Optional Warnings and Messages: Messages/Warnings.). The messages currently printed, and their meanings, include: `inner block not inside outer block in SYMBOL' The symbol information shows where symbol scopes begin and end (such as at the start of a function or a block of statements). This error indicates that an inner scope block is not fully contained in its outer scope blocks. GDB circumvents the problem by treating the inner block as if it had the same scope as the outer block. In the error message, SYMBOL may be shown as "`(don't know)'" if the outer block is not a function. `block at ADDRESS out of order' The symbol information for symbol scope blocks should occur in order of increasing addresses. This error indicates that it does not do so. GDB does not circumvent this problem, and has trouble locating symbols in the source file whose symbols it is reading. (You can often determine what source file is affected by specifying `set verbose on'. *Note Optional Warnings and Messages: Messages/Warnings.) `bad block start address patched' The symbol information for a symbol scope block has a start address smaller than the address of the preceding source line. This is known to occur in the SunOS 4.1.1 (and earlier) C compiler. GDB circumvents the problem by treating the symbol scope block as starting on the previous source line. `bad string table offset in symbol N' Symbol number N contains a pointer into the string table which is larger than the size of the string table. GDB circumvents the problem by considering the symbol to have the name `foo', which may cause other problems if many symbols end up with this name. `unknown symbol type `0xNN'' The symbol information contains new data types that GDB does not yet know how to read. `0xNN' is the symbol type of the uncomprehended information, in hexadecimal. GDB circumvents the error by ignoring this symbol information. This usually allows you to debug your program, though certain symbols are not accessible. If you encounter such a problem and feel like debugging it, you can debug `gdb' with itself, breakpoint on `complain', then go up to the function `read_dbx_symtab' and examine `*bufp' to see the symbol. `stub type has NULL name' GDB could not find the full definition for a struct or class. `const/volatile indicator missing (ok if using g++ v1.x), got...' The symbol information for a C++ member function is missing some information that recent versions of the compiler should have output for it. `info mismatch between compiler and debugger' GDB could not parse a type specification output by the compiler.  File: gdb.info, Node: Data Files, Prev: Symbol Errors, Up: GDB Files 18.6 GDB Data Files =================== GDB will sometimes read an auxiliary data file. These files are kept in a directory known as the "data directory". You can set the data directory's name, and view the name GDB is currently using. `set data-directory DIRECTORY' Set the directory which GDB searches for auxiliary data files to DIRECTORY. `show data-directory' Show the directory GDB searches for auxiliary data files. You can set the default data directory by using the configure-time `--with-gdb-datadir' option. If the data directory is inside GDB's configured binary prefix (set with `--prefix' or `--exec-prefix'), then the default data directory will be updated automatically if the installed GDB is moved to a new location. The data directory may also be specified with the `--data-directory' command line option. *Note Mode Options::.  File: gdb.info, Node: Targets, Next: Remote Debugging, Prev: GDB Files, Up: Top 19 Specifying a Debugging Target ******************************** A "target" is the execution environment occupied by your program. Often, GDB runs in the same host environment as your program; in that case, the debugging target is specified as a side effect when you use the `file' or `core' commands. When you need more flexibility--for example, running GDB on a physically separate host, or controlling a standalone system over a serial port or a realtime system over a TCP/IP connection--you can use the `target' command to specify one of the target types configured for GDB (*note Commands for Managing Targets: Target Commands.). It is possible to build GDB for several different "target architectures". When GDB is built like that, you can choose one of the available architectures with the `set architecture' command. `set architecture ARCH' This command sets the current target architecture to ARCH. The value of ARCH can be `"auto"', in addition to one of the supported architectures. `show architecture' Show the current target architecture. `set processor' `processor' These are alias commands for, respectively, `set architecture' and `show architecture'. * Menu: * Active Targets:: Active targets * Target Commands:: Commands for managing targets * Byte Order:: Choosing target byte order  File: gdb.info, Node: Active Targets, Next: Target Commands, Up: Targets 19.1 Active Targets =================== There are multiple classes of targets such as: processes, executable files or recording sessions. Core files belong to the process class, making core file and process mutually exclusive. Otherwise, GDB can work concurrently on multiple active targets, one in each class. This allows you to (for example) start a process and inspect its activity, while still having access to the executable file after the process finishes. Or if you start process recording (*note Reverse Execution::) and `reverse-step' there, you are presented a virtual layer of the recording target, while the process target remains stopped at the chronologically last point of the process execution. Use the `core-file' and `exec-file' commands to select a new core file or executable target (*note Commands to Specify Files: Files.). To specify as a target a process that is already running, use the `attach' command (*note Debugging an Already-running Process: Attach.).  File: gdb.info, Node: Target Commands, Next: Byte Order, Prev: Active Targets, Up: Targets 19.2 Commands for Managing Targets ================================== `target TYPE PARAMETERS' Connects the GDB host environment to a target machine or process. A target is typically a protocol for talking to debugging facilities. You use the argument TYPE to specify the type or protocol of the target machine. Further PARAMETERS are interpreted by the target protocol, but typically include things like device names or host names to connect with, process numbers, and baud rates. The `target' command does not repeat if you press again after executing the command. `help target' Displays the names of all targets available. To display targets currently selected, use either `info target' or `info files' (*note Commands to Specify Files: Files.). `help target NAME' Describe a particular target, including any parameters necessary to select it. `set gnutarget ARGS' GDB uses its own library BFD to read your files. GDB knows whether it is reading an "executable", a "core", or a ".o" file; however, you can specify the file format with the `set gnutarget' command. Unlike most `target' commands, with `gnutarget' the `target' refers to a program, not a machine. _Warning:_ To specify a file format with `set gnutarget', you must know the actual BFD name. *Note Commands to Specify Files: Files. `show gnutarget' Use the `show gnutarget' command to display what file format `gnutarget' is set to read. If you have not set `gnutarget', GDB will determine the file format for each file automatically, and `show gnutarget' displays `The current BFD target is "auto"'. Here are some common targets (available, or not, depending on the GDB configuration): `target exec PROGRAM' An executable file. `target exec PROGRAM' is the same as `exec-file PROGRAM'. `target core FILENAME' A core dump file. `target core FILENAME' is the same as `core-file FILENAME'. `target remote MEDIUM' A remote system connected to GDB via a serial line or network connection. This command tells GDB to use its own remote protocol over MEDIUM for debugging. *Note Remote Debugging::. For example, if you have a board connected to `/dev/ttya' on the machine running GDB, you could say: target remote /dev/ttya `target remote' supports the `load' command. This is only useful if you have some other way of getting the stub to the target system, and you can put it somewhere in memory where it won't get clobbered by the download. `target sim [SIMARGS] ...' Builtin CPU simulator. GDB includes simulators for most architectures. In general, target sim load run works; however, you cannot assume that a specific memory map, device drivers, or even basic I/O is available, although some simulators do provide these. For info about any processor-specific simulator details, see the appropriate section in *note Embedded Processors: Embedded Processors. Some configurations may include these targets as well: `target nrom DEV' NetROM ROM emulator. This target only supports downloading. Different targets are available on different configurations of GDB; your configuration may have more or fewer targets. Many remote targets require you to download the executable's code once you've successfully established a connection. You may wish to control various aspects of this process. `set hash' This command controls whether a hash mark `#' is displayed while downloading a file to the remote monitor. If on, a hash mark is displayed after each S-record is successfully downloaded to the monitor. `show hash' Show the current status of displaying the hash mark. `set debug monitor' Enable or disable display of communications messages between GDB and the remote monitor. `show debug monitor' Show the current status of displaying communications between GDB and the remote monitor. `load FILENAME' Depending on what remote debugging facilities are configured into GDB, the `load' command may be available. Where it exists, it is meant to make FILENAME (an executable) available for debugging on the remote system--by downloading, or dynamic linking, for example. `load' also records the FILENAME symbol table in GDB, like the `add-symbol-file' command. If your GDB does not have a `load' command, attempting to execute it gets the error message "`You can't do that when your target is ...'" The file is loaded at whatever address is specified in the executable. For some object file formats, you can specify the load address when you link the program; for other formats, like a.out, the object file format specifies a fixed address. Depending on the remote side capabilities, GDB may be able to load programs into flash memory. `load' does not repeat if you press again after using it.  File: gdb.info, Node: Byte Order, Prev: Target Commands, Up: Targets 19.3 Choosing Target Byte Order =============================== Some types of processors, such as the MIPS, PowerPC, and Renesas SH, offer the ability to run either big-endian or little-endian byte orders. Usually the executable or symbol will include a bit to designate the endian-ness, and you will not need to worry about which to use. However, you may still find it useful to adjust GDB's idea of processor endian-ness manually. `set endian big' Instruct GDB to assume the target is big-endian. `set endian little' Instruct GDB to assume the target is little-endian. `set endian auto' Instruct GDB to use the byte order associated with the executable. `show endian' Display GDB's current idea of the target byte order. Note that these commands merely adjust interpretation of symbolic data on the host, and that they have absolutely no effect on the target system.  File: gdb.info, Node: Remote Debugging, Next: Configurations, Prev: Targets, Up: Top 20 Debugging Remote Programs **************************** If you are trying to debug a program running on a machine that cannot run GDB in the usual way, it is often useful to use remote debugging. For example, you might use remote debugging on an operating system kernel, or on a small system which does not have a general purpose operating system powerful enough to run a full-featured debugger. Some configurations of GDB have special serial or TCP/IP interfaces to make this work with particular debugging targets. In addition, GDB comes with a generic serial protocol (specific to GDB, but not specific to any particular target system) which you can use if you write the remote stubs--the code that runs on the remote system to communicate with GDB. Other remote targets may be available in your configuration of GDB; use `help target' to list them. * Menu: * Connecting:: Connecting to a remote target * File Transfer:: Sending files to a remote system * Server:: Using the gdbserver program * Remote Configuration:: Remote configuration * Remote Stub:: Implementing a remote stub  File: gdb.info, Node: Connecting, Next: File Transfer, Up: Remote Debugging 20.1 Connecting to a Remote Target ================================== On the GDB host machine, you will need an unstripped copy of your program, since GDB needs symbol and debugging information. Start up GDB as usual, using the name of the local copy of your program as the first argument. GDB can communicate with the target over a serial line, or over an IP network using TCP or UDP. In each case, GDB uses the same protocol for debugging your program; only the medium carrying the debugging packets varies. The `target remote' command establishes a connection to the target. Its arguments indicate which medium to use: `target remote SERIAL-DEVICE' Use SERIAL-DEVICE to communicate with the target. For example, to use a serial line connected to the device named `/dev/ttyb': target remote /dev/ttyb If you're using a serial line, you may want to give GDB the `--baud' option, or use the `set remotebaud' command (*note set remotebaud: Remote Configuration.) before the `target' command. `target remote `HOST:PORT'' `target remote `tcp:HOST:PORT'' Debug using a TCP connection to PORT on HOST. The HOST may be either a host name or a numeric IP address; PORT must be a decimal number. The HOST could be the target machine itself, if it is directly connected to the net, or it might be a terminal server which in turn has a serial line to the target. For example, to connect to port 2828 on a terminal server named `manyfarms': target remote manyfarms:2828 If your remote target is actually running on the same machine as your debugger session (e.g. a simulator for your target running on the same host), you can omit the hostname. For example, to connect to port 1234 on your local machine: target remote :1234 Note that the colon is still required here. `target remote `udp:HOST:PORT'' Debug using UDP packets to PORT on HOST. For example, to connect to UDP port 2828 on a terminal server named `manyfarms': target remote udp:manyfarms:2828 When using a UDP connection for remote debugging, you should keep in mind that the `U' stands for "Unreliable". UDP can silently drop packets on busy or unreliable networks, which will cause havoc with your debugging session. `target remote | COMMAND' Run COMMAND in the background and communicate with it using a pipe. The COMMAND is a shell command, to be parsed and expanded by the system's command shell, `/bin/sh'; it should expect remote protocol packets on its standard input, and send replies on its standard output. You could use this to run a stand-alone simulator that speaks the remote debugging protocol, to make net connections using programs like `ssh', or for other similar tricks. If COMMAND closes its standard output (perhaps by exiting), GDB will try to send it a `SIGTERM' signal. (If the program has already exited, this will have no effect.) Once the connection has been established, you can use all the usual commands to examine and change data. The remote program is already running; you can use `step' and `continue', and you do not need to use `run'. Whenever GDB is waiting for the remote program, if you type the interrupt character (often `Ctrl-c'), GDB attempts to stop the program. This may or may not succeed, depending in part on the hardware and the serial drivers the remote system uses. If you type the interrupt character once again, GDB displays this prompt: Interrupted while waiting for the program. Give up (and stop debugging it)? (y or n) If you type `y', GDB abandons the remote debugging session. (If you decide you want to try again later, you can use `target remote' again to connect once more.) If you type `n', GDB goes back to waiting. `detach' When you have finished debugging the remote program, you can use the `detach' command to release it from GDB control. Detaching from the target normally resumes its execution, but the results will depend on your particular remote stub. After the `detach' command, GDB is free to connect to another target. `disconnect' The `disconnect' command behaves like `detach', except that the target is generally not resumed. It will wait for GDB (this instance or another one) to connect and continue debugging. After the `disconnect' command, GDB is again free to connect to another target. `monitor CMD' This command allows you to send arbitrary commands directly to the remote monitor. Since GDB doesn't care about the commands it sends like this, this command is the way to extend GDB--you can add new commands that only the external monitor will understand and implement.  File: gdb.info, Node: File Transfer, Next: Server, Prev: Connecting, Up: Remote Debugging 20.2 Sending files to a remote system ===================================== Some remote targets offer the ability to transfer files over the same connection used to communicate with GDB. This is convenient for targets accessible through other means, e.g. GNU/Linux systems running `gdbserver' over a network interface. For other targets, e.g. embedded devices with only a single serial port, this may be the only way to upload or download files. Not all remote targets support these commands. `remote put HOSTFILE TARGETFILE' Copy file HOSTFILE from the host system (the machine running GDB) to TARGETFILE on the target system. `remote get TARGETFILE HOSTFILE' Copy file TARGETFILE from the target system to HOSTFILE on the host system. `remote delete TARGETFILE' Delete TARGETFILE from the target system.  File: gdb.info, Node: Server, Next: Remote Configuration, Prev: File Transfer, Up: Remote Debugging 20.3 Using the `gdbserver' Program ================================== `gdbserver' is a control program for Unix-like systems, which allows you to connect your program with a remote GDB via `target remote'--but without linking in the usual debugging stub. `gdbserver' is not a complete replacement for the debugging stubs, because it requires essentially the same operating-system facilities that GDB itself does. In fact, a system that can run `gdbserver' to connect to a remote GDB could also run GDB locally! `gdbserver' is sometimes useful nevertheless, because it is a much smaller program than GDB itself. It is also easier to port than all of GDB, so you may be able to get started more quickly on a new system by using `gdbserver'. Finally, if you develop code for real-time systems, you may find that the tradeoffs involved in real-time operation make it more convenient to do as much development work as possible on another system, for example by cross-compiling. You can use `gdbserver' to make a similar choice for debugging. GDB and `gdbserver' communicate via either a serial line or a TCP connection, using the standard GDB remote serial protocol. _Warning:_ `gdbserver' does not have any built-in security. Do not run `gdbserver' connected to any public network; a GDB connection to `gdbserver' provides access to the target system with the same privileges as the user running `gdbserver'. 20.3.1 Running `gdbserver' -------------------------- Run `gdbserver' on the target system. You need a copy of the program you want to debug, including any libraries it requires. `gdbserver' does not need your program's symbol table, so you can strip the program if necessary to save space. GDB on the host system does all the symbol handling. To use the server, you must tell it how to communicate with GDB; the name of your program; and the arguments for your program. The usual syntax is: target> gdbserver COMM PROGRAM [ ARGS ... ] COMM is either a device name (to use a serial line), or a TCP hostname and portnumber, or `-' or `stdio' to use stdin/stdout of `gdbserver'. For example, to debug Emacs with the argument `foo.txt' and communicate with GDB over the serial port `/dev/com1': target> gdbserver /dev/com1 emacs foo.txt `gdbserver' waits passively for the host GDB to communicate with it. To use a TCP connection instead of a serial line: target> gdbserver host:2345 emacs foo.txt The only difference from the previous example is the first argument, specifying that you are communicating with the host GDB via TCP. The `host:2345' argument means that `gdbserver' is to expect a TCP connection from machine `host' to local TCP port 2345. (Currently, the `host' part is ignored.) You can choose any number you want for the port number as long as it does not conflict with any TCP ports already in use on the target system (for example, `23' is reserved for `telnet').(1) You must use the same port number with the host GDB `target remote' command. The `stdio' connection is useful when starting `gdbserver' with ssh: (gdb) target remote | ssh -T hostname gdbserver - hello The `-T' option to ssh is provided because we don't need a remote pty, and we don't want escape-character handling. Ssh does this by default when a command is provided, the flag is provided to make it explicit. You could elide it if you want to. Programs started with stdio-connected gdbserver have `/dev/null' for `stdin', and `stdout',`stderr' are sent back to gdb for display through a pipe connected to gdbserver. Both `stdout' and `stderr' use the same pipe. 20.3.1.1 Attaching to a Running Program ....................................... On some targets, `gdbserver' can also attach to running programs. This is accomplished via the `--attach' argument. The syntax is: target> gdbserver --attach COMM PID PID is the process ID of a currently running process. It isn't necessary to point `gdbserver' at a binary for the running process. You can debug processes by name instead of process ID if your target has the `pidof' utility: target> gdbserver --attach COMM `pidof PROGRAM` In case more than one copy of PROGRAM is running, or PROGRAM has multiple threads, most versions of `pidof' support the `-s' option to only return the first process ID. 20.3.1.2 Multi-Process Mode for `gdbserver' ........................................... When you connect to `gdbserver' using `target remote', `gdbserver' debugs the specified program only once. When the program exits, or you detach from it, GDB closes the connection and `gdbserver' exits. If you connect using `target extended-remote', `gdbserver' enters multi-process mode. When the debugged program exits, or you detach from it, GDB stays connected to `gdbserver' even though no program is running. The `run' and `attach' commands instruct `gdbserver' to run or attach to a new program. The `run' command uses `set remote exec-file' (*note set remote exec-file::) to select the program to run. Command line arguments are supported, except for wildcard expansion and I/O redirection (*note Arguments::). To start `gdbserver' without supplying an initial command to run or process ID to attach, use the `--multi' command line option. Then you can connect using `target extended-remote' and start the program you want to debug. In multi-process mode `gdbserver' does not automatically exit unless you use the option `--once'. You can terminate it by using `monitor exit' (*note Monitor Commands for gdbserver::). Note that the conditions under which `gdbserver' terminates depend on how GDB connects to it (`target remote' or `target extended-remote'). The `--multi' option to `gdbserver' has no influence on that. 20.3.1.3 TCP port allocation lifecycle of `gdbserver' ..................................................... This section applies only when `gdbserver' is run to listen on a TCP port. `gdbserver' normally terminates after all of its debugged processes have terminated in `target remote' mode. On the other hand, for `target extended-remote', `gdbserver' stays running even with no processes left. GDB normally terminates the spawned debugged process on its exit, which normally also terminates `gdbserver' in the `target remote' mode. Therefore, when the connection drops unexpectedly, and GDB cannot ask `gdbserver' to kill its debugged processes, `gdbserver' stays running even in the `target remote' mode. When `gdbserver' stays running, GDB can connect to it again later. Such reconnecting is useful for features like *note disconnected tracing::. For completeness, at most one GDB can be connected at a time. By default, `gdbserver' keeps the listening TCP port open, so that additional connections are possible. However, if you start `gdbserver' with the `--once' option, it will stop listening for any further connection attempts after connecting to the first GDB session. This means no further connections to `gdbserver' will be possible after the first one. It also means `gdbserver' will terminate after the first connection with remote GDB has closed, even for unexpectedly closed connections and even in the `target extended-remote' mode. The `--once' option allows reusing the same port number for connecting to multiple instances of `gdbserver' running on the same host, since each instance closes its port after the first connection. 20.3.1.4 Other Command-Line Arguments for `gdbserver' ..................................................... The `--debug' option tells `gdbserver' to display extra status information about the debugging process. The `--remote-debug' option tells `gdbserver' to display remote protocol debug output. These options are intended for `gdbserver' development and for bug reports to the developers. The `--wrapper' option specifies a wrapper to launch programs for debugging. The option should be followed by the name of the wrapper, then any command-line arguments to pass to the wrapper, then `--' indicating the end of the wrapper arguments. `gdbserver' runs the specified wrapper program with a combined command line including the wrapper arguments, then the name of the program to debug, then any arguments to the program. The wrapper runs until it executes your program, and then GDB gains control. You can use any program that eventually calls `execve' with its arguments as a wrapper. Several standard Unix utilities do this, e.g. `env' and `nohup'. Any Unix shell script ending with `exec "$@"' will also work. For example, you can use `env' to pass an environment variable to the debugged program, without setting the variable in `gdbserver''s environment: $ gdbserver --wrapper env LD_PRELOAD=libtest.so -- :2222 ./testprog 20.3.2 Connecting to `gdbserver' -------------------------------- Run GDB on the host system. First make sure you have the necessary symbol files. Load symbols for your application using the `file' command before you connect. Use `set sysroot' to locate target libraries (unless your GDB was compiled with the correct sysroot using `--with-sysroot'). The symbol file and target libraries must exactly match the executable and libraries on the target, with one exception: the files on the host system should not be stripped, even if the files on the target system are. Mismatched or missing files will lead to confusing results during debugging. On GNU/Linux targets, mismatched or missing files may also prevent `gdbserver' from debugging multi-threaded programs. Connect to your target (*note Connecting to a Remote Target: Connecting.). For TCP connections, you must start up `gdbserver' prior to using the `target remote' command. Otherwise you may get an error whose text depends on the host system, but which usually looks something like `Connection refused'. Don't use the `load' command in GDB when using `gdbserver', since the program is already on the target. 20.3.3 Monitor Commands for `gdbserver' --------------------------------------- During a GDB session using `gdbserver', you can use the `monitor' command to send special requests to `gdbserver'. Here are the available commands. `monitor help' List the available monitor commands. `monitor set debug 0' `monitor set debug 1' Disable or enable general debugging messages. `monitor set remote-debug 0' `monitor set remote-debug 1' Disable or enable specific debugging messages associated with the remote protocol (*note Remote Protocol::). `monitor set libthread-db-search-path [PATH]' When this command is issued, PATH is a colon-separated list of directories to search for `libthread_db' (*note set libthread-db-search-path: Threads.). If you omit PATH, `libthread-db-search-path' will be reset to its default value. The special entry `$pdir' for `libthread-db-search-path' is not supported in `gdbserver'. `monitor exit' Tell gdbserver to exit immediately. This command should be followed by `disconnect' to close the debugging session. `gdbserver' will detach from any attached processes and kill any processes it created. Use `monitor exit' to terminate `gdbserver' at the end of a multi-process mode debug session. 20.3.4 Tracepoints support in `gdbserver' ----------------------------------------- On some targets, `gdbserver' supports tracepoints, fast tracepoints and static tracepoints. For fast or static tracepoints to work, a special library called the "in-process agent" (IPA), must be loaded in the inferior process. This library is built and distributed as an integral part of `gdbserver'. In addition, support for static tracepoints requires building the in-process agent library with static tracepoints support. At present, the UST (LTTng Userspace Tracer, `http://lttng.org/ust') tracing engine is supported. This support is automatically available if UST development headers are found in the standard include path when `gdbserver' is built, or if `gdbserver' was explicitly configured using `--with-ust' to point at such headers. You can explicitly disable the support using `--with-ust=no'. There are several ways to load the in-process agent in your program: `Specifying it as dependency at link time' You can link your program dynamically with the in-process agent library. On most systems, this is accomplished by adding `-linproctrace' to the link command. `Using the system's preloading mechanisms' You can force loading the in-process agent at startup time by using your system's support for preloading shared libraries. Many Unixes support the concept of preloading user defined libraries. In most cases, you do that by specifying `LD_PRELOAD=libinproctrace.so' in the environment. See also the description of `gdbserver''s `--wrapper' command line option. `Using GDB to force loading the agent at run time' On some systems, you can force the inferior to load a shared library, by calling a dynamic loader function in the inferior that takes care of dynamically looking up and loading a shared library. On most Unix systems, the function is `dlopen'. You'll use the `call' command for that. For example: (gdb) call dlopen ("libinproctrace.so", ...) Note that on most Unix systems, for the `dlopen' function to be available, the program needs to be linked with `-ldl'. On systems that have a userspace dynamic loader, like most Unix systems, when you connect to `gdbserver' using `target remote', you'll find that the program is stopped at the dynamic loader's entry point, and no shared library has been loaded in the program's address space yet, including the in-process agent. In that case, before being able to use any of the fast or static tracepoints features, you need to let the loader run and load the shared libraries. The simplest way to do that is to run the program to the main procedure. E.g., if debugging a C or C++ program, start `gdbserver' like so: $ gdbserver :9999 myprogram Start GDB and connect to `gdbserver' like so, and run to main: $ gdb myprogram (gdb) target remote myhost:9999 0x00007f215893ba60 in ?? () from /lib64/ld-linux-x86-64.so.2 (gdb) b main (gdb) continue The in-process tracing agent library should now be loaded into the process; you can confirm it with the `info sharedlibrary' command, which will list `libinproctrace.so' as loaded in the process. You are now ready to install fast tracepoints, list static tracepoint markers, probe static tracepoints markers, and start tracing. ---------- Footnotes ---------- (1) If you choose a port number that conflicts with another service, `gdbserver' prints an error message and exits.  File: gdb.info, Node: Remote Configuration, Next: Remote Stub, Prev: Server, Up: Remote Debugging 20.4 Remote Configuration ========================= This section documents the configuration options available when debugging remote programs. For the options related to the File I/O extensions of the remote protocol, see *note system-call-allowed: system. `set remoteaddresssize BITS' Set the maximum size of address in a memory packet to the specified number of bits. GDB will mask off the address bits above that number, when it passes addresses to the remote target. The default value is the number of bits in the target's address. `show remoteaddresssize' Show the current value of remote address size in bits. `set remotebaud N' Set the baud rate for the remote serial I/O to N baud. The value is used to set the speed of the serial port used for debugging remote targets. `show remotebaud' Show the current speed of the remote connection. `set remotebreak' If set to on, GDB sends a `BREAK' signal to the remote when you type `Ctrl-c' to interrupt the program running on the remote. If set to off, GDB sends the `Ctrl-C' character instead. The default is off, since most remote systems expect to see `Ctrl-C' as the interrupt signal. `show remotebreak' Show whether GDB sends `BREAK' or `Ctrl-C' to interrupt the remote program. `set remoteflow on' `set remoteflow off' Enable or disable hardware flow control (`RTS'/`CTS') on the serial port used to communicate to the remote target. `show remoteflow' Show the current setting of hardware flow control. `set remotelogbase BASE' Set the base (a.k.a. radix) of logging serial protocol communications to BASE. Supported values of BASE are: `ascii', `octal', and `hex'. The default is `ascii'. `show remotelogbase' Show the current setting of the radix for logging remote serial protocol. `set remotelogfile FILE' Record remote serial communications on the named FILE. The default is not to record at all. `show remotelogfile.' Show the current setting of the file name on which to record the serial communications. `set remotetimeout NUM' Set the timeout limit to wait for the remote target to respond to NUM seconds. The default is 2 seconds. `show remotetimeout' Show the current number of seconds to wait for the remote target responses. `set remote hardware-watchpoint-limit LIMIT' `set remote hardware-breakpoint-limit LIMIT' Restrict GDB to using LIMIT remote hardware breakpoint or watchpoints. A limit of -1, the default, is treated as unlimited. `set remote hardware-watchpoint-length-limit LIMIT' Restrict GDB to using LIMIT bytes for the maximum length of a remote hardware watchpoint. A limit of -1, the default, is treated as unlimited. `show remote hardware-watchpoint-length-limit' Show the current limit (in bytes) of the maximum length of a remote hardware watchpoint. `set remote exec-file FILENAME' `show remote exec-file' Select the file used for `run' with `target extended-remote'. This should be set to a filename valid on the target system. If it is not set, the target will use a default filename (e.g. the last program run). `set remote interrupt-sequence' Allow the user to select one of `Ctrl-C', a `BREAK' or `BREAK-g' as the sequence to the remote target in order to interrupt the execution. `Ctrl-C' is a default. Some system prefers `BREAK' which is high level of serial line for some certain time. Linux kernel prefers `BREAK-g', a.k.a Magic SysRq g. It is `BREAK' signal followed by character `g'. `show interrupt-sequence' Show which of `Ctrl-C', `BREAK' or `BREAK-g' is sent by GDB to interrupt the remote program. `BREAK-g' is BREAK signal followed by `g' and also known as Magic SysRq g. `set remote interrupt-on-connect' Specify whether interrupt-sequence is sent to remote target when GDB connects to it. This is mostly needed when you debug Linux kernel. Linux kernel expects `BREAK' followed by `g' which is known as Magic SysRq g in order to connect GDB. `show interrupt-on-connect' Show whether interrupt-sequence is sent to remote target when GDB connects to it. `set tcp auto-retry on' Enable auto-retry for remote TCP connections. This is useful if the remote debugging agent is launched in parallel with GDB; there is a race condition because the agent may not become ready to accept the connection before GDB attempts to connect. When auto-retry is enabled, if the initial attempt to connect fails, GDB reattempts to establish the connection using the timeout specified by `set tcp connect-timeout'. `set tcp auto-retry off' Do not auto-retry failed TCP connections. `show tcp auto-retry' Show the current auto-retry setting. `set tcp connect-timeout SECONDS' Set the timeout for establishing a TCP connection to the remote target to SECONDS. The timeout affects both polling to retry failed connections (enabled by `set tcp auto-retry on') and waiting for connections that are merely slow to complete, and represents an approximate cumulative value. `show tcp connect-timeout' Show the current connection timeout setting. The GDB remote protocol autodetects the packets supported by your debugging stub. If you need to override the autodetection, you can use these commands to enable or disable individual packets. Each packet can be set to `on' (the remote target supports this packet), `off' (the remote target does not support this packet), or `auto' (detect remote target support for this packet). They all default to `auto'. For more information about each packet, see *note Remote Protocol::. During normal use, you should not have to use any of these commands. If you do, that may be a bug in your remote debugging stub, or a bug in GDB. You may want to report the problem to the GDB developers. For each packet NAME, the command to enable or disable the packet is `set remote NAME-packet'. The available settings are: Command Name Remote Packet Related Features `fetch-register' `p' `info registers' `set-register' `P' `set' `binary-download' `X' `load', `set' `read-aux-vector' `qXfer:auxv:read' `info auxv' `symbol-lookup' `qSymbol' Detecting multiple threads `attach' `vAttach' `attach' `verbose-resume' `vCont' Stepping or resuming multiple threads `run' `vRun' `run' `software-breakpoint'`Z0' `break' `hardware-breakpoint'`Z1' `hbreak' `write-watchpoint' `Z2' `watch' `read-watchpoint' `Z3' `rwatch' `access-watchpoint' `Z4' `awatch' `target-features' `qXfer:features:read' `set architecture' `library-info' `qXfer:libraries:read' `info sharedlibrary' `memory-map' `qXfer:memory-map:read' `info mem' `read-sdata-object' `qXfer:sdata:read' `print $_sdata' `read-spu-object' `qXfer:spu:read' `info spu' `write-spu-object' `qXfer:spu:write' `info spu' `read-siginfo-object'`qXfer:siginfo:read' `print $_siginfo' `write-siginfo-object'`qXfer:siginfo:write' `set $_siginfo' `threads' `qXfer:threads:read' `info threads' `get-thread-local- `qGetTLSAddr' Displaying storage-address' `__thread' variables `get-thread-information-block-address'`qGetTIBAddr' Display MS-Windows Thread Information Block. `search-memory' `qSearch:memory' `find' `supported-packets' `qSupported' Remote communications parameters `pass-signals' `QPassSignals' `handle SIGNAL' `program-signals' `QProgramSignals' `handle SIGNAL' `hostio-close-packet'`vFile:close' `remote get', `remote put' `hostio-open-packet' `vFile:open' `remote get', `remote put' `hostio-pread-packet'`vFile:pread' `remote get', `remote put' `hostio-pwrite-packet'`vFile:pwrite' `remote get', `remote put' `hostio-unlink-packet'`vFile:unlink' `remote delete' `hostio-readlink-packet'`vFile:readlink' Host I/O `noack-packet' `QStartNoAckMode' Packet acknowledgment `osdata' `qXfer:osdata:read' `info os' `query-attached' `qAttached' Querying remote process attach state. `trace-buffer-size' `QTBuffer:size' `set trace-buffer-size' `traceframe-info' `qXfer:traceframe-info:read'Traceframe info `install-in-trace' `InstallInTrace' Install tracepoint in tracing `disable-randomization'`QDisableRandomization' `set disable-randomization' `conditional-breakpoints-packet'`Z0 and Z1' `Support for target-side breakpoint condition evaluation'  File: gdb.info, Node: Remote Stub, Prev: Remote Configuration, Up: Remote Debugging 20.5 Implementing a Remote Stub =============================== The stub files provided with GDB implement the target side of the communication protocol, and the GDB side is implemented in the GDB source file `remote.c'. Normally, you can simply allow these subroutines to communicate, and ignore the details. (If you're implementing your own stub file, you can still ignore the details: start with one of the existing stub files. `sparc-stub.c' is the best organized, and therefore the easiest to read.) To debug a program running on another machine (the debugging "target" machine), you must first arrange for all the usual prerequisites for the program to run by itself. For example, for a C program, you need: 1. A startup routine to set up the C runtime environment; these usually have a name like `crt0'. The startup routine may be supplied by your hardware supplier, or you may have to write your own. 2. A C subroutine library to support your program's subroutine calls, notably managing input and output. 3. A way of getting your program to the other machine--for example, a download program. These are often supplied by the hardware manufacturer, but you may have to write your own from hardware documentation. The next step is to arrange for your program to use a serial port to communicate with the machine where GDB is running (the "host" machine). In general terms, the scheme looks like this: _On the host,_ GDB already understands how to use this protocol; when everything else is set up, you can simply use the `target remote' command (*note Specifying a Debugging Target: Targets.). _On the target,_ you must link with your program a few special-purpose subroutines that implement the GDB remote serial protocol. The file containing these subroutines is called a "debugging stub". On certain remote targets, you can use an auxiliary program `gdbserver' instead of linking a stub into your program. *Note Using the `gdbserver' Program: Server, for details. The debugging stub is specific to the architecture of the remote machine; for example, use `sparc-stub.c' to debug programs on SPARC boards. These working remote stubs are distributed with GDB: `i386-stub.c' For Intel 386 and compatible architectures. `m68k-stub.c' For Motorola 680x0 architectures. `sh-stub.c' For Renesas SH architectures. `sparc-stub.c' For SPARC architectures. `sparcl-stub.c' For Fujitsu SPARCLITE architectures. The `README' file in the GDB distribution may list other recently added stubs. * Menu: * Stub Contents:: What the stub can do for you * Bootstrapping:: What you must do for the stub * Debug Session:: Putting it all together  File: gdb.info, Node: Stub Contents, Next: Bootstrapping, Up: Remote Stub 20.5.1 What the Stub Can Do for You ----------------------------------- The debugging stub for your architecture supplies these three subroutines: `set_debug_traps' This routine arranges for `handle_exception' to run when your program stops. You must call this subroutine explicitly in your program's startup code. `handle_exception' This is the central workhorse, but your program never calls it explicitly--the setup code arranges for `handle_exception' to run when a trap is triggered. `handle_exception' takes control when your program stops during execution (for example, on a breakpoint), and mediates communications with GDB on the host machine. This is where the communications protocol is implemented; `handle_exception' acts as the GDB representative on the target machine. It begins by sending summary information on the state of your program, then continues to execute, retrieving and transmitting any information GDB needs, until you execute a GDB command that makes your program resume; at that point, `handle_exception' returns control to your own code on the target machine. `breakpoint' Use this auxiliary subroutine to make your program contain a breakpoint. Depending on the particular situation, this may be the only way for GDB to get control. For instance, if your target machine has some sort of interrupt button, you won't need to call this; pressing the interrupt button transfers control to `handle_exception'--in effect, to GDB. On some machines, simply receiving characters on the serial port may also trigger a trap; again, in that situation, you don't need to call `breakpoint' from your own program--simply running `target remote' from the host GDB session gets control. Call `breakpoint' if none of these is true, or if you simply want to make certain your program stops at a predetermined point for the start of your debugging session.  File: gdb.info, Node: Bootstrapping, Next: Debug Session, Prev: Stub Contents, Up: Remote Stub 20.5.2 What You Must Do for the Stub ------------------------------------ The debugging stubs that come with GDB are set up for a particular chip architecture, but they have no information about the rest of your debugging target machine. First of all you need to tell the stub how to communicate with the serial port. `int getDebugChar()' Write this subroutine to read a single character from the serial port. It may be identical to `getchar' for your target system; a different name is used to allow you to distinguish the two if you wish. `void putDebugChar(int)' Write this subroutine to write a single character to the serial port. It may be identical to `putchar' for your target system; a different name is used to allow you to distinguish the two if you wish. If you want GDB to be able to stop your program while it is running, you need to use an interrupt-driven serial driver, and arrange for it to stop when it receives a `^C' (`\003', the control-C character). That is the character which GDB uses to tell the remote system to stop. Getting the debugging target to return the proper status to GDB probably requires changes to the standard stub; one quick and dirty way is to just execute a breakpoint instruction (the "dirty" part is that GDB reports a `SIGTRAP' instead of a `SIGINT'). Other routines you need to supply are: `void exceptionHandler (int EXCEPTION_NUMBER, void *EXCEPTION_ADDRESS)' Write this function to install EXCEPTION_ADDRESS in the exception handling tables. You need to do this because the stub does not have any way of knowing what the exception handling tables on your target system are like (for example, the processor's table might be in ROM, containing entries which point to a table in RAM). EXCEPTION_NUMBER is the exception number which should be changed; its meaning is architecture-dependent (for example, different numbers might represent divide by zero, misaligned access, etc). When this exception occurs, control should be transferred directly to EXCEPTION_ADDRESS, and the processor state (stack, registers, and so on) should be just as it is when a processor exception occurs. So if you want to use a jump instruction to reach EXCEPTION_ADDRESS, it should be a simple jump, not a jump to subroutine. For the 386, EXCEPTION_ADDRESS should be installed as an interrupt gate so that interrupts are masked while the handler runs. The gate should be at privilege level 0 (the most privileged level). The SPARC and 68k stubs are able to mask interrupts themselves without help from `exceptionHandler'. `void flush_i_cache()' On SPARC and SPARCLITE only, write this subroutine to flush the instruction cache, if any, on your target machine. If there is no instruction cache, this subroutine may be a no-op. On target machines that have instruction caches, GDB requires this function to make certain that the state of your program is stable. You must also make sure this library routine is available: `void *memset(void *, int, int)' This is the standard library function `memset' that sets an area of memory to a known value. If you have one of the free versions of `libc.a', `memset' can be found there; otherwise, you must either obtain it from your hardware manufacturer, or write your own. If you do not use the GNU C compiler, you may need other standard library subroutines as well; this varies from one stub to another, but in general the stubs are likely to use any of the common library subroutines which `GCC' generates as inline code.  File: gdb.info, Node: Debug Session, Prev: Bootstrapping, Up: Remote Stub 20.5.3 Putting it All Together ------------------------------ In summary, when your program is ready to debug, you must follow these steps. 1. Make sure you have defined the supporting low-level routines (*note What You Must Do for the Stub: Bootstrapping.): `getDebugChar', `putDebugChar', `flush_i_cache', `memset', `exceptionHandler'. 2. Insert these lines in your program's startup code, before the main procedure is called: set_debug_traps(); breakpoint(); On some machines, when a breakpoint trap is raised, the hardware automatically makes the PC point to the instruction after the breakpoint. If your machine doesn't do that, you may need to adjust `handle_exception' to arrange for it to return to the instruction after the breakpoint on this first invocation, so that your program doesn't keep hitting the initial breakpoint instead of making progress. 3. For the 680x0 stub only, you need to provide a variable called `exceptionHook'. Normally you just use: void (*exceptionHook)() = 0; but if before calling `set_debug_traps', you set it to point to a function in your program, that function is called when `GDB' continues after stopping on a trap (for example, bus error). The function indicated by `exceptionHook' is called with one parameter: an `int' which is the exception number. 4. Compile and link together: your program, the GDB debugging stub for your target architecture, and the supporting subroutines. 5. Make sure you have a serial connection between your target machine and the GDB host, and identify the serial port on the host. 6. Download your program to your target machine (or get it there by whatever means the manufacturer provides), and start it. 7. Start GDB on the host, and connect to the target (*note Connecting to a Remote Target: Connecting.).  File: gdb.info, Node: Configurations, Next: Controlling GDB, Prev: Remote Debugging, Up: Top 21 Configuration-Specific Information ************************************* While nearly all GDB commands are available for all native and cross versions of the debugger, there are some exceptions. This chapter describes things that are only available in certain configurations. There are three major categories of configurations: native configurations, where the host and target are the same, embedded operating system configurations, which are usually the same for several different processor architectures, and bare embedded processors, which are quite different from each other. * Menu: * Native:: * Embedded OS:: * Embedded Processors:: * Architectures::  File: gdb.info, Node: Native, Next: Embedded OS, Up: Configurations 21.1 Native =========== This section describes details specific to particular native configurations. * Menu: * HP-UX:: HP-UX * BSD libkvm Interface:: Debugging BSD kernel memory images * SVR4 Process Information:: SVR4 process information * DJGPP Native:: Features specific to the DJGPP port * Cygwin Native:: Features specific to the Cygwin port * Hurd Native:: Features specific to GNU Hurd * Darwin:: Features specific to Darwin  File: gdb.info, Node: HP-UX, Next: BSD libkvm Interface, Up: Native 21.1.1 HP-UX ------------ On HP-UX systems, if you refer to a function or variable name that begins with a dollar sign, GDB searches for a user or system name first, before it searches for a convenience variable.  File: gdb.info, Node: BSD libkvm Interface, Next: SVR4 Process Information, Prev: HP-UX, Up: Native 21.1.2 BSD libkvm Interface --------------------------- BSD-derived systems (FreeBSD/NetBSD/OpenBSD) have a kernel memory interface that provides a uniform interface for accessing kernel virtual memory images, including live systems and crash dumps. GDB uses this interface to allow you to debug live kernels and kernel crash dumps on many native BSD configurations. This is implemented as a special `kvm' debugging target. For debugging a live system, load the currently running kernel into GDB and connect to the `kvm' target: (gdb) target kvm For debugging crash dumps, provide the file name of the crash dump as an argument: (gdb) target kvm /var/crash/bsd.0 Once connected to the `kvm' target, the following commands are available: `kvm pcb' Set current context from the "Process Control Block" (PCB) address. `kvm proc' Set current context from proc address. This command isn't available on modern FreeBSD systems.  File: gdb.info, Node: SVR4 Process Information, Next: DJGPP Native, Prev: BSD libkvm Interface, Up: Native 21.1.3 SVR4 Process Information ------------------------------- Many versions of SVR4 and compatible systems provide a facility called `/proc' that can be used to examine the image of a running process using file-system subroutines. If GDB is configured for an operating system with this facility, the command `info proc' is available to report information about the process running your program, or about any process running on your system. This includes, as of this writing, GNU/Linux, OSF/1 (Digital Unix), Solaris, and Irix, but not HP-UX, for example. This command may also work on core files that were created on a system that has the `/proc' facility. `info proc' `info proc PROCESS-ID' Summarize available information about any running process. If a process ID is specified by PROCESS-ID, display information about that process; otherwise display information about the program being debugged. The summary includes the debugged process ID, the command line used to invoke it, its current working directory, and its executable file's absolute file name. On some systems, PROCESS-ID can be of the form `[PID]/TID' which specifies a certain thread ID within a process. If the optional PID part is missing, it means a thread from the process being debugged (the leading `/' still needs to be present, or else GDB will interpret the number as a process ID rather than a thread ID). `info proc cmdline' Show the original command line of the process. This command is specific to GNU/Linux. `info proc cwd' Show the current working directory of the process. This command is specific to GNU/Linux. `info proc exe' Show the name of executable of the process. This command is specific to GNU/Linux. `info proc mappings' Report the memory address space ranges accessible in the program, with information on whether the process has read, write, or execute access rights to each range. On GNU/Linux systems, each memory range includes the object file which is mapped to that range, instead of the memory access rights to that range. `info proc stat' `info proc status' These subcommands are specific to GNU/Linux systems. They show the process-related information, including the user ID and group ID; how many threads are there in the process; its virtual memory usage; the signals that are pending, blocked, and ignored; its TTY; its consumption of system and user time; its stack size; its `nice' value; etc. For more information, see the `proc' man page (type `man 5 proc' from your shell prompt). `info proc all' Show all the information about the process described under all of the above `info proc' subcommands. `set procfs-trace' This command enables and disables tracing of `procfs' API calls. `show procfs-trace' Show the current state of `procfs' API call tracing. `set procfs-file FILE' Tell GDB to write `procfs' API trace to the named FILE. GDB appends the trace info to the previous contents of the file. The default is to display the trace on the standard output. `show procfs-file' Show the file to which `procfs' API trace is written. `proc-trace-entry' `proc-trace-exit' `proc-untrace-entry' `proc-untrace-exit' These commands enable and disable tracing of entries into and exits from the `syscall' interface. `info pidlist' For QNX Neutrino only, this command displays the list of all the processes and all the threads within each process. `info meminfo' For QNX Neutrino only, this command displays the list of all mapinfos.  File: gdb.info, Node: DJGPP Native, Next: Cygwin Native, Prev: SVR4 Process Information, Up: Native 21.1.4 Features for Debugging DJGPP Programs -------------------------------------------- DJGPP is a port of the GNU development tools to MS-DOS and MS-Windows. DJGPP programs are 32-bit protected-mode programs that use the "DPMI" (DOS Protected-Mode Interface) API to run on top of real-mode DOS systems and their emulations. GDB supports native debugging of DJGPP programs, and defines a few commands specific to the DJGPP port. This subsection describes those commands. `info dos' This is a prefix of DJGPP-specific commands which print information about the target system and important OS structures. `info dos sysinfo' This command displays assorted information about the underlying platform: the CPU type and features, the OS version and flavor, the DPMI version, and the available conventional and DPMI memory. `info dos gdt' `info dos ldt' `info dos idt' These 3 commands display entries from, respectively, Global, Local, and Interrupt Descriptor Tables (GDT, LDT, and IDT). The descriptor tables are data structures which store a descriptor for each segment that is currently in use. The segment's selector is an index into a descriptor table; the table entry for that index holds the descriptor's base address and limit, and its attributes and access rights. A typical DJGPP program uses 3 segments: a code segment, a data segment (used for both data and the stack), and a DOS segment (which allows access to DOS/BIOS data structures and absolute addresses in conventional memory). However, the DPMI host will usually define additional segments in order to support the DPMI environment. These commands allow to display entries from the descriptor tables. Without an argument, all entries from the specified table are displayed. An argument, which should be an integer expression, means display a single entry whose index is given by the argument. For example, here's a convenient way to display information about the debugged program's data segment: `(gdb) info dos ldt $ds' `0x13f: base=0x11970000 limit=0x0009ffff 32-Bit Data (Read/Write, Exp-up)' This comes in handy when you want to see whether a pointer is outside the data segment's limit (i.e. "garbled"). `info dos pde' `info dos pte' These two commands display entries from, respectively, the Page Directory and the Page Tables. Page Directories and Page Tables are data structures which control how virtual memory addresses are mapped into physical addresses. A Page Table includes an entry for every page of memory that is mapped into the program's address space; there may be several Page Tables, each one holding up to 4096 entries. A Page Directory has up to 4096 entries, one each for every Page Table that is currently in use. Without an argument, `info dos pde' displays the entire Page Directory, and `info dos pte' displays all the entries in all of the Page Tables. An argument, an integer expression, given to the `info dos pde' command means display only that entry from the Page Directory table. An argument given to the `info dos pte' command means display entries from a single Page Table, the one pointed to by the specified entry in the Page Directory. These commands are useful when your program uses "DMA" (Direct Memory Access), which needs physical addresses to program the DMA controller. These commands are supported only with some DPMI servers. `info dos address-pte ADDR' This command displays the Page Table entry for a specified linear address. The argument ADDR is a linear address which should already have the appropriate segment's base address added to it, because this command accepts addresses which may belong to _any_ segment. For example, here's how to display the Page Table entry for the page where a variable `i' is stored: `(gdb) info dos address-pte __djgpp_base_address + (char *)&i' `Page Table entry for address 0x11a00d30:' `Base=0x02698000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0xd30' This says that `i' is stored at offset `0xd30' from the page whose physical base address is `0x02698000', and shows all the attributes of that page. Note that you must cast the addresses of variables to a `char *', since otherwise the value of `__djgpp_base_address', the base address of all variables and functions in a DJGPP program, will be added using the rules of C pointer arithmetics: if `i' is declared an `int', GDB will add 4 times the value of `__djgpp_base_address' to the address of `i'. Here's another example, it displays the Page Table entry for the transfer buffer: `(gdb) info dos address-pte *((unsigned *)&_go32_info_block + 3)' `Page Table entry for address 0x29110:' `Base=0x00029000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0x110' (The `+ 3' offset is because the transfer buffer's address is the 3rd member of the `_go32_info_block' structure.) The output clearly shows that this DPMI server maps the addresses in conventional memory 1:1, i.e. the physical (`0x00029000' + `0x110') and linear (`0x29110') addresses are identical. This command is supported only with some DPMI servers. In addition to native debugging, the DJGPP port supports remote debugging via a serial data link. The following commands are specific to remote serial debugging in the DJGPP port of GDB. `set com1base ADDR' This command sets the base I/O port address of the `COM1' serial port. `set com1irq IRQ' This command sets the "Interrupt Request" (`IRQ') line to use for the `COM1' serial port. There are similar commands `set com2base', `set com3irq', etc. for setting the port address and the `IRQ' lines for the other 3 COM ports. The related commands `show com1base', `show com1irq' etc. display the current settings of the base address and the `IRQ' lines used by the COM ports. `info serial' This command prints the status of the 4 DOS serial ports. For each port, it prints whether it's active or not, its I/O base address and IRQ number, whether it uses a 16550-style FIFO, its baudrate, and the counts of various errors encountered so far.  File: gdb.info, Node: Cygwin Native, Next: Hurd Native, Prev: DJGPP Native, Up: Native 21.1.5 Features for Debugging MS Windows PE Executables ------------------------------------------------------- GDB supports native debugging of MS Windows programs, including DLLs with and without symbolic debugging information. MS-Windows programs that call `SetConsoleMode' to switch off the special meaning of the `Ctrl-C' keystroke cannot be interrupted by typing `C-c'. For this reason, GDB on MS-Windows supports `C-' as an alternative interrupt key sequence, which can be used to interrupt the debuggee even if it ignores `C-c'. There are various additional Cygwin-specific commands, described in this section. Working with DLLs that have no debugging symbols is described in *note Non-debug DLL Symbols::. `info w32' This is a prefix of MS Windows-specific commands which print information about the target system and important OS structures. `info w32 selector' This command displays information returned by the Win32 API `GetThreadSelectorEntry' function. It takes an optional argument that is evaluated to a long value to give the information about this given selector. Without argument, this command displays information about the six segment registers. `info w32 thread-information-block' This command displays thread specific information stored in the Thread Information Block (readable on the X86 CPU family using `$fs' selector for 32-bit programs and `$gs' for 64-bit programs). `info dll' This is a Cygwin-specific alias of `info shared'. `dll-symbols' This command loads symbols from a dll similarly to add-sym command but without the need to specify a base address. `set cygwin-exceptions MODE' If MODE is `on', GDB will break on exceptions that happen inside the Cygwin DLL. If MODE is `off', GDB will delay recognition of exceptions, and may ignore some exceptions which seem to be caused by internal Cygwin DLL "bookkeeping". This option is meant primarily for debugging the Cygwin DLL itself; the default value is `off' to avoid annoying GDB users with false `SIGSEGV' signals. `show cygwin-exceptions' Displays whether GDB will break on exceptions that happen inside the Cygwin DLL itself. `set new-console MODE' If MODE is `on' the debuggee will be started in a new console on next start. If MODE is `off', the debuggee will be started in the same console as the debugger. `show new-console' Displays whether a new console is used when the debuggee is started. `set new-group MODE' This boolean value controls whether the debuggee should start a new group or stay in the same group as the debugger. This affects the way the Windows OS handles `Ctrl-C'. `show new-group' Displays current value of new-group boolean. `set debugevents' This boolean value adds debug output concerning kernel events related to the debuggee seen by the debugger. This includes events that signal thread and process creation and exit, DLL loading and unloading, console interrupts, and debugging messages produced by the Windows `OutputDebugString' API call. `set debugexec' This boolean value adds debug output concerning execute events (such as resume thread) seen by the debugger. `set debugexceptions' This boolean value adds debug output concerning exceptions in the debuggee seen by the debugger. `set debugmemory' This boolean value adds debug output concerning debuggee memory reads and writes by the debugger. `set shell' This boolean values specifies whether the debuggee is called via a shell or directly (default value is on). `show shell' Displays if the debuggee will be started with a shell. * Menu: * Non-debug DLL Symbols:: Support for DLLs without debugging symbols  File: gdb.info, Node: Non-debug DLL Symbols, Up: Cygwin Native 21.1.5.1 Support for DLLs without Debugging Symbols ................................................... Very often on windows, some of the DLLs that your program relies on do not include symbolic debugging information (for example, `kernel32.dll'). When GDB doesn't recognize any debugging symbols in a DLL, it relies on the minimal amount of symbolic information contained in the DLL's export table. This section describes working with such symbols, known internally to GDB as "minimal symbols". Note that before the debugged program has started execution, no DLLs will have been loaded. The easiest way around this problem is simply to start the program -- either by setting a breakpoint or letting the program run once to completion. It is also possible to force GDB to load a particular DLL before starting the executable -- see the shared library information in *note Files::, or the `dll-symbols' command in *note Cygwin Native::. Currently, explicitly loading symbols from a DLL with no debugging information will cause the symbol names to be duplicated in GDB's lookup table, which may adversely affect symbol lookup performance. 21.1.5.2 DLL Name Prefixes .......................... In keeping with the naming conventions used by the Microsoft debugging tools, DLL export symbols are made available with a prefix based on the DLL name, for instance `KERNEL32!CreateFileA'. The plain name is also entered into the symbol table, so `CreateFileA' is often sufficient. In some cases there will be name clashes within a program (particularly if the executable itself includes full debugging symbols) necessitating the use of the fully qualified name when referring to the contents of the DLL. Use single-quotes around the name to avoid the exclamation mark ("!") being interpreted as a language operator. Note that the internal name of the DLL may be all upper-case, even though the file name of the DLL is lower-case, or vice-versa. Since symbols within GDB are _case-sensitive_ this may cause some confusion. If in doubt, try the `info functions' and `info variables' commands or even `maint print msymbols' (*note Symbols::). Here's an example: (gdb) info function CreateFileA All functions matching regular expression "CreateFileA": Non-debugging symbols: 0x77e885f4 CreateFileA 0x77e885f4 KERNEL32!CreateFileA (gdb) info function ! All functions matching regular expression "!": Non-debugging symbols: 0x6100114c cygwin1!__assert 0x61004034 cygwin1!_dll_crt0@0 0x61004240 cygwin1!dll_crt0(per_process *) [etc...] 21.1.5.3 Working with Minimal Symbols ..................................... Symbols extracted from a DLL's export table do not contain very much type information. All that GDB can do is guess whether a symbol refers to a function or variable depending on the linker section that contains the symbol. Also note that the actual contents of the memory contained in a DLL are not available unless the program is running. This means that you cannot examine the contents of a variable or disassemble a function within a DLL without a running program. Variables are generally treated as pointers and dereferenced automatically. For this reason, it is often necessary to prefix a variable name with the address-of operator ("&") and provide explicit type information in the command. Here's an example of the type of problem: (gdb) print 'cygwin1!__argv' $1 = 268572168 (gdb) x 'cygwin1!__argv' 0x10021610: "\230y\"" And two possible solutions: (gdb) print ((char **)'cygwin1!__argv')[0] $2 = 0x22fd98 "/cygdrive/c/mydirectory/myprogram" (gdb) x/2x &'cygwin1!__argv' 0x610c0aa8 : 0x10021608 0x00000000 (gdb) x/x 0x10021608 0x10021608: 0x0022fd98 (gdb) x/s 0x0022fd98 0x22fd98: "/cygdrive/c/mydirectory/myprogram" Setting a break point within a DLL is possible even before the program starts execution. However, under these circumstances, GDB can't examine the initial instructions of the function in order to skip the function's frame set-up code. You can work around this by using "*&" to set the breakpoint at a raw memory address: (gdb) break *&'python22!PyOS_Readline' Breakpoint 1 at 0x1e04eff0 The author of these extensions is not entirely convinced that setting a break point within a shared DLL like `kernel32.dll' is completely safe.  File: gdb.info, Node: Hurd Native, Next: Darwin, Prev: Cygwin Native, Up: Native 21.1.6 Commands Specific to GNU Hurd Systems -------------------------------------------- This subsection describes GDB commands specific to the GNU Hurd native debugging. `set signals' `set sigs' This command toggles the state of inferior signal interception by GDB. Mach exceptions, such as breakpoint traps, are not affected by this command. `sigs' is a shorthand alias for `signals'. `show signals' `show sigs' Show the current state of intercepting inferior's signals. `set signal-thread' `set sigthread' This command tells GDB which thread is the `libc' signal thread. That thread is run when a signal is delivered to a running process. `set sigthread' is the shorthand alias of `set signal-thread'. `show signal-thread' `show sigthread' These two commands show which thread will run when the inferior is delivered a signal. `set stopped' This commands tells GDB that the inferior process is stopped, as with the `SIGSTOP' signal. The stopped process can be continued by delivering a signal to it. `show stopped' This command shows whether GDB thinks the debuggee is stopped. `set exceptions' Use this command to turn off trapping of exceptions in the inferior. When exception trapping is off, neither breakpoints nor single-stepping will work. To restore the default, set exception trapping on. `show exceptions' Show the current state of trapping exceptions in the inferior. `set task pause' This command toggles task suspension when GDB has control. Setting it to on takes effect immediately, and the task is suspended whenever GDB gets control. Setting it to off will take effect the next time the inferior is continued. If this option is set to off, you can use `set thread default pause on' or `set thread pause on' (see below) to pause individual threads. `show task pause' Show the current state of task suspension. `set task detach-suspend-count' This command sets the suspend count the task will be left with when GDB detaches from it. `show task detach-suspend-count' Show the suspend count the task will be left with when detaching. `set task exception-port' `set task excp' This command sets the task exception port to which GDB will forward exceptions. The argument should be the value of the "send rights" of the task. `set task excp' is a shorthand alias. `set noninvasive' This command switches GDB to a mode that is the least invasive as far as interfering with the inferior is concerned. This is the same as using `set task pause', `set exceptions', and `set signals' to values opposite to the defaults. `info send-rights' `info receive-rights' `info port-rights' `info port-sets' `info dead-names' `info ports' `info psets' These commands display information about, respectively, send rights, receive rights, port rights, port sets, and dead names of a task. There are also shorthand aliases: `info ports' for `info port-rights' and `info psets' for `info port-sets'. `set thread pause' This command toggles current thread suspension when GDB has control. Setting it to on takes effect immediately, and the current thread is suspended whenever GDB gets control. Setting it to off will take effect the next time the inferior is continued. Normally, this command has no effect, since when GDB has control, the whole task is suspended. However, if you used `set task pause off' (see above), this command comes in handy to suspend only the current thread. `show thread pause' This command shows the state of current thread suspension. `set thread run' This command sets whether the current thread is allowed to run. `show thread run' Show whether the current thread is allowed to run. `set thread detach-suspend-count' This command sets the suspend count GDB will leave on a thread when detaching. This number is relative to the suspend count found by GDB when it notices the thread; use `set thread takeover-suspend-count' to force it to an absolute value. `show thread detach-suspend-count' Show the suspend count GDB will leave on the thread when detaching. `set thread exception-port' `set thread excp' Set the thread exception port to which to forward exceptions. This overrides the port set by `set task exception-port' (see above). `set thread excp' is the shorthand alias. `set thread takeover-suspend-count' Normally, GDB's thread suspend counts are relative to the value GDB finds when it notices each thread. This command changes the suspend counts to be absolute instead. `set thread default' `show thread default' Each of the above `set thread' commands has a `set thread default' counterpart (e.g., `set thread default pause', `set thread default exception-port', etc.). The `thread default' variety of commands sets the default thread properties for all threads; you can then change the properties of individual threads with the non-default commands.  File: gdb.info, Node: Darwin, Prev: Hurd Native, Up: Native 21.1.7 Darwin ------------- GDB provides the following commands specific to the Darwin target: `set debug darwin NUM' When set to a non zero value, enables debugging messages specific to the Darwin support. Higher values produce more verbose output. `show debug darwin' Show the current state of Darwin messages. `set debug mach-o NUM' When set to a non zero value, enables debugging messages while GDB is reading Darwin object files. ("Mach-O" is the file format used on Darwin for object and executable files.) Higher values produce more verbose output. This is a command to diagnose problems internal to GDB and should not be needed in normal usage. `show debug mach-o' Show the current state of Mach-O file messages. `set mach-exceptions on' `set mach-exceptions off' On Darwin, faults are first reported as a Mach exception and are then mapped to a Posix signal. Use this command to turn on trapping of Mach exceptions in the inferior. This might be sometimes useful to better understand the cause of a fault. The default is off. `show mach-exceptions' Show the current state of exceptions trapping.  File: gdb.info, Node: Embedded OS, Next: Embedded Processors, Prev: Native, Up: Configurations 21.2 Embedded Operating Systems =============================== This section describes configurations involving the debugging of embedded operating systems that are available for several different architectures. * Menu: * VxWorks:: Using GDB with VxWorks GDB includes the ability to debug programs running on various real-time operating systems.  File: gdb.info, Node: VxWorks, Up: Embedded OS 21.2.1 Using GDB with VxWorks ----------------------------- `target vxworks MACHINENAME' A VxWorks system, attached via TCP/IP. The argument MACHINENAME is the target system's machine name or IP address. On VxWorks, `load' links FILENAME dynamically on the current target system as well as adding its symbols in GDB. GDB enables developers to spawn and debug tasks running on networked VxWorks targets from a Unix host. Already-running tasks spawned from the VxWorks shell can also be debugged. GDB uses code that runs on both the Unix host and on the VxWorks target. The program `gdb' is installed and executed on the Unix host. (It may be installed with the name `vxgdb', to distinguish it from a GDB for debugging programs on the host itself.) `VxWorks-timeout ARGS' All VxWorks-based targets now support the option `vxworks-timeout'. This option is set by the user, and ARGS represents the number of seconds GDB waits for responses to rpc's. You might use this if your VxWorks target is a slow software simulator or is on the far side of a thin network line. The following information on connecting to VxWorks was current when this manual was produced; newer releases of VxWorks may use revised procedures. To use GDB with VxWorks, you must rebuild your VxWorks kernel to include the remote debugging interface routines in the VxWorks library `rdb.a'. To do this, define `INCLUDE_RDB' in the VxWorks configuration file `configAll.h' and rebuild your VxWorks kernel. The resulting kernel contains `rdb.a', and spawns the source debugging task `tRdbTask' when VxWorks is booted. For more information on configuring and remaking VxWorks, see the manufacturer's manual. Once you have included `rdb.a' in your VxWorks system image and set your Unix execution search path to find GDB, you are ready to run GDB. From your Unix host, run `gdb' (or `vxgdb', depending on your installation). GDB comes up showing the prompt: (vxgdb) * Menu: * VxWorks Connection:: Connecting to VxWorks * VxWorks Download:: VxWorks download * VxWorks Attach:: Running tasks  File: gdb.info, Node: VxWorks Connection, Next: VxWorks Download, Up: VxWorks 21.2.1.1 Connecting to VxWorks .............................. The GDB command `target' lets you connect to a VxWorks target on the network. To connect to a target whose host name is "`tt'", type: (vxgdb) target vxworks tt GDB displays messages like these: Attaching remote machine across net... Connected to tt. GDB then attempts to read the symbol tables of any object modules loaded into the VxWorks target since it was last booted. GDB locates these files by searching the directories listed in the command search path (*note Your Program's Environment: Environment.); if it fails to find an object file, it displays a message such as: prog.o: No such file or directory. When this happens, add the appropriate directory to the search path with the GDB command `path', and execute the `target' command again.  File: gdb.info, Node: VxWorks Download, Next: VxWorks Attach, Prev: VxWorks Connection, Up: VxWorks 21.2.1.2 VxWorks Download ......................... If you have connected to the VxWorks target and you want to debug an object that has not yet been loaded, you can use the GDB `load' command to download a file from Unix to VxWorks incrementally. The object file given as an argument to the `load' command is actually opened twice: first by the VxWorks target in order to download the code, then by GDB in order to read the symbol table. This can lead to problems if the current working directories on the two systems differ. If both systems have NFS mounted the same filesystems, you can avoid these problems by using absolute paths. Otherwise, it is simplest to set the working directory on both systems to the directory in which the object file resides, and then to reference the file by its name, without any path. For instance, a program `prog.o' may reside in `VXPATH/vw/demo/rdb' in VxWorks and in `HOSTPATH/vw/demo/rdb' on the host. To load this program, type this on VxWorks: -> cd "VXPATH/vw/demo/rdb" Then, in GDB, type: (vxgdb) cd HOSTPATH/vw/demo/rdb (vxgdb) load prog.o GDB displays a response similar to this: Reading symbol data from wherever/vw/demo/rdb/prog.o... done. You can also use the `load' command to reload an object module after editing and recompiling the corresponding source file. Note that this makes GDB delete all currently-defined breakpoints, auto-displays, and convenience variables, and to clear the value history. (This is necessary in order to preserve the integrity of debugger's data structures that reference the target system's symbol table.)  File: gdb.info, Node: VxWorks Attach, Prev: VxWorks Download, Up: VxWorks 21.2.1.3 Running Tasks ...................... You can also attach to an existing task using the `attach' command as follows: (vxgdb) attach TASK where TASK is the VxWorks hexadecimal task ID. The task can be running or suspended when you attach to it. Running tasks are suspended at the time of attachment.  File: gdb.info, Node: Embedded Processors, Next: Architectures, Prev: Embedded OS, Up: Configurations 21.3 Embedded Processors ======================== This section goes into details specific to particular embedded configurations. Whenever a specific embedded processor has a simulator, GDB allows to send an arbitrary command to the simulator. `sim COMMAND' Send an arbitrary COMMAND string to the simulator. Consult the documentation for the specific simulator in use for information about acceptable commands. * Menu: * ARM:: ARM RDI * M32R/D:: Renesas M32R/D * M68K:: Motorola M68K * MicroBlaze:: Xilinx MicroBlaze * MIPS Embedded:: MIPS Embedded * OpenRISC 1000:: OpenRisc 1000 * PowerPC Embedded:: PowerPC Embedded * PA:: HP PA Embedded * Sparclet:: Tsqware Sparclet * Sparclite:: Fujitsu Sparclite * Z8000:: Zilog Z8000 * AVR:: Atmel AVR * CRIS:: CRIS * Super-H:: Renesas Super-H  File: gdb.info, Node: ARM, Next: M32R/D, Up: Embedded Processors 21.3.1 ARM ---------- `target rdi DEV' ARM Angel monitor, via RDI library interface to ADP protocol. You may use this target to communicate with both boards running the Angel monitor, or with the EmbeddedICE JTAG debug device. `target rdp DEV' ARM Demon monitor. GDB provides the following ARM-specific commands: `set arm disassembler' This commands selects from a list of disassembly styles. The `"std"' style is the standard style. `show arm disassembler' Show the current disassembly style. `set arm apcs32' This command toggles ARM operation mode between 32-bit and 26-bit. `show arm apcs32' Display the current usage of the ARM 32-bit mode. `set arm fpu FPUTYPE' This command sets the ARM floating-point unit (FPU) type. The argument FPUTYPE can be one of these: `auto' Determine the FPU type by querying the OS ABI. `softfpa' Software FPU, with mixed-endian doubles on little-endian ARM processors. `fpa' GCC-compiled FPA co-processor. `softvfp' Software FPU with pure-endian doubles. `vfp' VFP co-processor. `show arm fpu' Show the current type of the FPU. `set arm abi' This command forces GDB to use the specified ABI. `show arm abi' Show the currently used ABI. `set arm fallback-mode (arm|thumb|auto)' GDB uses the symbol table, when available, to determine whether instructions are ARM or Thumb. This command controls GDB's default behavior when the symbol table is not available. The default is `auto', which causes GDB to use the current execution mode (from the `T' bit in the `CPSR' register). `show arm fallback-mode' Show the current fallback instruction mode. `set arm force-mode (arm|thumb|auto)' This command overrides use of the symbol table to determine whether instructions are ARM or Thumb. The default is `auto', which causes GDB to use the symbol table and then the setting of `set arm fallback-mode'. `show arm force-mode' Show the current forced instruction mode. `set debug arm' Toggle whether to display ARM-specific debugging messages from the ARM target support subsystem. `show debug arm' Show whether ARM-specific debugging messages are enabled. The following commands are available when an ARM target is debugged using the RDI interface: `rdilogfile [FILE]' Set the filename for the ADP (Angel Debugger Protocol) packet log. With an argument, sets the log file to the specified FILE. With no argument, show the current log file name. The default log file is `rdi.log'. `rdilogenable [ARG]' Control logging of ADP packets. With an argument of 1 or `"yes"' enables logging, with an argument 0 or `"no"' disables it. With no arguments displays the current setting. When logging is enabled, ADP packets exchanged between GDB and the RDI target device are logged to a file. `set rdiromatzero' Tell GDB whether the target has ROM at address 0. If on, vector catching is disabled, so that zero address can be used. If off (the default), vector catching is enabled. For this command to take effect, it needs to be invoked prior to the `target rdi' command. `show rdiromatzero' Show the current setting of ROM at zero address. `set rdiheartbeat' Enable or disable RDI heartbeat packets. It is not recommended to turn on this option, since it confuses ARM and EPI JTAG interface, as well as the Angel monitor. `show rdiheartbeat' Show the setting of RDI heartbeat packets. `target sim [SIMARGS] ...' The GDB ARM simulator accepts the following optional arguments. `--swi-support=TYPE' Tell the simulator which SWI interfaces to support. TYPE may be a comma separated list of the following values. The default value is `all'. `none' `demon' `angel' `redboot' `all'  File: gdb.info, Node: M32R/D, Next: M68K, Prev: ARM, Up: Embedded Processors 21.3.2 Renesas M32R/D and M32R/SDI ---------------------------------- `target m32r DEV' Renesas M32R/D ROM monitor. `target m32rsdi DEV' Renesas M32R SDI server, connected via parallel port to the board. The following GDB commands are specific to the M32R monitor: `set download-path PATH' Set the default path for finding downloadable SREC files. `show download-path' Show the default path for downloadable SREC files. `set board-address ADDR' Set the IP address for the M32R-EVA target board. `show board-address' Show the current IP address of the target board. `set server-address ADDR' Set the IP address for the download server, which is the GDB's host machine. `show server-address' Display the IP address of the download server. `upload [FILE]' Upload the specified SREC FILE via the monitor's Ethernet upload capability. If no FILE argument is given, the current executable file is uploaded. `tload [FILE]' Test the `upload' command. The following commands are available for M32R/SDI: `sdireset' This command resets the SDI connection. `sdistatus' This command shows the SDI connection status. `debug_chaos' Instructs the remote that M32R/Chaos debugging is to be used. `use_debug_dma' Instructs the remote to use the DEBUG_DMA method of accessing memory. `use_mon_code' Instructs the remote to use the MON_CODE method of accessing memory. `use_ib_break' Instructs the remote to set breakpoints by IB break. `use_dbt_break' Instructs the remote to set breakpoints by DBT.  File: gdb.info, Node: M68K, Next: MicroBlaze, Prev: M32R/D, Up: Embedded Processors 21.3.3 M68k ----------- The Motorola m68k configuration includes ColdFire support, and a target command for the following ROM monitor. `target dbug DEV' dBUG ROM monitor for Motorola ColdFire.  File: gdb.info, Node: MicroBlaze, Next: MIPS Embedded, Prev: M68K, Up: Embedded Processors 21.3.4 MicroBlaze ----------------- The MicroBlaze is a soft-core processor supported on various Xilinx FPGAs, such as Spartan or Virtex series. Boards with these processors usually have JTAG ports which connect to a host system running the Xilinx Embedded Development Kit (EDK) or Software Development Kit (SDK). This host system is used to download the configuration bitstream to the target FPGA. The Xilinx Microprocessor Debugger (XMD) program communicates with the target board using the JTAG interface and presents a `gdbserver' interface to the board. By default `xmd' uses port `1234'. (While it is possible to change this default port, it requires the use of undocumented `xmd' commands. Contact Xilinx support if you need to do this.) Use these GDB commands to connect to the MicroBlaze target processor. `target remote :1234' Use this command to connect to the target if you are running GDB on the same system as `xmd'. `target remote XMD-HOST:1234' Use this command to connect to the target if it is connected to `xmd' running on a different system named XMD-HOST. `load' Use this command to download a program to the MicroBlaze target. `set debug microblaze N' Enable MicroBlaze-specific debugging messages if non-zero. `show debug microblaze N' Show MicroBlaze-specific debugging level.  File: gdb.info, Node: MIPS Embedded, Next: OpenRISC 1000, Prev: MicroBlaze, Up: Embedded Processors 21.3.5 MIPS Embedded -------------------- GDB can use the MIPS remote debugging protocol to talk to a MIPS board attached to a serial line. This is available when you configure GDB with `--target=mips-elf'. Use these GDB commands to specify the connection to your target board: `target mips PORT' To run a program on the board, start up `gdb' with the name of your program as the argument. To connect to the board, use the command `target mips PORT', where PORT is the name of the serial port connected to the board. If the program has not already been downloaded to the board, you may use the `load' command to download it. You can then use all the usual GDB commands. For example, this sequence connects to the target board through a serial port, and loads and runs a program called PROG through the debugger: host$ gdb PROG GDB is free software and ... (gdb) target mips /dev/ttyb (gdb) load PROG (gdb) run `target mips HOSTNAME:PORTNUMBER' On some GDB host configurations, you can specify a TCP connection (for instance, to a serial line managed by a terminal concentrator) instead of a serial port, using the syntax `HOSTNAME:PORTNUMBER'. `target pmon PORT' PMON ROM monitor. `target ddb PORT' NEC's DDB variant of PMON for Vr4300. `target lsi PORT' LSI variant of PMON. `target r3900 DEV' Densan DVE-R3900 ROM monitor for Toshiba R3900 Mips. `target array DEV' Array Tech LSI33K RAID controller board. GDB also supports these special commands for MIPS targets: `set mipsfpu double' `set mipsfpu single' `set mipsfpu none' `set mipsfpu auto' `show mipsfpu' If your target board does not support the MIPS floating point coprocessor, you should use the command `set mipsfpu none' (if you need this, you may wish to put the command in your GDB init file). This tells GDB how to find the return value of functions which return floating point values. It also allows GDB to avoid saving the floating point registers when calling functions on the board. If you are using a floating point coprocessor with only single precision floating point support, as on the R4650 processor, use the command `set mipsfpu single'. The default double precision floating point coprocessor may be selected using `set mipsfpu double'. In previous versions the only choices were double precision or no floating point, so `set mipsfpu on' will select double precision and `set mipsfpu off' will select no floating point. As usual, you can inquire about the `mipsfpu' variable with `show mipsfpu'. `set timeout SECONDS' `set retransmit-timeout SECONDS' `show timeout' `show retransmit-timeout' You can control the timeout used while waiting for a packet, in the MIPS remote protocol, with the `set timeout SECONDS' command. The default is 5 seconds. Similarly, you can control the timeout used while waiting for an acknowledgment of a packet with the `set retransmit-timeout SECONDS' command. The default is 3 seconds. You can inspect both values with `show timeout' and `show retransmit-timeout'. (These commands are _only_ available when GDB is configured for `--target=mips-elf'.) The timeout set by `set timeout' does not apply when GDB is waiting for your program to stop. In that case, GDB waits forever because it has no way of knowing how long the program is going to run before stopping. `set syn-garbage-limit NUM' Limit the maximum number of characters GDB should ignore when it tries to synchronize with the remote target. The default is 10 characters. Setting the limit to -1 means there's no limit. `show syn-garbage-limit' Show the current limit on the number of characters to ignore when trying to synchronize with the remote system. `set monitor-prompt PROMPT' Tell GDB to expect the specified PROMPT string from the remote monitor. The default depends on the target: pmon target `PMON' ddb target `NEC010' lsi target `PMON>' `show monitor-prompt' Show the current strings GDB expects as the prompt from the remote monitor. `set monitor-warnings' Enable or disable monitor warnings about hardware breakpoints. This has effect only for the `lsi' target. When on, GDB will display warning messages whose codes are returned by the `lsi' PMON monitor for breakpoint commands. `show monitor-warnings' Show the current setting of printing monitor warnings. `pmon COMMAND' This command allows sending an arbitrary COMMAND string to the monitor. The monitor must be in debug mode for this to work.  File: gdb.info, Node: OpenRISC 1000, Next: PowerPC Embedded, Prev: MIPS Embedded, Up: Embedded Processors 21.3.6 OpenRISC 1000 -------------------- See OR1k Architecture document (`www.opencores.org') for more information about platform and commands. `target jtag jtag://HOST:PORT' Connects to remote JTAG server. JTAG remote server can be either an or1ksim or JTAG server, connected via parallel port to the board. Example: `target jtag jtag://localhost:9999' `or1ksim COMMAND' If connected to `or1ksim' OpenRISC 1000 Architectural Simulator, proprietary commands can be executed. `info or1k spr' Displays spr groups. `info or1k spr GROUP' `info or1k spr GROUPNO' Displays register names in selected group. `info or1k spr GROUP REGISTER' `info or1k spr REGISTER' `info or1k spr GROUPNO REGISTERNO' `info or1k spr REGISTERNO' Shows information about specified spr register. `spr GROUP REGISTER VALUE' `spr REGISTER VALUE' `spr GROUPNO REGISTERNO VALUE' `spr REGISTERNO VALUE' Writes VALUE to specified spr register. Some implementations of OpenRISC 1000 Architecture also have hardware trace. It is very similar to GDB trace, except it does not interfere with normal program execution and is thus much faster. Hardware breakpoints/watchpoint triggers can be set using: `$LEA/$LDATA' Load effective address/data `$SEA/$SDATA' Store effective address/data `$AEA/$ADATA' Access effective address ($SEA or $LEA) or data ($SDATA/$LDATA) `$FETCH' Fetch data When triggered, it can capture low level data, like: `PC', `LSEA', `LDATA', `SDATA', `READSPR', `WRITESPR', `INSTR'. `htrace' commands: `hwatch CONDITIONAL' Set hardware watchpoint on combination of Load/Store Effective Address(es) or Data. For example: `hwatch ($LEA == my_var) && ($LDATA < 50) || ($SEA == my_var) && ($SDATA >= 50)' `hwatch ($LEA == my_var) && ($LDATA < 50) || ($SEA == my_var) && ($SDATA >= 50)' `htrace info' Display information about current HW trace configuration. `htrace trigger CONDITIONAL' Set starting criteria for HW trace. `htrace qualifier CONDITIONAL' Set acquisition qualifier for HW trace. `htrace stop CONDITIONAL' Set HW trace stopping criteria. `htrace record [DATA]*' Selects the data to be recorded, when qualifier is met and HW trace was triggered. `htrace enable' `htrace disable' Enables/disables the HW trace. `htrace rewind [FILENAME]' Clears currently recorded trace data. If filename is specified, new trace file is made and any newly collected data will be written there. `htrace print [START [LEN]]' Prints trace buffer, using current record configuration. `htrace mode continuous' Set continuous trace mode. `htrace mode suspend' Set suspend trace mode.  File: gdb.info, Node: PowerPC Embedded, Next: PA, Prev: OpenRISC 1000, Up: Embedded Processors 21.3.7 PowerPC Embedded ----------------------- GDB supports using the DVC (Data Value Compare) register to implement in hardware simple hardware watchpoint conditions of the form: (gdb) watch ADDRESS|VARIABLE \ if ADDRESS|VARIABLE == CONSTANT EXPRESSION The DVC register will be automatically used when GDB detects such pattern in a condition expression, and the created watchpoint uses one debug register (either the `exact-watchpoints' option is on and the variable is scalar, or the variable has a length of one byte). This feature is available in native GDB running on a Linux kernel version 2.6.34 or newer. When running on PowerPC embedded processors, GDB automatically uses ranged hardware watchpoints, unless the `exact-watchpoints' option is on, in which case watchpoints using only one debug register are created when watching variables of scalar types. You can create an artificial array to watch an arbitrary memory region using one of the following commands (*note Expressions::): (gdb) watch *((char *) ADDRESS)@LENGTH (gdb) watch {char[LENGTH]} ADDRESS PowerPC embedded processors support masked watchpoints. See the discussion about the `mask' argument in *note Set Watchpoints::. PowerPC embedded processors support hardware accelerated "ranged breakpoints". A ranged breakpoint stops execution of the inferior whenever it executes an instruction at any address within the range it specifies. To set a ranged breakpoint in GDB, use the `break-range' command. GDB provides the following PowerPC-specific commands: `break-range START-LOCATION, END-LOCATION' Set a breakpoint for an address range. START-LOCATION and END-LOCATION can specify a function name, a line number, an offset of lines from the current line or from the start location, or an address of an instruction (see *note Specify Location::, for a list of all the possible ways to specify a LOCATION.) The breakpoint will stop execution of the inferior whenever it executes an instruction at any address within the specified range, (including START-LOCATION and END-LOCATION.) `set powerpc soft-float' `show powerpc soft-float' Force GDB to use (or not use) a software floating point calling convention. By default, GDB selects the calling convention based on the selected architecture and the provided executable file. `set powerpc vector-abi' `show powerpc vector-abi' Force GDB to use the specified calling convention for vector arguments and return values. The valid options are `auto'; `generic', to avoid vector registers even if they are present; `altivec', to use AltiVec registers; and `spe' to use SPE registers. By default, GDB selects the calling convention based on the selected architecture and the provided executable file. `set powerpc exact-watchpoints' `show powerpc exact-watchpoints' Allow GDB to use only one debug register when watching a variable of scalar type, thus assuming that the variable is accessed through the address of its first byte. `target dink32 DEV' DINK32 ROM monitor. `target ppcbug DEV' `target ppcbug1 DEV' PPCBUG ROM monitor for PowerPC. `target sds DEV' SDS monitor, running on a PowerPC board (such as Motorola's ADS). The following commands specific to the SDS protocol are supported by GDB: `set sdstimeout NSEC' Set the timeout for SDS protocol reads to be NSEC seconds. The default is 2 seconds. `show sdstimeout' Show the current value of the SDS timeout. `sds COMMAND' Send the specified COMMAND string to the SDS monitor.  File: gdb.info, Node: PA, Next: Sparclet, Prev: PowerPC Embedded, Up: Embedded Processors 21.3.8 HP PA Embedded --------------------- `target op50n DEV' OP50N monitor, running on an OKI HPPA board. `target w89k DEV' W89K monitor, running on a Winbond HPPA board.  File: gdb.info, Node: Sparclet, Next: Sparclite, Prev: PA, Up: Embedded Processors 21.3.9 Tsqware Sparclet ----------------------- GDB enables developers to debug tasks running on Sparclet targets from a Unix host. GDB uses code that runs on both the Unix host and on the Sparclet target. The program `gdb' is installed and executed on the Unix host. `remotetimeout ARGS' GDB supports the option `remotetimeout'. This option is set by the user, and ARGS represents the number of seconds GDB waits for responses. When compiling for debugging, include the options `-g' to get debug information and `-Ttext' to relocate the program to where you wish to load it on the target. You may also want to add the options `-n' or `-N' in order to reduce the size of the sections. Example: sparclet-aout-gcc prog.c -Ttext 0x12010000 -g -o prog -N You can use `objdump' to verify that the addresses are what you intended: sparclet-aout-objdump --headers --syms prog Once you have set your Unix execution search path to find GDB, you are ready to run GDB. From your Unix host, run `gdb' (or `sparclet-aout-gdb', depending on your installation). GDB comes up showing the prompt: (gdbslet) * Menu: * Sparclet File:: Setting the file to debug * Sparclet Connection:: Connecting to Sparclet * Sparclet Download:: Sparclet download * Sparclet Execution:: Running and debugging  File: gdb.info, Node: Sparclet File, Next: Sparclet Connection, Up: Sparclet 21.3.9.1 Setting File to Debug .............................. The GDB command `file' lets you choose with program to debug. (gdbslet) file prog GDB then attempts to read the symbol table of `prog'. GDB locates the file by searching the directories listed in the command search path. If the file was compiled with debug information (option `-g'), source files will be searched as well. GDB locates the source files by searching the directories listed in the directory search path (*note Your Program's Environment: Environment.). If it fails to find a file, it displays a message such as: prog: No such file or directory. When this happens, add the appropriate directories to the search paths with the GDB commands `path' and `dir', and execute the `target' command again.  File: gdb.info, Node: Sparclet Connection, Next: Sparclet Download, Prev: Sparclet File, Up: Sparclet 21.3.9.2 Connecting to Sparclet ............................... The GDB command `target' lets you connect to a Sparclet target. To connect to a target on serial port "`ttya'", type: (gdbslet) target sparclet /dev/ttya Remote target sparclet connected to /dev/ttya main () at ../prog.c:3 GDB displays messages like these: Connected to ttya.  File: gdb.info, Node: Sparclet Download, Next: Sparclet Execution, Prev: Sparclet Connection, Up: Sparclet 21.3.9.3 Sparclet Download .......................... Once connected to the Sparclet target, you can use the GDB `load' command to download the file from the host to the target. The file name and load offset should be given as arguments to the `load' command. Since the file format is aout, the program must be loaded to the starting address. You can use `objdump' to find out what this value is. The load offset is an offset which is added to the VMA (virtual memory address) of each of the file's sections. For instance, if the program `prog' was linked to text address 0x1201000, with data at 0x12010160 and bss at 0x12010170, in GDB, type: (gdbslet) load prog 0x12010000 Loading section .text, size 0xdb0 vma 0x12010000 If the code is loaded at a different address then what the program was linked to, you may need to use the `section' and `add-symbol-file' commands to tell GDB where to map the symbol table.  File: gdb.info, Node: Sparclet Execution, Prev: Sparclet Download, Up: Sparclet 21.3.9.4 Running and Debugging .............................. You can now begin debugging the task using GDB's execution control commands, `b', `step', `run', etc. See the GDB manual for the list of commands. (gdbslet) b main Breakpoint 1 at 0x12010000: file prog.c, line 3. (gdbslet) run Starting program: prog Breakpoint 1, main (argc=1, argv=0xeffff21c) at prog.c:3 3 char *symarg = 0; (gdbslet) step 4 char *execarg = "hello!"; (gdbslet)  File: gdb.info, Node: Sparclite, Next: Z8000, Prev: Sparclet, Up: Embedded Processors 21.3.10 Fujitsu Sparclite ------------------------- `target sparclite DEV' Fujitsu sparclite boards, used only for the purpose of loading. You must use an additional command to debug the program. For example: target remote DEV using GDB standard remote protocol.  File: gdb.info, Node: Z8000, Next: AVR, Prev: Sparclite, Up: Embedded Processors 21.3.11 Zilog Z8000 ------------------- When configured for debugging Zilog Z8000 targets, GDB includes a Z8000 simulator. For the Z8000 family, `target sim' simulates either the Z8002 (the unsegmented variant of the Z8000 architecture) or the Z8001 (the segmented variant). The simulator recognizes which architecture is appropriate by inspecting the object code. `target sim ARGS' Debug programs on a simulated CPU. If the simulator supports setup options, specify them via ARGS. After specifying this target, you can debug programs for the simulated CPU in the same style as programs for your host computer; use the `file' command to load a new program image, the `run' command to run your program, and so on. As well as making available all the usual machine registers (*note Registers: Registers.), the Z8000 simulator provides three additional items of information as specially named registers: `cycles' Counts clock-ticks in the simulator. `insts' Counts instructions run in the simulator. `time' Execution time in 60ths of a second. You can refer to these values in GDB expressions with the usual conventions; for example, `b fputc if $cycles>5000' sets a conditional breakpoint that suspends only after at least 5000 simulated clock ticks.  File: gdb.info, Node: AVR, Next: CRIS, Prev: Z8000, Up: Embedded Processors 21.3.12 Atmel AVR ----------------- When configured for debugging the Atmel AVR, GDB supports the following AVR-specific commands: `info io_registers' This command displays information about the AVR I/O registers. For each register, GDB prints its number and value.  File: gdb.info, Node: CRIS, Next: Super-H, Prev: AVR, Up: Embedded Processors 21.3.13 CRIS ------------ When configured for debugging CRIS, GDB provides the following CRIS-specific commands: `set cris-version VER' Set the current CRIS version to VER, either `10' or `32'. The CRIS version affects register names and sizes. This command is useful in case autodetection of the CRIS version fails. `show cris-version' Show the current CRIS version. `set cris-dwarf2-cfi' Set the usage of DWARF-2 CFI for CRIS debugging. The default is `on'. Change to `off' when using `gcc-cris' whose version is below `R59'. `show cris-dwarf2-cfi' Show the current state of using DWARF-2 CFI. `set cris-mode MODE' Set the current CRIS mode to MODE. It should only be changed when debugging in guru mode, in which case it should be set to `guru' (the default is `normal'). `show cris-mode' Show the current CRIS mode.  File: gdb.info, Node: Super-H, Prev: CRIS, Up: Embedded Processors 21.3.14 Renesas Super-H ----------------------- For the Renesas Super-H processor, GDB provides these commands: `set sh calling-convention CONVENTION' Set the calling-convention used when calling functions from GDB. Allowed values are `gcc', which is the default setting, and `renesas'. With the `gcc' setting, functions are called using the GCC calling convention. If the DWARF-2 information of the called function specifies that the function follows the Renesas calling convention, the function is called using the Renesas calling convention. If the calling convention is set to `renesas', the Renesas calling convention is always used, regardless of the DWARF-2 information. This can be used to override the default of `gcc' if debug information is missing, or the compiler does not emit the DWARF-2 calling convention entry for a function. `show sh calling-convention' Show the current calling convention setting.  File: gdb.info, Node: Architectures, Prev: Embedded Processors, Up: Configurations 21.4 Architectures ================== This section describes characteristics of architectures that affect all uses of GDB with the architecture, both native and cross. * Menu: * AArch64:: * i386:: * Alpha:: * MIPS:: * HPPA:: HP PA architecture * SPU:: Cell Broadband Engine SPU architecture * PowerPC::  File: gdb.info, Node: AArch64, Next: i386, Up: Architectures 21.4.1 AArch64 -------------- When GDB is debugging the AArch64 architecture, it provides the following special commands: `set debug aarch64' This command determines whether AArch64 architecture-specific debugging messages are to be displayed. `show debug aarch64' Show whether AArch64 debugging messages are displayed.  File: gdb.info, Node: i386, Next: Alpha, Prev: AArch64, Up: Architectures 21.4.2 x86 Architecture-specific Issues --------------------------------------- `set struct-convention MODE' Set the convention used by the inferior to return `struct's and `union's from functions to MODE. Possible values of MODE are `"pcc"', `"reg"', and `"default"' (the default). `"default"' or `"pcc"' means that `struct's are returned on the stack, while `"reg"' means that a `struct' or a `union' whose size is 1, 2, 4, or 8 bytes will be returned in a register. `show struct-convention' Show the current setting of the convention to return `struct's from functions.  File: gdb.info, Node: Alpha, Next: MIPS, Prev: i386, Up: Architectures 21.4.3 Alpha ------------ See the following section.  File: gdb.info, Node: MIPS, Next: HPPA, Prev: Alpha, Up: Architectures 21.4.4 MIPS ----------- Alpha- and MIPS-based computers use an unusual stack frame, which sometimes requires GDB to search backward in the object code to find the beginning of a function. To improve response time (especially for embedded applications, where GDB may be restricted to a slow serial line for this search) you may want to limit the size of this search, using one of these commands: `set heuristic-fence-post LIMIT' Restrict GDB to examining at most LIMIT bytes in its search for the beginning of a function. A value of 0 (the default) means there is no limit. However, except for 0, the larger the limit the more bytes `heuristic-fence-post' must search and therefore the longer it takes to run. You should only need to use this command when debugging a stripped executable. `show heuristic-fence-post' Display the current limit. These commands are available _only_ when GDB is configured for debugging programs on Alpha or MIPS processors. Several MIPS-specific commands are available when debugging MIPS programs: `set mips abi ARG' Tell GDB which MIPS ABI is used by the inferior. Possible values of ARG are: `auto' The default ABI associated with the current binary (this is the default). `o32' `o64' `n32' `n64' `eabi32' `eabi64' `show mips abi' Show the MIPS ABI used by GDB to debug the inferior. `set mips compression ARG' Tell GDB which MIPS compressed ISA (Instruction Set Architecture) encoding is used by the inferior. GDB uses this for code disassembly and other internal interpretation purposes. This setting is only referred to when no executable has been associated with the debugging session or the executable does not provide information about the encoding it uses. Otherwise this setting is automatically updated from information provided by the executable. Possible values of ARG are `mips16' and `micromips'. The default compressed ISA encoding is `mips16', as executables containing MIPS16 code frequently are not identified as such. This setting is "sticky"; that is, it retains its value across debugging sessions until reset either explicitly with this command or implicitly from an executable. The compiler and/or assembler typically add symbol table annotations to identify functions compiled for the MIPS16 or microMIPS ISAs. If these function-scope annotations are present, GDB uses them in preference to the global compressed ISA encoding setting. `show mips compression' Show the MIPS compressed ISA encoding used by GDB to debug the inferior. `set mipsfpu' `show mipsfpu' *Note set mipsfpu: MIPS Embedded. `set mips mask-address ARG' This command determines whether the most-significant 32 bits of 64-bit MIPS addresses are masked off. The argument ARG can be `on', `off', or `auto'. The latter is the default setting, which lets GDB determine the correct value. `show mips mask-address' Show whether the upper 32 bits of MIPS addresses are masked off or not. `set remote-mips64-transfers-32bit-regs' This command controls compatibility with 64-bit MIPS targets that transfer data in 32-bit quantities. If you have an old MIPS 64 target that transfers 32 bits for some registers, like SR and FSR, and 64 bits for other registers, set this option to `on'. `show remote-mips64-transfers-32bit-regs' Show the current setting of compatibility with older MIPS 64 targets. `set debug mips' This command turns on and off debugging messages for the MIPS-specific target code in GDB. `show debug mips' Show the current setting of MIPS debugging messages.  File: gdb.info, Node: HPPA, Next: SPU, Prev: MIPS, Up: Architectures 21.4.5 HPPA ----------- When GDB is debugging the HP PA architecture, it provides the following special commands: `set debug hppa' This command determines whether HPPA architecture-specific debugging messages are to be displayed. `show debug hppa' Show whether HPPA debugging messages are displayed. `maint print unwind ADDRESS' This command displays the contents of the unwind table entry at the given ADDRESS.  File: gdb.info, Node: SPU, Next: PowerPC, Prev: HPPA, Up: Architectures 21.4.6 Cell Broadband Engine SPU architecture --------------------------------------------- When GDB is debugging the Cell Broadband Engine SPU architecture, it provides the following special commands: `info spu event' Display SPU event facility status. Shows current event mask and pending event status. `info spu signal' Display SPU signal notification facility status. Shows pending signal-control word and signal notification mode of both signal notification channels. `info spu mailbox' Display SPU mailbox facility status. Shows all pending entries, in order of processing, in each of the SPU Write Outbound, SPU Write Outbound Interrupt, and SPU Read Inbound mailboxes. `info spu dma' Display MFC DMA status. Shows all pending commands in the MFC DMA queue. For each entry, opcode, tag, class IDs, effective and local store addresses and transfer size are shown. `info spu proxydma' Display MFC Proxy-DMA status. Shows all pending commands in the MFC Proxy-DMA queue. For each entry, opcode, tag, class IDs, effective and local store addresses and transfer size are shown. When GDB is debugging a combined PowerPC/SPU application on the Cell Broadband Engine, it provides in addition the following special commands: `set spu stop-on-load ARG' Set whether to stop for new SPE threads. When set to `on', GDB will give control to the user when a new SPE thread enters its `main' function. The default is `off'. `show spu stop-on-load' Show whether to stop for new SPE threads. `set spu auto-flush-cache ARG' Set whether to automatically flush the software-managed cache. When set to `on', GDB will automatically cause the SPE software-managed cache to be flushed whenever SPE execution stops. This provides a consistent view of PowerPC memory that is accessed via the cache. If an application does not use the software-managed cache, this option has no effect. `show spu auto-flush-cache' Show whether to automatically flush the software-managed cache.  File: gdb.info, Node: PowerPC, Prev: SPU, Up: Architectures 21.4.7 PowerPC -------------- When GDB is debugging the PowerPC architecture, it provides a set of pseudo-registers to enable inspection of 128-bit wide Decimal Floating Point numbers stored in the floating point registers. These values must be stored in two consecutive registers, always starting at an even register like `f0' or `f2'. The pseudo-registers go from `$dl0' through `$dl15', and are formed by joining the even/odd register pairs `f0' and `f1' for `$dl0', `f2' and `f3' for `$dl1' and so on. For POWER7 processors, GDB provides a set of pseudo-registers, the 64-bit wide Extended Floating Point Registers (`f32' through `f63').  File: gdb.info, Node: Controlling GDB, Next: Extending GDB, Prev: Configurations, Up: Top 22 Controlling GDB ****************** You can alter the way GDB interacts with you by using the `set' command. For commands controlling how GDB displays data, see *note Print Settings: Print Settings. Other settings are described here. * Menu: * Prompt:: Prompt * Editing:: Command editing * Command History:: Command history * Screen Size:: Screen size * Numbers:: Numbers * ABI:: Configuring the current ABI * Auto-loading:: Automatically loading associated files * Messages/Warnings:: Optional warnings and messages * Debugging Output:: Optional messages about internal happenings * Other Misc Settings:: Other Miscellaneous Settings  File: gdb.info, Node: Prompt, Next: Editing, Up: Controlling GDB 22.1 Prompt =========== GDB indicates its readiness to read a command by printing a string called the "prompt". This string is normally `(gdb)'. You can change the prompt string with the `set prompt' command. For instance, when debugging GDB with GDB, it is useful to change the prompt in one of the GDB sessions so that you can always tell which one you are talking to. _Note:_ `set prompt' does not add a space for you after the prompt you set. This allows you to set a prompt which ends in a space or a prompt that does not. `set prompt NEWPROMPT' Directs GDB to use NEWPROMPT as its prompt string henceforth. `show prompt' Prints a line of the form: `Gdb's prompt is: YOUR-PROMPT' Versions of GDB that ship with Python scripting enabled have prompt extensions. The commands for interacting with these extensions are: `set extended-prompt PROMPT' Set an extended prompt that allows for substitutions. *Note gdb.prompt::, for a list of escape sequences that can be used for substitution. Any escape sequences specified as part of the prompt string are replaced with the corresponding strings each time the prompt is displayed. For example: set extended-prompt Current working directory: \w (gdb) Note that when an extended-prompt is set, it takes control of the PROMPT_HOOK hook. *Note prompt_hook::, for further information. `show extended-prompt' Prints the extended prompt. Any escape sequences specified as part of the prompt string with `set extended-prompt', are replaced with the corresponding strings each time the prompt is displayed.  File: gdb.info, Node: Editing, Next: Command History, Prev: Prompt, Up: Controlling GDB 22.2 Command Editing ==================== GDB reads its input commands via the "Readline" interface. This GNU library provides consistent behavior for programs which provide a command line interface to the user. Advantages are GNU Emacs-style or "vi"-style inline editing of commands, `csh'-like history substitution, and a storage and recall of command history across debugging sessions. You may control the behavior of command line editing in GDB with the command `set'. `set editing' `set editing on' Enable command line editing (enabled by default). `set editing off' Disable command line editing. `show editing' Show whether command line editing is enabled. *Note Command Line Editing::, for more details about the Readline interface. Users unfamiliar with GNU Emacs or `vi' are encouraged to read that chapter.  File: gdb.info, Node: Command History, Next: Screen Size, Prev: Editing, Up: Controlling GDB 22.3 Command History ==================== GDB can keep track of the commands you type during your debugging sessions, so that you can be certain of precisely what happened. Use these commands to manage the GDB command history facility. GDB uses the GNU History library, a part of the Readline package, to provide the history facility. *Note Using History Interactively::, for the detailed description of the History library. To issue a command to GDB without affecting certain aspects of the state which is seen by users, prefix it with `server ' (*note Server Prefix::). This means that this command will not affect the command history, nor will it affect GDB's notion of which command to repeat if is pressed on a line by itself. The server prefix does not affect the recording of values into the value history; to print a value without recording it into the value history, use the `output' command instead of the `print' command. Here is the description of GDB commands related to command history. `set history filename FNAME' Set the name of the GDB command history file to FNAME. This is the file where GDB reads an initial command history list, and where it writes the command history from this session when it exits. You can access this list through history expansion or through the history command editing characters listed below. This file defaults to the value of the environment variable `GDBHISTFILE', or to `./.gdb_history' (`./_gdb_history' on MS-DOS) if this variable is not set. `set history save' `set history save on' Record command history in a file, whose name may be specified with the `set history filename' command. By default, this option is disabled. `set history save off' Stop recording command history in a file. `set history size SIZE' Set the number of commands which GDB keeps in its history list. This defaults to the value of the environment variable `HISTSIZE', or to 256 if this variable is not set. History expansion assigns special meaning to the character `!'. *Note Event Designators::, for more details. Since `!' is also the logical not operator in C, history expansion is off by default. If you decide to enable history expansion with the `set history expansion on' command, you may sometimes need to follow `!' (when it is used as logical not, in an expression) with a space or a tab to prevent it from being expanded. The readline history facilities do not attempt substitution on the strings `!=' and `!(', even when history expansion is enabled. The commands to control history expansion are: `set history expansion on' `set history expansion' Enable history expansion. History expansion is off by default. `set history expansion off' Disable history expansion. `show history' `show history filename' `show history save' `show history size' `show history expansion' These commands display the state of the GDB history parameters. `show history' by itself displays all four states. `show commands' Display the last ten commands in the command history. `show commands N' Print ten commands centered on command number N. `show commands +' Print ten commands just after the commands last printed.  File: gdb.info, Node: Screen Size, Next: Numbers, Prev: Command History, Up: Controlling GDB 22.4 Screen Size ================ Certain commands to GDB may produce large amounts of information output to the screen. To help you read all of it, GDB pauses and asks you for input at the end of each page of output. Type when you want to continue the output, or `q' to discard the remaining output. Also, the screen width setting determines when to wrap lines of output. Depending on what is being printed, GDB tries to break the line at a readable place, rather than simply letting it overflow onto the following line. Normally GDB knows the size of the screen from the terminal driver software. For example, on Unix GDB uses the termcap data base together with the value of the `TERM' environment variable and the `stty rows' and `stty cols' settings. If this is not correct, you can override it with the `set height' and `set width' commands: `set height LPP' `show height' `set width CPL' `show width' These `set' commands specify a screen height of LPP lines and a screen width of CPL characters. The associated `show' commands display the current settings. If you specify a height of zero lines, GDB does not pause during output no matter how long the output is. This is useful if output is to a file or to an editor buffer. Likewise, you can specify `set width 0' to prevent GDB from wrapping its output. `set pagination on' `set pagination off' Turn the output pagination on or off; the default is on. Turning pagination off is the alternative to `set height 0'. Note that running GDB with the `--batch' option (*note -batch: Mode Options.) also automatically disables pagination. `show pagination' Show the current pagination mode.  File: gdb.info, Node: Numbers, Next: ABI, Prev: Screen Size, Up: Controlling GDB 22.5 Numbers ============ You can always enter numbers in octal, decimal, or hexadecimal in GDB by the usual conventions: octal numbers begin with `0', decimal numbers end with `.', and hexadecimal numbers begin with `0x'. Numbers that neither begin with `0' or `0x', nor end with a `.' are, by default, entered in base 10; likewise, the default display for numbers--when no particular format is specified--is base 10. You can change the default base for both input and output with the commands described below. `set input-radix BASE' Set the default base for numeric input. Supported choices for BASE are decimal 8, 10, or 16. BASE must itself be specified either unambiguously or using the current input radix; for example, any of set input-radix 012 set input-radix 10. set input-radix 0xa sets the input base to decimal. On the other hand, `set input-radix 10' leaves the input radix unchanged, no matter what it was, since `10', being without any leading or trailing signs of its base, is interpreted in the current radix. Thus, if the current radix is 16, `10' is interpreted in hex, i.e. as 16 decimal, which doesn't change the radix. `set output-radix BASE' Set the default base for numeric display. Supported choices for BASE are decimal 8, 10, or 16. BASE must itself be specified either unambiguously or using the current input radix. `show input-radix' Display the current default base for numeric input. `show output-radix' Display the current default base for numeric display. `set radix [BASE]' `show radix' These commands set and show the default base for both input and output of numbers. `set radix' sets the radix of input and output to the same base; without an argument, it resets the radix back to its default value of 10.  File: gdb.info, Node: ABI, Next: Auto-loading, Prev: Numbers, Up: Controlling GDB 22.6 Configuring the Current ABI ================================ GDB can determine the "ABI" (Application Binary Interface) of your application automatically. However, sometimes you need to override its conclusions. Use these commands to manage GDB's view of the current ABI. One GDB configuration can debug binaries for multiple operating system targets, either via remote debugging or native emulation. GDB will autodetect the "OS ABI" (Operating System ABI) in use, but you can override its conclusion using the `set osabi' command. One example where this is useful is in debugging of binaries which use an alternate C library (e.g. UCLIBC for GNU/Linux) which does not have the same identifying marks that the standard C library for your platform provides. When GDB is debugging the AArch64 architecture, it provides a "Newlib" OS ABI. This is useful for handling `setjmp' and `longjmp' when debugging binaries that use the NEWLIB C library. The "Newlib" OS ABI can be selected by `set osabi Newlib'. `show osabi' Show the OS ABI currently in use. `set osabi' With no argument, show the list of registered available OS ABI's. `set osabi ABI' Set the current OS ABI to ABI. Generally, the way that an argument of type `float' is passed to a function depends on whether the function is prototyped. For a prototyped (i.e. ANSI/ISO style) function, `float' arguments are passed unchanged, according to the architecture's convention for `float'. For unprototyped (i.e. K&R style) functions, `float' arguments are first promoted to type `double' and then passed. Unfortunately, some forms of debug information do not reliably indicate whether a function is prototyped. If GDB calls a function that is not marked as prototyped, it consults `set coerce-float-to-double'. `set coerce-float-to-double' `set coerce-float-to-double on' Arguments of type `float' will be promoted to `double' when passed to an unprototyped function. This is the default setting. `set coerce-float-to-double off' Arguments of type `float' will be passed directly to unprototyped functions. `show coerce-float-to-double' Show the current setting of promoting `float' to `double'. GDB needs to know the ABI used for your program's C++ objects. The correct C++ ABI depends on which C++ compiler was used to build your application. GDB only fully supports programs with a single C++ ABI; if your program contains code using multiple C++ ABI's or if GDB can not identify your program's ABI correctly, you can tell GDB which ABI to use. Currently supported ABI's include "gnu-v2", for `g++' versions before 3.0, "gnu-v3", for `g++' versions 3.0 and later, and "hpaCC" for the HP ANSI C++ compiler. Other C++ compilers may use the "gnu-v2" or "gnu-v3" ABI's as well. The default setting is "auto". `show cp-abi' Show the C++ ABI currently in use. `set cp-abi' With no argument, show the list of supported C++ ABI's. `set cp-abi ABI' `set cp-abi auto' Set the current C++ ABI to ABI, or return to automatic detection.  File: gdb.info, Node: Auto-loading, Next: Messages/Warnings, Prev: ABI, Up: Controlling GDB 22.7 Automatically loading associated files =========================================== GDB sometimes reads files with commands and settings automatically, without being explicitly told so by the user. We call this feature "auto-loading". While auto-loading is useful for automatically adapting GDB to the needs of your project, it can sometimes produce unexpected results or introduce security risks (e.g., if the file comes from untrusted sources). Note that loading of these associated files (including the local `.gdbinit' file) requires accordingly configured `auto-load safe-path' (*note Auto-loading safe path::). For these reasons, GDB includes commands and options to let you control when to auto-load files and which files should be auto-loaded. `set auto-load off' Globally disable loading of all auto-loaded files. You may want to use this command with the `-iex' option (*note Option -init-eval-command::) such as: $ gdb -iex "set auto-load off" untrusted-executable corefile Be aware that system init file (*note System-wide configuration::) and init files from your home directory (*note Home Directory Init File::) still get read (as they come from generally trusted directories). To prevent GDB from auto-loading even those init files, use the `-nx' option (*note Mode Options::), in addition to `set auto-load no'. `show auto-load' Show whether auto-loading of each specific `auto-load' file(s) is enabled or disabled. (gdb) show auto-load gdb-scripts: Auto-loading of canned sequences of commands scripts is on. libthread-db: Auto-loading of inferior specific libthread_db is on. local-gdbinit: Auto-loading of .gdbinit script from current directory is on. python-scripts: Auto-loading of Python scripts is on. safe-path: List of directories from which it is safe to auto-load files is $debugdir:$datadir/auto-load. scripts-directory: List of directories from which to load auto-loaded scripts is $debugdir:$datadir/auto-load. `info auto-load' Print whether each specific `auto-load' file(s) have been auto-loaded or not. (gdb) info auto-load gdb-scripts: Loaded Script Yes /home/user/gdb/gdb-gdb.gdb libthread-db: No auto-loaded libthread-db. local-gdbinit: Local .gdbinit file "/home/user/gdb/.gdbinit" has been loaded. python-scripts: Loaded Script Yes /home/user/gdb/gdb-gdb.py These are various kinds of files GDB can automatically load: * *Note objfile-gdb.py file::, controlled by *note set auto-load python-scripts::. * *Note objfile-gdb.gdb file::, controlled by *note set auto-load gdb-scripts::. * *Note dotdebug_gdb_scripts section::, controlled by *note set auto-load python-scripts::. * *Note Init File in the Current Directory::, controlled by *note set auto-load local-gdbinit::. * *Note libthread_db.so.1 file::, controlled by *note set auto-load libthread-db::. These are GDB control commands for the auto-loading: *Note set auto-load off::. Disable auto-loading globally. *Note show auto-load::. Show setting of all kinds of files. *Note info auto-load::. Show state of all kinds of files. *Note set auto-load gdb-scripts::. Control for GDB command scripts. *Note show auto-load gdb-scripts::. Show setting of GDB command scripts. *Note info auto-load gdb-scripts::. Show state of GDB command scripts. *Note set auto-load Control for GDB Python scripts. python-scripts::. *Note show auto-load Show setting of GDB Python scripts. python-scripts::. *Note info auto-load Show state of GDB Python scripts. python-scripts::. *Note set auto-load Control for GDB auto-loaded scripts scripts-directory::. location. *Note show auto-load Show GDB auto-loaded scripts scripts-directory::. location. *Note set auto-load local-gdbinit::. Control for init file in the current directory. *Note show auto-load Show setting of init file in the local-gdbinit::. current directory. *Note info auto-load Show state of init file in the local-gdbinit::. current directory. *Note set auto-load libthread-db::. Control for thread debugging library. *Note show auto-load libthread-db::. Show setting of thread debugging library. *Note info auto-load libthread-db::. Show state of thread debugging library. *Note set auto-load safe-path::. Control directories trusted for automatic loading. *Note show auto-load safe-path::. Show directories trusted for automatic loading. *Note add-auto-load-safe-path::. Add directory trusted for automatic loading. * Menu: * Init File in the Current Directory:: `set/show/info auto-load local-gdbinit' * libthread_db.so.1 file:: `set/show/info auto-load libthread-db' * objfile-gdb.gdb file:: `set/show/info auto-load gdb-script' * Auto-loading safe path:: `set/show/info auto-load safe-path' * Auto-loading verbose mode:: `set/show debug auto-load' *Note Python Auto-loading::.  File: gdb.info, Node: Init File in the Current Directory, Next: libthread_db.so.1 file, Up: Auto-loading 22.7.1 Automatically loading init file in the current directory --------------------------------------------------------------- By default, GDB reads and executes the canned sequences of commands from init file (if any) in the current working directory, see *note Init File in the Current Directory during Startup::. Note that loading of this local `.gdbinit' file also requires accordingly configured `auto-load safe-path' (*note Auto-loading safe path::). `set auto-load local-gdbinit [on|off]' Enable or disable the auto-loading of canned sequences of commands (*note Sequences::) found in init file in the current directory. `show auto-load local-gdbinit' Show whether auto-loading of canned sequences of commands from init file in the current directory is enabled or disabled. `info auto-load local-gdbinit' Print whether canned sequences of commands from init file in the current directory have been auto-loaded.  File: gdb.info, Node: libthread_db.so.1 file, Next: objfile-gdb.gdb file, Prev: Init File in the Current Directory, Up: Auto-loading 22.7.2 Automatically loading thread debugging library ----------------------------------------------------- This feature is currently present only on GNU/Linux native hosts. GDB reads in some cases thread debugging library from places specific to the inferior (*note set libthread-db-search-path::). The special `libthread-db-search-path' entry `$sdir' is processed without checking this `set auto-load libthread-db' switch as system libraries have to be trusted in general. In all other cases of `libthread-db-search-path' entries GDB checks first if `set auto-load libthread-db' is enabled before trying to open such thread debugging library. Note that loading of this debugging library also requires accordingly configured `auto-load safe-path' (*note Auto-loading safe path::). `set auto-load libthread-db [on|off]' Enable or disable the auto-loading of inferior specific thread debugging library. `show auto-load libthread-db' Show whether auto-loading of inferior specific thread debugging library is enabled or disabled. `info auto-load libthread-db' Print the list of all loaded inferior specific thread debugging libraries and for each such library print list of inferior PIDs using it.  File: gdb.info, Node: objfile-gdb.gdb file, Next: Auto-loading safe path, Prev: libthread_db.so.1 file, Up: Auto-loading 22.7.3 The `OBJFILE-gdb.gdb' file --------------------------------- GDB tries to load an `OBJFILE-gdb.gdb' file containing canned sequences of commands (*note Sequences::), as long as `set auto-load gdb-scripts' is set to `on'. Note that loading of this script file also requires accordingly configured `auto-load safe-path' (*note Auto-loading safe path::). For more background refer to the similar Python scripts auto-loading description (*note objfile-gdb.py file::). `set auto-load gdb-scripts [on|off]' Enable or disable the auto-loading of canned sequences of commands scripts. `show auto-load gdb-scripts' Show whether auto-loading of canned sequences of commands scripts is enabled or disabled. `info auto-load gdb-scripts [REGEXP]' Print the list of all canned sequences of commands scripts that GDB auto-loaded. If REGEXP is supplied only canned sequences of commands scripts with matching names are printed.  File: gdb.info, Node: Auto-loading safe path, Next: Auto-loading verbose mode, Prev: objfile-gdb.gdb file, Up: Auto-loading 22.7.4 Security restriction for auto-loading -------------------------------------------- As the files of inferior can come from untrusted source (such as submitted by an application user) GDB does not always load any files automatically. GDB provides the `set auto-load safe-path' setting to list directories trusted for loading files not explicitly requested by user. Each directory can also be a shell wildcard pattern. If the path is not set properly you will see a warning and the file will not get loaded: $ ./gdb -q ./gdb Reading symbols from /home/user/gdb/gdb...done. warning: File "/home/user/gdb/gdb-gdb.gdb" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". warning: File "/home/user/gdb/gdb-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". To instruct GDB to go ahead and use the init files anyway, invoke GDB like this: $ gdb -q -iex "set auto-load safe-path /home/user/gdb" ./gdb The list of trusted directories is controlled by the following commands: `set auto-load safe-path [DIRECTORIES]' Set the list of directories (and their subdirectories) trusted for automatic loading and execution of scripts. You can also enter a specific trusted file. Each directory can also be a shell wildcard pattern; wildcards do not match directory separator - see `FNM_PATHNAME' for system function `fnmatch' (*note fnmatch: (libc)Wildcard Matching.). If you omit DIRECTORIES, `auto-load safe-path' will be reset to its default value as specified during GDB compilation. The list of directories uses path separator (`:' on GNU and Unix systems, `;' on MS-Windows and MS-DOS) to separate directories, similarly to the `PATH' environment variable. `show auto-load safe-path' Show the list of directories trusted for automatic loading and execution of scripts. `add-auto-load-safe-path' Add an entry (or list of entries) the list of directories trusted for automatic loading and execution of scripts. Multiple entries may be delimited by the host platform path separator in use. This variable defaults to what `--with-auto-load-dir' has been configured to (*note with-auto-load-dir::). `$debugdir' and `$datadir' substitution applies the same as for *note set auto-load scripts-directory::. The default `set auto-load safe-path' value can be also overriden by GDB configuration option `--with-auto-load-safe-path'. Setting this variable to `/' disables this security protection, corresponding GDB configuration option is `--without-auto-load-safe-path'. This variable is supposed to be set to the system directories writable by the system superuser only. Users can add their source directories in init files in their home directories (*note Home Directory Init File::). See also deprecated init file in the current directory (*note Init File in the Current Directory during Startup::). To force GDB to load the files it declined to load in the previous example, you could use one of the following ways: `~/.gdbinit': `add-auto-load-safe-path ~/src/gdb' Specify this trusted directory (or a file) as additional component of the list. You have to specify also any existing directories displayed by by `show auto-load safe-path' (such as `/usr:/bin' in this example). `gdb -iex "set auto-load safe-path /usr:/bin:~/src/gdb" ...' Specify this directory as in the previous case but just for a single GDB session. `gdb -iex "set auto-load safe-path /" ...' Disable auto-loading safety for a single GDB session. This assumes all the files you debug during this GDB session will come from trusted sources. `./configure --without-auto-load-safe-path' During compilation of GDB you may disable any auto-loading safety. This assumes all the files you will ever debug with this GDB come from trusted sources. On the other hand you can also explicitly forbid automatic files loading which also suppresses any such warning messages: `gdb -iex "set auto-load no" ...' You can use GDB command-line option for a single GDB session. `~/.gdbinit': `set auto-load no' Disable auto-loading globally for the user (*note Home Directory Init File::). While it is improbable, you could also use system init file instead (*note System-wide configuration::). This setting applies to the file names as entered by user. If no entry matches GDB tries as a last resort to also resolve all the file names into their canonical form (typically resolving symbolic links) and compare the entries again. GDB already canonicalizes most of the filenames on its own before starting the comparison so a canonical form of directories is recommended to be entered.  File: gdb.info, Node: Auto-loading verbose mode, Prev: Auto-loading safe path, Up: Auto-loading 22.7.5 Displaying files tried for auto-load ------------------------------------------- For better visibility of all the file locations where you can place scripts to be auto-loaded with inferior -- or to protect yourself against accidental execution of untrusted scripts -- GDB provides a feature for printing all the files attempted to be loaded. Both existing and non-existing files may be printed. For example the list of directories from which it is safe to auto-load files (*note Auto-loading safe path::) applies also to canonicalized filenames which may not be too obvious while setting it up. (gdb) set debug auto-load on (gdb) file ~/src/t/true auto-load: Loading canned sequences of commands script "/tmp/true-gdb.gdb" for objfile "/tmp/true". auto-load: Updating directories of "/usr:/opt". auto-load: Using directory "/usr". auto-load: Using directory "/opt". warning: File "/tmp/true-gdb.gdb" auto-loading has been declined by your `auto-load safe-path' set to "/usr:/opt". `set debug auto-load [on|off]' Set whether to print the filenames attempted to be auto-loaded. `show debug auto-load' Show whether printing of the filenames attempted to be auto-loaded is turned on or off.  File: gdb.info, Node: Messages/Warnings, Next: Debugging Output, Prev: Auto-loading, Up: Controlling GDB 22.8 Optional Warnings and Messages =================================== By default, GDB is silent about its inner workings. If you are running on a slow machine, you may want to use the `set verbose' command. This makes GDB tell you when it does a lengthy internal operation, so you will not think it has crashed. Currently, the messages controlled by `set verbose' are those which announce that the symbol table for a source file is being read; see `symbol-file' in *note Commands to Specify Files: Files. `set verbose on' Enables GDB output of certain informational messages. `set verbose off' Disables GDB output of certain informational messages. `show verbose' Displays whether `set verbose' is on or off. By default, if GDB encounters bugs in the symbol table of an object file, it is silent; but if you are debugging a compiler, you may find this information useful (*note Errors Reading Symbol Files: Symbol Errors.). `set complaints LIMIT' Permits GDB to output LIMIT complaints about each type of unusual symbols before becoming silent about the problem. Set LIMIT to zero to suppress all complaints; set it to a large number to prevent complaints from being suppressed. `show complaints' Displays how many symbol complaints GDB is permitted to produce. By default, GDB is cautious, and asks what sometimes seems to be a lot of stupid questions to confirm certain commands. For example, if you try to run a program which is already running: (gdb) run The program being debugged has been started already. Start it from the beginning? (y or n) If you are willing to unflinchingly face the consequences of your own commands, you can disable this "feature": `set confirm off' Disables confirmation requests. Note that running GDB with the `--batch' option (*note -batch: Mode Options.) also automatically disables confirmation requests. `set confirm on' Enables confirmation requests (the default). `show confirm' Displays state of confirmation requests. If you need to debug user-defined commands or sourced files you may find it useful to enable "command tracing". In this mode each command will be printed as it is executed, prefixed with one or more `+' symbols, the quantity denoting the call depth of each command. `set trace-commands on' Enable command tracing. `set trace-commands off' Disable command tracing. `show trace-commands' Display the current state of command tracing.  File: gdb.info, Node: Debugging Output, Next: Other Misc Settings, Prev: Messages/Warnings, Up: Controlling GDB 22.9 Optional Messages about Internal Happenings ================================================ GDB has commands that enable optional debugging messages from various GDB subsystems; normally these commands are of interest to GDB maintainers, or when reporting a bug. This section documents those commands. `set exec-done-display' Turns on or off the notification of asynchronous commands' completion. When on, GDB will print a message when an asynchronous command finishes its execution. The default is off. `show exec-done-display' Displays the current setting of asynchronous command completion notification. `set debug aarch64' Turns on or off display of debugging messages related to ARM AArch64. The default is off. `show debug aarch64' Displays the current state of displaying debugging messages related to ARM AArch64. `set debug arch' Turns on or off display of gdbarch debugging info. The default is off `show debug arch' Displays the current state of displaying gdbarch debugging info. `set debug aix-thread' Display debugging messages about inner workings of the AIX thread module. `show debug aix-thread' Show the current state of AIX thread debugging info display. `set debug check-physname' Check the results of the "physname" computation. When reading DWARF debugging information for C++, GDB attempts to compute each entity's name. GDB can do this computation in two different ways, depending on exactly what information is present. When enabled, this setting causes GDB to compute the names both ways and display any discrepancies. `show debug check-physname' Show the current state of "physname" checking. `set debug coff-pe-read' Control display of debugging messages related to reading of COFF/PE exported symbols. The default is off. `show debug coff-pe-read' Displays the current state of displaying debugging messages related to reading of COFF/PE exported symbols. `set debug dwarf2-die' Dump DWARF2 DIEs after they are read in. The value is the number of nesting levels to print. A value of zero turns off the display. `show debug dwarf2-die' Show the current state of DWARF2 DIE debugging. `set debug dwarf2-read' Turns on or off display of debugging messages related to reading DWARF debug info. The default is off. `show debug dwarf2-read' Show the current state of DWARF2 reader debugging. `set debug displaced' Turns on or off display of GDB debugging info for the displaced stepping support. The default is off. `show debug displaced' Displays the current state of displaying GDB debugging info related to displaced stepping. `set debug event' Turns on or off display of GDB event debugging info. The default is off. `show debug event' Displays the current state of displaying GDB event debugging info. `set debug expression' Turns on or off display of debugging info about GDB expression parsing. The default is off. `show debug expression' Displays the current state of displaying debugging info about GDB expression parsing. `set debug frame' Turns on or off display of GDB frame debugging info. The default is off. `show debug frame' Displays the current state of displaying GDB frame debugging info. `set debug gnu-nat' Turns on or off debugging messages from the GNU/Hurd debug support. `show debug gnu-nat' Show the current state of GNU/Hurd debugging messages. `set debug infrun' Turns on or off display of GDB debugging info for running the inferior. The default is off. `infrun.c' contains GDB's runtime state machine used for implementing operations such as single-stepping the inferior. `show debug infrun' Displays the current state of GDB inferior debugging. `set debug jit' Turns on or off debugging messages from JIT debug support. `show debug jit' Displays the current state of GDB JIT debugging. `set debug lin-lwp' Turns on or off debugging messages from the Linux LWP debug support. `show debug lin-lwp' Show the current state of Linux LWP debugging messages. `set debug mach-o' Control display of debugging messages related to Mach-O symbols processing. The default is off. `show debug mach-o' Displays the current state of displaying debugging messages related to reading of COFF/PE exported symbols. `set debug notification' Turns on or off debugging messages about remote async notification. The default is off. `show debug notification' Displays the current state of remote async notification debugging messages. `set debug observer' Turns on or off display of GDB observer debugging. This includes info such as the notification of observable events. `show debug observer' Displays the current state of observer debugging. `set debug overload' Turns on or off display of GDB C++ overload debugging info. This includes info such as ranking of functions, etc. The default is off. `show debug overload' Displays the current state of displaying GDB C++ overload debugging info. `set debug parser' Turns on or off the display of expression parser debugging output. Internally, this sets the `yydebug' variable in the expression parser. *Note Tracing Your Parser: (bison)Tracing, for details. The default is off. `show debug parser' Show the current state of expression parser debugging. `set debug remote' Turns on or off display of reports on all packets sent back and forth across the serial line to the remote machine. The info is printed on the GDB standard output stream. The default is off. `show debug remote' Displays the state of display of remote packets. `set debug serial' Turns on or off display of GDB serial debugging info. The default is off. `show debug serial' Displays the current state of displaying GDB serial debugging info. `set debug solib-frv' Turns on or off debugging messages for FR-V shared-library code. `show debug solib-frv' Display the current state of FR-V shared-library code debugging messages. `set debug symtab-create' Turns on or off display of debugging messages related to symbol table creation. The default is off. `show debug symtab-create' Show the current state of symbol table creation debugging. `set debug target' Turns on or off display of GDB target debugging info. This info includes what is going on at the target level of GDB, as it happens. The default is 0. Set it to 1 to track events, and to 2 to also track the value of large memory transfers. Changes to this flag do not take effect until the next time you connect to a target or use the `run' command. `show debug target' Displays the current state of displaying GDB target debugging info. `set debug timestamp' Turns on or off display of timestamps with GDB debugging info. When enabled, seconds and microseconds are displayed before each debugging message. `show debug timestamp' Displays the current state of displaying timestamps with GDB debugging info. `set debugvarobj' Turns on or off display of GDB variable object debugging info. The default is off. `show debugvarobj' Displays the current state of displaying GDB variable object debugging info. `set debug xml' Turns on or off debugging messages for built-in XML parsers. `show debug xml' Displays the current state of XML debugging messages.  File: gdb.info, Node: Other Misc Settings, Prev: Debugging Output, Up: Controlling GDB 22.10 Other Miscellaneous Settings ================================== `set interactive-mode' If `on', forces GDB to assume that GDB was started in a terminal. In practice, this means that GDB should wait for the user to answer queries generated by commands entered at the command prompt. If `off', forces GDB to operate in the opposite mode, and it uses the default answers to all queries. If `auto' (the default), GDB tries to determine whether its standard input is a terminal, and works in interactive-mode if it is, non-interactively otherwise. In the vast majority of cases, the debugger should be able to guess correctly which mode should be used. But this setting can be useful in certain specific cases, such as running a MinGW GDB inside a cygwin window. `show interactive-mode' Displays whether the debugger is operating in interactive mode or not.  File: gdb.info, Node: Extending GDB, Next: Interpreters, Prev: Controlling GDB, Up: Top 23 Extending GDB **************** GDB provides three mechanisms for extension. The first is based on composition of GDB commands, the second is based on the Python scripting language, and the third is for defining new aliases of existing commands. To facilitate the use of the first two extensions, GDB is capable of evaluating the contents of a file. When doing so, GDB can recognize which scripting language is being used by looking at the filename extension. Files with an unrecognized filename extension are always treated as a GDB Command Files. *Note Command files: Command Files. You can control how GDB evaluates these files with the following setting: `set script-extension off' All scripts are always evaluated as GDB Command Files. `set script-extension soft' The debugger determines the scripting language based on filename extension. If this scripting language is supported, GDB evaluates the script using that language. Otherwise, it evaluates the file as a GDB Command File. `set script-extension strict' The debugger determines the scripting language based on filename extension, and evaluates the script using that language. If the language is not supported, then the evaluation fails. `show script-extension' Display the current value of the `script-extension' option. * Menu: * Sequences:: Canned Sequences of Commands * Python:: Scripting GDB using Python * Aliases:: Creating new spellings of existing commands  File: gdb.info, Node: Sequences, Next: Python, Up: Extending GDB 23.1 Canned Sequences of Commands ================================= Aside from breakpoint commands (*note Breakpoint Command Lists: Break Commands.), GDB provides two ways to store sequences of commands for execution as a unit: user-defined commands and command files. * Menu: * Define:: How to define your own commands * Hooks:: Hooks for user-defined commands * Command Files:: How to write scripts of commands to be stored in a file * Output:: Commands for controlled output  File: gdb.info, Node: Define, Next: Hooks, Up: Sequences 23.1.1 User-defined Commands ---------------------------- A "user-defined command" is a sequence of GDB commands to which you assign a new name as a command. This is done with the `define' command. User commands may accept up to 10 arguments separated by whitespace. Arguments are accessed within the user command via `$arg0...$arg9'. A trivial example: define adder print $arg0 + $arg1 + $arg2 end To execute the command use: adder 1 2 3 This defines the command `adder', which prints the sum of its three arguments. Note the arguments are text substitutions, so they may reference variables, use complex expressions, or even perform inferior functions calls. In addition, `$argc' may be used to find out how many arguments have been passed. This expands to a number in the range 0...10. define adder if $argc == 2 print $arg0 + $arg1 end if $argc == 3 print $arg0 + $arg1 + $arg2 end end `define COMMANDNAME' Define a command named COMMANDNAME. If there is already a command by that name, you are asked to confirm that you want to redefine it. COMMANDNAME may be a bare command name consisting of letters, numbers, dashes, and underscores. It may also start with any predefined prefix command. For example, `define target my-target' creates a user-defined `target my-target' command. The definition of the command is made up of other GDB command lines, which are given following the `define' command. The end of these commands is marked by a line containing `end'. `document COMMANDNAME' Document the user-defined command COMMANDNAME, so that it can be accessed by `help'. The command COMMANDNAME must already be defined. This command reads lines of documentation just as `define' reads the lines of the command definition, ending with `end'. After the `document' command is finished, `help' on command COMMANDNAME displays the documentation you have written. You may use the `document' command again to change the documentation of a command. Redefining the command with `define' does not change the documentation. `dont-repeat' Used inside a user-defined command, this tells GDB that this command should not be repeated when the user hits (*note repeat last command: Command Syntax.). `help user-defined' List all user-defined commands and all python commands defined in class COMAND_USER. The first line of the documentation or docstring is included (if any). `show user' `show user COMMANDNAME' Display the GDB commands used to define COMMANDNAME (but not its documentation). If no COMMANDNAME is given, display the definitions for all user-defined commands. This does not work for user-defined python commands. `show max-user-call-depth' `set max-user-call-depth' The value of `max-user-call-depth' controls how many recursion levels are allowed in user-defined commands before GDB suspects an infinite recursion and aborts the command. This does not apply to user-defined python commands. In addition to the above commands, user-defined commands frequently use control flow commands, described in *note Command Files::. When user-defined commands are executed, the commands of the definition are not printed. An error in any command stops execution of the user-defined command. If used interactively, commands that would ask for confirmation proceed without asking when used inside a user-defined command. Many GDB commands that normally print messages to say what they are doing omit the messages when used in a user-defined command.  File: gdb.info, Node: Hooks, Next: Command Files, Prev: Define, Up: Sequences 23.1.2 User-defined Command Hooks --------------------------------- You may define "hooks", which are a special kind of user-defined command. Whenever you run the command `foo', if the user-defined command `hook-foo' exists, it is executed (with no arguments) before that command. A hook may also be defined which is run after the command you executed. Whenever you run the command `foo', if the user-defined command `hookpost-foo' exists, it is executed (with no arguments) after that command. Post-execution hooks may exist simultaneously with pre-execution hooks, for the same command. It is valid for a hook to call the command which it hooks. If this occurs, the hook is not re-executed, thereby avoiding infinite recursion. In addition, a pseudo-command, `stop' exists. Defining (`hook-stop') makes the associated commands execute every time execution stops in your program: before breakpoint commands are run, displays are printed, or the stack frame is printed. For example, to ignore `SIGALRM' signals while single-stepping, but treat them normally during normal execution, you could define: define hook-stop handle SIGALRM nopass end define hook-run handle SIGALRM pass end define hook-continue handle SIGALRM pass end As a further example, to hook at the beginning and end of the `echo' command, and to add extra text to the beginning and end of the message, you could define: define hook-echo echo <<<--- end define hookpost-echo echo --->>>\n end (gdb) echo Hello World <<<---Hello World--->>> (gdb) You can define a hook for any single-word command in GDB, but not for command aliases; you should define a hook for the basic command name, e.g. `backtrace' rather than `bt'. You can hook a multi-word command by adding `hook-' or `hookpost-' to the last word of the command, e.g. `define target hook-remote' to add a hook to `target remote'. If an error occurs during the execution of your hook, execution of GDB commands stops and GDB issues a prompt (before the command that you actually typed had a chance to run). If you try to define a hook which does not match any known command, you get a warning from the `define' command.  File: gdb.info, Node: Command Files, Next: Output, Prev: Hooks, Up: Sequences 23.1.3 Command Files -------------------- A command file for GDB is a text file made of lines that are GDB commands. Comments (lines starting with `#') may also be included. An empty line in a command file does nothing; it does not mean to repeat the last command, as it would from the terminal. You can request the execution of a command file with the `source' command. Note that the `source' command is also used to evaluate scripts that are not Command Files. The exact behavior can be configured using the `script-extension' setting. *Note Extending GDB: Extending GDB. `source [-s] [-v] FILENAME' Execute the command file FILENAME. The lines in a command file are generally executed sequentially, unless the order of execution is changed by one of the _flow-control commands_ described below. The commands are not printed as they are executed. An error in any command terminates execution of the command file and control is returned to the console. GDB first searches for FILENAME in the current directory. If the file is not found there, and FILENAME does not specify a directory, then GDB also looks for the file on the source search path (specified with the `directory' command); except that `$cdir' is not searched because the compilation directory is not relevant to scripts. If `-s' is specified, then GDB searches for FILENAME on the search path even if FILENAME specifies a directory. The search is done by appending FILENAME to each element of the search path. So, for example, if FILENAME is `mylib/myscript' and the search path contains `/home/user' then GDB will look for the script `/home/user/mylib/myscript'. The search is also done if FILENAME is an absolute path. For example, if FILENAME is `/tmp/myscript' and the search path contains `/home/user' then GDB will look for the script `/home/user/tmp/myscript'. For DOS-like systems, if FILENAME contains a drive specification, it is stripped before concatenation. For example, if FILENAME is `d:myscript' and the search path contains `c:/tmp' then GDB will look for the script `c:/tmp/myscript'. If `-v', for verbose mode, is given then GDB displays each command as it is executed. The option must be given before FILENAME, and is interpreted as part of the filename anywhere else. Commands that would ask for confirmation if used interactively proceed without asking when used in a command file. Many GDB commands that normally print messages to say what they are doing omit the messages when called from command files. GDB also accepts command input from standard input. In this mode, normal output goes to standard output and error output goes to standard error. Errors in a command file supplied on standard input do not terminate execution of the command file--execution continues with the next command. gdb < cmds > log 2>&1 (The syntax above will vary depending on the shell used.) This example will execute commands from the file `cmds'. All output and errors would be directed to `log'. Since commands stored on command files tend to be more general than commands typed interactively, they frequently need to deal with complicated situations, such as different or unexpected values of variables and symbols, changes in how the program being debugged is built, etc. GDB provides a set of flow-control commands to deal with these complexities. Using these commands, you can write complex scripts that loop over data structures, execute commands conditionally, etc. `if' `else' This command allows to include in your script conditionally executed commands. The `if' command takes a single argument, which is an expression to evaluate. It is followed by a series of commands that are executed only if the expression is true (its value is nonzero). There can then optionally be an `else' line, followed by a series of commands that are only executed if the expression was false. The end of the list is marked by a line containing `end'. `while' This command allows to write loops. Its syntax is similar to `if': the command takes a single argument, which is an expression to evaluate, and must be followed by the commands to execute, one per line, terminated by an `end'. These commands are called the "body" of the loop. The commands in the body of `while' are executed repeatedly as long as the expression evaluates to true. `loop_break' This command exits the `while' loop in whose body it is included. Execution of the script continues after that `while's `end' line. `loop_continue' This command skips the execution of the rest of the body of commands in the `while' loop in whose body it is included. Execution branches to the beginning of the `while' loop, where it evaluates the controlling expression. `end' Terminate the block of commands that are the body of `if', `else', or `while' flow-control commands.  File: gdb.info, Node: Output, Prev: Command Files, Up: Sequences 23.1.4 Commands for Controlled Output ------------------------------------- During the execution of a command file or a user-defined command, normal GDB output is suppressed; the only output that appears is what is explicitly printed by the commands in the definition. This section describes three commands useful for generating exactly the output you want. `echo TEXT' Print TEXT. Nonprinting characters can be included in TEXT using C escape sequences, such as `\n' to print a newline. *No newline is printed unless you specify one.* In addition to the standard C escape sequences, a backslash followed by a space stands for a space. This is useful for displaying a string with spaces at the beginning or the end, since leading and trailing spaces are otherwise trimmed from all arguments. To print ` and foo = ', use the command `echo \ and foo = \ '. A backslash at the end of TEXT can be used, as in C, to continue the command onto subsequent lines. For example, echo This is some text\n\ which is continued\n\ onto several lines.\n produces the same output as echo This is some text\n echo which is continued\n echo onto several lines.\n `output EXPRESSION' Print the value of EXPRESSION and nothing but that value: no newlines, no `$NN = '. The value is not entered in the value history either. *Note Expressions: Expressions, for more information on expressions. `output/FMT EXPRESSION' Print the value of EXPRESSION in format FMT. You can use the same formats as for `print'. *Note Output Formats: Output Formats, for more information. `printf TEMPLATE, EXPRESSIONS...' Print the values of one or more EXPRESSIONS under the control of the string TEMPLATE. To print several values, make EXPRESSIONS be a comma-separated list of individual expressions, which may be either numbers or pointers. Their values are printed as specified by TEMPLATE, exactly as a C program would do by executing the code below: printf (TEMPLATE, EXPRESSIONS...); As in `C' `printf', ordinary characters in TEMPLATE are printed verbatim, while "conversion specification" introduced by the `%' character cause subsequent EXPRESSIONS to be evaluated, their values converted and formatted according to type and style information encoded in the conversion specifications, and then printed. For example, you can print two values in hex like this: printf "foo, bar-foo = 0x%x, 0x%x\n", foo, bar-foo `printf' supports all the standard `C' conversion specifications, including the flags and modifiers between the `%' character and the conversion letter, with the following exceptions: * The argument-ordering modifiers, such as `2$', are not supported. * The modifier `*' is not supported for specifying precision or width. * The `'' flag (for separation of digits into groups according to `LC_NUMERIC'') is not supported. * The type modifiers `hh', `j', `t', and `z' are not supported. * The conversion letter `n' (as in `%n') is not supported. * The conversion letters `a' and `A' are not supported. Note that the `ll' type modifier is supported only if the underlying `C' implementation used to build GDB supports the `long long int' type, and the `L' type modifier is supported only if `long double' type is available. As in `C', `printf' supports simple backslash-escape sequences, such as `\n', `\t', `\\', `\"', `\a', and `\f', that consist of backslash followed by a single character. Octal and hexadecimal escape sequences are not supported. Additionally, `printf' supports conversion specifications for DFP ("Decimal Floating Point") types using the following length modifiers together with a floating point specifier. letters: * `H' for printing `Decimal32' types. * `D' for printing `Decimal64' types. * `DD' for printing `Decimal128' types. If the underlying `C' implementation used to build GDB has support for the three length modifiers for DFP types, other modifiers such as width and precision will also be available for GDB to use. In case there is no such `C' support, no additional modifiers will be available and the value will be printed in the standard way. Here's an example of printing DFP types using the above conversion letters: printf "D32: %Hf - D64: %Df - D128: %DDf\n",1.2345df,1.2E10dd,1.2E1dl `eval TEMPLATE, EXPRESSIONS...' Convert the values of one or more EXPRESSIONS under the control of the string TEMPLATE to a command line, and call it.  File: gdb.info, Node: Python, Next: Aliases, Prev: Sequences, Up: Extending GDB 23.2 Scripting GDB using Python =============================== You can script GDB using the Python programming language (http://www.python.org/). This feature is available only if GDB was configured using `--with-python'. Python scripts used by GDB should be installed in `DATA-DIRECTORY/python', where DATA-DIRECTORY is the data directory as determined at GDB startup (*note Data Files::). This directory, known as the "python directory", is automatically added to the Python Search Path in order to allow the Python interpreter to locate all scripts installed at this location. Additionally, GDB commands and convenience functions which are written in Python and are located in the `DATA-DIRECTORY/python/gdb/command' or `DATA-DIRECTORY/python/gdb/function' directories are automatically imported when GDB starts. * Menu: * Python Commands:: Accessing Python from GDB. * Python API:: Accessing GDB from Python. * Python Auto-loading:: Automatically loading Python code. * Python modules:: Python modules provided by GDB.  File: gdb.info, Node: Python Commands, Next: Python API, Up: Python 23.2.1 Python Commands ---------------------- GDB provides two commands for accessing the Python interpreter, and one related setting: `python-interactive [COMMAND]' `pi [COMMAND]' Without an argument, the `python-interactive' command can be used to start an interactive Python prompt. To return to GDB, type the `EOF' character (e.g., `Ctrl-D' on an empty prompt). Alternatively, a single-line Python command can be given as an argument and evaluated. If the command is an expression, the result will be printed; otherwise, nothing will be printed. For example: (gdb) python-interactive 2 + 3 5 `python [COMMAND]' `py [COMMAND]' The `python' command can be used to evaluate Python code. If given an argument, the `python' command will evaluate the argument as a Python command. For example: (gdb) python print 23 23 If you do not provide an argument to `python', it will act as a multi-line command, like `define'. In this case, the Python script is made up of subsequent command lines, given after the `python' command. This command list is terminated using a line containing `end'. For example: (gdb) python Type python script End with a line saying just "end". >print 23 >end 23 `set python print-stack' By default, GDB will print only the message component of a Python exception when an error occurs in a Python script. This can be controlled using `set python print-stack': if `full', then full Python stack printing is enabled; if `none', then Python stack and message printing is disabled; if `message', the default, only the message component of the error is printed. It is also possible to execute a Python script from the GDB interpreter: `source `script-name'' The script name must end with `.py' and GDB must be configured to recognize the script language based on filename extension using the `script-extension' setting. *Note Extending GDB: Extending GDB. `python execfile ("script-name")' This method is based on the `execfile' Python built-in function, and thus is always available.  File: gdb.info, Node: Python API, Next: Python Auto-loading, Prev: Python Commands, Up: Python 23.2.2 Python API ----------------- At startup, GDB overrides Python's `sys.stdout' and `sys.stderr' to print using GDB's output-paging streams. A Python program which outputs to one of these streams may have its output interrupted by the user (*note Screen Size::). In this situation, a Python `KeyboardInterrupt' exception is thrown. * Menu: * Basic Python:: Basic Python Functions. * Exception Handling:: How Python exceptions are translated. * Values From Inferior:: Python representation of values. * Types In Python:: Python representation of types. * Pretty Printing API:: Pretty-printing values. * Selecting Pretty-Printers:: How GDB chooses a pretty-printer. * Writing a Pretty-Printer:: Writing a Pretty-Printer. * Type Printing API:: Pretty-printing types. * Inferiors In Python:: Python representation of inferiors (processes) * Events In Python:: Listening for events from GDB. * Threads In Python:: Accessing inferior threads from Python. * Commands In Python:: Implementing new commands in Python. * Parameters In Python:: Adding new GDB parameters. * Functions In Python:: Writing new convenience functions. * Progspaces In Python:: Program spaces. * Objfiles In Python:: Object files. * Frames In Python:: Accessing inferior stack frames from Python. * Blocks In Python:: Accessing frame blocks from Python. * Symbols In Python:: Python representation of symbols. * Symbol Tables In Python:: Python representation of symbol tables. * Breakpoints In Python:: Manipulating breakpoints using Python. * Finish Breakpoints in Python:: Setting Breakpoints on function return using Python. * Lazy Strings In Python:: Python representation of lazy strings. * Architectures In Python:: Python representation of architectures.  File: gdb.info, Node: Basic Python, Next: Exception Handling, Up: Python API 23.2.2.1 Basic Python ..................... GDB introduces a new Python module, named `gdb'. All methods and classes added by GDB are placed in this module. GDB automatically `import's the `gdb' module for use in all scripts evaluated by the `python' command. -- Variable: gdb.PYTHONDIR A string containing the python directory (*note Python::). -- Function: gdb.execute (command [, from_tty [, to_string]]) Evaluate COMMAND, a string, as a GDB CLI command. If a GDB exception happens while COMMAND runs, it is translated as described in *note Exception Handling: Exception Handling. FROM_TTY specifies whether GDB ought to consider this command as having originated from the user invoking it interactively. It must be a boolean value. If omitted, it defaults to `False'. By default, any output produced by COMMAND is sent to GDB's standard output. If the TO_STRING parameter is `True', then output will be collected by `gdb.execute' and returned as a string. The default is `False', in which case the return value is `None'. If TO_STRING is `True', the GDB virtual terminal will be temporarily set to unlimited width and height, and its pagination will be disabled; *note Screen Size::. -- Function: gdb.breakpoints () Return a sequence holding all of GDB's breakpoints. *Note Breakpoints In Python::, for more information. -- Function: gdb.parameter (parameter) Return the value of a GDB parameter. PARAMETER is a string naming the parameter to look up; PARAMETER may contain spaces if the parameter has a multi-part name. For example, `print object' is a valid parameter name. If the named parameter does not exist, this function throws a `gdb.error' (*note Exception Handling::). Otherwise, the parameter's value is converted to a Python value of the appropriate type, and returned. -- Function: gdb.history (number) Return a value from GDB's value history (*note Value History::). NUMBER indicates which history element to return. If NUMBER is negative, then GDB will take its absolute value and count backward from the last element (i.e., the most recent element) to find the value to return. If NUMBER is zero, then GDB will return the most recent element. If the element specified by NUMBER doesn't exist in the value history, a `gdb.error' exception will be raised. If no exception is raised, the return value is always an instance of `gdb.Value' (*note Values From Inferior::). -- Function: gdb.parse_and_eval (expression) Parse EXPRESSION as an expression in the current language, evaluate it, and return the result as a `gdb.Value'. EXPRESSION must be a string. This function can be useful when implementing a new command (*note Commands In Python::), as it provides a way to parse the command's argument as an expression. It is also useful simply to compute values, for example, it is the only way to get the value of a convenience variable (*note Convenience Vars::) as a `gdb.Value'. -- Function: gdb.find_pc_line (pc) Return the `gdb.Symtab_and_line' object corresponding to the PC value. *Note Symbol Tables In Python::. If an invalid value of PC is passed as an argument, then the `symtab' and `line' attributes of the returned `gdb.Symtab_and_line' object will be `None' and 0 respectively. -- Function: gdb.post_event (event) Put EVENT, a callable object taking no arguments, into GDB's internal event queue. This callable will be invoked at some later point, during GDB's event processing. Events posted using `post_event' will be run in the order in which they were posted; however, there is no way to know when they will be processed relative to other events inside GDB. GDB is not thread-safe. If your Python program uses multiple threads, you must be careful to only call GDB-specific functions in the main GDB thread. `post_event' ensures this. For example: (gdb) python >import threading > >class Writer(): > def __init__(self, message): > self.message = message; > def __call__(self): > gdb.write(self.message) > >class MyThread1 (threading.Thread): > def run (self): > gdb.post_event(Writer("Hello ")) > >class MyThread2 (threading.Thread): > def run (self): > gdb.post_event(Writer("World\n")) > >MyThread1().start() >MyThread2().start() >end (gdb) Hello World -- Function: gdb.write (string [, stream]) Print a string to GDB's paginated output stream. The optional STREAM determines the stream to print to. The default stream is GDB's standard output stream. Possible stream values are: `gdb.STDOUT' GDB's standard output stream. `gdb.STDERR' GDB's standard error stream. `gdb.STDLOG' GDB's log stream (*note Logging Output::). Writing to `sys.stdout' or `sys.stderr' will automatically call this function and will automatically direct the output to the relevant stream. -- Function: gdb.flush () Flush the buffer of a GDB paginated stream so that the contents are displayed immediately. GDB will flush the contents of a stream automatically when it encounters a newline in the buffer. The optional STREAM determines the stream to flush. The default stream is GDB's standard output stream. Possible stream values are: `gdb.STDOUT' GDB's standard output stream. `gdb.STDERR' GDB's standard error stream. `gdb.STDLOG' GDB's log stream (*note Logging Output::). Flushing `sys.stdout' or `sys.stderr' will automatically call this function for the relevant stream. -- Function: gdb.target_charset () Return the name of the current target character set (*note Character Sets::). This differs from `gdb.parameter('target-charset')' in that `auto' is never returned. -- Function: gdb.target_wide_charset () Return the name of the current target wide character set (*note Character Sets::). This differs from `gdb.parameter('target-wide-charset')' in that `auto' is never returned. -- Function: gdb.solib_name (address) Return the name of the shared library holding the given ADDRESS as a string, or `None'. -- Function: gdb.decode_line [expression] Return locations of the line specified by EXPRESSION, or of the current line if no argument was given. This function returns a Python tuple containing two elements. The first element contains a string holding any unparsed section of EXPRESSION (or `None' if the expression has been fully parsed). The second element contains either `None' or another tuple that contains all the locations that match the expression represented as `gdb.Symtab_and_line' objects (*note Symbol Tables In Python::). If EXPRESSION is provided, it is decoded the way that GDB's inbuilt `break' or `edit' commands do (*note Specify Location::). -- Function: gdb.prompt_hook (current_prompt) If PROMPT_HOOK is callable, GDB will call the method assigned to this operation before a prompt is displayed by GDB. The parameter `current_prompt' contains the current GDB prompt. This method must return a Python string, or `None'. If a string is returned, the GDB prompt will be set to that string. If `None' is returned, GDB will continue to use the current prompt. Some prompts cannot be substituted in GDB. Secondary prompts such as those used by readline for command input, and annotation related prompts are prohibited from being changed.  File: gdb.info, Node: Exception Handling, Next: Values From Inferior, Prev: Basic Python, Up: Python API 23.2.2.2 Exception Handling ........................... When executing the `python' command, Python exceptions uncaught within the Python code are translated to calls to GDB error-reporting mechanism. If the command that called `python' does not handle the error, GDB will terminate it and print an error message containing the Python exception name, the associated value, and the Python call stack backtrace at the point where the exception was raised. Example: (gdb) python print foo Traceback (most recent call last): File "", line 1, in NameError: name 'foo' is not defined GDB errors that happen in GDB commands invoked by Python code are converted to Python exceptions. The type of the Python exception depends on the error. `gdb.error' This is the base class for most exceptions generated by GDB. It is derived from `RuntimeError', for compatibility with earlier versions of GDB. If an error occurring in GDB does not fit into some more specific category, then the generated exception will have this type. `gdb.MemoryError' This is a subclass of `gdb.error' which is thrown when an operation tried to access invalid memory in the inferior. `KeyboardInterrupt' User interrupt (via `C-c' or by typing `q' at a pagination prompt) is translated to a Python `KeyboardInterrupt' exception. In all cases, your exception handler will see the GDB error message as its value and the Python call stack backtrace at the Python statement closest to where the GDB error occured as the traceback. When implementing GDB commands in Python via `gdb.Command', it is useful to be able to throw an exception that doesn't cause a traceback to be printed. For example, the user may have invoked the command incorrectly. Use the `gdb.GdbError' exception to handle this case. Example: (gdb) python >class HelloWorld (gdb.Command): > """Greet the whole world.""" > def __init__ (self): > super (HelloWorld, self).__init__ ("hello-world", gdb.COMMAND_USER) > def invoke (self, args, from_tty): > argv = gdb.string_to_argv (args) > if len (argv) != 0: > raise gdb.GdbError ("hello-world takes no arguments") > print "Hello, World!" >HelloWorld () >end (gdb) hello-world 42 hello-world takes no arguments  File: gdb.info, Node: Values From Inferior, Next: Types In Python, Prev: Exception Handling, Up: Python API 23.2.2.3 Values From Inferior ............................. GDB provides values it obtains from the inferior program in an object of type `gdb.Value'. GDB uses this object for its internal bookkeeping of the inferior's values, and for fetching values when necessary. Inferior values that are simple scalars can be used directly in Python expressions that are valid for the value's data type. Here's an example for an integer or floating-point value `some_val': bar = some_val + 2 As result of this, `bar' will also be a `gdb.Value' object whose values are of the same type as those of `some_val'. Inferior values that are structures or instances of some class can be accessed using the Python "dictionary syntax". For example, if `some_val' is a `gdb.Value' instance holding a structure, you can access its `foo' element with: bar = some_val['foo'] Again, `bar' will also be a `gdb.Value' object. A `gdb.Value' that represents a function can be executed via inferior function call. Any arguments provided to the call must match the function's prototype, and must be provided in the order specified by that prototype. For example, `some_val' is a `gdb.Value' instance representing a function that takes two integers as arguments. To execute this function, call it like so: result = some_val (10,20) Any values returned from a function call will be stored as a `gdb.Value'. The following attributes are provided: -- Variable: Value.address If this object is addressable, this read-only attribute holds a `gdb.Value' object representing the address. Otherwise, this attribute holds `None'. -- Variable: Value.is_optimized_out This read-only boolean attribute is true if the compiler optimized out this value, thus it is not available for fetching from the inferior. -- Variable: Value.type The type of this `gdb.Value'. The value of this attribute is a `gdb.Type' object (*note Types In Python::). -- Variable: Value.dynamic_type The dynamic type of this `gdb.Value'. This uses C++ run-time type information (RTTI) to determine the dynamic type of the value. If this value is of class type, it will return the class in which the value is embedded, if any. If this value is of pointer or reference to a class type, it will compute the dynamic type of the referenced object, and return a pointer or reference to that type, respectively. In all other cases, it will return the value's static type. Note that this feature will only work when debugging a C++ program that includes RTTI for the object in question. Otherwise, it will just return the static type of the value as in `ptype foo' (*note ptype: Symbols.). -- Variable: Value.is_lazy The value of this read-only boolean attribute is `True' if this `gdb.Value' has not yet been fetched from the inferior. GDB does not fetch values until necessary, for efficiency. For example: myval = gdb.parse_and_eval ('somevar') The value of `somevar' is not fetched at this time. It will be fetched when the value is needed, or when the `fetch_lazy' method is invoked. The following methods are provided: -- Function: Value.__init__ (VAL) Many Python values can be converted directly to a `gdb.Value' via this object initializer. Specifically: Python boolean A Python boolean is converted to the boolean type from the current language. Python integer A Python integer is converted to the C `long' type for the current architecture. Python long A Python long is converted to the C `long long' type for the current architecture. Python float A Python float is converted to the C `double' type for the current architecture. Python string A Python string is converted to a target string, using the current target encoding. `gdb.Value' If `val' is a `gdb.Value', then a copy of the value is made. `gdb.LazyString' If `val' is a `gdb.LazyString' (*note Lazy Strings In Python::), then the lazy string's `value' method is called, and its result is used. -- Function: Value.cast (type) Return a new instance of `gdb.Value' that is the result of casting this instance to the type described by TYPE, which must be a `gdb.Type' object. If the cast cannot be performed for some reason, this method throws an exception. -- Function: Value.dereference () For pointer data types, this method returns a new `gdb.Value' object whose contents is the object pointed to by the pointer. For example, if `foo' is a C pointer to an `int', declared in your C program as int *foo; then you can use the corresponding `gdb.Value' to access what `foo' points to like this: bar = foo.dereference () The result `bar' will be a `gdb.Value' object holding the value pointed to by `foo'. A similar function `Value.referenced_value' exists which also returns `gdb.Value' objects corresonding to the values pointed to by pointer values (and additionally, values referenced by reference values). However, the behavior of `Value.dereference' differs from `Value.referenced_value' by the fact that the behavior of `Value.dereference' is identical to applying the C unary operator `*' on a given value. For example, consider a reference to a pointer `ptrref', declared in your C++ program as typedef int *intptr; ... int val = 10; intptr ptr = &val; intptr &ptrref = ptr; Though `ptrref' is a reference value, one can apply the method `Value.dereference' to the `gdb.Value' object corresponding to it and obtain a `gdb.Value' which is identical to that corresponding to `val'. However, if you apply the method `Value.referenced_value', the result would be a `gdb.Value' object identical to that corresponding to `ptr'. py_ptrref = gdb.parse_and_eval ("ptrref") py_val = py_ptrref.dereference () py_ptr = py_ptrref.referenced_value () The `gdb.Value' object `py_val' is identical to that corresponding to `val', and `py_ptr' is identical to that corresponding to `ptr'. In general, `Value.dereference' can be applied whenever the C unary operator `*' can be applied to the corresponding C value. For those cases where applying both `Value.dereference' and `Value.referenced_value' is allowed, the results obtained need not be identical (as we have seen in the above example). The results are however identical when applied on `gdb.Value' objects corresponding to pointers (`gdb.Value' objects with type code `TYPE_CODE_PTR') in a C/C++ program. -- Function: Value.referenced_value () For pointer or reference data types, this method returns a new `gdb.Value' object corresponding to the value referenced by the pointer/reference value. For pointer data types, `Value.dereference' and `Value.referenced_value' produce identical results. The difference between these methods is that `Value.dereference' cannot get the values referenced by reference values. For example, consider a reference to an `int', declared in your C++ program as int val = 10; int &ref = val; then applying `Value.dereference' to the `gdb.Value' object corresponding to `ref' will result in an error, while applying `Value.referenced_value' will result in a `gdb.Value' object identical to that corresponding to `val'. py_ref = gdb.parse_and_eval ("ref") er_ref = py_ref.dereference () # Results in error py_val = py_ref.referenced_value () # Returns the referenced value The `gdb.Value' object `py_val' is identical to that corresponding to `val'. -- Function: Value.dynamic_cast (type) Like `Value.cast', but works as if the C++ `dynamic_cast' operator were used. Consult a C++ reference for details. -- Function: Value.reinterpret_cast (type) Like `Value.cast', but works as if the C++ `reinterpret_cast' operator were used. Consult a C++ reference for details. -- Function: Value.string ([encoding[, errors[, length]]]) If this `gdb.Value' represents a string, then this method converts the contents to a Python string. Otherwise, this method will throw an exception. Strings are recognized in a language-specific way; whether a given `gdb.Value' represents a string is determined by the current language. For C-like languages, a value is a string if it is a pointer to or an array of characters or ints. The string is assumed to be terminated by a zero of the appropriate width. However if the optional length argument is given, the string will be converted to that given length, ignoring any embedded zeros that the string may contain. If the optional ENCODING argument is given, it must be a string naming the encoding of the string in the `gdb.Value', such as `"ascii"', `"iso-8859-6"' or `"utf-8"'. It accepts the same encodings as the corresponding argument to Python's `string.decode' method, and the Python codec machinery will be used to convert the string. If ENCODING is not given, or if ENCODING is the empty string, then either the `target-charset' (*note Character Sets::) will be used, or a language-specific encoding will be used, if the current language is able to supply one. The optional ERRORS argument is the same as the corresponding argument to Python's `string.decode' method. If the optional LENGTH argument is given, the string will be fetched and converted to the given length. -- Function: Value.lazy_string ([encoding [, length]]) If this `gdb.Value' represents a string, then this method converts the contents to a `gdb.LazyString' (*note Lazy Strings In Python::). Otherwise, this method will throw an exception. If the optional ENCODING argument is given, it must be a string naming the encoding of the `gdb.LazyString'. Some examples are: `ascii', `iso-8859-6' or `utf-8'. If the ENCODING argument is an encoding that GDB does recognize, GDB will raise an error. When a lazy string is printed, the GDB encoding machinery is used to convert the string during printing. If the optional ENCODING argument is not provided, or is an empty string, GDB will automatically select the encoding most suitable for the string type. For further information on encoding in GDB please see *note Character Sets::. If the optional LENGTH argument is given, the string will be fetched and encoded to the length of characters specified. If the LENGTH argument is not provided, the string will be fetched and encoded until a null of appropriate width is found. -- Function: Value.fetch_lazy () If the `gdb.Value' object is currently a lazy value (`gdb.Value.is_lazy' is `True'), then the value is fetched from the inferior. Any errors that occur in the process will produce a Python exception. If the `gdb.Value' object is not a lazy value, this method has no effect. This method does not return a value.  File: gdb.info, Node: Types In Python, Next: Pretty Printing API, Prev: Values From Inferior, Up: Python API 23.2.2.4 Types In Python ........................ GDB represents types from the inferior using the class `gdb.Type'. The following type-related functions are available in the `gdb' module: -- Function: gdb.lookup_type (name [, block]) This function looks up a type by name. NAME is the name of the type to look up. It must be a string. If BLOCK is given, then NAME is looked up in that scope. Otherwise, it is searched for globally. Ordinarily, this function will return an instance of `gdb.Type'. If the named type cannot be found, it will throw an exception. If the type is a structure or class type, or an enum type, the fields of that type can be accessed using the Python "dictionary syntax". For example, if `some_type' is a `gdb.Type' instance holding a structure type, you can access its `foo' field with: bar = some_type['foo'] `bar' will be a `gdb.Field' object; see below under the description of the `Type.fields' method for a description of the `gdb.Field' class. An instance of `Type' has the following attributes: -- Variable: Type.code The type code for this type. The type code will be one of the `TYPE_CODE_' constants defined below. -- Variable: Type.sizeof The size of this type, in target `char' units. Usually, a target's `char' type will be an 8-bit byte. However, on some unusual platforms, this type may have a different size. -- Variable: Type.tag The tag name for this type. The tag name is the name after `struct', `union', or `enum' in C and C++; not all languages have this concept. If this type has no tag name, then `None' is returned. The following methods are provided: -- Function: Type.fields () For structure and union types, this method returns the fields. Range types have two fields, the minimum and maximum values. Enum types have one field per enum constant. Function and method types have one field per parameter. The base types of C++ classes are also represented as fields. If the type has no fields, or does not fit into one of these categories, an empty sequence will be returned. Each field is a `gdb.Field' object, with some pre-defined attributes: `bitpos' This attribute is not available for `static' fields (as in C++ or Java). For non-`static' fields, the value is the bit position of the field. For `enum' fields, the value is the enumeration member's integer representation. `name' The name of the field, or `None' for anonymous fields. `artificial' This is `True' if the field is artificial, usually meaning that it was provided by the compiler and not the user. This attribute is always provided, and is `False' if the field is not artificial. `is_base_class' This is `True' if the field represents a base class of a C++ structure. This attribute is always provided, and is `False' if the field is not a base class of the type that is the argument of `fields', or if that type was not a C++ class. `bitsize' If the field is packed, or is a bitfield, then this will have a non-zero value, which is the size of the field in bits. Otherwise, this will be zero; in this case the field's size is given by its type. `type' The type of the field. This is usually an instance of `Type', but it can be `None' in some situations. -- Function: Type.array (N1 [, N2]) Return a new `gdb.Type' object which represents an array of this type. If one argument is given, it is the inclusive upper bound of the array; in this case the lower bound is zero. If two arguments are given, the first argument is the lower bound of the array, and the second argument is the upper bound of the array. An array's length must not be negative, but the bounds can be. -- Function: Type.vector (N1 [, N2]) Return a new `gdb.Type' object which represents a vector of this type. If one argument is given, it is the inclusive upper bound of the vector; in this case the lower bound is zero. If two arguments are given, the first argument is the lower bound of the vector, and the second argument is the upper bound of the vector. A vector's length must not be negative, but the bounds can be. The difference between an `array' and a `vector' is that arrays behave like in C: when used in expressions they decay to a pointer to the first element whereas vectors are treated as first class values. -- Function: Type.const () Return a new `gdb.Type' object which represents a `const'-qualified variant of this type. -- Function: Type.volatile () Return a new `gdb.Type' object which represents a `volatile'-qualified variant of this type. -- Function: Type.unqualified () Return a new `gdb.Type' object which represents an unqualified variant of this type. That is, the result is neither `const' nor `volatile'. -- Function: Type.range () Return a Python `Tuple' object that contains two elements: the low bound of the argument type and the high bound of that type. If the type does not have a range, GDB will raise a `gdb.error' exception (*note Exception Handling::). -- Function: Type.reference () Return a new `gdb.Type' object which represents a reference to this type. -- Function: Type.pointer () Return a new `gdb.Type' object which represents a pointer to this type. -- Function: Type.strip_typedefs () Return a new `gdb.Type' that represents the real type, after removing all layers of typedefs. -- Function: Type.target () Return a new `gdb.Type' object which represents the target type of this type. For a pointer type, the target type is the type of the pointed-to object. For an array type (meaning C-like arrays), the target type is the type of the elements of the array. For a function or method type, the target type is the type of the return value. For a complex type, the target type is the type of the elements. For a typedef, the target type is the aliased type. If the type does not have a target, this method will throw an exception. -- Function: Type.template_argument (n [, block]) If this `gdb.Type' is an instantiation of a template, this will return a new `gdb.Type' which represents the type of the Nth template argument. If this `gdb.Type' is not a template type, this will throw an exception. Ordinarily, only C++ code will have template types. If BLOCK is given, then NAME is looked up in that scope. Otherwise, it is searched for globally. Each type has a code, which indicates what category this type falls into. The available type categories are represented by constants defined in the `gdb' module: `gdb.TYPE_CODE_PTR' The type is a pointer. `gdb.TYPE_CODE_ARRAY' The type is an array. `gdb.TYPE_CODE_STRUCT' The type is a structure. `gdb.TYPE_CODE_UNION' The type is a union. `gdb.TYPE_CODE_ENUM' The type is an enum. `gdb.TYPE_CODE_FLAGS' A bit flags type, used for things such as status registers. `gdb.TYPE_CODE_FUNC' The type is a function. `gdb.TYPE_CODE_INT' The type is an integer type. `gdb.TYPE_CODE_FLT' A floating point type. `gdb.TYPE_CODE_VOID' The special type `void'. `gdb.TYPE_CODE_SET' A Pascal set type. `gdb.TYPE_CODE_RANGE' A range type, that is, an integer type with bounds. `gdb.TYPE_CODE_STRING' A string type. Note that this is only used for certain languages with language-defined string types; C strings are not represented this way. `gdb.TYPE_CODE_BITSTRING' A string of bits. It is deprecated. `gdb.TYPE_CODE_ERROR' An unknown or erroneous type. `gdb.TYPE_CODE_METHOD' A method type, as found in C++ or Java. `gdb.TYPE_CODE_METHODPTR' A pointer-to-member-function. `gdb.TYPE_CODE_MEMBERPTR' A pointer-to-member. `gdb.TYPE_CODE_REF' A reference type. `gdb.TYPE_CODE_CHAR' A character type. `gdb.TYPE_CODE_BOOL' A boolean type. `gdb.TYPE_CODE_COMPLEX' A complex float type. `gdb.TYPE_CODE_TYPEDEF' A typedef to some other type. `gdb.TYPE_CODE_NAMESPACE' A C++ namespace. `gdb.TYPE_CODE_DECFLOAT' A decimal floating point type. `gdb.TYPE_CODE_INTERNAL_FUNCTION' A function internal to GDB. This is the type used to represent convenience functions. Further support for types is provided in the `gdb.types' Python module (*note gdb.types::).  File: gdb.info, Node: Pretty Printing API, Next: Selecting Pretty-Printers, Prev: Types In Python, Up: Python API 23.2.2.5 Pretty Printing API ............................ An example output is provided (*note Pretty Printing::). A pretty-printer is just an object that holds a value and implements a specific interface, defined here. -- Function: pretty_printer.children (self) GDB will call this method on a pretty-printer to compute the children of the pretty-printer's value. This method must return an object conforming to the Python iterator protocol. Each item returned by the iterator must be a tuple holding two elements. The first element is the "name" of the child; the second element is the child's value. The value can be any Python object which is convertible to a GDB value. This method is optional. If it does not exist, GDB will act as though the value has no children. -- Function: pretty_printer.display_hint (self) The CLI may call this method and use its result to change the formatting of a value. The result will also be supplied to an MI consumer as a `displayhint' attribute of the variable being printed. This method is optional. If it does exist, this method must return a string. Some display hints are predefined by GDB: `array' Indicate that the object being printed is "array-like". The CLI uses this to respect parameters such as `set print elements' and `set print array'. `map' Indicate that the object being printed is "map-like", and that the children of this value can be assumed to alternate between keys and values. `string' Indicate that the object being printed is "string-like". If the printer's `to_string' method returns a Python string of some kind, then GDB will call its internal language-specific string-printing function to format the string. For the CLI this means adding quotation marks, possibly escaping some characters, respecting `set print elements', and the like. -- Function: pretty_printer.to_string (self) GDB will call this method to display the string representation of the value passed to the object's constructor. When printing from the CLI, if the `to_string' method exists, then GDB will prepend its result to the values returned by `children'. Exactly how this formatting is done is dependent on the display hint, and may change as more hints are added. Also, depending on the print settings (*note Print Settings::), the CLI may print just the result of `to_string' in a stack trace, omitting the result of `children'. If this method returns a string, it is printed verbatim. Otherwise, if this method returns an instance of `gdb.Value', then GDB prints this value. This may result in a call to another pretty-printer. If instead the method returns a Python value which is convertible to a `gdb.Value', then GDB performs the conversion and prints the resulting value. Again, this may result in a call to another pretty-printer. Python scalars (integers, floats, and booleans) and strings are convertible to `gdb.Value'; other types are not. Finally, if this method returns `None' then no further operations are peformed in this method and nothing is printed. If the result is not one of these types, an exception is raised. GDB provides a function which can be used to look up the default pretty-printer for a `gdb.Value': -- Function: gdb.default_visualizer (value) This function takes a `gdb.Value' object as an argument. If a pretty-printer for this value exists, then it is returned. If no such printer exists, then this returns `None'.  File: gdb.info, Node: Selecting Pretty-Printers, Next: Writing a Pretty-Printer, Prev: Pretty Printing API, Up: Python API 23.2.2.6 Selecting Pretty-Printers .................................. The Python list `gdb.pretty_printers' contains an array of functions or callable objects that have been registered via addition as a pretty-printer. Printers in this list are called `global' printers, they're available when debugging all inferiors. Each `gdb.Progspace' contains a `pretty_printers' attribute. Each `gdb.Objfile' also contains a `pretty_printers' attribute. Each function on these lists is passed a single `gdb.Value' argument and should return a pretty-printer object conforming to the interface definition above (*note Pretty Printing API::). If a function cannot create a pretty-printer for the value, it should return `None'. GDB first checks the `pretty_printers' attribute of each `gdb.Objfile' in the current program space and iteratively calls each enabled lookup routine in the list for that `gdb.Objfile' until it receives a pretty-printer object. If no pretty-printer is found in the objfile lists, GDB then searches the pretty-printer list of the current program space, calling each enabled function until an object is returned. After these lists have been exhausted, it tries the global `gdb.pretty_printers' list, again calling each enabled function until an object is returned. The order in which the objfiles are searched is not specified. For a given list, functions are always invoked from the head of the list, and iterated over sequentially until the end of the list, or a printer object is returned. For various reasons a pretty-printer may not work. For example, the underlying data structure may have changed and the pretty-printer is out of date. The consequences of a broken pretty-printer are severe enough that GDB provides support for enabling and disabling individual printers. For example, if `print frame-arguments' is on, a backtrace can become highly illegible if any argument is printed with a broken printer. Pretty-printers are enabled and disabled by attaching an `enabled' attribute to the registered function or callable object. If this attribute is present and its value is `False', the printer is disabled, otherwise the printer is enabled.  File: gdb.info, Node: Writing a Pretty-Printer, Next: Type Printing API, Prev: Selecting Pretty-Printers, Up: Python API 23.2.2.7 Writing a Pretty-Printer ................................. A pretty-printer consists of two parts: a lookup function to detect if the type is supported, and the printer itself. Here is an example showing how a `std::string' printer might be written. *Note Pretty Printing API::, for details on the API this class must provide. class StdStringPrinter(object): "Print a std::string" def __init__(self, val): self.val = val def to_string(self): return self.val['_M_dataplus']['_M_p'] def display_hint(self): return 'string' And here is an example showing how a lookup function for the printer example above might be written. def str_lookup_function(val): lookup_tag = val.type.tag if lookup_tag == None: return None regex = re.compile("^std::basic_string$") if regex.match(lookup_tag): return StdStringPrinter(val) return None The example lookup function extracts the value's type, and attempts to match it to a type that it can pretty-print. If it is a type the printer can pretty-print, it will return a printer object. If not, it returns `None'. We recommend that you put your core pretty-printers into a Python package. If your pretty-printers are for use with a library, we further recommend embedding a version number into the package name. This practice will enable GDB to load multiple versions of your pretty-printers at the same time, because they will have different names. You should write auto-loaded code (*note Python Auto-loading::) such that it can be evaluated multiple times without changing its meaning. An ideal auto-load file will consist solely of `import's of your printer modules, followed by a call to a register pretty-printers with the current objfile. Taken as a whole, this approach will scale nicely to multiple inferiors, each potentially using a different library version. Embedding a version number in the Python package name will ensure that GDB is able to load both sets of printers simultaneously. Then, because the search for pretty-printers is done by objfile, and because your auto-loaded code took care to register your library's printers with a specific objfile, GDB will find the correct printers for the specific version of the library used by each inferior. To continue the `std::string' example (*note Pretty Printing API::), this code might appear in `gdb.libstdcxx.v6': def register_printers(objfile): objfile.pretty_printers.append(str_lookup_function) And then the corresponding contents of the auto-load file would be: import gdb.libstdcxx.v6 gdb.libstdcxx.v6.register_printers(gdb.current_objfile()) The previous example illustrates a basic pretty-printer. There are a few things that can be improved on. The printer doesn't have a name, making it hard to identify in a list of installed printers. The lookup function has a name, but lookup functions can have arbitrary, even identical, names. Second, the printer only handles one type, whereas a library typically has several types. One could install a lookup function for each desired type in the library, but one could also have a single lookup function recognize several types. The latter is the conventional way this is handled. If a pretty-printer can handle multiple data types, then its "subprinters" are the printers for the individual data types. The `gdb.printing' module provides a formal way of solving these problems (*note gdb.printing::). Here is another example that handles multiple types. These are the types we are going to pretty-print: struct foo { int a, b; }; struct bar { struct foo x, y; }; Here are the printers: class fooPrinter: """Print a foo object.""" def __init__(self, val): self.val = val def to_string(self): return ("a=<" + str(self.val["a"]) + "> b=<" + str(self.val["b"]) + ">") class barPrinter: """Print a bar object.""" def __init__(self, val): self.val = val def to_string(self): return ("x=<" + str(self.val["x"]) + "> y=<" + str(self.val["y"]) + ">") This example doesn't need a lookup function, that is handled by the `gdb.printing' module. Instead a function is provided to build up the object that handles the lookup. import gdb.printing def build_pretty_printer(): pp = gdb.printing.RegexpCollectionPrettyPrinter( "my_library") pp.add_printer('foo', '^foo$', fooPrinter) pp.add_printer('bar', '^bar$', barPrinter) return pp And here is the autoload support: import gdb.printing import my_library gdb.printing.register_pretty_printer( gdb.current_objfile(), my_library.build_pretty_printer()) Finally, when this printer is loaded into GDB, here is the corresponding output of `info pretty-printer': (gdb) info pretty-printer my_library.so: my_library foo bar  File: gdb.info, Node: Type Printing API, Next: Inferiors In Python, Prev: Writing a Pretty-Printer, Up: Python API 23.2.2.8 Type Printing API .......................... GDB provides a way for Python code to customize type display. This is mainly useful for substituting canonical typedef names for types. A "type printer" is just a Python object conforming to a certain protocol. A simple base class implementing the protocol is provided; see *note gdb.types::. A type printer must supply at least: -- Instance Variable of type_printer: enabled A boolean which is True if the printer is enabled, and False otherwise. This is manipulated by the `enable type-printer' and `disable type-printer' commands. -- Instance Variable of type_printer: name The name of the type printer. This must be a string. This is used by the `enable type-printer' and `disable type-printer' commands. -- Method on type_printer: instantiate (self) This is called by GDB at the start of type-printing. It is only called if the type printer is enabled. This method must return a new object that supplies a `recognize' method, as described below. When displaying a type, say via the `ptype' command, GDB will compute a list of type recognizers. This is done by iterating first over the per-objfile type printers (*note Objfiles In Python::), followed by the per-progspace type printers (*note Progspaces In Python::), and finally the global type printers. GDB will call the `instantiate' method of each enabled type printer. If this method returns `None', then the result is ignored; otherwise, it is appended to the list of recognizers. Then, when GDB is going to display a type name, it iterates over the list of recognizers. For each one, it calls the recognition function, stopping if the function returns a non-`None' value. The recognition function is defined as: -- Method on type_recognizer: recognize (self, type) If TYPE is not recognized, return `None'. Otherwise, return a string which is to be printed as the name of TYPE. TYPE will be an instance of `gdb.Type' (*note Types In Python::). GDB uses this two-pass approach so that type printers can efficiently cache information without holding on to it too long. For example, it can be convenient to look up type information in a type printer and hold it for a recognizer's lifetime; if a single pass were done then type printers would have to make use of the event system in order to avoid holding information that could become stale as the inferior changed.  File: gdb.info, Node: Inferiors In Python, Next: Events In Python, Prev: Type Printing API, Up: Python API 23.2.2.9 Inferiors In Python ............................ Programs which are being run under GDB are called inferiors (*note Inferiors and Programs::). Python scripts can access information about and manipulate inferiors controlled by GDB via objects of the `gdb.Inferior' class. The following inferior-related functions are available in the `gdb' module: -- Function: gdb.inferiors () Return a tuple containing all inferior objects. -- Function: gdb.selected_inferior () Return an object representing the current inferior. A `gdb.Inferior' object has the following attributes: -- Variable: Inferior.num ID of inferior, as assigned by GDB. -- Variable: Inferior.pid Process ID of the inferior, as assigned by the underlying operating system. -- Variable: Inferior.was_attached Boolean signaling whether the inferior was created using `attach', or started by GDB itself. A `gdb.Inferior' object has the following methods: -- Function: Inferior.is_valid () Returns `True' if the `gdb.Inferior' object is valid, `False' if not. A `gdb.Inferior' object will become invalid if the inferior no longer exists within GDB. All other `gdb.Inferior' methods will throw an exception if it is invalid at the time the method is called. -- Function: Inferior.threads () This method returns a tuple holding all the threads which are valid when it is called. If there are no valid threads, the method will return an empty tuple. -- Function: Inferior.read_memory (address, length) Read LENGTH bytes of memory from the inferior, starting at ADDRESS. Returns a buffer object, which behaves much like an array or a string. It can be modified and given to the `Inferior.write_memory' function. In `Python' 3, the return value is a `memoryview' object. -- Function: Inferior.write_memory (address, buffer [, length]) Write the contents of BUFFER to the inferior, starting at ADDRESS. The BUFFER parameter must be a Python object which supports the buffer protocol, i.e., a string, an array or the object returned from `Inferior.read_memory'. If given, LENGTH determines the number of bytes from BUFFER to be written. -- Function: Inferior.search_memory (address, length, pattern) Search a region of the inferior memory starting at ADDRESS with the given LENGTH using the search pattern supplied in PATTERN. The PATTERN parameter must be a Python object which supports the buffer protocol, i.e., a string, an array or the object returned from `gdb.read_memory'. Returns a Python `Long' containing the address where the pattern was found, or `None' if the pattern could not be found.  File: gdb.info, Node: Events In Python, Next: Threads In Python, Prev: Inferiors In Python, Up: Python API 23.2.2.10 Events In Python .......................... GDB provides a general event facility so that Python code can be notified of various state changes, particularly changes that occur in the inferior. An "event" is just an object that describes some state change. The type of the object and its attributes will vary depending on the details of the change. All the existing events are described below. In order to be notified of an event, you must register an event handler with an "event registry". An event registry is an object in the `gdb.events' module which dispatches particular events. A registry provides methods to register and unregister event handlers: -- Function: EventRegistry.connect (object) Add the given callable OBJECT to the registry. This object will be called when an event corresponding to this registry occurs. -- Function: EventRegistry.disconnect (object) Remove the given OBJECT from the registry. Once removed, the object will no longer receive notifications of events. Here is an example: def exit_handler (event): print "event type: exit" print "exit code: %d" % (event.exit_code) gdb.events.exited.connect (exit_handler) In the above example we connect our handler `exit_handler' to the registry `events.exited'. Once connected, `exit_handler' gets called when the inferior exits. The argument "event" in this example is of type `gdb.ExitedEvent'. As you can see in the example the `ExitedEvent' object has an attribute which indicates the exit code of the inferior. The following is a listing of the event registries that are available and details of the events they emit: `events.cont' Emits `gdb.ThreadEvent'. Some events can be thread specific when GDB is running in non-stop mode. When represented in Python, these events all extend `gdb.ThreadEvent'. Note, this event is not emitted directly; instead, events which are emitted by this or other modules might extend this event. Examples of these events are `gdb.BreakpointEvent' and `gdb.ContinueEvent'. -- Variable: ThreadEvent.inferior_thread In non-stop mode this attribute will be set to the specific thread which was involved in the emitted event. Otherwise, it will be set to `None'. Emits `gdb.ContinueEvent' which extends `gdb.ThreadEvent'. This event indicates that the inferior has been continued after a stop. For inherited attribute refer to `gdb.ThreadEvent' above. `events.exited' Emits `events.ExitedEvent' which indicates that the inferior has exited. `events.ExitedEvent' has two attributes: -- Variable: ExitedEvent.exit_code An integer representing the exit code, if available, which the inferior has returned. (The exit code could be unavailable if, for example, GDB detaches from the inferior.) If the exit code is unavailable, the attribute does not exist. -- Variable: ExitedEvent inferior A reference to the inferior which triggered the `exited' event. `events.stop' Emits `gdb.StopEvent' which extends `gdb.ThreadEvent'. Indicates that the inferior has stopped. All events emitted by this registry extend StopEvent. As a child of `gdb.ThreadEvent', `gdb.StopEvent' will indicate the stopped thread when GDB is running in non-stop mode. Refer to `gdb.ThreadEvent' above for more details. Emits `gdb.SignalEvent' which extends `gdb.StopEvent'. This event indicates that the inferior or one of its threads has received as signal. `gdb.SignalEvent' has the following attributes: -- Variable: SignalEvent.stop_signal A string representing the signal received by the inferior. A list of possible signal values can be obtained by running the command `info signals' in the GDB command prompt. Also emits `gdb.BreakpointEvent' which extends `gdb.StopEvent'. `gdb.BreakpointEvent' event indicates that one or more breakpoints have been hit, and has the following attributes: -- Variable: BreakpointEvent.breakpoints A sequence containing references to all the breakpoints (type `gdb.Breakpoint') that were hit. *Note Breakpoints In Python::, for details of the `gdb.Breakpoint' object. -- Variable: BreakpointEvent.breakpoint A reference to the first breakpoint that was hit. This function is maintained for backward compatibility and is now deprecated in favor of the `gdb.BreakpointEvent.breakpoints' attribute. `events.new_objfile' Emits `gdb.NewObjFileEvent' which indicates that a new object file has been loaded by GDB. `gdb.NewObjFileEvent' has one attribute: -- Variable: NewObjFileEvent.new_objfile A reference to the object file (`gdb.Objfile') which has been loaded. *Note Objfiles In Python::, for details of the `gdb.Objfile' object.  File: gdb.info, Node: Threads In Python, Next: Commands In Python, Prev: Events In Python, Up: Python API 23.2.2.11 Threads In Python ........................... Python scripts can access information about, and manipulate inferior threads controlled by GDB, via objects of the `gdb.InferiorThread' class. The following thread-related functions are available in the `gdb' module: -- Function: gdb.selected_thread () This function returns the thread object for the selected thread. If there is no selected thread, this will return `None'. A `gdb.InferiorThread' object has the following attributes: -- Variable: InferiorThread.name The name of the thread. If the user specified a name using `thread name', then this returns that name. Otherwise, if an OS-supplied name is available, then it is returned. Otherwise, this returns `None'. This attribute can be assigned to. The new value must be a string object, which sets the new name, or `None', which removes any user-specified thread name. -- Variable: InferiorThread.num ID of the thread, as assigned by GDB. -- Variable: InferiorThread.ptid ID of the thread, as assigned by the operating system. This attribute is a tuple containing three integers. The first is the Process ID (PID); the second is the Lightweight Process ID (LWPID), and the third is the Thread ID (TID). Either the LWPID or TID may be 0, which indicates that the operating system does not use that identifier. A `gdb.InferiorThread' object has the following methods: -- Function: InferiorThread.is_valid () Returns `True' if the `gdb.InferiorThread' object is valid, `False' if not. A `gdb.InferiorThread' object will become invalid if the thread exits, or the inferior that the thread belongs is deleted. All other `gdb.InferiorThread' methods will throw an exception if it is invalid at the time the method is called. -- Function: InferiorThread.switch () This changes GDB's currently selected thread to the one represented by this object. -- Function: InferiorThread.is_stopped () Return a Boolean indicating whether the thread is stopped. -- Function: InferiorThread.is_running () Return a Boolean indicating whether the thread is running. -- Function: InferiorThread.is_exited () Return a Boolean indicating whether the thread is exited.  File: gdb.info, Node: Commands In Python, Next: Parameters In Python, Prev: Threads In Python, Up: Python API 23.2.2.12 Commands In Python ............................ You can implement new GDB CLI commands in Python. A CLI command is implemented using an instance of the `gdb.Command' class, most commonly using a subclass. -- Function: Command.__init__ (name, COMMAND_CLASS [, COMPLETER_CLASS [, PREFIX]]) The object initializer for `Command' registers the new command with GDB. This initializer is normally invoked from the subclass' own `__init__' method. NAME is the name of the command. If NAME consists of multiple words, then the initial words are looked for as prefix commands. In this case, if one of the prefix commands does not exist, an exception is raised. There is no support for multi-line commands. COMMAND_CLASS should be one of the `COMMAND_' constants defined below. This argument tells GDB how to categorize the new command in the help system. COMPLETER_CLASS is an optional argument. If given, it should be one of the `COMPLETE_' constants defined below. This argument tells GDB how to perform completion for this command. If not given, GDB will attempt to complete using the object's `complete' method (see below); if no such method is found, an error will occur when completion is attempted. PREFIX is an optional argument. If `True', then the new command is a prefix command; sub-commands of this command may be registered. The help text for the new command is taken from the Python documentation string for the command's class, if there is one. If no documentation string is provided, the default value "This command is not documented." is used. -- Function: Command.dont_repeat () By default, a GDB command is repeated when the user enters a blank line at the command prompt. A command can suppress this behavior by invoking the `dont_repeat' method. This is similar to the user command `dont-repeat', see *note dont-repeat: Define. -- Function: Command.invoke (argument, from_tty) This method is called by GDB when this command is invoked. ARGUMENT is a string. It is the argument to the command, after leading and trailing whitespace has been stripped. FROM_TTY is a boolean argument. When true, this means that the command was entered by the user at the terminal; when false it means that the command came from elsewhere. If this method throws an exception, it is turned into a GDB `error' call. Otherwise, the return value is ignored. To break ARGUMENT up into an argv-like string use `gdb.string_to_argv'. This function behaves identically to GDB's internal argument lexer `buildargv'. It is recommended to use this for consistency. Arguments are separated by spaces and may be quoted. Example: print gdb.string_to_argv ("1 2\ \\\"3 '4 \"5' \"6 '7\"") ['1', '2 "3', '4 "5', "6 '7"] -- Function: Command.complete (text, word) This method is called by GDB when the user attempts completion on this command. All forms of completion are handled by this method, that is, the and key bindings (*note Completion::), and the `complete' command (*note complete: Help.). The arguments TEXT and WORD are both strings. TEXT holds the complete command line up to the cursor's location. WORD holds the last word of the command line; this is computed using a word-breaking heuristic. The `complete' method can return several values: * If the return value is a sequence, the contents of the sequence are used as the completions. It is up to `complete' to ensure that the contents actually do complete the word. A zero-length sequence is allowed, it means that there were no completions available. Only string elements of the sequence are used; other elements in the sequence are ignored. * If the return value is one of the `COMPLETE_' constants defined below, then the corresponding GDB-internal completion function is invoked, and its result is used. * All other results are treated as though there were no available completions. When a new command is registered, it must be declared as a member of some general class of commands. This is used to classify top-level commands in the on-line help system; note that prefix commands are not listed under their own category but rather that of their top-level command. The available classifications are represented by constants defined in the `gdb' module: `gdb.COMMAND_NONE' The command does not belong to any particular class. A command in this category will not be displayed in any of the help categories. `gdb.COMMAND_RUNNING' The command is related to running the inferior. For example, `start', `step', and `continue' are in this category. Type `help running' at the GDB prompt to see a list of commands in this category. `gdb.COMMAND_DATA' The command is related to data or variables. For example, `call', `find', and `print' are in this category. Type `help data' at the GDB prompt to see a list of commands in this category. `gdb.COMMAND_STACK' The command has to do with manipulation of the stack. For example, `backtrace', `frame', and `return' are in this category. Type `help stack' at the GDB prompt to see a list of commands in this category. `gdb.COMMAND_FILES' This class is used for file-related commands. For example, `file', `list' and `section' are in this category. Type `help files' at the GDB prompt to see a list of commands in this category. `gdb.COMMAND_SUPPORT' This should be used for "support facilities", generally meaning things that are useful to the user when interacting with GDB, but not related to the state of the inferior. For example, `help', `make', and `shell' are in this category. Type `help support' at the GDB prompt to see a list of commands in this category. `gdb.COMMAND_STATUS' The command is an `info'-related command, that is, related to the state of GDB itself. For example, `info', `macro', and `show' are in this category. Type `help status' at the GDB prompt to see a list of commands in this category. `gdb.COMMAND_BREAKPOINTS' The command has to do with breakpoints. For example, `break', `clear', and `delete' are in this category. Type `help breakpoints' at the GDB prompt to see a list of commands in this category. `gdb.COMMAND_TRACEPOINTS' The command has to do with tracepoints. For example, `trace', `actions', and `tfind' are in this category. Type `help tracepoints' at the GDB prompt to see a list of commands in this category. `gdb.COMMAND_USER' The command is a general purpose command for the user, and typically does not fit in one of the other categories. Type `help user-defined' at the GDB prompt to see a list of commands in this category, as well as the list of gdb macros (*note Sequences::). `gdb.COMMAND_OBSCURE' The command is only used in unusual circumstances, or is not of general interest to users. For example, `checkpoint', `fork', and `stop' are in this category. Type `help obscure' at the GDB prompt to see a list of commands in this category. `gdb.COMMAND_MAINTENANCE' The command is only useful to GDB maintainers. The `maintenance' and `flushregs' commands are in this category. Type `help internals' at the GDB prompt to see a list of commands in this category. A new command can use a predefined completion function, either by specifying it via an argument at initialization, or by returning it from the `complete' method. These predefined completion constants are all defined in the `gdb' module: `gdb.COMPLETE_NONE' This constant means that no completion should be done. `gdb.COMPLETE_FILENAME' This constant means that filename completion should be performed. `gdb.COMPLETE_LOCATION' This constant means that location completion should be done. *Note Specify Location::. `gdb.COMPLETE_COMMAND' This constant means that completion should examine GDB command names. `gdb.COMPLETE_SYMBOL' This constant means that completion should be done using symbol names as the source. The following code snippet shows how a trivial CLI command can be implemented in Python: class HelloWorld (gdb.Command): """Greet the whole world.""" def __init__ (self): super (HelloWorld, self).__init__ ("hello-world", gdb.COMMAND_USER) def invoke (self, arg, from_tty): print "Hello, World!" HelloWorld () The last line instantiates the class, and is necessary to trigger the registration of the command with GDB. Depending on how the Python code is read into GDB, you may need to import the `gdb' module explicitly.  File: gdb.info, Node: Parameters In Python, Next: Functions In Python, Prev: Commands In Python, Up: Python API 23.2.2.13 Parameters In Python .............................. You can implement new GDB parameters using Python. A new parameter is implemented as an instance of the `gdb.Parameter' class. Parameters are exposed to the user via the `set' and `show' commands. *Note Help::. There are many parameters that already exist and can be set in GDB. Two examples are: `set follow fork' and `set charset'. Setting these parameters influences certain behavior in GDB. Similarly, you can define parameters that can be used to influence behavior in custom Python scripts and commands. -- Function: Parameter.__init__ (name, COMMAND-CLASS, PARAMETER-CLASS [, ENUM-SEQUENCE]) The object initializer for `Parameter' registers the new parameter with GDB. This initializer is normally invoked from the subclass' own `__init__' method. NAME is the name of the new parameter. If NAME consists of multiple words, then the initial words are looked for as prefix parameters. An example of this can be illustrated with the `set print' set of parameters. If NAME is `print foo', then `print' will be searched as the prefix parameter. In this case the parameter can subsequently be accessed in GDB as `set print foo'. If NAME consists of multiple words, and no prefix parameter group can be found, an exception is raised. COMMAND-CLASS should be one of the `COMMAND_' constants (*note Commands In Python::). This argument tells GDB how to categorize the new parameter in the help system. PARAMETER-CLASS should be one of the `PARAM_' constants defined below. This argument tells GDB the type of the new parameter; this information is used for input validation and completion. If PARAMETER-CLASS is `PARAM_ENUM', then ENUM-SEQUENCE must be a sequence of strings. These strings represent the possible values for the parameter. If PARAMETER-CLASS is not `PARAM_ENUM', then the presence of a fourth argument will cause an exception to be thrown. The help text for the new parameter is taken from the Python documentation string for the parameter's class, if there is one. If there is no documentation string, a default value is used. -- Variable: Parameter.set_doc If this attribute exists, and is a string, then its value is used as the help text for this parameter's `set' command. The value is examined when `Parameter.__init__' is invoked; subsequent changes have no effect. -- Variable: Parameter.show_doc If this attribute exists, and is a string, then its value is used as the help text for this parameter's `show' command. The value is examined when `Parameter.__init__' is invoked; subsequent changes have no effect. -- Variable: Parameter.value The `value' attribute holds the underlying value of the parameter. It can be read and assigned to just as any other attribute. GDB does validation when assignments are made. There are two methods that should be implemented in any `Parameter' class. These are: -- Function: Parameter.get_set_string (self) GDB will call this method when a PARAMETER's value has been changed via the `set' API (for example, `set foo off'). The `value' attribute has already been populated with the new value and may be used in output. This method must return a string. -- Function: Parameter.get_show_string (self, svalue) GDB will call this method when a PARAMETER's `show' API has been invoked (for example, `show foo'). The argument `svalue' receives the string representation of the current value. This method must return a string. When a new parameter is defined, its type must be specified. The available types are represented by constants defined in the `gdb' module: `gdb.PARAM_BOOLEAN' The value is a plain boolean. The Python boolean values, `True' and `False' are the only valid values. `gdb.PARAM_AUTO_BOOLEAN' The value has three possible states: true, false, and `auto'. In Python, true and false are represented using boolean constants, and `auto' is represented using `None'. `gdb.PARAM_UINTEGER' The value is an unsigned integer. The value of 0 should be interpreted to mean "unlimited". `gdb.PARAM_INTEGER' The value is a signed integer. The value of 0 should be interpreted to mean "unlimited". `gdb.PARAM_STRING' The value is a string. When the user modifies the string, any escape sequences, such as `\t', `\f', and octal escapes, are translated into corresponding characters and encoded into the current host charset. `gdb.PARAM_STRING_NOESCAPE' The value is a string. When the user modifies the string, escapes are passed through untranslated. `gdb.PARAM_OPTIONAL_FILENAME' The value is a either a filename (a string), or `None'. `gdb.PARAM_FILENAME' The value is a filename. This is just like `PARAM_STRING_NOESCAPE', but uses file names for completion. `gdb.PARAM_ZINTEGER' The value is an integer. This is like `PARAM_INTEGER', except 0 is interpreted as itself. `gdb.PARAM_ENUM' The value is a string, which must be one of a collection string constants provided when the parameter is created.  File: gdb.info, Node: Functions In Python, Next: Progspaces In Python, Prev: Parameters In Python, Up: Python API 23.2.2.14 Writing new convenience functions ........................................... You can implement new convenience functions (*note Convenience Vars::) in Python. A convenience function is an instance of a subclass of the class `gdb.Function'. -- Function: Function.__init__ (name) The initializer for `Function' registers the new function with GDB. The argument NAME is the name of the function, a string. The function will be visible to the user as a convenience variable of type `internal function', whose name is the same as the given NAME. The documentation for the new function is taken from the documentation string for the new class. -- Function: Function.invoke (*ARGS) When a convenience function is evaluated, its arguments are converted to instances of `gdb.Value', and then the function's `invoke' method is called. Note that GDB does not predetermine the arity of convenience functions. Instead, all available arguments are passed to `invoke', following the standard Python calling convention. In particular, a convenience function can have default values for parameters without ill effect. The return value of this method is used as its value in the enclosing expression. If an ordinary Python value is returned, it is converted to a `gdb.Value' following the usual rules. The following code snippet shows how a trivial convenience function can be implemented in Python: class Greet (gdb.Function): """Return string to greet someone. Takes a name as argument.""" def __init__ (self): super (Greet, self).__init__ ("greet") def invoke (self, name): return "Hello, %s!" % name.string () Greet () The last line instantiates the class, and is necessary to trigger the registration of the function with GDB. Depending on how the Python code is read into GDB, you may need to import the `gdb' module explicitly. Now you can use the function in an expression: (gdb) print $greet("Bob") $1 = "Hello, Bob!"  File: gdb.info, Node: Progspaces In Python, Next: Objfiles In Python, Prev: Functions In Python, Up: Python API 23.2.2.15 Program Spaces In Python .................................. A program space, or "progspace", represents a symbolic view of an address space. It consists of all of the objfiles of the program. *Note Objfiles In Python::. *Note program spaces: Inferiors and Programs, for more details about program spaces. The following progspace-related functions are available in the `gdb' module: -- Function: gdb.current_progspace () This function returns the program space of the currently selected inferior. *Note Inferiors and Programs::. -- Function: gdb.progspaces () Return a sequence of all the progspaces currently known to GDB. Each progspace is represented by an instance of the `gdb.Progspace' class. -- Variable: Progspace.filename The file name of the progspace as a string. -- Variable: Progspace.pretty_printers The `pretty_printers' attribute is a list of functions. It is used to look up pretty-printers. A `Value' is passed to each function in order; if the function returns `None', then the search continues. Otherwise, the return value should be an object which is used to format the value. *Note Pretty Printing API::, for more information. -- Variable: Progspace.type_printers The `type_printers' attribute is a list of type printer objects. *Note Type Printing API::, for more information.  File: gdb.info, Node: Objfiles In Python, Next: Frames In Python, Prev: Progspaces In Python, Up: Python API 23.2.2.16 Objfiles In Python ............................ GDB loads symbols for an inferior from various symbol-containing files (*note Files::). These include the primary executable file, any shared libraries used by the inferior, and any separate debug info files (*note Separate Debug Files::). GDB calls these symbol-containing files "objfiles". The following objfile-related functions are available in the `gdb' module: -- Function: gdb.current_objfile () When auto-loading a Python script (*note Python Auto-loading::), GDB sets the "current objfile" to the corresponding objfile. This function returns the current objfile. If there is no current objfile, this function returns `None'. -- Function: gdb.objfiles () Return a sequence of all the objfiles current known to GDB. *Note Objfiles In Python::. Each objfile is represented by an instance of the `gdb.Objfile' class. -- Variable: Objfile.filename The file name of the objfile as a string. -- Variable: Objfile.pretty_printers The `pretty_printers' attribute is a list of functions. It is used to look up pretty-printers. A `Value' is passed to each function in order; if the function returns `None', then the search continues. Otherwise, the return value should be an object which is used to format the value. *Note Pretty Printing API::, for more information. -- Variable: Objfile.type_printers The `type_printers' attribute is a list of type printer objects. *Note Type Printing API::, for more information. A `gdb.Objfile' object has the following methods: -- Function: Objfile.is_valid () Returns `True' if the `gdb.Objfile' object is valid, `False' if not. A `gdb.Objfile' object can become invalid if the object file it refers to is not loaded in GDB any longer. All other `gdb.Objfile' methods will throw an exception if it is invalid at the time the method is called.  File: gdb.info, Node: Frames In Python, Next: Blocks In Python, Prev: Objfiles In Python, Up: Python API 23.2.2.17 Accessing inferior stack frames from Python. ...................................................... When the debugged program stops, GDB is able to analyze its call stack (*note Stack frames: Frames.). The `gdb.Frame' class represents a frame in the stack. A `gdb.Frame' object is only valid while its corresponding frame exists in the inferior's stack. If you try to use an invalid frame object, GDB will throw a `gdb.error' exception (*note Exception Handling::). Two `gdb.Frame' objects can be compared for equality with the `==' operator, like: (gdb) python print gdb.newest_frame() == gdb.selected_frame () True The following frame-related functions are available in the `gdb' module: -- Function: gdb.selected_frame () Return the selected frame object. (*note Selecting a Frame: Selection.). -- Function: gdb.newest_frame () Return the newest frame object for the selected thread. -- Function: gdb.frame_stop_reason_string (reason) Return a string explaining the reason why GDB stopped unwinding frames, as expressed by the given REASON code (an integer, see the `unwind_stop_reason' method further down in this section). A `gdb.Frame' object has the following methods: -- Function: Frame.is_valid () Returns true if the `gdb.Frame' object is valid, false if not. A frame object can become invalid if the frame it refers to doesn't exist anymore in the inferior. All `gdb.Frame' methods will throw an exception if it is invalid at the time the method is called. -- Function: Frame.name () Returns the function name of the frame, or `None' if it can't be obtained. -- Function: Frame.architecture () Returns the `gdb.Architecture' object corresponding to the frame's architecture. *Note Architectures In Python::. -- Function: Frame.type () Returns the type of the frame. The value can be one of: `gdb.NORMAL_FRAME' An ordinary stack frame. `gdb.DUMMY_FRAME' A fake stack frame that was created by GDB when performing an inferior function call. `gdb.INLINE_FRAME' A frame representing an inlined function. The function was inlined into a `gdb.NORMAL_FRAME' that is older than this one. `gdb.TAILCALL_FRAME' A frame representing a tail call. *Note Tail Call Frames::. `gdb.SIGTRAMP_FRAME' A signal trampoline frame. This is the frame created by the OS when it calls into a signal handler. `gdb.ARCH_FRAME' A fake stack frame representing a cross-architecture call. `gdb.SENTINEL_FRAME' This is like `gdb.NORMAL_FRAME', but it is only used for the newest frame. -- Function: Frame.unwind_stop_reason () Return an integer representing the reason why it's not possible to find more frames toward the outermost frame. Use `gdb.frame_stop_reason_string' to convert the value returned by this function to a string. The value can be one of: `gdb.FRAME_UNWIND_NO_REASON' No particular reason (older frames should be available). `gdb.FRAME_UNWIND_NULL_ID' The previous frame's analyzer returns an invalid result. `gdb.FRAME_UNWIND_OUTERMOST' This frame is the outermost. `gdb.FRAME_UNWIND_UNAVAILABLE' Cannot unwind further, because that would require knowing the values of registers or memory that have not been collected. `gdb.FRAME_UNWIND_INNER_ID' This frame ID looks like it ought to belong to a NEXT frame, but we got it for a PREV frame. Normally, this is a sign of unwinder failure. It could also indicate stack corruption. `gdb.FRAME_UNWIND_SAME_ID' This frame has the same ID as the previous one. That means that unwinding further would almost certainly give us another frame with exactly the same ID, so break the chain. Normally, this is a sign of unwinder failure. It could also indicate stack corruption. `gdb.FRAME_UNWIND_NO_SAVED_PC' The frame unwinder did not find any saved PC, but we needed one to unwind further. `gdb.FRAME_UNWIND_FIRST_ERROR' Any stop reason greater or equal to this value indicates some kind of error. This special value facilitates writing code that tests for errors in unwinding in a way that will work correctly even if the list of the other values is modified in future GDB versions. Using it, you could write: reason = gdb.selected_frame().unwind_stop_reason () reason_str = gdb.frame_stop_reason_string (reason) if reason >= gdb.FRAME_UNWIND_FIRST_ERROR: print "An error occured: %s" % reason_str -- Function: Frame.pc () Returns the frame's resume address. -- Function: Frame.block () Return the frame's code block. *Note Blocks In Python::. -- Function: Frame.function () Return the symbol for the function corresponding to this frame. *Note Symbols In Python::. -- Function: Frame.older () Return the frame that called this frame. -- Function: Frame.newer () Return the frame called by this frame. -- Function: Frame.find_sal () Return the frame's symtab and line object. *Note Symbol Tables In Python::. -- Function: Frame.read_var (variable [, block]) Return the value of VARIABLE in this frame. If the optional argument BLOCK is provided, search for the variable from that block; otherwise start at the frame's current block (which is determined by the frame's current program counter). VARIABLE must be a string or a `gdb.Symbol' object. BLOCK must be a `gdb.Block' object. -- Function: Frame.select () Set this frame to be the selected frame. *Note Examining the Stack: Stack.  File: gdb.info, Node: Blocks In Python, Next: Symbols In Python, Prev: Frames In Python, Up: Python API 23.2.2.18 Accessing frame blocks from Python. ............................................. Within each frame, GDB maintains information on each block stored in that frame. These blocks are organized hierarchically, and are represented individually in Python as a `gdb.Block'. Please see *note Frames In Python::, for a more in-depth discussion on frames. Furthermore, see *note Examining the Stack: Stack, for more detailed technical information on GDB's book-keeping of the stack. A `gdb.Block' is iterable. The iterator returns the symbols (*note Symbols In Python::) local to the block. Python programs should not assume that a specific block object will always contain a given symbol, since changes in GDB features and infrastructure may cause symbols move across blocks in a symbol table. The following block-related functions are available in the `gdb' module: -- Function: gdb.block_for_pc (pc) Return the `gdb.Block' containing the given PC value. If the block cannot be found for the PC value specified, the function will return `None'. A `gdb.Block' object has the following methods: -- Function: Block.is_valid () Returns `True' if the `gdb.Block' object is valid, `False' if not. A block object can become invalid if the block it refers to doesn't exist anymore in the inferior. All other `gdb.Block' methods will throw an exception if it is invalid at the time the method is called. The block's validity is also checked during iteration over symbols of the block. A `gdb.Block' object has the following attributes: -- Variable: Block.start The start address of the block. This attribute is not writable. -- Variable: Block.end The end address of the block. This attribute is not writable. -- Variable: Block.function The name of the block represented as a `gdb.Symbol'. If the block is not named, then this attribute holds `None'. This attribute is not writable. -- Variable: Block.superblock The block containing this block. If this parent block does not exist, this attribute holds `None'. This attribute is not writable. -- Variable: Block.global_block The global block associated with this block. This attribute is not writable. -- Variable: Block.static_block The static block associated with this block. This attribute is not writable. -- Variable: Block.is_global `True' if the `gdb.Block' object is a global block, `False' if not. This attribute is not writable. -- Variable: Block.is_static `True' if the `gdb.Block' object is a static block, `False' if not. This attribute is not writable.  File: gdb.info, Node: Symbols In Python, Next: Symbol Tables In Python, Prev: Blocks In Python, Up: Python API 23.2.2.19 Python representation of Symbols. ........................................... GDB represents every variable, function and type as an entry in a symbol table. *Note Examining the Symbol Table: Symbols. Similarly, Python represents these symbols in GDB with the `gdb.Symbol' object. The following symbol-related functions are available in the `gdb' module: -- Function: gdb.lookup_symbol (name [, block [, domain]]) This function searches for a symbol by name. The search scope can be restricted to the parameters defined in the optional domain and block arguments. NAME is the name of the symbol. It must be a string. The optional BLOCK argument restricts the search to symbols visible in that BLOCK. The BLOCK argument must be a `gdb.Block' object. If omitted, the block for the current frame is used. The optional DOMAIN argument restricts the search to the domain type. The DOMAIN argument must be a domain constant defined in the `gdb' module and described later in this chapter. The result is a tuple of two elements. The first element is a `gdb.Symbol' object or `None' if the symbol is not found. If the symbol is found, the second element is `True' if the symbol is a field of a method's object (e.g., `this' in C++), otherwise it is `False'. If the symbol is not found, the second element is `False'. -- Function: gdb.lookup_global_symbol (name [, domain]) This function searches for a global symbol by name. The search scope can be restricted to by the domain argument. NAME is the name of the symbol. It must be a string. The optional DOMAIN argument restricts the search to the domain type. The DOMAIN argument must be a domain constant defined in the `gdb' module and described later in this chapter. The result is a `gdb.Symbol' object or `None' if the symbol is not found. A `gdb.Symbol' object has the following attributes: -- Variable: Symbol.type The type of the symbol or `None' if no type is recorded. This attribute is represented as a `gdb.Type' object. *Note Types In Python::. This attribute is not writable. -- Variable: Symbol.symtab The symbol table in which the symbol appears. This attribute is represented as a `gdb.Symtab' object. *Note Symbol Tables In Python::. This attribute is not writable. -- Variable: Symbol.line The line number in the source code at which the symbol was defined. This is an integer. -- Variable: Symbol.name The name of the symbol as a string. This attribute is not writable. -- Variable: Symbol.linkage_name The name of the symbol, as used by the linker (i.e., may be mangled). This attribute is not writable. -- Variable: Symbol.print_name The name of the symbol in a form suitable for output. This is either `name' or `linkage_name', depending on whether the user asked GDB to display demangled or mangled names. -- Variable: Symbol.addr_class The address class of the symbol. This classifies how to find the value of a symbol. Each address class is a constant defined in the `gdb' module and described later in this chapter. -- Variable: Symbol.needs_frame This is `True' if evaluating this symbol's value requires a frame (*note Frames In Python::) and `False' otherwise. Typically, local variables will require a frame, but other symbols will not. -- Variable: Symbol.is_argument `True' if the symbol is an argument of a function. -- Variable: Symbol.is_constant `True' if the symbol is a constant. -- Variable: Symbol.is_function `True' if the symbol is a function or a method. -- Variable: Symbol.is_variable `True' if the symbol is a variable. A `gdb.Symbol' object has the following methods: -- Function: Symbol.is_valid () Returns `True' if the `gdb.Symbol' object is valid, `False' if not. A `gdb.Symbol' object can become invalid if the symbol it refers to does not exist in GDB any longer. All other `gdb.Symbol' methods will throw an exception if it is invalid at the time the method is called. -- Function: Symbol.value ([frame]) Compute the value of the symbol, as a `gdb.Value'. For functions, this computes the address of the function, cast to the appropriate type. If the symbol requires a frame in order to compute its value, then FRAME must be given. If FRAME is not given, or if FRAME is invalid, then this method will throw an exception. The available domain categories in `gdb.Symbol' are represented as constants in the `gdb' module: `gdb.SYMBOL_UNDEF_DOMAIN' This is used when a domain has not been discovered or none of the following domains apply. This usually indicates an error either in the symbol information or in GDB's handling of symbols. `gdb.SYMBOL_VAR_DOMAIN' This domain contains variables, function names, typedef names and enum type values. `gdb.SYMBOL_STRUCT_DOMAIN' This domain holds struct, union and enum type names. `gdb.SYMBOL_LABEL_DOMAIN' This domain contains names of labels (for gotos). `gdb.SYMBOL_VARIABLES_DOMAIN' This domain holds a subset of the `SYMBOLS_VAR_DOMAIN'; it contains everything minus functions and types. `gdb.SYMBOL_FUNCTION_DOMAIN' This domain contains all functions. `gdb.SYMBOL_TYPES_DOMAIN' This domain contains all types. The available address class categories in `gdb.Symbol' are represented as constants in the `gdb' module: `gdb.SYMBOL_LOC_UNDEF' If this is returned by address class, it indicates an error either in the symbol information or in GDB's handling of symbols. `gdb.SYMBOL_LOC_CONST' Value is constant int. `gdb.SYMBOL_LOC_STATIC' Value is at a fixed address. `gdb.SYMBOL_LOC_REGISTER' Value is in a register. `gdb.SYMBOL_LOC_ARG' Value is an argument. This value is at the offset stored within the symbol inside the frame's argument list. `gdb.SYMBOL_LOC_REF_ARG' Value address is stored in the frame's argument list. Just like `LOC_ARG' except that the value's address is stored at the offset, not the value itself. `gdb.SYMBOL_LOC_REGPARM_ADDR' Value is a specified register. Just like `LOC_REGISTER' except the register holds the address of the argument instead of the argument itself. `gdb.SYMBOL_LOC_LOCAL' Value is a local variable. `gdb.SYMBOL_LOC_TYPEDEF' Value not used. Symbols in the domain `SYMBOL_STRUCT_DOMAIN' all have this class. `gdb.SYMBOL_LOC_BLOCK' Value is a block. `gdb.SYMBOL_LOC_CONST_BYTES' Value is a byte-sequence. `gdb.SYMBOL_LOC_UNRESOLVED' Value is at a fixed address, but the address of the variable has to be determined from the minimal symbol table whenever the variable is referenced. `gdb.SYMBOL_LOC_OPTIMIZED_OUT' The value does not actually exist in the program. `gdb.SYMBOL_LOC_COMPUTED' The value's address is a computed location.  File: gdb.info, Node: Symbol Tables In Python, Next: Breakpoints In Python, Prev: Symbols In Python, Up: Python API 23.2.2.20 Symbol table representation in Python. ................................................ Access to symbol table data maintained by GDB on the inferior is exposed to Python via two objects: `gdb.Symtab_and_line' and `gdb.Symtab'. Symbol table and line data for a frame is returned from the `find_sal' method in `gdb.Frame' object. *Note Frames In Python::. For more information on GDB's symbol table management, see *note Examining the Symbol Table: Symbols, for more information. A `gdb.Symtab_and_line' object has the following attributes: -- Variable: Symtab_and_line.symtab The symbol table object (`gdb.Symtab') for this frame. This attribute is not writable. -- Variable: Symtab_and_line.pc Indicates the start of the address range occupied by code for the current source line. This attribute is not writable. -- Variable: Symtab_and_line.last Indicates the end of the address range occupied by code for the current source line. This attribute is not writable. -- Variable: Symtab_and_line.line Indicates the current line number for this object. This attribute is not writable. A `gdb.Symtab_and_line' object has the following methods: -- Function: Symtab_and_line.is_valid () Returns `True' if the `gdb.Symtab_and_line' object is valid, `False' if not. A `gdb.Symtab_and_line' object can become invalid if the Symbol table and line object it refers to does not exist in GDB any longer. All other `gdb.Symtab_and_line' methods will throw an exception if it is invalid at the time the method is called. A `gdb.Symtab' object has the following attributes: -- Variable: Symtab.filename The symbol table's source filename. This attribute is not writable. -- Variable: Symtab.objfile The symbol table's backing object file. *Note Objfiles In Python::. This attribute is not writable. A `gdb.Symtab' object has the following methods: -- Function: Symtab.is_valid () Returns `True' if the `gdb.Symtab' object is valid, `False' if not. A `gdb.Symtab' object can become invalid if the symbol table it refers to does not exist in GDB any longer. All other `gdb.Symtab' methods will throw an exception if it is invalid at the time the method is called. -- Function: Symtab.fullname () Return the symbol table's source absolute file name. -- Function: Symtab.global_block () Return the global block of the underlying symbol table. *Note Blocks In Python::. -- Function: Symtab.static_block () Return the static block of the underlying symbol table. *Note Blocks In Python::. gdb-doc-7.6.2/gdb/doc/refcard.tex0000644000175000017500000005540712250770607015535 0ustar zumbizumbi%%%%%%%%%%%%%%%% gdb-refcard.tex %%%%%%%%%%%%%%%% %This file is TeX source for a reference card describing GDB, the GNU debugger. %Copyright (C) 1991-2013 Free Software Foundation, Inc. %Permission is granted to make and distribute verbatim copies of %this reference provided the copyright notices and permission notices %are preserved on all copies. % %TeX markup is a programming language; accordingly this file is source %for a program to generate a reference. % %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 3, 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, see . % %You can contact the maintainer at: doc@cygnus.com % % Documentation Department % Cygnus Solutions % 1325 Chesapeake Terrace % Sunnyvale, CA 94089 USA % % +1 800 CYGNUS-1 % % % % 22-AUG-1993 Andreas Vogel % % Modifications made in order to handle different papersizes correctly. % You only have to set the total width and height of the paper, the % horizontal and vertical margin space measured from *paper edge* % and the interline and interspec spacing. % In order to support a new papersize, you have to fiddle with the % latter four dimensions. Just try out a few values. % All other values will be computed at process time so it should be % quite easy to support different paper sizes - only four values to % guess :-) % % To find the configuration places, just search for the string % "CONFIGURATION". % % Andreas Vogel (av@ssw.de) % % % % Uncomment the following `magnification' command if you want to print % out in a larger font. Caution! You may need larger paper. You had % best avoid using 3-column output if you try this. See the ``Three % column format'' section below if you want to print in three column % format. % %\magnification=\magstep 1 % % NOTE ON INTENTIONAL OMISSIONS: This reference card includes most GDB % commands, but due to space constraints there are some things I chose % to omit. In general, not all synonyms for commands are covered, nor % all variations of a command. % The GDB-under-Emacs section omits gdb-mode functions without default % keybindings. GDB startup options are not described. % set print sevenbit-strings omitted. % printsyms, printpsyms, omitted since they're for GDB maintenance primarily % share omitted due to obsolescence % set check range/type omitted at least til code is in GDB. % %-------------------- Three column format ----------------------- %%%% --- To disable three column format, comment out this entire section % Three-column format for landscape printing %-------- Papersize defs: \newdimen\totalwidth \newdimen\totalheight \newdimen\hmargin \newdimen\vmargin \newdimen\secskip \newdimen\lskip \newdimen\barwidth \newdimen\barheight \newdimen\intersecwidth %% %% START CONFIGURATION - PAPERSIZE DEFINITIONS %------- Papersize params: %% US letter paper (8.5x11in) %% \totalwidth=11in % total width of paper \totalheight=8.5in % total height of paper \hmargin=.25in % horizontal margin width \vmargin=.25in % vertical margin width \secskip=1pc % space between refcard secs \lskip=2pt % extra skip between \sec entries \ifx\pdfoutput\undefined\else % check if we are using pdfTeX \pdfpagewidth=\totalwidth % width of paper in pdf output \pdfpageheight=\totalheight % height of paper in pdf output \fi %------- end papersize params %% %% change according to personal taste, not papersize dependent %% \barwidth=.1pt % width of the cropmark bar \barheight=2pt % height of the cropmark bar \intersecwidth=0.5em % width between \itmwid and \dfnwid %% %% END CONFIGURATION - PAPERSIZE DEFINITIONS %% %% %% values to be computed - nothing to configure %% \newdimen\fullhsize % width of area without margins \newdimen\itmwid % width of item column \newdimen\dfnwid % width of definition column \newdimen\temp % only for temporary use %% %% adjust the offsets so the margins are measured *from paper edge* %% \hoffset=-1in \advance \hoffset by \hmargin \voffset=-1in \advance \voffset by \vmargin %% %% fullhsize = totalwidth - (2 * hmargin) %% \fullhsize=\totalwidth \temp=\hmargin \multiply \temp by 2 \advance \fullhsize by -\temp %% %% hsize = (fullhsize - (4 * hmargin) - (2 * barwidth)) / 3 %% \hsize=\fullhsize \temp=\hmargin \multiply \temp by 4 \advance \hsize by -\temp \temp=\barwidth \multiply \temp by 2 \advance \hsize by -\temp \divide \hsize by 3 %% %% vsize = totalheight - (2 * vmargin) %% \vsize=\totalheight \temp=\vmargin \multiply \temp by 2 \advance \vsize by -\temp %% %% itmwid = (hsize - intersecwidth) * 1/3 %% dfnwid = (hsize - intersecwidth) * 2/3 %% \temp=\hsize \advance \temp by -\intersecwidth \divide \temp by 3 \itmwid=\temp \dfnwid=\hsize \advance \dfnwid by -\itmwid %-------- end papersize defs \def\fulline{\hbox to \fullhsize} \let\lcr=L \newbox\leftcolumn\newbox\centercolumn \output={\if L\lcr \global\setbox\leftcolumn=\columnbox \global\let\lcr=C \else \if C\lcr \global\setbox\centercolumn=\columnbox \global\let\lcr=R \else \tripleformat \global\let\lcr=L \fi \fi % \ifnum\outputpenalty>-20000 \else\dosupereject\fi } %% %% START CONFIGURATION - ALTERNATIVE FOLDING GUIDES %% %% For NO printed folding guide, %% comment out other \def\vdecor's and uncomment: %\def\vdecor{\hskip\hmargin plus1fil\hskip\barwidth plus1fil\hskip\hmargin plus1fil} %% For SOLID LINE folding guide, %% comment out other \def\vdecor's and uncomment: %\def\vdecor{\hskip\hmargin plus1fil \vrule width \barwidth \hskip\hmargin plus1fil} %% For SMALL MARKS NEAR TOP AND BOTTOM as folding guide, %% comment out other \def\vdecor's and uncomment: \def\vdecor{\hskip\hmargin plus1fil \vbox to \vsize{\hbox to \barwidth{\vrule height\barheight width\barwidth}\vfill \hbox to \barwidth{\vrule height\barheight width\barwidth}}%THIS PERCENT SIGN IS ESSENTIAL \hskip\hmargin plus1fil} %% %% END CONFIGURATION - ALTERNATIVES FOR FOLDING GUIDES %% \def\tripleformat{\shipout\vbox{\fulline{\box\leftcolumn\vdecor \box\centercolumn\vdecor \columnbox} } \advancepageno} \def\columnbox{\leftline{\pagebody}} \def\bye{\par\vfill \supereject \if R\lcr \null\vfill\eject\fi \end} %-------------------- end three column format ----------------------- %-------------------- Computer Modern font defs: -------------------- \font\bbf=cmbx10 \font\vbbf=cmbx12 \font\smrm=cmr6 \font\brm=cmr10 \font\rm=cmr7 \font\it=cmti7 \font\tt=cmtt8 %-------------------- end font defs --------------------------------- % \hyphenpenalty=5000\tolerance=2000\raggedright\raggedbottom \normalbaselineskip=9pt\baselineskip=9pt % \parindent=0pt \parskip=0pt \footline={\vbox to0pt{\hss}} % \def\ctl#1{{\tt C-#1}} \def\opt#1{{\brm[{\rm #1}]}} \def\xtra#1{\noalign{\smallskip{\tt#1}}} % \long\def\sec#1;#2\endsec{\vskip \secskip \halign{% %COL 1 (of halign): \vtop{\hsize=\itmwid\tt ##\par\vskip \lskip }\hfil %COL 2 (of halign): &\vtop{\hsize=\dfnwid\hangafter=1\hangindent=\intersecwidth \rm ##\par\vskip \lskip}\cr %Tail of \long\def fills in halign body with \sec args: \noalign{{\bbf #1}\vskip \lskip} #2 } } {\vbbf GDB QUICK REFERENCE}\hfil{\smrm GDB Version 5}\qquad \sec Essential Commands; gdb {\it program} \opt{{\it core}}&debug {\it program} \opt{using coredump {\it core}}\cr b \opt{\it file\tt:}{\it function}&set breakpoint at {\it function} \opt{in \it file}\cr run \opt{{\it arglist}}&start your program \opt{with {\it arglist}}\cr bt& backtrace: display program stack\cr p {\it expr}&display the value of an expression\cr c &continue running your program\cr n &next line, stepping over function calls\cr s &next line, stepping into function calls\cr \endsec \sec Starting GDB; gdb&start GDB, with no debugging files\cr gdb {\it program}&begin debugging {\it program}\cr gdb {\it program core}&debug coredump {\it core} produced by {\it program}\cr gdb --help&describe command line options\cr \endsec \sec Stopping GDB; quit&exit GDB; also {\tt q} or {\tt EOF} (eg \ctl{d})\cr INTERRUPT&(eg \ctl{c}) terminate current command, or send to running process\cr \endsec \sec Getting Help; help&list classes of commands\cr help {\it class}&one-line descriptions for commands in {\it class}\cr help {\it command}&describe {\it command}\cr \endsec \sec Executing your Program; run {\it arglist}&start your program with {\it arglist}\cr run&start your program with current argument list\cr run $\ldots$ <{\it inf} >{\it outf}&start your program with input, output redirected\cr \cr kill&kill running program\cr \cr tty {\it dev}&use {\it dev} as stdin and stdout for next {\tt run}\cr set args {\it arglist}&specify {\it arglist} for next {\tt run}\cr set args&specify empty argument list\cr show args&display argument list\cr \cr show env&show all environment variables\cr show env {\it var}&show value of environment variable {\it var}\cr set env {\it var} {\it string}&set environment variable {\it var}\cr unset env {\it var}&remove {\it var} from environment\cr \endsec \sec Shell Commands; cd {\it dir}&change working directory to {\it dir}\cr pwd&Print working directory\cr make $\ldots$&call ``{\tt make}''\cr shell {\it cmd}&execute arbitrary shell command string\cr \endsec \vfill \line{\smrm \opt{ } surround optional arguments \hfill $\ldots$ show one or more arguments} \vskip\baselineskip \centerline{\smrm \copyright 1998-2013 Free Software Foundation, Inc.\qquad Permissions on back} \eject \sec Breakpoints and Watchpoints; break \opt{\it file\tt:}{\it line}\par b \opt{\it file\tt:}{\it line}&set breakpoint at {\it line} number \opt{in \it file}\par eg:\quad{\tt break main.c:37}\quad\cr break \opt{\it file\tt:}{\it func}&set breakpoint at {\it func} \opt{in \it file}\cr break +{\it offset}\par break -{\it offset}&set break at {\it offset} lines from current stop\cr break *{\it addr}&set breakpoint at address {\it addr}\cr break&set breakpoint at next instruction\cr break $\ldots$ if {\it expr}&break conditionally on nonzero {\it expr}\cr cond {\it n} \opt{\it expr}&new conditional expression on breakpoint {\it n}; make unconditional if no {\it expr}\cr tbreak $\ldots$&temporary break; disable when reached\cr rbreak \opt{\it file\tt:}{\it regex}&break on all functions matching {\it regex} \opt{in \it file}\cr watch {\it expr}&set a watchpoint for expression {\it expr}\cr catch {\it event}&break at {\it event}, which may be {\tt catch}, {\tt throw}, {\tt exec}, {\tt fork}, {\tt vfork}, {\tt load}, or {\tt unload}.\cr \cr info break&show defined breakpoints\cr info watch&show defined watchpoints\cr \cr clear&delete breakpoints at next instruction\cr clear \opt{\it file\tt:}{\it fun}&delete breakpoints at entry to {\it fun}()\cr clear \opt{\it file\tt:}{\it line}&delete breakpoints on source line \cr delete \opt{{\it n}}&delete breakpoints \opt{or breakpoint {\it n}}\cr \cr disable \opt{{\it n}}&disable breakpoints \opt{or breakpoint {\it n}} \cr enable \opt{{\it n}}&enable breakpoints \opt{or breakpoint {\it n}} \cr enable once \opt{{\it n}}&enable breakpoints \opt{or breakpoint {\it n}}; disable again when reached \cr enable del \opt{{\it n}}&enable breakpoints \opt{or breakpoint {\it n}}; delete when reached \cr \cr ignore {\it n} {\it count}&ignore breakpoint {\it n}, {\it count} times\cr \cr commands {\it n}\par \qquad \opt{\tt silent}\par \qquad {\it command-list}&execute GDB {\it command-list} every time breakpoint {\it n} is reached. \opt{{\tt silent} suppresses default display}\cr end&end of {\it command-list}\cr \endsec \sec Program Stack; backtrace \opt{\it n}\par bt \opt{\it n}&print trace of all frames in stack; or of {\it n} frames---innermost if {\it n}{\tt >0}, outermost if {\it n}{\tt <0}\cr frame \opt{\it n}&select frame number {\it n} or frame at address {\it n}; if no {\it n}, display current frame\cr up {\it n}&select frame {\it n} frames up\cr down {\it n}&select frame {\it n} frames down\cr info frame \opt{\it addr}&describe selected frame, or frame at {\it addr}\cr info args&arguments of selected frame\cr info locals&local variables of selected frame\cr info reg \opt{\it rn}$\ldots$\par info all-reg \opt{\it rn}®ister values \opt{for regs {\it rn\/}} in selected frame; {\tt all-reg} includes floating point\cr \endsec \vfill\eject \sec Execution Control; continue \opt{\it count}\par c \opt{\it count}&continue running; if {\it count} specified, ignore this breakpoint next {\it count} times\cr \cr step \opt{\it count}\par s \opt{\it count}&execute until another line reached; repeat {\it count} times if specified\cr stepi \opt{\it count}\par si \opt{\it count}&step by machine instructions rather than source lines\cr \cr next \opt{\it count}\par n \opt{\it count}&execute next line, including any function calls\cr nexti \opt{\it count}\par ni \opt{\it count}&next machine instruction rather than source line\cr \cr until \opt{\it location}&run until next instruction (or {\it location})\cr finish&run until selected stack frame returns\cr return \opt{\it expr}&pop selected stack frame without executing \opt{setting return value}\cr signal {\it num}&resume execution with signal {\it s} (none if {\tt 0})\cr jump {\it line}\par jump *{\it address}&resume execution at specified {\it line} number or {\it address}\cr set var={\it expr}&evaluate {\it expr} without displaying it; use for altering program variables\cr \endsec \sec Display; print \opt{\tt/{\it f}\/} \opt{\it expr}\par p \opt{\tt/{\it f}\/} \opt{\it expr}&show value of {\it expr} \opt{or last value \tt \$} according to format {\it f}:\cr \qquad x&hexadecimal\cr \qquad d&signed decimal\cr \qquad u&unsigned decimal\cr \qquad o&octal\cr \qquad t&binary\cr \qquad a&address, absolute and relative\cr \qquad c&character\cr \qquad f&floating point\cr call \opt{\tt /{\it f}\/} {\it expr}&like {\tt print} but does not display {\tt void}\cr x \opt{\tt/{\it Nuf}\/} {\it expr}&examine memory at address {\it expr}; optional format spec follows slash\cr \quad {\it N}&count of how many units to display\cr \quad {\it u}&unit size; one of\cr &{\tt\qquad b}\ individual bytes\cr &{\tt\qquad h}\ halfwords (two bytes)\cr &{\tt\qquad w}\ words (four bytes)\cr &{\tt\qquad g}\ giant words (eight bytes)\cr \quad {\it f}&printing format. Any {\tt print} format, or\cr &{\tt\qquad s}\ null-terminated string\cr &{\tt\qquad i}\ machine instructions\cr disassem \opt{\it addr}&display memory as machine instructions\cr \endsec \sec Automatic Display; display \opt{\tt/\it f\/} {\it expr}&show value of {\it expr} each time program stops \opt{according to format {\it f}\/}\cr display&display all enabled expressions on list\cr undisplay {\it n}&remove number(s) {\it n} from list of automatically displayed expressions\cr disable disp {\it n}&disable display for expression(s) number {\it n}\cr enable disp {\it n}&enable display for expression(s) number {\it n}\cr info display&numbered list of display expressions\cr \endsec \vfill\eject \sec Expressions; {\it expr}&an expression in C, C++, or Modula-2 (including function calls), or:\cr {\it addr\/}@{\it len}&an array of {\it len} elements beginning at {\it addr}\cr {\it file}::{\it nm}&a variable or function {\it nm} defined in {\it file}\cr $\tt\{${\it type}$\tt\}${\it addr}&read memory at {\it addr} as specified {\it type}\cr \$&most recent displayed value\cr \${\it n}&{\it n}th displayed value\cr \$\$&displayed value previous to \$\cr \$\${\it n}&{\it n}th displayed value back from \$\cr \$\_&last address examined with {\tt x}\cr \$\_\_&value at address \$\_\cr \${\it var}&convenience variable; assign any value\cr \cr show values \opt{{\it n}}&show last 10 values \opt{or surrounding \${\it n}}\cr show conv&display all convenience variables\cr \endsec \sec Symbol Table; info address {\it s}&show where symbol {\it s} is stored\cr info func \opt{\it regex}&show names, types of defined functions (all, or matching {\it regex})\cr info var \opt{\it regex}&show names, types of global variables (all, or matching {\it regex})\cr whatis \opt{\it expr}\par ptype \opt{\it expr}&show data type of {\it expr} \opt{or \tt \$} without evaluating; {\tt ptype} gives more detail\cr ptype {\it type}&describe type, struct, union, or enum\cr \endsec \sec GDB Scripts; source {\it script}&read, execute GDB commands from file {\it script}\cr \cr define {\it cmd}\par \qquad {\it command-list}&create new GDB command {\it cmd}; execute script defined by {\it command-list}\cr end&end of {\it command-list}\cr document {\it cmd}\par \qquad {\it help-text}&create online documentation for new GDB command {\it cmd}\cr end&end of {\it help-text}\cr \endsec \sec Signals; handle {\it signal} {\it act}&specify GDB actions for {\it signal}:\cr \quad print&announce signal\cr \quad noprint&be silent for signal\cr \quad stop&halt execution on signal\cr \quad nostop&do not halt execution\cr \quad pass&allow your program to handle signal\cr \quad nopass&do not allow your program to see signal\cr info signals&show table of signals, GDB action for each\cr \endsec \sec Debugging Targets; target {\it type} {\it param}&connect to target machine, process, or file\cr help target&display available targets\cr attach {\it param}&connect to another process\cr detach&release target from GDB control\cr \endsec \vfill\eject \sec Controlling GDB; set {\it param} {\it value}&set one of GDB's internal parameters\cr show {\it param}&display current setting of parameter\cr \xtra{\rm Parameters understood by {\tt set} and {\tt show}:} \quad complaint {\it limit}&number of messages on unusual symbols\cr \quad confirm {\it on/off}&enable or disable cautionary queries\cr \quad editing {\it on/off}&control {\tt readline} command-line editing\cr \quad height {\it lpp}&number of lines before pause in display\cr \quad language {\it lang}&Language for GDB expressions ({\tt auto}, {\tt c} or {\tt modula-2})\cr \quad listsize {\it n}&number of lines shown by {\tt list}\cr \quad prompt {\it str}&use {\it str} as GDB prompt\cr \quad radix {\it base}&octal, decimal, or hex number representation\cr \quad verbose {\it on/off}&control messages when loading symbols\cr \quad width {\it cpl}&number of characters before line folded\cr \quad write {\it on/off}&Allow or forbid patching binary, core files (when reopened with {\tt exec} or {\tt core}) \cr \quad history $\ldots$\par \quad h $\ldots$&groups with the following options:\cr \quad h exp {\it off/on}&disable/enable {\tt readline} history expansion\cr \quad h file {\it filename}&file for recording GDB command history\cr \quad h size {\it size}&number of commands kept in history list\cr \quad h save {\it off/on}&control use of external file for command history\cr \cr \quad print $\ldots$\par \quad p $\ldots$&groups with the following options:\cr \quad p address {\it on/off}&print memory addresses in stacks, values\cr \quad p array {\it off/on}&compact or attractive format for arrays\cr \quad p demangl {\it on/off}&source (demangled) or internal form for C++ symbols\cr \quad p asm-dem {\it on/off}&demangle C++ symbols in machine-instruction output\cr \quad p elements {\it limit}&number of array elements to display\cr \quad p object {\it on/off}&print C++ derived types for objects\cr \quad p pretty {\it off/on}&struct display: compact or indented\cr \quad p union {\it on/off}&display of union members\cr \quad p vtbl {\it off/on}&display of C++ virtual function tables\cr \cr show commands&show last 10 commands\cr show commands {\it n}&show 10 commands around number {\it n}\cr show commands +&show next 10 commands\cr \endsec \sec Working Files; file \opt{\it file}&use {\it file} for both symbols and executable; with no arg, discard both\cr core \opt{\it file}&read {\it file} as coredump; or discard\cr exec \opt{\it file}&use {\it file} as executable only; or discard\cr symbol \opt{\it file}&use symbol table from {\it file}; or discard\cr load {\it file}&dynamically link {\it file\/} and add its symbols\cr add-sym {\it file} {\it addr}&read additional symbols from {\it file}, dynamically loaded at {\it addr}\cr info files&display working files and targets in use\cr path {\it dirs}&add {\it dirs} to front of path searched for executable and symbol files\cr show path&display executable and symbol file path\cr info share&list names of shared libraries currently loaded\cr \endsec \vfill\eject \sec Source Files; dir {\it names}&add directory {\it names} to front of source path\cr dir&clear source path\cr show dir&show current source path\cr \cr list&show next ten lines of source\cr list -&show previous ten lines\cr list {\it lines}&display source surrounding {\it lines}, specified as:\cr \quad{\opt{\it file\tt:}\it num}&line number \opt{in named file}\cr \quad{\opt{\it file\tt:}\it function}&beginning of function \opt{in named file}\cr \quad{\tt +\it off}&{\it off} lines after last printed\cr \quad{\tt -\it off}&{\it off} lines previous to last printed\cr \quad{\tt*\it address}&line containing {\it address}\cr list {\it f},{\it l}&from line {\it f} to line {\it l}\cr info line {\it num}&show starting, ending addresses of compiled code for source line {\it num}\cr info source&show name of current source file\cr info sources&list all source files in use\cr forw {\it regex}&search following source lines for {\it regex}\cr rev {\it regex}&search preceding source lines for {\it regex}\cr \endsec \sec GDB under GNU Emacs; M-x gdb&run GDB under Emacs\cr \ctl{h} m&describe GDB mode\cr M-s&step one line ({\tt step})\cr M-n&next line ({\tt next})\cr M-i&step one instruction ({\tt stepi})\cr \ctl{c} \ctl{f}&finish current stack frame ({\tt finish})\cr M-c&continue ({\tt cont})\cr M-u&up {\it arg} frames ({\tt up})\cr M-d&down {\it arg} frames ({\tt down})\cr \ctl{x} \&© number from point, insert at end\cr \ctl{x} SPC&(in source file) set break at point\cr \endsec \sec GDB License; show copying&Display GNU General Public License\cr show warranty&There is NO WARRANTY for GDB. Display full no-warranty statement.\cr \endsec \vfill {\smrm\parskip=6pt Copyright \copyright 1991-2013 Free Software Foundation, Inc. Author: Roland H. Pesch The author assumes no responsibility for any errors on this card. This card may be freely distributed under the terms of the GNU General Public License. Please contribute to development of this card by annotating it. Improvements can be sent to bug-gdb@gnu.org. GDB itself is free software; you are welcome to distribute copies of it under the terms of the GNU General Public License. There is absolutely no warranty for GDB. } \end gdb-doc-7.6.2/gdb/doc/stack_frame.png0000644000175000017500000020331112250770607016357 0ustar zumbizumbi‰PNG  IHDR„bŸ$ sBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î< IDATxœìÝy¼½SÝÿñ×›Ì_óLI¦”™(Q( ê.¤H†›D%JºS? TwEã-i¢4*%RJeú*e("2‡Ìó<óõþý±Öv¶cŸiŸ}öð=ïçã±×Þ×µöºÖ>çì³÷çZk}–l1^’Ö°}a¯ÛÑoòþˆˆˆA£„1’fØÞ¼·-‰è?yDDÄ ™£× ˆˆˆˆˆˆˆÞH@1M% Œˆˆˆˆˆ˜¦FDDDDDLS #"""""¦©„ÓTˆˆˆˆˆˆi*aDDDDDÄ4•€0¢K$í'i‘^·#"f?ùÿíJ@Ñõ‹ÚÁÀ~=nJDÌfòÿ%""&#aDwì, ä*~DtZþ¿DDDÛFL±ú­qå~ar?":$ÿ_""b²FL½ÆÕû§ç*~DtHþ¿DDĤ$ Œ˜b¶¶-àLàLۋؾ·×튈Ágû`àõánùÿ•€0"""""bšJ@1M% Œˆˆˆˆˆ˜¦FDDDDDLS #""›êÖ=mEDD ¤„ÓTˆˆˆˆˆˆi*aDDDDDÄ4•€0"""""bšJ@1Ø’T&""Ú–€0"""""bšW@(étIçíª©ntDDDDDDLÞsÆSÈö«$½¸¼îÚx¨ÞŸXXØXEÒKmŸÛéÆFDDDDDDçŒ+ °}…¤Àßlß?¼Œ¤oç; #"""""úØDç>5ÚAÛw¶—4gÛ­ŠˆˆˆñJR™ˆˆhÛ¸{G#éëÀ1¶ÿjûIÿ²=«[ظØöq’V¶޶}]S=+/Öæ.β}M‹sμx½í÷H𨨠x8Þö…µì à À†À]Àom_<ÂkQ­c‹ÚÆË€Óm_6™ŸQDDDDDD¿éT–Ñ%l_)i†¤7ŸÖ—´'p5pXÝwxã9’ÞG™£¸+p0/pp‰¤·5ŸLÒ”Àîà¿%m\ü€Pîœ/igI¯.þx p ðwIÛ ’æN~,ܼ¸HÒ~“ú EDDDDDô™v{ç•4 x°°X‹2Û/Žv.ÖÞ ü@Ò¦Àדl¿©Q¤%)åO$`ûÉzèàÀQµ¾“ÿ±ýÃú¼•€+#»wÙ>¹k$ÇÙøUÓ¹æ~lllûïõС’Ž¾*éÛç´ó‹ˆˆˆˆˆè7í„·UÀöSÀå’æ«».þËöõñMÅ_FæùµauÜ!éw”!¦+WÔý77Ö$76±}UÓó®‘t=ð`]Ûw4»BÒ”a©Í¶vNî”´bÓ±“w¶ëµGDDDDD ‚vÂ¥êvàq<çò¦`p¸ï²}^óÎÚCؘ$¿$5 láöûî‡T¶8ö0°ð°}[×í&@«^ÀÛhÝÑKI*mk7 |Ôö#Àu”!•ûN¦¶ï—t‘¤m)‰bVVîæŸLݰ|Ýîhû]:gDDDDDDÏt*©Ì)‰`ÚR¿ÜBIür%+ésm¯ü¶ ‡Çêv•./"""""¢§:²ì„íw¶ûÜ:ÇðDàAà%# ñì†Ë)E×ëÑù#"""""ºj¢=„Åæ'ò¼¹ÆxÎÀ àªáÁ ¤u(ËH4×Óª=­<§ÖÑê¼s14ç¢áÀSÀ¶ÃÊ<ÝIŸå|eܤUêÃu&pŽ—ÕíZu¿á® ¬)ørIûHZAÒæ’¾ ü†²TÀÚÃÚ³8CÃ;×vlàùõájÃŽ­, ,PïPªÿ%q̯$­¯b†¤w§gMàuGDDtC’ÊDDDÛÆJúÏÌð9SÒÕcp'pð^Ê’I6³ ÙýsAQÒ²¶oiqlÊPÏ=Å–$`%ÊR7Öu#&EÒLÛ›÷¶%#isÛ3›Ï„Á{ÝЋ÷GÁs%°“ícºuÞˆˆ˜=t*ËhGؾ¥U0XÝjû†©ë¹lûß¶ÏI0Á’fJÚ¼× ‰ˆˆˆˆÎêH–ш|µg|1ÊÛæÀf”ÀðL`Ê¡1àFLc’^lSoës÷¶Eц$•‰ˆˆ¶% Œ˜Fj/àK)àÖÀêÀ,à/À盀ۀ[ëö6ààLà`Û3s¤""""bð% Œ˜$-lOú0p p(p’í;GyîÍIe"""$©y¦IsØ~ª×íˆé§¯’ÊtB]7pgI¿“´z¯ÛÑK’æ‘ôà*à=À)½ƒKØÞÆö÷G  FÄìBÒ\’¾%é§’ëu{Z‘´¨¤wKú’¤C$íÖë6 'é0à»’&õ=RÒ§%(i¥5m`IZ8EÒ¾½nKL?Ï‘ô00_Ó¾«5m?ÖØ!ioàëøD}x ðÁvê©uÍìl|ÐöÝíÖÕC/6^U{_¿ÖëÅô1‡íùíê㻀U€6²ý JöÁËj™åû-¬~,|£× ‰èI/‘ôgàÀ=Àf¶ßš`0b¶•¤2ãwpp 0s’um@ù¾±ÝX'àpJ0x2°.ðb`—ÖßÊÇ)S ^8VAI;P‚Áë€×Øn+¬n¦å÷¿›D=P¦B ìÊ€&G³} ð_À£ÀW$½¤ÇMŠi¤Ñ“ö·ºý%ÁÄG%­Ü\Ðö½”7î?GZ+°×lϲý(å5DL;’ÎVÞ lhûO½mUDD°}§íÕ)¶ÿ5VyIKÖÞ§)W‡_®_hû"Û—Ù>¥EÙù%-+i\¹ $Í7v©1ëXøV}¸§í['SŸí'l¿X´ÕklqþEë°Ê¾#iIKKšs2õØ>‹’àmNàèñþ~#&«6¨P®vÍK¹J5Ü£õ}DÒœ’Ž $‰ù)°ší£39="$í.éÞÆ ¸GÒ[”»PÒÝ’Ö•t!p;ð`&Ù(óíZǯꮚ떴g›Í\ˆ¡)<-×z•t¤›‡(=lI:«5^v I'KºxXÒ’ΨÇiúYlUŸ²Ókh5är7Ê:´'Ú>µÍ׈¤ÍZü.öiQîøZf3I§w÷Kú…¤yk™Ö:þÙôÔ+šêÿ|»íã54~~§Kz3p=%;÷}’Þ5ÉênÖ^?ɺ"Æ¥Õ•‡o¶’ôÛÇôdIkPÆãÏOù'visyIËSº¿ç¯·{êðÓæ:öîµ}¤¤e€- k6Æ‚×^Ë×/¢¼ùeû®Ñ^`½*ö&ÊkNÊ0Œ³m·ìE”´ °-°"p#pžíÓZ”[ Ø›òñÏ’^DIÖa਱uDtФù)Aà›)s?šÌoÏppa½ÿr`®zn!`Qàt`AÊT™ï—tší_S¾ü_XË­ <ÕT7À„>ÿ%½¿©M ‡Kz¨Þ?Óö7ëý-'R†Z¾Øø•¤•m?Yë|p*eøäƒ”¡²K«Özf5µyM`qÊ\Åkë¾VßY·GOäõµð`Ó¹×£üÌçmQneøì ”@ô` à­ÀÙÀW(AØ…õù/­Ïûðx½Ó$Û:’9jÛ6¤ÌÑ„ò³{ð I§Ú¾®Šm?&éà#”áÂ'u¤Å£©ß—£2ÕÇ隷°Ý(÷5àwM7¾LIDcàèÆ±z|5àKÀ¹õø?†ŸIyÓø% âÀÅ”ao³(ÿ žü?ÊcWË5×ÙÔN×¶ýø;e>Õ%uÿÙÀü-ž·/åŸàÉ”y”ߎmü(cì/¯ç7ð.à3õy®·¯¯;·ÜêßûÌ×¹$pNý{ÜgP_Gn¹Í.·^¼?(ë‰ءׯn” ÂÀ6-Ž]SÝ ¬\÷ý¶îû°²[ÖýN²=?kúþÐêöý¦² {îBÀµÜêußœÀ•ußo€Í+-ÎÿëZös£´qáZf0wgÕzÿ§Å±?Öc×}‡Õ}Ç+»bÓÏk™.ü -Öt¾sêïaŽúwc`ûIÖ¿q­ç?SýZrËÍvëe'lCÉrõ<à Vej¹³lxïǯ´ý?”^ÂVö^WïoìYßôkÙÞ8XŠr…nKà…¶×©Ç>II€³õHí£\Õ{£í—Ø~›í5C€—ÇJjLÄGÒ;)ÿh>n{+Û‡Ø~7%ƒØöµ-PÌm€ýëãO++Q®tŒ™¥+b²joöÙÀ:ÀÛl½ÇMŠˆÞh|–gˆxç|Ðö¿ëýÆpÄE¦è\»PFY-Ó´oõºo>Êw#l? i I[Kze¤ÒõpcUê |¿í›žy›ml䕸Åö㣖ì¼ÏÙ>»ÞŸêßE;v²}¿ËƼÔɶ¯‘n¹É.í1£MVÝ›òÆÛOÒ<úä뱆G´t^ã2="¦§Ægù“£–Љx éþ”Á·ýðDc^\õXý¾ñ ’>F™ÚÓjˆeCc æY”l Ðø®öШ¥¦F×~mšŠö5æp>‡2ì7ù;bJxÕ¡^Eú2eL{ÛëôLÀ=ÂAz“Ýåg'Çx¤n'”^¸þã=¹>lŒ7-å*ܼÀŸ(hãöWʰч€¥[T9<àŒ˜RõjáO€å­ FL{̆ɰ=“´ ð¿”ïn;PzåÙ hÙ?ç¤ ¥ì„Æ\¼çv¨¾ݲu{G« 6V7ôg(C$7“4ÕëàtÓuu»nÝ6þÁe{™Qn7t¿©Ïò)JV¸}mŸ×ëÆDDÏ% ì{êvºÈúTk|g¹ÕöÏmß¼„²þr³Kºhþ•æ%'$-Ñ¢ÞÆëxñ(美ò÷5¿¤1×+ì{šîö:EcôÛµ£–ŠèQ×7±ý°¤PR+‘2Áwv°BÝÞV·Õí*=hKĸIÚš²^èQ¶ìaSfHšÙÃóGô«”,ŠÝ”€p ’>ÊP@µpÝ~HÒÛ)½0û¶QíåÀý”„"”tR­ûw%Cû$\Q·+Húåïl{†]Ü·}¿¤ƒ)Ël\/é_À”¼ K «÷<Ê‚îo¬õ^IYºh›¦:”ôGÊÅȃÛ}’vg(D#¸Ü©i!öw´6*Û÷Iº’’Ìð‡’Ž§|Çý—ínŒrë´wÔí¯F-Ñ!cNTµ}"%åíÒ”-‹ÕíhcÚ{a¤L ¿6æE^6l IËIÚCÒO$Ý,ÉÃn½NÝü 1K@ÒjÀ)YsŸµfSDL[‹» G¶9e˜å }WÙ´>~S;Ú~ˆ’iüNJ ²?°%ðê8—µÿËOl ¼…2µçØÅ¿XÛvCmÏf”D{ÿhQöHà甿£­3°5û^ݾGÒd’¦lÀÐï¢ñ³Z·i_»ITÞEéÉ\ž’5þ½ u I/¶£Ì žìãÒø™¿nGz¾x5C ¦×[¾Æð’fPƼÃÐUÌf­ö o_«v5Öëí ö† %¦i´g `#Ê:>¨»Ï¤dtZIÒÛmÿlØs¦ Ÿý¤íÆXýÑÚ]Vƒ¥?óì+ŸÍåX7Ìb‚s^êûèÊkØÎv¯_˃¶7ïq"úNzΟ£I*3ÛãZàÛöJ-ö8Bù_Ô^µå(¡ou];¹6ÞË mï-éÿQæ˜]oûázh§aå |ø®¤)Ho·ýÃÔ¬¡;HÚ«ÖûeÙ±á~Iùœ}ð9JòÁ ³½㸨iûµ-ö}¡Àtø±?×ìÛËP®ÝY‡Õv\ý?ëwÕªÍm8œrÑâPÛ·ŽU8¢ÁÌuûòV…l_ |v¤JlßAYkp-IŸ—´‚¤µëb«SzïžßâªR#±Ë*õKo³—ÕíJ’†oݨnWkq JF¦]$½_ÒBõöVÊz„¢Ì¿z¬¶ÿ)ÊòQþyn#i^IsJÚ”2œâá¦`Ê1ë6/_=s8%<—òAóbÛvÛ®·MäIƦ=ŠOR2ǽ=sY#b˜ í!ÛOØþíKÛ 'x¾ûl_Þ ŽUþÚ¾gƒ#ÔûoøqSz@Þ+©a¶SÊö,Û7Ùþ×TƒSIÒç7R>÷#ºB”ñï 6í{XÑö3–Š47%¸û·í7<«"iUÊâªa—OR¾œÐöß$ÝFùÂþeþÓ»%ý›²~_ÃÀ‡m&é ÷‡à½Ïö÷$ÝÎP äF›ÿÇö·j[¾FÇ¿?ð†²ˆÎIƒ¿‡í¿´x kQ†clB™ýDÝ~¢1_KÒº”L¤Í?³€mÿvxÑ’¢ôt/mûö^·§•:duiÛNðy«P†7ÿØöSÒ¸‰µg&@z#ž­ïI[§›¶úl‹è$I¯¢,xÿ(°ò°‹åÑ&IQ¾7ÿØ"£›T.øt¨²ÒS¶"% ò¥Í©rë¾G(è0<Év=‡2œõ–ñ ’–žOIå|m«+eÑ_$ÀvßöÖJ:xží ÍU­ÏÛXµ®x& ?IËQ†Üß|Óvzpfs= _üØØö9Ý:oL_uú̓¶ÿÖë¶ÌNjFÿ™ £ÛÚ¾ÖRNp--ÒäÚ¾²“皈º¾áE(CH#:eÂCFë•ÿ7é‡`0&ì(JV>(ìZÎ}éG’V¥Î‹®«I4¢ÿdaúè*ÛgŒ]*&Êöz݆˜ž:FĨf1z¥g4'ðUÊð‘ÿ›ªFÅ”Zd„û}«Ž¨ø%kb³'$ýø¨í»ºß²EæN@]—ï”é!ËOtÔFDÄì&aD÷L( ÞMYœv›š.Ï€ÏS21÷rÝȉCÁ )½NsÕÛ»€U%máNÎ7ˆÉJ@81¿¢äx”²,CDÄ´–%"ºgÜCF%-|8µ®Èößloiû¿m?ÐëöŒÓSÀ^” pÊBë¯`hy¡Í(o£$ §š<îµÀ-ÀJ¶‡÷„GDL; #ºg"=„ï>:u͉© iI·¶¸=+;s?ªiÛ´}UM§ÿ¸í³xæüÇÅzÕ¾h)sǯžfû–ž¶$"¢OdÈhD÷Œ+ ¬Ùzßœmûü)oUtÚüÀÒ-öÏÛ‰Ê%ÍÅØGOÖdZ´bÝÞOIý#=„ã×X2* ’""ªôFtÏ,ÆwæõÀ*ÀáSÛœ˜"ß^PoûLAýÇQ–ðíöéÉžDÒZ’¶´½¤£](=PŸœ‚`3&'áøÍU·õ´}$=„Ýó$ã2º/%ÍÿqSÛœ˜ u®à’Æ\÷´ æú héŒi$á8Ô º¯«{¶VDD¿I@Ñ=c•´ ¥‡ð3¶ŸèJ«bмƒ¡^Ž‘<Úó\LYƒpJoçBÀû·Hzƒí‹;pŽèŒÆgyÂH:Ø’(éWÀ{Ú ˆˆ>’€0¢{éûGó¾ZîÛSßœDÝZÞöÓ $ÍMYå0à¹Àw€»ÑŽ—Æ…¦ åÙ½”%Uæ ÌƒUo›Ñ?2‡0¢{î¬IAžEÒÀîÀñ¶oîjËb`Hú¢¤sƸ½§“笙FIŽ6ªAbô‡ ƒíOK§»[ö¶Eý#=„Ýsåªô”5°†{3°0I&£[ xéeNïôIëü«FöÔÛl?ÞésDÛŽƒí‡%DY‡pcàø7)"¢/$ Œèž;êvIZ„Û×ÚþK÷šV{Σ/š{Ñæ’ÔXzâ Ûí~yÿðÍ1Êü»Íº‘´,%5ÿÍ”Œ¥óQ²Þ<¯;¥ÝúcJ$ ¿êvÁQKEDL# #º§‘qr©áj °enV ¶³õ[ìÿYÓýŸk§rÛ´ó¼ ø/Fÿ;¼Œ’\&úG¦?÷ºý&s#º§¹‡p¸×3(Ùï"úÍSÀÕÀþÀKmß×ãöÄ3¥‡pü£3–µTDÄ4’ˆî- ܶÏpÑg{ƒ^·a’¾ œLYnbàNàæ,ƒÒ׎߅”Eéß(i7à<Û—ö¶I½•€0¢{î¦|a{ÆQIsRÊüÊöS½hXDCý¼±Þb0$ 'Û·K:ˆ2dûèº;KPDÄ´–€0¢Kl[Ò<»‡ð•ÀâÀ ÝoUDÌžCù“ùqã`ûPI¿¥d]¶×퉈资ÝuÏN*³-ð pj÷›³9IB™ ±} pI¯Û1IsdÔHçåçñlI*Ñ]wðìÂ×§Ø~¬퉈Á79ž= i)IÇJúzþ?ZÙ$½SÒ¡’¾ é}£”ݸPÒs;ÞèiLÒþÀï%Í×ázWô5I§KÊZÂ1pÒCÑ]wë6HZ’²Ðø·zÖ¢ˆt3€‡z݈ijG`ûzÿÀ™­ IZ‰²$MóG´(û*à7”¹«Ðæ|^IkoÖ®~mûüvêšÔ€}kÊ4ßJÚªb%-\DIÄupÕdëŒè¶„Ý5|Èè¦u{VÚ³‡Zp=ºëLà6J6ÞŽRîK”ÿýö£ü¾V^HÒRÀ1” ¿ÛÙžÙN£$í Uëi8PÒ¾¶§åHÛ³$½ 8Øø4ð‘T½%<x[22Ç ÊшîºXDÒ\õñ¦ÀÃÀ?zפˆp3H@ض/–µ½¦í{F)ºaÝ~Úößm_aûäå¾AY#ñ{¶ÛJ4&é” ªsû/¾Léø?I˵So¯IZTÒ“©ÃöýÀ®”!Ö’ô’4mµº=6Á` ª„ÝÕX‹p‰ºÝ8×vBDD»ÒCØeuདྷîî©÷_0ÊS–®Û{G©óù”$cL¢y¦?°}„í+ë¾ó)=†#Î]ì'’ޝ?×Í$FYºé~I¿4o»õÚþešÆœ”ÞÚÉZ°n3l;V†ŒFtW# \JÒ}ÀúÀç{Øžv-\u¾ÚöY’fo­Ç޳ý ¤M)ó_R&e¦S™…ûè®)_–£{n¢,r?ðòºïIe$ý7°Õ°cÿ+©ñ»ú‡íC›ž²åBý¯mOæ÷Ù˜ŠpBmÇܔϙõëþµ'R™¤ €µF)ò£:s`ÕÊ×îgÀ,Ê\ºÝG(óend;æ6±}¶¤Ã€÷S‚Þ¶BÛJºXìžÝN=51ÜFõa’ÉÄÀRÖ±Ù$ØV¯Û2šúá|åCsà“À¢¶f¸—¤™¶7ïmK"úO/Þ’nþh{n3Ša᪶¯n:ö†.¼ßOéIzð÷ºoVóœ3IWRzØ^a»­ …õœS2”Dzº%›éï)ÙK¯·ýü Ôùb†æÉµòkÛOIZ©Þ'lO(ЕôGJýqÛŸ­ûö $Ë9Ãö«&R_‹úÏ6¶·ý‹6ž)eÔÀCÀWmz2í‰è¥ôFt׿)ÃJÖ¬·R0})IeúPþ$€ôôµÊÇm?:ÂSkÔ¶=Íö“’n§ÌYü%û鎶#i§Zìú Öy)pé8Êýƒ©IÖü·ÝÉ^ŒÆ°ÜvÕÜÍÐPàÌŒ–¤2]d{p%\›²vQDÄd,LfTô‡›êv²‹Ñ7¾ó€ulÿ¦>n m¼f"•Iú˜¤[G¹ÍSË}u”2ý8œrÙºP€Ü`{Sày”ΕCê¼âˆ”ˆî»x5åÃè’·%º ¦y_X†’eðrÛúRÖm’^ÜcûÖ^·%F&i>J/Ezß¿)ISÖ§ ílׯ)Ë\,A™7ˆ¤ç;×ãß›`}÷×r¼Ñkwç(åúª­­}a}xm»õؾYÒYÀë)?ó3:мˆ®K@Ñ}3ôÁœ€p6&iaàk”ßwóˆŒ;(‹T÷³“€•$=\  |×öã½mV ÓHyŸ€°‹$AI 6wÓîÿ“ô pí/´Qí/7;R†{¶ëk”Ä++—Iú3å"äbÀɶϜHe¶¿AYq¬rŸ>;ñæöÄë)?Ún; ¬ï½G-9^ IDATÑÇ2d4¢ûšƒÀ‹{ÖŠè†#(‹ ÏÜ@IêpÝ_–`2Ö£|!¼BÒózÜžx¦„½±5%ƒè¶MûÞX÷½²Í:II>óBIÛ´Û°ºøúKs(ÉËv¦ü|h»ÞÙÌÿÔ푨+Ùcे0¢ûáöoîiKbÊÔìƒ$§[ XïÚN”¹L/Þ,GIg‚¤—Õ„Ñ{yK™CØE¶'4ÏÏöÜã(ó¤‡S–´8µÝõñj¯×Æu^Û’Àu°´ò¶_Ûbß÷˜ø×g´3°p9ðÝÉÔUÝR·Kw ®ˆžHaD—Ù¾ž²fÓ½½nKL©5šîÀ‚AlŸcû8ÛŸ¡¼–+ê¡ JN½—ÂÙËÀŸ(={'6¶´Ëöƒ¶¯´`pªHÚøð°³íG:Pí¹u{€¤-ë|͈’€0"bj4ϼ«g­èÛ÷R·nX¿Wm‰gI@8©Û¶”å^Eš iNàhÊB÷;Û>¿CU œFY“ðà;ª7¢k2d4¢Ëê¬9Å%='Cïf’ÖÖª_Ötè•’jz|µí¿ÓIs1´öÕHžœ‚¿«•šî_×ả} g3¶ï–´%°íŸ÷º=³ Û³$½x‘í:XïSÀ–õw¶%ÛjÄ@I@Ñ}T×óP†Þýµ‡m‰Îz ðéû?2ìñ‘@[!p%áh>ØfýO“´%‹â†À.u÷ÀÌÉÖÓ3‡p6bûn:“ð$šØ¾œ2wp*ê>8u*ꎘj #ºo¹º} Ø‚„³“+€ëýå(”l·5•ûG75 _š{6ovl7ÑEL‰FR™ôFDD[Ft_# ¼˜ʺM1†:¼ëç’ÞÖ¸|Æöï:tšwsQæÑë~J@x!ðUàDÛƒ´dÆt!£Ñ’¤µ)óï¶}x¯ÛÓ.Ió{+§Øþm›1ÛI@Ñ}ËR†w¼WÒ܃–2zÇöC]<Ýýuû{Û?ìâycüÍ\äháýÀtfi…®«I`v¢,ð0€0¢ÃFtßr”¡wgûS’ü©§-Š!é‹À+Æ(ö}ÛßêÀ鎥$“9»uÅÔXˆôÎv$- ¾»>nÜfÕýóÔs6Aù^¸p½Í1lßêÀ/(½"çÖ}ß‘´l-7_Ý÷ `'J’­'€—S2OÔ¡¶_oûâq–ßXœ²à[Ú8_OHZHÒ'{ÝŽà•À2”ÏÐ/7ÿ$ðzʰå=¥%€7P.ð´„}DÒ+%mÒëv 'iYI×®òVÇW–4<­~Œ¬ÑCp:ð2I‹ô°=1@l_`û÷cÜ®êÀ©^ <¿ÞßVÒ‚£Žžy g's/·ý*J–_(Ã&‘´°eå¶÷£ôh\JYÎè-¶_m{s†æÚýÖöæM·vCÍ \@ù¢¼1åbÑ<<{û"”…ß_ ¼¯îÛt¢'kc^ìIÀ“”žÉ?Nô|Ý&iIï¡üþöëu{‚lßfû÷ ]Àx%@íß§îû€í£lßnû.Û'ÛøQ4™CØ'$}˜2< I{Ûþf›<ý&82Lm.àcÃŽ/I¹’ù û­u¨Î< „?Þ Õ«vE´p&eXØ2”Ì~™§ÖgêPÂ%I@8;ù¼íÆ¥'R¾§]SoBYô&`§¦k´OÔí]hß.¶t(¥7î?ÃÊkû'õþ?ëvÊ/zÚþuâ÷X—“oMX½øåñB”ßiôÆÜÁÆE‰ (ï½'Ÿ´|Æ€K@Ø?^:ì~ÏÂ:!¼ ÞM‹7í;$ý‘2¤åÃ’µ¡#k,9q3€íó%]A™ë‘€p6bû MT8¶o“´%Õû?Ç*=±<åo,áìãé5>mÿ’Ü¢a¥º]žÖC0çn±¯ÓšÛ7ÒgVóÅ£®&x±}÷Ø¥z§Åÿ°exkÃ2’®ëI£¦·Û>g¬Bu®à{ëÃóêvÕº½¹qAdvÓ7¡¤W³lŸY¯¬d{̹+55ñ·)Wª´=ˆ }“2,dð·¥á«”`ð1à ¶/¡Ü^À¢”á*“t²í®e%¬ÏEc®Å-Mû~ |ZÒ ¶¯ïA›"Zª½‚öº1¢F*þüߘîªÛÓ)sô†{°Å¾‰š·uôŒ¤u€Ûmß2fáÞ¸ø°6¥g·±¦ìc”$:1uÆÊv{”¤Ç)se¥ü®>\-T·³mÛ¾ )“£Ï¬÷ Ì_O2ƒÃšt½øhû•íÓ™¿ºBºIo dZø¬ísG*kû)I{RÆZ/|OÒºÃÓõN¡Íëöê.o2žÑCXCÉä¸íM¼ˆééyu›ÂéᒺݘÏöµc”¿§n_<ÂñÆ:£/4ðƒIµ°‡$½ƒ2’éaI›×Ö¾R—ĸޤc(Ó„¶–î±½[/Ûl@ ø®N>f»‘Á¹1l{¹Ùuíè~êYY ¸r”Ç-IÚx3Ȫ7¬Þ/Iú™¤$ýDÒ’¨Ç>!é"IÖ®åÆs“´·¤_H:OÒu’þ.éXI[¶8Ǻõ?“ô3J`pŒ¤7Ц½jÙ}%Ít¨¤K$]*é»u>_§4æ ^AÉh6ª:L£1pu`Ƕe,;×í»xÎv=+ ´} ðW†^GDÄx¬@ùsc¯SÏöY”µùfÿôIŸ“tdýŽ²Ì°§4†»½LÒïëw†ãš’˜]@IP³œ¤ó(_z_MÉ¢Øs’¾(éVI·R’缿±¯°ÍV®Ûù÷t­¡m°ý í½)Éyþ$iWï½’r¡eEÛ{4ƒP2nCéÑÝåÙO|}ÑC(i>ÊЗæÌx«Çñ¼m)i`7§ó)†ß¼ˆÒãõêºo½ú÷ƒõñÚ”´³¨_ 1¬žçS®:l/飶›ƒ«å€ZœûZ¯ûµQ-¿ %åíZMÇ^¼TÒ:¶gµxî¸IZ“’&àˆ \ ù!%x\’’þùû“iÇxHÚŒ¡¡3ƒ. Ü×b±áŸGHZßö=hWD ž5k»8#zoGÊÒ»Q¾4ÜÌPr™†ã€#)#¨^WoOR¦y`ûIŸ6¤ô(îì¬?e¯`ü¦|Çj¶@½Á³çhFù¹¬ÔâX_ª„7ëÇ óÓÐ#ý/µ}®¤3)k~­^Œøåý´)ð”íãº×ÔÎë—•)oÞ«àéÌi+ðÌñ$mDÚ°£í©œãòjàZõƒÀ±ÔŒ ”¬_ R‚’€u(ßV ÍïøL ~.v¯·ƒ'ЦÍ(Áàùµm׿e”Éj\ýxøÙxŸTÑF¿yÓÚDSBÒ«)Ýús_±ýï©<_‡4/9Ñìç”óôFÄx­GæxÎêr²ýc”»×ö{(½`+S†ƒ.i{yÛw +kÛ{Q2|®Ny5£9ñJ½H½P=¾œíŸØÞ ¶åöZæÖúXÃzM†·mÿZf¯¦}çÕ}KMðG‚í½šÎÛêöø°ò÷¤!}7\t4¶ÿÒë6Ęö¡dƒŸ’÷ã?õñ±”›ÖÓBIgPz¶™±þUÓ(ÏQoÇJzØÞöŸšž·"ðkàöOžâfþÅö—%-Eé|˜²®Î”!’ëHRýÇ{*pê°çß"é0Êâ–sQ^ï¶o¢ö¢IZŸ‰…§R½~>pUãqC½ ôKJ¦­v«™c<~ZêúÊÐùF*×!S¹Htc¨çX)z[¹½é~Ç2¾Ö¡¶ß Ì€²`ïl_·ß-ËȽ¦'P‚ûOHúyÍFÑÊzu›€0¦µú%½×­_Þ@/`¨'Ê0˜VÃ>BÉÄ´0OS/ ½–¹%Í `ûÑÎ7uTßÞQïŸNYBã~ÊØânfÝœ¬»(¹'<æŸÒs×БᢒV§ô˜­M „ßeû稻›$Í ÌÃv]¾ã³”+ÛÑßC®½µWÛ>KÒ JÏ&Àq¶”´)emДI™éTfaÊ0¢©¶>p·í,9“Ò³€PÒ6À~õáZÀB’^×ôøI3óm¨î_Š¡LX#yúK´ÊBß]ù°”´ CCÏ´ýê¦cïd°Â(ÕŸ7VÁš‡‰ZïÝTkdF-¥÷Oƒ(½„¿L/aDŒàµÀY½nÄt%é¥À×)ŸsÇ Ñ1HÔ«ï›’6ÞH™c·/ð5†½(Ë.\\cû‡õ9k1´ÎÌp;ÛŸc(»Ôl?Òfû.¥$hùí¯Húðÿ€Sl¿VÒk?ÔâsR‚§ëêã™1É’Ö¡Ìyl¬?·…í™-η>%k(ÀGl¡E™£(飿²ýdÝÿ\†&þ¬í·óš›ÎóU†‚õ•]Ò"÷¹_>D™s¹Ts6³I¶ià‡ŒJZž2Çr/ÛGŽRnwJoó[lŸ0R¹^©j°½yo[Ѻñþ´ðw`wÛߟªóÄÈ$mLY;øù”<¶ý¥Þ¶*"¢==ë!´ý7ào’¶ $ù¨íG$-@Y[ð+¶Ïöœ‹‹[ÕW*€sl·ZÃoª]ÜJY#psI¢ ½ÜŠ0>‹¤ÿ ÖÏßtè}’ë*þÆög§¦É#:†¡€ð”Ä-cRÃÛè%ý]§‚A€Øï^×ù °5ðšú3üÒ€L oüŽÇZô÷GÀ'( #¢ç¶¥\tëÅg]¶Ï^P¿ÃœNY»/aD ¤~X‡ð…ÀM=y«Ò´&á ¨CûÞÍЗýWÛP‚Â7ð´Õ€—Ö[ó"ó+4í©GtÊÔ`½‘¹toIãÍŒºCCF§$l½¾:e!÷ù)=ÂÇKꇿ屌+ ¬=¿‡ëJéo'"¦¯m?{غsÑ}¶Ï \ ^vŸ•}¥’ʼg/¤L”ïXïR›þ›2çëêúøHà@£]¶€§×Âö¯k”WSæ;^ œ\{>im›3ÂL9šæÄ,_¤,|CË`ÜÑh ›·÷qÊ|ÌeO­pCÙXP÷|`ÊÖ‡tY,wgIG¿ ,ÕðEÊPÕ~6ÞB(KP|œÒKøë©jPD –úóbà;½nK<í¡º]ˆ’H."b ôk@ØóÞÁÚKÖüøZàÚ¦Ç÷P³þ¼¨‹ÍÛߪì¥À¥hӴȾjû±Vm™ Û¿”t%‹Þ¾’~oû­ÊÖ¡¢_§¬»ø(°k7Ö´}Z]²äÀþ’¾aûßS}ÞIh„Z °ý¸¤C€#$m?ˆYU#bJ|xŒþÎB<Ý42G/B{ë÷FDôT? ³ûex\ÃO)‹ÒOÔ÷(½díD£€÷QåÌI–ù²Ê}صÞÿp t»Âö™”á£;wë¼mšH!”€¿_—´ÄÔ4)"…¤»ß´}S¯ÛOkd{Ý¥±ìUDÄ éy@hû|Û×5=¾Êö%mÔsí™™SÑ9uhæfÀ5”`f‹áe$-ÉÐ’³ýõîµðia´³U@XçîNY×숩jTD ŒOQþt;ÑXŒîkÀo)Òï”´Ãå#"úJÏÂèo¶¯§…²ýùÇï¨Ç÷±ý¹n·¯šY·«ôèüã5žuŸ¡^ù°½¤í¦¤UÑ÷êðøí/Û¾³×í‰gXX0e[Ë]EDôJÏÖ!Œè$I°­^·e$’ö–œÈ:IÏΦdŸ}q¯{Á³aÄȦâý!iàTà`sÛcÎCŽî‘te]åwØþi¯Û1Qé!Œèž‰Î!ž1ttJòžˆ˜&$­MÉ4|ð†ƒ}i¥ºýKO[Ѧ„Ý3?eHÑ„‡5 }{:³1IsK:˜²ÄÑ£Àkëýè?s×í”g׎ˆ˜ #ºg~à·?Nû ”¬£ß”´X皃JÒ’þ«Þòÿ|6 iiI{Q2o¯Óœ|-úVæàDÄ@ê‡u#¦‹ù™àpÑf¶Ÿ”´;p>ðCI[ÛžÕ±ÖÅ@©àÅ”EÊ.•´V7Öδ%Ö*ÀjÀkM(kÿI™/xfïZc©ïÃ%)½ƒIö)aD÷L* „2tTÒû€#o{v¢a1ÞÀP0H½‘¤,½Ó[ë’te(áÜÀ\#ÜŸ¯éyORüƒ€ã»¹žkLœ¤ùUw Ú~¬·­ŠˆhOˆî™¤#·}”¤åƒ%ÝdûàI·,":é)ànàqà±Q¶wW×Ûu¶ŸèIk£/N©÷ïÞßöDDLJˆ%°ý)IϪAᑨ7Êï€Ki2J™k–!£=Ô´ìÄzÜ”˜Z׫ÛS³6dD ²„ÝÓ±€°z° %ÉÌ-¶Oê`ÝÑçl?%i-ÊÐQ€ß%ŒèÛןëu;"":!aD÷t4 ´=KÒÀÀ±’^eûÜNÕý¯€¹ѧ$½XyØîïöãð`I[ÿMIrôEÛÇ÷¸IÑ% #ºGt8-¹í‡%½ø+p’¤Ml_ÙÉsDDDÛöÞ6lß1@_„’Þ ü¢>¼|?Œ˜V²nUD÷tzÈ(uîÊëkÝ¿—´R§Ïm9ØØ­·ÍÓ‡êv/Û+ØþyO[]•€0¢{:ÞCØPç³¼’þü°p+pФ½¦ê\Ó¤×Iº¸xPÒß$½¼ÍºfH:\Ò=”e,n•tð°r’t€¤›€»€$P—"šŒÛžôÒH1x2F<¢{¦4 „ÒS(icÊ•oKZØßö¬©ÞDGh¼¶n·ýÅV$­ìG¹°¸íj0w1e=Ò·?›è ¶¢¼–$$‹˜¦FtÏ”÷6Ôå>"éàHàIo²}U7Î1»’´4%XEÒGëý¥ëv6ª½XøŒ¤5_'[žb`nà&`'Iý2:oMr|m÷ÕÀÛhwDÌFtO×ÂÛ?’tpp®¤·Ù>­›mˆˆ˜Í4gr>¨Åñ¹Û¨s7àGÀË)COwî´·íã†wyÊÉž÷qàÊè•G''øüˆ˜M$©LD÷teÈèp¶Ï6®þ é+’êv;""fwÕí£”àlÙa·×M´BÛ×ØÞ„Òóxp ¥ÇðÇ’–vÞÓ[œsYà3<çù¶W¢ŸkN´Ý1{H@Ñ=]ï!l°}#ð àÛÀ€+$íÜ‹¶DD ¸k‡€yWؾuØíî‰V(iNÛ—Ùþ4°u=4°\½IÝnÌ×â¼¶ùz~IùlÚ¸ÍçGÄ€“Ýõ‹ˆŽ“dÛ«l¯H:ƒòžÛ¼ÇíXø:åÃÿÏÀûl_<çϦd¸»ÚöY’fo­E޳ý ¤MUR&e¦Y™Ãûzý>©%éÃÀ(ÙEEIȲ ¥§ípÛÇ×r?¦LÏYˆ’¼Jö$p†ío×r7gyÞ[kS–Ÿxn#S´¤“×S–ºø9p'¥'qà ¶omóõ<<Çv: "¦¡Ì!ŒèÓ½ò¶/´ eÎÊ¡À’Ž>iûþž6."b0|…2ïÀvMû ÌËkؾÀ|£üÔQP>ÞÞTÆÀL`ïaËíHYzb7`Ϧý73”\¦éˆ˜ÆÒC³…é!<…2ÌgÓ^·¥AÒ"”y'ï¥\iþ°íñœ™é‰x¶¼?¦IË‹Qzínr›_¬$-^뙳ÖóÀ(eçV¤ )½Ãö휳©¾ë€çKÙ¾c2uEÄàéyoEÄ4ò$}Ö+oû^Ûû/¡¤ÿ¡¤?×a¥1Û·Øþ—íÛ k=wÙ¾Êö壃µìS5Íe“ «sëöë’Ö—´pꌈ‘€0¢{fQ®üöÛR’Îì¬ œ/éLIo“ÔWAlDDtÜ')ó·Îvèms"¢›FtOß„.~¼ø(°%iÁ$}RÒ2=m`DDL ÛW«Qæ1þ?JPÓDæÆla@æþXÕöÚ½nËxÔ9*oÞ¼–2äõ—Àê$‹bDK™CýJÒ¶{²üÕ ‘¤É 4 Ñ=}ÝC8\ýÐø ðI«RÏì,<(é]À1¶îa3#""ÆMÒÜÀ;mŸÔ¡:¤ ³]­îúwcI‘~!éU%ídûÉ^·§ŸÕuA–t—íöº=ݘ- HáOõl¯Þë¶´KÒüÀ?( %ÏΖ=bÚIaô IkÛwÛ>¼×íé5Ió£,r‚í·JZÜö]“¨wuà,`ñ¦ÝØžR ýœëQ~·7ÛþÖ8Êø8%yÜÆJDÔw$-ìMÉÖû=Ûÿl³ž¥ó(Sg·ýþε²?eaD÷ô]–щª½·Pæ—lœ ìü¸KÒ ’ö®=ŠÑ;ïÖéq;úÅG(Ÿ]kQ–YºMÒ^Àµ’&ó3ú %œ l¼xËäš:¦QÖÀ\s¬‚’¶¢ƒ·[ÎŽÁ ¤%\| ø°J»õÙ¾ ظØWÒÛ:ÒÐ>–€0¢{jÈèXlÿÕöNÀÒ”¿ŸR>h®”ôIGIÚ¡^µ‹ˆˆq´h‘1Z™Åê\ï®’4‡¤¥Ç:·¤u­ÛNwQI L¢ŠÛ€(Kl,¼ø6p0ï$êݰn²}A]6ä÷à IšOÒ²’æO¥µü¤F=IZˆ2Š`Ûÿ™L}Mõ.Ø/K“Hš¸’rñcJïï¤Ù¾ د>dt<êbÉß²½åƒrcÊ•»‡)Ã\N¡|I8KÒw%}DÒ¶’^ÜüÅ'"b™, ü2ÿ ÊgÆÎÀMåæÎ¶NSI–pp!%€¢n/lº5æzÏSÏ9£©þ9ê¾…úŽØØ·:ð ÊçØ¹ußw$-[ËÍW÷}Ø ¸xx9ðù ÿD†~&'[—P澕2OlB$}“ò³™ƒ¼]F™‡wƒ¤­'Xמ’~Ó´ûPI?«·ý›öoÜHé<”r±tCà„æ^`•yÿÞDéÉü'e˜góÐÇÆïðžúøNžù»žAôu{4“ipÎz IDAT3?åwq$%½Œ2 æ•À§'Yw'¼Ýöž¶o™‚º?»]Z¬=ƒûs»Õ“دFtÏ“ `¡¤ÍÛ}®íY¶Ï±ýiÛ¯ LôÞšr%ï àõ”/8Çÿ–t¤“%&é}’^#i…AŽ1êЭÿª·ü?¨$­ÛÉáŠ]4ðrÛ¯¾X÷m iʶ§€ lïGYèRÊú±o°ýêšÔè·õù¿µ½yÓí¾6Û6/ex劔 }WS‚ÊW +·°³íS–-Ø´ÍsRϱ‰íµ€Frœvê; ø eN¥ëã—Q~~gO°® )YEwhÚ÷ú¦}ÍíÛÁöƶßcû£ÀfÀƒ”ž»æ9€GS‚êÓåm¯cûyµÏÓÍëïö”úœ†ýniTV‡¦nPþ–ÎXx›í5€FÐ;™ßmGLqÖÔëv½¦‹.Íç6ð«úðÿ³wßárUUÇ¿¿PB ô$J€Ð M@@ HWDQél€‚¾° ¨±PE¤ˆ ‚)‚ E H Ez -ô@B ÉzÿXûp'“¹3sgÎÌ™™»>Ï3Ï™rfϾefÎ:{íµ¯1³WÊ÷é=?ZBéÖ”Ñk%]üÐÌ®k¦!3› \’.€Ï3ÁÓ ñ °[É9²éiû6ôo,èôS|ôª|^Ú¹fvNºžUyl&8?Ê̲€­áöRŸÎIõ ‹™Ùxp;PàE{„g¿€‰÷¦ëïWÜ6³©éäÄG€¥ðÄà'I‘´}ž^úÿjf÷7Ð?€eðcŽ©9)g™ÙùézS[I'0{Á£›SÐÜ1ÌìEIÓðë%ñãr;ãr+F(Û"ÂÚç=üìoÇI£o‹ãyòåð3šY`¸ýÌ•h„™Mײ¸³B¿F0{ ¸2°-žÂRI3ñ/íò qzµçu¸Eé I×·rYW+„jÒAõðt™¯äzùe~üà{!ü=;Ô MÛì2?¸ž3=6WÙýCJ®×ºÚü€î §eWÌìVàÖ’ÇÆ¦í’TNÁœmô¢Jûwj?ûL-¹žÇÚfy·7X«¬ÝI#Rï•ef¼›æ³ÍBÒ!ÀOð÷IJ—£z¤Ñ~•ɾ¿ßÈ©=È÷o±³.wêÉÛWèû¬›M%|¦­=ÊY„!´Ï+Àü’æ2³Â‘”~´yº| Ua·BG›Ryì—ðIݳ4'}Ðóõs½Öãí8€ ¡cÉ+.[rƒ`Ô ôŠ>¹U~0je×{1Å<+–ñ/|Ž^¹i/ø•ÖËØŽ×’¯ùKü»toàJàm|tmé’]'—\_Ÿëج§ÓvT§w”ÙÙOìæñ?œ«’æ“úÙg>Úy‡™åRå´Ý" ¡}^ÄRFP@ZAJYù}A`6Qýiàr|¢û ©ŸÙåe|dóý”Q¥…·‹–ÎÐN!ÇÑÊnR)eÿ;†0I+á)‡k0k¸pÙ®¯âï©Ò´ëgËng©Scñ´´òƒºñ4ÇG€'R›¯áæJxjãZxÀ9xOÃz?à*ݾŽäOOòõþ¼?ÄçÛuËÈ`=²tÄõ€afV)u­TVxdµ~=mW†÷çœÙTC¹qø÷þàf6CÒFôU&Í<‚ÿ=Ž•ôÙ4ÅI#*¬Xëo þ¾}ò×dÖÑæÂ™YÅભˆŸ<~ÅÌ^ïgŸ‹-€›%m<ϪNaíóbÚŽ¤a*÷ý |)ˆùð/ëð uW›Ù5ž¿i³sCþÌl¦¤5ð4Q€Ëcþ`€÷×åZ7L—ìô/¤m¥ÔÌÜÉ×¥úðyüËçl¼ºç-©ÈÁ`çJ`Ì Yq¦½ð¤,úAàïxÚõàþ4ߥž6·¾ŒOwM B]ƒWÓ{¾Æó×ÄKÒo‡þýð3{¶î¬AfÖ–”Àì‚WfÞÿlÏ<Ëìs¢ÏÇ— ØØ*]Þ¾¾D¤ïGâQ^Å‹y}X»e?Á bf·H:?)»5~Bæ·ø¨ÝÊö=EÒTüäÉrø’Ü\¡ésðŒŸ=ð“‚ÛâÿòTéÓñ€pI?­õžíb#𪭥²b7/Ð I Ð÷wú}•]¿JßwqW¦««Îï…:š$0³Ž}#JZ_»gW3ûs _gàP`üƒé ¼rÝ9µ@*}B(Ñî÷‡¤áÁ.x*ç=x‰ù À3Ð"Íi¾Ìöx ø!<›áàoföpm ÇO>íˆÇ'™YžÅ-µ”2¾,^€çÅ )…¥ûÎ,N2³wÊŸŸÏöd¥¢(¡y)°Xxªž÷Az^¨V%;µ;/”3©Òü5I—Ûç˜Ùî þƒR*Fu0p™}¶Ê~Ãð‚;3ðêµ]—™#„!´OiÊhîÒÜ·ñ3ò3𲟚ÙS­x½B1$Íì§ÃDþ œjf·T{nvwÇçø=„šg ¤H‚¤E+ð9KGÇU™w”²«¹#ï/÷ó`•Ç߬öxh^zÔý>HÕ·kX©³Ý/à)¥»IºßÌŽ¬·ƒ™¤ýñ‘¿ç€/ö³Ï ÀfÀžøßèÆ`" ¡^ÁµÜSF%-‚§„n‹§ }Õ̺v=œBe©jáéøœ±›€}óš}KKHœˆôÜ|¸h sR%- \…W*ý¤™ý£Ñ>…òafOKÚ¯pz¨¤ÓÊæš†2i]È_áÛVÉ´øžâ{/ð 3»¬M]Ì]„!´‰™™¤¬@n$­œ‡çÏdf'çÙ~¡x)hû>žð2ðY3» ‡vÇO"m|¿‘âD’VƃÁáÀæ% ‰‡ ff7KÚ Á`mfö¬¤€çjÌGþµ™ß®~µR„!´×‹ä8B˜¼=/ö°¡™Ý‘WÛ!„Ϊtþ/19¥%¥vÿ,|®Ñ3M¿/˜±‰™ý¯Ù¾…òef•ŠÓ„~˜ÙuìÓ•kV2¤è„0ȼH#„rgÇá¥×Ž`0„Þ#i|!ò¡Àff¶NÁàg€€·€ šm<_¦`ü` %­/éVIçKÚ¹èþ„B3b„0„öz/¶Ð¬ñòò‡™Ù19´Bè0’V.Ç‹lœWÉø”Þy&0غ™3–ŸÂG-É£]b^rà3’–2³ŸܧBhHŒ†^ñ&€¤¶¬ñׄ¦SF%Á`½)-þÙ¶EŽÁà<øœã·ñ4Ñf‚Á…€“€Ûž˜GS/3»ÉÌ–Ãׂ_»/„ºR„¡Wܘ¶—H:PÒª…ö¦/ Iš«‘'§9ƒ‡¿5³ïæÚ³BG4ø'¾¸ü–y­!š¬ì™Ã’4?ÃGÉö7³M÷¬ ™ÙµÀd`tZ.„ºN„¡W|¶ÖÇÏXß'ÉÊ.—ÛE o-Â}¢¤½€_ȳS!„Žò{¼jð6fv_^¦u¿ˆ¯Ozy“m}Øøe*|ƒA¶äG„!„®sCO0³‡$­lƒ/º)0ºl·wÚÞ±Ùeá(|^P]$Ç« ^ ìÞHYøœ —t]Á}¡ §Ž¥û#écÀÇo™Ù­yuJÒ2x yð½šü"0øQmu»,ív!àé";BˆÂÐK–VÁ«xÎQáñ¡míMeY@Xw¥QIÃñ…¨vè¥2Ç!„>’†¿Nȹùoó»5›Þ™>“vþbfoÔÚȦ,ì‘æh†BW‰ÂÐ$í üŽÊ`¦F³QÁ¥ðœce€šYÃ#9›ffã‹îD¦É‘ó½qø¢ó¹ø‘4"µýG3Ëck'|$ô´Úê'+ß”´Ÿ™[pŸB¡n†^q8 ž\L4³ÉÅv©¢GñÀtõzv–´ð%àx3»±Öþ!„î$i>àÇÀ M® XÉøèà/rjo?à^3»%§öºÝbx oÀ“øÚŽ!„Ð5" ½b™´ýª™Y¡=©ÂÌfHºŸ:”–uðECèm»K;äÙhJa<¸<5©‚ó‡‰eJ}ÏúØÕÌþ\tgBa " =¥“ƒÁ÷âEojù0ØÄÌâŒs½mGàa3ûoÎíÊkÑôý€w³sj¯ŒMÛÿÚ‹BhP• ¡ýî–L‹:W$i]¼Šßñf¡í$-$i=I›Kú`¬±Ö:iŽß¦ø’2y¶+|$ï63».§fwþnf/åÔ^/˜;m‹®þB ‰€0„ö»7m«¥Ž—2?¢õÝ aV’n^þ‹/~ðФs$-YhçzÓøè\B``e|1ú¦IZ_Îçy´×ƒº!C%„faí—„¨ô`ZOq;à83{½m½ ¡Ï*%׳j—sà£C—Jê„%\zI–.š÷ï[3€¦¡/±qÚF«$-2ŒQÓBWŠ€0„63³IÀëô?Bx8>:“÷:d¡r£«¥w ¯«ákwÎlÜŸ[X¿ ~õI#ñä?:°p«™½šS{/™Ù9µ×µ$Í+ip°p·™uÂÒF!„0`†PŒÿQ! LÛãsct° Iº\ÒdIKÚxxxUÒ%­Ppk2³ÓÍì~3{×ÌÞK…N~S²Ë"Eõ­m…¾þ-ÏF%-¬\™c³rl¯›mL¾ ¼’¶!„Е¢ÊhŸØWÒœfö^Éý‡¯£ƒÝl|]²]ñò9J[8WÒºVÄ•4'µ?»ß+û¿ÊòYÛÀµ9·=˜­ ¼ÏÓÌÓæøIß«òh,¾Y™XŒ>ó¾ÜÄcÀÕQd'„ÐÍb„0„b\ Ç$}ø4>:øZQ ¹YŸ¿uXºžU‹]›~æÖé|áëj—ßôûì:IZEÒxIŸ•t2p0^4ã¨øÿÌÕ8|‘÷¼ø-ðÂTy-c±QÚÆüAÀÌ3³£Ìì/ †º]Œ†PŒëñ"›Ò—‚µ?^ÀãÄ¢:r·Ÿ™ý@ÒéôT¥¯¸P§:ث쾳ɩbexß8àâ´»%ð/3›‘S{ã#™·çÔ^[IZ-}¸øµ™M/¶W!„Ðb„0„¤"w‘¨Oi€»—äX"ë,Lž-¹>¬‰v¿,\ã’Ç|¦ðwâ#M{IÚ¨ßg…ºIZ¯P™kuQI+cÈwþàFÀ-fönÍ=;“€­ñ“¿/¶;!„Ð9" ¡8×JšØ…À„Ð/3{Ë̦Ը¼•ÃëcfãÍlmšc jÑ.N¶^txÁý !„BÅaÅZ8mÇÚ‹3Û Ÿûÿ¨wº‹ñTÆ…ñ¢G/Ïtñr)ä-@þ£n«¦mž'™V ß³h ëá'ÅŸ^/¶;!„P¬C(Ö–ø<­5%1³IEw( nièYf]71äotÚæ=B¸*ð9U•4X¸$ö:Ä—5€£Ìì»Ew&„Š)£!k+à:|äh·b»Bh£, Ì{„p5àA3›‘S{KsÓ;eÀ+õü§Ð^„B‡ˆ€0„‚H ,ð˜ì^lBmÔª€pUòŸ?½ζ3 íE!tˆC(Ζi{p°š¤µ ìO¡}Z•2º4ðDŽíõb@˜é•"9!„ДC(ÎørOçÓ‰Q‹ÀL3{%¯% æ%ß s ð^|¥W,–¶ÏÚ‹Bè†Pœõÿ˜ÙKÀ•À.’æ(´W!„v˜x#ç6³@'Ï€p$ð’™uuz¥¤9$­.é`à5àá‚»B! i1¼´é¢Ôg‹Ÿ-¢O!„¶jE@¸xÚæ9ò5x!ÇöŠ2¸8¯Âz°™åýû!„®ËN„PŒuÒ¶4 ¼xø¾¤ózhèÂìºi„ðÅÛ+Ê4àpàIà3{¢Øî„B爀0„b¬W¸›˜Ýaf3% œ |8¿ ¾ÕcAI{˜ÙiîR6²y¾™M“´1^"ö‰}Ó> â鈵 ǃ”<µj„ðöš{u83›ü¸è~„B'Š”Ñб¾VXùáŸñj~ß—¤öw+„Ð&­!|×Ì^ͱÍ^I !„ÐEVZè’ À̺"ˆ’4 ¸ÞÌö¨ðØ>ÀéÀfvaÛ;Wƒ¤ëÌl|±= ¡óÔûþ4˜ff[VÛo€¯} °­™É©½9wï›Ù‘y´B¡óÄam&i$¾VØmýìr6ð8>ß%„Лæ£5)£yΈ! !„žaƒ$’´È`Ië“ô5I«åØÞA’ÆåÕ^—Y3mï®ô ™½¬)é“mëU¡Z•2šwAˆ€0„zZ„ iMI—JzŸ´ÿ2ðz*$PTŸ†·á5~ \#iD•ý†Hªù?%iàWÀ¿$­•_O»Æ²iûD•}Ξ"F CèU­Zv"ï‚2ÐUFC!ô#Â:IZ¸ø80/0˜WŠkyPVÖ—y%.éqø—ùP`,pK‹^³?ÃS–må‹HZJξQa·õð y)|®Éœ©_»·IZ·ü fö(°%^š}aàõŒ,ö1Àd3›^c¿ßáó Oª62BèJCðCyF¾£Ž† ÐIở/¹½)p¤™Íö…™‚¾ xéþ¿_î¾ Ü"i«ô/Kmü¯™af3Òåq3{¥¯W(IsàÅM†Ïô³Pú$àgøz\;K £otqfv/pXº¹pHnï|cðß[Ui.á>øºf'·ºS!„¶Ê5 ”4~R.ÏQÇ‘À;fözŽm†Bè0´0ýŠÀÃUn—º8Ç̾[rßY©Ü÷™Àoð‘»<-“¶OTÛIÒfÀöÀÀø—þ$5=ï÷fvm ÐÎI»-yêf’þRrû93ûÚ~®þ|‚¾â'÷w@`f——”Þ'éràcx SmÄö·øÏ¼.ð]I'¥TÉI¿›n2¸µžÍì^IGGJ:ÏÌ.hm×Bm’÷áïp4>"4==’ýF«¦›—–ƒ©3ÊïkƒeK®÷»4B WJ:ÌÌ~]cßì5–ªÕ¨¤…¯âÿ/YåÍË€R–N—„O6ðÜ,uô7’®ïÅbFa`RuÞmÓÍË+á «RF‡Ó|¶M!„Wh@hf·áK,"5P¥Áx­Ÿ)Km$²ÛÔµa5fvª¤%JzÆÌ~˜KÏByþÙ<ž:GÙ%›£=ŸšPm¿òûj9o–ŽH3ñQÃÒò9Is7²Fl!„îPX@hf“ñŽaøAþ¯ÌìZIŸþjfÇ•>GÒpàIW™Ù¾ý4‚™¯E]¯æ`ÇtýIÿ—ŽX_6¢Òïû ÀÍø™à€ÏIz ÿ’‰§JΚ™Iš€Ò <#é|.åP3Û²™ÂÌž‘t=^ùós’¾šF`g#é?øÁÅÔœhf¯šÙx`u>WóãÀui4¶c¥¢;#ðt­¦¥ù–;á)½çJZ?vC÷0³™fviºÄb÷h8 ¬¢¡e'Ìì3»ÇÌ®0³ß›Ù!föQû¼ºÉÌN¾&i-|é›𓆇I:¸` Ÿß=fú2ƒþ \ßlƒ’6þŽŸ,_Y—ƒO³Ù*Ûìë…‚Šþ OÞŽföÁt{sàÀ°*iŠ»âß"øÜÃgñ¥ÖÄ™o¤”ÔÐIà#žCðùJÛç5WOÒòx*ì<ÕíãM´µ;žnúˆ™­Xkÿ¢HZ–¿hf¿Ë¹í±ø\Í7€ÍÍì±<Û/{­ë ú©«:çÎÏóû?3ûeN¯{(>w{®<>§%­Šg®ìlfçVxüãxõìµðõ„¿”2^IkâÇ,/i´‚tI{£ðz £€Ï˜Ù…öY¸?¼‰™ý§|ŸBˆNH=ؽäö=ø\Å`ÀÌþ„,n\…„G«™Ùî æ#³ùQº¹-pzJémJªy5 NÆç¨4ãÏi»BսЗU™Í½Œ{ ·Å‹@Ü"é£y¿F!7­J‘c­l„°âÜl3» Xø>µàzIŸÍéµ[FÒ°´†'råEu²ýæ”´xª]Ð/3›Œ6³Õkƒ’†HZ¬Fjé¯Å€Ó+ƒé5oŽÀÿNO…†B¡a…„fö°™Ý]rûy3›PÇó¦›Ùõfvš™ýÌÌþjf´¶·ƒOš¯—U Ý|ÖKü$žæú°i³|-ΞX´¤ø™ÝŽWl üSÒZñ:!„¦µ*e4ÏEékžÀ2w>þ¹s7pž¤ÃrìC.$"iJZÃõe|äÆÀ À«’N.ÙwSIwàU`Ÿ¦JzZÒËÚ<6µ9%µ1EÒreû K÷O´ ð8þùUap ^³à)àIcÒ¾kàÕÊÏŽÁ¦%SR€Ì3øÒÿKm/ÈìëD*ÝÿAàb|$õ1¯F{¹¤…ª?+„ÐF­!lE@XWFC*ôµ¾ní1iI”Ns#^Õ{:ží²#}ËeUšO7³±f¶—™ffŸÃ ¼l–5df'¤y¢Û×ñºóáÓa–§6<”í—ݾ¬ÎŸçâ²ç…BC" ¡}ÚÂûË|¯¼úQàfI[p'„A¦RF³µdûÏ_.UÝOË<§ç¶›ú8x*Áy'=6€™M“4GJÝWÒ·é[j‘&^{O3›’^ÿÞt_ù‰ºåÓö‰:ÛÌŠ‡”4w} ! r†Ð>m 3fv6¾´Ç‚À%}¬]¯BèW7¤ŒfညԘÙËø¢ö«ãKu’™ý\Ÿ¤ãÖ¿ð5!Ÿ¸Òå†ú+ïžžõÎ3˜§¦V,ŽBõˆ€0„öi{@ïW‹ý^ÐàJI¿”´@;ûB˜E7Œfë×=B˜1³«ñ9z_–Ô ëÄyøZ¿Æâ©¥§µéµK×c®ÇH<õtª™MiM—BƒA„!´OË‹ÊôÇÌž>‚ä <˜Öo !´_7Œf\£ËXœ,|*Ÿî´ž¤Eé ÆÎ4³Çñ‘ÒõÚÔ…GÓví:÷_=moA_BƒH·¹ ¡› Þ3³wjîÙfö&p ¤Óðƒµ³ÓÒšÙ=lnAI{˜Ùi­®l ²óÓ<œñ ±Oì3˜öYxêZ5B˜çɦ†RF3fvµ¤€ñJÝà|ùÀi’þ…´‹—ªX(»w¼¤iÀfvl¯¾,Ó.ø:ƒµìš¶5ðZ!„ð¾! ¡}†Ó¢5ÂÌî6öVît|¤‘†Ð6JÛþæ’5¢cRFKü/iÙ¦{Ó©àË~À`U<˜½8¨ÂîÛãUU?]rßÇÓ}›TØ¿àóW–TudUÒRÀÎøI…v¥´†z”üó/„î&ÉÌLµö-ФS­Í¬Þù!-—–£ø1ðeüÌø7S!šjϹ •\!”¨çý‘¤Ç½ÍìÌœ^÷>àn3Û9§ö¾‰/]3_Ê.h¤•€½Ìì¬<úÕ©bç2ÀkiÅv¾öAÀ¯€IÀ̬⨯¤óÏ'˜Y§­ûBè21BBûÌKŒ–Jeп¬ <œ%éß’êÃB¸VvÒBÌìAüDS£#f…0³wÍìávƒÉÉÀ xa›‹+-Ý!éx0xph{»BèE†Ð>sà%Â;Ž™MÄ‹Îì ¬Ü.ézIŸëÂ*! FóPð:„ý˜€¶„:¤´ÕOw›Q¶ð½¤qÀ€'O˜Yž'BƒT„!´Ïò-"‘+sg+ãgÇà%ØŸ”t¸¤Ù +„Ò-#„3­ùy%ÿV’´X}Ìì`sà fv^Ùcw»›¦*¨!„дChŸŽ3föš™ýX¯xwðC`’¤?ãUCkE@8ȳ‚ñœ4‘.Zâî´]>‡¶ 3{ÅÌ~ßÏcŽ`0„§ChŸ®3f6ÓÌþnf[㣆'[këHÚ_Ò¼…v2„Éûóe.šOx>m;f„PÒ0I‡Jú»¤;ŠîO!-ÂÚ§«ÂR©ÀÂ×%‡ÒÝ¿ž–ô I–4Gq= ¡«´b„P9·—×aŽÊ¡­¼\§e/¸/!„P¸ChŸ® 3©üüsÀíøZ†WàktM^–t¡¤$­X`7CŒ:5 |ïWGŒJZØÿkf+Ü¥B(\T ¡}º> ,ef€ ’6Ų¶> iðÏt¹ÆÌ^*ª¯!t˜n!œ‹B3›.éU:g„0 ¯1³ç íI!tˆChŸž 3f6¸0]4–¾àð3À~€Iº¯nŒré!äª#„yÌ!OíˆB`þ´í¨5aC¡H†Ð>=–3³Ç€S€SÒ¼ÂÑ þðmàmI·âsJ×5³<+%†Ð‰ºa„0¯”Q€èœÂl}Åøœ !„$ÂÚ§+BIãÍìºFžkf3€›ÓåG’æÇÓK·VÇ«–î[ò”™’ždÖ@1 ŸÊaM´ž"i°mºy¹™uÝÿWÈM'„Ïãrj«a’æ¶J7ª¶o! &†Ð>]×Jºøa£aÆÌ¦—¤ ’†+âs{J/{ —<ý-IàÁáãÀëxÚ×´²íl÷¥b8=%ƒ÷«¥»î“´F…]¡#„y·—ײÐ#„’~ì¯×xpV‘ý !„NaíÓ±¡$‹#+\>J_`¸0%¯×6³iÀéRÞ¯Ì(®ŒŠÕ½¢¤™À›Ì4æuÀ[„Eé I×·.-¦;ar Óû7·ö’¼G–4·™½›S›5ÿ½ÁO&©úî!„0xD@Bû´Ô‹¤1ø:\›£òüBØT™ô%|Y‹Y¤ô¯áÀ|éRéz­ÇçnùBëuC@~‚陜Ú3û¾¤£ñâW{+¢/!„Ði" ¡}ÞÃÓ• !i!<ðË‚ÀÒCO—·á©]/–\^Æûý~ʨ¤ëÚÛóÊÌì=ü¬n£•ݤRÊ(þw /ï®aÞ)£à' Á×Q•t)^äêÃD@B@„!´Ó{ðž“´ð àËø¨ØëÀuÀ ÀÕfö@çoÚìÜÁ?3›™ÙŽ¢2¡ÓGßJÛyrj¯SÓvþª{… aíÓÖ€PÒ’À·€ÏãgûÏNnI£ku‰`°s¥0æ vŸn!Ì3 œ‘¶säÔ^3¢Rq!”‰€0„öiK@(iàP`ü@ñ àh3{¢Õ¯B(D«RFó*“\wÂêçÒv±B{B¤>œC,ZÊ <Œ—W?XÁ̾Á`¥[FóšCØI#„ñEé?.ioI«ÕzB!ôºChŸ´( ”´ž:x4^=o¬™dfOµâõB¥ÓSF;f„ÐÌ^~€§þWlB¡x‘2Bû´d„PÒúÀyx ÔAfvrÞ¯BÈU·ŒöâBÌì§’.Ã+Ž.º?!„P´ChŸ÷Èù€HÒ!À±À$`C3»#ÏöC-Ñ ažËNtT@`f÷÷ÝBè…§o„0ˆä6B˜æ ž\¬Á`ƒV§vLÊhÞ$’t®¤“$uLÀ;P’>+éJIÛÝ—BûÅaí“gÊè‰À^ÀafvLNm†Ú£F{6e4g»;¦ë®o´!IcR[#ÌìÐú6?Æ‹W´ùµCë¹³uap“¤Ú{&—€PÒÀAÀQ †èü”Ñž!ÄÀçñâ4w7ÙÖÀÏ€ñM¶Óˆ ðê«-àµCëÅç08=™¶'JÚZÒâ…ö¦²éÀÐfHs~kfßÍ¥W!„v‹ÂafÑf¶º™½Zm_IC$-Ö‰©¥fö-`˜™ý¤Ö¾~â5„ЀC¯ø~Ðqžîòœ$+»\Zly.iX#O–´ðKü îyv,„ÐÕ:= ì¹BIÇJš"i ðjº¾\Ù>ÃÒýÒܼÇÉÀTI”ì÷ïÔÎÑé®u³¶Óeãý *}ôsœWeÿy%ÝL“´G+úB(FÌ! =ÁÌN—ôði`\ºŒ*Ûí¶wlV“Óv4ðØ@ž(i ½§™Mt/>"·P¡= 3{UÒJÀÂfö|Ñý !ä'ÂÐ+ǃÁ“€Ë€‰f6¹úSÚnÀ¡¤Í€/Ç›Ù-éU¡ÛuK@Ø3#„ ˜Zr=Ï¿S[¥ •Cè1†^±LÚ~ÕÌ:õËö%ü«®€0¥Šž<DEÑzG7ŒÆÂ0›TÁ{13»«è¾„ò3˜Ó7Bêà`0ëÛóÔ?Bø3` °™½Õ²Ž…Ú­£Â’eò!ÌÚ‰“ÐÕeËV¬$©ã~W’&JúQÑý !ä§ã>pBèqÏQG@(i]à‹ÀqföŸ–÷*„ $ VÁ‹bêø÷ÀMvy6’>ü_º¹zÚ®)é/éú‘fvOÉSÅ«¦|ŸªBè1BB{Õâ_´S€#ZÛf'iiIÅG,þÜL‘t‘¤±Åö®'tôa ÚëÅÂíð¥Ž2O÷mÒHƒfvp(ð°ð-`7 ¡µkë°4Þ߀¤ûF—Ü7Ëw•™=L_%ÔX >„ÒKÎ!tƒçè[Ç©"IkÛ‡›ÙëméU‰¤ €«€ù+<¼=°¼¤uͬ誽¡O+ææ©çFÍl©:öy“¾¿MéýŸ¬òœc%,‰Ïã|ºUÕ¥Íìo•úWÃUÀAÀí‡ã#3'´§K¡•äFKê–ó·w“€=ñ…²7ÂÏO-Û®˜®õŒNы™ÙÛfö¨™=Ð)K Iúˆ¤o¿Æ—p:¸à.…raíõ~°µX¥%ÃGaŽÑÁî$érI“%,ikà!àYàUIÿ•´BÁ]¬Ê̦;ãÌìl3{ÌÌ&0kúòšÅô.ô#FC«}øž>>ÎÌ&ÜŸBŽâl]íUºáÓ?xìf‹àÿ®À:Ìz¼pnJ¹lèà=U¬õÙýž™5\ÄÌ^¨pwéHE^Ë V>¢#„af¶MÑ}!´NŒ†Ð^“Óv‰ò$}/Pp|Tsì ëá##‡¥ëYµØµé+àЈSð¢Õ.¿i¢ýþlYrýö´×Ñ#„f#„!„ÐÁ" ¡½Jça•Ûx8±}Ý -¶Ÿ™cf·§—ÜßU•:%­ |!Ý|¸¼Àîô‚NÑkE€9ƒ! !„ŽÎ!´‘™M‘ô(žJø¾”¸+p‰™½ZñÉ¡Û<`f,¹ýlÉõfÊÈŸËSMn@%-\€¯·ö.°‡™ÍÌ«ýA*;›×ï±£G“Äa!t¤Ch¿Û€ ËîÛœÝþî„nbfYZhËIZø°,~@¿wí Íɪ ç5³[Â8æ!„Î!´ßmÀN’FšÙ‹é¾=+ŠëVè’¾ô»ŽYr±™Ýäë,„¯96?˜ßÓÌþÜL›á}s§í»9µ× )£ï#„!„Б" ¡ý²‚ëWHZ_×íwÍT† ƒÆX`ýûÜÓÌ ¤ÿÉ«ðÿÑéÀnfö×fÚ ³š¶y„Ý FC¡CŇsíw~æ}|Dpgüñ¬";ºÆñÀù5öyªÑÆ%-ü¯† ž2º¨¤/•ízfJ_ —÷aÞb„0„‘Ch33{MÒÃô–Ù¸ßÌn+°[¡K˜Ù½À½-|‰=é ÁG¯·«°ß…´i.cêô€°b„0„:T,;B1þl˜æi}ˆ¹Y! Æa! "q¶.„b\ ì|^UlwB^Ìlƒ~îÿ}ÚËÌŽÇÓRCëtzQ™VˆÂBèP1BB1þ‰ î¼ D)ÿ! !„Ð1" ¡f6¸X¸&úaPéô€°b„0„:T„!ç&üÀ0ŠÉ„0¸ Æ€0FC¡CE@Bq¦§mœ5apéô€°)£1BB*Âг&~@¸aÑ !´ÕÜ€™Ùôš{Ö§ŠÊÄa!t¨C(ÎúÀ#Àfiù‰Âà07;:1BBƒJ„!@ÒbÀ’Àßyð%(BƒÃBÀkEw¢Íb„0„:T„!c´½¸8@RǯQBÈÅ¢À+Ew¢Š! !„A$>œC(ÆÚÀL`"p2p°%pe‘€%í °¼™=Q`×j’t€™/¶'!tžzÞ’ž®2³}szÍåñU{˜ÙshoQà%à+fvR³í¥6…÷¯§ hIüX¶ì¡‘föR‹_û3À¹À›ÀGÍìÎ&Úz ÜmfãrêbÓ$ ÁGâ×ÇçÞÞœafoÚ±’~|=ÝkfÙŸr’¶¶ž7³cúÙg<°)°ð?à/födÛ:YCú_??ÝÜÝÌÎ)²?™ôÙ{30ø¾™ý$§v? \œn> ÚêŸ9FCh3I#¥™uAúßá)¤_*¤S!„vŒ)£Oâ©æ Ý‘œýï6VÆÓÿ§¶òE%þ€ol×L0˜\¼üµÙ¾åEÒüxáµsñ€k_à$àVIËÙ·2Wâ#àÿž)¸/ï“´¡¤ë+€C€=+ì#IÇׇ{ÇwJÚ´ý­áVàqüsdBÁ}yŸ™=ŠÛÓ€¥À:ÿ—¶™ÙÒí€# l¤Q’,…@$}MÒj9¶w¤Ž9 Ùfk¦íÝÙfö,ž:ºŸ¤y éU¡å$Í‹WlEe²Ñ†N:ÏÇÒögf6ÁÌ2³šÙ;å;JZHÒ\õ4*iáô¿ÒŸ3€ùŸ›Ùõîu3û0,¯Žœl‹X­ ŒîVŽl¦á<ÝÌì*`a3ÛÄÌr[NFÒò’~ÜH_%üØ„êŸ5Ÿ¾ L¶Æ ¿•Ôó~Íl’™5³e«ÀJ’ÞgUÓJ%Í™ö›/‡¾Ýgx 8MÒ°fÛVJÛ¦3>êáHZSÒ¥’ÞžÇÏ𾞠Õ§–çRK:ø%p¤5ö­ùÁ%iàWÀ¿$­•O/»Ê²iûDÙýÇãi_kggBmµhÚÆB˜=µ²Û-–¶S*=˜<¿'é)àUà I$}¸l¿K%M‘ôII×âñ¯K:;ÍS*Ýwà#À Àíxš’]€W%×h{y’´0}3»›Ùí)ðýrºogIK6ØövÀk’îªuLS£?•ýî¦Ôð×ÑöGðTäïÑ—Ž:×;߬²ßaiû]3»ÔÌîÆ—ÁzXød¯Í«|BÒó’Ök¤ÔÎ!¥ÿ£éRí˜{uü}ö¯MOûÛhßÊü xO»þtíÍŸ¶mKŽ€°N’Vn>Ì LÇËhO—vöe^I§KzÔZùZ‡ÙDé?Uš!ieI¿–tðŽ¤§$]P%Ø»/¢²d®Ò’Îw®1xšÏÓ¥wšÙq|°L6³éû&þawt{»Bh“,eü¾B{Ñffö<ð6½1Bø|äe'üX|Ä.»o+IÂgãÍìCø1ÃD< ù~…¶ç64³Í€Ÿ¥û6/Û'û^½¬™ÂÜøTé¬Zû×a?|^c¥Ë)UžWɲi; @Òø<²Õè[Öe¹ûy1~²ãyà†ÛÀ̾›~w_h´RiÄöHàLüÿãf¶W¥ôã:û÷^]Æàì»ÀdIîÂSG_Mû4ú;¾ŸW÷pIƒm`f*ùÍ-·E²"0³÷„¤-€¹‡­•?;)ÊÞؾ¥õ€ß—ŒKk€£ð7õ†ÀAÀ¾’v4³¿çÜ¿l´ë¿fvFÉýUM*/)oül<è}8 ŸÌ!ø|˜ÿáCïO;ÛàhÇágCgaf÷J: ø5þæ9„vv1¤/¹rfö„¤ã€C%lf·¶·k!„[/8ò`Ñ©¢UËXL¢Fñv?O×–ÄO‚^‘îËÖ$ûhÚ^of7˜ÙÓ’.ÀO ¬]©m3ËF/ÆÓ+Ûgù´}¢‰Ÿ¡~Eÿÿ•N€V³pÚJÒÅxêâd`/|‰¦OÒ—V7 föI—SÍìíFÚÈ[ü8 ¯¨ú°³™ý£Å/›ýާáÿÓßÄÿNã™pGÓøïøIKsšÙ«5ŸÐ„”¼[º™­Z>àgöÃçKn—ng©Þk•ì7ÃÌv£qÙût!Ió ´®¤uñ"J‹¥¶n¢/ÖIáJÀCe“vˆê IDAT·Kð^Ñé+fVzFëBIç7“´BÎ%s³/±'ªí$i3<¸]X˜&áé'›Yó –ÃÓ@VÇÏ NMÏû½™]›´¬ÊPé|‚ÍÊþéŸ3³<æ }‚¾3Ù›Ùë•v2³ŸJz8;;‹%éÏx ¼$°¶¤¹ú û-þ3¯ |WÒILÈV‡Lz€1ø™Îþ…§Xœ i£vž! !´ÜºÀí½°qÁ«pvµt\2@}Óæ§W.²ÀíŲû³¬¢%*4?­äun¥ì»"ÍQËz;fé€Té´Ùj§™¬ZçGÒör`3{AR6o²â‰Õz˜Yùߤhã€-Òõ;ñ‚0­–ýŽÁ ËÜìbfw¥ÓÐÜ︥•vK¬ŠÌ—Z¤ì¾ðòý–(¹o}候Ù[’ÞÆIæcàïÏwñ%d„¬ÖáÍU'¥é­<\åvæ“À¥eÁ é¬Úñ@wËf:#iI‹gú~Wó”Þ/i±²§ž|_Ïeåôs| ø p‡*”Ü–ô¼rÖ÷ð3Äçì’ž >Ú–¥£|ªäéË—Ü¿>Ç1_LÛIx9ê~™Ù©¥) )ø{"ÝœsTzÞL|üÍû‰ûºKÚ>ÒàóÛF~ô°U>dÓbõßÁGV:ï"„С䋕¯Aû§tŠkÕÓwê`ð\Ú®_vÿÈ´}j  ¦ï×,˜YªÁ~µ„¤ã$MîçRéx®šÒïÈoŸHÁà|ôÍ,9H_×Ueòff7ã™náO&HZ¶Å/û}AÇŸ€uÍì®t;+ÓÌïx%ùò(­v20:]6K÷M,¹o4ž{DÉíÓ~W—Ü×P‘¢Œ¤…ðãÝ·™ý$PMfv·™-gÙ­ŠÇmÓáÖÀ?«´sGÚnØd–Æß,Ù%•Û¾ìþòQÈÛñ3-›¤6VÃGÂÀs±(Ý9(žˆÏ¿‡§ |ª¿Ž¾ ¥ïáó÷ÁÎÌõ%÷ï“^»)òuò¶J7ÿ4Ð*yE´UÓÍgjœ%ºó@_`7×K_•µn˜w·8$×:ëv&^€àåP9„ÐÖÄßÿy§‚wCQ€«Ò¶©¶]$;¸^ViM·4—p½©ÁvMÛJ)§Ez ?\é2Б¦;è+¼6WÉqÈAx…»ÌìöF:™ŠåÝ <$i¥Zû·‹™Ý‡Ÿ<¸Ï»E-¬bŸFº³y¨ó›Ù›’6Á¡ßþÒÏÓ«Jõ<îÇÇyTÝì—™½af“Íl2}ź¦g÷¥‹™ÙÔ’ý²4ÖwJöy¾É®¬ž¶O4™Ùužº»Ô¾¥í M•ô=üÍ ž3{‚¤lõ¢À‡%íüÖÌ~îNõ³j£Òöé*ûÔc&}—¡/Ec:þ&ÉÌ’"bf³5’ÂS‡âi¥²êQlef³”ÊÍÒ!ÓhÚé¾Qx ðPÙœÆ<¬@ßÉ‚F&\¾Êk³Í-efÓ$ÝŒŸ«»ÚhÊ·ß_x<å1)¾ÕƤmÕ/G33Iã ÝžB>U«BÅú!> éu㺑™Ý-i2>ß®>¯›õw<(‡/³t3>:¸<žNöƒ*Ï­æ|îý.Àoí\*z“-€Ì®Y2 åH3»§ÞöÌìHš\°¤­wSjèo§“çoãYP3€ï6Ñ|–Ê»0~"ý°*ûV”Ôÿ\ÒNæ’fW™Ùém×Ì^JÅ]~‡Ï—¼FÒÕª…öÓ¿Ñ7Í(+|´Rzÿ|>ÕÚø!þ;ÝNÒx—ͳûE©µËÒwy©Šé@¥ÿÓÍlIÃ%} ¼m°­et]ÔL#föޤwñ´Ó9hSêhÑsÿާù­Ž¿¹ÁshçÁ«Rý ŸWX:ù~“‘w6‰ûæf:ff“€…²Û)/x(ð73Û¹ÚsÓÅZø¼ÃÑøáééù ”ì7’¾‘´K˃ÁÔ¶•œ-±lÉõÖ’ÆÓ7b÷ õŠÉ^£fú‹|m¢¯â'²tË€ê¨¨Õ ²€°æüV3› éø—áMföëÖv-t›TwÛtóòA:/­+Hú^l뜿T®U#„àÙß’´Š™=Ђö;†™ÍL/~…O‰ØÿÞ ìkfNMþˆÏ5ßXÒÆfvcƒí,ÍìsªF—Üw:Pw@˜73û$Ž¥¯ÒêãÀ—ÍìÊ&šþ þ3ޤñe"Äì¿;€Ï¥í+øïoÀR-…½%=€Ðid^æPú §dæ(¹oXz­‰)Ø>Ï`Xéý¡™ý¢×Íüψۘæ–âØ‚ÙS®7MÛ»€ò€ðà§ÔNÇ~"íw}{_Jƒß ŸšC“m¯Qh@˜r•ï’´ðb6/PÒi—SÍìÙ²çôûKJ£‰Á¤¼¼5½®NÒ6xõ±zÖÇ)]ƒè­éQCJ×À«X§Iãð3#sâÃöÿÏÞ}‡ÉY•}ÿþèBï!‘"UĈˆ ¢(EA)Š"(øRÁ‚è«´W¤ˆEEEDéÒK ÒB  @Èýþqΰ“ÍÌîì´gfç÷¹®¹ž)gžçޙݹŸsÎ}v¬qRñ”¼%iÎJIpfóà(úv¾“tÒà÷]’ B=„e~@Ë‚¤Û#âæÖ„eÝ&'ƒwÓ÷¿æ>Ik9)ì,yDÇI‹Kÿ›:ÖfN$UÏûRïLW‹ˆOdæ¤ïyþè ÀÓ•ªF*«_ë1'K:Ž´lÅÏ%mPOA¶ˆøMX7¯•"âÀ/$-Oª ÚpÅʈxFÒ]¤$³®áÛùÿlK_»ˆ8NÒIQÇZ“q95ÆÿÆä9•óFÄSƒ=§†}Ît-)!¬{ˆ|D i ‡<tÐ^Èx¤–vCp<©ÃçÔHK«5j©gt úŠÿ´TÑ=„%+1{…Ñiý“Á(-ðzi"ç>ETf”´©[|^Ò–ßÎR¼Mê5ë¿àkyâó.:Gù‚É‹SÃÄ÷üú_EZû<°eDÔzæ¥ô³O©’ nü”¾aW?Žˆæ’vªåI¿Û5}¨å¡£{†ÄþAÒzñ\K#´n±-³žxZƒt‚­™ žÛЭÌ!énÒÿüeHŸµ×4êc¨ZÖC˜“™Sƒ$ý>"®ôIÃ@N؆ZXe ß'˜[ ø¤]ºäw«.yÔVC$$ÕØ’” ^ü©Ñý¶R=É`ÇjÊw IŸ6$ú{‚& #îTJK¨íJÊcf[¯»N7“¾óž,éX`BTY¥ Y Ks÷jiœú*ÀÜ’®Ë·—æ,»ýᨼlAi_ë‘þ°'ÛGÄÄVÄ\ƒÝé+>ó±ˆx§’œ¤#™=!,O˜>,iÞ¨mÒò€U[Õ¯<\ŽT(§ªÜ£{ iøÅ`«¡Ì; o¨h3— éTU× ¬&"¦Jú$iôù’¶q/YG{›ôåÿÒÙÝs"⡟ÒVñl…ÃI•´Ï“ô\LÆ ϱû(©rë§H…ìþVlToiÒt¤GI=Ô'ÑyÐÎ^' C=*"^(8ž–‘´éäÌ“¤ïý¯ ò”ZCª˜úÉ|9€.)²‡p:©Š&¤3\7ÓWŠ{Gà²Ç«~ù͘Ɠª2íZãÅVY¼ìzHš‹4é{¶òÆyòð¤1Ûc€s%}¥Ô{$i`ÑHåˆË=Oúcl)iŽ&'æøEª6Zu‚¬¤µIÉàhR±}·$•ˆ™š»ñ+=^úÊW\¨9".•t%}CF·¶Ê¯]7r⛋1ìK*Äp i¨õ¶Ëû(2 ¬ã“Å*ÈŒˆOJ#Zš`æ¢ ;‘NrÝ"i¿¨°”” ,"žÊÕK?N7˜¿‹¾/t«åjìÜèzqŸ¤];ò0Ôfí÷I«‘F¡ K¶ìDDLˆ£I_nGæ ï{Tdåè|©8 "A¾,ïcûR2(i^I´ãçè§ü »DÒoH]ÈûP½JЗèKxwž“4QÒ”üÜú?!ŸÑúW¾¹ð”¤ó$]*éªþí‡*/UÁûtž¿WÍÅô%»ó“†ÌÞßïòýžÿQú*¸þz€˜ÞŠˆ“I½ÉG“†ä¾—4,÷Ïꞥ†ÜCX¿~™{ ­‡åÄo-RE¸íÏ´®‘çÖ­G®¤Júd©²v£$½Wi]°a-"žŠˆóŠŽ£DÄÛÃ5ÌsÊ;B>áÓ1ñ´ZDü¾™É`Ù~§å}W>â°U:á [Ž”–­_ÆÚKšOÒÙ¤£M#â„~Ýþ$% ív pC¾¾$©튤²É«EÄ­¤ñì¥!3s&ž—®VåX_£/±(U7ÚŽY+„6¢t¶vQRA„jlð8æí£ ¼¾$ñbDCJ¬ö#%†®Ë½±+ÑMßbÅõ8˜t2àIŸ¬± o13"Æç‹“Aë*‘ÖýÚ’ôY¾i9…ç%]&é0I—´‰Ò׋ñKæ'€‰’Žî¦ÄPÒ{$—ÔðšÂÝBÒ‡$}KÒI’ŽÈ££:‚¤’ötœ¤ŸH: Ó¾k(-Qu¥Òr\ìç+’®Èõ0ÙϤùì+4²k¯Nø¥^4,åI ’z½*ηPZDô÷¤DäGÀýzG{‘SÒ ¤¥u‚ÕïRºoiÒè“ï ØœHš3ÖÒ Mpé$çÇ$u‰ÊS:v^ˆˆÿkV€Í$é|RAŽrShnžºHZš4©%Ù³©~²¾Ñc¾›4'ô͈øq í¿FªÜ;‰4m©®Z ’D*Ì87iDÛö?c@Û–“û»¤FD/Ô‡èz® Ëw;}ÅYN`¿ßà±!‹ˆšhÏgé¯È—òû%õ‚U{Þ à?ùRkLo†l6]îòß‹Ôã9 8[Òý‡[DÄ w0I+Ó·FáåñË:ã|TÒ·IÃM§³ÂÒïmC$ñJN /"½/#"â´†£3³nÕmEef“O^ž/HZ„ôE|t¾,Öo[šjý.¥û žé6—»>{]bákÀÞ@]Ÿ¯­&iR2øiö;€E¨pâ¼ Ç’~ï HšJ:?½…Çü"i$Ðk(é}¤ ì/‘Š/ÖxåŠæ’NÈ4ZyõHÉéç_Içâ=¯ÂËËnO>X¥*Ñ«ÔvÖbgÒ¼k@DÜ$黤á·ÛgIú|£Ø’–!-1˜LúÀjÄoI áØ÷ÓjMI!õJú8©·üÔœžÐè~ÍÌè€3¨»:¡¤£I½mÝÒ3@D\$i¡Z>góüþEHK6uãî óv|D\Ph$••âûaô­<[ñ»\oROì ÅTòÐÎé¼gù½?ô=þ°ˆhx-ëˆØM’ý]ÊÉå~¤ä7' ÿy£ñYk>‡0"‹ˆ;Ên?_­7.¹®†ËWª µ´¡Éóõ~˜onBsÖKü8é,Û$Ru´ŠHkU­èP*%„³-J\HëZíDZ¾åxIG4c¿ffÃÀŸsaºŽOó¼Á©’¦/JšísQÒz¹Í/%}x†tRuJ5Rj÷\ÞÏîù®ÝKûΗEÚñ3Õ`‰¼íÔ÷gÀø$}QÒRáÓÀë’î–´u…¶ËHº@ÒÓ¤Šì3$="ižüøcù=Û/?åýÞ³þóñ¶#¿›´ÌC]$-_~ÒïÞñƒ>q‘–_(̓ýÆÇ__ÒdIÿÕ¬Õé­Í:¡‡Ð:\D!éYàÂ*=·CÝß©¹ÀÊUÑÚµ¹:MiaÓæDÄ IŸ%}Àü@©Úê·ºôl±™u†Â{wÃ=B:i8 X‡T ¿¹HCe?Iª•ð,)!\øµ¤åóñ»€9I5–$õ´–÷lvUÒ²ÀOòÍõòöC’~WÖl¿¡|×PZ¤ÿ:Ï%GĵCØ×gH¯/ôÍ;RÒ>ùú‘ªálF®y&i^ë&¤± %-Õ]È5$n'½·ÓIIÜ‚ÀÊôuÌÜ ,”ï[–”„–¯Ïùf¿P÷ÊÛs,(ö&Pú[Y”ÏßÀþÊý‰ôsŒ‘´i•)F»Ò—xïB1! '„V£fGŒˆ–.°Ù¡š6d´\DÌÌV¯GëIڳўW3ë]ŸÀõºˆ8@Ò8_`~p!©ºøü¤ddQÒú;"b˼¯3IS2.‹ˆ}ªì«ÝF‘¦õ”“/%‡0´áÂ?!Ug¯äb æ„X›ÙãWvýú’–ý£líë|¢{")¡Ûˆ´F6Ài¤ŸûvÒâåÏäö«’½ˆøx¾ïxÒÂë"b Jâçíe5ÿdäï ãò±Ï!ÍûkŠ\ïJR¢·1}UøË]ìO*dsE…Ç­MœšµOKBx§ Ã’î%M2ÿ¤½#âÒfËÌ:N©—¡YK8Áìl¯»çioJz‚4 £–׸—´ÔÀ À—sHóÌ€T±}ˆûüÕ{µ†ºÌÓÑô­ü$)ÑÞ–¾$ý¿±\àmÒRgË1ë뿤eÒ€-ò}‡—’ÁüüºFHIZˆ¾õŸ'Ö³6*Sì_©€ˆ¸FÒ’ÀÛåɵµŸB³öiYBX§IºŽ´lÈ%’N¾QVÅ×̆ŸÒgù°\tÛf3£_ÒÔ5‰{>y9@RièêÛu$åû¼ª±å}Í ÿ¥•x«R|’ö -Õ0P">–4|òòjMPZ§z³%í4¥žÞª5è†9¾½ ð¢2f=¤å !@D<@žñ¿¤³¯·KZ·•Ç4³B•¾pvK-³¦‘tk.LRérv‹Ž¹ i9Q¤j¶ËŠîÝѯiùÔfUB*oç¢oþ]§Z*o¯Ö@Òšyn©È ¡Yû4½¨L5ñfD|ØŠ4yý&I‡¨ì”§™ ÍN=dtx(­c¸F¡Q´Þ“¤¡“•.SZtÌ5I Ù àñ4°LšO8p…¤‡HÅh*Íe<ø#©ÐÌc’î" ^‹4ü³ü½(½gï‘t5©ÍŠÀ×#⩲v U鬻°ŒÒr%¥B2ïËÛ­Ê~÷¾ž“Ýzö½8°%ðÕ Æ”Š ÍK*.ó÷zŽes¡YûŒ¤IkED¼Ÿ&•©Þ¸GÒ¯$­ÜîX̬%J'wÝCØæ!%;“ó†ôý¬tß:uî÷Bà¤÷ñ#À7ðw¿†EÄ£Àá¤ÂÍ/^ïŸVhû'Òú˾l¬KZVâÍ~mÿœ˜÷»%é=û³wà”†Âî$©‘¡¨«Ñ÷{¶b¾oå²ûj`ß‘âþÓˈœA*4}ÿw¬òre6H €ˆèØ(¹ø6QØXù<\åPÒ™¸ysïEć°ë"b\ B4ëjEü}HÚœtf}‹ˆlÉ‚Zö·"iˆ×"âÜF÷gÅ’´ °4©GëñvŽRîr•Ñ倧#âåÚ Íû{."ªNÉû]&ß|¢Ra¸²e"®"}·è˜/ôy‘ù»€·€u#âáÚžJªwpXDü¨M!Z?>KdÖ>óS@a¹ˆx>"# Óøi«‡$"ié"c3³ºy¡U¯Dăñ°“Á抈W#âZ’ÁÜþõˆ˜8P2X¶ß‡ò¥Z•ðƒIs ·&-áÑ$-\JêùþFµdPÒ.’~JZ+ó^àäöEiý9!4kŸ9é9>1%"& 9ؘ éø<îß̺‡çšõ˜ˆxø0©pÎWr¯\'ø1i¾õO"âôJ $ÍüØ‘4Dv/U,•1kŸ9hÞÂÑM‘'‹UÒo“&©IÒéÀ¹ñŸB4³Z8!4ëAqŸ¤cò’Sà«ÀMqJµ1SÒüî±îî!4kŸŽKK"⿱°:pp p—¤»$š×\2³ÎÔì…é=dÔÚ*÷Y"⾈_t%ñò@É`Y;'ƒ höߌ{ÍÚ§cÂ’ˆ˜ì.é`ÒÃÇåbçÑAC_Í p¡U!ikàÀÙñ»ÁÚ7ùØãH‹“?GZ>c¶Q'’æþ$éÚˆøIǰo¾y)iøÍ€—Ê—ëȯÅ8àŠˆøgÙýó»"âê*ÇØX¸%"îè÷Ø&ÀÚÀ´ˆ8o¨ñ·B. ·ðp^^ZzìƒÀ»ó+Í}”4Šôù?#"ÎÌ÷}X øGDÜפ÷!å!æ¶^oG!+IË'ÿÓ΂<’–>Iz=_nŽˆK†¸€ñ’Œˆk›XDøâK×_Hg²£è8‰ñbàŽ¢ã¨#îUï’þqéKç`{`î¢ãóÅ—Nº××µù˜;æ¿Íµ›´¿•óþ>WôëéKÃïåù½œÔ„}}´žíŽ5´=±ô¹\v9¢B»RBÀxrõû:b{#ïãýÀžùú]eï’ï{]™–‹ˆ‡Ig·'ýSÝ“4Lç9I÷J:CÒ^øÞ¬m<‡p‘4g­Õž%–4oµÇ#âÇÀˆˆ8¨†}Í'iôB­fü½!"ÎŒ´ÜÅmÑo¨¡¤ €#H‰Ô1½cN-ÛNíw¤¤¸´ÔëÀÒùu;‹ô™öJ;•4w^Çq ––ææ½BßRWKKÚ›T•ôÀˆx¦Ò%-Lß ¦wä÷æ Òÿ†j DÒ¼~ƒ½g-7£#bÈh×r`Ë‹“þ¯÷GÄ=Q6|y("Up½4ïó¤ÁÚç„´*'„fíÓõ a™ˆˆñ±+°°9éƒýQÒP†sG$M’t¡¤ƒ%m(Éó–ÍšÏ=„]LÒò’¦JºXÒ.ÀSÀ3’ž—ô¥~moÊm·’t iØÝ+’~V^dBÒ„Ün*𢤿U8îgs›oJ:ŽÔ;󬤇%­•Û¬R¶Ÿ òSXºOÒƒ~¤%òv°/÷~wˆÇ{ñ )z‘ÔóóijCÉÅÀZ’þLJŠ.Ž&õ^îÕ?•ô9I÷“†ä½LrZM§%„7’~öŸ§’^‹û€Ÿ—E¿yŽ’–•ô;I/Þ³»ªì÷礓N_´P¥’ÎÍ¿[Kº,ïï%I—JÙ¯ù~ÏšNÒéýþ.¦¶qtSéïbF“ÐIÿ÷w­VüOÒ(Iw’Þ‡«íÈ_ÎÌÚg8%„ïȤÿÌ—ÒY¨w›’&öoJJ^“t3péCg"iÎÀómÛl8ñÂôÝm`aÒ½íH È}¤!e§Kº¿¬a¡ÜöBÒгkI…R¾Jš¿zanwOn· iM¸J½4óæ6‡‘†>ŒÎí lDú’~gn¿^ÞÏSÀ“ù¾r‚pF¾ï=y»¾¤òB6‡EÄÄÜ~Aò°Màì^œZDÄËnþ˜¯_“sIÉÌ'€SHó¯þ/"þUÞPÒwHÉâÛÀ•ÀK¤$r±*‡o8!ÌEN¶ É•1¹–}EZÒaRQ™eoÒ7,qßò¶’– ½¿‹’Nè^J*vò û}JÒI#ƒ*õJ-@úúéwê^Ò÷íHÃ.ÛßveÏ{–Ùß³VxœôóŽ ý~C‹;Ç$ýôš–Ï9ûý]ü."* §TD<– þm ìFšãÛßÀ:ùúWHÃÈ+îÌ_ºþBw•ù+p}ÑqÔ÷¸~·¯cˆE3€%IIáñÀ-À[Ì:©úànҼēƒI…2Þ Œ*ú5èä éË{]…|iÉû1ä¿&³Tðaù&ío•¼¿ÝŠ~={á¬Xö¿ð`þüw}U¾ï7emïË÷=¬šï;#ßwZ…}­Âc{•÷ûù˜ïÏ·góökS~ì  ûZœYÿ§Wº¬WÖ~Ó|ß¼Þs“’Æ ÀüýCšcÀÎe÷TTæsù±?7ÓÇyí¶h`ߥøö®ðعù±›IC‹¡BQ™²ö›äÇ®ô¹C:’äxô IDAT!¤ [æû¾—ﻺˆ¿¯*¯Éز×vt‹uÇ ïílÅ–†¸ÿò~* "Uùœÿ¦¿Tm?î!4kŸní!ü›¤¿GGÄuõì Ò™Í?æ ’F>xW"}Z©ìúHEkÞ‘‡wL$Áž›æažK’†Äô¿@ÊTJ GÑàÄïüÁso¾TŠg•“ÅUIéÊñ$M§r²Øè?â"ͼ¯ìöÿIº"Ÿ‹cݧ4dÔEeºß+e×KkÄUú"]*BDü ˜mŽàL+»^÷{yž¤Òïą́^(¦ôÙÒ®‚HZ›”°žNšûþ7`†¤?‘æ ®š›åÿhà a>iZ×°ÁAœÌÞ€ÇtBhÖ>Ar’´<°U¾lIòÓ_! lDLþ/³É 㤡U\ænåÏÑbïêw{Ò{ù‹b±b¹¨Ìð´|Þ¶¥,~›=•·{5Z!5; ˜D*rg¾}i:ÃOèKdæï÷ôæ·ÝM©QW/^ŽmkR’Uͧ"UÆÊ>w"MÕØø3H“ø ‘“¨-éKÇæ‡ž.'­Ç3…4¹»tyž÷;CFóæB儱-å©;U.Kÿéì/¤y/‘ÈEe†™\¤eï|óÆ"c)Sú"¾Fö5!oß-i¾&÷˜Ts(°>° ©ÀǤyë·‘ÂÍI½hëIZ<…ý4i=¿jÞ$%T¯5Ûk <|vH¯Òºt§zNêý|0'7’Šë@š ¸6é5ù›¤ä¤bD¼)é4ÒR_#*iµcHß•´ADTM~šì*Ò|×IÚ¬l¨m'Y3o+öòædð!`„¤oDÄñ•Ú9!4kŸð7—çBú§½iÒu¤yWGă<ÿCõδÖÉ_Tv¾žï:¾lŒõ÷gåòÿ% ç›HåÊUIZôR €1e• ××Û-¤Äa¥õêž–ˆˆÝëØ×mÀI‹ÜoG_uÔ–ônRsvDü%Ïw|ø4}_¨ï#͵{œÔ;{³¤‰¤)¯Q}HÞ±¤=S™}äFMòû±q=Ï­âdREؽ#"ò²#_—ô RõïÒš§“ÇC%­Iê…[˜Á§Sœì.éð|’¶•ÆäíbÀ®ÀêÙ‰¤sH= åK`œ‘‡sþ3"N©rÜMHso­ç¸-¶kÞVr¼©à¤“³é˜ákf= ­ ¡¤e$D:ktð{Ò™®E#b‡ˆøÙ`É €“ÁÎWFÄÖùreÑñXa¼0ýð±+i ‰¥€óMcèk–-FZ`gÒR•Ò}+ÖÛOHË0Ì |†ôårózv”{ZÎÉ7¿Y¾†b³å}ŸEñòõ|ü×IÕ/?Bª°z>ii‡ÒÒ’^§ Í;¬æá¼}h€6m#i{ÒߊˆÒpã_‘ª]^D*hò|ÿé¤!¤oÛ’þ‡ì<7Ð1òœÇ?’ä½jÛ$GÐ7*¨‘©;‘þ>Vvߎù¾÷Wh_ÞûÙqSL$mG*:õpu¥6q+©J.ôýoŸ}_Ùûi64’ÒÚUÙ‹–'­¯ë Ú¸±ã¬@ZWjOÒÿ9À#¯ÿÔ„ý_ãš±?³á¤ˆ¿I‡?拈7k_ÃþVî'U¼¬µÒ¢Õ)W, ÷Z”ˆ?Ù¡ÃÓÈ y/AÆøxDÔÕ3×"¼XøjU’%Í ,ÖÂÍóì§×2òBÒÒ{Ö©óÌ´ðBÿ÷,Ï•[–´.pMÅÖ$mHê5žHúnÓÒš’n"RÛª¬‚iKåßÑ©¤ ¹£K€;Aîå¾—TtïÓQµ—]Ò—DÄ•ÚxȨYû´´‡0Oºþ໤³}g?Šˆ'ZuL3ëžC8|LiÓ|ººEÄ ôU6ld?¯Húiû ’&DÄ_ph1¼Eê9¬ôXÍóÔ"âÑÁ[¯Ú²9ÑRgDÜ*é2ÒÛÍISQšJÒ»HCŠ·%%ƒjG2˜‡]# ž8´Ã’ÁyHìW~U-”´%°©èÑ4Òô¡Šc;žÔKp10&"öw2hÖ<‡ÐºRê¾/i8Þò‰Më±]D¬ØÂ©%«‘Nn¯ H*ŽÓŸ"ÍÝ} øh…¹…EÛ›”$_|y€vß'þ¹X;"®ÖÐ=„fíÓ’BIï#Í\Ø¿ÿq™YkÍEš–å½î4•¾"0ÍšÚ5"â’^þáßaëç6`þz‡%7à§ql›9§‘*ŒŸ‘çÃV3®ÖiNÍÚg}gò›BÒAÀIUÑ6‰ˆ;š¹3ë sÒÜDÂCFÛ(Wh<ºè8Šçƒuž\䧈ã6<»•ò‰““jhWóÏá!£fíÓ´B%ç'J ¯çdЬgÍÍàeâ­‰$½OÒ­’.”Ô®alff-á„Ь}š9dôdàóÀáñ™ˆx¹Iû5³î3’´¦Z³¸‡pps£I –ÿVRÕb ffÎ ¡ +>!½) ¡¤c€ýc#⸆£2³n· ðJÑAô’ˆ¸1"V¶Ìw}½ÈxÌÌá„І‹ÿæíÉ’¶‘´d¡ÑTöiAߺå9ƒG§GÄ‘M‰Ê̺ÝHš›º‡°Fñ7`2°”¤…ŠŽÇ̬Nm¸(­½·?p0IRô»Œ/6D¦#ób¢C&éóÀñÀ€ýš˜™u5÷«4\× ¡™u%Wµa!"Î’ô°#°N¾,Þ¯YÑU£&çíRÀ±•4ø%p5𹈘ÙÜІl¤¤ë ŽÁ¬$-ÜN Ò„…­nSóvðd‘˜™ÕÃ=„ÖK®Ù“òv©¡GË»EÄo‹ÆÌl¨œÚ°ÒÁÉ ’ž¡öÂÿ–6Ÿq6³ÙäªÅsâÂ"ÉÛ Â̬NNÍÚk5$„’6öNˆɰÂHš—¾ßÙÇ; Â­ÍjÁ¼õÂâÌ“·þÛ0³®ä*£fíUSBHš98¦µá˜U&i.I_&*Ü>,VlTVA+B÷Öǯ—™u%'„fí5hB(i]`{RïàËm‰Ê,S² pp:°LÁ!ÙÀFæ­ç@Ò¤%3IóÄÍÌºŽ‡Œšµ×d`´¤¹#â­*mŽ^Nj_XÖ*’, ¼Skß¾HJÞž%ÅoÉCF i~``/`!Re뢗623«‹{ÍÚki8Ö•”´°i™ ÷v!I—Kš,é@IÛO/JºYÒØ‚CÌŸ·€ñÀÚÀÅņcƒðÑblÜ | x!oÍ̺’{ÍÚ«|-Â'+<~ðîìf‹þÝ€õI K6.´A½q%ÍÅàÿ»gDÄŒzöS$­æãÕ³k÷ãQÒrWG„‡‹šY×r¡Y{MÎÛ¥û? é=ÀޤÞÁ—Ú•µÂF¤!—‡çë¥j±ëïi`¿§‘¾èrjû§” ZW(%„ÍœCèÂADÄ£qlDüÎÉ ™u;'„fíUú¢½f…ÇöÞNn_8Öb{GÄqq+pVÙýcª=ÁlˆJEeÜC8I‹Jº]Ò%y8÷ÜEÇdfÖ)Ëo5¼o6w·#ëKÑW¬ÊjójÞ.Thff ¡YûÝA:ó¾>©Gp`^àWEe]ãDàÂAÚ|FÒ^æÇÌz—0+Æ À&¹7æýTÿnfV‘¤yÅpáPýø%°0EÒQÇcfV(÷šc<°'ðEÒßáUņcÍW¹ÿJúz^:VDÜIÄi,Cz¯š÷Â…€H'ÅŸ^.63³b9!4+Æ_I‹Ðï ¼ÜZl8fÖ…–ÍÛÇ ¢û|…´á±qdÑÁ˜™ÍCFÍ ‹qüƒô¥äšˆ˜YpHfÖ}–Ë[÷͘¼½¡Ð(ÌÌ:„B³âÜÌCó B˜YoXž”´=Yt ]fž¼õ‰833œšé­¼õÐm3«ÇšÀcñF“÷;Ü{K†ûÏgfV'„fÅy/iá&Ebf]i]àÎì·t’jF öÝ –ÈÛg Â̬C8!4+Îû€G€-òòff5‘4?°Nk"iNIkJ:Øx x¸à°ÌÌ:‚B³HZ‚T2þR`>ÒffµZ›ôÞŠ„pî¼}kÀVÝe1ànàà àÀˆxµØÌÌ:ƒB³b¬Ÿ·ã¿ûIòÚofV«uóÖ=„µ™|X="Î-83³ŽábfÅXTáîNàà÷ÀÖÀ_Š j–ôà‘ˆ¸^ÒH`§üØ…1MÒfÀX·q›k³0i8b«­¼Í^r†aBӀY'r¡Y1ÖÌ_R.&_-6$3ë"[×·hßÃ.!43³êáªËÖý$@DtŰKIˆÝóí£o+GÄÄC”¤ë"b\±‘˜užvü}HZŸ´~éžqN öÿà`ˆ¸¿Ùû73³ÎâB³6“´°³.Hié— Ê̺ɎÀÛ¤¢T­àB3³â„°N’—´H¯‘t°¤5š¸¿ý%­Ó¬ýu™÷æíJwDÄÓ¤¡£{Kš¯¨Ì¬[ìü3"žoÑþš™õ'„C é½’ÆKz•´ íóÀ˹@Q1lÃ1ŽŽ®‘4º ûÛø?àZIëÖ~Z1o'ö»ÿD`4pp;ƒ1³î!iu` àÏ-<Ìp\vÂÌ̪pBX#I«&𠘟ôAù602_ÚËü’Î’ô)Qk屎É7ψ窴›KÒ¾’î•4QÒqìöo¤"*‹’ÌÕ›uÇ[ž4<ôÉò;#â_À…À’–*"03ëxÿCZGïÂÃ=„ff=¤£BIÛJz_Ùí÷KúX Ï[AÒ)’oaxÇ äë{#€y1À--RÇsÛ*'xË2ÀkÓ$œ ìFz}̬GIÚ”4ãvà'm8¤B3³Ò1 !)išAîËIׂ ÜCØJËU¸‡|)y(_&àvàLàÆüüIC_÷V" m}g~˜¤-€“óͤýÿ‹ï'®)=¶g¾¾`ÙsþœSvüY’Ízäuò>’ož_e¨(ñïw 0ôîÊBIc€ïå›Ý0ïnI`ª -s.ðUà8IŽˆW[™™uIk“þO>lÛ¦ÿ¥!£NÍÌz@á ¡¤»€%HsÕæžÌ£äJ±ýUÒL`«<ï¬]f2krµpÞ¾EšÃQ2½üI±+ýHÚøégì¿öÞÏJO>×ö{îœy¿3ɉŸ¤ÅéKŠˆsjøy†b,}=¢ÿhò¾g‘{ÃnÆ5W•4‚ôš~—TÀæ6àW-±Ù–ÏÛˆIÿ$õ:ïÞêÀ̬sä!ôGæZ?l϶éðs‘þ ½=hK33ëz…'„ÀQ¤Š_!õ•æÀm lK_±‘'gjëDÄãÀ;sþ$M'%tŠˆ]zn¸.iÞáR¤¡·òó*k·}…pÆ÷OsE| ¯Xv½¯{éËÖPÒ»€¯ûÓWÉô2`çˆè†³Ù¥„p 9„@Z†BÒw€ïIº1"~ÞÚЬÛäê¼Ûæ›—çGÖÅ$-A…r0é$Ù¹À!m˜7Xn.Ü;hfÖ3 O#âbxg±ò[#âwùöúÀ=¥ÛÝBÒGIs<Ö¨¡ù{Ê®ßÛšˆêR¾ÞÔ6oJÞŽ’4g¥$XÒܤ“G‘†ÓÜ ü/ðû.I¡ÆÂ2?6Nt{DÜÜš°¬Ûädðnúþ×Ü'i-'…ÝCÒB¤cUI'B7%Ðø0."þ^@hNÍÌzHá a™•€ß—Ý^• Êt"I‘zŸ#y‚4ð{̾€}yâó®vÄX£çË®/NúZ©ô³O©’ nO*^S*Ös5ðãˆøk‹ãj…åiñb-óÐÑ=HCbÿ i½6÷XçÚ–YO<­Ü%éù*í­=Ö! ¹‰4:dÒœ¼J×G”=o)Áÿi$Ê}í ºŸ¹ñ’ff=£Ð„0ÑÝ+ß\8@ÒnùözÀó’®þÇâPíNJ>ï,X/éHfOï/»þaIóFÄ5§¼`DÕVõ+O—#Êi¥ÒPÑA‡QU× ¬&"¦Jú$pp¾¤mÜ dÖÑf/o’ UÛ>KªŽü01":% s¡YIZø@¾9-"®/2ë=E÷þ¸Ž”|4l:i »ÍI''ÒYÃ)²xÙõ4p*}óÝúD<'éNÒzc€s%}¥Ô{”—ÓX4"nê÷Ôç×IÉà–’æhr‚ð`Ž_¤j£®Ö0¯­Xª²ºHÙC#ʖ瘇žJš—4$²tÜÙDÄ¥’®¤oÈèVÀVùµëÆ!£CN|#â?’ö%Î9øv³³®s9peCFu|² Xù$&±í M;™B³öZ¸"_!Ù3k†B¦ˆ¿GÄÑÀ_HgDË·Ï$%#߈£#âÂÊ[Ê®_"é7¤a¯ûPýÃõKôõøí <'i¢¤)ù¹;õB^â_ùæRÀS’Γt©¤«ý!"â)ÒrŸÎó÷ª9˜”/å‰ûne÷Ÿ9Àó?J_×_Ó[q2iØèѤ!¹ï% Ëýs>»Ö †ÜCX¿~™{ ­‡åÄo-`û|ñüAk53ë!…&„eVcÖEÅW#}M¬ñù¥ŸCMŒ©§7äëK’’¢Ó©’EÄ­¤EëKóEæ Ÿ],ßžVåX_£/±Xø,ia÷ë ¾ŸÒ‹_lÒ>+90o/æáÃË“Öt|øp]îíXy ‘Ѥ$¹^“N\ é3M ̺VDÌŒˆñùâdКÅ=„ff=¤S¾@¯Ê¬ ЯJšOQëÒŠy»ä@´5)Y›R­ADL—´9i˜å{€Wk"⡼€úÌZ°¥ô¼ë$­Cúµ*)i˜ü;"«r¬û$­ lCúùçËϹ«îŸpV燒–Åø¤ #¢ÒÏþúÖR¬¦âÚY’v'­?plîù¬ID¼œ*é/À5ÀÀÀYµî£¥^ÌWêÝAD¼™+Ù^JšO8""ÎmJtff‰B3³Ò) áj¤Ê‘å·®Òö’N"õ¦mœïÚJÒµ¤ÄèðjÉT="¢¦ÚóYú+è ^ºÿQR/XµçÍ •ÿÏbz¸¸ÖöCoHÚ‹Ôã9 8[Òý“ôˆ¨k~§¤•ãóÍË#â—uÆù¨¤o“†›Ng'„¥¢BÕz}k¯ä¤ð"Òû2""Nk8:3³dnœš™õŒNIdÖÊ–§3ë’ ÕœOõ*›{¥¬vq“¤ï’æìm œ%éóCéÉ«DÒ2¤£ÉÀÞ †ú[RB8¶Áý´ZSBH=¤’>NZªåÔœžÐè~ÍÌHß <‡Ð̬GtDBØ¿Šf­ë/y‘îÖ‹ˆcr%ÐÃMHk¾Ðàn?Næ: Ø""&7ãÛRÑÓGkRJ_mÆÎòðÑHÉðñ9)<¶û6³žæ!£ff=¤#Bëlq„¤g #¢Ñdˆ85X¹*"j<®QšCØpaIDÌôYà5Ò\Ï€o5Ú‹kf=ÍCFÍÌzˆB«I³‡#FÄ`…h†£¦ -3%íCJ Ö“´g£=¯fÖ³M/*SMD¼ß¶n’tˆº¤«™Ê=„ff=ÄEeÌÚg$0#"Þh×#âZIkgz ?*iÿˆ¸¿Á]/,é À#q½¤‘ÀNù± #bš¤ÍHkCºÛôR›…—ènNÍÌzˆ{ÍÚg$MZƒp("âňø4°°p¤_IZ¹Ý±˜YWð²ff=D^®Ì†I;$RÒ™À6±l1,  ìÌ œ |/"þ;„}\ãZ¢YW’î]ŠŽÅ¬HZ(Üy0"V/2ë=î!4kŸù) ‡°\D<‡c€ŸŸ’tФ¥‹ŒÍÌ:†‡Œš™õ'„fí3'ðvÑADÄ”ˆ8X8ؘ éxI‹™ÌCFÍÌzˆB³ö™˜Ytå"âéˆø*°*ðààQI?ÍÅh̬÷Ì…—03ëNÍÚ§ãÂ’ˆøoDì¬\Ü%é.I‡JZ¦ØͬæÁ ¡™YÏð²fíÓ± aIDLv—t° iŽáãr±Œóè ¡¯fÖ…Ïwn¦<Úa 9Ò“"â®Üv.Òú­å^Ïíü¿Ï̆'„fíÓñ aID<œœ$iUàsÀnÀY¤ŸáyIÛWF„{̆ Ib˜%„ÀaÀ®<þà3ùúHàŠ*í^tpBD §×ÇÌzœ‡ŒšµO×$„å"⡈8*"Æ›“QÀ%ÀÓ¹Bév’)4P3k†ÓФE^ªp©–ÜMž^Ï·¾ü6'ÎffÂB³öéÊ„°\DÜ< Ül\ ì \ <'é^IgHÚà ߛu¥òv¸ö€-£ú]ö¬Òö‚ˆX2"æÖ£o¸íÚ­™Y8!4kŸ®OËDDŒˆ]IgÍ7Ž>EZðþI“$](é`Iæù9fÖ¹Fæípí!¬KDüد쮋ŠÅ̬Ùüå̬}†SBøŽˆ˜Ú*¢ IDATü3_JsÞ l l–·ŸÊÍ_“t3pp0x,"žosØfm#i`çˆømѱÔ`¸÷6bBÙu‘7³aà ¡Yû Ë„°¿ˆà¾|ù€¤%I‰a)I<Œ²ÿ?’¦‘“ÃJÛˆ˜Ú®ø»IN4¶Í7/ˆaÿûÕm$}8X 膄p¸÷®*iz¿ûžŽˆ—kxîfe×ÿÓĘÌÌ å„Ь}z"!¬$"&Ì$Æ++æméúHEkÞ!i*³&ŠO¾°¾VÃåõá˜(ådðn`|×}’ÖŽ?k7’´,p&°>0xªØˆj6Ü{ÿ]á¾ÏçW{Bê>øi¾k:0¾é‘™™Ä ¡YûôlBØ_D¼Ü›/³‘4ŠÊÉâªÀÖô}i­I,vó’‹Ò— ’¯o‹¿¨mÒïë-¤^Á’Ñy-ÏN7:oOÊ=÷Ýä ˆ¸³‰ûÛMÒ'HÿoÊ¿/7ñ8ff…rBhÖ> 9Õ$ý7•Ïæ—ÆHë¥5r™»•?‡Yš3o‡ëì DÄk5¶X8_Ÿ Ü×µ"03³¢8!4kŸÀ¼E1䄱§çV2 \^\D–Í$ù³}."ÆWM$}8Ø!õîe~<<o™YK8!4kŸøoΚ$"fJZ •éHñ$°M¿¢2Ý`¸Ï!ŠÉñ÷¢ƒ03k595k'„ÖT9ôœÁÿ”´&°sѱԨTeÔ ¡™Yð—S³öqBhÖƒrâÞ KN@J_so³™Yïð—S³öqBhfn†_ïà}@ièç`Årf”µ} e™™u95kŸ·ñßœ™u¶…€‹¢™"âûÀ÷kl;´æ ™YÏp |³öq¡™uºÅ€^¯.jfÖSœšµÏ úÖø23ëD‹Ï„™™µB³öq¡™uºÅqBhfÖSœšµB3ëtî!43ë1NmX‘¤¢c€B3ëX’æÁ ¡™YOqBhÃÅóödIÛHZ²Ðh*{ ˜·è Ì̪XYd Ö2‹þÝ€õIÃðJ6.´A½q%ÍÅàÿ»gDÄŒzö|,o¯Šˆ)eÇ}?°uY» €[ê<†už±À´ˆx¦è@Ì̬½ÜChÖ^“óvéB£°vØx›4ür#Ra€õ€÷4°ßÓ€×¹œZÏŽó°Ö…òÍûó}sHúð`Ųæ+bÃÉX`BÑA˜™Yû9!4k¯óÖ•{ÃÞq\DÜ œUvÿ˜¢Ä e×'IZ¸ø©Wò"ൠm­ûÅÃEÍÌz’‡ŒšµQDL•44”І·"â¼²ÛO—]ÑÀ~¤Íuî»|xëfÀ·€w‘z&Í!,íû­:aFÒœ¤ß?Š™™À ¡YûÝlRtÖ"¢4,´&–]ß1oïvˆû%-FßçÆ[ƒµß Àܸ‡Ð̬'9!4k¿Û€%-ÏŒuIG¤ÙÅñáî;"^ô ° i‰‰“ÿ‰ˆR¯`ùÜG'„ÃÇjyûp¡Q˜™Y!œšµßíy»pE‘XW¼o6w7°ÿ[-€éÀ‰eÉ Àyûpeǰβ10ƒt²ÊÌÌzŒB³ö»ƒÔû²>NmèN.¤Í ìÿ8RB88[Ò—€G½€Ïç6¿ŠˆÇ8†u–Í€;#âÕ¢13³ösBhÖfñ’¤‡qa«CDÜÜÓÂýÿUÒe¤õÇÓ€‘¹ÉÀÑ­:¾µW^×ò}¤‚AffÖƒ¼ì„Y1n6‘ä¿AëD;ß^ηGæë¿6Žˆ'‹ Ìšn]`úÖÉ43³ãB³bŒö6n.8k¢ˆØ¸ÊýWjs8u‰ˆ·oK:Š4gqàÁˆ˜YldÖ›åíõ…Faff…qï„Y1þ ¼ l_t fÕD2!"îw28lm LˆˆÉEbffÅpBhV€ˆxø°]ѱ˜YOÛ 53ëiNÍŠ3XGÒrEbf½GÒX` <\Ô̬§9!4+Îø¼u/¡™a›¼ýG¡Q˜™Y¡œš$"&â„ÐÌŠ±p{Dàä‚Ã13³á„°N’—´H¯‘t°¤5š¸¿ý%­Ó¬ýu»ˆxš4ttï\ðÁ̬Ù~,ìoŒ™™u'„C é½’ÆKzxxx9(*¦‘m8ÆQÀñÀ5’FÒvÐYÒ>Àÿ׿µ°,9 \t f6¼HÚ8øyDÜXtø0p™¤oõNDL -±ð©ôùÙ’:æw±`‡’–ƒùaјY÷“´p%°°oD¼RpHffÖa:éKø¡@yÒÀ+5̉ã¿ÍH‰ÈzÀ/€/7IZ¾ñ•†6ÞçDÄÛùòXD¼Ð‚ãJÒœÀ¯IIïÓÀ~Q¹$íÀùú9ÀÆÀ^ÀD@À1’Vëÿ¤¼ ûáùæÆÀAM ¿kå £'{HÚ°àp̬‹IZ‚´´ÄÆÀ§#⊂C23³ÔI Ó¯ŒïwûáþòÜI±oOå‡4‘4äî\àCMŽo…¼8P#I[¤µ€¥II÷ã¤a’§DÄÔ*Ï[‰”H­Iêu|%?ïñ·œ ý&7Ÿ·ì©[Hú]ÙíIÑŒ9hÛïÍ׌ˆ—+Ä< Ø?ß¼üÿÛ»ï09«êãß³%»›M!½'3i¤@*%„€ E°! *(þDÁ Š ‚E°PD@¤(QÄ€ ¡…é;é…ô²}÷üþ8w²“ÉÌ–l™ÝóyžyÞ™·Þw²›3÷ÞsTõÂðüYÌÆîÿjàÓ)®q;vÏG׈ȯ&ÑAxo:“a_nÜ,"3ÓâÎ9—Vø›ò/ ?pšªþ'ÃMrÎ9×Nµ‹€0| ÉþàXRÍý6,ñ§ Á ªú°ˆü 8YDNQÕgšÙ¦Äá§ñÞÔB¸ÿeuSÂëÛ°`6Ñl8ågEdªªîLºÖåØÐÌ®IÇÍVbÁd.jí¨ðˆ[FË$%ù¿°\à©|èžß–´í  »§÷§:XUkEäX Û Bÿvm=/,—ı펪î‘«?Ÿ î‹çœ«WøÛõ àFìïÆ ªúFf[åœs®=k/CF#@>° Ì'KãâÃoOs®{ÃòcÍlÓ0,ñIüï•ûPÒúUIǽ|8.œcBB[£Àw=Š·`S5p6WïÇX[Mص›7x!ð¥„S<Ÿ°þÂpíf ó0O /ÿROU4áù+áØBù5ð(uî€zJ)<”‡çç¥Ù§¾¶Ž~^v¦yww¯7„yšÎ9—VHîuðöwdð^sÎ5$£=„"ò6ÿ/?¬z=T-,»[Dª€O«ê3"†ÛT5]oPüßÉÍl^-–ô$®gXV¥ ëËž£ª5"r6°H®½÷«ø¡À)ªú\Ò±¹á¼µØ=D¤?uE…—ªê]¸Ÿ¦MÝ—/Ô³_|m5°%$¡¹ö àÅþ=GK’OzÃæ³€Fg‘"ì=ý>–ÄæuìCP§ ª*"_þ‹õ¾žŸá&9çÚ!éŽÍ¿¿˜,>¢ªd´aÎ9ç:ŒLýÐ8ûCÏH9K2òÅðzaXËä^¹DÃrps¦ª«±aˆH9ÐýMU?^ß±¡ßT,tÁÉê†XÆ{âÆ‡—O$ƒ¡5ÉëÚ@$áùÚzö‹¿?»€Ïc ~ ±úŒŸÅ†²þ,ìSTÏyâ×ÚPÃD¤ÖCz< œ«ªÕ ß‘¨êÿDäZà"ò²ªþ&ÓmríKMqzxùTøâÈuba´Å1À‰ØT„#°¿å‹ø¼cçœsM‘Ñ€PUÿ "§o¨êýáu`eüu‚>a™21KO~’/"=“çëµ¶P{ï§ØPцLLxþvë´è $ÖÀ«ï½Žr½_‡çÏç«êz¹1aßÕõœgsX""¹©‚`É.¾KÝÏÁ<à&ìP§ \üBDÞPÕW2Ý ×>„`p!uÿ×,‘Ã=(ì˜Â¿g~xaSFÓ–‡a_¼U¯aCåŸþ›¡/sÎup™î!Œ‹bCãâÆæ&) Ë‚ÛHÚVÃþC;[ˆ…Õä+¶`É@Ö„¶ü€ Ø'þñîÕml¤­ Ïûc÷J,áy–ð禄¤ñ9†{(Í¿÷Íi‚Á3±žÆx²žgã_(tfaèèØØEdšªnÉt»\»p:ûñ4˜/"[ÓìïÚÆdl ÈËÔxñG^ŠuñG}súK±ÿ‡WaÓ âàžVºçœsY$caèI‹'@9,"ï ¯'U"2xKU㥠ℇÔsêø0ÆUªZÕ‚MnŒó© H? ªû Ö‹È5¾“ðüd)PÕŠF\'± ¾¡˜+1FݼÌd‰í¿YU!"ݨ«+ù¿®*ZßPଥª;Dä£Àà/"rª÷9×®)6½*<ªž§z$o/ÇF`¬Vû—@Î9çZS&{7`Y4»Çc½>ñ¡ƒS±Ã윔•Xð(iæIÄçä­h…67¤Âs‘<à·ÔÍw«ÛAu‹ˆÌÃêýÄ’è\ªªÛñc€>ª:'éЭXoið>ÉiáaIh¿`ÙFÓ%'x +õ0¸TD~¯ªñžÝŸñì˜i³ŠH6$2~ݨêã"òꆌžœÞ»Î>dU] "ÿ‡%ÎùÖë²ÛSÀ"†Œ“ýË‚Ì _d¢ª§f¸)Î9ç\£d¬ì„ªÎSÕë€êkÂëbå nUÕëTõ ÇìÁÅ|,ˆL帰üwk´»¯&<LDþŒ }½û8•ÏQ×ãw.–­3&"›Ã±”Ïp¼×m°NDî‘ÇEäŸÍ½‰Pß1^òì0/Õ~5Ø¿Xð·HDþ-"‹Â}<¦ª³ë¹ÜiÔepýS=mªRÕ[°a£×a½ÅS°a¹dCiUýðàšÐcè²XüÎ Ÿ?èœsι&kuÇ[ã½bXOY©k‚õ¶\’¼!Œÿ6Ìæængcüx)<ˆŽ`uïHu€ª¾†eŠ[Vå`‰ú…×éæˆÄï3~­Ob…Ý#Ûø$ñ}Hñ^Ç©êÝÀ§±9.¹Xæ»x/í¯€³¸Î—Ãr%Ðàœ@UÝ®ªßÃ,| ?̽±ÝW±/þj޹,¦ªµªúDxx0èœsι&k eÿàïPl8äºT;«êÃ"ò$p®ˆ<«ª„}™IoÆ ~VUËSß ïÇ‚µÍévPÕr9f9Ø ü[U—†êeÿ„-ñãf‹Èdlè×XlxéfàMU-Is­E"28  Ã1óú÷÷àJ,¸»^DRÕ”÷®ª÷ˆÈÓØ\ÐqØpÝ×Tu}}‘ó±úƒ?jJªtU-~+"Ï`½ÁGw6ö‘ªV†ù·có ‹BPîœsÎ9ç\“I¦Ë‰ÈC@©ª^^_\ ª“ê9¦ëqû8–v{-6djVÄþéVox‘Xg6_éC-5WODFaIRúbõÓ>ÐŒs} nº\UÇ4´g "EXFÛ÷_PÕÛÚðÚ³TuV[]Ó¹ŽÂ?œsM%"ã¨KÔ·DUÇe²=.û´‡€p*°SUW†×£€bU]ЈcÇÇbsÐÞ^÷4Ü-+F¿.¼üp7ë‡FD†/b=›©ªº±çË%ÌÑTUiNÛ:é<|øšªþ¢®;ü¯s©øï‡s®©< t™–ñ!£ªúfÒëFg -SÕ+t-DU¿2~ 8«X_MÁÆø  nNlN0ÚX#’5qà>aøèǰ@ýçaøè2Ý.çœsÎ9×qd< tퟪ^-"ï5P`¾±çûmèÕûgB™ wTµZD>‰%õ¹>d[ývs{qsÎ9ç\vð€Ð5JKGTÕ_µäù²™ªÖŠÈÅXPx50MD.lnÏ«sÎ9çœëüÚCÙ ç\3©¹¸«Å¹@DÎÌp³œsÎ9ç\;ç¡sHÈ6:˼û˜ˆü&d$uÎ9çœsî:×ɨêb`pðyàÍ×9çœsιýx@è\'¤ª•ªú à$ ;0GD®lLÇêœsÎ9çÒò¤2ÎubªúœˆL~‡õž&"—©ê; Úž"ò`¹ª¾("Ý€…m©ê9íûø>Y¶OO`'Î9ç\á=„Îurªº]UÏ.ŽÞ‘{DdT†›æœsÎ9ç2L¼\™ë DDTÕ‡DÖCDúW—ÀÝÀTuUÎ1@UgµBëÐü÷Ã9×T"2ˆÜY¢ªã2Ù—}¼‡Ð¹,¢ª[Uõ*`$ð+à“ÀRùµˆ ÎlëœsÎ9ç\[ó€Ð¹,¤ª›Uõ«À(ààb`…ˆü\Dúg¶uÎ9çœs®­x@è\SÕõªúE`,ðgàr`¥ˆü,$£qÎ9çœs˜„Î9Tu•ª^ Œþ|˜/"óEäJ’Ù:çœsιÖàe'œsû¨ê à|¹ø86ÇðFà†,ã^ ¨ÉX#sî „:¬G‡Q X,ÞÐe/ ›Ÿ–p¨[€Õªún›6Ú9çÚ€„ι¨ê&àfàf | øp'P l‘3¨jUæZêœs ‘£±DZG¤Ù¥/°5<Ÿ<šæ ì ëì¥zœs…„ιƒ¡ªú„ªžôŽ®Vgaï—‹ÈyHD¾*"GŠˆSwεµñ ÏçÄç Æ©êbU­¬ïªZ£ª7…U¹¤~êœsŠ8sÎ5‹ª–ÿ xâ†ñÀLàØ°<+ì^*"¯/óP¢ª Ûr®Ã‘à\U½/ÓmÉR% Ïo‘jà™äÀ°‘–'<ïÓ¼f9ç\ûà¡s®E…Y‹Âã÷"2 ãAâU$üÿ#"{Áaª¥ªîh«öw$!Ð8=¼|JUk3Ùw y/p;0ð€03þ |èŽe}X&"w·5ñ ©cž/h¹&:ç\æx@èœkuªºx8<‘"`$öá,–ñçïÅ’Öì#";Ø?P\ìJñ(ëŒRªE"rxg¼×ŽHD†wÓ± –ë2ۢ쥪ËEäÀ_€¡aõà‡ÀU"r•ªþº¾sˆHWà|à’°j :ç: 9¸ε/"¢ª*™nKgꢪ³Zñ‡:XŒ/‹›xÊrR‹¹dFà°¤ugªê™hŒ3"òösš‹õ ÆUs2Ò¨ìñU—ncê.Àa•´ù‹ªú›°ß©+;QT=€øß— à„d˹f‘qÀ;áåU—Éö¸ìã=„ιv' }3<Æb k3ù­yιöCUKÛ€ÛDd*p uC@¯~“Ⱒ𠟮PÕ­Ü\çœk3:ç:œ0fõ¼ÂTCF§2×"Ô+€O±ÿÑ-­Ù«îšFUß‘“±š„½€!"Ò]U“ËOÜ<‰ S_åC²s‘„Î9שj­ˆŽ'•i—Tu-pjRR—i=°Ò[ñy3kÓì³XU_h½Ö9ç\æy@èœsT}Î`;¦ªÿ‘Às3Ý–,öo©^Æ’ÁìÅôxUðß#ç\ó€Ð9çœkE!p÷’™“ fû+À×Ú®9Î9×¾x@èœsιÎìÀ»ÀDl¾`>°+2ðªV'ì¿x><ߨvÍtιÌð€Ð9çœsV¨1XoÁ¤ýÿÌjµ9ç\;““é8çœsÎ9çœË sÎ9çœs.Ky@èœsÎ9çœsYÊBçœsÎ9çœËRºNED$ÓmpÎ9çœs®£ð€Ðu«Âò9UDf´5Î9çœsÎu^vÂuß~\¤è,|RUÏhãvuV"ò•L7¹v¨¨Èt#œsιÆò€Ðu ªz§ˆ,>LþI»ù‡´–Sü"Óp®šÿ_ãœKCDnNgÿQz‰ŸÇG‰ÈÚ¤Ãj€«Tõ¾ÖnŸËNºÎ¤¡!ÐmÒŠ,pL~4Óp®úL~žÏt;œsíÖ/Ï’þ3x0$iÝRàÁÖl”ËnºNAD.~ äÖ³›kßB8$Óp®ò¬Vιú¨êb¹ø ÿ/ãrU­nÅf¹,çIe\gñ,üp0HU%éqVf›èœsÎ9Ç÷í€6°_ ð„ªþ³õ›ä²™„®³ ª—«ê?Tuc¦äÜÁX$OqÎ9×y¨êà[4ÜCX |­õ[ä²uÎeµ€ò4Û(úÓ€I´ÎÀ-XŠÜ§€—°l=MIáú<ðŸFîû-|2­sεw`YÑ'zº‹¿TÕemÚ*—•< tÎeµîÀàQlÈÄ™IÛ׋=ÀÉÀ}X€Ø’ö›9¸ÿø"ð6Öþ!Xwy¿„}^‚ÎþX@èœs.³TµVD.f§Ø\ l~ئrYËBç\Vû"pvI±O–îOÀ1X€Ø’=…#°´s7Óôô”OcÁàû[€C“¶?<Ž‹Á{s®½PÕçEä!à£ì?+ø¦ªîÊLË\¶ñ9„ι¬×½íùX¶¢\,÷÷+­Þ¢Æ» ˜…†ÉÁààØWÍ×ïkÓ–9çœk„+€Ä ¢ÕÀ›À]iËJ:ç\#ô‡çïÔ³ßN ´‘ç¬v7£M{°aâÀÿÌk€ó€MØP×o7p®Š°oMûÕ`f¢Z`G#Ú·ð¯½sTuð“„UyX™‰Ú 5Ée!s®VkÂó“¶Õ߆bóôzã±@-•ÙÀÇ€¾@O`$p+ çOÖ øW¸n²ocÃO&ýöwc sºbCW‹€³°a±‰^~ Œ>Ö½„õ:öÄîy46ô6[±aÿþÀ(¬‡³©÷íœsÌ Ô}×vŸª¾”ÉÆ¸ìã¡sÎ5`ðùðü,pŠSàblà XáV¬wîàÇIçúp:ð`-Æ£> \×Bí}ûº9ø+û'˜IôEà3ÀTà]wO•¥ IDAT¬—ïa,<’ý‡Æ> ¼”eÀW Xà{öiæ£ØœÆdß¾\®³¸ ¸øÜÁܤsÎuªZŠ -¾‘áæ¸,äIeœs.¨>œðº ”–a g®~tÌ÷°‰7ŸJXÿ],AÍõÀEÀ¬‡ñ l.âãX °ž²“€™Àëͼ‡ÕX ªáÚǦÙï1à7X0xuIrÎNÎÇz s€…íݰZ‰³€yXÏb\5–ÅôA`bÂú{°`÷ËX w ð ð,÷úäÆß¦sÎu6÷¥ªê¥h]›ó€Ð9ç‚\àãÔUÞ„õþ=Nêa™ÕÀ¯Ãó—€¹IÛ˰ùrÏa=†¶cФ¤}»§Ò¼€°8ËU~pe=ûÆÛ}fLD±@x6‘‚õj&–{“Öß–K±ÉD«°àõ < tÎe/UUR'ºv®Õy@èœsA< ›{w6ÿîó¤×aõý`=jÉf„åáaŸ25Íõû6±½É®^ņ´ÞMý¥1^ Ëqi¶OÁ†‡ÎçÀ€0)Ö)°{o?˜bû ¬¤Gr€ìœsι¶á¡sÎ¥0 ry6Œô5``Ò>;Ã2Ÿº9†õÙ–©‚Ëæz«CØxèbŸUX¯ß‰X†RH„Æïµ¹Ù@÷b=©¹Xï`a3Ïçœsι–åIeœs.o`½Zk±d)IÛãAÓZꂽúD²¾²cÖË–Üå¨4û}¸ûLX·1;ñ6jfÛºÅX&ÖÍ<—sÎ9çZž„Î9—†`C/G/s`/`êæ½½æ[¨«8Ôþ—f_MZ6F96opV.âKiö» ËzAx}\X&Ï{ Þb NmB[ÒyX¦{vsà¼Cçœsε sY¯<,+°„2‰Á†cbAÕIÛ€Ž_Àæ&šL§nîàeXÛ£X:¹D÷`KÁ’Ã4ÖeØ<¿ÑÀ)¶o~ˆõ §n®ãw°šƒ?Ã’ß$º+qq8&Q9é‹ÐLJÐîNZÿmìýû.–™4Ñ2láßÒœÓ9çœs­Ëç:ç²Ú€‡çŠõ A]r°$0·bÙA¿‰Í'üð ¬LÃmX`6›o8ëQ|+ép|8O1Vð£á:wa%'žÇz!/ÅêÞŽ™çP7Ì4•ÇBûÁ×Äz~;€õÀêÌOQ—hfèž•»ø*V0þá~>„ÕVŒ{x ë=Üî÷}á}Øîó¯ 튄sŒÇ ß?Þ¯“Â{tÖ;ùw,8=¿žûtÎ9ç\ëñ€Ð9—ÕÞÅÊ%\›°ngŠý.Ɔ~ÆçÜ%ö‚}‚yV£o 0+О<ï½Xi‰»€7±d+×cAÒ“À'îXÏ^rÏ]²þIínÈ…I¯OÇzìÀ‚âÍÀ0,ð;…ý³”î Û¯ï)¬Æ‚ÂÓ¬'±¼/Å~+Z§y-ââú6ªjk›¦´™QaYžÑV¸}< tÎí3lذšaÆ%¯. ÊËË{®Zµjp,#‹ñXI ±eËØ‹¡ee×Ô0"'‡hU‘;‰nÛF¤¶–þ¸×4Û€’œb}ûëÙ“’.]ˆÕÔ°77ŠŠè?|8‘Ñ£‰D"LŽFùP$B$¡°°þL3fÌ8`ª²~ýzb±%%%̉Ÿ?cõ²eTîÚEnECòòˆªÙ»—ÈÖ­Dwíb(þË9—ÖUÀÇ€EäDU}.q£ˆ ä«ê‹Ië»gb M¶ŠHlˆêZU}'iß\à`8ÖÛ¸PUKÓ5( a ôſɽ™¸¿ˆ ®ÁzËÞ‘H|[bo ˆtÃæ>>¥ª»R\§8n¹ xMU·§iSÏp®TµJDz;X ¼­ªšîžê#"E¡ƒ­À+Éí‘~@1uÃ_GˆH°ê`¯ëZ†øûï:QUõΪæ‰#æÀÒÒRâÁb,£dùrb‹±yÝ:´¬Œîµµö!¿¬Ì‚Ū*"@Ÿ–l½Ki'ö[RP@¬woJŠŠˆ‰°+'ŠŠè=p щ‰Œ¹¯§/‰P\\Üæm­©©aݺuûÆX,FÉ’%¬]±‚ê={È«¨`Xn®}ñ°{7‘mÛˆÖÖ2„ö1)~ð<<¯ª³2Üç:<ùp;p«ª~©}o®žPÕ3C÷ `&–´änUýLØwðeàt,`;8¸èNy¦ª>ö? ¸ 輌—©ê“ÚqðK৪5IÛ‹°áž9ÀˆÄ!¡'p3°BULJu7ß~®ª_O:×1X†Ô?ªêE ëÓ„ñíg“ÐC("“°L¬€1ICQó±^ÌÃãKUˆÈcX°{#pM¼1lƒ }YUã=|õJ¸§ÀxU­JØVˆ•LQÕù Ûâa‘„íCÆzCWþ`¥ªV†uc°Â¡»[àü‡b¿@7$þÀ;çÚ§ž={2eʦL™þðÛ·mÛfãòå,™;—g-"VRÂî;òrúUU--µ^F,XŒ`_{¶wØ„”BЗŸO¬kW6åç£EEõèA$%2aÑ©S9rÔ("‘ýúõËh»Û£.]º0fÌÆŒ“r{yyy]Oõ¢E¼¹`±¥KÙ´q£Í…­ª²d7{÷Úg,`ìÛ–7áœ;ñ¡žóÅð_’ƒÁàt 7–üdÒÜãD¤GãÞ#É;ªêÿDäýÀƒh_²O…kߟ<1Ì | ÏRÕ.üCŠÏÆkò  íˆ÷@þ)1 í(‘°€ðerÈèD쇣7P¾IX‚e‡úÏÁœPD†bÝÝ'c“fs°.pëàz÷îMïÞ½™>}:œ{îÛ7oÞL¬¤„Ø›o²`Þ<[²„Øš5”íÞ”—3°¢‚HEž`1ŠehÊ_¾ƒU¬¡.à‹aóù6P[TDA·n :”衇™2…MJ$aÀ€¤øâš¡°°qãÆ1nÜ88õÔ¶ïݻׂÅeˈÍË+o¿MÉŠlÙ²-+£gU•õ,ÖÔì÷³”}}±Îµ;#Ãrk}É^šhtXÞ ‰L§4 í‡õP¦ ~Tõ_-Ô®‰aK³}^XŽN³=•ø¾¦üÑiv¸ Èd@8û¥O\…ý.kÆ9g` À,ØtœˆŒ O«êÝÑujýû÷§ÿþuôÑlSU6nÜHì­·ˆ½ö¯¿õ-_Ϊõë©Ø»—œòrWTì×#†A£J!Ô`_­ÆHèåa]a!Õ……t).fØ ADG"rØaœrä‘D'NdРAää´‡T(.®¸¸˜‰'2qâÄ”=Õ»ví²¡¨o¼AlÞ<^X¼˜ØªUlÛ¾ÊËYVQ••£Eä+$| ª;ÛøVœË6G…åS-xÎøŸ€|U]\ߎ"R…ƒ‚ýYhMñù^éÊrÄ;Br³¤®™2ŽÅÆ*'¾.Öì Uõ!à!€Ð]~Bsè:ŒëÂòžL6µ_" Aƒ4hï9ùä¶×ÖÖ²~Õ*bsæ›;——Þy‡?Çb¬Þ¼™ª½{É+/ghm-,Ÿö&ìSþšÜ\* ÉëÚ•¡ýúÙܽñã9aÚ4.š1ƒ!#F›ë;“=z0iòd&MžœrûöíÛY´hÑÀåË—_¾páÂÝo½õVõŠ+òûöí+¥¥¥eåååëTµKï~gÛ¶Þ¹ÎID&`Ù+Áæ¶”Ua9µ¡Uu·ˆ¬Â¾O‹Í[l-ocC‡¦Ù~XXÆZ± ñv¼·´Ã5S¦{—%½^îuH\c‰H,›Ö¹Xïàõ™mQÇ÷¥/}é©;vL™4iRá¤I“z7nÐСC :{/VNNC£Q†F£{Þyl¯©®fío{åÖ/_ÎèÑ£ùäQG1lútò󳻜ºª²±¤„ØË/S2w.±Å‹Y½z5½ºu#2z4ÑÃ'rÔQŒ8úh Š:ÂŒÎæéÕ«3gÎÌ9sæÈTÛß}÷ÝÊ%K–lX»ví±ÀcÀ–¶m¡sKHîò{¬ê>U}©)‡7°ý lþàa"r¨ª.IÜJ?|x$ÌA|ËüùERœ‘‘ÀYªzSÂêj7%Ñ#À7€“¨ûR<Ñ{Ãòþä&$-Smkj;>ÚñóýNfå(f¦i‡kgÚ4 ‘éÔ¥²=Ø."ñ’©@ðz¹ª~»-Ûæ:ŽP¼õKXMXjæ‡oÝ]3Üzë­?Ä ÔF€¨ˆD GuíÑ£Gn$©2dȘ)ãÆsÄD'OfàÀ~ž[n^#Ž>š)†£fƒÍ›7{óMb¯¿NÉ[o[±‚Øúõ”ïÙƒ”•1°²rßPÛ#±*ËÛØœ9¼< ¬ÊÉ¡¼ €œ®]Ô§Ñ#ˆ„9“Ñ3>vlV×ýúõëÒ¯_¿X6ßnx@è\}ú§Z±áXàó-ìïÖ“Ô%uI/w›ªÎN$,S&VÕí"r%öåó#"rL|ªSøRúOX0÷6LôZ,@¼HD^TÕ»Ú<¸ ­Ã ´w½Œƒª:7]ûUõey8[DÎSÕû®ó5¬àßRÌYŒO¥D]™Ö̓lU}FDžN‘¨ê“ ›¿ L²»¾’tè! ÷äYFÛ6-;Òä~Kör ð4–\ì3ÄJ¬‹½DUÒÌkŇŒvUÕtc›]""ƒ°^À ¨þ/઄ÿ8]+ ‰ŸFŽ…Ã?ÄòóÙPP€RÜ£#† #:v,‘É“‰NŸNdäHú÷Où÷ܵ#Û¶m£dÅ b¯¿Nlþ|JBBž½»vAYýËˉTWï7¿2ĵ«Ôcÿ$;« ¨,,$·kW† @täH"'™>èäÉ :”¼¼NW:7Š¥rî"2+ßp2PŒM)JÌ@ß Äjç©ê³IçÈÇz¦ŽÂ†4ÖÏ`CJ÷„óŸ„}&ÝÌ>¯ª›S´ç2¬È:Xݾ*,èz«X™°ï`¬ˆýÉØgÚEXúÞÀGË/„ý¿ ü+,¿8«ëWü_x-Øgä7Tõœp\!p3öyú,À;&<îþ/¡ôÆ9X /KxŽªÖˆÈíá:ñä/¯`LëK¤o1螇}ÿW‚êG¾/:/"_Ææx;æ/©jrìÚXFê†l k€Éªº ¬Û\©ª-2ÌÂÎCDºb=ËWbª€›Tu^}Ǻ–'"³‡ãg'­/¥îÃ} (ÉÍ%Öµ+›óóÑÂBº÷ìiòÇ·`qÌ"‘}úôÁµ®;wZæÌÅ‹‰ÍKI(Ù±kÇ(+£we¥•ìó$ãA_qÚZƒ}]#!AO—.¬-( º°¼âb† l_<~8‘iÓˆŽÅ!C:b‚KADúQ—Á2• 쿊õéJ‹…!‹Ç¥Ø´ èM±mNººx"Ò 8ë™ÜüOUßN³¯Ó±‚òÌVÕ´IEä=XbÄmÀ¿Tu} IÚUUõù¤cÇ„ëŒÄFüGUW&í“ê\`5S5àÉßñmRÕwÒµ9Å=ŒÇz#X}Æ«êê¤}&p`¯o¹ªÎiìu\ëÈT@ø^ìbU-‘žXVÐ÷´Ô…„‡ˆÜŒ û ðÝÄoä\ÛI6d7 Á¢±âbb……l ÅÕéÓ§nÎÙĉûŠ«÷ìÙ³…ï óÙ³gO]m½… ‰-\Hɲelߺâ¥ÊˉîÝ»_À—jüT{WMR Ü\JŠ‹Y—ŸOMAÝ»3|øp¢ãÇ™2…ÈØ±D£Q Ô‡6{@èœs.ãÚzÈèױ¡°ìHñIµýK± ©»»T5޹K8“ì%Uý}=×ò€°‘ã©K+½¸¸MUwd¬aYè`†ì$¡G¨°XÄòòØ‘› EEôéߟȸq0F£D£Q"‘ݺuká–´?eeeuߊÄ.$¶d ïnØååt«ª"RUEd÷n¢Y]¯K b"”tëF¬¨ˆ 99ÔRÔ£#FŽ´Ÿ£ ö}ñ0`@Ê)D­ÍBçœs×ÖáC@_,o>–®` 67)>éô«ªúf8æÇÀø§ûªÞ\ϵ< ì„Dä\à;Ô %Ù |CUoË\«²Kk„ ÙFóò(éÕ‹X×®ÄDØ›‹Ñoð`¢'Z/c#‘E ³eEE«W¯¦¤¤Ä‚¾¥K‰-ZĦµkÑÒRŠªªˆ¨)-%ºc‘š"4aæ¿Û§œ„žê¢"ûâ¡K6‰Ø\ØC±d7'Úç0öíÛ·5šã¡sιŒËÔÑÇ5ªú…ðúàªzL ^ÃÂN*ŒÍ?ø:6!àçªúõ̵*{d* lÈf¬G(Ö«%={+( VSCY^RTÄÀÕ2,F£Q†NAAA«·­ªªŠ5kÖì øâóù6ÄbÔîÝKAUÃsrˆVVٱÂ>,í]»äØÉí%‹yyÄz÷&V\LIN[-,¤gß¾Ö³8jÔ~?K½zT¬„Î9ç2.Sál¨ß/Âë»TõÓ-x ³€ˆ\ü+¡r¼ª¾á&uzí5 ¬X·nÄúõ£¤¸˜X^«ªª¨ÈË#§kWG£ûõE"† Ö¨R555¬]»Ö½x/ßÊ•¬[±‚ê={èRUŰ¼<¢µµDöì!òî»DKK„¥·sÇ.ÂPÔÞ½‰r%ÄTÙ¦ ……ô4ˆÑcÇî÷s‰DÒÍ…õ€Ð9ç\Ƶy@Ò—Ž×+‘9ÀãªÚb…ÅEdp80HU7¶Ôy]û#"ßÃêÝü[UOjh×<1 lH-°>?ŸØÀÄz÷¶9ŒÀêòrªºt!¯[7†N$aðàÁlÚ´‰X,ÆšXŒÊ]»È«¬dhAÍÝ+/'²mÑM›R]½¯>ŠËÇoõì9ÿØc½WU///³k×®!ÕÕÕ= І Ò%‰Èĉ¹è¢‹< t® ™KßÌnWU¯#ÚD"Ò8xSU_Ît{œÉDQ§‘ẉéwÅÊ4‹ˆLÆê¯Œ¦nŽÙ-"ò°À{:­_báû2Ý×1åC«ªºf Ç®YsÀöÖ@lÀÖwíÊèÝ»ùäæÍ Û¼™Î_JÝ5E°sçÎO<ñÄOSm?ꨣ†tëÖí= .<x·m[çœ;X¡–ßÍXÞ °š{6R(ñ;àH¬ªÑ€„íD&Â*à{X~D¤ ö Ö?ݰi7»±"Ÿq}é˜Ö]#¨êöv˜NÞu"¹ªŒØ¸‘}°kžW_}uVÌÚ9wB½»«êµm|é¹À…ÀUÀñm|íEDî>¥ª5 «·aŸ÷O¾‘†¹´Ú< Å2¯Kx]™øº™ç~ x©%ÎåœsÎ9çÚÓH]ެU©êr`¹ˆ|¦­¯Ý‘ˆH_à\à`_@¨ª[GDÄd·CžÏÀ9çœsε{"R€Í?sí×Åx‚ì'CFsÎ9çœ@DF“°¤ƒ¯c }{&&m CEo¦«E$6Uªêú¤óå`Y| 皯ªÛhC0-·x[UW7²ýŤ. »&iØd}çèLÀêr¯æ©j™ˆ‚åÇøO>úð­„[œ‰ýû%ßw¸ xÂê5"òQU}½¡÷͵2êœsÎ9ç2áÛØÐ©êL¬wî`,0MD¨é ŒÇýUU Ã#1ü4ðàA`¬ªž¡ªƒ¯âA Ç|¸ ,ûªêéª: øpðxC7¡ªÏ?ÅÊÞÞŒPÕ1 õJ†ë_Ü < QÕ“áÀZà&,ðšλËnZ†õÞ½ÌΞæ†`07œïà˪z¸ªž€õb®þ "—†¶ß|$4§§ª©ê±€¼*lûX¼<œªÞŠÚªê•ªz±ªR—Ë£{¿ÑÁ ðQ`ð?, \ îmè}s-ËBçœsÎ9— ñ¯ö~/“ӛx¾³jàÝ¿ÐöØpÔi‰;‹Èh¬ÇkpN|Hfpl-"]뻨ˆ|땼XUÏSÕ MhóWÂòzUÝ ŽÿUX?IUç©jª>¬ª·aïM?àrU½:¬?SU?޹8xZUo_( 'ýPþTDz„õc=´„^Ù°þ-àîðòȤv,Åz(F-p”ª~OUç¨êUý>084 uumÄBçœsÎ9—  ˈÈïDd"€ªÎņF6µ~ô¯±ž¬·Wªê.lþÜð¤ý? •|^Uw$S |8)Ýœ6é*"÷Ÿf& ÃlŠÞØ<Ç·“ÖÏ Ëi¤¶VUÿ“fÛay@{B°¹èŠÝ_\pGRàݨêªë×…eÑAž×ŸCèœk²ØøšÑÀ±ØlòxaµaA_–û>¾O–í³_6ç\½Tõï"rðlxã%"2«WwwÊšr¾§a_Ò•CñI®ææIDAT!‰ Ëyiη › ˜Jø+– çnU]Д¶&xø0ÖãöJÂú¶7ÕİŒ¥Ù>/\otºû±9‡‘¯ªj¹ˆ†Í œ‹ ᢪóÂ\Æ“€ÏDÛRÑ çt ƒìk?DDTÕS·2™e»X®ª/ŠH7ìs1ÀCªºGDŽÅþØø>¾O6ís+°SUgáœkɧ®vÝû°l €/„!¤ñýFbIOîSÕO¤8Ï Ø\¾ñØÜ¿gEØüÀWˆªæ%ì/ðIà UýY#Ûzhëvà ,˜;¸QU¿Ù´;ˆõ„v¾ˆ S}pKx>KUË“ŽÙlQÕ±iιëy<,¹·4lÿ5VþzUývÂúß—ŸPÕûDä`5Öƒy;6÷Ë"r9pœªžâÜÿž7뢪U)¶_üŽ4﹈<ŒÍ/ªªë’·»Öá¡ë< l;! Ä?ð:w ÿýp®qB†Ñ«€ÛTusÂúáX"•‹€wTub¶´¡ˆŠõd­Â‚¨ÍIÛ—s`@øMl®àïTõÿÙîx@x’ªþ;Ì/œÍ±kt`™p¾)Ø ›ç°@v P‚´¿MT5¾¼8UUŸI±ýylŽá%ªzGR[Þþ‰ 'a™SË€õXïÝ,qÌ5ªúÏçö€°ò9„Î9çœs®M©Õ¥ûðˆXÁùøúÕªz1Vò`‚ˆ$Ö‹׵ËOqÊÓ°yq÷§‡=8°`úc@%pŽˆPGPÌw“Ú?ǺÐÞRl¾c p“ˆ\@#‰È`l´ù£ªú5U=MUG«êɪzKª€*© é<–'¥¸f`2Üý=q›ªÎ^ Ç} xAUßU+Õñg¬ÌÄ7ÂòÙ4×®ïßž®æ_ìg€„Î9çœs.þˆ•¸O¬89"RˆiGU7%ì¿ËN9^¬<"rhÈïMúˆXátD¤§ˆ|.Zä„!š¨ê;X ¾C€{Dd_±õО{€þÀ» mˆ'¦I<Ïf,#jVÒáüFÞVþ;"òšˆÜ("ŠÈ1ñ{H&V¨þ ˆ¤ ®~…õ¤^OÔ“àlÚÇwTukŠcÅßÏãâIg®î¬g~güßá°ÐÞn"r|Âöø¿sqšã…eÿ4Û]+ð€Ð9çœsÎeÂÝXR°LD‘;±aŸåÀY‰;‡³¿bIS^‘g±:v}°Gʹôü÷ù¦‘#Tõu™€=€7€×’“©„ýs± œ“°Þ¨§ÕêëÅ·OÆJ5lÁ µ¯KØ6 Àv†C&lŒeÞ®?GU+¶G€HŠ[ˆ'„IU"¦ª±îÿ=Øp̳±a§ã± v*6ts ° tÇÝ“N±-]†Óð^M Ô½_ÛhÓd BU'­ýTõÕŽ‡صÀ‹ªúvè}šb÷EªºYDÆ`óU«ê‹õ]˵ ]§àaÛñ¼Î¥ç¿ιÆ‘éX@ù U}4Åv¾‰ k=GUlã&º,áCFsÎ9çœk{ŸÁ °§¬5¨Ök37¼ÜÝFmrYÈBçœsÎ9çÚÞëXVÍß‹È~Ã%CBœ‹°ùzÿÄÊR8×*|ȨëBÝšU=#ÓméìB¢øsç\ÿýpÎ5…ˆœŠ%¤”± ¦Ý°2Àê.V¤=‰sÍôÿTƒ’*³–wâIEND®B`‚gdb-doc-7.6.2/gdb/doc/gdb.texinfo0000644000175000017500000554535412250773211015543 0ustar zumbizumbi\input texinfo @c -*-texinfo-*- @c Copyright (C) 1988-2013 Free Software Foundation, Inc. @c @c %**start of header @c makeinfo ignores cmds prev to setfilename, so its arg cannot make use @c of @set vars. However, you can override filename with makeinfo -o. @setfilename gdb.info @c @include gdb-cfg.texi @c @settitle Debugging with @value{GDBN} @setchapternewpage odd @c %**end of header @iftex @c @smallbook @c @cropmarks @end iftex @finalout @c To avoid file-name clashes between index.html and Index.html, when @c the manual is produced on a Posix host and then moved to a @c case-insensitive filesystem (e.g., MS-Windows), we separate the @c indices into two: Concept Index and all the rest. @syncodeindex ky fn @syncodeindex tp fn @c readline appendices use @vindex, @findex and @ftable, @c annotate.texi and gdbmi use @findex. @syncodeindex vr fn @c !!set GDB manual's edition---not the same as GDB version! @c This is updated by GNU Press. @set EDITION Tenth @c !!set GDB edit command default editor @set EDITOR /bin/ex @c THIS MANUAL REQUIRES TEXINFO 4.0 OR LATER. @c This is a dir.info fragment to support semi-automated addition of @c manuals to an info tree. @dircategory Software development @direntry * Gdb: (gdb). The GNU debugger. @end direntry @copying Copyright @copyright{} 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being ``Free Software'' and ``Free Software Needs Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,'' and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: ``You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom.'' @end copying @ifnottex This file documents the @sc{gnu} debugger @value{GDBN}. This is the @value{EDITION} Edition, of @cite{Debugging with @value{GDBN}: the @sc{gnu} Source-Level Debugger} for @value{GDBN} @ifset VERSION_PACKAGE @value{VERSION_PACKAGE} @end ifset Version @value{GDBVN}. @insertcopying @end ifnottex @titlepage @title Debugging with @value{GDBN} @subtitle The @sc{gnu} Source-Level Debugger @sp 1 @subtitle @value{EDITION} Edition, for @value{GDBN} version @value{GDBVN} @ifset VERSION_PACKAGE @sp 1 @subtitle @value{VERSION_PACKAGE} @end ifset @author Richard Stallman, Roland Pesch, Stan Shebs, et al. @page @tex {\parskip=0pt \hfill (Send bugs and comments on @value{GDBN} to @value{BUGURL}.)\par \hfill {\it Debugging with @value{GDBN}}\par \hfill \TeX{}info \texinfoversion\par } @end tex @vskip 0pt plus 1filll Published by the Free Software Foundation @* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA@* ISBN 978-0-9831592-3-0 @* @insertcopying @end titlepage @page @ifnottex @node Top, Summary, (dir), (dir) @top Debugging with @value{GDBN} This file describes @value{GDBN}, the @sc{gnu} symbolic debugger. This is the @value{EDITION} Edition, for @value{GDBN} @ifset VERSION_PACKAGE @value{VERSION_PACKAGE} @end ifset Version @value{GDBVN}. Copyright (C) 1988-2013 Free Software Foundation, Inc. This edition of the GDB manual is dedicated to the memory of Fred Fish. Fred was a long-standing contributor to GDB and to Free software in general. We will miss him. @menu * Summary:: Summary of @value{GDBN} * Sample Session:: A sample @value{GDBN} session * Invocation:: Getting in and out of @value{GDBN} * Commands:: @value{GDBN} commands * Running:: Running programs under @value{GDBN} * Stopping:: Stopping and continuing * Reverse Execution:: Running programs backward * Process Record and Replay:: Recording inferior's execution and replaying it * Stack:: Examining the stack * Source:: Examining source files * Data:: Examining data * Optimized Code:: Debugging optimized code * Macros:: Preprocessor Macros * Tracepoints:: Debugging remote targets non-intrusively * Overlays:: Debugging programs that use overlays * Languages:: Using @value{GDBN} with different languages * Symbols:: Examining the symbol table * Altering:: Altering execution * GDB Files:: @value{GDBN} files * Targets:: Specifying a debugging target * Remote Debugging:: Debugging remote programs * Configurations:: Configuration-specific information * Controlling GDB:: Controlling @value{GDBN} * Extending GDB:: Extending @value{GDBN} * Interpreters:: Command Interpreters * TUI:: @value{GDBN} Text User Interface * Emacs:: Using @value{GDBN} under @sc{gnu} Emacs * GDB/MI:: @value{GDBN}'s Machine Interface. * Annotations:: @value{GDBN}'s annotation interface. * JIT Interface:: Using the JIT debugging interface. * In-Process Agent:: In-Process Agent * GDB Bugs:: Reporting bugs in @value{GDBN} @ifset SYSTEM_READLINE * Command Line Editing: (rluserman). Command Line Editing * Using History Interactively: (history). Using History Interactively @end ifset @ifclear SYSTEM_READLINE * Command Line Editing:: Command Line Editing * Using History Interactively:: Using History Interactively @end ifclear * In Memoriam:: In Memoriam * Formatting Documentation:: How to format and print @value{GDBN} documentation * Installing GDB:: Installing GDB * Maintenance Commands:: Maintenance Commands * Remote Protocol:: GDB Remote Serial Protocol * Agent Expressions:: The GDB Agent Expression Mechanism * Target Descriptions:: How targets can describe themselves to @value{GDBN} * Operating System Information:: Getting additional information from the operating system * Trace File Format:: GDB trace file format * Index Section Format:: .gdb_index section format * Copying:: GNU General Public License says how you can copy and share GDB * GNU Free Documentation License:: The license for this documentation * Concept Index:: Index of @value{GDBN} concepts * Command and Variable Index:: Index of @value{GDBN} commands, variables, functions, and Python data types @end menu @end ifnottex @contents @node Summary @unnumbered Summary of @value{GDBN} The purpose of a debugger such as @value{GDBN} is to allow you to see what is going on ``inside'' another program while it executes---or what another program was doing at the moment it crashed. @value{GDBN} can do four main kinds of things (plus other things in support of these) to help you catch bugs in the act: @itemize @bullet @item Start your program, specifying anything that might affect its behavior. @item Make your program stop on specified conditions. @item Examine what has happened, when your program has stopped. @item Change things in your program, so you can experiment with correcting the effects of one bug and go on to learn about another. @end itemize You can use @value{GDBN} to debug programs written in C and C@t{++}. For more information, see @ref{Supported Languages,,Supported Languages}. For more information, see @ref{C,,C and C++}. Support for D is partial. For information on D, see @ref{D,,D}. @cindex Modula-2 Support for Modula-2 is partial. For information on Modula-2, see @ref{Modula-2,,Modula-2}. Support for OpenCL C is partial. For information on OpenCL C, see @ref{OpenCL C,,OpenCL C}. @cindex Pascal Debugging Pascal programs which use sets, subranges, file variables, or nested functions does not currently work. @value{GDBN} does not support entering expressions, printing values, or similar features using Pascal syntax. @cindex Fortran @value{GDBN} can be used to debug programs written in Fortran, although it may be necessary to refer to some variables with a trailing underscore. @value{GDBN} can be used to debug programs written in Objective-C, using either the Apple/NeXT or the GNU Objective-C runtime. @menu * Free Software:: Freely redistributable software * Free Documentation:: Free Software Needs Free Documentation * Contributors:: Contributors to GDB @end menu @node Free Software @unnumberedsec Free Software @value{GDBN} is @dfn{free software}, protected by the @sc{gnu} General Public License (GPL). The GPL gives you the freedom to copy or adapt a licensed program---but every person getting a copy also gets with it the freedom to modify that copy (which means that they must get access to the source code), and the freedom to distribute further copies. Typical software companies use copyrights to limit your freedoms; the Free Software Foundation uses the GPL to preserve these freedoms. Fundamentally, the General Public License is a license which says that you have these freedoms and that you cannot take these freedoms away from anyone else. @node Free Documentation @unnumberedsec Free Software Needs Free Documentation The biggest deficiency in the free software community today is not in the software---it is the lack of good free documentation that we can include with the free software. Many of our most important programs do not come with free reference manuals and free introductory texts. Documentation is an essential part of any software package; when an important free software package does not come with a free manual and a free tutorial, that is a major gap. We have many such gaps today. Consider Perl, for instance. The tutorial manuals that people normally use are non-free. How did this come about? Because the authors of those manuals published them with restrictive terms---no copying, no modification, source files not available---which exclude them from the free software world. That wasn't the first time this sort of thing happened, and it was far from the last. Many times we have heard a GNU user eagerly describe a manual that he is writing, his intended contribution to the community, only to learn that he had ruined everything by signing a publication contract to make it non-free. Free documentation, like free software, is a matter of freedom, not price. The problem with the non-free manual is not that publishers charge a price for printed copies---that in itself is fine. (The Free Software Foundation sells printed copies of manuals, too.) The problem is the restrictions on the use of the manual. Free manuals are available in source code form, and give you permission to copy and modify. Non-free manuals do not allow this. The criteria of freedom for a free manual are roughly the same as for free software. Redistribution (including the normal kinds of commercial redistribution) must be permitted, so that the manual can accompany every copy of the program, both on-line and on paper. Permission for modification of the technical content is crucial too. When people modify the software, adding or changing features, if they are conscientious they will change the manual too---so they can provide accurate and clear documentation for the modified program. A manual that leaves you no choice but to write a new manual to document a changed version of the program is not really available to our community. Some kinds of limits on the way modification is handled are acceptable. For example, requirements to preserve the original author's copyright notice, the distribution terms, or the list of authors, are ok. It is also no problem to require modified versions to include notice that they were modified. Even entire sections that may not be deleted or changed are acceptable, as long as they deal with nontechnical topics (like this one). These kinds of restrictions are acceptable because they don't obstruct the community's normal use of the manual. However, it must be possible to modify all the @emph{technical} content of the manual, and then distribute the result in all the usual media, through all the usual channels. Otherwise, the restrictions obstruct the use of the manual, it is not free, and we need another manual to replace it. Please spread the word about this issue. Our community continues to lose manuals to proprietary publishing. If we spread the word that free software needs free reference manuals and free tutorials, perhaps the next person who wants to contribute by writing documentation will realize, before it is too late, that only free manuals contribute to the free software community. If you are writing documentation, please insist on publishing it under the GNU Free Documentation License or another free documentation license. Remember that this decision requires your approval---you don't have to let the publisher decide. Some commercial publishers will use a free license if you insist, but they will not propose the option; it is up to you to raise the issue and say firmly that this is what you want. If the publisher you are dealing with refuses, please try other publishers. If you're not sure whether a proposed license is free, write to @email{licensing@@gnu.org}. You can encourage commercial publishers to sell more free, copylefted manuals and tutorials by buying them, and particularly by buying copies from the publishers that paid for their writing or for major improvements. Meanwhile, try to avoid buying non-free documentation at all. Check the distribution terms of a manual before you buy it, and insist that whoever seeks your business must respect your freedom. Check the history of the book, and try to reward the publishers that have paid or pay the authors to work on it. The Free Software Foundation maintains a list of free documentation published by other publishers, at @url{http://www.fsf.org/doc/other-free-books.html}. @node Contributors @unnumberedsec Contributors to @value{GDBN} Richard Stallman was the original author of @value{GDBN}, and of many other @sc{gnu} programs. Many others have contributed to its development. This section attempts to credit major contributors. One of the virtues of free software is that everyone is free to contribute to it; with regret, we cannot actually acknowledge everyone here. The file @file{ChangeLog} in the @value{GDBN} distribution approximates a blow-by-blow account. Changes much prior to version 2.0 are lost in the mists of time. @quotation @emph{Plea:} Additions to this section are particularly welcome. If you or your friends (or enemies, to be evenhanded) have been unfairly omitted from this list, we would like to add your names! @end quotation So that they may not regard their many labors as thankless, we particularly thank those who shepherded @value{GDBN} through major releases: Andrew Cagney (releases 6.3, 6.2, 6.1, 6.0, 5.3, 5.2, 5.1 and 5.0); Jim Blandy (release 4.18); Jason Molenda (release 4.17); Stan Shebs (release 4.14); Fred Fish (releases 4.16, 4.15, 4.13, 4.12, 4.11, 4.10, and 4.9); Stu Grossman and John Gilmore (releases 4.8, 4.7, 4.6, 4.5, and 4.4); John Gilmore (releases 4.3, 4.2, 4.1, 4.0, and 3.9); Jim Kingdon (releases 3.5, 3.4, and 3.3); and Randy Smith (releases 3.2, 3.1, and 3.0). Richard Stallman, assisted at various times by Peter TerMaat, Chris Hanson, and Richard Mlynarik, handled releases through 2.8. Michael Tiemann is the author of most of the @sc{gnu} C@t{++} support in @value{GDBN}, with significant additional contributions from Per Bothner and Daniel Berlin. James Clark wrote the @sc{gnu} C@t{++} demangler. Early work on C@t{++} was by Peter TerMaat (who also did much general update work leading to release 3.0). @value{GDBN} uses the BFD subroutine library to examine multiple object-file formats; BFD was a joint project of David V. Henkel-Wallace, Rich Pixley, Steve Chamberlain, and John Gilmore. David Johnson wrote the original COFF support; Pace Willison did the original support for encapsulated COFF. Brent Benson of Harris Computer Systems contributed DWARF 2 support. Adam de Boor and Bradley Davis contributed the ISI Optimum V support. Per Bothner, Noboyuki Hikichi, and Alessandro Forin contributed MIPS support. Jean-Daniel Fekete contributed Sun 386i support. Chris Hanson improved the HP9000 support. Noboyuki Hikichi and Tomoyuki Hasei contributed Sony/News OS 3 support. David Johnson contributed Encore Umax support. Jyrki Kuoppala contributed Altos 3068 support. Jeff Law contributed HP PA and SOM support. Keith Packard contributed NS32K support. Doug Rabson contributed Acorn Risc Machine support. Bob Rusk contributed Harris Nighthawk CX-UX support. Chris Smith contributed Convex support (and Fortran debugging). Jonathan Stone contributed Pyramid support. Michael Tiemann contributed SPARC support. Tim Tucker contributed support for the Gould NP1 and Gould Powernode. Pace Willison contributed Intel 386 support. Jay Vosburgh contributed Symmetry support. Marko Mlinar contributed OpenRISC 1000 support. Andreas Schwab contributed M68K @sc{gnu}/Linux support. Rich Schaefer and Peter Schauer helped with support of SunOS shared libraries. Jay Fenlason and Roland McGrath ensured that @value{GDBN} and GAS agree about several machine instruction sets. Patrick Duval, Ted Goldstein, Vikram Koka and Glenn Engel helped develop remote debugging. Intel Corporation, Wind River Systems, AMD, and ARM contributed remote debugging modules for the i960, VxWorks, A29K UDI, and RDI targets, respectively. Brian Fox is the author of the readline libraries providing command-line editing and command history. Andrew Beers of SUNY Buffalo wrote the language-switching code, the Modula-2 support, and contributed the Languages chapter of this manual. Fred Fish wrote most of the support for Unix System Vr4. He also enhanced the command-completion support to cover C@t{++} overloaded symbols. Hitachi America (now Renesas America), Ltd. sponsored the support for H8/300, H8/500, and Super-H processors. NEC sponsored the support for the v850, Vr4xxx, and Vr5xxx processors. Mitsubishi (now Renesas) sponsored the support for D10V, D30V, and M32R/D processors. Toshiba sponsored the support for the TX39 Mips processor. Matsushita sponsored the support for the MN10200 and MN10300 processors. Fujitsu sponsored the support for SPARClite and FR30 processors. Kung Hsu, Jeff Law, and Rick Sladkey added support for hardware watchpoints. Michael Snyder added support for tracepoints. Stu Grossman wrote gdbserver. Jim Kingdon, Peter Schauer, Ian Taylor, and Stu Grossman made nearly innumerable bug fixes and cleanups throughout @value{GDBN}. The following people at the Hewlett-Packard Company contributed support for the PA-RISC 2.0 architecture, HP-UX 10.20, 10.30, and 11.0 (narrow mode), HP's implementation of kernel threads, HP's aC@t{++} compiler, and the Text User Interface (nee Terminal User Interface): Ben Krepp, Richard Title, John Bishop, Susan Macchia, Kathy Mann, Satish Pai, India Paul, Steve Rehrauer, and Elena Zannoni. Kim Haase provided HP-specific information in this manual. DJ Delorie ported @value{GDBN} to MS-DOS, for the DJGPP project. Robert Hoehne made significant contributions to the DJGPP port. Cygnus Solutions has sponsored @value{GDBN} maintenance and much of its development since 1991. Cygnus engineers who have worked on @value{GDBN} fulltime include Mark Alexander, Jim Blandy, Per Bothner, Kevin Buettner, Edith Epstein, Chris Faylor, Fred Fish, Martin Hunt, Jim Ingham, John Gilmore, Stu Grossman, Kung Hsu, Jim Kingdon, John Metzler, Fernando Nasser, Geoffrey Noer, Dawn Perchik, Rich Pixley, Zdenek Radouch, Keith Seitz, Stan Shebs, David Taylor, and Elena Zannoni. In addition, Dave Brolley, Ian Carmichael, Steve Chamberlain, Nick Clifton, JT Conklin, Stan Cox, DJ Delorie, Ulrich Drepper, Frank Eigler, Doug Evans, Sean Fagan, David Henkel-Wallace, Richard Henderson, Jeff Holcomb, Jeff Law, Jim Lemke, Tom Lord, Bob Manson, Michael Meissner, Jason Merrill, Catherine Moore, Drew Moseley, Ken Raeburn, Gavin Romig-Koch, Rob Savoye, Jamie Smith, Mike Stump, Ian Taylor, Angela Thomas, Michael Tiemann, Tom Tromey, Ron Unrau, Jim Wilson, and David Zuhn have made contributions both large and small. Andrew Cagney, Fernando Nasser, and Elena Zannoni, while working for Cygnus Solutions, implemented the original @sc{gdb/mi} interface. Jim Blandy added support for preprocessor macros, while working for Red Hat. Andrew Cagney designed @value{GDBN}'s architecture vector. Many people including Andrew Cagney, Stephane Carrez, Randolph Chung, Nick Duffek, Richard Henderson, Mark Kettenis, Grace Sainsbury, Kei Sakamoto, Yoshinori Sato, Michael Snyder, Andreas Schwab, Jason Thorpe, Corinna Vinschen, Ulrich Weigand, and Elena Zannoni, helped with the migration of old architectures to this new framework. Andrew Cagney completely re-designed and re-implemented @value{GDBN}'s unwinder framework, this consisting of a fresh new design featuring frame IDs, independent frame sniffers, and the sentinel frame. Mark Kettenis implemented the @sc{dwarf 2} unwinder, Jeff Johnston the libunwind unwinder, and Andrew Cagney the dummy, sentinel, tramp, and trad unwinders. The architecture-specific changes, each involving a complete rewrite of the architecture's frame code, were carried out by Jim Blandy, Joel Brobecker, Kevin Buettner, Andrew Cagney, Stephane Carrez, Randolph Chung, Orjan Friberg, Richard Henderson, Daniel Jacobowitz, Jeff Johnston, Mark Kettenis, Theodore A. Roth, Kei Sakamoto, Yoshinori Sato, Michael Snyder, Corinna Vinschen, and Ulrich Weigand. Christian Zankel, Ross Morley, Bob Wilson, and Maxim Grigoriev from Tensilica, Inc.@: contributed support for Xtensa processors. Others who have worked on the Xtensa port of @value{GDBN} in the past include Steve Tjiang, John Newlin, and Scott Foehner. Michael Eager and staff of Xilinx, Inc., contributed support for the Xilinx MicroBlaze architecture. @node Sample Session @chapter A Sample @value{GDBN} Session You can use this manual at your leisure to read all about @value{GDBN}. However, a handful of commands are enough to get started using the debugger. This chapter illustrates those commands. @iftex In this sample session, we emphasize user input like this: @b{input}, to make it easier to pick out from the surrounding output. @end iftex @c FIXME: this example may not be appropriate for some configs, where @c FIXME...primary interest is in remote use. One of the preliminary versions of @sc{gnu} @code{m4} (a generic macro processor) exhibits the following bug: sometimes, when we change its quote strings from the default, the commands used to capture one macro definition within another stop working. In the following short @code{m4} session, we define a macro @code{foo} which expands to @code{0000}; we then use the @code{m4} built-in @code{defn} to define @code{bar} as the same thing. However, when we change the open quote string to @code{} and the close quote string to @code{}, the same procedure fails to define a new synonym @code{baz}: @smallexample $ @b{cd gnu/m4} $ @b{./m4} @b{define(foo,0000)} @b{foo} 0000 @b{define(bar,defn(`foo'))} @b{bar} 0000 @b{changequote(,)} @b{define(baz,defn(foo))} @b{baz} @b{Ctrl-d} m4: End of input: 0: fatal error: EOF in string @end smallexample @noindent Let us use @value{GDBN} to try to see what is going on. @smallexample $ @b{@value{GDBP} m4} @c FIXME: this falsifies the exact text played out, to permit smallbook @c FIXME... format to come out better. @value{GDBN} is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. There is absolutely no warranty for @value{GDBN}; type "show warranty" for details. @value{GDBN} @value{GDBVN}, Copyright 1999 Free Software Foundation, Inc... (@value{GDBP}) @end smallexample @noindent @value{GDBN} reads only enough symbol data to know where to find the rest when needed; as a result, the first prompt comes up very quickly. We now tell @value{GDBN} to use a narrower display width than usual, so that examples fit in this manual. @smallexample (@value{GDBP}) @b{set width 70} @end smallexample @noindent We need to see how the @code{m4} built-in @code{changequote} works. Having looked at the source, we know the relevant subroutine is @code{m4_changequote}, so we set a breakpoint there with the @value{GDBN} @code{break} command. @smallexample (@value{GDBP}) @b{break m4_changequote} Breakpoint 1 at 0x62f4: file builtin.c, line 879. @end smallexample @noindent Using the @code{run} command, we start @code{m4} running under @value{GDBN} control; as long as control does not reach the @code{m4_changequote} subroutine, the program runs as usual: @smallexample (@value{GDBP}) @b{run} Starting program: /work/Editorial/gdb/gnu/m4/m4 @b{define(foo,0000)} @b{foo} 0000 @end smallexample @noindent To trigger the breakpoint, we call @code{changequote}. @value{GDBN} suspends execution of @code{m4}, displaying information about the context where it stops. @smallexample @b{changequote(,)} Breakpoint 1, m4_changequote (argc=3, argv=0x33c70) at builtin.c:879 879 if (bad_argc(TOKEN_DATA_TEXT(argv[0]),argc,1,3)) @end smallexample @noindent Now we use the command @code{n} (@code{next}) to advance execution to the next line of the current function. @smallexample (@value{GDBP}) @b{n} 882 set_quotes((argc >= 2) ? TOKEN_DATA_TEXT(argv[1])\ : nil, @end smallexample @noindent @code{set_quotes} looks like a promising subroutine. We can go into it by using the command @code{s} (@code{step}) instead of @code{next}. @code{step} goes to the next line to be executed in @emph{any} subroutine, so it steps into @code{set_quotes}. @smallexample (@value{GDBP}) @b{s} set_quotes (lq=0x34c78 "", rq=0x34c88 "") at input.c:530 530 if (lquote != def_lquote) @end smallexample @noindent The display that shows the subroutine where @code{m4} is now suspended (and its arguments) is called a stack frame display. It shows a summary of the stack. We can use the @code{backtrace} command (which can also be spelled @code{bt}), to see where we are in the stack as a whole: the @code{backtrace} command displays a stack frame for each active subroutine. @smallexample (@value{GDBP}) @b{bt} #0 set_quotes (lq=0x34c78 "", rq=0x34c88 "") at input.c:530 #1 0x6344 in m4_changequote (argc=3, argv=0x33c70) at builtin.c:882 #2 0x8174 in expand_macro (sym=0x33320) at macro.c:242 #3 0x7a88 in expand_token (obs=0x0, t=209696, td=0xf7fffa30) at macro.c:71 #4 0x79dc in expand_input () at macro.c:40 #5 0x2930 in main (argc=0, argv=0xf7fffb20) at m4.c:195 @end smallexample @noindent We step through a few more lines to see what happens. The first two times, we can use @samp{s}; the next two times we use @code{n} to avoid falling into the @code{xstrdup} subroutine. @smallexample (@value{GDBP}) @b{s} 0x3b5c 532 if (rquote != def_rquote) (@value{GDBP}) @b{s} 0x3b80 535 lquote = (lq == nil || *lq == '\0') ? \ def_lquote : xstrdup(lq); (@value{GDBP}) @b{n} 536 rquote = (rq == nil || *rq == '\0') ? def_rquote\ : xstrdup(rq); (@value{GDBP}) @b{n} 538 len_lquote = strlen(rquote); @end smallexample @noindent The last line displayed looks a little odd; we can examine the variables @code{lquote} and @code{rquote} to see if they are in fact the new left and right quotes we specified. We use the command @code{p} (@code{print}) to see their values. @smallexample (@value{GDBP}) @b{p lquote} $1 = 0x35d40 "" (@value{GDBP}) @b{p rquote} $2 = 0x35d50 "" @end smallexample @noindent @code{lquote} and @code{rquote} are indeed the new left and right quotes. To look at some context, we can display ten lines of source surrounding the current line with the @code{l} (@code{list}) command. @smallexample (@value{GDBP}) @b{l} 533 xfree(rquote); 534 535 lquote = (lq == nil || *lq == '\0') ? def_lquote\ : xstrdup (lq); 536 rquote = (rq == nil || *rq == '\0') ? def_rquote\ : xstrdup (rq); 537 538 len_lquote = strlen(rquote); 539 len_rquote = strlen(lquote); 540 @} 541 542 void @end smallexample @noindent Let us step past the two lines that set @code{len_lquote} and @code{len_rquote}, and then examine the values of those variables. @smallexample (@value{GDBP}) @b{n} 539 len_rquote = strlen(lquote); (@value{GDBP}) @b{n} 540 @} (@value{GDBP}) @b{p len_lquote} $3 = 9 (@value{GDBP}) @b{p len_rquote} $4 = 7 @end smallexample @noindent That certainly looks wrong, assuming @code{len_lquote} and @code{len_rquote} are meant to be the lengths of @code{lquote} and @code{rquote} respectively. We can set them to better values using the @code{p} command, since it can print the value of any expression---and that expression can include subroutine calls and assignments. @smallexample (@value{GDBP}) @b{p len_lquote=strlen(lquote)} $5 = 7 (@value{GDBP}) @b{p len_rquote=strlen(rquote)} $6 = 9 @end smallexample @noindent Is that enough to fix the problem of using the new quotes with the @code{m4} built-in @code{defn}? We can allow @code{m4} to continue executing with the @code{c} (@code{continue}) command, and then try the example that caused trouble initially: @smallexample (@value{GDBP}) @b{c} Continuing. @b{define(baz,defn(foo))} baz 0000 @end smallexample @noindent Success! The new quotes now work just as well as the default ones. The problem seems to have been just the two typos defining the wrong lengths. We allow @code{m4} exit by giving it an EOF as input: @smallexample @b{Ctrl-d} Program exited normally. @end smallexample @noindent The message @samp{Program exited normally.} is from @value{GDBN}; it indicates @code{m4} has finished executing. We can end our @value{GDBN} session with the @value{GDBN} @code{quit} command. @smallexample (@value{GDBP}) @b{quit} @end smallexample @node Invocation @chapter Getting In and Out of @value{GDBN} This chapter discusses how to start @value{GDBN}, and how to get out of it. The essentials are: @itemize @bullet @item type @samp{@value{GDBP}} to start @value{GDBN}. @item type @kbd{quit} or @kbd{Ctrl-d} to exit. @end itemize @menu * Invoking GDB:: How to start @value{GDBN} * Quitting GDB:: How to quit @value{GDBN} * Shell Commands:: How to use shell commands inside @value{GDBN} * Logging Output:: How to log @value{GDBN}'s output to a file @end menu @node Invoking GDB @section Invoking @value{GDBN} Invoke @value{GDBN} by running the program @code{@value{GDBP}}. Once started, @value{GDBN} reads commands from the terminal until you tell it to exit. You can also run @code{@value{GDBP}} with a variety of arguments and options, to specify more of your debugging environment at the outset. The command-line options described here are designed to cover a variety of situations; in some environments, some of these options may effectively be unavailable. The most usual way to start @value{GDBN} is with one argument, specifying an executable program: @smallexample @value{GDBP} @var{program} @end smallexample @noindent You can also start with both an executable program and a core file specified: @smallexample @value{GDBP} @var{program} @var{core} @end smallexample You can, instead, specify a process ID as a second argument, if you want to debug a running process: @smallexample @value{GDBP} @var{program} 1234 @end smallexample @noindent would attach @value{GDBN} to process @code{1234} (unless you also have a file named @file{1234}; @value{GDBN} does check for a core file first). Taking advantage of the second command-line argument requires a fairly complete operating system; when you use @value{GDBN} as a remote debugger attached to a bare board, there may not be any notion of ``process'', and there is often no way to get a core dump. @value{GDBN} will warn you if it is unable to attach or to read core dumps. You can optionally have @code{@value{GDBP}} pass any arguments after the executable file to the inferior using @code{--args}. This option stops option processing. @smallexample @value{GDBP} --args gcc -O2 -c foo.c @end smallexample This will cause @code{@value{GDBP}} to debug @code{gcc}, and to set @code{gcc}'s command-line arguments (@pxref{Arguments}) to @samp{-O2 -c foo.c}. You can run @code{@value{GDBP}} without printing the front material, which describes @value{GDBN}'s non-warranty, by specifying @code{-silent}: @smallexample @value{GDBP} -silent @end smallexample @noindent You can further control how @value{GDBN} starts up by using command-line options. @value{GDBN} itself can remind you of the options available. @noindent Type @smallexample @value{GDBP} -help @end smallexample @noindent to display all available options and briefly describe their use (@samp{@value{GDBP} -h} is a shorter equivalent). All options and command line arguments you give are processed in sequential order. The order makes a difference when the @samp{-x} option is used. @menu * File Options:: Choosing files * Mode Options:: Choosing modes * Startup:: What @value{GDBN} does during startup @end menu @node File Options @subsection Choosing Files When @value{GDBN} starts, it reads any arguments other than options as specifying an executable file and core file (or process ID). This is the same as if the arguments were specified by the @samp{-se} and @samp{-c} (or @samp{-p}) options respectively. (@value{GDBN} reads the first argument that does not have an associated option flag as equivalent to the @samp{-se} option followed by that argument; and the second argument that does not have an associated option flag, if any, as equivalent to the @samp{-c}/@samp{-p} option followed by that argument.) If the second argument begins with a decimal digit, @value{GDBN} will first attempt to attach to it as a process, and if that fails, attempt to open it as a corefile. If you have a corefile whose name begins with a digit, you can prevent @value{GDBN} from treating it as a pid by prefixing it with @file{./}, e.g.@: @file{./12345}. If @value{GDBN} has not been configured to included core file support, such as for most embedded targets, then it will complain about a second argument and ignore it. Many options have both long and short forms; both are shown in the following list. @value{GDBN} also recognizes the long forms if you truncate them, so long as enough of the option is present to be unambiguous. (If you prefer, you can flag option arguments with @samp{--} rather than @samp{-}, though we illustrate the more usual convention.) @c NOTE: the @cindex entries here use double dashes ON PURPOSE. This @c way, both those who look for -foo and --foo in the index, will find @c it. @table @code @item -symbols @var{file} @itemx -s @var{file} @cindex @code{--symbols} @cindex @code{-s} Read symbol table from file @var{file}. @item -exec @var{file} @itemx -e @var{file} @cindex @code{--exec} @cindex @code{-e} Use file @var{file} as the executable file to execute when appropriate, and for examining pure data in conjunction with a core dump. @item -se @var{file} @cindex @code{--se} Read symbol table from file @var{file} and use it as the executable file. @item -core @var{file} @itemx -c @var{file} @cindex @code{--core} @cindex @code{-c} Use file @var{file} as a core dump to examine. @item -pid @var{number} @itemx -p @var{number} @cindex @code{--pid} @cindex @code{-p} Connect to process ID @var{number}, as with the @code{attach} command. @item -command @var{file} @itemx -x @var{file} @cindex @code{--command} @cindex @code{-x} Execute commands from file @var{file}. The contents of this file is evaluated exactly as the @code{source} command would. @xref{Command Files,, Command files}. @item -eval-command @var{command} @itemx -ex @var{command} @cindex @code{--eval-command} @cindex @code{-ex} Execute a single @value{GDBN} command. This option may be used multiple times to call multiple commands. It may also be interleaved with @samp{-command} as required. @smallexample @value{GDBP} -ex 'target sim' -ex 'load' \ -x setbreakpoints -ex 'run' a.out @end smallexample @item -init-command @var{file} @itemx -ix @var{file} @cindex @code{--init-command} @cindex @code{-ix} Execute commands from file @var{file} before loading the inferior (but after loading gdbinit files). @xref{Startup}. @item -init-eval-command @var{command} @itemx -iex @var{command} @cindex @code{--init-eval-command} @cindex @code{-iex} Execute a single @value{GDBN} command before loading the inferior (but after loading gdbinit files). @xref{Startup}. @item -directory @var{directory} @itemx -d @var{directory} @cindex @code{--directory} @cindex @code{-d} Add @var{directory} to the path to search for source and script files. @item -r @itemx -readnow @cindex @code{--readnow} @cindex @code{-r} Read each symbol file's entire symbol table immediately, rather than the default, which is to read it incrementally as it is needed. This makes startup slower, but makes future operations faster. @end table @node Mode Options @subsection Choosing Modes You can run @value{GDBN} in various alternative modes---for example, in batch mode or quiet mode. @table @code @anchor{-nx} @item -nx @itemx -n @cindex @code{--nx} @cindex @code{-n} Do not execute commands found in any initialization file. There are three init files, loaded in the following order: @table @code @item @file{system.gdbinit} This is the system-wide init file. Its location is specified with the @code{--with-system-gdbinit} configure option (@pxref{System-wide configuration}). It is loaded first when @value{GDBN} starts, before command line options have been processed. @item @file{~/.gdbinit} This is the init file in your home directory. It is loaded next, after @file{system.gdbinit}, and before command options have been processed. @item @file{./.gdbinit} This is the init file in the current directory. It is loaded last, after command line options other than @code{-x} and @code{-ex} have been processed. Command line options @code{-x} and @code{-ex} are processed last, after @file{./.gdbinit} has been loaded. @end table For further documentation on startup processing, @xref{Startup}. For documentation on how to write command files, @xref{Command Files,,Command Files}. @anchor{-nh} @item -nh @cindex @code{--nh} Do not execute commands found in @file{~/.gdbinit}, the init file in your home directory. @xref{Startup}. @item -quiet @itemx -silent @itemx -q @cindex @code{--quiet} @cindex @code{--silent} @cindex @code{-q} ``Quiet''. Do not print the introductory and copyright messages. These messages are also suppressed in batch mode. @item -batch @cindex @code{--batch} Run in batch mode. Exit with status @code{0} after processing all the command files specified with @samp{-x} (and all commands from initialization files, if not inhibited with @samp{-n}). Exit with nonzero status if an error occurs in executing the @value{GDBN} commands in the command files. Batch mode also disables pagination, sets unlimited terminal width and height @pxref{Screen Size}, and acts as if @kbd{set confirm off} were in effect (@pxref{Messages/Warnings}). Batch mode may be useful for running @value{GDBN} as a filter, for example to download and run a program on another computer; in order to make this more useful, the message @smallexample Program exited normally. @end smallexample @noindent (which is ordinarily issued whenever a program running under @value{GDBN} control terminates) is not issued when running in batch mode. @item -batch-silent @cindex @code{--batch-silent} Run in batch mode exactly like @samp{-batch}, but totally silently. All @value{GDBN} output to @code{stdout} is prevented (@code{stderr} is unaffected). This is much quieter than @samp{-silent} and would be useless for an interactive session. This is particularly useful when using targets that give @samp{Loading section} messages, for example. Note that targets that give their output via @value{GDBN}, as opposed to writing directly to @code{stdout}, will also be made silent. @item -return-child-result @cindex @code{--return-child-result} The return code from @value{GDBN} will be the return code from the child process (the process being debugged), with the following exceptions: @itemize @bullet @item @value{GDBN} exits abnormally. E.g., due to an incorrect argument or an internal error. In this case the exit code is the same as it would have been without @samp{-return-child-result}. @item The user quits with an explicit value. E.g., @samp{quit 1}. @item The child process never runs, or is not allowed to terminate, in which case the exit code will be -1. @end itemize This option is useful in conjunction with @samp{-batch} or @samp{-batch-silent}, when @value{GDBN} is being used as a remote program loader or simulator interface. @item -nowindows @itemx -nw @cindex @code{--nowindows} @cindex @code{-nw} ``No windows''. If @value{GDBN} comes with a graphical user interface (GUI) built in, then this option tells @value{GDBN} to only use the command-line interface. If no GUI is available, this option has no effect. @item -windows @itemx -w @cindex @code{--windows} @cindex @code{-w} If @value{GDBN} includes a GUI, then this option requires it to be used if possible. @item -cd @var{directory} @cindex @code{--cd} Run @value{GDBN} using @var{directory} as its working directory, instead of the current directory. @item -data-directory @var{directory} @cindex @code{--data-directory} Run @value{GDBN} using @var{directory} as its data directory. The data directory is where @value{GDBN} searches for its auxiliary files. @xref{Data Files}. @item -fullname @itemx -f @cindex @code{--fullname} @cindex @code{-f} @sc{gnu} Emacs sets this option when it runs @value{GDBN} as a subprocess. It tells @value{GDBN} to output the full file name and line number in a standard, recognizable fashion each time a stack frame is displayed (which includes each time your program stops). This recognizable format looks like two @samp{\032} characters, followed by the file name, line number and character position separated by colons, and a newline. The Emacs-to-@value{GDBN} interface program uses the two @samp{\032} characters as a signal to display the source code for the frame. @item -annotate @var{level} @cindex @code{--annotate} This option sets the @dfn{annotation level} inside @value{GDBN}. Its effect is identical to using @samp{set annotate @var{level}} (@pxref{Annotations}). The annotation @var{level} controls how much information @value{GDBN} prints together with its prompt, values of expressions, source lines, and other types of output. Level 0 is the normal, level 1 is for use when @value{GDBN} is run as a subprocess of @sc{gnu} Emacs, level 3 is the maximum annotation suitable for programs that control @value{GDBN}, and level 2 has been deprecated. The annotation mechanism has largely been superseded by @sc{gdb/mi} (@pxref{GDB/MI}). @item --args @cindex @code{--args} Change interpretation of command line so that arguments following the executable file are passed as command line arguments to the inferior. This option stops option processing. @item -baud @var{bps} @itemx -b @var{bps} @cindex @code{--baud} @cindex @code{-b} Set the line speed (baud rate or bits per second) of any serial interface used by @value{GDBN} for remote debugging. @item -l @var{timeout} @cindex @code{-l} Set the timeout (in seconds) of any communication used by @value{GDBN} for remote debugging. @item -tty @var{device} @itemx -t @var{device} @cindex @code{--tty} @cindex @code{-t} Run using @var{device} for your program's standard input and output. @c FIXME: kingdon thinks there is more to -tty. Investigate. @c resolve the situation of these eventually @item -tui @cindex @code{--tui} Activate the @dfn{Text User Interface} when starting. The Text User Interface manages several text windows on the terminal, showing source, assembly, registers and @value{GDBN} command outputs (@pxref{TUI, ,@value{GDBN} Text User Interface}). Do not use this option if you run @value{GDBN} from Emacs (@pxref{Emacs, , Using @value{GDBN} under @sc{gnu} Emacs}). @c @item -xdb @c @cindex @code{--xdb} @c Run in XDB compatibility mode, allowing the use of certain XDB commands. @c For information, see the file @file{xdb_trans.html}, which is usually @c installed in the directory @code{/opt/langtools/wdb/doc} on HP-UX @c systems. @item -interpreter @var{interp} @cindex @code{--interpreter} Use the interpreter @var{interp} for interface with the controlling program or device. This option is meant to be set by programs which communicate with @value{GDBN} using it as a back end. @xref{Interpreters, , Command Interpreters}. @samp{--interpreter=mi} (or @samp{--interpreter=mi2}) causes @value{GDBN} to use the @dfn{@sc{gdb/mi} interface} (@pxref{GDB/MI, , The @sc{gdb/mi} Interface}) included since @value{GDBN} version 6.0. The previous @sc{gdb/mi} interface, included in @value{GDBN} version 5.3 and selected with @samp{--interpreter=mi1}, is deprecated. Earlier @sc{gdb/mi} interfaces are no longer supported. @item -write @cindex @code{--write} Open the executable and core files for both reading and writing. This is equivalent to the @samp{set write on} command inside @value{GDBN} (@pxref{Patching}). @item -statistics @cindex @code{--statistics} This option causes @value{GDBN} to print statistics about time and memory usage after it completes each command and returns to the prompt. @item -version @cindex @code{--version} This option causes @value{GDBN} to print its version number and no-warranty blurb, and exit. @end table @node Startup @subsection What @value{GDBN} Does During Startup @cindex @value{GDBN} startup Here's the description of what @value{GDBN} does during session startup: @enumerate @item Sets up the command interpreter as specified by the command line (@pxref{Mode Options, interpreter}). @item @cindex init file Reads the system-wide @dfn{init file} (if @option{--with-system-gdbinit} was used when building @value{GDBN}; @pxref{System-wide configuration, ,System-wide configuration and settings}) and executes all the commands in that file. @anchor{Home Directory Init File} @item Reads the init file (if any) in your home directory@footnote{On DOS/Windows systems, the home directory is the one pointed to by the @code{HOME} environment variable.} and executes all the commands in that file. @anchor{Option -init-eval-command} @item Executes commands and command files specified by the @samp{-iex} and @samp{-ix} options in their specified order. Usually you should use the @samp{-ex} and @samp{-x} options instead, but this way you can apply settings before @value{GDBN} init files get executed and before inferior gets loaded. @item Processes command line options and operands. @anchor{Init File in the Current Directory during Startup} @item Reads and executes the commands from init file (if any) in the current working directory as long as @samp{set auto-load local-gdbinit} is set to @samp{on} (@pxref{Init File in the Current Directory}). This is only done if the current directory is different from your home directory. Thus, you can have more than one init file, one generic in your home directory, and another, specific to the program you are debugging, in the directory where you invoke @value{GDBN}. @item If the command line specified a program to debug, or a process to attach to, or a core file, @value{GDBN} loads any auto-loaded scripts provided for the program or for its loaded shared libraries. @xref{Auto-loading}. If you wish to disable the auto-loading during startup, you must do something like the following: @smallexample $ gdb -iex "set auto-load python-scripts off" myprogram @end smallexample Option @samp{-ex} does not work because the auto-loading is then turned off too late. @item Executes commands and command files specified by the @samp{-ex} and @samp{-x} options in their specified order. @xref{Command Files}, for more details about @value{GDBN} command files. @item Reads the command history recorded in the @dfn{history file}. @xref{Command History}, for more details about the command history and the files where @value{GDBN} records it. @end enumerate Init files use the same syntax as @dfn{command files} (@pxref{Command Files}) and are processed by @value{GDBN} in the same way. The init file in your home directory can set options (such as @samp{set complaints}) that affect subsequent processing of command line options and operands. Init files are not executed if you use the @samp{-nx} option (@pxref{Mode Options, ,Choosing Modes}). To display the list of init files loaded by gdb at startup, you can use @kbd{gdb --help}. @cindex init file name @cindex @file{.gdbinit} @cindex @file{gdb.ini} The @value{GDBN} init files are normally called @file{.gdbinit}. The DJGPP port of @value{GDBN} uses the name @file{gdb.ini}, due to the limitations of file names imposed by DOS filesystems. The Windows port of @value{GDBN} uses the standard name, but if it finds a @file{gdb.ini} file in your home directory, it warns you about that and suggests to rename the file to the standard name. @node Quitting GDB @section Quitting @value{GDBN} @cindex exiting @value{GDBN} @cindex leaving @value{GDBN} @table @code @kindex quit @r{[}@var{expression}@r{]} @kindex q @r{(@code{quit})} @item quit @r{[}@var{expression}@r{]} @itemx q To exit @value{GDBN}, use the @code{quit} command (abbreviated @code{q}), or type an end-of-file character (usually @kbd{Ctrl-d}). If you do not supply @var{expression}, @value{GDBN} will terminate normally; otherwise it will terminate using the result of @var{expression} as the error code. @end table @cindex interrupt An interrupt (often @kbd{Ctrl-c}) does not exit from @value{GDBN}, but rather terminates the action of any @value{GDBN} command that is in progress and returns to @value{GDBN} command level. It is safe to type the interrupt character at any time because @value{GDBN} does not allow it to take effect until a time when it is safe. If you have been using @value{GDBN} to control an attached process or device, you can release it with the @code{detach} command (@pxref{Attach, ,Debugging an Already-running Process}). @node Shell Commands @section Shell Commands If you need to execute occasional shell commands during your debugging session, there is no need to leave or suspend @value{GDBN}; you can just use the @code{shell} command. @table @code @kindex shell @kindex ! @cindex shell escape @item shell @var{command-string} @itemx !@var{command-string} Invoke a standard shell to execute @var{command-string}. Note that no space is needed between @code{!} and @var{command-string}. If it exists, the environment variable @code{SHELL} determines which shell to run. Otherwise @value{GDBN} uses the default shell (@file{/bin/sh} on Unix systems, @file{COMMAND.COM} on MS-DOS, etc.). @end table The utility @code{make} is often needed in development environments. You do not have to use the @code{shell} command for this purpose in @value{GDBN}: @table @code @kindex make @cindex calling make @item make @var{make-args} Execute the @code{make} program with the specified arguments. This is equivalent to @samp{shell make @var{make-args}}. @end table @node Logging Output @section Logging Output @cindex logging @value{GDBN} output @cindex save @value{GDBN} output to a file You may want to save the output of @value{GDBN} commands to a file. There are several commands to control @value{GDBN}'s logging. @table @code @kindex set logging @item set logging on Enable logging. @item set logging off Disable logging. @cindex logging file name @item set logging file @var{file} Change the name of the current logfile. The default logfile is @file{gdb.txt}. @item set logging overwrite [on|off] By default, @value{GDBN} will append to the logfile. Set @code{overwrite} if you want @code{set logging on} to overwrite the logfile instead. @item set logging redirect [on|off] By default, @value{GDBN} output will go to both the terminal and the logfile. Set @code{redirect} if you want output to go only to the log file. @kindex show logging @item show logging Show the current values of the logging settings. @end table @node Commands @chapter @value{GDBN} Commands You can abbreviate a @value{GDBN} command to the first few letters of the command name, if that abbreviation is unambiguous; and you can repeat certain @value{GDBN} commands by typing just @key{RET}. You can also use the @key{TAB} key to get @value{GDBN} to fill out the rest of a word in a command (or to show you the alternatives available, if there is more than one possibility). @menu * Command Syntax:: How to give commands to @value{GDBN} * Completion:: Command completion * Help:: How to ask @value{GDBN} for help @end menu @node Command Syntax @section Command Syntax A @value{GDBN} command is a single line of input. There is no limit on how long it can be. It starts with a command name, which is followed by arguments whose meaning depends on the command name. For example, the command @code{step} accepts an argument which is the number of times to step, as in @samp{step 5}. You can also use the @code{step} command with no arguments. Some commands do not allow any arguments. @cindex abbreviation @value{GDBN} command names may always be truncated if that abbreviation is unambiguous. Other possible command abbreviations are listed in the documentation for individual commands. In some cases, even ambiguous abbreviations are allowed; for example, @code{s} is specially defined as equivalent to @code{step} even though there are other commands whose names start with @code{s}. You can test abbreviations by using them as arguments to the @code{help} command. @cindex repeating commands @kindex RET @r{(repeat last command)} A blank line as input to @value{GDBN} (typing just @key{RET}) means to repeat the previous command. Certain commands (for example, @code{run}) will not repeat this way; these are commands whose unintentional repetition might cause trouble and which you are unlikely to want to repeat. User-defined commands can disable this feature; see @ref{Define, dont-repeat}. The @code{list} and @code{x} commands, when you repeat them with @key{RET}, construct new arguments rather than repeating exactly as typed. This permits easy scanning of source or memory. @value{GDBN} can also use @key{RET} in another way: to partition lengthy output, in a way similar to the common utility @code{more} (@pxref{Screen Size,,Screen Size}). Since it is easy to press one @key{RET} too many in this situation, @value{GDBN} disables command repetition after any command that generates this sort of display. @kindex # @r{(a comment)} @cindex comment Any text from a @kbd{#} to the end of the line is a comment; it does nothing. This is useful mainly in command files (@pxref{Command Files,,Command Files}). @cindex repeating command sequences @kindex Ctrl-o @r{(operate-and-get-next)} The @kbd{Ctrl-o} binding is useful for repeating a complex sequence of commands. This command accepts the current line, like @key{RET}, and then fetches the next line relative to the current line from the history for editing. @node Completion @section Command Completion @cindex completion @cindex word completion @value{GDBN} can fill in the rest of a word in a command for you, if there is only one possibility; it can also show you what the valid possibilities are for the next word in a command, at any time. This works for @value{GDBN} commands, @value{GDBN} subcommands, and the names of symbols in your program. Press the @key{TAB} key whenever you want @value{GDBN} to fill out the rest of a word. If there is only one possibility, @value{GDBN} fills in the word, and waits for you to finish the command (or press @key{RET} to enter it). For example, if you type @c FIXME "@key" does not distinguish its argument sufficiently to permit @c complete accuracy in these examples; space introduced for clarity. @c If texinfo enhancements make it unnecessary, it would be nice to @c replace " @key" by "@key" in the following... @smallexample (@value{GDBP}) info bre @key{TAB} @end smallexample @noindent @value{GDBN} fills in the rest of the word @samp{breakpoints}, since that is the only @code{info} subcommand beginning with @samp{bre}: @smallexample (@value{GDBP}) info breakpoints @end smallexample @noindent You can either press @key{RET} at this point, to run the @code{info breakpoints} command, or backspace and enter something else, if @samp{breakpoints} does not look like the command you expected. (If you were sure you wanted @code{info breakpoints} in the first place, you might as well just type @key{RET} immediately after @samp{info bre}, to exploit command abbreviations rather than command completion). If there is more than one possibility for the next word when you press @key{TAB}, @value{GDBN} sounds a bell. You can either supply more characters and try again, or just press @key{TAB} a second time; @value{GDBN} displays all the possible completions for that word. For example, you might want to set a breakpoint on a subroutine whose name begins with @samp{make_}, but when you type @kbd{b make_@key{TAB}} @value{GDBN} just sounds the bell. Typing @key{TAB} again displays all the function names in your program that begin with those characters, for example: @smallexample (@value{GDBP}) b make_ @key{TAB} @exdent @value{GDBN} sounds bell; press @key{TAB} again, to see: make_a_section_from_file make_environ make_abs_section make_function_type make_blockvector make_pointer_type make_cleanup make_reference_type make_command make_symbol_completion_list (@value{GDBP}) b make_ @end smallexample @noindent After displaying the available possibilities, @value{GDBN} copies your partial input (@samp{b make_} in the example) so you can finish the command. If you just want to see the list of alternatives in the first place, you can press @kbd{M-?} rather than pressing @key{TAB} twice. @kbd{M-?} means @kbd{@key{META} ?}. You can type this either by holding down a key designated as the @key{META} shift on your keyboard (if there is one) while typing @kbd{?}, or as @key{ESC} followed by @kbd{?}. @cindex quotes in commands @cindex completion of quoted strings Sometimes the string you need, while logically a ``word'', may contain parentheses or other characters that @value{GDBN} normally excludes from its notion of a word. To permit word completion to work in this situation, you may enclose words in @code{'} (single quote marks) in @value{GDBN} commands. The most likely situation where you might need this is in typing the name of a C@t{++} function. This is because C@t{++} allows function overloading (multiple definitions of the same function, distinguished by argument type). For example, when you want to set a breakpoint you may need to distinguish whether you mean the version of @code{name} that takes an @code{int} parameter, @code{name(int)}, or the version that takes a @code{float} parameter, @code{name(float)}. To use the word-completion facilities in this situation, type a single quote @code{'} at the beginning of the function name. This alerts @value{GDBN} that it may need to consider more information than usual when you press @key{TAB} or @kbd{M-?} to request word completion: @smallexample (@value{GDBP}) b 'bubble( @kbd{M-?} bubble(double,double) bubble(int,int) (@value{GDBP}) b 'bubble( @end smallexample In some cases, @value{GDBN} can tell that completing a name requires using quotes. When this happens, @value{GDBN} inserts the quote for you (while completing as much as it can) if you do not type the quote in the first place: @smallexample (@value{GDBP}) b bub @key{TAB} @exdent @value{GDBN} alters your input line to the following, and rings a bell: (@value{GDBP}) b 'bubble( @end smallexample @noindent In general, @value{GDBN} can tell that a quote is needed (and inserts it) if you have not yet started typing the argument list when you ask for completion on an overloaded symbol. For more information about overloaded functions, see @ref{C Plus Plus Expressions, ,C@t{++} Expressions}. You can use the command @code{set overload-resolution off} to disable overload resolution; see @ref{Debugging C Plus Plus, ,@value{GDBN} Features for C@t{++}}. @cindex completion of structure field names @cindex structure field name completion @cindex completion of union field names @cindex union field name completion When completing in an expression which looks up a field in a structure, @value{GDBN} also tries@footnote{The completer can be confused by certain kinds of invalid expressions. Also, it only examines the static type of the expression, not the dynamic type.} to limit completions to the field names available in the type of the left-hand-side: @smallexample (@value{GDBP}) p gdb_stdout.@kbd{M-?} magic to_fputs to_rewind to_data to_isatty to_write to_delete to_put to_write_async_safe to_flush to_read @end smallexample @noindent This is because the @code{gdb_stdout} is a variable of the type @code{struct ui_file} that is defined in @value{GDBN} sources as follows: @smallexample struct ui_file @{ int *magic; ui_file_flush_ftype *to_flush; ui_file_write_ftype *to_write; ui_file_write_async_safe_ftype *to_write_async_safe; ui_file_fputs_ftype *to_fputs; ui_file_read_ftype *to_read; ui_file_delete_ftype *to_delete; ui_file_isatty_ftype *to_isatty; ui_file_rewind_ftype *to_rewind; ui_file_put_ftype *to_put; void *to_data; @} @end smallexample @node Help @section Getting Help @cindex online documentation @kindex help You can always ask @value{GDBN} itself for information on its commands, using the command @code{help}. @table @code @kindex h @r{(@code{help})} @item help @itemx h You can use @code{help} (abbreviated @code{h}) with no arguments to display a short list of named classes of commands: @smallexample (@value{GDBP}) help List of classes of commands: aliases -- Aliases of other commands breakpoints -- Making program stop at certain points data -- Examining data files -- Specifying and examining files internals -- Maintenance commands obscure -- Obscure features running -- Running the program stack -- Examining the stack status -- Status inquiries support -- Support facilities tracepoints -- Tracing of program execution without stopping the program user-defined -- User-defined commands Type "help" followed by a class name for a list of commands in that class. Type "help" followed by command name for full documentation. Command name abbreviations are allowed if unambiguous. (@value{GDBP}) @end smallexample @c the above line break eliminates huge line overfull... @item help @var{class} Using one of the general help classes as an argument, you can get a list of the individual commands in that class. For example, here is the help display for the class @code{status}: @smallexample (@value{GDBP}) help status Status inquiries. List of commands: @c Line break in "show" line falsifies real output, but needed @c to fit in smallbook page size. info -- Generic command for showing things about the program being debugged show -- Generic command for showing things about the debugger Type "help" followed by command name for full documentation. Command name abbreviations are allowed if unambiguous. (@value{GDBP}) @end smallexample @item help @var{command} With a command name as @code{help} argument, @value{GDBN} displays a short paragraph on how to use that command. @kindex apropos @item apropos @var{args} The @code{apropos} command searches through all of the @value{GDBN} commands, and their documentation, for the regular expression specified in @var{args}. It prints out all matches found. For example: @smallexample apropos alias @end smallexample @noindent results in: @smallexample @c @group alias -- Define a new command that is an alias of an existing command aliases -- Aliases of other commands d -- Delete some breakpoints or auto-display expressions del -- Delete some breakpoints or auto-display expressions delete -- Delete some breakpoints or auto-display expressions @c @end group @end smallexample @kindex complete @item complete @var{args} The @code{complete @var{args}} command lists all the possible completions for the beginning of a command. Use @var{args} to specify the beginning of the command you want completed. For example: @smallexample complete i @end smallexample @noindent results in: @smallexample @group if ignore info inspect @end group @end smallexample @noindent This is intended for use by @sc{gnu} Emacs. @end table In addition to @code{help}, you can use the @value{GDBN} commands @code{info} and @code{show} to inquire about the state of your program, or the state of @value{GDBN} itself. Each command supports many topics of inquiry; this manual introduces each of them in the appropriate context. The listings under @code{info} and under @code{show} in the Command, Variable, and Function Index point to all the sub-commands. @xref{Command and Variable Index}. @c @group @table @code @kindex info @kindex i @r{(@code{info})} @item info This command (abbreviated @code{i}) is for describing the state of your program. For example, you can show the arguments passed to a function with @code{info args}, list the registers currently in use with @code{info registers}, or list the breakpoints you have set with @code{info breakpoints}. You can get a complete list of the @code{info} sub-commands with @w{@code{help info}}. @kindex set @item set You can assign the result of an expression to an environment variable with @code{set}. For example, you can set the @value{GDBN} prompt to a $-sign with @code{set prompt $}. @kindex show @item show In contrast to @code{info}, @code{show} is for describing the state of @value{GDBN} itself. You can change most of the things you can @code{show}, by using the related command @code{set}; for example, you can control what number system is used for displays with @code{set radix}, or simply inquire which is currently in use with @code{show radix}. @kindex info set To display all the settable parameters and their current values, you can use @code{show} with no arguments; you may also use @code{info set}. Both commands produce the same display. @c FIXME: "info set" violates the rule that "info" is for state of @c FIXME...program. Ck w/ GNU: "info set" to be called something else, @c FIXME...or change desc of rule---eg "state of prog and debugging session"? @end table @c @end group Here are three miscellaneous @code{show} subcommands, all of which are exceptional in lacking corresponding @code{set} commands: @table @code @kindex show version @cindex @value{GDBN} version number @item show version Show what version of @value{GDBN} is running. You should include this information in @value{GDBN} bug-reports. If multiple versions of @value{GDBN} are in use at your site, you may need to determine which version of @value{GDBN} you are running; as @value{GDBN} evolves, new commands are introduced, and old ones may wither away. Also, many system vendors ship variant versions of @value{GDBN}, and there are variant versions of @value{GDBN} in @sc{gnu}/Linux distributions as well. The version number is the same as the one announced when you start @value{GDBN}. @kindex show copying @kindex info copying @cindex display @value{GDBN} copyright @item show copying @itemx info copying Display information about permission for copying @value{GDBN}. @kindex show warranty @kindex info warranty @item show warranty @itemx info warranty Display the @sc{gnu} ``NO WARRANTY'' statement, or a warranty, if your version of @value{GDBN} comes with one. @end table @node Running @chapter Running Programs Under @value{GDBN} When you run a program under @value{GDBN}, you must first generate debugging information when you compile it. You may start @value{GDBN} with its arguments, if any, in an environment of your choice. If you are doing native debugging, you may redirect your program's input and output, debug an already running process, or kill a child process. @menu * Compilation:: Compiling for debugging * Starting:: Starting your program * Arguments:: Your program's arguments * Environment:: Your program's environment * Working Directory:: Your program's working directory * Input/Output:: Your program's input and output * Attach:: Debugging an already-running process * Kill Process:: Killing the child process * Inferiors and Programs:: Debugging multiple inferiors and programs * Threads:: Debugging programs with multiple threads * Forks:: Debugging forks * Checkpoint/Restart:: Setting a @emph{bookmark} to return to later @end menu @node Compilation @section Compiling for Debugging In order to debug a program effectively, you need to generate debugging information when you compile it. This debugging information is stored in the object file; it describes the data type of each variable or function and the correspondence between source line numbers and addresses in the executable code. To request debugging information, specify the @samp{-g} option when you run the compiler. Programs that are to be shipped to your customers are compiled with optimizations, using the @samp{-O} compiler option. However, some compilers are unable to handle the @samp{-g} and @samp{-O} options together. Using those compilers, you cannot generate optimized executables containing debugging information. @value{NGCC}, the @sc{gnu} C/C@t{++} compiler, supports @samp{-g} with or without @samp{-O}, making it possible to debug optimized code. We recommend that you @emph{always} use @samp{-g} whenever you compile a program. You may think your program is correct, but there is no sense in pushing your luck. For more information, see @ref{Optimized Code}. Older versions of the @sc{gnu} C compiler permitted a variant option @w{@samp{-gg}} for debugging information. @value{GDBN} no longer supports this format; if your @sc{gnu} C compiler has this option, do not use it. @value{GDBN} knows about preprocessor macros and can show you their expansion (@pxref{Macros}). Most compilers do not include information about preprocessor macros in the debugging information if you specify the @option{-g} flag alone. Version 3.1 and later of @value{NGCC}, the @sc{gnu} C compiler, provides macro information if you are using the DWARF debugging format, and specify the option @option{-g3}. @xref{Debugging Options,,Options for Debugging Your Program or GCC, gcc.info, Using the @sc{gnu} Compiler Collection (GCC)}, for more information on @value{NGCC} options affecting debug information. You will have the best debugging experience if you use the latest version of the DWARF debugging format that your compiler supports. DWARF is currently the most expressive and best supported debugging format in @value{GDBN}. @need 2000 @node Starting @section Starting your Program @cindex starting @cindex running @table @code @kindex run @kindex r @r{(@code{run})} @item run @itemx r Use the @code{run} command to start your program under @value{GDBN}. You must first specify the program name (except on VxWorks) with an argument to @value{GDBN} (@pxref{Invocation, ,Getting In and Out of @value{GDBN}}), or by using the @code{file} or @code{exec-file} command (@pxref{Files, ,Commands to Specify Files}). @end table If you are running your program in an execution environment that supports processes, @code{run} creates an inferior process and makes that process run your program. In some environments without processes, @code{run} jumps to the start of your program. Other targets, like @samp{remote}, are always running. If you get an error message like this one: @smallexample The "remote" target does not support "run". Try "help target" or "continue". @end smallexample @noindent then use @code{continue} to run your program. You may need @code{load} first (@pxref{load}). The execution of a program is affected by certain information it receives from its superior. @value{GDBN} provides ways to specify this information, which you must do @emph{before} starting your program. (You can change it after starting your program, but such changes only affect your program the next time you start it.) This information may be divided into four categories: @table @asis @item The @emph{arguments.} Specify the arguments to give your program as the arguments of the @code{run} command. If a shell is available on your target, the shell is used to pass the arguments, so that you may use normal conventions (such as wildcard expansion or variable substitution) in describing the arguments. In Unix systems, you can control which shell is used with the @code{SHELL} environment variable. @xref{Arguments, ,Your Program's Arguments}. @item The @emph{environment.} Your program normally inherits its environment from @value{GDBN}, but you can use the @value{GDBN} commands @code{set environment} and @code{unset environment} to change parts of the environment that affect your program. @xref{Environment, ,Your Program's Environment}. @item The @emph{working directory.} Your program inherits its working directory from @value{GDBN}. You can set the @value{GDBN} working directory with the @code{cd} command in @value{GDBN}. @xref{Working Directory, ,Your Program's Working Directory}. @item The @emph{standard input and output.} Your program normally uses the same device for standard input and standard output as @value{GDBN} is using. You can redirect input and output in the @code{run} command line, or you can use the @code{tty} command to set a different device for your program. @xref{Input/Output, ,Your Program's Input and Output}. @cindex pipes @emph{Warning:} While input and output redirection work, you cannot use pipes to pass the output of the program you are debugging to another program; if you attempt this, @value{GDBN} is likely to wind up debugging the wrong program. @end table When you issue the @code{run} command, your program begins to execute immediately. @xref{Stopping, ,Stopping and Continuing}, for discussion of how to arrange for your program to stop. Once your program has stopped, you may call functions in your program, using the @code{print} or @code{call} commands. @xref{Data, ,Examining Data}. If the modification time of your symbol file has changed since the last time @value{GDBN} read its symbols, @value{GDBN} discards its symbol table, and reads it again. When it does this, @value{GDBN} tries to retain your current breakpoints. @table @code @kindex start @item start @cindex run to main procedure The name of the main procedure can vary from language to language. With C or C@t{++}, the main procedure name is always @code{main}, but other languages such as Ada do not require a specific name for their main procedure. The debugger provides a convenient way to start the execution of the program and to stop at the beginning of the main procedure, depending on the language used. The @samp{start} command does the equivalent of setting a temporary breakpoint at the beginning of the main procedure and then invoking the @samp{run} command. @cindex elaboration phase Some programs contain an @dfn{elaboration} phase where some startup code is executed before the main procedure is called. This depends on the languages used to write your program. In C@t{++}, for instance, constructors for static and global objects are executed before @code{main} is called. It is therefore possible that the debugger stops before reaching the main procedure. However, the temporary breakpoint will remain to halt execution. Specify the arguments to give to your program as arguments to the @samp{start} command. These arguments will be given verbatim to the underlying @samp{run} command. Note that the same arguments will be reused if no argument is provided during subsequent calls to @samp{start} or @samp{run}. It is sometimes necessary to debug the program during elaboration. In these cases, using the @code{start} command would stop the execution of your program too late, as the program would have already completed the elaboration phase. Under these circumstances, insert breakpoints in your elaboration code before running your program. @kindex set exec-wrapper @item set exec-wrapper @var{wrapper} @itemx show exec-wrapper @itemx unset exec-wrapper When @samp{exec-wrapper} is set, the specified wrapper is used to launch programs for debugging. @value{GDBN} starts your program with a shell command of the form @kbd{exec @var{wrapper} @var{program}}. Quoting is added to @var{program} and its arguments, but not to @var{wrapper}, so you should add quotes if appropriate for your shell. The wrapper runs until it executes your program, and then @value{GDBN} takes control. You can use any program that eventually calls @code{execve} with its arguments as a wrapper. Several standard Unix utilities do this, e.g.@: @code{env} and @code{nohup}. Any Unix shell script ending with @code{exec "$@@"} will also work. For example, you can use @code{env} to pass an environment variable to the debugged program, without setting the variable in your shell's environment: @smallexample (@value{GDBP}) set exec-wrapper env 'LD_PRELOAD=libtest.so' (@value{GDBP}) run @end smallexample This command is available when debugging locally on most targets, excluding @sc{djgpp}, Cygwin, MS Windows, and QNX Neutrino. @kindex set disable-randomization @item set disable-randomization @itemx set disable-randomization on This option (enabled by default in @value{GDBN}) will turn off the native randomization of the virtual address space of the started program. This option is useful for multiple debugging sessions to make the execution better reproducible and memory addresses reusable across debugging sessions. This feature is implemented only on certain targets, including @sc{gnu}/Linux. On @sc{gnu}/Linux you can get the same behavior using @smallexample (@value{GDBP}) set exec-wrapper setarch `uname -m` -R @end smallexample @item set disable-randomization off Leave the behavior of the started executable unchanged. Some bugs rear their ugly heads only when the program is loaded at certain addresses. If your bug disappears when you run the program under @value{GDBN}, that might be because @value{GDBN} by default disables the address randomization on platforms, such as @sc{gnu}/Linux, which do that for stand-alone programs. Use @kbd{set disable-randomization off} to try to reproduce such elusive bugs. On targets where it is available, virtual address space randomization protects the programs against certain kinds of security attacks. In these cases the attacker needs to know the exact location of a concrete executable code. Randomizing its location makes it impossible to inject jumps misusing a code at its expected addresses. Prelinking shared libraries provides a startup performance advantage but it makes addresses in these libraries predictable for privileged processes by having just unprivileged access at the target system. Reading the shared library binary gives enough information for assembling the malicious code misusing it. Still even a prelinked shared library can get loaded at a new random address just requiring the regular relocation process during the startup. Shared libraries not already prelinked are always loaded at a randomly chosen address. Position independent executables (PIE) contain position independent code similar to the shared libraries and therefore such executables get loaded at a randomly chosen address upon startup. PIE executables always load even already prelinked shared libraries at a random address. You can build such executable using @command{gcc -fPIE -pie}. Heap (malloc storage), stack and custom mmap areas are always placed randomly (as long as the randomization is enabled). @item show disable-randomization Show the current setting of the explicit disable of the native randomization of the virtual address space of the started program. @end table @node Arguments @section Your Program's Arguments @cindex arguments (to your program) The arguments to your program can be specified by the arguments of the @code{run} command. They are passed to a shell, which expands wildcard characters and performs redirection of I/O, and thence to your program. Your @code{SHELL} environment variable (if it exists) specifies what shell @value{GDBN} uses. If you do not define @code{SHELL}, @value{GDBN} uses the default shell (@file{/bin/sh} on Unix). On non-Unix systems, the program is usually invoked directly by @value{GDBN}, which emulates I/O redirection via the appropriate system calls, and the wildcard characters are expanded by the startup code of the program, not by the shell. @code{run} with no arguments uses the same arguments used by the previous @code{run}, or those set by the @code{set args} command. @table @code @kindex set args @item set args Specify the arguments to be used the next time your program is run. If @code{set args} has no arguments, @code{run} executes your program with no arguments. Once you have run your program with arguments, using @code{set args} before the next @code{run} is the only way to run it again without arguments. @kindex show args @item show args Show the arguments to give your program when it is started. @end table @node Environment @section Your Program's Environment @cindex environment (of your program) The @dfn{environment} consists of a set of environment variables and their values. Environment variables conventionally record such things as your user name, your home directory, your terminal type, and your search path for programs to run. Usually you set up environment variables with the shell and they are inherited by all the other programs you run. When debugging, it can be useful to try running your program with a modified environment without having to start @value{GDBN} over again. @table @code @kindex path @item path @var{directory} Add @var{directory} to the front of the @code{PATH} environment variable (the search path for executables) that will be passed to your program. The value of @code{PATH} used by @value{GDBN} does not change. You may specify several directory names, separated by whitespace or by a system-dependent separator character (@samp{:} on Unix, @samp{;} on MS-DOS and MS-Windows). If @var{directory} is already in the path, it is moved to the front, so it is searched sooner. You can use the string @samp{$cwd} to refer to whatever is the current working directory at the time @value{GDBN} searches the path. If you use @samp{.} instead, it refers to the directory where you executed the @code{path} command. @value{GDBN} replaces @samp{.} in the @var{directory} argument (with the current path) before adding @var{directory} to the search path. @c 'path' is explicitly nonrepeatable, but RMS points out it is silly to @c document that, since repeating it would be a no-op. @kindex show paths @item show paths Display the list of search paths for executables (the @code{PATH} environment variable). @kindex show environment @item show environment @r{[}@var{varname}@r{]} Print the value of environment variable @var{varname} to be given to your program when it starts. If you do not supply @var{varname}, print the names and values of all environment variables to be given to your program. You can abbreviate @code{environment} as @code{env}. @kindex set environment @item set environment @var{varname} @r{[}=@var{value}@r{]} Set environment variable @var{varname} to @var{value}. The value changes for your program only, not for @value{GDBN} itself. @var{value} may be any string; the values of environment variables are just strings, and any interpretation is supplied by your program itself. The @var{value} parameter is optional; if it is eliminated, the variable is set to a null value. @c "any string" here does not include leading, trailing @c blanks. Gnu asks: does anyone care? For example, this command: @smallexample set env USER = foo @end smallexample @noindent tells the debugged program, when subsequently run, that its user is named @samp{foo}. (The spaces around @samp{=} are used for clarity here; they are not actually required.) @kindex unset environment @item unset environment @var{varname} Remove variable @var{varname} from the environment to be passed to your program. This is different from @samp{set env @var{varname} =}; @code{unset environment} removes the variable from the environment, rather than assigning it an empty value. @end table @emph{Warning:} On Unix systems, @value{GDBN} runs your program using the shell indicated by your @code{SHELL} environment variable if it exists (or @code{/bin/sh} if not). If your @code{SHELL} variable names a shell that runs an initialization file---such as @file{.cshrc} for C-shell, or @file{.bashrc} for BASH---any variables you set in that file affect your program. You may wish to move setting of environment variables to files that are only run when you sign on, such as @file{.login} or @file{.profile}. @node Working Directory @section Your Program's Working Directory @cindex working directory (of your program) Each time you start your program with @code{run}, it inherits its working directory from the current working directory of @value{GDBN}. The @value{GDBN} working directory is initially whatever it inherited from its parent process (typically the shell), but you can specify a new working directory in @value{GDBN} with the @code{cd} command. The @value{GDBN} working directory also serves as a default for the commands that specify files for @value{GDBN} to operate on. @xref{Files, ,Commands to Specify Files}. @table @code @kindex cd @cindex change working directory @item cd @r{[}@var{directory}@r{]} Set the @value{GDBN} working directory to @var{directory}. If not given, @var{directory} uses @file{'~'}. @kindex pwd @item pwd Print the @value{GDBN} working directory. @end table It is generally impossible to find the current working directory of the process being debugged (since a program can change its directory during its run). If you work on a system where @value{GDBN} is configured with the @file{/proc} support, you can use the @code{info proc} command (@pxref{SVR4 Process Information}) to find out the current working directory of the debuggee. @node Input/Output @section Your Program's Input and Output @cindex redirection @cindex i/o @cindex terminal By default, the program you run under @value{GDBN} does input and output to the same terminal that @value{GDBN} uses. @value{GDBN} switches the terminal to its own terminal modes to interact with you, but it records the terminal modes your program was using and switches back to them when you continue running your program. @table @code @kindex info terminal @item info terminal Displays information recorded by @value{GDBN} about the terminal modes your program is using. @end table You can redirect your program's input and/or output using shell redirection with the @code{run} command. For example, @smallexample run > outfile @end smallexample @noindent starts your program, diverting its output to the file @file{outfile}. @kindex tty @cindex controlling terminal Another way to specify where your program should do input and output is with the @code{tty} command. This command accepts a file name as argument, and causes this file to be the default for future @code{run} commands. It also resets the controlling terminal for the child process, for future @code{run} commands. For example, @smallexample tty /dev/ttyb @end smallexample @noindent directs that processes started with subsequent @code{run} commands default to do input and output on the terminal @file{/dev/ttyb} and have that as their controlling terminal. An explicit redirection in @code{run} overrides the @code{tty} command's effect on the input/output device, but not its effect on the controlling terminal. When you use the @code{tty} command or redirect input in the @code{run} command, only the input @emph{for your program} is affected. The input for @value{GDBN} still comes from your terminal. @code{tty} is an alias for @code{set inferior-tty}. @cindex inferior tty @cindex set inferior controlling terminal You can use the @code{show inferior-tty} command to tell @value{GDBN} to display the name of the terminal that will be used for future runs of your program. @table @code @item set inferior-tty /dev/ttyb @kindex set inferior-tty Set the tty for the program being debugged to /dev/ttyb. @item show inferior-tty @kindex show inferior-tty Show the current tty for the program being debugged. @end table @node Attach @section Debugging an Already-running Process @kindex attach @cindex attach @table @code @item attach @var{process-id} This command attaches to a running process---one that was started outside @value{GDBN}. (@code{info files} shows your active targets.) The command takes as argument a process ID. The usual way to find out the @var{process-id} of a Unix process is with the @code{ps} utility, or with the @samp{jobs -l} shell command. @code{attach} does not repeat if you press @key{RET} a second time after executing the command. @end table To use @code{attach}, your program must be running in an environment which supports processes; for example, @code{attach} does not work for programs on bare-board targets that lack an operating system. You must also have permission to send the process a signal. When you use @code{attach}, the debugger finds the program running in the process first by looking in the current working directory, then (if the program is not found) by using the source file search path (@pxref{Source Path, ,Specifying Source Directories}). You can also use the @code{file} command to load the program. @xref{Files, ,Commands to Specify Files}. The first thing @value{GDBN} does after arranging to debug the specified process is to stop it. You can examine and modify an attached process with all the @value{GDBN} commands that are ordinarily available when you start processes with @code{run}. You can insert breakpoints; you can step and continue; you can modify storage. If you would rather the process continue running, you may use the @code{continue} command after attaching @value{GDBN} to the process. @table @code @kindex detach @item detach When you have finished debugging the attached process, you can use the @code{detach} command to release it from @value{GDBN} control. Detaching the process continues its execution. After the @code{detach} command, that process and @value{GDBN} become completely independent once more, and you are ready to @code{attach} another process or start one with @code{run}. @code{detach} does not repeat if you press @key{RET} again after executing the command. @end table If you exit @value{GDBN} while you have an attached process, you detach that process. If you use the @code{run} command, you kill that process. By default, @value{GDBN} asks for confirmation if you try to do either of these things; you can control whether or not you need to confirm by using the @code{set confirm} command (@pxref{Messages/Warnings, ,Optional Warnings and Messages}). @node Kill Process @section Killing the Child Process @table @code @kindex kill @item kill Kill the child process in which your program is running under @value{GDBN}. @end table This command is useful if you wish to debug a core dump instead of a running process. @value{GDBN} ignores any core dump file while your program is running. On some operating systems, a program cannot be executed outside @value{GDBN} while you have breakpoints set on it inside @value{GDBN}. You can use the @code{kill} command in this situation to permit running your program outside the debugger. The @code{kill} command is also useful if you wish to recompile and relink your program, since on many systems it is impossible to modify an executable file while it is running in a process. In this case, when you next type @code{run}, @value{GDBN} notices that the file has changed, and reads the symbol table again (while trying to preserve your current breakpoint settings). @node Inferiors and Programs @section Debugging Multiple Inferiors and Programs @value{GDBN} lets you run and debug multiple programs in a single session. In addition, @value{GDBN} on some systems may let you run several programs simultaneously (otherwise you have to exit from one before starting another). In the most general case, you can have multiple threads of execution in each of multiple processes, launched from multiple executables. @cindex inferior @value{GDBN} represents the state of each program execution with an object called an @dfn{inferior}. An inferior typically corresponds to a process, but is more general and applies also to targets that do not have processes. Inferiors may be created before a process runs, and may be retained after a process exits. Inferiors have unique identifiers that are different from process ids. Usually each inferior will also have its own distinct address space, although some embedded targets may have several inferiors running in different parts of a single address space. Each inferior may in turn have multiple threads running in it. To find out what inferiors exist at any moment, use @w{@code{info inferiors}}: @table @code @kindex info inferiors @item info inferiors Print a list of all inferiors currently being managed by @value{GDBN}. @value{GDBN} displays for each inferior (in this order): @enumerate @item the inferior number assigned by @value{GDBN} @item the target system's inferior identifier @item the name of the executable the inferior is running. @end enumerate @noindent An asterisk @samp{*} preceding the @value{GDBN} inferior number indicates the current inferior. For example, @end table @c end table here to get a little more width for example @smallexample (@value{GDBP}) info inferiors Num Description Executable 2 process 2307 hello * 1 process 3401 goodbye @end smallexample To switch focus between inferiors, use the @code{inferior} command: @table @code @kindex inferior @var{infno} @item inferior @var{infno} Make inferior number @var{infno} the current inferior. The argument @var{infno} is the inferior number assigned by @value{GDBN}, as shown in the first field of the @samp{info inferiors} display. @end table You can get multiple executables into a debugging session via the @code{add-inferior} and @w{@code{clone-inferior}} commands. On some systems @value{GDBN} can add inferiors to the debug session automatically by following calls to @code{fork} and @code{exec}. To remove inferiors from the debugging session use the @w{@code{remove-inferiors}} command. @table @code @kindex add-inferior @item add-inferior [ -copies @var{n} ] [ -exec @var{executable} ] Adds @var{n} inferiors to be run using @var{executable} as the executable. @var{n} defaults to 1. If no executable is specified, the inferiors begins empty, with no program. You can still assign or change the program assigned to the inferior at any time by using the @code{file} command with the executable name as its argument. @kindex clone-inferior @item clone-inferior [ -copies @var{n} ] [ @var{infno} ] Adds @var{n} inferiors ready to execute the same program as inferior @var{infno}. @var{n} defaults to 1. @var{infno} defaults to the number of the current inferior. This is a convenient command when you want to run another instance of the inferior you are debugging. @smallexample (@value{GDBP}) info inferiors Num Description Executable * 1 process 29964 helloworld (@value{GDBP}) clone-inferior Added inferior 2. 1 inferiors added. (@value{GDBP}) info inferiors Num Description Executable 2 helloworld * 1 process 29964 helloworld @end smallexample You can now simply switch focus to inferior 2 and run it. @kindex remove-inferiors @item remove-inferiors @var{infno}@dots{} Removes the inferior or inferiors @var{infno}@dots{}. It is not possible to remove an inferior that is running with this command. For those, use the @code{kill} or @code{detach} command first. @end table To quit debugging one of the running inferiors that is not the current inferior, you can either detach from it by using the @w{@code{detach inferior}} command (allowing it to run independently), or kill it using the @w{@code{kill inferiors}} command: @table @code @kindex detach inferiors @var{infno}@dots{} @item detach inferior @var{infno}@dots{} Detach from the inferior or inferiors identified by @value{GDBN} inferior number(s) @var{infno}@dots{}. Note that the inferior's entry still stays on the list of inferiors shown by @code{info inferiors}, but its Description will show @samp{}. @kindex kill inferiors @var{infno}@dots{} @item kill inferiors @var{infno}@dots{} Kill the inferior or inferiors identified by @value{GDBN} inferior number(s) @var{infno}@dots{}. Note that the inferior's entry still stays on the list of inferiors shown by @code{info inferiors}, but its Description will show @samp{}. @end table After the successful completion of a command such as @code{detach}, @code{detach inferiors}, @code{kill} or @code{kill inferiors}, or after a normal process exit, the inferior is still valid and listed with @code{info inferiors}, ready to be restarted. To be notified when inferiors are started or exit under @value{GDBN}'s control use @w{@code{set print inferior-events}}: @table @code @kindex set print inferior-events @cindex print messages on inferior start and exit @item set print inferior-events @itemx set print inferior-events on @itemx set print inferior-events off The @code{set print inferior-events} command allows you to enable or disable printing of messages when @value{GDBN} notices that new inferiors have started or that inferiors have exited or have been detached. By default, these messages will not be printed. @kindex show print inferior-events @item show print inferior-events Show whether messages will be printed when @value{GDBN} detects that inferiors have started, exited or have been detached. @end table Many commands will work the same with multiple programs as with a single program: e.g., @code{print myglobal} will simply display the value of @code{myglobal} in the current inferior. Occasionaly, when debugging @value{GDBN} itself, it may be useful to get more info about the relationship of inferiors, programs, address spaces in a debug session. You can do that with the @w{@code{maint info program-spaces}} command. @table @code @kindex maint info program-spaces @item maint info program-spaces Print a list of all program spaces currently being managed by @value{GDBN}. @value{GDBN} displays for each program space (in this order): @enumerate @item the program space number assigned by @value{GDBN} @item the name of the executable loaded into the program space, with e.g., the @code{file} command. @end enumerate @noindent An asterisk @samp{*} preceding the @value{GDBN} program space number indicates the current program space. In addition, below each program space line, @value{GDBN} prints extra information that isn't suitable to display in tabular form. For example, the list of inferiors bound to the program space. @smallexample (@value{GDBP}) maint info program-spaces Id Executable 2 goodbye Bound inferiors: ID 1 (process 21561) * 1 hello @end smallexample Here we can see that no inferior is running the program @code{hello}, while @code{process 21561} is running the program @code{goodbye}. On some targets, it is possible that multiple inferiors are bound to the same program space. The most common example is that of debugging both the parent and child processes of a @code{vfork} call. For example, @smallexample (@value{GDBP}) maint info program-spaces Id Executable * 1 vfork-test Bound inferiors: ID 2 (process 18050), ID 1 (process 18045) @end smallexample Here, both inferior 2 and inferior 1 are running in the same program space as a result of inferior 1 having executed a @code{vfork} call. @end table @node Threads @section Debugging Programs with Multiple Threads @cindex threads of execution @cindex multiple threads @cindex switching threads In some operating systems, such as HP-UX and Solaris, a single program may have more than one @dfn{thread} of execution. The precise semantics of threads differ from one operating system to another, but in general the threads of a single program are akin to multiple processes---except that they share one address space (that is, they can all examine and modify the same variables). On the other hand, each thread has its own registers and execution stack, and perhaps private memory. @value{GDBN} provides these facilities for debugging multi-thread programs: @itemize @bullet @item automatic notification of new threads @item @samp{thread @var{threadno}}, a command to switch among threads @item @samp{info threads}, a command to inquire about existing threads @item @samp{thread apply [@var{threadno}] [@var{all}] @var{args}}, a command to apply a command to a list of threads @item thread-specific breakpoints @item @samp{set print thread-events}, which controls printing of messages on thread start and exit. @item @samp{set libthread-db-search-path @var{path}}, which lets the user specify which @code{libthread_db} to use if the default choice isn't compatible with the program. @end itemize @quotation @emph{Warning:} These facilities are not yet available on every @value{GDBN} configuration where the operating system supports threads. If your @value{GDBN} does not support threads, these commands have no effect. For example, a system without thread support shows no output from @samp{info threads}, and always rejects the @code{thread} command, like this: @smallexample (@value{GDBP}) info threads (@value{GDBP}) thread 1 Thread ID 1 not known. Use the "info threads" command to see the IDs of currently known threads. @end smallexample @c FIXME to implementors: how hard would it be to say "sorry, this GDB @c doesn't support threads"? @end quotation @cindex focus of debugging @cindex current thread The @value{GDBN} thread debugging facility allows you to observe all threads while your program runs---but whenever @value{GDBN} takes control, one thread in particular is always the focus of debugging. This thread is called the @dfn{current thread}. Debugging commands show program information from the perspective of the current thread. @cindex @code{New} @var{systag} message @cindex thread identifier (system) @c FIXME-implementors!! It would be more helpful if the [New...] message @c included GDB's numeric thread handle, so you could just go to that @c thread without first checking `info threads'. Whenever @value{GDBN} detects a new thread in your program, it displays the target system's identification for the thread with a message in the form @samp{[New @var{systag}]}. @var{systag} is a thread identifier whose form varies depending on the particular system. For example, on @sc{gnu}/Linux, you might see @smallexample [New Thread 0x41e02940 (LWP 25582)] @end smallexample @noindent when @value{GDBN} notices a new thread. In contrast, on an SGI system, the @var{systag} is simply something like @samp{process 368}, with no further qualifier. @c FIXME!! (1) Does the [New...] message appear even for the very first @c thread of a program, or does it only appear for the @c second---i.e.@: when it becomes obvious we have a multithread @c program? @c (2) *Is* there necessarily a first thread always? Or do some @c multithread systems permit starting a program with multiple @c threads ab initio? @cindex thread number @cindex thread identifier (GDB) For debugging purposes, @value{GDBN} associates its own thread number---always a single integer---with each thread in your program. @table @code @kindex info threads @item info threads @r{[}@var{id}@dots{}@r{]} Display a summary of all threads currently in your program. Optional argument @var{id}@dots{} is one or more thread ids separated by spaces, and means to print information only about the specified thread or threads. @value{GDBN} displays for each thread (in this order): @enumerate @item the thread number assigned by @value{GDBN} @item the target system's thread identifier (@var{systag}) @item the thread's name, if one is known. A thread can either be named by the user (see @code{thread name}, below), or, in some cases, by the program itself. @item the current stack frame summary for that thread @end enumerate @noindent An asterisk @samp{*} to the left of the @value{GDBN} thread number indicates the current thread. For example, @end table @c end table here to get a little more width for example @smallexample (@value{GDBP}) info threads Id Target Id Frame 3 process 35 thread 27 0x34e5 in sigpause () 2 process 35 thread 23 0x34e5 in sigpause () * 1 process 35 thread 13 main (argc=1, argv=0x7ffffff8) at threadtest.c:68 @end smallexample On Solaris, you can display more information about user threads with a Solaris-specific command: @table @code @item maint info sol-threads @kindex maint info sol-threads @cindex thread info (Solaris) Display info on Solaris user threads. @end table @table @code @kindex thread @var{threadno} @item thread @var{threadno} Make thread number @var{threadno} the current thread. The command argument @var{threadno} is the internal @value{GDBN} thread number, as shown in the first field of the @samp{info threads} display. @value{GDBN} responds by displaying the system identifier of the thread you selected, and its current stack frame summary: @smallexample (@value{GDBP}) thread 2 [Switching to thread 2 (Thread 0xb7fdab70 (LWP 12747))] #0 some_function (ignore=0x0) at example.c:8 8 printf ("hello\n"); @end smallexample @noindent As with the @samp{[New @dots{}]} message, the form of the text after @samp{Switching to} depends on your system's conventions for identifying threads. @vindex $_thread@r{, convenience variable} The debugger convenience variable @samp{$_thread} contains the number of the current thread. You may find this useful in writing breakpoint conditional expressions, command scripts, and so forth. See @xref{Convenience Vars,, Convenience Variables}, for general information on convenience variables. @kindex thread apply @cindex apply command to several threads @item thread apply [@var{threadno} | all] @var{command} The @code{thread apply} command allows you to apply the named @var{command} to one or more threads. Specify the numbers of the threads that you want affected with the command argument @var{threadno}. It can be a single thread number, one of the numbers shown in the first field of the @samp{info threads} display; or it could be a range of thread numbers, as in @code{2-4}. To apply a command to all threads, type @kbd{thread apply all @var{command}}. @kindex thread name @cindex name a thread @item thread name [@var{name}] This command assigns a name to the current thread. If no argument is given, any existing user-specified name is removed. The thread name appears in the @samp{info threads} display. On some systems, such as @sc{gnu}/Linux, @value{GDBN} is able to determine the name of the thread as given by the OS. On these systems, a name specified with @samp{thread name} will override the system-give name, and removing the user-specified name will cause @value{GDBN} to once again display the system-specified name. @kindex thread find @cindex search for a thread @item thread find [@var{regexp}] Search for and display thread ids whose name or @var{systag} matches the supplied regular expression. As well as being the complement to the @samp{thread name} command, this command also allows you to identify a thread by its target @var{systag}. For instance, on @sc{gnu}/Linux, the target @var{systag} is the LWP id. @smallexample (@value{GDBN}) thread find 26688 Thread 4 has target id 'Thread 0x41e02940 (LWP 26688)' (@value{GDBN}) info thread 4 Id Target Id Frame 4 Thread 0x41e02940 (LWP 26688) 0x00000031ca6cd372 in select () @end smallexample @kindex set print thread-events @cindex print messages on thread start and exit @item set print thread-events @itemx set print thread-events on @itemx set print thread-events off The @code{set print thread-events} command allows you to enable or disable printing of messages when @value{GDBN} notices that new threads have started or that threads have exited. By default, these messages will be printed if detection of these events is supported by the target. Note that these messages cannot be disabled on all targets. @kindex show print thread-events @item show print thread-events Show whether messages will be printed when @value{GDBN} detects that threads have started and exited. @end table @xref{Thread Stops,,Stopping and Starting Multi-thread Programs}, for more information about how @value{GDBN} behaves when you stop and start programs with multiple threads. @xref{Set Watchpoints,,Setting Watchpoints}, for information about watchpoints in programs with multiple threads. @anchor{set libthread-db-search-path} @table @code @kindex set libthread-db-search-path @cindex search path for @code{libthread_db} @item set libthread-db-search-path @r{[}@var{path}@r{]} If this variable is set, @var{path} is a colon-separated list of directories @value{GDBN} will use to search for @code{libthread_db}. If you omit @var{path}, @samp{libthread-db-search-path} will be reset to its default value (@code{$sdir:$pdir} on @sc{gnu}/Linux and Solaris systems). Internally, the default value comes from the @code{LIBTHREAD_DB_SEARCH_PATH} macro. On @sc{gnu}/Linux and Solaris systems, @value{GDBN} uses a ``helper'' @code{libthread_db} library to obtain information about threads in the inferior process. @value{GDBN} will use @samp{libthread-db-search-path} to find @code{libthread_db}. @value{GDBN} also consults first if inferior specific thread debugging library loading is enabled by @samp{set auto-load libthread-db} (@pxref{libthread_db.so.1 file}). A special entry @samp{$sdir} for @samp{libthread-db-search-path} refers to the default system directories that are normally searched for loading shared libraries. The @samp{$sdir} entry is the only kind not needing to be enabled by @samp{set auto-load libthread-db} (@pxref{libthread_db.so.1 file}). A special entry @samp{$pdir} for @samp{libthread-db-search-path} refers to the directory from which @code{libpthread} was loaded in the inferior process. For any @code{libthread_db} library @value{GDBN} finds in above directories, @value{GDBN} attempts to initialize it with the current inferior process. If this initialization fails (which could happen because of a version mismatch between @code{libthread_db} and @code{libpthread}), @value{GDBN} will unload @code{libthread_db}, and continue with the next directory. If none of @code{libthread_db} libraries initialize successfully, @value{GDBN} will issue a warning and thread debugging will be disabled. Setting @code{libthread-db-search-path} is currently implemented only on some platforms. @kindex show libthread-db-search-path @item show libthread-db-search-path Display current libthread_db search path. @kindex set debug libthread-db @kindex show debug libthread-db @cindex debugging @code{libthread_db} @item set debug libthread-db @itemx show debug libthread-db Turns on or off display of @code{libthread_db}-related events. Use @code{1} to enable, @code{0} to disable. @end table @node Forks @section Debugging Forks @cindex fork, debugging programs which call @cindex multiple processes @cindex processes, multiple On most systems, @value{GDBN} has no special support for debugging programs which create additional processes using the @code{fork} function. When a program forks, @value{GDBN} will continue to debug the parent process and the child process will run unimpeded. If you have set a breakpoint in any code which the child then executes, the child will get a @code{SIGTRAP} signal which (unless it catches the signal) will cause it to terminate. However, if you want to debug the child process there is a workaround which isn't too painful. Put a call to @code{sleep} in the code which the child process executes after the fork. It may be useful to sleep only if a certain environment variable is set, or a certain file exists, so that the delay need not occur when you don't want to run @value{GDBN} on the child. While the child is sleeping, use the @code{ps} program to get its process ID. Then tell @value{GDBN} (a new invocation of @value{GDBN} if you are also debugging the parent process) to attach to the child process (@pxref{Attach}). From that point on you can debug the child process just like any other process which you attached to. On some systems, @value{GDBN} provides support for debugging programs that create additional processes using the @code{fork} or @code{vfork} functions. Currently, the only platforms with this feature are HP-UX (11.x and later only?) and @sc{gnu}/Linux (kernel version 2.5.60 and later). By default, when a program forks, @value{GDBN} will continue to debug the parent process and the child process will run unimpeded. If you want to follow the child process instead of the parent process, use the command @w{@code{set follow-fork-mode}}. @table @code @kindex set follow-fork-mode @item set follow-fork-mode @var{mode} Set the debugger response to a program call of @code{fork} or @code{vfork}. A call to @code{fork} or @code{vfork} creates a new process. The @var{mode} argument can be: @table @code @item parent The original process is debugged after a fork. The child process runs unimpeded. This is the default. @item child The new process is debugged after a fork. The parent process runs unimpeded. @end table @kindex show follow-fork-mode @item show follow-fork-mode Display the current debugger response to a @code{fork} or @code{vfork} call. @end table @cindex debugging multiple processes On Linux, if you want to debug both the parent and child processes, use the command @w{@code{set detach-on-fork}}. @table @code @kindex set detach-on-fork @item set detach-on-fork @var{mode} Tells gdb whether to detach one of the processes after a fork, or retain debugger control over them both. @table @code @item on The child process (or parent process, depending on the value of @code{follow-fork-mode}) will be detached and allowed to run independently. This is the default. @item off Both processes will be held under the control of @value{GDBN}. One process (child or parent, depending on the value of @code{follow-fork-mode}) is debugged as usual, while the other is held suspended. @end table @kindex show detach-on-fork @item show detach-on-fork Show whether detach-on-fork mode is on/off. @end table If you choose to set @samp{detach-on-fork} mode off, then @value{GDBN} will retain control of all forked processes (including nested forks). You can list the forked processes under the control of @value{GDBN} by using the @w{@code{info inferiors}} command, and switch from one fork to another by using the @code{inferior} command (@pxref{Inferiors and Programs, ,Debugging Multiple Inferiors and Programs}). To quit debugging one of the forked processes, you can either detach from it by using the @w{@code{detach inferiors}} command (allowing it to run independently), or kill it using the @w{@code{kill inferiors}} command. @xref{Inferiors and Programs, ,Debugging Multiple Inferiors and Programs}. If you ask to debug a child process and a @code{vfork} is followed by an @code{exec}, @value{GDBN} executes the new target up to the first breakpoint in the new target. If you have a breakpoint set on @code{main} in your original program, the breakpoint will also be set on the child process's @code{main}. On some systems, when a child process is spawned by @code{vfork}, you cannot debug the child or parent until an @code{exec} call completes. If you issue a @code{run} command to @value{GDBN} after an @code{exec} call executes, the new target restarts. To restart the parent process, use the @code{file} command with the parent executable name as its argument. By default, after an @code{exec} call executes, @value{GDBN} discards the symbols of the previous executable image. You can change this behaviour with the @w{@code{set follow-exec-mode}} command. @table @code @kindex set follow-exec-mode @item set follow-exec-mode @var{mode} Set debugger response to a program call of @code{exec}. An @code{exec} call replaces the program image of a process. @code{follow-exec-mode} can be: @table @code @item new @value{GDBN} creates a new inferior and rebinds the process to this new inferior. The program the process was running before the @code{exec} call can be restarted afterwards by restarting the original inferior. For example: @smallexample (@value{GDBP}) info inferiors (gdb) info inferior Id Description Executable * 1 prog1 (@value{GDBP}) run process 12020 is executing new program: prog2 Program exited normally. (@value{GDBP}) info inferiors Id Description Executable * 2 prog2 1 prog1 @end smallexample @item same @value{GDBN} keeps the process bound to the same inferior. The new executable image replaces the previous executable loaded in the inferior. Restarting the inferior after the @code{exec} call, with e.g., the @code{run} command, restarts the executable the process was running after the @code{exec} call. This is the default mode. For example: @smallexample (@value{GDBP}) info inferiors Id Description Executable * 1 prog1 (@value{GDBP}) run process 12020 is executing new program: prog2 Program exited normally. (@value{GDBP}) info inferiors Id Description Executable * 1 prog2 @end smallexample @end table @end table You can use the @code{catch} command to make @value{GDBN} stop whenever a @code{fork}, @code{vfork}, or @code{exec} call is made. @xref{Set Catchpoints, ,Setting Catchpoints}. @node Checkpoint/Restart @section Setting a @emph{Bookmark} to Return to Later @cindex checkpoint @cindex restart @cindex bookmark @cindex snapshot of a process @cindex rewind program state On certain operating systems@footnote{Currently, only @sc{gnu}/Linux.}, @value{GDBN} is able to save a @dfn{snapshot} of a program's state, called a @dfn{checkpoint}, and come back to it later. Returning to a checkpoint effectively undoes everything that has happened in the program since the @code{checkpoint} was saved. This includes changes in memory, registers, and even (within some limits) system state. Effectively, it is like going back in time to the moment when the checkpoint was saved. Thus, if you're stepping thru a program and you think you're getting close to the point where things go wrong, you can save a checkpoint. Then, if you accidentally go too far and miss the critical statement, instead of having to restart your program from the beginning, you can just go back to the checkpoint and start again from there. This can be especially useful if it takes a lot of time or steps to reach the point where you think the bug occurs. To use the @code{checkpoint}/@code{restart} method of debugging: @table @code @kindex checkpoint @item checkpoint Save a snapshot of the debugged program's current execution state. The @code{checkpoint} command takes no arguments, but each checkpoint is assigned a small integer id, similar to a breakpoint id. @kindex info checkpoints @item info checkpoints List the checkpoints that have been saved in the current debugging session. For each checkpoint, the following information will be listed: @table @code @item Checkpoint ID @item Process ID @item Code Address @item Source line, or label @end table @kindex restart @var{checkpoint-id} @item restart @var{checkpoint-id} Restore the program state that was saved as checkpoint number @var{checkpoint-id}. All program variables, registers, stack frames etc.@: will be returned to the values that they had when the checkpoint was saved. In essence, gdb will ``wind back the clock'' to the point in time when the checkpoint was saved. Note that breakpoints, @value{GDBN} variables, command history etc. are not affected by restoring a checkpoint. In general, a checkpoint only restores things that reside in the program being debugged, not in the debugger. @kindex delete checkpoint @var{checkpoint-id} @item delete checkpoint @var{checkpoint-id} Delete the previously-saved checkpoint identified by @var{checkpoint-id}. @end table Returning to a previously saved checkpoint will restore the user state of the program being debugged, plus a significant subset of the system (OS) state, including file pointers. It won't ``un-write'' data from a file, but it will rewind the file pointer to the previous location, so that the previously written data can be overwritten. For files opened in read mode, the pointer will also be restored so that the previously read data can be read again. Of course, characters that have been sent to a printer (or other external device) cannot be ``snatched back'', and characters received from eg.@: a serial device can be removed from internal program buffers, but they cannot be ``pushed back'' into the serial pipeline, ready to be received again. Similarly, the actual contents of files that have been changed cannot be restored (at this time). However, within those constraints, you actually can ``rewind'' your program to a previously saved point in time, and begin debugging it again --- and you can change the course of events so as to debug a different execution path this time. @cindex checkpoints and process id Finally, there is one bit of internal program state that will be different when you return to a checkpoint --- the program's process id. Each checkpoint will have a unique process id (or @var{pid}), and each will be different from the program's original @var{pid}. If your program has saved a local copy of its process id, this could potentially pose a problem. @subsection A Non-obvious Benefit of Using Checkpoints On some systems such as @sc{gnu}/Linux, address space randomization is performed on new processes for security reasons. This makes it difficult or impossible to set a breakpoint, or watchpoint, on an absolute address if you have to restart the program, since the absolute location of a symbol will change from one execution to the next. A checkpoint, however, is an @emph{identical} copy of a process. Therefore if you create a checkpoint at (eg.@:) the start of main, and simply return to that checkpoint instead of restarting the process, you can avoid the effects of address randomization and your symbols will all stay in the same place. @node Stopping @chapter Stopping and Continuing The principal purposes of using a debugger are so that you can stop your program before it terminates; or so that, if your program runs into trouble, you can investigate and find out why. Inside @value{GDBN}, your program may stop for any of several reasons, such as a signal, a breakpoint, or reaching a new line after a @value{GDBN} command such as @code{step}. You may then examine and change variables, set new breakpoints or remove old ones, and then continue execution. Usually, the messages shown by @value{GDBN} provide ample explanation of the status of your program---but you can also explicitly request this information at any time. @table @code @kindex info program @item info program Display information about the status of your program: whether it is running or not, what process it is, and why it stopped. @end table @menu * Breakpoints:: Breakpoints, watchpoints, and catchpoints * Continuing and Stepping:: Resuming execution * Skipping Over Functions and Files:: Skipping over functions and files * Signals:: Signals * Thread Stops:: Stopping and starting multi-thread programs @end menu @node Breakpoints @section Breakpoints, Watchpoints, and Catchpoints @cindex breakpoints A @dfn{breakpoint} makes your program stop whenever a certain point in the program is reached. For each breakpoint, you can add conditions to control in finer detail whether your program stops. You can set breakpoints with the @code{break} command and its variants (@pxref{Set Breaks, ,Setting Breakpoints}), to specify the place where your program should stop by line number, function name or exact address in the program. On some systems, you can set breakpoints in shared libraries before the executable is run. There is a minor limitation on HP-UX systems: you must wait until the executable is run in order to set breakpoints in shared library routines that are not called directly by the program (for example, routines that are arguments in a @code{pthread_create} call). @cindex watchpoints @cindex data breakpoints @cindex memory tracing @cindex breakpoint on memory address @cindex breakpoint on variable modification A @dfn{watchpoint} is a special breakpoint that stops your program when the value of an expression changes. The expression may be a value of a variable, or it could involve values of one or more variables combined by operators, such as @samp{a + b}. This is sometimes called @dfn{data breakpoints}. You must use a different command to set watchpoints (@pxref{Set Watchpoints, ,Setting Watchpoints}), but aside from that, you can manage a watchpoint like any other breakpoint: you enable, disable, and delete both breakpoints and watchpoints using the same commands. You can arrange to have values from your program displayed automatically whenever @value{GDBN} stops at a breakpoint. @xref{Auto Display,, Automatic Display}. @cindex catchpoints @cindex breakpoint on events A @dfn{catchpoint} is another special breakpoint that stops your program when a certain kind of event occurs, such as the throwing of a C@t{++} exception or the loading of a library. As with watchpoints, you use a different command to set a catchpoint (@pxref{Set Catchpoints, ,Setting Catchpoints}), but aside from that, you can manage a catchpoint like any other breakpoint. (To stop when your program receives a signal, use the @code{handle} command; see @ref{Signals, ,Signals}.) @cindex breakpoint numbers @cindex numbers for breakpoints @value{GDBN} assigns a number to each breakpoint, watchpoint, or catchpoint when you create it; these numbers are successive integers starting with one. In many of the commands for controlling various features of breakpoints you use the breakpoint number to say which breakpoint you want to change. Each breakpoint may be @dfn{enabled} or @dfn{disabled}; if disabled, it has no effect on your program until you enable it again. @cindex breakpoint ranges @cindex ranges of breakpoints Some @value{GDBN} commands accept a range of breakpoints on which to operate. A breakpoint range is either a single breakpoint number, like @samp{5}, or two such numbers, in increasing order, separated by a hyphen, like @samp{5-7}. When a breakpoint range is given to a command, all breakpoints in that range are operated on. @menu * Set Breaks:: Setting breakpoints * Set Watchpoints:: Setting watchpoints * Set Catchpoints:: Setting catchpoints * Delete Breaks:: Deleting breakpoints * Disabling:: Disabling breakpoints * Conditions:: Break conditions * Break Commands:: Breakpoint command lists * Dynamic Printf:: Dynamic printf * Save Breakpoints:: How to save breakpoints in a file * Static Probe Points:: Listing static probe points * Error in Breakpoints:: ``Cannot insert breakpoints'' * Breakpoint-related Warnings:: ``Breakpoint address adjusted...'' @end menu @node Set Breaks @subsection Setting Breakpoints @c FIXME LMB what does GDB do if no code on line of breakpt? @c consider in particular declaration with/without initialization. @c @c FIXME 2 is there stuff on this already? break at fun start, already init? @kindex break @kindex b @r{(@code{break})} @vindex $bpnum@r{, convenience variable} @cindex latest breakpoint Breakpoints are set with the @code{break} command (abbreviated @code{b}). The debugger convenience variable @samp{$bpnum} records the number of the breakpoint you've set most recently; see @ref{Convenience Vars,, Convenience Variables}, for a discussion of what you can do with convenience variables. @table @code @item break @var{location} Set a breakpoint at the given @var{location}, which can specify a function name, a line number, or an address of an instruction. (@xref{Specify Location}, for a list of all the possible ways to specify a @var{location}.) The breakpoint will stop your program just before it executes any of the code in the specified @var{location}. When using source languages that permit overloading of symbols, such as C@t{++}, a function name may refer to more than one possible place to break. @xref{Ambiguous Expressions,,Ambiguous Expressions}, for a discussion of that situation. It is also possible to insert a breakpoint that will stop the program only if a specific thread (@pxref{Thread-Specific Breakpoints}) or a specific task (@pxref{Ada Tasks}) hits that breakpoint. @item break When called without any arguments, @code{break} sets a breakpoint at the next instruction to be executed in the selected stack frame (@pxref{Stack, ,Examining the Stack}). In any selected frame but the innermost, this makes your program stop as soon as control returns to that frame. This is similar to the effect of a @code{finish} command in the frame inside the selected frame---except that @code{finish} does not leave an active breakpoint. If you use @code{break} without an argument in the innermost frame, @value{GDBN} stops the next time it reaches the current location; this may be useful inside loops. @value{GDBN} normally ignores breakpoints when it resumes execution, until at least one instruction has been executed. If it did not do this, you would be unable to proceed past a breakpoint without first disabling the breakpoint. This rule applies whether or not the breakpoint already existed when your program stopped. @item break @dots{} if @var{cond} Set a breakpoint with condition @var{cond}; evaluate the expression @var{cond} each time the breakpoint is reached, and stop only if the value is nonzero---that is, if @var{cond} evaluates as true. @samp{@dots{}} stands for one of the possible arguments described above (or no argument) specifying where to break. @xref{Conditions, ,Break Conditions}, for more information on breakpoint conditions. @kindex tbreak @item tbreak @var{args} Set a breakpoint enabled only for one stop. @var{args} are the same as for the @code{break} command, and the breakpoint is set in the same way, but the breakpoint is automatically deleted after the first time your program stops there. @xref{Disabling, ,Disabling Breakpoints}. @kindex hbreak @cindex hardware breakpoints @item hbreak @var{args} Set a hardware-assisted breakpoint. @var{args} are the same as for the @code{break} command and the breakpoint is set in the same way, but the breakpoint requires hardware support and some target hardware may not have this support. The main purpose of this is EPROM/ROM code debugging, so you can set a breakpoint at an instruction without changing the instruction. This can be used with the new trap-generation provided by SPARClite DSU and most x86-based targets. These targets will generate traps when a program accesses some data or instruction address that is assigned to the debug registers. However the hardware breakpoint registers can take a limited number of breakpoints. For example, on the DSU, only two data breakpoints can be set at a time, and @value{GDBN} will reject this command if more than two are used. Delete or disable unused hardware breakpoints before setting new ones (@pxref{Disabling, ,Disabling Breakpoints}). @xref{Conditions, ,Break Conditions}. For remote targets, you can restrict the number of hardware breakpoints @value{GDBN} will use, see @ref{set remote hardware-breakpoint-limit}. @kindex thbreak @item thbreak @var{args} Set a hardware-assisted breakpoint enabled only for one stop. @var{args} are the same as for the @code{hbreak} command and the breakpoint is set in the same way. However, like the @code{tbreak} command, the breakpoint is automatically deleted after the first time your program stops there. Also, like the @code{hbreak} command, the breakpoint requires hardware support and some target hardware may not have this support. @xref{Disabling, ,Disabling Breakpoints}. See also @ref{Conditions, ,Break Conditions}. @kindex rbreak @cindex regular expression @cindex breakpoints at functions matching a regexp @cindex set breakpoints in many functions @item rbreak @var{regex} Set breakpoints on all functions matching the regular expression @var{regex}. This command sets an unconditional breakpoint on all matches, printing a list of all breakpoints it set. Once these breakpoints are set, they are treated just like the breakpoints set with the @code{break} command. You can delete them, disable them, or make them conditional the same way as any other breakpoint. The syntax of the regular expression is the standard one used with tools like @file{grep}. Note that this is different from the syntax used by shells, so for instance @code{foo*} matches all functions that include an @code{fo} followed by zero or more @code{o}s. There is an implicit @code{.*} leading and trailing the regular expression you supply, so to match only functions that begin with @code{foo}, use @code{^foo}. @cindex non-member C@t{++} functions, set breakpoint in When debugging C@t{++} programs, @code{rbreak} is useful for setting breakpoints on overloaded functions that are not members of any special classes. @cindex set breakpoints on all functions The @code{rbreak} command can be used to set breakpoints in @strong{all} the functions in a program, like this: @smallexample (@value{GDBP}) rbreak . @end smallexample @item rbreak @var{file}:@var{regex} If @code{rbreak} is called with a filename qualification, it limits the search for functions matching the given regular expression to the specified @var{file}. This can be used, for example, to set breakpoints on every function in a given file: @smallexample (@value{GDBP}) rbreak file.c:. @end smallexample The colon separating the filename qualifier from the regex may optionally be surrounded by spaces. @kindex info breakpoints @cindex @code{$_} and @code{info breakpoints} @item info breakpoints @r{[}@var{n}@dots{}@r{]} @itemx info break @r{[}@var{n}@dots{}@r{]} Print a table of all breakpoints, watchpoints, and catchpoints set and not deleted. Optional argument @var{n} means print information only about the specified breakpoint(s) (or watchpoint(s) or catchpoint(s)). For each breakpoint, following columns are printed: @table @emph @item Breakpoint Numbers @item Type Breakpoint, watchpoint, or catchpoint. @item Disposition Whether the breakpoint is marked to be disabled or deleted when hit. @item Enabled or Disabled Enabled breakpoints are marked with @samp{y}. @samp{n} marks breakpoints that are not enabled. @item Address Where the breakpoint is in your program, as a memory address. For a pending breakpoint whose address is not yet known, this field will contain @samp{}. Such breakpoint won't fire until a shared library that has the symbol or line referred by breakpoint is loaded. See below for details. A breakpoint with several locations will have @samp{} in this field---see below for details. @item What Where the breakpoint is in the source for your program, as a file and line number. For a pending breakpoint, the original string passed to the breakpoint command will be listed as it cannot be resolved until the appropriate shared library is loaded in the future. @end table @noindent If a breakpoint is conditional, there are two evaluation modes: ``host'' and ``target''. If mode is ``host'', breakpoint condition evaluation is done by @value{GDBN} on the host's side. If it is ``target'', then the condition is evaluated by the target. The @code{info break} command shows the condition on the line following the affected breakpoint, together with its condition evaluation mode in between parentheses. Breakpoint commands, if any, are listed after that. A pending breakpoint is allowed to have a condition specified for it. The condition is not parsed for validity until a shared library is loaded that allows the pending breakpoint to resolve to a valid location. @noindent @code{info break} with a breakpoint number @var{n} as argument lists only that breakpoint. The convenience variable @code{$_} and the default examining-address for the @code{x} command are set to the address of the last breakpoint listed (@pxref{Memory, ,Examining Memory}). @noindent @code{info break} displays a count of the number of times the breakpoint has been hit. This is especially useful in conjunction with the @code{ignore} command. You can ignore a large number of breakpoint hits, look at the breakpoint info to see how many times the breakpoint was hit, and then run again, ignoring one less than that number. This will get you quickly to the last hit of that breakpoint. @noindent For a breakpoints with an enable count (xref) greater than 1, @code{info break} also displays that count. @end table @value{GDBN} allows you to set any number of breakpoints at the same place in your program. There is nothing silly or meaningless about this. When the breakpoints are conditional, this is even useful (@pxref{Conditions, ,Break Conditions}). @cindex multiple locations, breakpoints @cindex breakpoints, multiple locations It is possible that a breakpoint corresponds to several locations in your program. Examples of this situation are: @itemize @bullet @item Multiple functions in the program may have the same name. @item For a C@t{++} constructor, the @value{NGCC} compiler generates several instances of the function body, used in different cases. @item For a C@t{++} template function, a given line in the function can correspond to any number of instantiations. @item For an inlined function, a given source line can correspond to several places where that function is inlined. @end itemize In all those cases, @value{GDBN} will insert a breakpoint at all the relevant locations. A breakpoint with multiple locations is displayed in the breakpoint table using several rows---one header row, followed by one row for each breakpoint location. The header row has @samp{} in the address column. The rows for individual locations contain the actual addresses for locations, and show the functions to which those locations belong. The number column for a location is of the form @var{breakpoint-number}.@var{location-number}. For example: @smallexample Num Type Disp Enb Address What 1 breakpoint keep y stop only if i==1 breakpoint already hit 1 time 1.1 y 0x080486a2 in void foo() at t.cc:8 1.2 y 0x080486ca in void foo() at t.cc:8 @end smallexample Each location can be individually enabled or disabled by passing @var{breakpoint-number}.@var{location-number} as argument to the @code{enable} and @code{disable} commands. Note that you cannot delete the individual locations from the list, you can only delete the entire list of locations that belong to their parent breakpoint (with the @kbd{delete @var{num}} command, where @var{num} is the number of the parent breakpoint, 1 in the above example). Disabling or enabling the parent breakpoint (@pxref{Disabling}) affects all of the locations that belong to that breakpoint. @cindex pending breakpoints It's quite common to have a breakpoint inside a shared library. Shared libraries can be loaded and unloaded explicitly, and possibly repeatedly, as the program is executed. To support this use case, @value{GDBN} updates breakpoint locations whenever any shared library is loaded or unloaded. Typically, you would set a breakpoint in a shared library at the beginning of your debugging session, when the library is not loaded, and when the symbols from the library are not available. When you try to set breakpoint, @value{GDBN} will ask you if you want to set a so called @dfn{pending breakpoint}---breakpoint whose address is not yet resolved. After the program is run, whenever a new shared library is loaded, @value{GDBN} reevaluates all the breakpoints. When a newly loaded shared library contains the symbol or line referred to by some pending breakpoint, that breakpoint is resolved and becomes an ordinary breakpoint. When a library is unloaded, all breakpoints that refer to its symbols or source lines become pending again. This logic works for breakpoints with multiple locations, too. For example, if you have a breakpoint in a C@t{++} template function, and a newly loaded shared library has an instantiation of that template, a new location is added to the list of locations for the breakpoint. Except for having unresolved address, pending breakpoints do not differ from regular breakpoints. You can set conditions or commands, enable and disable them and perform other breakpoint operations. @value{GDBN} provides some additional commands for controlling what happens when the @samp{break} command cannot resolve breakpoint address specification to an address: @kindex set breakpoint pending @kindex show breakpoint pending @table @code @item set breakpoint pending auto This is the default behavior. When @value{GDBN} cannot find the breakpoint location, it queries you whether a pending breakpoint should be created. @item set breakpoint pending on This indicates that an unrecognized breakpoint location should automatically result in a pending breakpoint being created. @item set breakpoint pending off This indicates that pending breakpoints are not to be created. Any unrecognized breakpoint location results in an error. This setting does not affect any pending breakpoints previously created. @item show breakpoint pending Show the current behavior setting for creating pending breakpoints. @end table The settings above only affect the @code{break} command and its variants. Once breakpoint is set, it will be automatically updated as shared libraries are loaded and unloaded. @cindex automatic hardware breakpoints For some targets, @value{GDBN} can automatically decide if hardware or software breakpoints should be used, depending on whether the breakpoint address is read-only or read-write. This applies to breakpoints set with the @code{break} command as well as to internal breakpoints set by commands like @code{next} and @code{finish}. For breakpoints set with @code{hbreak}, @value{GDBN} will always use hardware breakpoints. You can control this automatic behaviour with the following commands:: @kindex set breakpoint auto-hw @kindex show breakpoint auto-hw @table @code @item set breakpoint auto-hw on This is the default behavior. When @value{GDBN} sets a breakpoint, it will try to use the target memory map to decide if software or hardware breakpoint must be used. @item set breakpoint auto-hw off This indicates @value{GDBN} should not automatically select breakpoint type. If the target provides a memory map, @value{GDBN} will warn when trying to set software breakpoint at a read-only address. @end table @value{GDBN} normally implements breakpoints by replacing the program code at the breakpoint address with a special instruction, which, when executed, given control to the debugger. By default, the program code is so modified only when the program is resumed. As soon as the program stops, @value{GDBN} restores the original instructions. This behaviour guards against leaving breakpoints inserted in the target should gdb abrubptly disconnect. However, with slow remote targets, inserting and removing breakpoint can reduce the performance. This behavior can be controlled with the following commands:: @kindex set breakpoint always-inserted @kindex show breakpoint always-inserted @table @code @item set breakpoint always-inserted off All breakpoints, including newly added by the user, are inserted in the target only when the target is resumed. All breakpoints are removed from the target when it stops. @item set breakpoint always-inserted on Causes all breakpoints to be inserted in the target at all times. If the user adds a new breakpoint, or changes an existing breakpoint, the breakpoints in the target are updated immediately. A breakpoint is removed from the target only when breakpoint itself is removed. @cindex non-stop mode, and @code{breakpoint always-inserted} @item set breakpoint always-inserted auto This is the default mode. If @value{GDBN} is controlling the inferior in non-stop mode (@pxref{Non-Stop Mode}), gdb behaves as if @code{breakpoint always-inserted} mode is on. If @value{GDBN} is controlling the inferior in all-stop mode, @value{GDBN} behaves as if @code{breakpoint always-inserted} mode is off. @end table @value{GDBN} handles conditional breakpoints by evaluating these conditions when a breakpoint breaks. If the condition is true, then the process being debugged stops, otherwise the process is resumed. If the target supports evaluating conditions on its end, @value{GDBN} may download the breakpoint, together with its conditions, to it. This feature can be controlled via the following commands: @kindex set breakpoint condition-evaluation @kindex show breakpoint condition-evaluation @table @code @item set breakpoint condition-evaluation host This option commands @value{GDBN} to evaluate the breakpoint conditions on the host's side. Unconditional breakpoints are sent to the target which in turn receives the triggers and reports them back to GDB for condition evaluation. This is the standard evaluation mode. @item set breakpoint condition-evaluation target This option commands @value{GDBN} to download breakpoint conditions to the target at the moment of their insertion. The target is responsible for evaluating the conditional expression and reporting breakpoint stop events back to @value{GDBN} whenever the condition is true. Due to limitations of target-side evaluation, some conditions cannot be evaluated there, e.g., conditions that depend on local data that is only known to the host. Examples include conditional expressions involving convenience variables, complex types that cannot be handled by the agent expression parser and expressions that are too long to be sent over to the target, specially when the target is a remote system. In these cases, the conditions will be evaluated by @value{GDBN}. @item set breakpoint condition-evaluation auto This is the default mode. If the target supports evaluating breakpoint conditions on its end, @value{GDBN} will download breakpoint conditions to the target (limitations mentioned previously apply). If the target does not support breakpoint condition evaluation, then @value{GDBN} will fallback to evaluating all these conditions on the host's side. @end table @cindex negative breakpoint numbers @cindex internal @value{GDBN} breakpoints @value{GDBN} itself sometimes sets breakpoints in your program for special purposes, such as proper handling of @code{longjmp} (in C programs). These internal breakpoints are assigned negative numbers, starting with @code{-1}; @samp{info breakpoints} does not display them. You can see these breakpoints with the @value{GDBN} maintenance command @samp{maint info breakpoints} (@pxref{maint info breakpoints}). @node Set Watchpoints @subsection Setting Watchpoints @cindex setting watchpoints You can use a watchpoint to stop execution whenever the value of an expression changes, without having to predict a particular place where this may happen. (This is sometimes called a @dfn{data breakpoint}.) The expression may be as simple as the value of a single variable, or as complex as many variables combined by operators. Examples include: @itemize @bullet @item A reference to the value of a single variable. @item An address cast to an appropriate data type. For example, @samp{*(int *)0x12345678} will watch a 4-byte region at the specified address (assuming an @code{int} occupies 4 bytes). @item An arbitrarily complex expression, such as @samp{a*b + c/d}. The expression can use any operators valid in the program's native language (@pxref{Languages}). @end itemize You can set a watchpoint on an expression even if the expression can not be evaluated yet. For instance, you can set a watchpoint on @samp{*global_ptr} before @samp{global_ptr} is initialized. @value{GDBN} will stop when your program sets @samp{global_ptr} and the expression produces a valid value. If the expression becomes valid in some other way than changing a variable (e.g.@: if the memory pointed to by @samp{*global_ptr} becomes readable as the result of a @code{malloc} call), @value{GDBN} may not stop until the next time the expression changes. @cindex software watchpoints @cindex hardware watchpoints Depending on your system, watchpoints may be implemented in software or hardware. @value{GDBN} does software watchpointing by single-stepping your program and testing the variable's value each time, which is hundreds of times slower than normal execution. (But this may still be worth it, to catch errors where you have no clue what part of your program is the culprit.) On some systems, such as HP-UX, PowerPC, @sc{gnu}/Linux and most other x86-based targets, @value{GDBN} includes support for hardware watchpoints, which do not slow down the running of your program. @table @code @kindex watch @item watch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]} @r{[}mask @var{maskvalue}@r{]} Set a watchpoint for an expression. @value{GDBN} will break when the expression @var{expr} is written into by the program and its value changes. The simplest (and the most popular) use of this command is to watch the value of a single variable: @smallexample (@value{GDBP}) watch foo @end smallexample If the command includes a @code{@r{[}thread @var{threadnum}@r{]}} argument, @value{GDBN} breaks only when the thread identified by @var{threadnum} changes the value of @var{expr}. If any other threads change the value of @var{expr}, @value{GDBN} will not break. Note that watchpoints restricted to a single thread in this way only work with Hardware Watchpoints. Ordinarily a watchpoint respects the scope of variables in @var{expr} (see below). The @code{-location} argument tells @value{GDBN} to instead watch the memory referred to by @var{expr}. In this case, @value{GDBN} will evaluate @var{expr}, take the address of the result, and watch the memory at that address. The type of the result is used to determine the size of the watched memory. If the expression's result does not have an address, then @value{GDBN} will print an error. The @code{@r{[}mask @var{maskvalue}@r{]}} argument allows creation of masked watchpoints, if the current architecture supports this feature (e.g., PowerPC Embedded architecture, see @ref{PowerPC Embedded}.) A @dfn{masked watchpoint} specifies a mask in addition to an address to watch. The mask specifies that some bits of an address (the bits which are reset in the mask) should be ignored when matching the address accessed by the inferior against the watchpoint address. Thus, a masked watchpoint watches many addresses simultaneously---those addresses whose unmasked bits are identical to the unmasked bits in the watchpoint address. The @code{mask} argument implies @code{-location}. Examples: @smallexample (@value{GDBP}) watch foo mask 0xffff00ff (@value{GDBP}) watch *0xdeadbeef mask 0xffffff00 @end smallexample @kindex rwatch @item rwatch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]} @r{[}mask @var{maskvalue}@r{]} Set a watchpoint that will break when the value of @var{expr} is read by the program. @kindex awatch @item awatch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]} @r{[}mask @var{maskvalue}@r{]} Set a watchpoint that will break when @var{expr} is either read from or written into by the program. @kindex info watchpoints @r{[}@var{n}@dots{}@r{]} @item info watchpoints @r{[}@var{n}@dots{}@r{]} This command prints a list of watchpoints, using the same format as @code{info break} (@pxref{Set Breaks}). @end table If you watch for a change in a numerically entered address you need to dereference it, as the address itself is just a constant number which will never change. @value{GDBN} refuses to create a watchpoint that watches a never-changing value: @smallexample (@value{GDBP}) watch 0x600850 Cannot watch constant value 0x600850. (@value{GDBP}) watch *(int *) 0x600850 Watchpoint 1: *(int *) 6293584 @end smallexample @value{GDBN} sets a @dfn{hardware watchpoint} if possible. Hardware watchpoints execute very quickly, and the debugger reports a change in value at the exact instruction where the change occurs. If @value{GDBN} cannot set a hardware watchpoint, it sets a software watchpoint, which executes more slowly and reports the change in value at the next @emph{statement}, not the instruction, after the change occurs. @cindex use only software watchpoints You can force @value{GDBN} to use only software watchpoints with the @kbd{set can-use-hw-watchpoints 0} command. With this variable set to zero, @value{GDBN} will never try to use hardware watchpoints, even if the underlying system supports them. (Note that hardware-assisted watchpoints that were set @emph{before} setting @code{can-use-hw-watchpoints} to zero will still use the hardware mechanism of watching expression values.) @table @code @item set can-use-hw-watchpoints @kindex set can-use-hw-watchpoints Set whether or not to use hardware watchpoints. @item show can-use-hw-watchpoints @kindex show can-use-hw-watchpoints Show the current mode of using hardware watchpoints. @end table For remote targets, you can restrict the number of hardware watchpoints @value{GDBN} will use, see @ref{set remote hardware-breakpoint-limit}. When you issue the @code{watch} command, @value{GDBN} reports @smallexample Hardware watchpoint @var{num}: @var{expr} @end smallexample @noindent if it was able to set a hardware watchpoint. Currently, the @code{awatch} and @code{rwatch} commands can only set hardware watchpoints, because accesses to data that don't change the value of the watched expression cannot be detected without examining every instruction as it is being executed, and @value{GDBN} does not do that currently. If @value{GDBN} finds that it is unable to set a hardware breakpoint with the @code{awatch} or @code{rwatch} command, it will print a message like this: @smallexample Expression cannot be implemented with read/access watchpoint. @end smallexample Sometimes, @value{GDBN} cannot set a hardware watchpoint because the data type of the watched expression is wider than what a hardware watchpoint on the target machine can handle. For example, some systems can only watch regions that are up to 4 bytes wide; on such systems you cannot set hardware watchpoints for an expression that yields a double-precision floating-point number (which is typically 8 bytes wide). As a work-around, it might be possible to break the large region into a series of smaller ones and watch them with separate watchpoints. If you set too many hardware watchpoints, @value{GDBN} might be unable to insert all of them when you resume the execution of your program. Since the precise number of active watchpoints is unknown until such time as the program is about to be resumed, @value{GDBN} might not be able to warn you about this when you set the watchpoints, and the warning will be printed only when the program is resumed: @smallexample Hardware watchpoint @var{num}: Could not insert watchpoint @end smallexample @noindent If this happens, delete or disable some of the watchpoints. Watching complex expressions that reference many variables can also exhaust the resources available for hardware-assisted watchpoints. That's because @value{GDBN} needs to watch every variable in the expression with separately allocated resources. If you call a function interactively using @code{print} or @code{call}, any watchpoints you have set will be inactive until @value{GDBN} reaches another kind of breakpoint or the call completes. @value{GDBN} automatically deletes watchpoints that watch local (automatic) variables, or expressions that involve such variables, when they go out of scope, that is, when the execution leaves the block in which these variables were defined. In particular, when the program being debugged terminates, @emph{all} local variables go out of scope, and so only watchpoints that watch global variables remain set. If you rerun the program, you will need to set all such watchpoints again. One way of doing that would be to set a code breakpoint at the entry to the @code{main} function and when it breaks, set all the watchpoints. @cindex watchpoints and threads @cindex threads and watchpoints In multi-threaded programs, watchpoints will detect changes to the watched expression from every thread. @quotation @emph{Warning:} In multi-threaded programs, software watchpoints have only limited usefulness. If @value{GDBN} creates a software watchpoint, it can only watch the value of an expression @emph{in a single thread}. If you are confident that the expression can only change due to the current thread's activity (and if you are also confident that no other thread can become current), then you can use software watchpoints as usual. However, @value{GDBN} may not notice when a non-current thread's activity changes the expression. (Hardware watchpoints, in contrast, watch an expression in all threads.) @end quotation @xref{set remote hardware-watchpoint-limit}. @node Set Catchpoints @subsection Setting Catchpoints @cindex catchpoints, setting @cindex exception handlers @cindex event handling You can use @dfn{catchpoints} to cause the debugger to stop for certain kinds of program events, such as C@t{++} exceptions or the loading of a shared library. Use the @code{catch} command to set a catchpoint. @table @code @kindex catch @item catch @var{event} Stop when @var{event} occurs. @var{event} can be any of the following: @table @code @item throw @cindex stop on C@t{++} exceptions The throwing of a C@t{++} exception. @item catch The catching of a C@t{++} exception. @item exception @cindex Ada exception catching @cindex catch Ada exceptions An Ada exception being raised. If an exception name is specified at the end of the command (eg @code{catch exception Program_Error}), the debugger will stop only when this specific exception is raised. Otherwise, the debugger stops execution when any Ada exception is raised. When inserting an exception catchpoint on a user-defined exception whose name is identical to one of the exceptions defined by the language, the fully qualified name must be used as the exception name. Otherwise, @value{GDBN} will assume that it should stop on the pre-defined exception rather than the user-defined one. For instance, assuming an exception called @code{Constraint_Error} is defined in package @code{Pck}, then the command to use to catch such exceptions is @kbd{catch exception Pck.Constraint_Error}. @item exception unhandled An exception that was raised but is not handled by the program. @item assert A failed Ada assertion. @item exec @cindex break on fork/exec A call to @code{exec}. This is currently only available for HP-UX and @sc{gnu}/Linux. @item syscall @itemx syscall @r{[}@var{name} @r{|} @var{number}@r{]} @dots{} @cindex break on a system call. A call to or return from a system call, a.k.a.@: @dfn{syscall}. A syscall is a mechanism for application programs to request a service from the operating system (OS) or one of the OS system services. @value{GDBN} can catch some or all of the syscalls issued by the debuggee, and show the related information for each syscall. If no argument is specified, calls to and returns from all system calls will be caught. @var{name} can be any system call name that is valid for the underlying OS. Just what syscalls are valid depends on the OS. On GNU and Unix systems, you can find the full list of valid syscall names on @file{/usr/include/asm/unistd.h}. @c For MS-Windows, the syscall names and the corresponding numbers @c can be found, e.g., on this URL: @c http://www.metasploit.com/users/opcode/syscalls.html @c but we don't support Windows syscalls yet. Normally, @value{GDBN} knows in advance which syscalls are valid for each OS, so you can use the @value{GDBN} command-line completion facilities (@pxref{Completion,, command completion}) to list the available choices. You may also specify the system call numerically. A syscall's number is the value passed to the OS's syscall dispatcher to identify the requested service. When you specify the syscall by its name, @value{GDBN} uses its database of syscalls to convert the name into the corresponding numeric code, but using the number directly may be useful if @value{GDBN}'s database does not have the complete list of syscalls on your system (e.g., because @value{GDBN} lags behind the OS upgrades). The example below illustrates how this command works if you don't provide arguments to it: @smallexample (@value{GDBP}) catch syscall Catchpoint 1 (syscall) (@value{GDBP}) r Starting program: /tmp/catch-syscall Catchpoint 1 (call to syscall 'close'), \ 0xffffe424 in __kernel_vsyscall () (@value{GDBP}) c Continuing. Catchpoint 1 (returned from syscall 'close'), \ 0xffffe424 in __kernel_vsyscall () (@value{GDBP}) @end smallexample Here is an example of catching a system call by name: @smallexample (@value{GDBP}) catch syscall chroot Catchpoint 1 (syscall 'chroot' [61]) (@value{GDBP}) r Starting program: /tmp/catch-syscall Catchpoint 1 (call to syscall 'chroot'), \ 0xffffe424 in __kernel_vsyscall () (@value{GDBP}) c Continuing. Catchpoint 1 (returned from syscall 'chroot'), \ 0xffffe424 in __kernel_vsyscall () (@value{GDBP}) @end smallexample An example of specifying a system call numerically. In the case below, the syscall number has a corresponding entry in the XML file, so @value{GDBN} finds its name and prints it: @smallexample (@value{GDBP}) catch syscall 252 Catchpoint 1 (syscall(s) 'exit_group') (@value{GDBP}) r Starting program: /tmp/catch-syscall Catchpoint 1 (call to syscall 'exit_group'), \ 0xffffe424 in __kernel_vsyscall () (@value{GDBP}) c Continuing. Program exited normally. (@value{GDBP}) @end smallexample However, there can be situations when there is no corresponding name in XML file for that syscall number. In this case, @value{GDBN} prints a warning message saying that it was not able to find the syscall name, but the catchpoint will be set anyway. See the example below: @smallexample (@value{GDBP}) catch syscall 764 warning: The number '764' does not represent a known syscall. Catchpoint 2 (syscall 764) (@value{GDBP}) @end smallexample If you configure @value{GDBN} using the @samp{--without-expat} option, it will not be able to display syscall names. Also, if your architecture does not have an XML file describing its system calls, you will not be able to see the syscall names. It is important to notice that these two features are used for accessing the syscall name database. In either case, you will see a warning like this: @smallexample (@value{GDBP}) catch syscall warning: Could not open "syscalls/i386-linux.xml" warning: Could not load the syscall XML file 'syscalls/i386-linux.xml'. GDB will not be able to display syscall names. Catchpoint 1 (syscall) (@value{GDBP}) @end smallexample Of course, the file name will change depending on your architecture and system. Still using the example above, you can also try to catch a syscall by its number. In this case, you would see something like: @smallexample (@value{GDBP}) catch syscall 252 Catchpoint 1 (syscall(s) 252) @end smallexample Again, in this case @value{GDBN} would not be able to display syscall's names. @item fork A call to @code{fork}. This is currently only available for HP-UX and @sc{gnu}/Linux. @item vfork A call to @code{vfork}. This is currently only available for HP-UX and @sc{gnu}/Linux. @item load @r{[}regexp@r{]} @itemx unload @r{[}regexp@r{]} The loading or unloading of a shared library. If @var{regexp} is given, then the catchpoint will stop only if the regular expression matches one of the affected libraries. @item signal @r{[}@var{signal}@dots{} @r{|} @samp{all}@r{]} The delivery of a signal. With no arguments, this catchpoint will catch any signal that is not used internally by @value{GDBN}, specifically, all signals except @samp{SIGTRAP} and @samp{SIGINT}. With the argument @samp{all}, all signals, including those used by @value{GDBN}, will be caught. This argument cannot be used with other signal names. Otherwise, the arguments are a list of signal names as given to @code{handle} (@pxref{Signals}). Only signals specified in this list will be caught. One reason that @code{catch signal} can be more useful than @code{handle} is that you can attach commands and conditions to the catchpoint. When a signal is caught by a catchpoint, the signal's @code{stop} and @code{print} settings, as specified by @code{handle}, are ignored. However, whether the signal is still delivered to the inferior depends on the @code{pass} setting; this can be changed in the catchpoint's commands. @end table @item tcatch @var{event} Set a catchpoint that is enabled only for one stop. The catchpoint is automatically deleted after the first time the event is caught. @end table Use the @code{info break} command to list the current catchpoints. There are currently some limitations to C@t{++} exception handling (@code{catch throw} and @code{catch catch}) in @value{GDBN}: @itemize @bullet @item If you call a function interactively, @value{GDBN} normally returns control to you when the function has finished executing. If the call raises an exception, however, the call may bypass the mechanism that returns control to you and cause your program either to abort or to simply continue running until it hits a breakpoint, catches a signal that @value{GDBN} is listening for, or exits. This is the case even if you set a catchpoint for the exception; catchpoints on exceptions are disabled within interactive calls. @item You cannot raise an exception interactively. @item You cannot install an exception handler interactively. @end itemize @cindex raise exceptions Sometimes @code{catch} is not the best way to debug exception handling: if you need to know exactly where an exception is raised, it is better to stop @emph{before} the exception handler is called, since that way you can see the stack before any unwinding takes place. If you set a breakpoint in an exception handler instead, it may not be easy to find out where the exception was raised. To stop just before an exception handler is called, you need some knowledge of the implementation. In the case of @sc{gnu} C@t{++}, exceptions are raised by calling a library function named @code{__raise_exception} which has the following ANSI C interface: @smallexample /* @var{addr} is where the exception identifier is stored. @var{id} is the exception identifier. */ void __raise_exception (void **addr, void *id); @end smallexample @noindent To make the debugger catch all exceptions before any stack unwinding takes place, set a breakpoint on @code{__raise_exception} (@pxref{Breakpoints, ,Breakpoints; Watchpoints; and Exceptions}). With a conditional breakpoint (@pxref{Conditions, ,Break Conditions}) that depends on the value of @var{id}, you can stop your program when a specific exception is raised. You can use multiple conditional breakpoints to stop your program when any of a number of exceptions are raised. @node Delete Breaks @subsection Deleting Breakpoints @cindex clearing breakpoints, watchpoints, catchpoints @cindex deleting breakpoints, watchpoints, catchpoints It is often necessary to eliminate a breakpoint, watchpoint, or catchpoint once it has done its job and you no longer want your program to stop there. This is called @dfn{deleting} the breakpoint. A breakpoint that has been deleted no longer exists; it is forgotten. With the @code{clear} command you can delete breakpoints according to where they are in your program. With the @code{delete} command you can delete individual breakpoints, watchpoints, or catchpoints by specifying their breakpoint numbers. It is not necessary to delete a breakpoint to proceed past it. @value{GDBN} automatically ignores breakpoints on the first instruction to be executed when you continue execution without changing the execution address. @table @code @kindex clear @item clear Delete any breakpoints at the next instruction to be executed in the selected stack frame (@pxref{Selection, ,Selecting a Frame}). When the innermost frame is selected, this is a good way to delete a breakpoint where your program just stopped. @item clear @var{location} Delete any breakpoints set at the specified @var{location}. @xref{Specify Location}, for the various forms of @var{location}; the most useful ones are listed below: @table @code @item clear @var{function} @itemx clear @var{filename}:@var{function} Delete any breakpoints set at entry to the named @var{function}. @item clear @var{linenum} @itemx clear @var{filename}:@var{linenum} Delete any breakpoints set at or within the code of the specified @var{linenum} of the specified @var{filename}. @end table @cindex delete breakpoints @kindex delete @kindex d @r{(@code{delete})} @item delete @r{[}breakpoints@r{]} @r{[}@var{range}@dots{}@r{]} Delete the breakpoints, watchpoints, or catchpoints of the breakpoint ranges specified as arguments. If no argument is specified, delete all breakpoints (@value{GDBN} asks confirmation, unless you have @code{set confirm off}). You can abbreviate this command as @code{d}. @end table @node Disabling @subsection Disabling Breakpoints @cindex enable/disable a breakpoint Rather than deleting a breakpoint, watchpoint, or catchpoint, you might prefer to @dfn{disable} it. This makes the breakpoint inoperative as if it had been deleted, but remembers the information on the breakpoint so that you can @dfn{enable} it again later. You disable and enable breakpoints, watchpoints, and catchpoints with the @code{enable} and @code{disable} commands, optionally specifying one or more breakpoint numbers as arguments. Use @code{info break} to print a list of all breakpoints, watchpoints, and catchpoints if you do not know which numbers to use. Disabling and enabling a breakpoint that has multiple locations affects all of its locations. A breakpoint, watchpoint, or catchpoint can have any of several different states of enablement: @itemize @bullet @item Enabled. The breakpoint stops your program. A breakpoint set with the @code{break} command starts out in this state. @item Disabled. The breakpoint has no effect on your program. @item Enabled once. The breakpoint stops your program, but then becomes disabled. @item Enabled for a count. The breakpoint stops your program for the next N times, then becomes disabled. @item Enabled for deletion. The breakpoint stops your program, but immediately after it does so it is deleted permanently. A breakpoint set with the @code{tbreak} command starts out in this state. @end itemize You can use the following commands to enable or disable breakpoints, watchpoints, and catchpoints: @table @code @kindex disable @kindex dis @r{(@code{disable})} @item disable @r{[}breakpoints@r{]} @r{[}@var{range}@dots{}@r{]} Disable the specified breakpoints---or all breakpoints, if none are listed. A disabled breakpoint has no effect but is not forgotten. All options such as ignore-counts, conditions and commands are remembered in case the breakpoint is enabled again later. You may abbreviate @code{disable} as @code{dis}. @kindex enable @item enable @r{[}breakpoints@r{]} @r{[}@var{range}@dots{}@r{]} Enable the specified breakpoints (or all defined breakpoints). They become effective once again in stopping your program. @item enable @r{[}breakpoints@r{]} once @var{range}@dots{} Enable the specified breakpoints temporarily. @value{GDBN} disables any of these breakpoints immediately after stopping your program. @item enable @r{[}breakpoints@r{]} count @var{count} @var{range}@dots{} Enable the specified breakpoints temporarily. @value{GDBN} records @var{count} with each of the specified breakpoints, and decrements a breakpoint's count when it is hit. When any count reaches 0, @value{GDBN} disables that breakpoint. If a breakpoint has an ignore count (@pxref{Conditions, ,Break Conditions}), that will be decremented to 0 before @var{count} is affected. @item enable @r{[}breakpoints@r{]} delete @var{range}@dots{} Enable the specified breakpoints to work once, then die. @value{GDBN} deletes any of these breakpoints as soon as your program stops there. Breakpoints set by the @code{tbreak} command start out in this state. @end table @c FIXME: I think the following ``Except for [...] @code{tbreak}'' is @c confusing: tbreak is also initially enabled. Except for a breakpoint set with @code{tbreak} (@pxref{Set Breaks, ,Setting Breakpoints}), breakpoints that you set are initially enabled; subsequently, they become disabled or enabled only when you use one of the commands above. (The command @code{until} can set and delete a breakpoint of its own, but it does not change the state of your other breakpoints; see @ref{Continuing and Stepping, ,Continuing and Stepping}.) @node Conditions @subsection Break Conditions @cindex conditional breakpoints @cindex breakpoint conditions @c FIXME what is scope of break condition expr? Context where wanted? @c in particular for a watchpoint? The simplest sort of breakpoint breaks every time your program reaches a specified place. You can also specify a @dfn{condition} for a breakpoint. A condition is just a Boolean expression in your programming language (@pxref{Expressions, ,Expressions}). A breakpoint with a condition evaluates the expression each time your program reaches it, and your program stops only if the condition is @emph{true}. This is the converse of using assertions for program validation; in that situation, you want to stop when the assertion is violated---that is, when the condition is false. In C, if you want to test an assertion expressed by the condition @var{assert}, you should set the condition @samp{! @var{assert}} on the appropriate breakpoint. Conditions are also accepted for watchpoints; you may not need them, since a watchpoint is inspecting the value of an expression anyhow---but it might be simpler, say, to just set a watchpoint on a variable name, and specify a condition that tests whether the new value is an interesting one. Break conditions can have side effects, and may even call functions in your program. This can be useful, for example, to activate functions that log program progress, or to use your own print functions to format special data structures. The effects are completely predictable unless there is another enabled breakpoint at the same address. (In that case, @value{GDBN} might see the other breakpoint first and stop your program without checking the condition of this one.) Note that breakpoint commands are usually more convenient and flexible than break conditions for the purpose of performing side effects when a breakpoint is reached (@pxref{Break Commands, ,Breakpoint Command Lists}). Breakpoint conditions can also be evaluated on the target's side if the target supports it. Instead of evaluating the conditions locally, @value{GDBN} encodes the expression into an agent expression (@pxref{Agent Expressions}) suitable for execution on the target, independently of @value{GDBN}. Global variables become raw memory locations, locals become stack accesses, and so forth. In this case, @value{GDBN} will only be notified of a breakpoint trigger when its condition evaluates to true. This mechanism may provide faster response times depending on the performance characteristics of the target since it does not need to keep @value{GDBN} informed about every breakpoint trigger, even those with false conditions. Break conditions can be specified when a breakpoint is set, by using @samp{if} in the arguments to the @code{break} command. @xref{Set Breaks, ,Setting Breakpoints}. They can also be changed at any time with the @code{condition} command. You can also use the @code{if} keyword with the @code{watch} command. The @code{catch} command does not recognize the @code{if} keyword; @code{condition} is the only way to impose a further condition on a catchpoint. @table @code @kindex condition @item condition @var{bnum} @var{expression} Specify @var{expression} as the break condition for breakpoint, watchpoint, or catchpoint number @var{bnum}. After you set a condition, breakpoint @var{bnum} stops your program only if the value of @var{expression} is true (nonzero, in C). When you use @code{condition}, @value{GDBN} checks @var{expression} immediately for syntactic correctness, and to determine whether symbols in it have referents in the context of your breakpoint. If @var{expression} uses symbols not referenced in the context of the breakpoint, @value{GDBN} prints an error message: @smallexample No symbol "foo" in current context. @end smallexample @noindent @value{GDBN} does not actually evaluate @var{expression} at the time the @code{condition} command (or a command that sets a breakpoint with a condition, like @code{break if @dots{}}) is given, however. @xref{Expressions, ,Expressions}. @item condition @var{bnum} Remove the condition from breakpoint number @var{bnum}. It becomes an ordinary unconditional breakpoint. @end table @cindex ignore count (of breakpoint) A special case of a breakpoint condition is to stop only when the breakpoint has been reached a certain number of times. This is so useful that there is a special way to do it, using the @dfn{ignore count} of the breakpoint. Every breakpoint has an ignore count, which is an integer. Most of the time, the ignore count is zero, and therefore has no effect. But if your program reaches a breakpoint whose ignore count is positive, then instead of stopping, it just decrements the ignore count by one and continues. As a result, if the ignore count value is @var{n}, the breakpoint does not stop the next @var{n} times your program reaches it. @table @code @kindex ignore @item ignore @var{bnum} @var{count} Set the ignore count of breakpoint number @var{bnum} to @var{count}. The next @var{count} times the breakpoint is reached, your program's execution does not stop; other than to decrement the ignore count, @value{GDBN} takes no action. To make the breakpoint stop the next time it is reached, specify a count of zero. When you use @code{continue} to resume execution of your program from a breakpoint, you can specify an ignore count directly as an argument to @code{continue}, rather than using @code{ignore}. @xref{Continuing and Stepping,,Continuing and Stepping}. If a breakpoint has a positive ignore count and a condition, the condition is not checked. Once the ignore count reaches zero, @value{GDBN} resumes checking the condition. You could achieve the effect of the ignore count with a condition such as @w{@samp{$foo-- <= 0}} using a debugger convenience variable that is decremented each time. @xref{Convenience Vars, ,Convenience Variables}. @end table Ignore counts apply to breakpoints, watchpoints, and catchpoints. @node Break Commands @subsection Breakpoint Command Lists @cindex breakpoint commands You can give any breakpoint (or watchpoint or catchpoint) a series of commands to execute when your program stops due to that breakpoint. For example, you might want to print the values of certain expressions, or enable other breakpoints. @table @code @kindex commands @kindex end@r{ (breakpoint commands)} @item commands @r{[}@var{range}@dots{}@r{]} @itemx @dots{} @var{command-list} @dots{} @itemx end Specify a list of commands for the given breakpoints. The commands themselves appear on the following lines. Type a line containing just @code{end} to terminate the commands. To remove all commands from a breakpoint, type @code{commands} and follow it immediately with @code{end}; that is, give no commands. With no argument, @code{commands} refers to the last breakpoint, watchpoint, or catchpoint set (not to the breakpoint most recently encountered). If the most recent breakpoints were set with a single command, then the @code{commands} will apply to all the breakpoints set by that command. This applies to breakpoints set by @code{rbreak}, and also applies when a single @code{break} command creates multiple breakpoints (@pxref{Ambiguous Expressions,,Ambiguous Expressions}). @end table Pressing @key{RET} as a means of repeating the last @value{GDBN} command is disabled within a @var{command-list}. You can use breakpoint commands to start your program up again. Simply use the @code{continue} command, or @code{step}, or any other command that resumes execution. Any other commands in the command list, after a command that resumes execution, are ignored. This is because any time you resume execution (even with a simple @code{next} or @code{step}), you may encounter another breakpoint---which could have its own command list, leading to ambiguities about which list to execute. @kindex silent If the first command you specify in a command list is @code{silent}, the usual message about stopping at a breakpoint is not printed. This may be desirable for breakpoints that are to print a specific message and then continue. If none of the remaining commands print anything, you see no sign that the breakpoint was reached. @code{silent} is meaningful only at the beginning of a breakpoint command list. The commands @code{echo}, @code{output}, and @code{printf} allow you to print precisely controlled output, and are often useful in silent breakpoints. @xref{Output, ,Commands for Controlled Output}. For example, here is how you could use breakpoint commands to print the value of @code{x} at entry to @code{foo} whenever @code{x} is positive. @smallexample break foo if x>0 commands silent printf "x is %d\n",x cont end @end smallexample One application for breakpoint commands is to compensate for one bug so you can test for another. Put a breakpoint just after the erroneous line of code, give it a condition to detect the case in which something erroneous has been done, and give it commands to assign correct values to any variables that need them. End with the @code{continue} command so that your program does not stop, and start with the @code{silent} command so that no output is produced. Here is an example: @smallexample break 403 commands silent set x = y + 4 cont end @end smallexample @node Dynamic Printf @subsection Dynamic Printf @cindex dynamic printf @cindex dprintf The dynamic printf command @code{dprintf} combines a breakpoint with formatted printing of your program's data to give you the effect of inserting @code{printf} calls into your program on-the-fly, without having to recompile it. In its most basic form, the output goes to the GDB console. However, you can set the variable @code{dprintf-style} for alternate handling. For instance, you can ask to format the output by calling your program's @code{printf} function. This has the advantage that the characters go to the program's output device, so they can recorded in redirects to files and so forth. If you are doing remote debugging with a stub or agent, you can also ask to have the printf handled by the remote agent. In addition to ensuring that the output goes to the remote program's device along with any other output the program might produce, you can also ask that the dprintf remain active even after disconnecting from the remote target. Using the stub/agent is also more efficient, as it can do everything without needing to communicate with @value{GDBN}. @table @code @kindex dprintf @item dprintf @var{location},@var{template},@var{expression}[,@var{expression}@dots{}] Whenever execution reaches @var{location}, print the values of one or more @var{expressions} under the control of the string @var{template}. To print several values, separate them with commas. @item set dprintf-style @var{style} Set the dprintf output to be handled in one of several different styles enumerated below. A change of style affects all existing dynamic printfs immediately. (If you need individual control over the print commands, simply define normal breakpoints with explicitly-supplied command lists.) @item gdb @kindex dprintf-style gdb Handle the output using the @value{GDBN} @code{printf} command. @item call @kindex dprintf-style call Handle the output by calling a function in your program (normally @code{printf}). @item agent @kindex dprintf-style agent Have the remote debugging agent (such as @code{gdbserver}) handle the output itself. This style is only available for agents that support running commands on the target. @item set dprintf-function @var{function} Set the function to call if the dprintf style is @code{call}. By default its value is @code{printf}. You may set it to any expression. that @value{GDBN} can evaluate to a function, as per the @code{call} command. @item set dprintf-channel @var{channel} Set a ``channel'' for dprintf. If set to a non-empty value, @value{GDBN} will evaluate it as an expression and pass the result as a first argument to the @code{dprintf-function}, in the manner of @code{fprintf} and similar functions. Otherwise, the dprintf format string will be the first argument, in the manner of @code{printf}. As an example, if you wanted @code{dprintf} output to go to a logfile that is a standard I/O stream assigned to the variable @code{mylog}, you could do the following: @example (gdb) set dprintf-style call (gdb) set dprintf-function fprintf (gdb) set dprintf-channel mylog (gdb) dprintf 25,"at line 25, glob=%d\n",glob Dprintf 1 at 0x123456: file main.c, line 25. (gdb) info break 1 dprintf keep y 0x00123456 in main at main.c:25 call (void) fprintf (mylog,"at line 25, glob=%d\n",glob) continue (gdb) @end example Note that the @code{info break} displays the dynamic printf commands as normal breakpoint commands; you can thus easily see the effect of the variable settings. @item set disconnected-dprintf on @itemx set disconnected-dprintf off @kindex set disconnected-dprintf Choose whether @code{dprintf} commands should continue to run if @value{GDBN} has disconnected from the target. This only applies if the @code{dprintf-style} is @code{agent}. @item show disconnected-dprintf off @kindex show disconnected-dprintf Show the current choice for disconnected @code{dprintf}. @end table @value{GDBN} does not check the validity of function and channel, relying on you to supply values that are meaningful for the contexts in which they are being used. For instance, the function and channel may be the values of local variables, but if that is the case, then all enabled dynamic prints must be at locations within the scope of those locals. If evaluation fails, @value{GDBN} will report an error. @node Save Breakpoints @subsection How to save breakpoints to a file To save breakpoint definitions to a file use the @w{@code{save breakpoints}} command. @table @code @kindex save breakpoints @cindex save breakpoints to a file for future sessions @item save breakpoints [@var{filename}] This command saves all current breakpoint definitions together with their commands and ignore counts, into a file @file{@var{filename}} suitable for use in a later debugging session. This includes all types of breakpoints (breakpoints, watchpoints, catchpoints, tracepoints). To read the saved breakpoint definitions, use the @code{source} command (@pxref{Command Files}). Note that watchpoints with expressions involving local variables may fail to be recreated because it may not be possible to access the context where the watchpoint is valid anymore. Because the saved breakpoint definitions are simply a sequence of @value{GDBN} commands that recreate the breakpoints, you can edit the file in your favorite editing program, and remove the breakpoint definitions you're not interested in, or that can no longer be recreated. @end table @node Static Probe Points @subsection Static Probe Points @cindex static probe point, SystemTap @value{GDBN} supports @dfn{SDT} probes in the code. @acronym{SDT} stands for Statically Defined Tracing, and the probes are designed to have a tiny runtime code and data footprint, and no dynamic relocations. They are usable from assembly, C and C@t{++} languages. See @uref{http://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation} for a good reference on how the @acronym{SDT} probes are implemented. Currently, @code{SystemTap} (@uref{http://sourceware.org/systemtap/}) @acronym{SDT} probes are supported on ELF-compatible systems. See @uref{http://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApps} for more information on how to add @code{SystemTap} @acronym{SDT} probes in your applications. @cindex semaphores on static probe points Some probes have an associated semaphore variable; for instance, this happens automatically if you defined your probe using a DTrace-style @file{.d} file. If your probe has a semaphore, @value{GDBN} will automatically enable it when you specify a breakpoint using the @samp{-probe-stap} notation. But, if you put a breakpoint at a probe's location by some other method (e.g., @code{break file:line}), then @value{GDBN} will not automatically set the semaphore. You can examine the available static static probes using @code{info probes}, with optional arguments: @table @code @kindex info probes @item info probes stap @r{[}@var{provider} @r{[}@var{name} @r{[}@var{objfile}@r{]}@r{]}@r{]} If given, @var{provider} is a regular expression used to match against provider names when selecting which probes to list. If omitted, probes by all probes from all providers are listed. If given, @var{name} is a regular expression to match against probe names when selecting which probes to list. If omitted, probe names are not considered when deciding whether to display them. If given, @var{objfile} is a regular expression used to select which object files (executable or shared libraries) to examine. If not given, all object files are considered. @item info probes all List the available static probes, from all types. @end table @vindex $_probe_arg@r{, convenience variable} A probe may specify up to twelve arguments. These are available at the point at which the probe is defined---that is, when the current PC is at the probe's location. The arguments are available using the convenience variables (@pxref{Convenience Vars}) @code{$_probe_arg0}@dots{}@code{$_probe_arg11}. Each probe argument is an integer of the appropriate size; types are not preserved. The convenience variable @code{$_probe_argc} holds the number of arguments at the current probe point. These variables are always available, but attempts to access them at any location other than a probe point will cause @value{GDBN} to give an error message. @c @ifclear BARETARGET @node Error in Breakpoints @subsection ``Cannot insert breakpoints'' If you request too many active hardware-assisted breakpoints and watchpoints, you will see this error message: @c FIXME: the precise wording of this message may change; the relevant @c source change is not committed yet (Sep 3, 1999). @smallexample Stopped; cannot insert breakpoints. You may have requested too many hardware breakpoints and watchpoints. @end smallexample @noindent This message is printed when you attempt to resume the program, since only then @value{GDBN} knows exactly how many hardware breakpoints and watchpoints it needs to insert. When this message is printed, you need to disable or remove some of the hardware-assisted breakpoints and watchpoints, and then continue. @node Breakpoint-related Warnings @subsection ``Breakpoint address adjusted...'' @cindex breakpoint address adjusted Some processor architectures place constraints on the addresses at which breakpoints may be placed. For architectures thus constrained, @value{GDBN} will attempt to adjust the breakpoint's address to comply with the constraints dictated by the architecture. One example of such an architecture is the Fujitsu FR-V. The FR-V is a VLIW architecture in which a number of RISC-like instructions may be bundled together for parallel execution. The FR-V architecture constrains the location of a breakpoint instruction within such a bundle to the instruction with the lowest address. @value{GDBN} honors this constraint by adjusting a breakpoint's address to the first in the bundle. It is not uncommon for optimized code to have bundles which contain instructions from different source statements, thus it may happen that a breakpoint's address will be adjusted from one source statement to another. Since this adjustment may significantly alter @value{GDBN}'s breakpoint related behavior from what the user expects, a warning is printed when the breakpoint is first set and also when the breakpoint is hit. A warning like the one below is printed when setting a breakpoint that's been subject to address adjustment: @smallexample warning: Breakpoint address adjusted from 0x00010414 to 0x00010410. @end smallexample Such warnings are printed both for user settable and @value{GDBN}'s internal breakpoints. If you see one of these warnings, you should verify that a breakpoint set at the adjusted address will have the desired affect. If not, the breakpoint in question may be removed and other breakpoints may be set which will have the desired behavior. E.g., it may be sufficient to place the breakpoint at a later instruction. A conditional breakpoint may also be useful in some cases to prevent the breakpoint from triggering too often. @value{GDBN} will also issue a warning when stopping at one of these adjusted breakpoints: @smallexample warning: Breakpoint 1 address previously adjusted from 0x00010414 to 0x00010410. @end smallexample When this warning is encountered, it may be too late to take remedial action except in cases where the breakpoint is hit earlier or more frequently than expected. @node Continuing and Stepping @section Continuing and Stepping @cindex stepping @cindex continuing @cindex resuming execution @dfn{Continuing} means resuming program execution until your program completes normally. In contrast, @dfn{stepping} means executing just one more ``step'' of your program, where ``step'' may mean either one line of source code, or one machine instruction (depending on what particular command you use). Either when continuing or when stepping, your program may stop even sooner, due to a breakpoint or a signal. (If it stops due to a signal, you may want to use @code{handle}, or use @samp{signal 0} to resume execution. @xref{Signals, ,Signals}.) @table @code @kindex continue @kindex c @r{(@code{continue})} @kindex fg @r{(resume foreground execution)} @item continue @r{[}@var{ignore-count}@r{]} @itemx c @r{[}@var{ignore-count}@r{]} @itemx fg @r{[}@var{ignore-count}@r{]} Resume program execution, at the address where your program last stopped; any breakpoints set at that address are bypassed. The optional argument @var{ignore-count} allows you to specify a further number of times to ignore a breakpoint at this location; its effect is like that of @code{ignore} (@pxref{Conditions, ,Break Conditions}). The argument @var{ignore-count} is meaningful only when your program stopped due to a breakpoint. At other times, the argument to @code{continue} is ignored. The synonyms @code{c} and @code{fg} (for @dfn{foreground}, as the debugged program is deemed to be the foreground program) are provided purely for convenience, and have exactly the same behavior as @code{continue}. @end table To resume execution at a different place, you can use @code{return} (@pxref{Returning, ,Returning from a Function}) to go back to the calling function; or @code{jump} (@pxref{Jumping, ,Continuing at a Different Address}) to go to an arbitrary location in your program. A typical technique for using stepping is to set a breakpoint (@pxref{Breakpoints, ,Breakpoints; Watchpoints; and Catchpoints}) at the beginning of the function or the section of your program where a problem is believed to lie, run your program until it stops at that breakpoint, and then step through the suspect area, examining the variables that are interesting, until you see the problem happen. @table @code @kindex step @kindex s @r{(@code{step})} @item step Continue running your program until control reaches a different source line, then stop it and return control to @value{GDBN}. This command is abbreviated @code{s}. @quotation @c "without debugging information" is imprecise; actually "without line @c numbers in the debugging information". (gcc -g1 has debugging info but @c not line numbers). But it seems complex to try to make that @c distinction here. @emph{Warning:} If you use the @code{step} command while control is within a function that was compiled without debugging information, execution proceeds until control reaches a function that does have debugging information. Likewise, it will not step into a function which is compiled without debugging information. To step through functions without debugging information, use the @code{stepi} command, described below. @end quotation The @code{step} command only stops at the first instruction of a source line. This prevents the multiple stops that could otherwise occur in @code{switch} statements, @code{for} loops, etc. @code{step} continues to stop if a function that has debugging information is called within the line. In other words, @code{step} @emph{steps inside} any functions called within the line. Also, the @code{step} command only enters a function if there is line number information for the function. Otherwise it acts like the @code{next} command. This avoids problems when using @code{cc -gl} on @acronym{MIPS} machines. Previously, @code{step} entered subroutines if there was any debugging information about the routine. @item step @var{count} Continue running as in @code{step}, but do so @var{count} times. If a breakpoint is reached, or a signal not related to stepping occurs before @var{count} steps, stepping stops right away. @kindex next @kindex n @r{(@code{next})} @item next @r{[}@var{count}@r{]} Continue to the next source line in the current (innermost) stack frame. This is similar to @code{step}, but function calls that appear within the line of code are executed without stopping. Execution stops when control reaches a different line of code at the original stack level that was executing when you gave the @code{next} command. This command is abbreviated @code{n}. An argument @var{count} is a repeat count, as for @code{step}. @c FIX ME!! Do we delete this, or is there a way it fits in with @c the following paragraph? --- Vctoria @c @c @code{next} within a function that lacks debugging information acts like @c @code{step}, but any function calls appearing within the code of the @c function are executed without stopping. The @code{next} command only stops at the first instruction of a source line. This prevents multiple stops that could otherwise occur in @code{switch} statements, @code{for} loops, etc. @kindex set step-mode @item set step-mode @cindex functions without line info, and stepping @cindex stepping into functions with no line info @itemx set step-mode on The @code{set step-mode on} command causes the @code{step} command to stop at the first instruction of a function which contains no debug line information rather than stepping over it. This is useful in cases where you may be interested in inspecting the machine instructions of a function which has no symbolic info and do not want @value{GDBN} to automatically skip over this function. @item set step-mode off Causes the @code{step} command to step over any functions which contains no debug information. This is the default. @item show step-mode Show whether @value{GDBN} will stop in or step over functions without source line debug information. @kindex finish @kindex fin @r{(@code{finish})} @item finish Continue running until just after function in the selected stack frame returns. Print the returned value (if any). This command can be abbreviated as @code{fin}. Contrast this with the @code{return} command (@pxref{Returning, ,Returning from a Function}). @kindex until @kindex u @r{(@code{until})} @cindex run until specified location @item until @itemx u Continue running until a source line past the current line, in the current stack frame, is reached. This command is used to avoid single stepping through a loop more than once. It is like the @code{next} command, except that when @code{until} encounters a jump, it automatically continues execution until the program counter is greater than the address of the jump. This means that when you reach the end of a loop after single stepping though it, @code{until} makes your program continue execution until it exits the loop. In contrast, a @code{next} command at the end of a loop simply steps back to the beginning of the loop, which forces you to step through the next iteration. @code{until} always stops your program if it attempts to exit the current stack frame. @code{until} may produce somewhat counterintuitive results if the order of machine code does not match the order of the source lines. For example, in the following excerpt from a debugging session, the @code{f} (@code{frame}) command shows that execution is stopped at line @code{206}; yet when we use @code{until}, we get to line @code{195}: @smallexample (@value{GDBP}) f #0 main (argc=4, argv=0xf7fffae8) at m4.c:206 206 expand_input(); (@value{GDBP}) until 195 for ( ; argc > 0; NEXTARG) @{ @end smallexample This happened because, for execution efficiency, the compiler had generated code for the loop closure test at the end, rather than the start, of the loop---even though the test in a C @code{for}-loop is written before the body of the loop. The @code{until} command appeared to step back to the beginning of the loop when it advanced to this expression; however, it has not really gone to an earlier statement---not in terms of the actual machine code. @code{until} with no argument works by means of single instruction stepping, and hence is slower than @code{until} with an argument. @item until @var{location} @itemx u @var{location} Continue running your program until either the specified location is reached, or the current stack frame returns. @var{location} is any of the forms described in @ref{Specify Location}. This form of the command uses temporary breakpoints, and hence is quicker than @code{until} without an argument. The specified location is actually reached only if it is in the current frame. This implies that @code{until} can be used to skip over recursive function invocations. For instance in the code below, if the current location is line @code{96}, issuing @code{until 99} will execute the program up to line @code{99} in the same invocation of factorial, i.e., after the inner invocations have returned. @smallexample 94 int factorial (int value) 95 @{ 96 if (value > 1) @{ 97 value *= factorial (value - 1); 98 @} 99 return (value); 100 @} @end smallexample @kindex advance @var{location} @item advance @var{location} Continue running the program up to the given @var{location}. An argument is required, which should be of one of the forms described in @ref{Specify Location}. Execution will also stop upon exit from the current stack frame. This command is similar to @code{until}, but @code{advance} will not skip over recursive function calls, and the target location doesn't have to be in the same frame as the current one. @kindex stepi @kindex si @r{(@code{stepi})} @item stepi @itemx stepi @var{arg} @itemx si Execute one machine instruction, then stop and return to the debugger. It is often useful to do @samp{display/i $pc} when stepping by machine instructions. This makes @value{GDBN} automatically display the next instruction to be executed, each time your program stops. @xref{Auto Display,, Automatic Display}. An argument is a repeat count, as in @code{step}. @need 750 @kindex nexti @kindex ni @r{(@code{nexti})} @item nexti @itemx nexti @var{arg} @itemx ni Execute one machine instruction, but if it is a function call, proceed until the function returns. An argument is a repeat count, as in @code{next}. @end table @node Skipping Over Functions and Files @section Skipping Over Functions and Files @cindex skipping over functions and files The program you are debugging may contain some functions which are uninteresting to debug. The @code{skip} comand lets you tell @value{GDBN} to skip a function or all functions in a file when stepping. For example, consider the following C function: @smallexample 101 int func() 102 @{ 103 foo(boring()); 104 bar(boring()); 105 @} @end smallexample @noindent Suppose you wish to step into the functions @code{foo} and @code{bar}, but you are not interested in stepping through @code{boring}. If you run @code{step} at line 103, you'll enter @code{boring()}, but if you run @code{next}, you'll step over both @code{foo} and @code{boring}! One solution is to @code{step} into @code{boring} and use the @code{finish} command to immediately exit it. But this can become tedious if @code{boring} is called from many places. A more flexible solution is to execute @kbd{skip boring}. This instructs @value{GDBN} never to step into @code{boring}. Now when you execute @code{step} at line 103, you'll step over @code{boring} and directly into @code{foo}. You can also instruct @value{GDBN} to skip all functions in a file, with, for example, @code{skip file boring.c}. @table @code @kindex skip function @item skip @r{[}@var{linespec}@r{]} @itemx skip function @r{[}@var{linespec}@r{]} After running this command, the function named by @var{linespec} or the function containing the line named by @var{linespec} will be skipped over when stepping. @xref{Specify Location}. If you do not specify @var{linespec}, the function you're currently debugging will be skipped. (If you have a function called @code{file} that you want to skip, use @kbd{skip function file}.) @kindex skip file @item skip file @r{[}@var{filename}@r{]} After running this command, any function whose source lives in @var{filename} will be skipped over when stepping. If you do not specify @var{filename}, functions whose source lives in the file you're currently debugging will be skipped. @end table Skips can be listed, deleted, disabled, and enabled, much like breakpoints. These are the commands for managing your list of skips: @table @code @kindex info skip @item info skip @r{[}@var{range}@r{]} Print details about the specified skip(s). If @var{range} is not specified, print a table with details about all functions and files marked for skipping. @code{info skip} prints the following information about each skip: @table @emph @item Identifier A number identifying this skip. @item Type The type of this skip, either @samp{function} or @samp{file}. @item Enabled or Disabled Enabled skips are marked with @samp{y}. Disabled skips are marked with @samp{n}. @item Address For function skips, this column indicates the address in memory of the function being skipped. If you've set a function skip on a function which has not yet been loaded, this field will contain @samp{}. Once a shared library which has the function is loaded, @code{info skip} will show the function's address here. @item What For file skips, this field contains the filename being skipped. For functions skips, this field contains the function name and its line number in the file where it is defined. @end table @kindex skip delete @item skip delete @r{[}@var{range}@r{]} Delete the specified skip(s). If @var{range} is not specified, delete all skips. @kindex skip enable @item skip enable @r{[}@var{range}@r{]} Enable the specified skip(s). If @var{range} is not specified, enable all skips. @kindex skip disable @item skip disable @r{[}@var{range}@r{]} Disable the specified skip(s). If @var{range} is not specified, disable all skips. @end table @node Signals @section Signals @cindex signals A signal is an asynchronous event that can happen in a program. The operating system defines the possible kinds of signals, and gives each kind a name and a number. For example, in Unix @code{SIGINT} is the signal a program gets when you type an interrupt character (often @kbd{Ctrl-c}); @code{SIGSEGV} is the signal a program gets from referencing a place in memory far away from all the areas in use; @code{SIGALRM} occurs when the alarm clock timer goes off (which happens only if your program has requested an alarm). @cindex fatal signals Some signals, including @code{SIGALRM}, are a normal part of the functioning of your program. Others, such as @code{SIGSEGV}, indicate errors; these signals are @dfn{fatal} (they kill your program immediately) if the program has not specified in advance some other way to handle the signal. @code{SIGINT} does not indicate an error in your program, but it is normally fatal so it can carry out the purpose of the interrupt: to kill the program. @value{GDBN} has the ability to detect any occurrence of a signal in your program. You can tell @value{GDBN} in advance what to do for each kind of signal. @cindex handling signals Normally, @value{GDBN} is set up to let the non-erroneous signals like @code{SIGALRM} be silently passed to your program (so as not to interfere with their role in the program's functioning) but to stop your program immediately whenever an error signal happens. You can change these settings with the @code{handle} command. @table @code @kindex info signals @kindex info handle @item info signals @itemx info handle Print a table of all the kinds of signals and how @value{GDBN} has been told to handle each one. You can use this to see the signal numbers of all the defined types of signals. @item info signals @var{sig} Similar, but print information only about the specified signal number. @code{info handle} is an alias for @code{info signals}. @item catch signal @r{[}@var{signal}@dots{} @r{|} @samp{all}@r{]} Set a catchpoint for the indicated signals. @xref{Set Catchpoints}, for details about this command. @kindex handle @item handle @var{signal} @r{[}@var{keywords}@dots{}@r{]} Change the way @value{GDBN} handles signal @var{signal}. @var{signal} can be the number of a signal or its name (with or without the @samp{SIG} at the beginning); a list of signal numbers of the form @samp{@var{low}-@var{high}}; or the word @samp{all}, meaning all the known signals. Optional arguments @var{keywords}, described below, say what change to make. @end table @c @group The keywords allowed by the @code{handle} command can be abbreviated. Their full names are: @table @code @item nostop @value{GDBN} should not stop your program when this signal happens. It may still print a message telling you that the signal has come in. @item stop @value{GDBN} should stop your program when this signal happens. This implies the @code{print} keyword as well. @item print @value{GDBN} should print a message when this signal happens. @item noprint @value{GDBN} should not mention the occurrence of the signal at all. This implies the @code{nostop} keyword as well. @item pass @itemx noignore @value{GDBN} should allow your program to see this signal; your program can handle the signal, or else it may terminate if the signal is fatal and not handled. @code{pass} and @code{noignore} are synonyms. @item nopass @itemx ignore @value{GDBN} should not allow your program to see this signal. @code{nopass} and @code{ignore} are synonyms. @end table @c @end group When a signal stops your program, the signal is not visible to the program until you continue. Your program sees the signal then, if @code{pass} is in effect for the signal in question @emph{at that time}. In other words, after @value{GDBN} reports a signal, you can use the @code{handle} command with @code{pass} or @code{nopass} to control whether your program sees that signal when you continue. The default is set to @code{nostop}, @code{noprint}, @code{pass} for non-erroneous signals such as @code{SIGALRM}, @code{SIGWINCH} and @code{SIGCHLD}, and to @code{stop}, @code{print}, @code{pass} for the erroneous signals. You can also use the @code{signal} command to prevent your program from seeing a signal, or cause it to see a signal it normally would not see, or to give it any signal at any time. For example, if your program stopped due to some sort of memory reference error, you might store correct values into the erroneous variables and continue, hoping to see more execution; but your program would probably terminate immediately as a result of the fatal signal once it saw the signal. To prevent this, you can continue with @samp{signal 0}. @xref{Signaling, ,Giving your Program a Signal}. @cindex extra signal information @anchor{extra signal information} On some targets, @value{GDBN} can inspect extra signal information associated with the intercepted signal, before it is actually delivered to the program being debugged. This information is exported by the convenience variable @code{$_siginfo}, and consists of data that is passed by the kernel to the signal handler at the time of the receipt of a signal. The data type of the information itself is target dependent. You can see the data type using the @code{ptype $_siginfo} command. On Unix systems, it typically corresponds to the standard @code{siginfo_t} type, as defined in the @file{signal.h} system header. Here's an example, on a @sc{gnu}/Linux system, printing the stray referenced address that raised a segmentation fault. @smallexample @group (@value{GDBP}) continue Program received signal SIGSEGV, Segmentation fault. 0x0000000000400766 in main () 69 *(int *)p = 0; (@value{GDBP}) ptype $_siginfo type = struct @{ int si_signo; int si_errno; int si_code; union @{ int _pad[28]; struct @{...@} _kill; struct @{...@} _timer; struct @{...@} _rt; struct @{...@} _sigchld; struct @{...@} _sigfault; struct @{...@} _sigpoll; @} _sifields; @} (@value{GDBP}) ptype $_siginfo._sifields._sigfault type = struct @{ void *si_addr; @} (@value{GDBP}) p $_siginfo._sifields._sigfault.si_addr $1 = (void *) 0x7ffff7ff7000 @end group @end smallexample Depending on target support, @code{$_siginfo} may also be writable. @node Thread Stops @section Stopping and Starting Multi-thread Programs @cindex stopped threads @cindex threads, stopped @cindex continuing threads @cindex threads, continuing @value{GDBN} supports debugging programs with multiple threads (@pxref{Threads,, Debugging Programs with Multiple Threads}). There are two modes of controlling execution of your program within the debugger. In the default mode, referred to as @dfn{all-stop mode}, when any thread in your program stops (for example, at a breakpoint or while being stepped), all other threads in the program are also stopped by @value{GDBN}. On some targets, @value{GDBN} also supports @dfn{non-stop mode}, in which other threads can continue to run freely while you examine the stopped thread in the debugger. @menu * All-Stop Mode:: All threads stop when GDB takes control * Non-Stop Mode:: Other threads continue to execute * Background Execution:: Running your program asynchronously * Thread-Specific Breakpoints:: Controlling breakpoints * Interrupted System Calls:: GDB may interfere with system calls * Observer Mode:: GDB does not alter program behavior @end menu @node All-Stop Mode @subsection All-Stop Mode @cindex all-stop mode In all-stop mode, whenever your program stops under @value{GDBN} for any reason, @emph{all} threads of execution stop, not just the current thread. This allows you to examine the overall state of the program, including switching between threads, without worrying that things may change underfoot. Conversely, whenever you restart the program, @emph{all} threads start executing. @emph{This is true even when single-stepping} with commands like @code{step} or @code{next}. In particular, @value{GDBN} cannot single-step all threads in lockstep. Since thread scheduling is up to your debugging target's operating system (not controlled by @value{GDBN}), other threads may execute more than one statement while the current thread completes a single step. Moreover, in general other threads stop in the middle of a statement, rather than at a clean statement boundary, when the program stops. You might even find your program stopped in another thread after continuing or even single-stepping. This happens whenever some other thread runs into a breakpoint, a signal, or an exception before the first thread completes whatever you requested. @cindex automatic thread selection @cindex switching threads automatically @cindex threads, automatic switching Whenever @value{GDBN} stops your program, due to a breakpoint or a signal, it automatically selects the thread where that breakpoint or signal happened. @value{GDBN} alerts you to the context switch with a message such as @samp{[Switching to Thread @var{n}]} to identify the thread. On some OSes, you can modify @value{GDBN}'s default behavior by locking the OS scheduler to allow only a single thread to run. @table @code @item set scheduler-locking @var{mode} @cindex scheduler locking mode @cindex lock scheduler Set the scheduler locking mode. If it is @code{off}, then there is no locking and any thread may run at any time. If @code{on}, then only the current thread may run when the inferior is resumed. The @code{step} mode optimizes for single-stepping; it prevents other threads from preempting the current thread while you are stepping, so that the focus of debugging does not change unexpectedly. Other threads only rarely (or never) get a chance to run when you step. They are more likely to run when you @samp{next} over a function call, and they are completely free to run when you use commands like @samp{continue}, @samp{until}, or @samp{finish}. However, unless another thread hits a breakpoint during its timeslice, @value{GDBN} does not change the current thread away from the thread that you are debugging. @item show scheduler-locking Display the current scheduler locking mode. @end table @cindex resume threads of multiple processes simultaneously By default, when you issue one of the execution commands such as @code{continue}, @code{next} or @code{step}, @value{GDBN} allows only threads of the current inferior to run. For example, if @value{GDBN} is attached to two inferiors, each with two threads, the @code{continue} command resumes only the two threads of the current inferior. This is useful, for example, when you debug a program that forks and you want to hold the parent stopped (so that, for instance, it doesn't run to exit), while you debug the child. In other situations, you may not be interested in inspecting the current state of any of the processes @value{GDBN} is attached to, and you may want to resume them all until some breakpoint is hit. In the latter case, you can instruct @value{GDBN} to allow all threads of all the inferiors to run with the @w{@code{set schedule-multiple}} command. @table @code @kindex set schedule-multiple @item set schedule-multiple Set the mode for allowing threads of multiple processes to be resumed when an execution command is issued. When @code{on}, all threads of all processes are allowed to run. When @code{off}, only the threads of the current process are resumed. The default is @code{off}. The @code{scheduler-locking} mode takes precedence when set to @code{on}, or while you are stepping and set to @code{step}. @item show schedule-multiple Display the current mode for resuming the execution of threads of multiple processes. @end table @node Non-Stop Mode @subsection Non-Stop Mode @cindex non-stop mode @c This section is really only a place-holder, and needs to be expanded @c with more details. For some multi-threaded targets, @value{GDBN} supports an optional mode of operation in which you can examine stopped program threads in the debugger while other threads continue to execute freely. This minimizes intrusion when debugging live systems, such as programs where some threads have real-time constraints or must continue to respond to external events. This is referred to as @dfn{non-stop} mode. In non-stop mode, when a thread stops to report a debugging event, @emph{only} that thread is stopped; @value{GDBN} does not stop other threads as well, in contrast to the all-stop mode behavior. Additionally, execution commands such as @code{continue} and @code{step} apply by default only to the current thread in non-stop mode, rather than all threads as in all-stop mode. This allows you to control threads explicitly in ways that are not possible in all-stop mode --- for example, stepping one thread while allowing others to run freely, stepping one thread while holding all others stopped, or stepping several threads independently and simultaneously. To enter non-stop mode, use this sequence of commands before you run or attach to your program: @smallexample # Enable the async interface. set target-async 1 # If using the CLI, pagination breaks non-stop. set pagination off # Finally, turn it on! set non-stop on @end smallexample You can use these commands to manipulate the non-stop mode setting: @table @code @kindex set non-stop @item set non-stop on Enable selection of non-stop mode. @item set non-stop off Disable selection of non-stop mode. @kindex show non-stop @item show non-stop Show the current non-stop enablement setting. @end table Note these commands only reflect whether non-stop mode is enabled, not whether the currently-executing program is being run in non-stop mode. In particular, the @code{set non-stop} preference is only consulted when @value{GDBN} starts or connects to the target program, and it is generally not possible to switch modes once debugging has started. Furthermore, since not all targets support non-stop mode, even when you have enabled non-stop mode, @value{GDBN} may still fall back to all-stop operation by default. In non-stop mode, all execution commands apply only to the current thread by default. That is, @code{continue} only continues one thread. To continue all threads, issue @code{continue -a} or @code{c -a}. You can use @value{GDBN}'s background execution commands (@pxref{Background Execution}) to run some threads in the background while you continue to examine or step others from @value{GDBN}. The MI execution commands (@pxref{GDB/MI Program Execution}) are always executed asynchronously in non-stop mode. Suspending execution is done with the @code{interrupt} command when running in the background, or @kbd{Ctrl-c} during foreground execution. In all-stop mode, this stops the whole process; but in non-stop mode the interrupt applies only to the current thread. To stop the whole program, use @code{interrupt -a}. Other execution commands do not currently support the @code{-a} option. In non-stop mode, when a thread stops, @value{GDBN} doesn't automatically make that thread current, as it does in all-stop mode. This is because the thread stop notifications are asynchronous with respect to @value{GDBN}'s command interpreter, and it would be confusing if @value{GDBN} unexpectedly changed to a different thread just as you entered a command to operate on the previously current thread. @node Background Execution @subsection Background Execution @cindex foreground execution @cindex background execution @cindex asynchronous execution @cindex execution, foreground, background and asynchronous @value{GDBN}'s execution commands have two variants: the normal foreground (synchronous) behavior, and a background (asynchronous) behavior. In foreground execution, @value{GDBN} waits for the program to report that some thread has stopped before prompting for another command. In background execution, @value{GDBN} immediately gives a command prompt so that you can issue other commands while your program runs. You need to explicitly enable asynchronous mode before you can use background execution commands. You can use these commands to manipulate the asynchronous mode setting: @table @code @kindex set target-async @item set target-async on Enable asynchronous mode. @item set target-async off Disable asynchronous mode. @kindex show target-async @item show target-async Show the current target-async setting. @end table If the target doesn't support async mode, @value{GDBN} issues an error message if you attempt to use the background execution commands. To specify background execution, add a @code{&} to the command. For example, the background form of the @code{continue} command is @code{continue&}, or just @code{c&}. The execution commands that accept background execution are: @table @code @kindex run& @item run @xref{Starting, , Starting your Program}. @item attach @kindex attach& @xref{Attach, , Debugging an Already-running Process}. @item step @kindex step& @xref{Continuing and Stepping, step}. @item stepi @kindex stepi& @xref{Continuing and Stepping, stepi}. @item next @kindex next& @xref{Continuing and Stepping, next}. @item nexti @kindex nexti& @xref{Continuing and Stepping, nexti}. @item continue @kindex continue& @xref{Continuing and Stepping, continue}. @item finish @kindex finish& @xref{Continuing and Stepping, finish}. @item until @kindex until& @xref{Continuing and Stepping, until}. @end table Background execution is especially useful in conjunction with non-stop mode for debugging programs with multiple threads; see @ref{Non-Stop Mode}. However, you can also use these commands in the normal all-stop mode with the restriction that you cannot issue another execution command until the previous one finishes. Examples of commands that are valid in all-stop mode while the program is running include @code{help} and @code{info break}. You can interrupt your program while it is running in the background by using the @code{interrupt} command. @table @code @kindex interrupt @item interrupt @itemx interrupt -a Suspend execution of the running program. In all-stop mode, @code{interrupt} stops the whole process, but in non-stop mode, it stops only the current thread. To stop the whole program in non-stop mode, use @code{interrupt -a}. @end table @node Thread-Specific Breakpoints @subsection Thread-Specific Breakpoints When your program has multiple threads (@pxref{Threads,, Debugging Programs with Multiple Threads}), you can choose whether to set breakpoints on all threads, or on a particular thread. @table @code @cindex breakpoints and threads @cindex thread breakpoints @kindex break @dots{} thread @var{threadno} @item break @var{linespec} thread @var{threadno} @itemx break @var{linespec} thread @var{threadno} if @dots{} @var{linespec} specifies source lines; there are several ways of writing them (@pxref{Specify Location}), but the effect is always to specify some source line. Use the qualifier @samp{thread @var{threadno}} with a breakpoint command to specify that you only want @value{GDBN} to stop the program when a particular thread reaches this breakpoint. @var{threadno} is one of the numeric thread identifiers assigned by @value{GDBN}, shown in the first column of the @samp{info threads} display. If you do not specify @samp{thread @var{threadno}} when you set a breakpoint, the breakpoint applies to @emph{all} threads of your program. You can use the @code{thread} qualifier on conditional breakpoints as well; in this case, place @samp{thread @var{threadno}} before or after the breakpoint condition, like this: @smallexample (@value{GDBP}) break frik.c:13 thread 28 if bartab > lim @end smallexample @end table @node Interrupted System Calls @subsection Interrupted System Calls @cindex thread breakpoints and system calls @cindex system calls and thread breakpoints @cindex premature return from system calls There is an unfortunate side effect when using @value{GDBN} to debug multi-threaded programs. If one thread stops for a breakpoint, or for some other reason, and another thread is blocked in a system call, then the system call may return prematurely. This is a consequence of the interaction between multiple threads and the signals that @value{GDBN} uses to implement breakpoints and other events that stop execution. To handle this problem, your program should check the return value of each system call and react appropriately. This is good programming style anyways. For example, do not write code like this: @smallexample sleep (10); @end smallexample The call to @code{sleep} will return early if a different thread stops at a breakpoint or for some other reason. Instead, write this: @smallexample int unslept = 10; while (unslept > 0) unslept = sleep (unslept); @end smallexample A system call is allowed to return early, so the system is still conforming to its specification. But @value{GDBN} does cause your multi-threaded program to behave differently than it would without @value{GDBN}. Also, @value{GDBN} uses internal breakpoints in the thread library to monitor certain events such as thread creation and thread destruction. When such an event happens, a system call in another thread may return prematurely, even though your program does not appear to stop. @node Observer Mode @subsection Observer Mode If you want to build on non-stop mode and observe program behavior without any chance of disruption by @value{GDBN}, you can set variables to disable all of the debugger's attempts to modify state, whether by writing memory, inserting breakpoints, etc. These operate at a low level, intercepting operations from all commands. When all of these are set to @code{off}, then @value{GDBN} is said to be @dfn{observer mode}. As a convenience, the variable @code{observer} can be set to disable these, plus enable non-stop mode. Note that @value{GDBN} will not prevent you from making nonsensical combinations of these settings. For instance, if you have enabled @code{may-insert-breakpoints} but disabled @code{may-write-memory}, then breakpoints that work by writing trap instructions into the code stream will still not be able to be placed. @table @code @kindex observer @item set observer on @itemx set observer off When set to @code{on}, this disables all the permission variables below (except for @code{insert-fast-tracepoints}), plus enables non-stop debugging. Setting this to @code{off} switches back to normal debugging, though remaining in non-stop mode. @item show observer Show whether observer mode is on or off. @kindex may-write-registers @item set may-write-registers on @itemx set may-write-registers off This controls whether @value{GDBN} will attempt to alter the values of registers, such as with assignment expressions in @code{print}, or the @code{jump} command. It defaults to @code{on}. @item show may-write-registers Show the current permission to write registers. @kindex may-write-memory @item set may-write-memory on @itemx set may-write-memory off This controls whether @value{GDBN} will attempt to alter the contents of memory, such as with assignment expressions in @code{print}. It defaults to @code{on}. @item show may-write-memory Show the current permission to write memory. @kindex may-insert-breakpoints @item set may-insert-breakpoints on @itemx set may-insert-breakpoints off This controls whether @value{GDBN} will attempt to insert breakpoints. This affects all breakpoints, including internal breakpoints defined by @value{GDBN}. It defaults to @code{on}. @item show may-insert-breakpoints Show the current permission to insert breakpoints. @kindex may-insert-tracepoints @item set may-insert-tracepoints on @itemx set may-insert-tracepoints off This controls whether @value{GDBN} will attempt to insert (regular) tracepoints at the beginning of a tracing experiment. It affects only non-fast tracepoints, fast tracepoints being under the control of @code{may-insert-fast-tracepoints}. It defaults to @code{on}. @item show may-insert-tracepoints Show the current permission to insert tracepoints. @kindex may-insert-fast-tracepoints @item set may-insert-fast-tracepoints on @itemx set may-insert-fast-tracepoints off This controls whether @value{GDBN} will attempt to insert fast tracepoints at the beginning of a tracing experiment. It affects only fast tracepoints, regular (non-fast) tracepoints being under the control of @code{may-insert-tracepoints}. It defaults to @code{on}. @item show may-insert-fast-tracepoints Show the current permission to insert fast tracepoints. @kindex may-interrupt @item set may-interrupt on @itemx set may-interrupt off This controls whether @value{GDBN} will attempt to interrupt or stop program execution. When this variable is @code{off}, the @code{interrupt} command will have no effect, nor will @kbd{Ctrl-c}. It defaults to @code{on}. @item show may-interrupt Show the current permission to interrupt or stop the program. @end table @node Reverse Execution @chapter Running programs backward @cindex reverse execution @cindex running programs backward When you are debugging a program, it is not unusual to realize that you have gone too far, and some event of interest has already happened. If the target environment supports it, @value{GDBN} can allow you to ``rewind'' the program by running it backward. A target environment that supports reverse execution should be able to ``undo'' the changes in machine state that have taken place as the program was executing normally. Variables, registers etc.@: should revert to their previous values. Obviously this requires a great deal of sophistication on the part of the target environment; not all target environments can support reverse execution. When a program is executed in reverse, the instructions that have most recently been executed are ``un-executed'', in reverse order. The program counter runs backward, following the previous thread of execution in reverse. As each instruction is ``un-executed'', the values of memory and/or registers that were changed by that instruction are reverted to their previous states. After executing a piece of source code in reverse, all side effects of that code should be ``undone'', and all variables should be returned to their prior values@footnote{ Note that some side effects are easier to undo than others. For instance, memory and registers are relatively easy, but device I/O is hard. Some targets may be able undo things like device I/O, and some may not. The contract between @value{GDBN} and the reverse executing target requires only that the target do something reasonable when @value{GDBN} tells it to execute backwards, and then report the results back to @value{GDBN}. Whatever the target reports back to @value{GDBN}, @value{GDBN} will report back to the user. @value{GDBN} assumes that the memory and registers that the target reports are in a consistant state, but @value{GDBN} accepts whatever it is given. }. If you are debugging in a target environment that supports reverse execution, @value{GDBN} provides the following commands. @table @code @kindex reverse-continue @kindex rc @r{(@code{reverse-continue})} @item reverse-continue @r{[}@var{ignore-count}@r{]} @itemx rc @r{[}@var{ignore-count}@r{]} Beginning at the point where your program last stopped, start executing in reverse. Reverse execution will stop for breakpoints and synchronous exceptions (signals), just like normal execution. Behavior of asynchronous signals depends on the target environment. @kindex reverse-step @kindex rs @r{(@code{step})} @item reverse-step @r{[}@var{count}@r{]} Run the program backward until control reaches the start of a different source line; then stop it, and return control to @value{GDBN}. Like the @code{step} command, @code{reverse-step} will only stop at the beginning of a source line. It ``un-executes'' the previously executed source line. If the previous source line included calls to debuggable functions, @code{reverse-step} will step (backward) into the called function, stopping at the beginning of the @emph{last} statement in the called function (typically a return statement). Also, as with the @code{step} command, if non-debuggable functions are called, @code{reverse-step} will run thru them backward without stopping. @kindex reverse-stepi @kindex rsi @r{(@code{reverse-stepi})} @item reverse-stepi @r{[}@var{count}@r{]} Reverse-execute one machine instruction. Note that the instruction to be reverse-executed is @emph{not} the one pointed to by the program counter, but the instruction executed prior to that one. For instance, if the last instruction was a jump, @code{reverse-stepi} will take you back from the destination of the jump to the jump instruction itself. @kindex reverse-next @kindex rn @r{(@code{reverse-next})} @item reverse-next @r{[}@var{count}@r{]} Run backward to the beginning of the previous line executed in the current (innermost) stack frame. If the line contains function calls, they will be ``un-executed'' without stopping. Starting from the first line of a function, @code{reverse-next} will take you back to the caller of that function, @emph{before} the function was called, just as the normal @code{next} command would take you from the last line of a function back to its return to its caller @footnote{Unless the code is too heavily optimized.}. @kindex reverse-nexti @kindex rni @r{(@code{reverse-nexti})} @item reverse-nexti @r{[}@var{count}@r{]} Like @code{nexti}, @code{reverse-nexti} executes a single instruction in reverse, except that called functions are ``un-executed'' atomically. That is, if the previously executed instruction was a return from another function, @code{reverse-nexti} will continue to execute in reverse until the call to that function (from the current stack frame) is reached. @kindex reverse-finish @item reverse-finish Just as the @code{finish} command takes you to the point where the current function returns, @code{reverse-finish} takes you to the point where it was called. Instead of ending up at the end of the current function invocation, you end up at the beginning. @kindex set exec-direction @item set exec-direction Set the direction of target execution. @item set exec-direction reverse @cindex execute forward or backward in time @value{GDBN} will perform all execution commands in reverse, until the exec-direction mode is changed to ``forward''. Affected commands include @code{step, stepi, next, nexti, continue, and finish}. The @code{return} command cannot be used in reverse mode. @item set exec-direction forward @value{GDBN} will perform all execution commands in the normal fashion. This is the default. @end table @node Process Record and Replay @chapter Recording Inferior's Execution and Replaying It @cindex process record and replay @cindex recording inferior's execution and replaying it On some platforms, @value{GDBN} provides a special @dfn{process record and replay} target that can record a log of the process execution, and replay it later with both forward and reverse execution commands. @cindex replay mode When this target is in use, if the execution log includes the record for the next instruction, @value{GDBN} will debug in @dfn{replay mode}. In the replay mode, the inferior does not really execute code instructions. Instead, all the events that normally happen during code execution are taken from the execution log. While code is not really executed in replay mode, the values of registers (including the program counter register) and the memory of the inferior are still changed as they normally would. Their contents are taken from the execution log. @cindex record mode If the record for the next instruction is not in the execution log, @value{GDBN} will debug in @dfn{record mode}. In this mode, the inferior executes normally, and @value{GDBN} records the execution log for future replay. The process record and replay target supports reverse execution (@pxref{Reverse Execution}), even if the platform on which the inferior runs does not. However, the reverse execution is limited in this case by the range of the instructions recorded in the execution log. In other words, reverse execution on platforms that don't support it directly can only be done in the replay mode. When debugging in the reverse direction, @value{GDBN} will work in replay mode as long as the execution log includes the record for the previous instruction; otherwise, it will work in record mode, if the platform supports reverse execution, or stop if not. For architecture environments that support process record and replay, @value{GDBN} provides the following commands: @table @code @kindex target record @kindex target record-full @kindex target record-btrace @kindex record @kindex record full @kindex record btrace @kindex rec @kindex rec full @kindex rec btrace @item record @var{method} This command starts the process record and replay target. The recording method can be specified as parameter. Without a parameter the command uses the @code{full} recording method. The following recording methods are available: @table @code @item full Full record/replay recording using @value{GDBN}'s software record and replay implementation. This method allows replaying and reverse execution. @item btrace Hardware-supported instruction recording. This method does not allow replaying and reverse execution. This recording method may not be available on all processors. @end table The process record and replay target can only debug a process that is already running. Therefore, you need first to start the process with the @kbd{run} or @kbd{start} commands, and then start the recording with the @kbd{record @var{method}} command. Both @code{record @var{method}} and @code{rec @var{method}} are aliases of @code{target record-@var{method}}. @cindex displaced stepping, and process record and replay Displaced stepping (@pxref{Maintenance Commands,, displaced stepping}) will be automatically disabled when process record and replay target is started. That's because the process record and replay target doesn't support displaced stepping. @cindex non-stop mode, and process record and replay @cindex asynchronous execution, and process record and replay If the inferior is in the non-stop mode (@pxref{Non-Stop Mode}) or in the asynchronous execution mode (@pxref{Background Execution}), not all recording methods are available. The @code{full} recording method does not support these two modes. @kindex record stop @kindex rec s @item record stop Stop the process record and replay target. When process record and replay target stops, the entire execution log will be deleted and the inferior will either be terminated, or will remain in its final state. When you stop the process record and replay target in record mode (at the end of the execution log), the inferior will be stopped at the next instruction that would have been recorded. In other words, if you record for a while and then stop recording, the inferior process will be left in the same state as if the recording never happened. On the other hand, if the process record and replay target is stopped while in replay mode (that is, not at the end of the execution log, but at some earlier point), the inferior process will become ``live'' at that earlier state, and it will then be possible to continue the usual ``live'' debugging of the process from that state. When the inferior process exits, or @value{GDBN} detaches from it, process record and replay target will automatically stop itself. @kindex record save @item record save @var{filename} Save the execution log to a file @file{@var{filename}}. Default filename is @file{gdb_record.@var{process_id}}, where @var{process_id} is the process ID of the inferior. This command may not be available for all recording methods. @kindex record restore @item record restore @var{filename} Restore the execution log from a file @file{@var{filename}}. File must have been created with @code{record save}. @kindex set record full @item set record full insn-number-max @var{limit} Set the limit of instructions to be recorded for the @code{full} recording method. Default value is 200000. If @var{limit} is a positive number, then @value{GDBN} will start deleting instructions from the log once the number of the record instructions becomes greater than @var{limit}. For every new recorded instruction, @value{GDBN} will delete the earliest recorded instruction to keep the number of recorded instructions at the limit. (Since deleting recorded instructions loses information, @value{GDBN} lets you control what happens when the limit is reached, by means of the @code{stop-at-limit} option, described below.) If @var{limit} is zero, @value{GDBN} will never delete recorded instructions from the execution log. The number of recorded instructions is unlimited in this case. @kindex show record full @item show record full insn-number-max Show the limit of instructions to be recorded with the @code{full} recording method. @item set record full stop-at-limit Control the behavior of the @code{full} recording method when the number of recorded instructions reaches the limit. If ON (the default), @value{GDBN} will stop when the limit is reached for the first time and ask you whether you want to stop the inferior or continue running it and recording the execution log. If you decide to continue recording, each new recorded instruction will cause the oldest one to be deleted. If this option is OFF, @value{GDBN} will automatically delete the oldest record to make room for each new one, without asking. @item show record full stop-at-limit Show the current setting of @code{stop-at-limit}. @item set record full memory-query Control the behavior when @value{GDBN} is unable to record memory changes caused by an instruction for the @code{full} recording method. If ON, @value{GDBN} will query whether to stop the inferior in that case. If this option is OFF (the default), @value{GDBN} will automatically ignore the effect of such instructions on memory. Later, when @value{GDBN} replays this execution log, it will mark the log of this instruction as not accessible, and it will not affect the replay results. @item show record full memory-query Show the current setting of @code{memory-query}. @kindex info record @item info record Show various statistics about the recording depending on the recording method: @table @code @item full For the @code{full} recording method, it shows the state of process record and its in-memory execution log buffer, including: @itemize @bullet @item Whether in record mode or replay mode. @item Lowest recorded instruction number (counting from when the current execution log started recording instructions). @item Highest recorded instruction number. @item Current instruction about to be replayed (if in replay mode). @item Number of instructions contained in the execution log. @item Maximum number of instructions that may be contained in the execution log. @end itemize @item btrace For the @code{btrace} recording method, it shows the number of instructions that have been recorded and the number of blocks of sequential control-flow that is formed by the recorded instructions. @end table @kindex record delete @kindex rec del @item record delete When record target runs in replay mode (``in the past''), delete the subsequent execution log and begin to record a new execution log starting from the current address. This means you will abandon the previously recorded ``future'' and begin recording a new ``future''. @kindex record instruction-history @kindex rec instruction-history @item record instruction-history Disassembles instructions from the recorded execution log. By default, ten instructions are disassembled. This can be changed using the @code{set record instruction-history-size} command. Instructions are printed in execution order. There are several ways to specify what part of the execution log to disassemble: @table @code @item record instruction-history @var{insn} Disassembles ten instructions starting from instruction number @var{insn}. @item record instruction-history @var{insn}, +/-@var{n} Disassembles @var{n} instructions around instruction number @var{insn}. If @var{n} is preceded with @code{+}, disassembles @var{n} instructions after instruction number @var{insn}. If @var{n} is preceded with @code{-}, disassembles @var{n} instructions before instruction number @var{insn}. @item record instruction-history Disassembles ten more instructions after the last disassembly. @item record instruction-history - Disassembles ten more instructions before the last disassembly. @item record instruction-history @var{begin} @var{end} Disassembles instructions beginning with instruction number @var{begin} until instruction number @var{end}. The instruction number @var{end} is not included. @end table This command may not be available for all recording methods. @kindex set record @item set record instruction-history-size Define how many instructions to disassemble in the @code{record instruction-history} command. The default value is 10. @kindex show record @item show record instruction-history-size Show how many instructions to disassemble in the @code{record instruction-history} command. @kindex record function-call-history @kindex rec function-call-history @item record function-call-history Prints the execution history at function granularity. It prints one line for each sequence of instructions that belong to the same function giving the name of that function, the source lines for this instruction sequence (if the @code{/l} modifier is specified), and the instructions numbers that form the sequence (if the @code{/i} modifier is specified). @smallexample (@value{GDBP}) @b{list 1, 10} 1 void foo (void) 2 @{ 3 @} 4 5 void bar (void) 6 @{ 7 ... 8 foo (); 9 ... 10 @} (@value{GDBP}) @b{record function-call-history /l} 1 foo.c:6-8 bar 2 foo.c:2-3 foo 3 foo.c:9-10 bar @end smallexample By default, ten lines are printed. This can be changed using the @code{set record function-call-history-size} command. Functions are printed in execution order. There are several ways to specify what to print: @table @code @item record function-call-history @var{func} Prints ten functions starting from function number @var{func}. @item record function-call-history @var{func}, +/-@var{n} Prints @var{n} functions around function number @var{func}. If @var{n} is preceded with @code{+}, prints @var{n} functions after function number @var{func}. If @var{n} is preceded with @code{-}, prints @var{n} functions before function number @var{func}. @item record function-call-history Prints ten more functions after the last ten-line print. @item record function-call-history - Prints ten more functions before the last ten-line print. @item record function-call-history @var{begin} @var{end} Prints functions beginning with function number @var{begin} until function number @var{end}. The function number @var{end} is not included. @end table This command may not be available for all recording methods. @item set record function-call-history-size Define how many lines to print in the @code{record function-call-history} command. The default value is 10. @item show record function-call-history-size Show how many lines to print in the @code{record function-call-history} command. @end table @node Stack @chapter Examining the Stack When your program has stopped, the first thing you need to know is where it stopped and how it got there. @cindex call stack Each time your program performs a function call, information about the call is generated. That information includes the location of the call in your program, the arguments of the call, and the local variables of the function being called. The information is saved in a block of data called a @dfn{stack frame}. The stack frames are allocated in a region of memory called the @dfn{call stack}. When your program stops, the @value{GDBN} commands for examining the stack allow you to see all of this information. @cindex selected frame One of the stack frames is @dfn{selected} by @value{GDBN} and many @value{GDBN} commands refer implicitly to the selected frame. In particular, whenever you ask @value{GDBN} for the value of a variable in your program, the value is found in the selected frame. There are special @value{GDBN} commands to select whichever frame you are interested in. @xref{Selection, ,Selecting a Frame}. When your program stops, @value{GDBN} automatically selects the currently executing frame and describes it briefly, similar to the @code{frame} command (@pxref{Frame Info, ,Information about a Frame}). @menu * Frames:: Stack frames * Backtrace:: Backtraces * Selection:: Selecting a frame * Frame Info:: Information on a frame @end menu @node Frames @section Stack Frames @cindex frame, definition @cindex stack frame The call stack is divided up into contiguous pieces called @dfn{stack frames}, or @dfn{frames} for short; each frame is the data associated with one call to one function. The frame contains the arguments given to the function, the function's local variables, and the address at which the function is executing. @cindex initial frame @cindex outermost frame @cindex innermost frame When your program is started, the stack has only one frame, that of the function @code{main}. This is called the @dfn{initial} frame or the @dfn{outermost} frame. Each time a function is called, a new frame is made. Each time a function returns, the frame for that function invocation is eliminated. If a function is recursive, there can be many frames for the same function. The frame for the function in which execution is actually occurring is called the @dfn{innermost} frame. This is the most recently created of all the stack frames that still exist. @cindex frame pointer Inside your program, stack frames are identified by their addresses. A stack frame consists of many bytes, each of which has its own address; each kind of computer has a convention for choosing one byte whose address serves as the address of the frame. Usually this address is kept in a register called the @dfn{frame pointer register} (@pxref{Registers, $fp}) while execution is going on in that frame. @cindex frame number @value{GDBN} assigns numbers to all existing stack frames, starting with zero for the innermost frame, one for the frame that called it, and so on upward. These numbers do not really exist in your program; they are assigned by @value{GDBN} to give you a way of designating stack frames in @value{GDBN} commands. @c The -fomit-frame-pointer below perennially causes hbox overflow @c underflow problems. @cindex frameless execution Some compilers provide a way to compile functions so that they operate without stack frames. (For example, the @value{NGCC} option @smallexample @samp{-fomit-frame-pointer} @end smallexample generates functions without a frame.) This is occasionally done with heavily used library functions to save the frame setup time. @value{GDBN} has limited facilities for dealing with these function invocations. If the innermost function invocation has no stack frame, @value{GDBN} nevertheless regards it as though it had a separate frame, which is numbered zero as usual, allowing correct tracing of the function call chain. However, @value{GDBN} has no provision for frameless functions elsewhere in the stack. @table @code @kindex frame@r{, command} @cindex current stack frame @item frame @var{args} The @code{frame} command allows you to move from one stack frame to another, and to print the stack frame you select. @var{args} may be either the address of the frame or the stack frame number. Without an argument, @code{frame} prints the current stack frame. @kindex select-frame @cindex selecting frame silently @item select-frame The @code{select-frame} command allows you to move from one stack frame to another without printing the frame. This is the silent version of @code{frame}. @end table @node Backtrace @section Backtraces @cindex traceback @cindex call stack traces A backtrace is a summary of how your program got where it is. It shows one line per frame, for many frames, starting with the currently executing frame (frame zero), followed by its caller (frame one), and on up the stack. @table @code @kindex backtrace @kindex bt @r{(@code{backtrace})} @item backtrace @itemx bt Print a backtrace of the entire stack: one line per frame for all frames in the stack. You can stop the backtrace at any time by typing the system interrupt character, normally @kbd{Ctrl-c}. @item backtrace @var{n} @itemx bt @var{n} Similar, but print only the innermost @var{n} frames. @item backtrace -@var{n} @itemx bt -@var{n} Similar, but print only the outermost @var{n} frames. @item backtrace full @itemx bt full @itemx bt full @var{n} @itemx bt full -@var{n} Print the values of the local variables also. @var{n} specifies the number of frames to print, as described above. @end table @kindex where @kindex info stack The names @code{where} and @code{info stack} (abbreviated @code{info s}) are additional aliases for @code{backtrace}. @cindex multiple threads, backtrace In a multi-threaded program, @value{GDBN} by default shows the backtrace only for the current thread. To display the backtrace for several or all of the threads, use the command @code{thread apply} (@pxref{Threads, thread apply}). For example, if you type @kbd{thread apply all backtrace}, @value{GDBN} will display the backtrace for all the threads; this is handy when you debug a core dump of a multi-threaded program. Each line in the backtrace shows the frame number and the function name. The program counter value is also shown---unless you use @code{set print address off}. The backtrace also shows the source file name and line number, as well as the arguments to the function. The program counter value is omitted if it is at the beginning of the code for that line number. Here is an example of a backtrace. It was made with the command @samp{bt 3}, so it shows the innermost three frames. @smallexample @group #0 m4_traceon (obs=0x24eb0, argc=1, argv=0x2b8c8) at builtin.c:993 #1 0x6e38 in expand_macro (sym=0x2b600, data=...) at macro.c:242 #2 0x6840 in expand_token (obs=0x0, t=177664, td=0xf7fffb08) at macro.c:71 (More stack frames follow...) @end group @end smallexample @noindent The display for frame zero does not begin with a program counter value, indicating that your program has stopped at the beginning of the code for line @code{993} of @code{builtin.c}. @noindent The value of parameter @code{data} in frame 1 has been replaced by @code{@dots{}}. By default, @value{GDBN} prints the value of a parameter only if it is a scalar (integer, pointer, enumeration, etc). See command @kbd{set print frame-arguments} in @ref{Print Settings} for more details on how to configure the way function parameter values are printed. @cindex optimized out, in backtrace @cindex function call arguments, optimized out If your program was compiled with optimizations, some compilers will optimize away arguments passed to functions if those arguments are never used after the call. Such optimizations generate code that passes arguments through registers, but doesn't store those arguments in the stack frame. @value{GDBN} has no way of displaying such arguments in stack frames other than the innermost one. Here's what such a backtrace might look like: @smallexample @group #0 m4_traceon (obs=0x24eb0, argc=1, argv=0x2b8c8) at builtin.c:993 #1 0x6e38 in expand_macro (sym=) at macro.c:242 #2 0x6840 in expand_token (obs=0x0, t=, td=0xf7fffb08) at macro.c:71 (More stack frames follow...) @end group @end smallexample @noindent The values of arguments that were not saved in their stack frames are shown as @samp{}. If you need to display the values of such optimized-out arguments, either deduce that from other variables whose values depend on the one you are interested in, or recompile without optimizations. @cindex backtrace beyond @code{main} function @cindex program entry point @cindex startup code, and backtrace Most programs have a standard user entry point---a place where system libraries and startup code transition into user code. For C this is @code{main}@footnote{ Note that embedded programs (the so-called ``free-standing'' environment) are not required to have a @code{main} function as the entry point. They could even have multiple entry points.}. When @value{GDBN} finds the entry function in a backtrace it will terminate the backtrace, to avoid tracing into highly system-specific (and generally uninteresting) code. If you need to examine the startup code, or limit the number of levels in a backtrace, you can change this behavior: @table @code @item set backtrace past-main @itemx set backtrace past-main on @kindex set backtrace Backtraces will continue past the user entry point. @item set backtrace past-main off Backtraces will stop when they encounter the user entry point. This is the default. @item show backtrace past-main @kindex show backtrace Display the current user entry point backtrace policy. @item set backtrace past-entry @itemx set backtrace past-entry on Backtraces will continue past the internal entry point of an application. This entry point is encoded by the linker when the application is built, and is likely before the user entry point @code{main} (or equivalent) is called. @item set backtrace past-entry off Backtraces will stop when they encounter the internal entry point of an application. This is the default. @item show backtrace past-entry Display the current internal entry point backtrace policy. @item set backtrace limit @var{n} @itemx set backtrace limit 0 @cindex backtrace limit Limit the backtrace to @var{n} levels. A value of zero means unlimited. @item show backtrace limit Display the current limit on backtrace levels. @end table You can control how file names are displayed. @table @code @item set filename-display @itemx set filename-display relative @cindex filename-display Display file names relative to the compilation directory. This is the default. @item set filename-display basename Display only basename of a filename. @item set filename-display absolute Display an absolute filename. @item show filename-display Show the current way to display filenames. @end table @node Selection @section Selecting a Frame Most commands for examining the stack and other data in your program work on whichever stack frame is selected at the moment. Here are the commands for selecting a stack frame; all of them finish by printing a brief description of the stack frame just selected. @table @code @kindex frame@r{, selecting} @kindex f @r{(@code{frame})} @item frame @var{n} @itemx f @var{n} Select frame number @var{n}. Recall that frame zero is the innermost (currently executing) frame, frame one is the frame that called the innermost one, and so on. The highest-numbered frame is the one for @code{main}. @item frame @var{addr} @itemx f @var{addr} Select the frame at address @var{addr}. This is useful mainly if the chaining of stack frames has been damaged by a bug, making it impossible for @value{GDBN} to assign numbers properly to all frames. In addition, this can be useful when your program has multiple stacks and switches between them. On the SPARC architecture, @code{frame} needs two addresses to select an arbitrary frame: a frame pointer and a stack pointer. On the @acronym{MIPS} and Alpha architecture, it needs two addresses: a stack pointer and a program counter. On the 29k architecture, it needs three addresses: a register stack pointer, a program counter, and a memory stack pointer. @kindex up @item up @var{n} Move @var{n} frames up the stack. For positive numbers @var{n}, this advances toward the outermost frame, to higher frame numbers, to frames that have existed longer. @var{n} defaults to one. @kindex down @kindex do @r{(@code{down})} @item down @var{n} Move @var{n} frames down the stack. For positive numbers @var{n}, this advances toward the innermost frame, to lower frame numbers, to frames that were created more recently. @var{n} defaults to one. You may abbreviate @code{down} as @code{do}. @end table All of these commands end by printing two lines of output describing the frame. The first line shows the frame number, the function name, the arguments, and the source file and line number of execution in that frame. The second line shows the text of that source line. @need 1000 For example: @smallexample @group (@value{GDBP}) up #1 0x22f0 in main (argc=1, argv=0xf7fffbf4, env=0xf7fffbfc) at env.c:10 10 read_input_file (argv[i]); @end group @end smallexample After such a printout, the @code{list} command with no arguments prints ten lines centered on the point of execution in the frame. You can also edit the program at the point of execution with your favorite editing program by typing @code{edit}. @xref{List, ,Printing Source Lines}, for details. @table @code @kindex down-silently @kindex up-silently @item up-silently @var{n} @itemx down-silently @var{n} These two commands are variants of @code{up} and @code{down}, respectively; they differ in that they do their work silently, without causing display of the new frame. They are intended primarily for use in @value{GDBN} command scripts, where the output might be unnecessary and distracting. @end table @node Frame Info @section Information About a Frame There are several other commands to print information about the selected stack frame. @table @code @item frame @itemx f When used without any argument, this command does not change which frame is selected, but prints a brief description of the currently selected stack frame. It can be abbreviated @code{f}. With an argument, this command is used to select a stack frame. @xref{Selection, ,Selecting a Frame}. @kindex info frame @kindex info f @r{(@code{info frame})} @item info frame @itemx info f This command prints a verbose description of the selected stack frame, including: @itemize @bullet @item the address of the frame @item the address of the next frame down (called by this frame) @item the address of the next frame up (caller of this frame) @item the language in which the source code corresponding to this frame is written @item the address of the frame's arguments @item the address of the frame's local variables @item the program counter saved in it (the address of execution in the caller frame) @item which registers were saved in the frame @end itemize @noindent The verbose description is useful when something has gone wrong that has made the stack format fail to fit the usual conventions. @item info frame @var{addr} @itemx info f @var{addr} Print a verbose description of the frame at address @var{addr}, without selecting that frame. The selected frame remains unchanged by this command. This requires the same kind of address (more than one for some architectures) that you specify in the @code{frame} command. @xref{Selection, ,Selecting a Frame}. @kindex info args @item info args Print the arguments of the selected frame, each on a separate line. @item info locals @kindex info locals Print the local variables of the selected frame, each on a separate line. These are all variables (declared either static or automatic) accessible at the point of execution of the selected frame. @end table @node Source @chapter Examining Source Files @value{GDBN} can print parts of your program's source, since the debugging information recorded in the program tells @value{GDBN} what source files were used to build it. When your program stops, @value{GDBN} spontaneously prints the line where it stopped. Likewise, when you select a stack frame (@pxref{Selection, ,Selecting a Frame}), @value{GDBN} prints the line where execution in that frame has stopped. You can print other portions of source files by explicit command. If you use @value{GDBN} through its @sc{gnu} Emacs interface, you may prefer to use Emacs facilities to view source; see @ref{Emacs, ,Using @value{GDBN} under @sc{gnu} Emacs}. @menu * List:: Printing source lines * Specify Location:: How to specify code locations * Edit:: Editing source files * Search:: Searching source files * Source Path:: Specifying source directories * Machine Code:: Source and machine code @end menu @node List @section Printing Source Lines @kindex list @kindex l @r{(@code{list})} To print lines from a source file, use the @code{list} command (abbreviated @code{l}). By default, ten lines are printed. There are several ways to specify what part of the file you want to print; see @ref{Specify Location}, for the full list. Here are the forms of the @code{list} command most commonly used: @table @code @item list @var{linenum} Print lines centered around line number @var{linenum} in the current source file. @item list @var{function} Print lines centered around the beginning of function @var{function}. @item list Print more lines. If the last lines printed were printed with a @code{list} command, this prints lines following the last lines printed; however, if the last line printed was a solitary line printed as part of displaying a stack frame (@pxref{Stack, ,Examining the Stack}), this prints lines centered around that line. @item list - Print lines just before the lines last printed. @end table @cindex @code{list}, how many lines to display By default, @value{GDBN} prints ten source lines with any of these forms of the @code{list} command. You can change this using @code{set listsize}: @table @code @kindex set listsize @item set listsize @var{count} Make the @code{list} command display @var{count} source lines (unless the @code{list} argument explicitly specifies some other number). Setting @var{count} to 0 means there's no limit. @kindex show listsize @item show listsize Display the number of lines that @code{list} prints. @end table Repeating a @code{list} command with @key{RET} discards the argument, so it is equivalent to typing just @code{list}. This is more useful than listing the same lines again. An exception is made for an argument of @samp{-}; that argument is preserved in repetition so that each repetition moves up in the source file. In general, the @code{list} command expects you to supply zero, one or two @dfn{linespecs}. Linespecs specify source lines; there are several ways of writing them (@pxref{Specify Location}), but the effect is always to specify some source line. Here is a complete description of the possible arguments for @code{list}: @table @code @item list @var{linespec} Print lines centered around the line specified by @var{linespec}. @item list @var{first},@var{last} Print lines from @var{first} to @var{last}. Both arguments are linespecs. When a @code{list} command has two linespecs, and the source file of the second linespec is omitted, this refers to the same source file as the first linespec. @item list ,@var{last} Print lines ending with @var{last}. @item list @var{first}, Print lines starting with @var{first}. @item list + Print lines just after the lines last printed. @item list - Print lines just before the lines last printed. @item list As described in the preceding table. @end table @node Specify Location @section Specifying a Location @cindex specifying location @cindex linespec Several @value{GDBN} commands accept arguments that specify a location of your program's code. Since @value{GDBN} is a source-level debugger, a location usually specifies some line in the source code; for that reason, locations are also known as @dfn{linespecs}. Here are all the different ways of specifying a code location that @value{GDBN} understands: @table @code @item @var{linenum} Specifies the line number @var{linenum} of the current source file. @item -@var{offset} @itemx +@var{offset} Specifies the line @var{offset} lines before or after the @dfn{current line}. For the @code{list} command, the current line is the last one printed; for the breakpoint commands, this is the line at which execution stopped in the currently selected @dfn{stack frame} (@pxref{Frames, ,Frames}, for a description of stack frames.) When used as the second of the two linespecs in a @code{list} command, this specifies the line @var{offset} lines up or down from the first linespec. @item @var{filename}:@var{linenum} Specifies the line @var{linenum} in the source file @var{filename}. If @var{filename} is a relative file name, then it will match any source file name with the same trailing components. For example, if @var{filename} is @samp{gcc/expr.c}, then it will match source file name of @file{/build/trunk/gcc/expr.c}, but not @file{/build/trunk/libcpp/expr.c} or @file{/build/trunk/gcc/x-expr.c}. @item @var{function} Specifies the line that begins the body of the function @var{function}. For example, in C, this is the line with the open brace. @item @var{function}:@var{label} Specifies the line where @var{label} appears in @var{function}. @item @var{filename}:@var{function} Specifies the line that begins the body of the function @var{function} in the file @var{filename}. You only need the file name with a function name to avoid ambiguity when there are identically named functions in different source files. @item @var{label} Specifies the line at which the label named @var{label} appears. @value{GDBN} searches for the label in the function corresponding to the currently selected stack frame. If there is no current selected stack frame (for instance, if the inferior is not running), then @value{GDBN} will not search for a label. @item *@var{address} Specifies the program address @var{address}. For line-oriented commands, such as @code{list} and @code{edit}, this specifies a source line that contains @var{address}. For @code{break} and other breakpoint oriented commands, this can be used to set breakpoints in parts of your program which do not have debugging information or source files. Here @var{address} may be any expression valid in the current working language (@pxref{Languages, working language}) that specifies a code address. In addition, as a convenience, @value{GDBN} extends the semantics of expressions used in locations to cover the situations that frequently happen during debugging. Here are the various forms of @var{address}: @table @code @item @var{expression} Any expression valid in the current working language. @item @var{funcaddr} An address of a function or procedure derived from its name. In C, C@t{++}, Java, Objective-C, Fortran, minimal, and assembly, this is simply the function's name @var{function} (and actually a special case of a valid expression). In Pascal and Modula-2, this is @code{&@var{function}}. In Ada, this is @code{@var{function}'Address} (although the Pascal form also works). This form specifies the address of the function's first instruction, before the stack frame and arguments have been set up. @item '@var{filename}'::@var{funcaddr} Like @var{funcaddr} above, but also specifies the name of the source file explicitly. This is useful if the name of the function does not specify the function unambiguously, e.g., if there are several functions with identical names in different source files. @end table @cindex breakpoint at static probe point @item -pstap|-probe-stap @r{[}@var{objfile}:@r{[}@var{provider}:@r{]}@r{]}@var{name} The @sc{gnu}/Linux tool @code{SystemTap} provides a way for applications to embed static probes. @xref{Static Probe Points}, for more information on finding and using static probes. This form of linespec specifies the location of such a static probe. If @var{objfile} is given, only probes coming from that shared library or executable matching @var{objfile} as a regular expression are considered. If @var{provider} is given, then only probes from that provider are considered. If several probes match the spec, @value{GDBN} will insert a breakpoint at each one of those probes. @end table @node Edit @section Editing Source Files @cindex editing source files @kindex edit @kindex e @r{(@code{edit})} To edit the lines in a source file, use the @code{edit} command. The editing program of your choice is invoked with the current line set to the active line in the program. Alternatively, there are several ways to specify what part of the file you want to print if you want to see other parts of the program: @table @code @item edit @var{location} Edit the source file specified by @code{location}. Editing starts at that @var{location}, e.g., at the specified source line of the specified file. @xref{Specify Location}, for all the possible forms of the @var{location} argument; here are the forms of the @code{edit} command most commonly used: @table @code @item edit @var{number} Edit the current source file with @var{number} as the active line number. @item edit @var{function} Edit the file containing @var{function} at the beginning of its definition. @end table @end table @subsection Choosing your Editor You can customize @value{GDBN} to use any editor you want @footnote{ The only restriction is that your editor (say @code{ex}), recognizes the following command-line syntax: @smallexample ex +@var{number} file @end smallexample The optional numeric value +@var{number} specifies the number of the line in the file where to start editing.}. By default, it is @file{@value{EDITOR}}, but you can change this by setting the environment variable @code{EDITOR} before using @value{GDBN}. For example, to configure @value{GDBN} to use the @code{vi} editor, you could use these commands with the @code{sh} shell: @smallexample EDITOR=/usr/bin/vi export EDITOR gdb @dots{} @end smallexample or in the @code{csh} shell, @smallexample setenv EDITOR /usr/bin/vi gdb @dots{} @end smallexample @node Search @section Searching Source Files @cindex searching source files There are two commands for searching through the current source file for a regular expression. @table @code @kindex search @kindex forward-search @kindex fo @r{(@code{forward-search})} @item forward-search @var{regexp} @itemx search @var{regexp} The command @samp{forward-search @var{regexp}} checks each line, starting with the one following the last line listed, for a match for @var{regexp}. It lists the line that is found. You can use the synonym @samp{search @var{regexp}} or abbreviate the command name as @code{fo}. @kindex reverse-search @item reverse-search @var{regexp} The command @samp{reverse-search @var{regexp}} checks each line, starting with the one before the last line listed and going backward, for a match for @var{regexp}. It lists the line that is found. You can abbreviate this command as @code{rev}. @end table @node Source Path @section Specifying Source Directories @cindex source path @cindex directories for source files Executable programs sometimes do not record the directories of the source files from which they were compiled, just the names. Even when they do, the directories could be moved between the compilation and your debugging session. @value{GDBN} has a list of directories to search for source files; this is called the @dfn{source path}. Each time @value{GDBN} wants a source file, it tries all the directories in the list, in the order they are present in the list, until it finds a file with the desired name. For example, suppose an executable references the file @file{/usr/src/foo-1.0/lib/foo.c}, and our source path is @file{/mnt/cross}. The file is first looked up literally; if this fails, @file{/mnt/cross/usr/src/foo-1.0/lib/foo.c} is tried; if this fails, @file{/mnt/cross/foo.c} is opened; if this fails, an error message is printed. @value{GDBN} does not look up the parts of the source file name, such as @file{/mnt/cross/src/foo-1.0/lib/foo.c}. Likewise, the subdirectories of the source path are not searched: if the source path is @file{/mnt/cross}, and the binary refers to @file{foo.c}, @value{GDBN} would not find it under @file{/mnt/cross/usr/src/foo-1.0/lib}. Plain file names, relative file names with leading directories, file names containing dots, etc.@: are all treated as described above; for instance, if the source path is @file{/mnt/cross}, and the source file is recorded as @file{../lib/foo.c}, @value{GDBN} would first try @file{../lib/foo.c}, then @file{/mnt/cross/../lib/foo.c}, and after that---@file{/mnt/cross/foo.c}. Note that the executable search path is @emph{not} used to locate the source files. Whenever you reset or rearrange the source path, @value{GDBN} clears out any information it has cached about where source files are found and where each line is in the file. @kindex directory @kindex dir When you start @value{GDBN}, its source path includes only @samp{cdir} and @samp{cwd}, in that order. To add other directories, use the @code{directory} command. The search path is used to find both program source files and @value{GDBN} script files (read using the @samp{-command} option and @samp{source} command). In addition to the source path, @value{GDBN} provides a set of commands that manage a list of source path substitution rules. A @dfn{substitution rule} specifies how to rewrite source directories stored in the program's debug information in case the sources were moved to a different directory between compilation and debugging. A rule is made of two strings, the first specifying what needs to be rewritten in the path, and the second specifying how it should be rewritten. In @ref{set substitute-path}, we name these two parts @var{from} and @var{to} respectively. @value{GDBN} does a simple string replacement of @var{from} with @var{to} at the start of the directory part of the source file name, and uses that result instead of the original file name to look up the sources. Using the previous example, suppose the @file{foo-1.0} tree has been moved from @file{/usr/src} to @file{/mnt/cross}, then you can tell @value{GDBN} to replace @file{/usr/src} in all source path names with @file{/mnt/cross}. The first lookup will then be @file{/mnt/cross/foo-1.0/lib/foo.c} in place of the original location of @file{/usr/src/foo-1.0/lib/foo.c}. To define a source path substitution rule, use the @code{set substitute-path} command (@pxref{set substitute-path}). To avoid unexpected substitution results, a rule is applied only if the @var{from} part of the directory name ends at a directory separator. For instance, a rule substituting @file{/usr/source} into @file{/mnt/cross} will be applied to @file{/usr/source/foo-1.0} but not to @file{/usr/sourceware/foo-2.0}. And because the substitution is applied only at the beginning of the directory name, this rule will not be applied to @file{/root/usr/source/baz.c} either. In many cases, you can achieve the same result using the @code{directory} command. However, @code{set substitute-path} can be more efficient in the case where the sources are organized in a complex tree with multiple subdirectories. With the @code{directory} command, you need to add each subdirectory of your project. If you moved the entire tree while preserving its internal organization, then @code{set substitute-path} allows you to direct the debugger to all the sources with one single command. @code{set substitute-path} is also more than just a shortcut command. The source path is only used if the file at the original location no longer exists. On the other hand, @code{set substitute-path} modifies the debugger behavior to look at the rewritten location instead. So, if for any reason a source file that is not relevant to your executable is located at the original location, a substitution rule is the only method available to point @value{GDBN} at the new location. @cindex @samp{--with-relocated-sources} @cindex default source path substitution You can configure a default source path substitution rule by configuring @value{GDBN} with the @samp{--with-relocated-sources=@var{dir}} option. The @var{dir} should be the name of a directory under @value{GDBN}'s configured prefix (set with @samp{--prefix} or @samp{--exec-prefix}), and directory names in debug information under @var{dir} will be adjusted automatically if the installed @value{GDBN} is moved to a new location. This is useful if @value{GDBN}, libraries or executables with debug information and corresponding source code are being moved together. @table @code @item directory @var{dirname} @dots{} @item dir @var{dirname} @dots{} Add directory @var{dirname} to the front of the source path. Several directory names may be given to this command, separated by @samp{:} (@samp{;} on MS-DOS and MS-Windows, where @samp{:} usually appears as part of absolute file names) or whitespace. You may specify a directory that is already in the source path; this moves it forward, so @value{GDBN} searches it sooner. @kindex cdir @kindex cwd @vindex $cdir@r{, convenience variable} @vindex $cwd@r{, convenience variable} @cindex compilation directory @cindex current directory @cindex working directory @cindex directory, current @cindex directory, compilation You can use the string @samp{$cdir} to refer to the compilation directory (if one is recorded), and @samp{$cwd} to refer to the current working directory. @samp{$cwd} is not the same as @samp{.}---the former tracks the current working directory as it changes during your @value{GDBN} session, while the latter is immediately expanded to the current directory at the time you add an entry to the source path. @item directory Reset the source path to its default value (@samp{$cdir:$cwd} on Unix systems). This requires confirmation. @c RET-repeat for @code{directory} is explicitly disabled, but since @c repeating it would be a no-op we do not say that. (thanks to RMS) @item set directories @var{path-list} @kindex set directories Set the source path to @var{path-list}. @samp{$cdir:$cwd} are added if missing. @item show directories @kindex show directories Print the source path: show which directories it contains. @anchor{set substitute-path} @item set substitute-path @var{from} @var{to} @kindex set substitute-path Define a source path substitution rule, and add it at the end of the current list of existing substitution rules. If a rule with the same @var{from} was already defined, then the old rule is also deleted. For example, if the file @file{/foo/bar/baz.c} was moved to @file{/mnt/cross/baz.c}, then the command @smallexample (@value{GDBP}) set substitute-path /usr/src /mnt/cross @end smallexample @noindent will tell @value{GDBN} to replace @samp{/usr/src} with @samp{/mnt/cross}, which will allow @value{GDBN} to find the file @file{baz.c} even though it was moved. In the case when more than one substitution rule have been defined, the rules are evaluated one by one in the order where they have been defined. The first one matching, if any, is selected to perform the substitution. For instance, if we had entered the following commands: @smallexample (@value{GDBP}) set substitute-path /usr/src/include /mnt/include (@value{GDBP}) set substitute-path /usr/src /mnt/src @end smallexample @noindent @value{GDBN} would then rewrite @file{/usr/src/include/defs.h} into @file{/mnt/include/defs.h} by using the first rule. However, it would use the second rule to rewrite @file{/usr/src/lib/foo.c} into @file{/mnt/src/lib/foo.c}. @item unset substitute-path [path] @kindex unset substitute-path If a path is specified, search the current list of substitution rules for a rule that would rewrite that path. Delete that rule if found. A warning is emitted by the debugger if no rule could be found. If no path is specified, then all substitution rules are deleted. @item show substitute-path [path] @kindex show substitute-path If a path is specified, then print the source path substitution rule which would rewrite that path, if any. If no path is specified, then print all existing source path substitution rules. @end table If your source path is cluttered with directories that are no longer of interest, @value{GDBN} may sometimes cause confusion by finding the wrong versions of source. You can correct the situation as follows: @enumerate @item Use @code{directory} with no argument to reset the source path to its default value. @item Use @code{directory} with suitable arguments to reinstall the directories you want in the source path. You can add all the directories in one command. @end enumerate @node Machine Code @section Source and Machine Code @cindex source line and its code address You can use the command @code{info line} to map source lines to program addresses (and vice versa), and the command @code{disassemble} to display a range of addresses as machine instructions. You can use the command @code{set disassemble-next-line} to set whether to disassemble next source line when execution stops. When run under @sc{gnu} Emacs mode, the @code{info line} command causes the arrow to point to the line specified. Also, @code{info line} prints addresses in symbolic form as well as hex. @table @code @kindex info line @item info line @var{linespec} Print the starting and ending addresses of the compiled code for source line @var{linespec}. You can specify source lines in any of the ways documented in @ref{Specify Location}. @end table For example, we can use @code{info line} to discover the location of the object code for the first line of function @code{m4_changequote}: @c FIXME: I think this example should also show the addresses in @c symbolic form, as they usually would be displayed. @smallexample (@value{GDBP}) info line m4_changequote Line 895 of "builtin.c" starts at pc 0x634c and ends at 0x6350. @end smallexample @noindent @cindex code address and its source line We can also inquire (using @code{*@var{addr}} as the form for @var{linespec}) what source line covers a particular address: @smallexample (@value{GDBP}) info line *0x63ff Line 926 of "builtin.c" starts at pc 0x63e4 and ends at 0x6404. @end smallexample @cindex @code{$_} and @code{info line} @cindex @code{x} command, default address @kindex x@r{(examine), and} info line After @code{info line}, the default address for the @code{x} command is changed to the starting address of the line, so that @samp{x/i} is sufficient to begin examining the machine code (@pxref{Memory, ,Examining Memory}). Also, this address is saved as the value of the convenience variable @code{$_} (@pxref{Convenience Vars, ,Convenience Variables}). @table @code @kindex disassemble @cindex assembly instructions @cindex instructions, assembly @cindex machine instructions @cindex listing machine instructions @item disassemble @itemx disassemble /m @itemx disassemble /r This specialized command dumps a range of memory as machine instructions. It can also print mixed source+disassembly by specifying the @code{/m} modifier and print the raw instructions in hex as well as in symbolic form by specifying the @code{/r}. The default memory range is the function surrounding the program counter of the selected frame. A single argument to this command is a program counter value; @value{GDBN} dumps the function surrounding this value. When two arguments are given, they should be separated by a comma, possibly surrounded by whitespace. The arguments specify a range of addresses to dump, in one of two forms: @table @code @item @var{start},@var{end} the addresses from @var{start} (inclusive) to @var{end} (exclusive) @item @var{start},+@var{length} the addresses from @var{start} (inclusive) to @code{@var{start}+@var{length}} (exclusive). @end table @noindent When 2 arguments are specified, the name of the function is also printed (since there could be several functions in the given range). The argument(s) can be any expression yielding a numeric value, such as @samp{0x32c4}, @samp{&main+10} or @samp{$pc - 8}. If the range of memory being disassembled contains current program counter, the instruction at that location is shown with a @code{=>} marker. @end table The following example shows the disassembly of a range of addresses of HP PA-RISC 2.0 code: @smallexample (@value{GDBP}) disas 0x32c4, 0x32e4 Dump of assembler code from 0x32c4 to 0x32e4: 0x32c4 : addil 0,dp 0x32c8 : ldw 0x22c(sr0,r1),r26 0x32cc : ldil 0x3000,r31 0x32d0 : ble 0x3f8(sr4,r31) 0x32d4 : ldo 0(r31),rp 0x32d8 : addil -0x800,dp 0x32dc : ldo 0x588(r1),r26 0x32e0 : ldil 0x3000,r31 End of assembler dump. @end smallexample Here is an example showing mixed source+assembly for Intel x86, when the program is stopped just after function prologue: @smallexample (@value{GDBP}) disas /m main Dump of assembler code for function main: 5 @{ 0x08048330 <+0>: push %ebp 0x08048331 <+1>: mov %esp,%ebp 0x08048333 <+3>: sub $0x8,%esp 0x08048336 <+6>: and $0xfffffff0,%esp 0x08048339 <+9>: sub $0x10,%esp 6 printf ("Hello.\n"); => 0x0804833c <+12>: movl $0x8048440,(%esp) 0x08048343 <+19>: call 0x8048284 7 return 0; 8 @} 0x08048348 <+24>: mov $0x0,%eax 0x0804834d <+29>: leave 0x0804834e <+30>: ret End of assembler dump. @end smallexample Here is another example showing raw instructions in hex for AMD x86-64, @smallexample (gdb) disas /r 0x400281,+10 Dump of assembler code from 0x400281 to 0x40028b: 0x0000000000400281: 38 36 cmp %dh,(%rsi) 0x0000000000400283: 2d 36 34 2e 73 sub $0x732e3436,%eax 0x0000000000400288: 6f outsl %ds:(%rsi),(%dx) 0x0000000000400289: 2e 32 00 xor %cs:(%rax),%al End of assembler dump. @end smallexample Addresses cannot be specified as a linespec (@pxref{Specify Location}). So, for example, if you want to disassemble function @code{bar} in file @file{foo.c}, you must type @samp{disassemble 'foo.c'::bar} and not @samp{disassemble foo.c:bar}. Some architectures have more than one commonly-used set of instruction mnemonics or other syntax. For programs that were dynamically linked and use shared libraries, instructions that call functions or branch to locations in the shared libraries might show a seemingly bogus location---it's actually a location of the relocation table. On some architectures, @value{GDBN} might be able to resolve these to actual function names. @table @code @kindex set disassembly-flavor @cindex Intel disassembly flavor @cindex AT&T disassembly flavor @item set disassembly-flavor @var{instruction-set} Select the instruction set to use when disassembling the program via the @code{disassemble} or @code{x/i} commands. Currently this command is only defined for the Intel x86 family. You can set @var{instruction-set} to either @code{intel} or @code{att}. The default is @code{att}, the AT&T flavor used by default by Unix assemblers for x86-based targets. @kindex show disassembly-flavor @item show disassembly-flavor Show the current setting of the disassembly flavor. @end table @table @code @kindex set disassemble-next-line @kindex show disassemble-next-line @item set disassemble-next-line @itemx show disassemble-next-line Control whether or not @value{GDBN} will disassemble the next source line or instruction when execution stops. If ON, @value{GDBN} will display disassembly of the next source line when execution of the program being debugged stops. This is @emph{in addition} to displaying the source line itself, which @value{GDBN} always does if possible. If the next source line cannot be displayed for some reason (e.g., if @value{GDBN} cannot find the source file, or there's no line info in the debug info), @value{GDBN} will display disassembly of the next @emph{instruction} instead of showing the next source line. If AUTO, @value{GDBN} will display disassembly of next instruction only if the source line cannot be displayed. This setting causes @value{GDBN} to display some feedback when you step through a function with no line info or whose source file is unavailable. The default is OFF, which means never display the disassembly of the next line or instruction. @end table @node Data @chapter Examining Data @cindex printing data @cindex examining data @kindex print @kindex inspect The usual way to examine data in your program is with the @code{print} command (abbreviated @code{p}), or its synonym @code{inspect}. It evaluates and prints the value of an expression of the language your program is written in (@pxref{Languages, ,Using @value{GDBN} with Different Languages}). It may also print the expression using a Python-based pretty-printer (@pxref{Pretty Printing}). @table @code @item print @var{expr} @itemx print /@var{f} @var{expr} @var{expr} is an expression (in the source language). By default the value of @var{expr} is printed in a format appropriate to its data type; you can choose a different format by specifying @samp{/@var{f}}, where @var{f} is a letter specifying the format; see @ref{Output Formats,,Output Formats}. @item print @itemx print /@var{f} @cindex reprint the last value If you omit @var{expr}, @value{GDBN} displays the last value again (from the @dfn{value history}; @pxref{Value History, ,Value History}). This allows you to conveniently inspect the same value in an alternative format. @end table A more low-level way of examining data is with the @code{x} command. It examines data in memory at a specified address and prints it in a specified format. @xref{Memory, ,Examining Memory}. If you are interested in information about types, or about how the fields of a struct or a class are declared, use the @code{ptype @var{exp}} command rather than @code{print}. @xref{Symbols, ,Examining the Symbol Table}. @cindex exploring hierarchical data structures @kindex explore Another way of examining values of expressions and type information is through the Python extension command @code{explore} (available only if the @value{GDBN} build is configured with @code{--with-python}). It offers an interactive way to start at the highest level (or, the most abstract level) of the data type of an expression (or, the data type itself) and explore all the way down to leaf scalar values/fields embedded in the higher level data types. @table @code @item explore @var{arg} @var{arg} is either an expression (in the source language), or a type visible in the current context of the program being debugged. @end table The working of the @code{explore} command can be illustrated with an example. If a data type @code{struct ComplexStruct} is defined in your C program as @smallexample struct SimpleStruct @{ int i; double d; @}; struct ComplexStruct @{ struct SimpleStruct *ss_p; int arr[10]; @}; @end smallexample @noindent followed by variable declarations as @smallexample struct SimpleStruct ss = @{ 10, 1.11 @}; struct ComplexStruct cs = @{ &ss, @{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 @} @}; @end smallexample @noindent then, the value of the variable @code{cs} can be explored using the @code{explore} command as follows. @smallexample (gdb) explore cs The value of `cs' is a struct/class of type `struct ComplexStruct' with the following fields: ss_p = arr = Enter the field number of choice: @end smallexample @noindent Since the fields of @code{cs} are not scalar values, you are being prompted to chose the field you want to explore. Let's say you choose the field @code{ss_p} by entering @code{0}. Then, since this field is a pointer, you will be asked if it is pointing to a single value. From the declaration of @code{cs} above, it is indeed pointing to a single value, hence you enter @code{y}. If you enter @code{n}, then you will be asked if it were pointing to an array of values, in which case this field will be explored as if it were an array. @smallexample `cs.ss_p' is a pointer to a value of type `struct SimpleStruct' Continue exploring it as a pointer to a single value [y/n]: y The value of `*(cs.ss_p)' is a struct/class of type `struct SimpleStruct' with the following fields: i = 10 .. (Value of type `int') d = 1.1100000000000001 .. (Value of type `double') Press enter to return to parent value: @end smallexample @noindent If the field @code{arr} of @code{cs} was chosen for exploration by entering @code{1} earlier, then since it is as array, you will be prompted to enter the index of the element in the array that you want to explore. @smallexample `cs.arr' is an array of `int'. Enter the index of the element you want to explore in `cs.arr': 5 `(cs.arr)[5]' is a scalar value of type `int'. (cs.arr)[5] = 4 Press enter to return to parent value: @end smallexample In general, at any stage of exploration, you can go deeper towards the leaf values by responding to the prompts appropriately, or hit the return key to return to the enclosing data structure (the @i{higher} level data structure). Similar to exploring values, you can use the @code{explore} command to explore types. Instead of specifying a value (which is typically a variable name or an expression valid in the current context of the program being debugged), you specify a type name. If you consider the same example as above, your can explore the type @code{struct ComplexStruct} by passing the argument @code{struct ComplexStruct} to the @code{explore} command. @smallexample (gdb) explore struct ComplexStruct @end smallexample @noindent By responding to the prompts appropriately in the subsequent interactive session, you can explore the type @code{struct ComplexStruct} in a manner similar to how the value @code{cs} was explored in the above example. The @code{explore} command also has two sub-commands, @code{explore value} and @code{explore type}. The former sub-command is a way to explicitly specify that value exploration of the argument is being invoked, while the latter is a way to explicitly specify that type exploration of the argument is being invoked. @table @code @item explore value @var{expr} @cindex explore value This sub-command of @code{explore} explores the value of the expression @var{expr} (if @var{expr} is an expression valid in the current context of the program being debugged). The behavior of this command is identical to that of the behavior of the @code{explore} command being passed the argument @var{expr}. @item explore type @var{arg} @cindex explore type This sub-command of @code{explore} explores the type of @var{arg} (if @var{arg} is a type visible in the current context of program being debugged), or the type of the value/expression @var{arg} (if @var{arg} is an expression valid in the current context of the program being debugged). If @var{arg} is a type, then the behavior of this command is identical to that of the @code{explore} command being passed the argument @var{arg}. If @var{arg} is an expression, then the behavior of this command will be identical to that of the @code{explore} command being passed the type of @var{arg} as the argument. @end table @menu * Expressions:: Expressions * Ambiguous Expressions:: Ambiguous Expressions * Variables:: Program variables * Arrays:: Artificial arrays * Output Formats:: Output formats * Memory:: Examining memory * Auto Display:: Automatic display * Print Settings:: Print settings * Pretty Printing:: Python pretty printing * Value History:: Value history * Convenience Vars:: Convenience variables * Convenience Funs:: Convenience functions * Registers:: Registers * Floating Point Hardware:: Floating point hardware * Vector Unit:: Vector Unit * OS Information:: Auxiliary data provided by operating system * Memory Region Attributes:: Memory region attributes * Dump/Restore Files:: Copy between memory and a file * Core File Generation:: Cause a program dump its core * Character Sets:: Debugging programs that use a different character set than GDB does * Caching Remote Data:: Data caching for remote targets * Searching Memory:: Searching memory for a sequence of bytes @end menu @node Expressions @section Expressions @cindex expressions @code{print} and many other @value{GDBN} commands accept an expression and compute its value. Any kind of constant, variable or operator defined by the programming language you are using is valid in an expression in @value{GDBN}. This includes conditional expressions, function calls, casts, and string constants. It also includes preprocessor macros, if you compiled your program to include this information; see @ref{Compilation}. @cindex arrays in expressions @value{GDBN} supports array constants in expressions input by the user. The syntax is @{@var{element}, @var{element}@dots{}@}. For example, you can use the command @code{print @{1, 2, 3@}} to create an array of three integers. If you pass an array to a function or assign it to a program variable, @value{GDBN} copies the array to memory that is @code{malloc}ed in the target program. Because C is so widespread, most of the expressions shown in examples in this manual are in C. @xref{Languages, , Using @value{GDBN} with Different Languages}, for information on how to use expressions in other languages. In this section, we discuss operators that you can use in @value{GDBN} expressions regardless of your programming language. @cindex casts, in expressions Casts are supported in all languages, not just in C, because it is so useful to cast a number into a pointer in order to examine a structure at that address in memory. @c FIXME: casts supported---Mod2 true? @value{GDBN} supports these operators, in addition to those common to programming languages: @table @code @item @@ @samp{@@} is a binary operator for treating parts of memory as arrays. @xref{Arrays, ,Artificial Arrays}, for more information. @item :: @samp{::} allows you to specify a variable in terms of the file or function where it is defined. @xref{Variables, ,Program Variables}. @cindex @{@var{type}@} @cindex type casting memory @cindex memory, viewing as typed object @cindex casts, to view memory @item @{@var{type}@} @var{addr} Refers to an object of type @var{type} stored at address @var{addr} in memory. @var{addr} may be any expression whose value is an integer or pointer (but parentheses are required around binary operators, just as in a cast). This construct is allowed regardless of what kind of data is normally supposed to reside at @var{addr}. @end table @node Ambiguous Expressions @section Ambiguous Expressions @cindex ambiguous expressions Expressions can sometimes contain some ambiguous elements. For instance, some programming languages (notably Ada, C@t{++} and Objective-C) permit a single function name to be defined several times, for application in different contexts. This is called @dfn{overloading}. Another example involving Ada is generics. A @dfn{generic package} is similar to C@t{++} templates and is typically instantiated several times, resulting in the same function name being defined in different contexts. In some cases and depending on the language, it is possible to adjust the expression to remove the ambiguity. For instance in C@t{++}, you can specify the signature of the function you want to break on, as in @kbd{break @var{function}(@var{types})}. In Ada, using the fully qualified name of your function often makes the expression unambiguous as well. When an ambiguity that needs to be resolved is detected, the debugger has the capability to display a menu of numbered choices for each possibility, and then waits for the selection with the prompt @samp{>}. The first option is always @samp{[0] cancel}, and typing @kbd{0 @key{RET}} aborts the current command. If the command in which the expression was used allows more than one choice to be selected, the next option in the menu is @samp{[1] all}, and typing @kbd{1 @key{RET}} selects all possible choices. For example, the following session excerpt shows an attempt to set a breakpoint at the overloaded symbol @code{String::after}. We choose three particular definitions of that function name: @c FIXME! This is likely to change to show arg type lists, at least @smallexample @group (@value{GDBP}) b String::after [0] cancel [1] all [2] file:String.cc; line number:867 [3] file:String.cc; line number:860 [4] file:String.cc; line number:875 [5] file:String.cc; line number:853 [6] file:String.cc; line number:846 [7] file:String.cc; line number:735 > 2 4 6 Breakpoint 1 at 0xb26c: file String.cc, line 867. Breakpoint 2 at 0xb344: file String.cc, line 875. Breakpoint 3 at 0xafcc: file String.cc, line 846. Multiple breakpoints were set. Use the "delete" command to delete unwanted breakpoints. (@value{GDBP}) @end group @end smallexample @table @code @kindex set multiple-symbols @item set multiple-symbols @var{mode} @cindex multiple-symbols menu This option allows you to adjust the debugger behavior when an expression is ambiguous. By default, @var{mode} is set to @code{all}. If the command with which the expression is used allows more than one choice, then @value{GDBN} automatically selects all possible choices. For instance, inserting a breakpoint on a function using an ambiguous name results in a breakpoint inserted on each possible match. However, if a unique choice must be made, then @value{GDBN} uses the menu to help you disambiguate the expression. For instance, printing the address of an overloaded function will result in the use of the menu. When @var{mode} is set to @code{ask}, the debugger always uses the menu when an ambiguity is detected. Finally, when @var{mode} is set to @code{cancel}, the debugger reports an error due to the ambiguity and the command is aborted. @kindex show multiple-symbols @item show multiple-symbols Show the current value of the @code{multiple-symbols} setting. @end table @node Variables @section Program Variables The most common kind of expression to use is the name of a variable in your program. Variables in expressions are understood in the selected stack frame (@pxref{Selection, ,Selecting a Frame}); they must be either: @itemize @bullet @item global (or file-static) @end itemize @noindent or @itemize @bullet @item visible according to the scope rules of the programming language from the point of execution in that frame @end itemize @noindent This means that in the function @smallexample foo (a) int a; @{ bar (a); @{ int b = test (); bar (b); @} @} @end smallexample @noindent you can examine and use the variable @code{a} whenever your program is executing within the function @code{foo}, but you can only use or examine the variable @code{b} while your program is executing inside the block where @code{b} is declared. @cindex variable name conflict There is an exception: you can refer to a variable or function whose scope is a single source file even if the current execution point is not in this file. But it is possible to have more than one such variable or function with the same name (in different source files). If that happens, referring to that name has unpredictable effects. If you wish, you can specify a static variable in a particular function or file by using the colon-colon (@code{::}) notation: @cindex colon-colon, context for variables/functions @ifnotinfo @c info cannot cope with a :: index entry, but why deprive hard copy readers? @cindex @code{::}, context for variables/functions @end ifnotinfo @smallexample @var{file}::@var{variable} @var{function}::@var{variable} @end smallexample @noindent Here @var{file} or @var{function} is the name of the context for the static @var{variable}. In the case of file names, you can use quotes to make sure @value{GDBN} parses the file name as a single word---for example, to print a global value of @code{x} defined in @file{f2.c}: @smallexample (@value{GDBP}) p 'f2.c'::x @end smallexample The @code{::} notation is normally used for referring to static variables, since you typically disambiguate uses of local variables in functions by selecting the appropriate frame and using the simple name of the variable. However, you may also use this notation to refer to local variables in frames enclosing the selected frame: @smallexample void foo (int a) @{ if (a < 10) bar (a); else process (a); /* Stop here */ @} int bar (int a) @{ foo (a + 5); @} @end smallexample @noindent For example, if there is a breakpoint at the commented line, here is what you might see when the program stops after executing the call @code{bar(0)}: @smallexample (@value{GDBP}) p a $1 = 10 (@value{GDBP}) p bar::a $2 = 5 (@value{GDBP}) up 2 #2 0x080483d0 in foo (a=5) at foobar.c:12 (@value{GDBP}) p a $3 = 5 (@value{GDBP}) p bar::a $4 = 0 @end smallexample @cindex C@t{++} scope resolution These uses of @samp{::} are very rarely in conflict with the very similar use of the same notation in C@t{++}. @value{GDBN} also supports use of the C@t{++} scope resolution operator in @value{GDBN} expressions. @c FIXME: Um, so what happens in one of those rare cases where it's in @c conflict?? --mew @cindex wrong values @cindex variable values, wrong @cindex function entry/exit, wrong values of variables @cindex optimized code, wrong values of variables @quotation @emph{Warning:} Occasionally, a local variable may appear to have the wrong value at certain points in a function---just after entry to a new scope, and just before exit. @end quotation You may see this problem when you are stepping by machine instructions. This is because, on most machines, it takes more than one instruction to set up a stack frame (including local variable definitions); if you are stepping by machine instructions, variables may appear to have the wrong values until the stack frame is completely built. On exit, it usually also takes more than one machine instruction to destroy a stack frame; after you begin stepping through that group of instructions, local variable definitions may be gone. This may also happen when the compiler does significant optimizations. To be sure of always seeing accurate values, turn off all optimization when compiling. @cindex ``No symbol "foo" in current context'' Another possible effect of compiler optimizations is to optimize unused variables out of existence, or assign variables to registers (as opposed to memory addresses). Depending on the support for such cases offered by the debug info format used by the compiler, @value{GDBN} might not be able to display values for such local variables. If that happens, @value{GDBN} will print a message like this: @smallexample No symbol "foo" in current context. @end smallexample To solve such problems, either recompile without optimizations, or use a different debug info format, if the compiler supports several such formats. @xref{Compilation}, for more information on choosing compiler options. @xref{C, ,C and C@t{++}}, for more information about debug info formats that are best suited to C@t{++} programs. If you ask to print an object whose contents are unknown to @value{GDBN}, e.g., because its data type is not completely specified by the debug information, @value{GDBN} will say @samp{}. @xref{Symbols, incomplete type}, for more about this. If you append @kbd{@@entry} string to a function parameter name you get its value at the time the function got called. If the value is not available an error message is printed. Entry values are available only with some compilers. Entry values are normally also printed at the function parameter list according to @ref{set print entry-values}. @smallexample Breakpoint 1, d (i=30) at gdb.base/entry-value.c:29 29 i++; (gdb) next 30 e (i); (gdb) print i $1 = 31 (gdb) print i@@entry $2 = 30 @end smallexample Strings are identified as arrays of @code{char} values without specified signedness. Arrays of either @code{signed char} or @code{unsigned char} get printed as arrays of 1 byte sized integers. @code{-fsigned-char} or @code{-funsigned-char} @value{NGCC} options have no effect as @value{GDBN} defines literal string type @code{"char"} as @code{char} without a sign. For program code @smallexample char var0[] = "A"; signed char var1[] = "A"; @end smallexample You get during debugging @smallexample (gdb) print var0 $1 = "A" (gdb) print var1 $2 = @{65 'A', 0 '\0'@} @end smallexample @node Arrays @section Artificial Arrays @cindex artificial array @cindex arrays @kindex @@@r{, referencing memory as an array} It is often useful to print out several successive objects of the same type in memory; a section of an array, or an array of dynamically determined size for which only a pointer exists in the program. You can do this by referring to a contiguous span of memory as an @dfn{artificial array}, using the binary operator @samp{@@}. The left operand of @samp{@@} should be the first element of the desired array and be an individual object. The right operand should be the desired length of the array. The result is an array value whose elements are all of the type of the left argument. The first element is actually the left argument; the second element comes from bytes of memory immediately following those that hold the first element, and so on. Here is an example. If a program says @smallexample int *array = (int *) malloc (len * sizeof (int)); @end smallexample @noindent you can print the contents of @code{array} with @smallexample p *array@@len @end smallexample The left operand of @samp{@@} must reside in memory. Array values made with @samp{@@} in this way behave just like other arrays in terms of subscripting, and are coerced to pointers when used in expressions. Artificial arrays most often appear in expressions via the value history (@pxref{Value History, ,Value History}), after printing one out. Another way to create an artificial array is to use a cast. This re-interprets a value as if it were an array. The value need not be in memory: @smallexample (@value{GDBP}) p/x (short[2])0x12345678 $1 = @{0x1234, 0x5678@} @end smallexample As a convenience, if you leave the array length out (as in @samp{(@var{type}[])@var{value}}) @value{GDBN} calculates the size to fill the value (as @samp{sizeof(@var{value})/sizeof(@var{type})}: @smallexample (@value{GDBP}) p/x (short[])0x12345678 $2 = @{0x1234, 0x5678@} @end smallexample Sometimes the artificial array mechanism is not quite enough; in moderately complex data structures, the elements of interest may not actually be adjacent---for example, if you are interested in the values of pointers in an array. One useful work-around in this situation is to use a convenience variable (@pxref{Convenience Vars, ,Convenience Variables}) as a counter in an expression that prints the first interesting value, and then repeat that expression via @key{RET}. For instance, suppose you have an array @code{dtab} of pointers to structures, and you are interested in the values of a field @code{fv} in each structure. Here is an example of what you might type: @smallexample set $i = 0 p dtab[$i++]->fv @key{RET} @key{RET} @dots{} @end smallexample @node Output Formats @section Output Formats @cindex formatted output @cindex output formats By default, @value{GDBN} prints a value according to its data type. Sometimes this is not what you want. For example, you might want to print a number in hex, or a pointer in decimal. Or you might want to view data in memory at a certain address as a character string or as an instruction. To do these things, specify an @dfn{output format} when you print a value. The simplest use of output formats is to say how to print a value already computed. This is done by starting the arguments of the @code{print} command with a slash and a format letter. The format letters supported are: @table @code @item x Regard the bits of the value as an integer, and print the integer in hexadecimal. @item d Print as integer in signed decimal. @item u Print as integer in unsigned decimal. @item o Print as integer in octal. @item t Print as integer in binary. The letter @samp{t} stands for ``two''. @footnote{@samp{b} cannot be used because these format letters are also used with the @code{x} command, where @samp{b} stands for ``byte''; see @ref{Memory,,Examining Memory}.} @item a @cindex unknown address, locating @cindex locate address Print as an address, both absolute in hexadecimal and as an offset from the nearest preceding symbol. You can use this format used to discover where (in what function) an unknown address is located: @smallexample (@value{GDBP}) p/a 0x54320 $3 = 0x54320 <_initialize_vx+396> @end smallexample @noindent The command @code{info symbol 0x54320} yields similar results. @xref{Symbols, info symbol}. @item c Regard as an integer and print it as a character constant. This prints both the numerical value and its character representation. The character representation is replaced with the octal escape @samp{\nnn} for characters outside the 7-bit @sc{ascii} range. Without this format, @value{GDBN} displays @code{char}, @w{@code{unsigned char}}, and @w{@code{signed char}} data as character constants. Single-byte members of vectors are displayed as integer data. @item f Regard the bits of the value as a floating point number and print using typical floating point syntax. @item s @cindex printing strings @cindex printing byte arrays Regard as a string, if possible. With this format, pointers to single-byte data are displayed as null-terminated strings and arrays of single-byte data are displayed as fixed-length strings. Other values are displayed in their natural types. Without this format, @value{GDBN} displays pointers to and arrays of @code{char}, @w{@code{unsigned char}}, and @w{@code{signed char}} as strings. Single-byte members of a vector are displayed as an integer array. @item r @cindex raw printing Print using the @samp{raw} formatting. By default, @value{GDBN} will use a Python-based pretty-printer, if one is available (@pxref{Pretty Printing}). This typically results in a higher-level display of the value's contents. The @samp{r} format bypasses any Python pretty-printer which might exist. @end table For example, to print the program counter in hex (@pxref{Registers}), type @smallexample p/x $pc @end smallexample @noindent Note that no space is required before the slash; this is because command names in @value{GDBN} cannot contain a slash. To reprint the last value in the value history with a different format, you can use the @code{print} command with just a format and no expression. For example, @samp{p/x} reprints the last value in hex. @node Memory @section Examining Memory You can use the command @code{x} (for ``examine'') to examine memory in any of several formats, independently of your program's data types. @cindex examining memory @table @code @kindex x @r{(examine memory)} @item x/@var{nfu} @var{addr} @itemx x @var{addr} @itemx x Use the @code{x} command to examine memory. @end table @var{n}, @var{f}, and @var{u} are all optional parameters that specify how much memory to display and how to format it; @var{addr} is an expression giving the address where you want to start displaying memory. If you use defaults for @var{nfu}, you need not type the slash @samp{/}. Several commands set convenient defaults for @var{addr}. @table @r @item @var{n}, the repeat count The repeat count is a decimal integer; the default is 1. It specifies how much memory (counting by units @var{u}) to display. @c This really is **decimal**; unaffected by 'set radix' as of GDB @c 4.1.2. @item @var{f}, the display format The display format is one of the formats used by @code{print} (@samp{x}, @samp{d}, @samp{u}, @samp{o}, @samp{t}, @samp{a}, @samp{c}, @samp{f}, @samp{s}), and in addition @samp{i} (for machine instructions). The default is @samp{x} (hexadecimal) initially. The default changes each time you use either @code{x} or @code{print}. @item @var{u}, the unit size The unit size is any of @table @code @item b Bytes. @item h Halfwords (two bytes). @item w Words (four bytes). This is the initial default. @item g Giant words (eight bytes). @end table Each time you specify a unit size with @code{x}, that size becomes the default unit the next time you use @code{x}. For the @samp{i} format, the unit size is ignored and is normally not written. For the @samp{s} format, the unit size defaults to @samp{b}, unless it is explicitly given. Use @kbd{x /hs} to display 16-bit char strings and @kbd{x /ws} to display 32-bit strings. The next use of @kbd{x /s} will again display 8-bit strings. Note that the results depend on the programming language of the current compilation unit. If the language is C, the @samp{s} modifier will use the UTF-16 encoding while @samp{w} will use UTF-32. The encoding is set by the programming language and cannot be altered. @item @var{addr}, starting display address @var{addr} is the address where you want @value{GDBN} to begin displaying memory. The expression need not have a pointer value (though it may); it is always interpreted as an integer address of a byte of memory. @xref{Expressions, ,Expressions}, for more information on expressions. The default for @var{addr} is usually just after the last address examined---but several other commands also set the default address: @code{info breakpoints} (to the address of the last breakpoint listed), @code{info line} (to the starting address of a line), and @code{print} (if you use it to display a value from memory). @end table For example, @samp{x/3uh 0x54320} is a request to display three halfwords (@code{h}) of memory, formatted as unsigned decimal integers (@samp{u}), starting at address @code{0x54320}. @samp{x/4xw $sp} prints the four words (@samp{w}) of memory above the stack pointer (here, @samp{$sp}; @pxref{Registers, ,Registers}) in hexadecimal (@samp{x}). Since the letters indicating unit sizes are all distinct from the letters specifying output formats, you do not have to remember whether unit size or format comes first; either order works. The output specifications @samp{4xw} and @samp{4wx} mean exactly the same thing. (However, the count @var{n} must come first; @samp{wx4} does not work.) Even though the unit size @var{u} is ignored for the formats @samp{s} and @samp{i}, you might still want to use a count @var{n}; for example, @samp{3i} specifies that you want to see three machine instructions, including any operands. For convenience, especially when used with the @code{display} command, the @samp{i} format also prints branch delay slot instructions, if any, beyond the count specified, which immediately follow the last instruction that is within the count. The command @code{disassemble} gives an alternative way of inspecting machine instructions; see @ref{Machine Code,,Source and Machine Code}. All the defaults for the arguments to @code{x} are designed to make it easy to continue scanning memory with minimal specifications each time you use @code{x}. For example, after you have inspected three machine instructions with @samp{x/3i @var{addr}}, you can inspect the next seven with just @samp{x/7}. If you use @key{RET} to repeat the @code{x} command, the repeat count @var{n} is used again; the other arguments default as for successive uses of @code{x}. When examining machine instructions, the instruction at current program counter is shown with a @code{=>} marker. For example: @smallexample (@value{GDBP}) x/5i $pc-6 0x804837f : mov %esp,%ebp 0x8048381 : push %ecx 0x8048382 : sub $0x4,%esp => 0x8048385 : movl $0x8048460,(%esp) 0x804838c : call 0x80482d4 @end smallexample @cindex @code{$_}, @code{$__}, and value history The addresses and contents printed by the @code{x} command are not saved in the value history because there is often too much of them and they would get in the way. Instead, @value{GDBN} makes these values available for subsequent use in expressions as values of the convenience variables @code{$_} and @code{$__}. After an @code{x} command, the last address examined is available for use in expressions in the convenience variable @code{$_}. The contents of that address, as examined, are available in the convenience variable @code{$__}. If the @code{x} command has a repeat count, the address and contents saved are from the last memory unit printed; this is not the same as the last address printed if several units were printed on the last line of output. @cindex remote memory comparison @cindex verify remote memory image When you are debugging a program running on a remote target machine (@pxref{Remote Debugging}), you may wish to verify the program's image in the remote machine's memory against the executable file you downloaded to the target. The @code{compare-sections} command is provided for such situations. @table @code @kindex compare-sections @item compare-sections @r{[}@var{section-name}@r{]} Compare the data of a loadable section @var{section-name} in the executable file of the program being debugged with the same section in the remote machine's memory, and report any mismatches. With no arguments, compares all loadable sections. This command's availability depends on the target's support for the @code{"qCRC"} remote request. @end table @node Auto Display @section Automatic Display @cindex automatic display @cindex display of expressions If you find that you want to print the value of an expression frequently (to see how it changes), you might want to add it to the @dfn{automatic display list} so that @value{GDBN} prints its value each time your program stops. Each expression added to the list is given a number to identify it; to remove an expression from the list, you specify that number. The automatic display looks like this: @smallexample 2: foo = 38 3: bar[5] = (struct hack *) 0x3804 @end smallexample @noindent This display shows item numbers, expressions and their current values. As with displays you request manually using @code{x} or @code{print}, you can specify the output format you prefer; in fact, @code{display} decides whether to use @code{print} or @code{x} depending your format specification---it uses @code{x} if you specify either the @samp{i} or @samp{s} format, or a unit size; otherwise it uses @code{print}. @table @code @kindex display @item display @var{expr} Add the expression @var{expr} to the list of expressions to display each time your program stops. @xref{Expressions, ,Expressions}. @code{display} does not repeat if you press @key{RET} again after using it. @item display/@var{fmt} @var{expr} For @var{fmt} specifying only a display format and not a size or count, add the expression @var{expr} to the auto-display list but arrange to display it each time in the specified format @var{fmt}. @xref{Output Formats,,Output Formats}. @item display/@var{fmt} @var{addr} For @var{fmt} @samp{i} or @samp{s}, or including a unit-size or a number of units, add the expression @var{addr} as a memory address to be examined each time your program stops. Examining means in effect doing @samp{x/@var{fmt} @var{addr}}. @xref{Memory, ,Examining Memory}. @end table For example, @samp{display/i $pc} can be helpful, to see the machine instruction about to be executed each time execution stops (@samp{$pc} is a common name for the program counter; @pxref{Registers, ,Registers}). @table @code @kindex delete display @kindex undisplay @item undisplay @var{dnums}@dots{} @itemx delete display @var{dnums}@dots{} Remove items from the list of expressions to display. Specify the numbers of the displays that you want affected with the command argument @var{dnums}. It can be a single display number, one of the numbers shown in the first field of the @samp{info display} display; or it could be a range of display numbers, as in @code{2-4}. @code{undisplay} does not repeat if you press @key{RET} after using it. (Otherwise you would just get the error @samp{No display number @dots{}}.) @kindex disable display @item disable display @var{dnums}@dots{} Disable the display of item numbers @var{dnums}. A disabled display item is not printed automatically, but is not forgotten. It may be enabled again later. Specify the numbers of the displays that you want affected with the command argument @var{dnums}. It can be a single display number, one of the numbers shown in the first field of the @samp{info display} display; or it could be a range of display numbers, as in @code{2-4}. @kindex enable display @item enable display @var{dnums}@dots{} Enable display of item numbers @var{dnums}. It becomes effective once again in auto display of its expression, until you specify otherwise. Specify the numbers of the displays that you want affected with the command argument @var{dnums}. It can be a single display number, one of the numbers shown in the first field of the @samp{info display} display; or it could be a range of display numbers, as in @code{2-4}. @item display Display the current values of the expressions on the list, just as is done when your program stops. @kindex info display @item info display Print the list of expressions previously set up to display automatically, each one with its item number, but without showing the values. This includes disabled expressions, which are marked as such. It also includes expressions which would not be displayed right now because they refer to automatic variables not currently available. @end table @cindex display disabled out of scope If a display expression refers to local variables, then it does not make sense outside the lexical context for which it was set up. Such an expression is disabled when execution enters a context where one of its variables is not defined. For example, if you give the command @code{display last_char} while inside a function with an argument @code{last_char}, @value{GDBN} displays this argument while your program continues to stop inside that function. When it stops elsewhere---where there is no variable @code{last_char}---the display is disabled automatically. The next time your program stops where @code{last_char} is meaningful, you can enable the display expression once again. @node Print Settings @section Print Settings @cindex format options @cindex print settings @value{GDBN} provides the following ways to control how arrays, structures, and symbols are printed. @noindent These settings are useful for debugging programs in any language: @table @code @kindex set print @item set print address @itemx set print address on @cindex print/don't print memory addresses @value{GDBN} prints memory addresses showing the location of stack traces, structure values, pointer values, breakpoints, and so forth, even when it also displays the contents of those addresses. The default is @code{on}. For example, this is what a stack frame display looks like with @code{set print address on}: @smallexample @group (@value{GDBP}) f #0 set_quotes (lq=0x34c78 "<<", rq=0x34c88 ">>") at input.c:530 530 if (lquote != def_lquote) @end group @end smallexample @item set print address off Do not print addresses when displaying their contents. For example, this is the same stack frame displayed with @code{set print address off}: @smallexample @group (@value{GDBP}) set print addr off (@value{GDBP}) f #0 set_quotes (lq="<<", rq=">>") at input.c:530 530 if (lquote != def_lquote) @end group @end smallexample You can use @samp{set print address off} to eliminate all machine dependent displays from the @value{GDBN} interface. For example, with @code{print address off}, you should get the same text for backtraces on all machines---whether or not they involve pointer arguments. @kindex show print @item show print address Show whether or not addresses are to be printed. @end table When @value{GDBN} prints a symbolic address, it normally prints the closest earlier symbol plus an offset. If that symbol does not uniquely identify the address (for example, it is a name whose scope is a single source file), you may need to clarify. One way to do this is with @code{info line}, for example @samp{info line *0x4537}. Alternately, you can set @value{GDBN} to print the source file and line number when it prints a symbolic address: @table @code @item set print symbol-filename on @cindex source file and line of a symbol @cindex symbol, source file and line Tell @value{GDBN} to print the source file name and line number of a symbol in the symbolic form of an address. @item set print symbol-filename off Do not print source file name and line number of a symbol. This is the default. @item show print symbol-filename Show whether or not @value{GDBN} will print the source file name and line number of a symbol in the symbolic form of an address. @end table Another situation where it is helpful to show symbol filenames and line numbers is when disassembling code; @value{GDBN} shows you the line number and source file that corresponds to each instruction. Also, you may wish to see the symbolic form only if the address being printed is reasonably close to the closest earlier symbol: @table @code @item set print max-symbolic-offset @var{max-offset} @cindex maximum value for offset of closest symbol Tell @value{GDBN} to only display the symbolic form of an address if the offset between the closest earlier symbol and the address is less than @var{max-offset}. The default is 0, which tells @value{GDBN} to always print the symbolic form of an address if any symbol precedes it. @item show print max-symbolic-offset Ask how large the maximum offset is that @value{GDBN} prints in a symbolic address. @end table @cindex wild pointer, interpreting @cindex pointer, finding referent If you have a pointer and you are not sure where it points, try @samp{set print symbol-filename on}. Then you can determine the name and source file location of the variable where it points, using @samp{p/a @var{pointer}}. This interprets the address in symbolic form. For example, here @value{GDBN} shows that a variable @code{ptt} points at another variable @code{t}, defined in @file{hi2.c}: @smallexample (@value{GDBP}) set print symbol-filename on (@value{GDBP}) p/a ptt $4 = 0xe008 @end smallexample @quotation @emph{Warning:} For pointers that point to a local variable, @samp{p/a} does not show the symbol name and filename of the referent, even with the appropriate @code{set print} options turned on. @end quotation You can also enable @samp{/a}-like formatting all the time using @samp{set print symbol on}: @table @code @item set print symbol on Tell @value{GDBN} to print the symbol corresponding to an address, if one exists. @item set print symbol off Tell @value{GDBN} not to print the symbol corresponding to an address. In this mode, @value{GDBN} will still print the symbol corresponding to pointers to functions. This is the default. @item show print symbol Show whether @value{GDBN} will display the symbol corresponding to an address. @end table Other settings control how different kinds of objects are printed: @table @code @item set print array @itemx set print array on @cindex pretty print arrays Pretty print arrays. This format is more convenient to read, but uses more space. The default is off. @item set print array off Return to compressed format for arrays. @item show print array Show whether compressed or pretty format is selected for displaying arrays. @cindex print array indexes @item set print array-indexes @itemx set print array-indexes on Print the index of each element when displaying arrays. May be more convenient to locate a given element in the array or quickly find the index of a given element in that printed array. The default is off. @item set print array-indexes off Stop printing element indexes when displaying arrays. @item show print array-indexes Show whether the index of each element is printed when displaying arrays. @item set print elements @var{number-of-elements} @cindex number of array elements to print @cindex limit on number of printed array elements Set a limit on how many elements of an array @value{GDBN} will print. If @value{GDBN} is printing a large array, it stops printing after it has printed the number of elements set by the @code{set print elements} command. This limit also applies to the display of strings. When @value{GDBN} starts, this limit is set to 200. Setting @var{number-of-elements} to zero means that the printing is unlimited. @item show print elements Display the number of elements of a large array that @value{GDBN} will print. If the number is 0, then the printing is unlimited. @item set print frame-arguments @var{value} @kindex set print frame-arguments @cindex printing frame argument values @cindex print all frame argument values @cindex print frame argument values for scalars only @cindex do not print frame argument values This command allows to control how the values of arguments are printed when the debugger prints a frame (@pxref{Frames}). The possible values are: @table @code @item all The values of all arguments are printed. @item scalars Print the value of an argument only if it is a scalar. The value of more complex arguments such as arrays, structures, unions, etc, is replaced by @code{@dots{}}. This is the default. Here is an example where only scalar arguments are shown: @smallexample #1 0x08048361 in call_me (i=3, s=@dots{}, ss=0xbf8d508c, u=@dots{}, e=green) at frame-args.c:23 @end smallexample @item none None of the argument values are printed. Instead, the value of each argument is replaced by @code{@dots{}}. In this case, the example above now becomes: @smallexample #1 0x08048361 in call_me (i=@dots{}, s=@dots{}, ss=@dots{}, u=@dots{}, e=@dots{}) at frame-args.c:23 @end smallexample @end table By default, only scalar arguments are printed. This command can be used to configure the debugger to print the value of all arguments, regardless of their type. However, it is often advantageous to not print the value of more complex parameters. For instance, it reduces the amount of information printed in each frame, making the backtrace more readable. Also, it improves performance when displaying Ada frames, because the computation of large arguments can sometimes be CPU-intensive, especially in large applications. Setting @code{print frame-arguments} to @code{scalars} (the default) or @code{none} avoids this computation, thus speeding up the display of each Ada frame. @item show print frame-arguments Show how the value of arguments should be displayed when printing a frame. @anchor{set print entry-values} @item set print entry-values @var{value} @kindex set print entry-values Set printing of frame argument values at function entry. In some cases @value{GDBN} can determine the value of function argument which was passed by the function caller, even if the value was modified inside the called function and therefore is different. With optimized code, the current value could be unavailable, but the entry value may still be known. The default value is @code{default} (see below for its description). Older @value{GDBN} behaved as with the setting @code{no}. Compilers not supporting this feature will behave in the @code{default} setting the same way as with the @code{no} setting. This functionality is currently supported only by DWARF 2 debugging format and the compiler has to produce @samp{DW_TAG_GNU_call_site} tags. With @value{NGCC}, you need to specify @option{-O -g} during compilation, to get this information. The @var{value} parameter can be one of the following: @table @code @item no Print only actual parameter values, never print values from function entry point. @smallexample #0 equal (val=5) #0 different (val=6) #0 lost (val=) #0 born (val=10) #0 invalid (val=) @end smallexample @item only Print only parameter values from function entry point. The actual parameter values are never printed. @smallexample #0 equal (val@@entry=5) #0 different (val@@entry=5) #0 lost (val@@entry=5) #0 born (val@@entry=) #0 invalid (val@@entry=) @end smallexample @item preferred Print only parameter values from function entry point. If value from function entry point is not known while the actual value is known, print the actual value for such parameter. @smallexample #0 equal (val@@entry=5) #0 different (val@@entry=5) #0 lost (val@@entry=5) #0 born (val=10) #0 invalid (val@@entry=) @end smallexample @item if-needed Print actual parameter values. If actual parameter value is not known while value from function entry point is known, print the entry point value for such parameter. @smallexample #0 equal (val=5) #0 different (val=6) #0 lost (val@@entry=5) #0 born (val=10) #0 invalid (val=) @end smallexample @item both Always print both the actual parameter value and its value from function entry point, even if values of one or both are not available due to compiler optimizations. @smallexample #0 equal (val=5, val@@entry=5) #0 different (val=6, val@@entry=5) #0 lost (val=, val@@entry=5) #0 born (val=10, val@@entry=) #0 invalid (val=, val@@entry=) @end smallexample @item compact Print the actual parameter value if it is known and also its value from function entry point if it is known. If neither is known, print for the actual value @code{}. If not in MI mode (@pxref{GDB/MI}) and if both values are known and identical, print the shortened @code{param=param@@entry=VALUE} notation. @smallexample #0 equal (val=val@@entry=5) #0 different (val=6, val@@entry=5) #0 lost (val@@entry=5) #0 born (val=10) #0 invalid (val=) @end smallexample @item default Always print the actual parameter value. Print also its value from function entry point, but only if it is known. If not in MI mode (@pxref{GDB/MI}) and if both values are known and identical, print the shortened @code{param=param@@entry=VALUE} notation. @smallexample #0 equal (val=val@@entry=5) #0 different (val=6, val@@entry=5) #0 lost (val=, val@@entry=5) #0 born (val=10) #0 invalid (val=) @end smallexample @end table For analysis messages on possible failures of frame argument values at function entry resolution see @ref{set debug entry-values}. @item show print entry-values Show the method being used for printing of frame argument values at function entry. @item set print repeats @cindex repeated array elements Set the threshold for suppressing display of repeated array elements. When the number of consecutive identical elements of an array exceeds the threshold, @value{GDBN} prints the string @code{""}, where @var{n} is the number of identical repetitions, instead of displaying the identical elements themselves. Setting the threshold to zero will cause all elements to be individually printed. The default threshold is 10. @item show print repeats Display the current threshold for printing repeated identical elements. @item set print null-stop @cindex @sc{null} elements in arrays Cause @value{GDBN} to stop printing the characters of an array when the first @sc{null} is encountered. This is useful when large arrays actually contain only short strings. The default is off. @item show print null-stop Show whether @value{GDBN} stops printing an array on the first @sc{null} character. @item set print pretty on @cindex print structures in indented form @cindex indentation in structure display Cause @value{GDBN} to print structures in an indented format with one member per line, like this: @smallexample @group $1 = @{ next = 0x0, flags = @{ sweet = 1, sour = 1 @}, meat = 0x54 "Pork" @} @end group @end smallexample @item set print pretty off Cause @value{GDBN} to print structures in a compact format, like this: @smallexample @group $1 = @{next = 0x0, flags = @{sweet = 1, sour = 1@}, \ meat = 0x54 "Pork"@} @end group @end smallexample @noindent This is the default format. @item show print pretty Show which format @value{GDBN} is using to print structures. @item set print sevenbit-strings on @cindex eight-bit characters in strings @cindex octal escapes in strings Print using only seven-bit characters; if this option is set, @value{GDBN} displays any eight-bit characters (in strings or character values) using the notation @code{\}@var{nnn}. This setting is best if you are working in English (@sc{ascii}) and you use the high-order bit of characters as a marker or ``meta'' bit. @item set print sevenbit-strings off Print full eight-bit characters. This allows the use of more international character sets, and is the default. @item show print sevenbit-strings Show whether or not @value{GDBN} is printing only seven-bit characters. @item set print union on @cindex unions in structures, printing Tell @value{GDBN} to print unions which are contained in structures and other unions. This is the default setting. @item set print union off Tell @value{GDBN} not to print unions which are contained in structures and other unions. @value{GDBN} will print @code{"@{...@}"} instead. @item show print union Ask @value{GDBN} whether or not it will print unions which are contained in structures and other unions. For example, given the declarations @smallexample typedef enum @{Tree, Bug@} Species; typedef enum @{Big_tree, Acorn, Seedling@} Tree_forms; typedef enum @{Caterpillar, Cocoon, Butterfly@} Bug_forms; struct thing @{ Species it; union @{ Tree_forms tree; Bug_forms bug; @} form; @}; struct thing foo = @{Tree, @{Acorn@}@}; @end smallexample @noindent with @code{set print union on} in effect @samp{p foo} would print @smallexample $1 = @{it = Tree, form = @{tree = Acorn, bug = Cocoon@}@} @end smallexample @noindent and with @code{set print union off} in effect it would print @smallexample $1 = @{it = Tree, form = @{...@}@} @end smallexample @noindent @code{set print union} affects programs written in C-like languages and in Pascal. @end table @need 1000 @noindent These settings are of interest when debugging C@t{++} programs: @table @code @cindex demangling C@t{++} names @item set print demangle @itemx set print demangle on Print C@t{++} names in their source form rather than in the encoded (``mangled'') form passed to the assembler and linker for type-safe linkage. The default is on. @item show print demangle Show whether C@t{++} names are printed in mangled or demangled form. @item set print asm-demangle @itemx set print asm-demangle on Print C@t{++} names in their source form rather than their mangled form, even in assembler code printouts such as instruction disassemblies. The default is off. @item show print asm-demangle Show whether C@t{++} names in assembly listings are printed in mangled or demangled form. @cindex C@t{++} symbol decoding style @cindex symbol decoding style, C@t{++} @kindex set demangle-style @item set demangle-style @var{style} Choose among several encoding schemes used by different compilers to represent C@t{++} names. The choices for @var{style} are currently: @table @code @item auto Allow @value{GDBN} to choose a decoding style by inspecting your program. This is the default. @item gnu Decode based on the @sc{gnu} C@t{++} compiler (@code{g++}) encoding algorithm. @item hp Decode based on the HP ANSI C@t{++} (@code{aCC}) encoding algorithm. @item lucid Decode based on the Lucid C@t{++} compiler (@code{lcc}) encoding algorithm. @item arm Decode using the algorithm in the @cite{C@t{++} Annotated Reference Manual}. @strong{Warning:} this setting alone is not sufficient to allow debugging @code{cfront}-generated executables. @value{GDBN} would require further enhancement to permit that. @end table If you omit @var{style}, you will see a list of possible formats. @item show demangle-style Display the encoding style currently in use for decoding C@t{++} symbols. @item set print object @itemx set print object on @cindex derived type of an object, printing @cindex display derived types When displaying a pointer to an object, identify the @emph{actual} (derived) type of the object rather than the @emph{declared} type, using the virtual function table. Note that the virtual function table is required---this feature can only work for objects that have run-time type identification; a single virtual method in the object's declared type is sufficient. Note that this setting is also taken into account when working with variable objects via MI (@pxref{GDB/MI}). @item set print object off Display only the declared type of objects, without reference to the virtual function table. This is the default setting. @item show print object Show whether actual, or declared, object types are displayed. @item set print static-members @itemx set print static-members on @cindex static members of C@t{++} objects Print static members when displaying a C@t{++} object. The default is on. @item set print static-members off Do not print static members when displaying a C@t{++} object. @item show print static-members Show whether C@t{++} static members are printed or not. @item set print pascal_static-members @itemx set print pascal_static-members on @cindex static members of Pascal objects @cindex Pascal objects, static members display Print static members when displaying a Pascal object. The default is on. @item set print pascal_static-members off Do not print static members when displaying a Pascal object. @item show print pascal_static-members Show whether Pascal static members are printed or not. @c These don't work with HP ANSI C++ yet. @item set print vtbl @itemx set print vtbl on @cindex pretty print C@t{++} virtual function tables @cindex virtual functions (C@t{++}) display @cindex VTBL display Pretty print C@t{++} virtual function tables. The default is off. (The @code{vtbl} commands do not work on programs compiled with the HP ANSI C@t{++} compiler (@code{aCC}).) @item set print vtbl off Do not pretty print C@t{++} virtual function tables. @item show print vtbl Show whether C@t{++} virtual function tables are pretty printed, or not. @end table @node Pretty Printing @section Pretty Printing @value{GDBN} provides a mechanism to allow pretty-printing of values using Python code. It greatly simplifies the display of complex objects. This mechanism works for both MI and the CLI. @menu * Pretty-Printer Introduction:: Introduction to pretty-printers * Pretty-Printer Example:: An example pretty-printer * Pretty-Printer Commands:: Pretty-printer commands @end menu @node Pretty-Printer Introduction @subsection Pretty-Printer Introduction When @value{GDBN} prints a value, it first sees if there is a pretty-printer registered for the value. If there is then @value{GDBN} invokes the pretty-printer to print the value. Otherwise the value is printed normally. Pretty-printers are normally named. This makes them easy to manage. The @samp{info pretty-printer} command will list all the installed pretty-printers with their names. If a pretty-printer can handle multiple data types, then its @dfn{subprinters} are the printers for the individual data types. Each such subprinter has its own name. The format of the name is @var{printer-name};@var{subprinter-name}. Pretty-printers are installed by @dfn{registering} them with @value{GDBN}. Typically they are automatically loaded and registered when the corresponding debug information is loaded, thus making them available without having to do anything special. There are three places where a pretty-printer can be registered. @itemize @bullet @item Pretty-printers registered globally are available when debugging all inferiors. @item Pretty-printers registered with a program space are available only when debugging that program. @xref{Progspaces In Python}, for more details on program spaces in Python. @item Pretty-printers registered with an objfile are loaded and unloaded with the corresponding objfile (e.g., shared library). @xref{Objfiles In Python}, for more details on objfiles in Python. @end itemize @xref{Selecting Pretty-Printers}, for further information on how pretty-printers are selected, @xref{Writing a Pretty-Printer}, for implementing pretty printers for new types. @node Pretty-Printer Example @subsection Pretty-Printer Example Here is how a C@t{++} @code{std::string} looks without a pretty-printer: @smallexample (@value{GDBP}) print s $1 = @{ static npos = 4294967295, _M_dataplus = @{ > = @{ <__gnu_cxx::new_allocator> = @{ @}, @}, members of std::basic_string, std::allocator >::_Alloc_hider: _M_p = 0x804a014 "abcd" @} @} @end smallexample With a pretty-printer for @code{std::string} only the contents are printed: @smallexample (@value{GDBP}) print s $2 = "abcd" @end smallexample @node Pretty-Printer Commands @subsection Pretty-Printer Commands @cindex pretty-printer commands @table @code @kindex info pretty-printer @item info pretty-printer [@var{object-regexp} [@var{name-regexp}]] Print the list of installed pretty-printers. This includes disabled pretty-printers, which are marked as such. @var{object-regexp} is a regular expression matching the objects whose pretty-printers to list. Objects can be @code{global}, the program space's file (@pxref{Progspaces In Python}), and the object files within that program space (@pxref{Objfiles In Python}). @xref{Selecting Pretty-Printers}, for details on how @value{GDBN} looks up a printer from these three objects. @var{name-regexp} is a regular expression matching the name of the printers to list. @kindex disable pretty-printer @item disable pretty-printer [@var{object-regexp} [@var{name-regexp}]] Disable pretty-printers matching @var{object-regexp} and @var{name-regexp}. A disabled pretty-printer is not forgotten, it may be enabled again later. @kindex enable pretty-printer @item enable pretty-printer [@var{object-regexp} [@var{name-regexp}]] Enable pretty-printers matching @var{object-regexp} and @var{name-regexp}. @end table Example: Suppose we have three pretty-printers installed: one from library1.so named @code{foo} that prints objects of type @code{foo}, and another from library2.so named @code{bar} that prints two types of objects, @code{bar1} and @code{bar2}. @smallexample (gdb) info pretty-printer library1.so: foo library2.so: bar bar1 bar2 (gdb) info pretty-printer library2 library2.so: bar bar1 bar2 (gdb) disable pretty-printer library1 1 printer disabled 2 of 3 printers enabled (gdb) info pretty-printer library1.so: foo [disabled] library2.so: bar bar1 bar2 (gdb) disable pretty-printer library2 bar:bar1 1 printer disabled 1 of 3 printers enabled (gdb) info pretty-printer library2 library1.so: foo [disabled] library2.so: bar bar1 [disabled] bar2 (gdb) disable pretty-printer library2 bar 1 printer disabled 0 of 3 printers enabled (gdb) info pretty-printer library2 library1.so: foo [disabled] library2.so: bar [disabled] bar1 [disabled] bar2 @end smallexample Note that for @code{bar} the entire printer can be disabled, as can each individual subprinter. @node Value History @section Value History @cindex value history @cindex history of values printed by @value{GDBN} Values printed by the @code{print} command are saved in the @value{GDBN} @dfn{value history}. This allows you to refer to them in other expressions. Values are kept until the symbol table is re-read or discarded (for example with the @code{file} or @code{symbol-file} commands). When the symbol table changes, the value history is discarded, since the values may contain pointers back to the types defined in the symbol table. @cindex @code{$} @cindex @code{$$} @cindex history number The values printed are given @dfn{history numbers} by which you can refer to them. These are successive integers starting with one. @code{print} shows you the history number assigned to a value by printing @samp{$@var{num} = } before the value; here @var{num} is the history number. To refer to any previous value, use @samp{$} followed by the value's history number. The way @code{print} labels its output is designed to remind you of this. Just @code{$} refers to the most recent value in the history, and @code{$$} refers to the value before that. @code{$$@var{n}} refers to the @var{n}th value from the end; @code{$$2} is the value just prior to @code{$$}, @code{$$1} is equivalent to @code{$$}, and @code{$$0} is equivalent to @code{$}. For example, suppose you have just printed a pointer to a structure and want to see the contents of the structure. It suffices to type @smallexample p *$ @end smallexample If you have a chain of structures where the component @code{next} points to the next one, you can print the contents of the next one with this: @smallexample p *$.next @end smallexample @noindent You can print successive links in the chain by repeating this command---which you can do by just typing @key{RET}. Note that the history records values, not expressions. If the value of @code{x} is 4 and you type these commands: @smallexample print x set x=5 @end smallexample @noindent then the value recorded in the value history by the @code{print} command remains 4 even though the value of @code{x} has changed. @table @code @kindex show values @item show values Print the last ten values in the value history, with their item numbers. This is like @samp{p@ $$9} repeated ten times, except that @code{show values} does not change the history. @item show values @var{n} Print ten history values centered on history item number @var{n}. @item show values + Print ten history values just after the values last printed. If no more values are available, @code{show values +} produces no display. @end table Pressing @key{RET} to repeat @code{show values @var{n}} has exactly the same effect as @samp{show values +}. @node Convenience Vars @section Convenience Variables @cindex convenience variables @cindex user-defined variables @value{GDBN} provides @dfn{convenience variables} that you can use within @value{GDBN} to hold on to a value and refer to it later. These variables exist entirely within @value{GDBN}; they are not part of your program, and setting a convenience variable has no direct effect on further execution of your program. That is why you can use them freely. Convenience variables are prefixed with @samp{$}. Any name preceded by @samp{$} can be used for a convenience variable, unless it is one of the predefined machine-specific register names (@pxref{Registers, ,Registers}). (Value history references, in contrast, are @emph{numbers} preceded by @samp{$}. @xref{Value History, ,Value History}.) You can save a value in a convenience variable with an assignment expression, just as you would set a variable in your program. For example: @smallexample set $foo = *object_ptr @end smallexample @noindent would save in @code{$foo} the value contained in the object pointed to by @code{object_ptr}. Using a convenience variable for the first time creates it, but its value is @code{void} until you assign a new value. You can alter the value with another assignment at any time. Convenience variables have no fixed types. You can assign a convenience variable any type of value, including structures and arrays, even if that variable already has a value of a different type. The convenience variable, when used as an expression, has the type of its current value. @table @code @kindex show convenience @cindex show all user variables and functions @item show convenience Print a list of convenience variables used so far, and their values, as well as a list of the convenience functions. Abbreviated @code{show conv}. @kindex init-if-undefined @cindex convenience variables, initializing @item init-if-undefined $@var{variable} = @var{expression} Set a convenience variable if it has not already been set. This is useful for user-defined commands that keep some state. It is similar, in concept, to using local static variables with initializers in C (except that convenience variables are global). It can also be used to allow users to override default values used in a command script. If the variable is already defined then the expression is not evaluated so any side-effects do not occur. @end table One of the ways to use a convenience variable is as a counter to be incremented or a pointer to be advanced. For example, to print a field from successive elements of an array of structures: @smallexample set $i = 0 print bar[$i++]->contents @end smallexample @noindent Repeat that command by typing @key{RET}. Some convenience variables are created automatically by @value{GDBN} and given values likely to be useful. @table @code @vindex $_@r{, convenience variable} @item $_ The variable @code{$_} is automatically set by the @code{x} command to the last address examined (@pxref{Memory, ,Examining Memory}). Other commands which provide a default address for @code{x} to examine also set @code{$_} to that address; these commands include @code{info line} and @code{info breakpoint}. The type of @code{$_} is @code{void *} except when set by the @code{x} command, in which case it is a pointer to the type of @code{$__}. @vindex $__@r{, convenience variable} @item $__ The variable @code{$__} is automatically set by the @code{x} command to the value found in the last address examined. Its type is chosen to match the format in which the data was printed. @item $_exitcode @vindex $_exitcode@r{, convenience variable} The variable @code{$_exitcode} is automatically set to the exit code when the program being debugged terminates. @item $_probe_argc @itemx $_probe_arg0@dots{}$_probe_arg11 Arguments to a static probe. @xref{Static Probe Points}. @item $_sdata @vindex $_sdata@r{, inspect, convenience variable} The variable @code{$_sdata} contains extra collected static tracepoint data. @xref{Tracepoint Actions,,Tracepoint Action Lists}. Note that @code{$_sdata} could be empty, if not inspecting a trace buffer, or if extra static tracepoint data has not been collected. @item $_siginfo @vindex $_siginfo@r{, convenience variable} The variable @code{$_siginfo} contains extra signal information (@pxref{extra signal information}). Note that @code{$_siginfo} could be empty, if the application has not yet received any signals. For example, it will be empty before you execute the @code{run} command. @item $_tlb @vindex $_tlb@r{, convenience variable} The variable @code{$_tlb} is automatically set when debugging applications running on MS-Windows in native mode or connected to gdbserver that supports the @code{qGetTIBAddr} request. @xref{General Query Packets}. This variable contains the address of the thread information block. @end table On HP-UX systems, if you refer to a function or variable name that begins with a dollar sign, @value{GDBN} searches for a user or system name first, before it searches for a convenience variable. @node Convenience Funs @section Convenience Functions @cindex convenience functions @value{GDBN} also supplies some @dfn{convenience functions}. These have a syntax similar to convenience variables. A convenience function can be used in an expression just like an ordinary function; however, a convenience function is implemented internally to @value{GDBN}. These functions require @value{GDBN} to be configured with @code{Python} support. @table @code @item $_memeq(@var{buf1}, @var{buf2}, @var{length}) @findex $_memeq@r{, convenience function} Returns one if the @var{length} bytes at the addresses given by @var{buf1} and @var{buf2} are equal. Otherwise it returns zero. @item $_regex(@var{str}, @var{regex}) @findex $_regex@r{, convenience function} Returns one if the string @var{str} matches the regular expression @var{regex}. Otherwise it returns zero. The syntax of the regular expression is that specified by @code{Python}'s regular expression support. @item $_streq(@var{str1}, @var{str2}) @findex $_streq@r{, convenience function} Returns one if the strings @var{str1} and @var{str2} are equal. Otherwise it returns zero. @item $_strlen(@var{str}) @findex $_strlen@r{, convenience function} Returns the length of string @var{str}. @end table @value{GDBN} provides the ability to list and get help on convenience functions. @table @code @item help function @kindex help function @cindex show all convenience functions Print a list of all convenience functions. @end table @node Registers @section Registers @cindex registers You can refer to machine register contents, in expressions, as variables with names starting with @samp{$}. The names of registers are different for each machine; use @code{info registers} to see the names used on your machine. @table @code @kindex info registers @item info registers Print the names and values of all registers except floating-point and vector registers (in the selected stack frame). @kindex info all-registers @cindex floating point registers @item info all-registers Print the names and values of all registers, including floating-point and vector registers (in the selected stack frame). @item info registers @var{regname} @dots{} Print the @dfn{relativized} value of each specified register @var{regname}. As discussed in detail below, register values are normally relative to the selected stack frame. @var{regname} may be any register name valid on the machine you are using, with or without the initial @samp{$}. @end table @cindex stack pointer register @cindex program counter register @cindex process status register @cindex frame pointer register @cindex standard registers @value{GDBN} has four ``standard'' register names that are available (in expressions) on most machines---whenever they do not conflict with an architecture's canonical mnemonics for registers. The register names @code{$pc} and @code{$sp} are used for the program counter register and the stack pointer. @code{$fp} is used for a register that contains a pointer to the current stack frame, and @code{$ps} is used for a register that contains the processor status. For example, you could print the program counter in hex with @smallexample p/x $pc @end smallexample @noindent or print the instruction to be executed next with @smallexample x/i $pc @end smallexample @noindent or add four to the stack pointer@footnote{This is a way of removing one word from the stack, on machines where stacks grow downward in memory (most machines, nowadays). This assumes that the innermost stack frame is selected; setting @code{$sp} is not allowed when other stack frames are selected. To pop entire frames off the stack, regardless of machine architecture, use @code{return}; see @ref{Returning, ,Returning from a Function}.} with @smallexample set $sp += 4 @end smallexample Whenever possible, these four standard register names are available on your machine even though the machine has different canonical mnemonics, so long as there is no conflict. The @code{info registers} command shows the canonical names. For example, on the SPARC, @code{info registers} displays the processor status register as @code{$psr} but you can also refer to it as @code{$ps}; and on x86-based machines @code{$ps} is an alias for the @sc{eflags} register. @value{GDBN} always considers the contents of an ordinary register as an integer when the register is examined in this way. Some machines have special registers which can hold nothing but floating point; these registers are considered to have floating point values. There is no way to refer to the contents of an ordinary register as floating point value (although you can @emph{print} it as a floating point value with @samp{print/f $@var{regname}}). Some registers have distinct ``raw'' and ``virtual'' data formats. This means that the data format in which the register contents are saved by the operating system is not the same one that your program normally sees. For example, the registers of the 68881 floating point coprocessor are always saved in ``extended'' (raw) format, but all C programs expect to work with ``double'' (virtual) format. In such cases, @value{GDBN} normally works with the virtual format only (the format that makes sense for your program), but the @code{info registers} command prints the data in both formats. @cindex SSE registers (x86) @cindex MMX registers (x86) Some machines have special registers whose contents can be interpreted in several different ways. For example, modern x86-based machines have SSE and MMX registers that can hold several values packed together in several different formats. @value{GDBN} refers to such registers in @code{struct} notation: @smallexample (@value{GDBP}) print $xmm1 $1 = @{ v4_float = @{0, 3.43859137e-038, 1.54142831e-044, 1.821688e-044@}, v2_double = @{9.92129282474342e-303, 2.7585945287983262e-313@}, v16_int8 = "\000\000\000\000\3706;\001\v\000\000\000\r\000\000", v8_int16 = @{0, 0, 14072, 315, 11, 0, 13, 0@}, v4_int32 = @{0, 20657912, 11, 13@}, v2_int64 = @{88725056443645952, 55834574859@}, uint128 = 0x0000000d0000000b013b36f800000000 @} @end smallexample @noindent To set values of such registers, you need to tell @value{GDBN} which view of the register you wish to change, as if you were assigning value to a @code{struct} member: @smallexample (@value{GDBP}) set $xmm1.uint128 = 0x000000000000000000000000FFFFFFFF @end smallexample Normally, register values are relative to the selected stack frame (@pxref{Selection, ,Selecting a Frame}). This means that you get the value that the register would contain if all stack frames farther in were exited and their saved registers restored. In order to see the true contents of hardware registers, you must select the innermost frame (with @samp{frame 0}). However, @value{GDBN} must deduce where registers are saved, from the machine code generated by your compiler. If some registers are not saved, or if @value{GDBN} is unable to locate the saved registers, the selected stack frame makes no difference. @node Floating Point Hardware @section Floating Point Hardware @cindex floating point Depending on the configuration, @value{GDBN} may be able to give you more information about the status of the floating point hardware. @table @code @kindex info float @item info float Display hardware-dependent information about the floating point unit. The exact contents and layout vary depending on the floating point chip. Currently, @samp{info float} is supported on the ARM and x86 machines. @end table @node Vector Unit @section Vector Unit @cindex vector unit Depending on the configuration, @value{GDBN} may be able to give you more information about the status of the vector unit. @table @code @kindex info vector @item info vector Display information about the vector unit. The exact contents and layout vary depending on the hardware. @end table @node OS Information @section Operating System Auxiliary Information @cindex OS information @value{GDBN} provides interfaces to useful OS facilities that can help you debug your program. @cindex auxiliary vector @cindex vector, auxiliary Some operating systems supply an @dfn{auxiliary vector} to programs at startup. This is akin to the arguments and environment that you specify for a program, but contains a system-dependent variety of binary values that tell system libraries important details about the hardware, operating system, and process. Each value's purpose is identified by an integer tag; the meanings are well-known but system-specific. Depending on the configuration and operating system facilities, @value{GDBN} may be able to show you this information. For remote targets, this functionality may further depend on the remote stub's support of the @samp{qXfer:auxv:read} packet, see @ref{qXfer auxiliary vector read}. @table @code @kindex info auxv @item info auxv Display the auxiliary vector of the inferior, which can be either a live process or a core dump file. @value{GDBN} prints each tag value numerically, and also shows names and text descriptions for recognized tags. Some values in the vector are numbers, some bit masks, and some pointers to strings or other data. @value{GDBN} displays each value in the most appropriate form for a recognized tag, and in hexadecimal for an unrecognized tag. @end table On some targets, @value{GDBN} can access operating system-specific information and show it to you. The types of information available will differ depending on the type of operating system running on the target. The mechanism used to fetch the data is described in @ref{Operating System Information}. For remote targets, this functionality depends on the remote stub's support of the @samp{qXfer:osdata:read} packet, see @ref{qXfer osdata read}. @table @code @kindex info os @item info os @var{infotype} Display OS information of the requested type. On @sc{gnu}/Linux, the following values of @var{infotype} are valid: @anchor{linux info os infotypes} @table @code @kindex info os processes @item processes Display the list of processes on the target. For each process, @value{GDBN} prints the process identifier, the name of the user, the command corresponding to the process, and the list of processor cores that the process is currently running on. (To understand what these properties mean, for this and the following info types, please consult the general @sc{gnu}/Linux documentation.) @kindex info os procgroups @item procgroups Display the list of process groups on the target. For each process, @value{GDBN} prints the identifier of the process group that it belongs to, the command corresponding to the process group leader, the process identifier, and the command line of the process. The list is sorted first by the process group identifier, then by the process identifier, so that processes belonging to the same process group are grouped together and the process group leader is listed first. @kindex info os threads @item threads Display the list of threads running on the target. For each thread, @value{GDBN} prints the identifier of the process that the thread belongs to, the command of the process, the thread identifier, and the processor core that it is currently running on. The main thread of a process is not listed. @kindex info os files @item files Display the list of open file descriptors on the target. For each file descriptor, @value{GDBN} prints the identifier of the process owning the descriptor, the command of the owning process, the value of the descriptor, and the target of the descriptor. @kindex info os sockets @item sockets Display the list of Internet-domain sockets on the target. For each socket, @value{GDBN} prints the address and port of the local and remote endpoints, the current state of the connection, the creator of the socket, the IP address family of the socket, and the type of the connection. @kindex info os shm @item shm Display the list of all System V shared-memory regions on the target. For each shared-memory region, @value{GDBN} prints the region key, the shared-memory identifier, the access permissions, the size of the region, the process that created the region, the process that last attached to or detached from the region, the current number of live attaches to the region, and the times at which the region was last attached to, detach from, and changed. @kindex info os semaphores @item semaphores Display the list of all System V semaphore sets on the target. For each semaphore set, @value{GDBN} prints the semaphore set key, the semaphore set identifier, the access permissions, the number of semaphores in the set, the user and group of the owner and creator of the semaphore set, and the times at which the semaphore set was operated upon and changed. @kindex info os msg @item msg Display the list of all System V message queues on the target. For each message queue, @value{GDBN} prints the message queue key, the message queue identifier, the access permissions, the current number of bytes on the queue, the current number of messages on the queue, the processes that last sent and received a message on the queue, the user and group of the owner and creator of the message queue, the times at which a message was last sent and received on the queue, and the time at which the message queue was last changed. @kindex info os modules @item modules Display the list of all loaded kernel modules on the target. For each module, @value{GDBN} prints the module name, the size of the module in bytes, the number of times the module is used, the dependencies of the module, the status of the module, and the address of the loaded module in memory. @end table @item info os If @var{infotype} is omitted, then list the possible values for @var{infotype} and the kind of OS information available for each @var{infotype}. If the target does not return a list of possible types, this command will report an error. @end table @node Memory Region Attributes @section Memory Region Attributes @cindex memory region attributes @dfn{Memory region attributes} allow you to describe special handling required by regions of your target's memory. @value{GDBN} uses attributes to determine whether to allow certain types of memory accesses; whether to use specific width accesses; and whether to cache target memory. By default the description of memory regions is fetched from the target (if the current target supports this), but the user can override the fetched regions. Defined memory regions can be individually enabled and disabled. When a memory region is disabled, @value{GDBN} uses the default attributes when accessing memory in that region. Similarly, if no memory regions have been defined, @value{GDBN} uses the default attributes when accessing all memory. When a memory region is defined, it is given a number to identify it; to enable, disable, or remove a memory region, you specify that number. @table @code @kindex mem @item mem @var{lower} @var{upper} @var{attributes}@dots{} Define a memory region bounded by @var{lower} and @var{upper} with attributes @var{attributes}@dots{}, and add it to the list of regions monitored by @value{GDBN}. Note that @var{upper} == 0 is a special case: it is treated as the target's maximum memory address. (0xffff on 16 bit targets, 0xffffffff on 32 bit targets, etc.) @item mem auto Discard any user changes to the memory regions and use target-supplied regions, if available, or no regions if the target does not support. @kindex delete mem @item delete mem @var{nums}@dots{} Remove memory regions @var{nums}@dots{} from the list of regions monitored by @value{GDBN}. @kindex disable mem @item disable mem @var{nums}@dots{} Disable monitoring of memory regions @var{nums}@dots{}. A disabled memory region is not forgotten. It may be enabled again later. @kindex enable mem @item enable mem @var{nums}@dots{} Enable monitoring of memory regions @var{nums}@dots{}. @kindex info mem @item info mem Print a table of all defined memory regions, with the following columns for each region: @table @emph @item Memory Region Number @item Enabled or Disabled. Enabled memory regions are marked with @samp{y}. Disabled memory regions are marked with @samp{n}. @item Lo Address The address defining the inclusive lower bound of the memory region. @item Hi Address The address defining the exclusive upper bound of the memory region. @item Attributes The list of attributes set for this memory region. @end table @end table @subsection Attributes @subsubsection Memory Access Mode The access mode attributes set whether @value{GDBN} may make read or write accesses to a memory region. While these attributes prevent @value{GDBN} from performing invalid memory accesses, they do nothing to prevent the target system, I/O DMA, etc.@: from accessing memory. @table @code @item ro Memory is read only. @item wo Memory is write only. @item rw Memory is read/write. This is the default. @end table @subsubsection Memory Access Size The access size attribute tells @value{GDBN} to use specific sized accesses in the memory region. Often memory mapped device registers require specific sized accesses. If no access size attribute is specified, @value{GDBN} may use accesses of any size. @table @code @item 8 Use 8 bit memory accesses. @item 16 Use 16 bit memory accesses. @item 32 Use 32 bit memory accesses. @item 64 Use 64 bit memory accesses. @end table @c @subsubsection Hardware/Software Breakpoints @c The hardware/software breakpoint attributes set whether @value{GDBN} @c will use hardware or software breakpoints for the internal breakpoints @c used by the step, next, finish, until, etc. commands. @c @c @table @code @c @item hwbreak @c Always use hardware breakpoints @c @item swbreak (default) @c @end table @subsubsection Data Cache The data cache attributes set whether @value{GDBN} will cache target memory. While this generally improves performance by reducing debug protocol overhead, it can lead to incorrect results because @value{GDBN} does not know about volatile variables or memory mapped device registers. @table @code @item cache Enable @value{GDBN} to cache target memory. @item nocache Disable @value{GDBN} from caching target memory. This is the default. @end table @subsection Memory Access Checking @value{GDBN} can be instructed to refuse accesses to memory that is not explicitly described. This can be useful if accessing such regions has undesired effects for a specific target, or to provide better error checking. The following commands control this behaviour. @table @code @kindex set mem inaccessible-by-default @item set mem inaccessible-by-default [on|off] If @code{on} is specified, make @value{GDBN} treat memory not explicitly described by the memory ranges as non-existent and refuse accesses to such memory. The checks are only performed if there's at least one memory range defined. If @code{off} is specified, make @value{GDBN} treat the memory not explicitly described by the memory ranges as RAM. The default value is @code{on}. @kindex show mem inaccessible-by-default @item show mem inaccessible-by-default Show the current handling of accesses to unknown memory. @end table @c @subsubsection Memory Write Verification @c The memory write verification attributes set whether @value{GDBN} @c will re-reads data after each write to verify the write was successful. @c @c @table @code @c @item verify @c @item noverify (default) @c @end table @node Dump/Restore Files @section Copy Between Memory and a File @cindex dump/restore files @cindex append data to a file @cindex dump data to a file @cindex restore data from a file You can use the commands @code{dump}, @code{append}, and @code{restore} to copy data between target memory and a file. The @code{dump} and @code{append} commands write data to a file, and the @code{restore} command reads data from a file back into the inferior's memory. Files may be in binary, Motorola S-record, Intel hex, or Tektronix Hex format; however, @value{GDBN} can only append to binary files. @table @code @kindex dump @item dump @r{[}@var{format}@r{]} memory @var{filename} @var{start_addr} @var{end_addr} @itemx dump @r{[}@var{format}@r{]} value @var{filename} @var{expr} Dump the contents of memory from @var{start_addr} to @var{end_addr}, or the value of @var{expr}, to @var{filename} in the given format. The @var{format} parameter may be any one of: @table @code @item binary Raw binary form. @item ihex Intel hex format. @item srec Motorola S-record format. @item tekhex Tektronix Hex format. @end table @value{GDBN} uses the same definitions of these formats as the @sc{gnu} binary utilities, like @samp{objdump} and @samp{objcopy}. If @var{format} is omitted, @value{GDBN} dumps the data in raw binary form. @kindex append @item append @r{[}binary@r{]} memory @var{filename} @var{start_addr} @var{end_addr} @itemx append @r{[}binary@r{]} value @var{filename} @var{expr} Append the contents of memory from @var{start_addr} to @var{end_addr}, or the value of @var{expr}, to the file @var{filename}, in raw binary form. (@value{GDBN} can only append data to files in raw binary form.) @kindex restore @item restore @var{filename} @r{[}binary@r{]} @var{bias} @var{start} @var{end} Restore the contents of file @var{filename} into memory. The @code{restore} command can automatically recognize any known @sc{bfd} file format, except for raw binary. To restore a raw binary file you must specify the optional keyword @code{binary} after the filename. If @var{bias} is non-zero, its value will be added to the addresses contained in the file. Binary files always start at address zero, so they will be restored at address @var{bias}. Other bfd files have a built-in location; they will be restored at offset @var{bias} from that location. If @var{start} and/or @var{end} are non-zero, then only data between file offset @var{start} and file offset @var{end} will be restored. These offsets are relative to the addresses in the file, before the @var{bias} argument is applied. @end table @node Core File Generation @section How to Produce a Core File from Your Program @cindex dump core from inferior A @dfn{core file} or @dfn{core dump} is a file that records the memory image of a running process and its process status (register values etc.). Its primary use is post-mortem debugging of a program that crashed while it ran outside a debugger. A program that crashes automatically produces a core file, unless this feature is disabled by the user. @xref{Files}, for information on invoking @value{GDBN} in the post-mortem debugging mode. Occasionally, you may wish to produce a core file of the program you are debugging in order to preserve a snapshot of its state. @value{GDBN} has a special command for that. @table @code @kindex gcore @kindex generate-core-file @item generate-core-file [@var{file}] @itemx gcore [@var{file}] Produce a core dump of the inferior process. The optional argument @var{file} specifies the file name where to put the core dump. If not specified, the file name defaults to @file{core.@var{pid}}, where @var{pid} is the inferior process ID. Note that this command is implemented only for some systems (as of this writing, @sc{gnu}/Linux, FreeBSD, Solaris, and S390). @end table @node Character Sets @section Character Sets @cindex character sets @cindex charset @cindex translating between character sets @cindex host character set @cindex target character set If the program you are debugging uses a different character set to represent characters and strings than the one @value{GDBN} uses itself, @value{GDBN} can automatically translate between the character sets for you. The character set @value{GDBN} uses we call the @dfn{host character set}; the one the inferior program uses we call the @dfn{target character set}. For example, if you are running @value{GDBN} on a @sc{gnu}/Linux system, which uses the ISO Latin 1 character set, but you are using @value{GDBN}'s remote protocol (@pxref{Remote Debugging}) to debug a program running on an IBM mainframe, which uses the @sc{ebcdic} character set, then the host character set is Latin-1, and the target character set is @sc{ebcdic}. If you give @value{GDBN} the command @code{set target-charset EBCDIC-US}, then @value{GDBN} translates between @sc{ebcdic} and Latin 1 as you print character or string values, or use character and string literals in expressions. @value{GDBN} has no way to automatically recognize which character set the inferior program uses; you must tell it, using the @code{set target-charset} command, described below. Here are the commands for controlling @value{GDBN}'s character set support: @table @code @item set target-charset @var{charset} @kindex set target-charset Set the current target character set to @var{charset}. To display the list of supported target character sets, type @kbd{@w{set target-charset @key{TAB}@key{TAB}}}. @item set host-charset @var{charset} @kindex set host-charset Set the current host character set to @var{charset}. By default, @value{GDBN} uses a host character set appropriate to the system it is running on; you can override that default using the @code{set host-charset} command. On some systems, @value{GDBN} cannot automatically determine the appropriate host character set. In this case, @value{GDBN} uses @samp{UTF-8}. @value{GDBN} can only use certain character sets as its host character set. If you type @kbd{@w{set host-charset @key{TAB}@key{TAB}}}, @value{GDBN} will list the host character sets it supports. @item set charset @var{charset} @kindex set charset Set the current host and target character sets to @var{charset}. As above, if you type @kbd{@w{set charset @key{TAB}@key{TAB}}}, @value{GDBN} will list the names of the character sets that can be used for both host and target. @item show charset @kindex show charset Show the names of the current host and target character sets. @item show host-charset @kindex show host-charset Show the name of the current host character set. @item show target-charset @kindex show target-charset Show the name of the current target character set. @item set target-wide-charset @var{charset} @kindex set target-wide-charset Set the current target's wide character set to @var{charset}. This is the character set used by the target's @code{wchar_t} type. To display the list of supported wide character sets, type @kbd{@w{set target-wide-charset @key{TAB}@key{TAB}}}. @item show target-wide-charset @kindex show target-wide-charset Show the name of the current target's wide character set. @end table Here is an example of @value{GDBN}'s character set support in action. Assume that the following source code has been placed in the file @file{charset-test.c}: @smallexample #include char ascii_hello[] = @{72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 33, 10, 0@}; char ibm1047_hello[] = @{200, 133, 147, 147, 150, 107, 64, 166, 150, 153, 147, 132, 90, 37, 0@}; main () @{ printf ("Hello, world!\n"); @} @end smallexample In this program, @code{ascii_hello} and @code{ibm1047_hello} are arrays containing the string @samp{Hello, world!} followed by a newline, encoded in the @sc{ascii} and @sc{ibm1047} character sets. We compile the program, and invoke the debugger on it: @smallexample $ gcc -g charset-test.c -o charset-test $ gdb -nw charset-test GNU gdb 2001-12-19-cvs Copyright 2001 Free Software Foundation, Inc. @dots{} (@value{GDBP}) @end smallexample We can use the @code{show charset} command to see what character sets @value{GDBN} is currently using to interpret and display characters and strings: @smallexample (@value{GDBP}) show charset The current host and target character set is `ISO-8859-1'. (@value{GDBP}) @end smallexample For the sake of printing this manual, let's use @sc{ascii} as our initial character set: @smallexample (@value{GDBP}) set charset ASCII (@value{GDBP}) show charset The current host and target character set is `ASCII'. (@value{GDBP}) @end smallexample Let's assume that @sc{ascii} is indeed the correct character set for our host system --- in other words, let's assume that if @value{GDBN} prints characters using the @sc{ascii} character set, our terminal will display them properly. Since our current target character set is also @sc{ascii}, the contents of @code{ascii_hello} print legibly: @smallexample (@value{GDBP}) print ascii_hello $1 = 0x401698 "Hello, world!\n" (@value{GDBP}) print ascii_hello[0] $2 = 72 'H' (@value{GDBP}) @end smallexample @value{GDBN} uses the target character set for character and string literals you use in expressions: @smallexample (@value{GDBP}) print '+' $3 = 43 '+' (@value{GDBP}) @end smallexample The @sc{ascii} character set uses the number 43 to encode the @samp{+} character. @value{GDBN} relies on the user to tell it which character set the target program uses. If we print @code{ibm1047_hello} while our target character set is still @sc{ascii}, we get jibberish: @smallexample (@value{GDBP}) print ibm1047_hello $4 = 0x4016a8 "\310\205\223\223\226k@@\246\226\231\223\204Z%" (@value{GDBP}) print ibm1047_hello[0] $5 = 200 '\310' (@value{GDBP}) @end smallexample If we invoke the @code{set target-charset} followed by @key{TAB}@key{TAB}, @value{GDBN} tells us the character sets it supports: @smallexample (@value{GDBP}) set target-charset ASCII EBCDIC-US IBM1047 ISO-8859-1 (@value{GDBP}) set target-charset @end smallexample We can select @sc{ibm1047} as our target character set, and examine the program's strings again. Now the @sc{ascii} string is wrong, but @value{GDBN} translates the contents of @code{ibm1047_hello} from the target character set, @sc{ibm1047}, to the host character set, @sc{ascii}, and they display correctly: @smallexample (@value{GDBP}) set target-charset IBM1047 (@value{GDBP}) show charset The current host character set is `ASCII'. The current target character set is `IBM1047'. (@value{GDBP}) print ascii_hello $6 = 0x401698 "\110\145%%?\054\040\167?\162%\144\041\012" (@value{GDBP}) print ascii_hello[0] $7 = 72 '\110' (@value{GDBP}) print ibm1047_hello $8 = 0x4016a8 "Hello, world!\n" (@value{GDBP}) print ibm1047_hello[0] $9 = 200 'H' (@value{GDBP}) @end smallexample As above, @value{GDBN} uses the target character set for character and string literals you use in expressions: @smallexample (@value{GDBP}) print '+' $10 = 78 '+' (@value{GDBP}) @end smallexample The @sc{ibm1047} character set uses the number 78 to encode the @samp{+} character. @node Caching Remote Data @section Caching Data of Remote Targets @cindex caching data of remote targets @value{GDBN} caches data exchanged between the debugger and a remote target (@pxref{Remote Debugging}). Such caching generally improves performance, because it reduces the overhead of the remote protocol by bundling memory reads and writes into large chunks. Unfortunately, simply caching everything would lead to incorrect results, since @value{GDBN} does not necessarily know anything about volatile values, memory-mapped I/O addresses, etc. Furthermore, in non-stop mode (@pxref{Non-Stop Mode}) memory can be changed @emph{while} a gdb command is executing. Therefore, by default, @value{GDBN} only caches data known to be on the stack@footnote{In non-stop mode, it is moderately rare for a running thread to modify the stack of a stopped thread in a way that would interfere with a backtrace, and caching of stack reads provides a significant speed up of remote backtraces.}. Other regions of memory can be explicitly marked as cacheable; see @pxref{Memory Region Attributes}. @table @code @kindex set remotecache @item set remotecache on @itemx set remotecache off This option no longer does anything; it exists for compatibility with old scripts. @kindex show remotecache @item show remotecache Show the current state of the obsolete remotecache flag. @kindex set stack-cache @item set stack-cache on @itemx set stack-cache off Enable or disable caching of stack accesses. When @code{ON}, use caching. By default, this option is @code{ON}. @kindex show stack-cache @item show stack-cache Show the current state of data caching for memory accesses. @kindex info dcache @item info dcache @r{[}line@r{]} Print the information about the data cache performance. The information displayed includes the dcache width and depth, and for each cache line, its number, address, and how many times it was referenced. This command is useful for debugging the data cache operation. If a line number is specified, the contents of that line will be printed in hex. @item set dcache size @var{size} @cindex dcache size @kindex set dcache size Set maximum number of entries in dcache (dcache depth above). @item set dcache line-size @var{line-size} @cindex dcache line-size @kindex set dcache line-size Set number of bytes each dcache entry caches (dcache width above). Must be a power of 2. @item show dcache size @kindex show dcache size Show maximum number of dcache entries. See also @ref{Caching Remote Data, info dcache}. @item show dcache line-size @kindex show dcache line-size Show default size of dcache lines. See also @ref{Caching Remote Data, info dcache}. @end table @node Searching Memory @section Search Memory @cindex searching memory Memory can be searched for a particular sequence of bytes with the @code{find} command. @table @code @kindex find @item find @r{[}/@var{sn}@r{]} @var{start_addr}, +@var{len}, @var{val1} @r{[}, @var{val2}, @dots{}@r{]} @itemx find @r{[}/@var{sn}@r{]} @var{start_addr}, @var{end_addr}, @var{val1} @r{[}, @var{val2}, @dots{}@r{]} Search memory for the sequence of bytes specified by @var{val1}, @var{val2}, etc. The search begins at address @var{start_addr} and continues for either @var{len} bytes or through to @var{end_addr} inclusive. @end table @var{s} and @var{n} are optional parameters. They may be specified in either order, apart or together. @table @r @item @var{s}, search query size The size of each search query value. @table @code @item b bytes @item h halfwords (two bytes) @item w words (four bytes) @item g giant words (eight bytes) @end table All values are interpreted in the current language. This means, for example, that if the current source language is C/C@t{++} then searching for the string ``hello'' includes the trailing '\0'. If the value size is not specified, it is taken from the value's type in the current language. This is useful when one wants to specify the search pattern as a mixture of types. Note that this means, for example, that in the case of C-like languages a search for an untyped 0x42 will search for @samp{(int) 0x42} which is typically four bytes. @item @var{n}, maximum number of finds The maximum number of matches to print. The default is to print all finds. @end table You can use strings as search values. Quote them with double-quotes (@code{"}). The string value is copied into the search pattern byte by byte, regardless of the endianness of the target and the size specification. The address of each match found is printed as well as a count of the number of matches found. The address of the last value found is stored in convenience variable @samp{$_}. A count of the number of matches is stored in @samp{$numfound}. For example, if stopped at the @code{printf} in this function: @smallexample void hello () @{ static char hello[] = "hello-hello"; static struct @{ char c; short s; int i; @} __attribute__ ((packed)) mixed = @{ 'c', 0x1234, 0x87654321 @}; printf ("%s\n", hello); @} @end smallexample @noindent you get during debugging: @smallexample (gdb) find &hello[0], +sizeof(hello), "hello" 0x804956d 1 pattern found (gdb) find &hello[0], +sizeof(hello), 'h', 'e', 'l', 'l', 'o' 0x8049567 0x804956d 2 patterns found (gdb) find /b1 &hello[0], +sizeof(hello), 'h', 0x65, 'l' 0x8049567 1 pattern found (gdb) find &mixed, +sizeof(mixed), (char) 'c', (short) 0x1234, (int) 0x87654321 0x8049560 1 pattern found (gdb) print $numfound $1 = 1 (gdb) print $_ $2 = (void *) 0x8049560 @end smallexample @node Optimized Code @chapter Debugging Optimized Code @cindex optimized code, debugging @cindex debugging optimized code Almost all compilers support optimization. With optimization disabled, the compiler generates assembly code that corresponds directly to your source code, in a simplistic way. As the compiler applies more powerful optimizations, the generated assembly code diverges from your original source code. With help from debugging information generated by the compiler, @value{GDBN} can map from the running program back to constructs from your original source. @value{GDBN} is more accurate with optimization disabled. If you can recompile without optimization, it is easier to follow the progress of your program during debugging. But, there are many cases where you may need to debug an optimized version. When you debug a program compiled with @samp{-g -O}, remember that the optimizer has rearranged your code; the debugger shows you what is really there. Do not be too surprised when the execution path does not exactly match your source file! An extreme example: if you define a variable, but never use it, @value{GDBN} never sees that variable---because the compiler optimizes it out of existence. Some things do not work as well with @samp{-g -O} as with just @samp{-g}, particularly on machines with instruction scheduling. If in doubt, recompile with @samp{-g} alone, and if this fixes the problem, please report it to us as a bug (including a test case!). @xref{Variables}, for more information about debugging optimized code. @menu * Inline Functions:: How @value{GDBN} presents inlining * Tail Call Frames:: @value{GDBN} analysis of jumps to functions @end menu @node Inline Functions @section Inline Functions @cindex inline functions, debugging @dfn{Inlining} is an optimization that inserts a copy of the function body directly at each call site, instead of jumping to a shared routine. @value{GDBN} displays inlined functions just like non-inlined functions. They appear in backtraces. You can view their arguments and local variables, step into them with @code{step}, skip them with @code{next}, and escape from them with @code{finish}. You can check whether a function was inlined by using the @code{info frame} command. For @value{GDBN} to support inlined functions, the compiler must record information about inlining in the debug information --- @value{NGCC} using the @sc{dwarf 2} format does this, and several other compilers do also. @value{GDBN} only supports inlined functions when using @sc{dwarf 2}. Versions of @value{NGCC} before 4.1 do not emit two required attributes (@samp{DW_AT_call_file} and @samp{DW_AT_call_line}); @value{GDBN} does not display inlined function calls with earlier versions of @value{NGCC}. It instead displays the arguments and local variables of inlined functions as local variables in the caller. The body of an inlined function is directly included at its call site; unlike a non-inlined function, there are no instructions devoted to the call. @value{GDBN} still pretends that the call site and the start of the inlined function are different instructions. Stepping to the call site shows the call site, and then stepping again shows the first line of the inlined function, even though no additional instructions are executed. This makes source-level debugging much clearer; you can see both the context of the call and then the effect of the call. Only stepping by a single instruction using @code{stepi} or @code{nexti} does not do this; single instruction steps always show the inlined body. There are some ways that @value{GDBN} does not pretend that inlined function calls are the same as normal calls: @itemize @bullet @item Setting breakpoints at the call site of an inlined function may not work, because the call site does not contain any code. @value{GDBN} may incorrectly move the breakpoint to the next line of the enclosing function, after the call. This limitation will be removed in a future version of @value{GDBN}; until then, set a breakpoint on an earlier line or inside the inlined function instead. @item @value{GDBN} cannot locate the return value of inlined calls after using the @code{finish} command. This is a limitation of compiler-generated debugging information; after @code{finish}, you can step to the next line and print a variable where your program stored the return value. @end itemize @node Tail Call Frames @section Tail Call Frames @cindex tail call frames, debugging Function @code{B} can call function @code{C} in its very last statement. In unoptimized compilation the call of @code{C} is immediately followed by return instruction at the end of @code{B} code. Optimizing compiler may replace the call and return in function @code{B} into one jump to function @code{C} instead. Such use of a jump instruction is called @dfn{tail call}. During execution of function @code{C}, there will be no indication in the function call stack frames that it was tail-called from @code{B}. If function @code{A} regularly calls function @code{B} which tail-calls function @code{C}, then @value{GDBN} will see @code{A} as the caller of @code{C}. However, in some cases @value{GDBN} can determine that @code{C} was tail-called from @code{B}, and it will then create fictitious call frame for that, with the return address set up as if @code{B} called @code{C} normally. This functionality is currently supported only by DWARF 2 debugging format and the compiler has to produce @samp{DW_TAG_GNU_call_site} tags. With @value{NGCC}, you need to specify @option{-O -g} during compilation, to get this information. @kbd{info frame} command (@pxref{Frame Info}) will indicate the tail call frame kind by text @code{tail call frame} such as in this sample @value{GDBN} output: @smallexample (gdb) x/i $pc - 2 0x40066b : jmp 0x400640 (gdb) info frame Stack level 1, frame at 0x7fffffffda30: rip = 0x40066d in b (amd64-entry-value.cc:59); saved rip 0x4004c5 tail call frame, caller of frame at 0x7fffffffda30 source language c++. Arglist at unknown address. Locals at unknown address, Previous frame's sp is 0x7fffffffda30 @end smallexample The detection of all the possible code path executions can find them ambiguous. There is no execution history stored (possible @ref{Reverse Execution} is never used for this purpose) and the last known caller could have reached the known callee by multiple different jump sequences. In such case @value{GDBN} still tries to show at least all the unambiguous top tail callers and all the unambiguous bottom tail calees, if any. @table @code @anchor{set debug entry-values} @item set debug entry-values @kindex set debug entry-values When set to on, enables printing of analysis messages for both frame argument values at function entry and tail calls. It will show all the possible valid tail calls code paths it has considered. It will also print the intersection of them with the final unambiguous (possibly partial or even empty) code path result. @item show debug entry-values @kindex show debug entry-values Show the current state of analysis messages printing for both frame argument values at function entry and tail calls. @end table The analysis messages for tail calls can for example show why the virtual tail call frame for function @code{c} has not been recognized (due to the indirect reference by variable @code{x}): @smallexample static void __attribute__((noinline, noclone)) c (void); void (*x) (void) = c; static void __attribute__((noinline, noclone)) a (void) @{ x++; @} static void __attribute__((noinline, noclone)) c (void) @{ a (); @} int main (void) @{ x (); return 0; @} Breakpoint 1, DW_OP_GNU_entry_value resolving cannot find DW_TAG_GNU_call_site 0x40039a in main a () at t.c:3 3 static void __attribute__((noinline, noclone)) a (void) @{ x++; @} (gdb) bt #0 a () at t.c:3 #1 0x000000000040039a in main () at t.c:5 @end smallexample Another possibility is an ambiguous virtual tail call frames resolution: @smallexample int i; static void __attribute__((noinline, noclone)) f (void) @{ i++; @} static void __attribute__((noinline, noclone)) e (void) @{ f (); @} static void __attribute__((noinline, noclone)) d (void) @{ f (); @} static void __attribute__((noinline, noclone)) c (void) @{ d (); @} static void __attribute__((noinline, noclone)) b (void) @{ if (i) c (); else e (); @} static void __attribute__((noinline, noclone)) a (void) @{ b (); @} int main (void) @{ a (); return 0; @} tailcall: initial: 0x4004d2(a) 0x4004ce(b) 0x4004b2(c) 0x4004a2(d) tailcall: compare: 0x4004d2(a) 0x4004cc(b) 0x400492(e) tailcall: reduced: 0x4004d2(a) | (gdb) bt #0 f () at t.c:2 #1 0x00000000004004d2 in a () at t.c:8 #2 0x0000000000400395 in main () at t.c:9 @end smallexample @set CALLSEQ1A @code{main@value{ARROW}a@value{ARROW}b@value{ARROW}c@value{ARROW}d@value{ARROW}f} @set CALLSEQ2A @code{main@value{ARROW}a@value{ARROW}b@value{ARROW}e@value{ARROW}f} @c Convert CALLSEQ#A to CALLSEQ#B depending on HAVE_MAKEINFO_CLICK. @ifset HAVE_MAKEINFO_CLICK @set ARROW @click{} @set CALLSEQ1B @clicksequence{@value{CALLSEQ1A}} @set CALLSEQ2B @clicksequence{@value{CALLSEQ2A}} @end ifset @ifclear HAVE_MAKEINFO_CLICK @set ARROW -> @set CALLSEQ1B @value{CALLSEQ1A} @set CALLSEQ2B @value{CALLSEQ2A} @end ifclear Frames #0 and #2 are real, #1 is a virtual tail call frame. The code can have possible execution paths @value{CALLSEQ1B} or @value{CALLSEQ2B}, @value{GDBN} cannot find which one from the inferior state. @code{initial:} state shows some random possible calling sequence @value{GDBN} has found. It then finds another possible calling sequcen - that one is prefixed by @code{compare:}. The non-ambiguous intersection of these two is printed as the @code{reduced:} calling sequence. That one could have many futher @code{compare:} and @code{reduced:} statements as long as there remain any non-ambiguous sequence entries. For the frame of function @code{b} in both cases there are different possible @code{$pc} values (@code{0x4004cc} or @code{0x4004ce}), therefore this frame is also ambigous. The only non-ambiguous frame is the one for function @code{a}, therefore this one is displayed to the user while the ambiguous frames are omitted. There can be also reasons why printing of frame argument values at function entry may fail: @smallexample int v; static void __attribute__((noinline, noclone)) c (int i) @{ v++; @} static void __attribute__((noinline, noclone)) a (int i); static void __attribute__((noinline, noclone)) b (int i) @{ a (i); @} static void __attribute__((noinline, noclone)) a (int i) @{ if (i) b (i - 1); else c (0); @} int main (void) @{ a (5); return 0; @} (gdb) bt #0 c (i=i@@entry=0) at t.c:2 #1 0x0000000000400428 in a (DW_OP_GNU_entry_value resolving has found function "a" at 0x400420 can call itself via tail calls i=) at t.c:6 #2 0x000000000040036e in main () at t.c:7 @end smallexample @value{GDBN} cannot find out from the inferior state if and how many times did function @code{a} call itself (via function @code{b}) as these calls would be tail calls. Such tail calls would modify thue @code{i} variable, therefore @value{GDBN} cannot be sure the value it knows would be right - @value{GDBN} prints @code{} instead. @node Macros @chapter C Preprocessor Macros Some languages, such as C and C@t{++}, provide a way to define and invoke ``preprocessor macros'' which expand into strings of tokens. @value{GDBN} can evaluate expressions containing macro invocations, show the result of macro expansion, and show a macro's definition, including where it was defined. You may need to compile your program specially to provide @value{GDBN} with information about preprocessor macros. Most compilers do not include macros in their debugging information, even when you compile with the @option{-g} flag. @xref{Compilation}. A program may define a macro at one point, remove that definition later, and then provide a different definition after that. Thus, at different points in the program, a macro may have different definitions, or have no definition at all. If there is a current stack frame, @value{GDBN} uses the macros in scope at that frame's source code line. Otherwise, @value{GDBN} uses the macros in scope at the current listing location; see @ref{List}. Whenever @value{GDBN} evaluates an expression, it always expands any macro invocations present in the expression. @value{GDBN} also provides the following commands for working with macros explicitly. @table @code @kindex macro expand @cindex macro expansion, showing the results of preprocessor @cindex preprocessor macro expansion, showing the results of @cindex expanding preprocessor macros @item macro expand @var{expression} @itemx macro exp @var{expression} Show the results of expanding all preprocessor macro invocations in @var{expression}. Since @value{GDBN} simply expands macros, but does not parse the result, @var{expression} need not be a valid expression; it can be any string of tokens. @kindex macro exp1 @item macro expand-once @var{expression} @itemx macro exp1 @var{expression} @cindex expand macro once @i{(This command is not yet implemented.)} Show the results of expanding those preprocessor macro invocations that appear explicitly in @var{expression}. Macro invocations appearing in that expansion are left unchanged. This command allows you to see the effect of a particular macro more clearly, without being confused by further expansions. Since @value{GDBN} simply expands macros, but does not parse the result, @var{expression} need not be a valid expression; it can be any string of tokens. @kindex info macro @cindex macro definition, showing @cindex definition of a macro, showing @cindex macros, from debug info @item info macro [-a|-all] [--] @var{macro} Show the current definition or all definitions of the named @var{macro}, and describe the source location or compiler command-line where that definition was established. The optional double dash is to signify the end of argument processing and the beginning of @var{macro} for non C-like macros where the macro may begin with a hyphen. @kindex info macros @item info macros @var{linespec} Show all macro definitions that are in effect at the location specified by @var{linespec}, and describe the source location or compiler command-line where those definitions were established. @kindex macro define @cindex user-defined macros @cindex defining macros interactively @cindex macros, user-defined @item macro define @var{macro} @var{replacement-list} @itemx macro define @var{macro}(@var{arglist}) @var{replacement-list} Introduce a definition for a preprocessor macro named @var{macro}, invocations of which are replaced by the tokens given in @var{replacement-list}. The first form of this command defines an ``object-like'' macro, which takes no arguments; the second form defines a ``function-like'' macro, which takes the arguments given in @var{arglist}. A definition introduced by this command is in scope in every expression evaluated in @value{GDBN}, until it is removed with the @code{macro undef} command, described below. The definition overrides all definitions for @var{macro} present in the program being debugged, as well as any previous user-supplied definition. @kindex macro undef @item macro undef @var{macro} Remove any user-supplied definition for the macro named @var{macro}. This command only affects definitions provided with the @code{macro define} command, described above; it cannot remove definitions present in the program being debugged. @kindex macro list @item macro list List all the macros defined using the @code{macro define} command. @end table @cindex macros, example of debugging with Here is a transcript showing the above commands in action. First, we show our source files: @smallexample $ cat sample.c #include #include "sample.h" #define M 42 #define ADD(x) (M + x) main () @{ #define N 28 printf ("Hello, world!\n"); #undef N printf ("We're so creative.\n"); #define N 1729 printf ("Goodbye, world!\n"); @} $ cat sample.h #define Q < $ @end smallexample Now, we compile the program using the @sc{gnu} C compiler, @value{NGCC}. We pass the @option{-gdwarf-2}@footnote{This is the minimum. Recent versions of @value{NGCC} support @option{-gdwarf-3} and @option{-gdwarf-4}; we recommend always choosing the most recent version of DWARF.} @emph{and} @option{-g3} flags to ensure the compiler includes information about preprocessor macros in the debugging information. @smallexample $ gcc -gdwarf-2 -g3 sample.c -o sample $ @end smallexample Now, we start @value{GDBN} on our sample program: @smallexample $ gdb -nw sample GNU gdb 2002-05-06-cvs Copyright 2002 Free Software Foundation, Inc. GDB is free software, @dots{} (@value{GDBP}) @end smallexample We can expand macros and examine their definitions, even when the program is not running. @value{GDBN} uses the current listing position to decide which macro definitions are in scope: @smallexample (@value{GDBP}) list main 3 4 #define M 42 5 #define ADD(x) (M + x) 6 7 main () 8 @{ 9 #define N 28 10 printf ("Hello, world!\n"); 11 #undef N 12 printf ("We're so creative.\n"); (@value{GDBP}) info macro ADD Defined at /home/jimb/gdb/macros/play/sample.c:5 #define ADD(x) (M + x) (@value{GDBP}) info macro Q Defined at /home/jimb/gdb/macros/play/sample.h:1 included at /home/jimb/gdb/macros/play/sample.c:2 #define Q < (@value{GDBP}) macro expand ADD(1) expands to: (42 + 1) (@value{GDBP}) macro expand-once ADD(1) expands to: once (M + 1) (@value{GDBP}) @end smallexample In the example above, note that @code{macro expand-once} expands only the macro invocation explicit in the original text --- the invocation of @code{ADD} --- but does not expand the invocation of the macro @code{M}, which was introduced by @code{ADD}. Once the program is running, @value{GDBN} uses the macro definitions in force at the source line of the current stack frame: @smallexample (@value{GDBP}) break main Breakpoint 1 at 0x8048370: file sample.c, line 10. (@value{GDBP}) run Starting program: /home/jimb/gdb/macros/play/sample Breakpoint 1, main () at sample.c:10 10 printf ("Hello, world!\n"); (@value{GDBP}) @end smallexample At line 10, the definition of the macro @code{N} at line 9 is in force: @smallexample (@value{GDBP}) info macro N Defined at /home/jimb/gdb/macros/play/sample.c:9 #define N 28 (@value{GDBP}) macro expand N Q M expands to: 28 < 42 (@value{GDBP}) print N Q M $1 = 1 (@value{GDBP}) @end smallexample As we step over directives that remove @code{N}'s definition, and then give it a new definition, @value{GDBN} finds the definition (or lack thereof) in force at each point: @smallexample (@value{GDBP}) next Hello, world! 12 printf ("We're so creative.\n"); (@value{GDBP}) info macro N The symbol `N' has no definition as a C/C++ preprocessor macro at /home/jimb/gdb/macros/play/sample.c:12 (@value{GDBP}) next We're so creative. 14 printf ("Goodbye, world!\n"); (@value{GDBP}) info macro N Defined at /home/jimb/gdb/macros/play/sample.c:13 #define N 1729 (@value{GDBP}) macro expand N Q M expands to: 1729 < 42 (@value{GDBP}) print N Q M $2 = 0 (@value{GDBP}) @end smallexample In addition to source files, macros can be defined on the compilation command line using the @option{-D@var{name}=@var{value}} syntax. For macros defined in such a way, @value{GDBN} displays the location of their definition as line zero of the source file submitted to the compiler. @smallexample (@value{GDBP}) info macro __STDC__ Defined at /home/jimb/gdb/macros/play/sample.c:0 -D__STDC__=1 (@value{GDBP}) @end smallexample @node Tracepoints @chapter Tracepoints @c This chapter is based on the documentation written by Michael @c Snyder, David Taylor, Jim Blandy, and Elena Zannoni. @cindex tracepoints In some applications, it is not feasible for the debugger to interrupt the program's execution long enough for the developer to learn anything helpful about its behavior. If the program's correctness depends on its real-time behavior, delays introduced by a debugger might cause the program to change its behavior drastically, or perhaps fail, even when the code itself is correct. It is useful to be able to observe the program's behavior without interrupting it. Using @value{GDBN}'s @code{trace} and @code{collect} commands, you can specify locations in the program, called @dfn{tracepoints}, and arbitrary expressions to evaluate when those tracepoints are reached. Later, using the @code{tfind} command, you can examine the values those expressions had when the program hit the tracepoints. The expressions may also denote objects in memory---structures or arrays, for example---whose values @value{GDBN} should record; while visiting a particular tracepoint, you may inspect those objects as if they were in memory at that moment. However, because @value{GDBN} records these values without interacting with you, it can do so quickly and unobtrusively, hopefully not disturbing the program's behavior. The tracepoint facility is currently available only for remote targets. @xref{Targets}. In addition, your remote target must know how to collect trace data. This functionality is implemented in the remote stub; however, none of the stubs distributed with @value{GDBN} support tracepoints as of this writing. The format of the remote packets used to implement tracepoints are described in @ref{Tracepoint Packets}. It is also possible to get trace data from a file, in a manner reminiscent of corefiles; you specify the filename, and use @code{tfind} to search through the file. @xref{Trace Files}, for more details. This chapter describes the tracepoint commands and features. @menu * Set Tracepoints:: * Analyze Collected Data:: * Tracepoint Variables:: * Trace Files:: @end menu @node Set Tracepoints @section Commands to Set Tracepoints Before running such a @dfn{trace experiment}, an arbitrary number of tracepoints can be set. A tracepoint is actually a special type of breakpoint (@pxref{Set Breaks}), so you can manipulate it using standard breakpoint commands. For instance, as with breakpoints, tracepoint numbers are successive integers starting from one, and many of the commands associated with tracepoints take the tracepoint number as their argument, to identify which tracepoint to work on. For each tracepoint, you can specify, in advance, some arbitrary set of data that you want the target to collect in the trace buffer when it hits that tracepoint. The collected data can include registers, local variables, or global data. Later, you can use @value{GDBN} commands to examine the values these data had at the time the tracepoint was hit. Tracepoints do not support every breakpoint feature. Ignore counts on tracepoints have no effect, and tracepoints cannot run @value{GDBN} commands when they are hit. Tracepoints may not be thread-specific either. @cindex fast tracepoints Some targets may support @dfn{fast tracepoints}, which are inserted in a different way (such as with a jump instead of a trap), that is faster but possibly restricted in where they may be installed. @cindex static tracepoints @cindex markers, static tracepoints @cindex probing markers, static tracepoints Regular and fast tracepoints are dynamic tracing facilities, meaning that they can be used to insert tracepoints at (almost) any location in the target. Some targets may also support controlling @dfn{static tracepoints} from @value{GDBN}. With static tracing, a set of instrumentation points, also known as @dfn{markers}, are embedded in the target program, and can be activated or deactivated by name or address. These are usually placed at locations which facilitate investigating what the target is actually doing. @value{GDBN}'s support for static tracing includes being able to list instrumentation points, and attach them with @value{GDBN} defined high level tracepoints that expose the whole range of convenience of @value{GDBN}'s tracepoints support. Namely, support for collecting registers values and values of global or local (to the instrumentation point) variables; tracepoint conditions and trace state variables. The act of installing a @value{GDBN} static tracepoint on an instrumentation point, or marker, is referred to as @dfn{probing} a static tracepoint marker. @code{gdbserver} supports tracepoints on some target systems. @xref{Server,,Tracepoints support in @code{gdbserver}}. This section describes commands to set tracepoints and associated conditions and actions. @menu * Create and Delete Tracepoints:: * Enable and Disable Tracepoints:: * Tracepoint Passcounts:: * Tracepoint Conditions:: * Trace State Variables:: * Tracepoint Actions:: * Listing Tracepoints:: * Listing Static Tracepoint Markers:: * Starting and Stopping Trace Experiments:: * Tracepoint Restrictions:: @end menu @node Create and Delete Tracepoints @subsection Create and Delete Tracepoints @table @code @cindex set tracepoint @kindex trace @item trace @var{location} The @code{trace} command is very similar to the @code{break} command. Its argument @var{location} can be a source line, a function name, or an address in the target program. @xref{Specify Location}. The @code{trace} command defines a tracepoint, which is a point in the target program where the debugger will briefly stop, collect some data, and then allow the program to continue. Setting a tracepoint or changing its actions takes effect immediately if the remote stub supports the @samp{InstallInTrace} feature (@pxref{install tracepoint in tracing}). If remote stub doesn't support the @samp{InstallInTrace} feature, all these changes don't take effect until the next @code{tstart} command, and once a trace experiment is running, further changes will not have any effect until the next trace experiment starts. In addition, @value{GDBN} supports @dfn{pending tracepoints}---tracepoints whose address is not yet resolved. (This is similar to pending breakpoints.) Pending tracepoints are not downloaded to the target and not installed until they are resolved. The resolution of pending tracepoints requires @value{GDBN} support---when debugging with the remote target, and @value{GDBN} disconnects from the remote stub (@pxref{disconnected tracing}), pending tracepoints can not be resolved (and downloaded to the remote stub) while @value{GDBN} is disconnected. Here are some examples of using the @code{trace} command: @smallexample (@value{GDBP}) @b{trace foo.c:121} // a source file and line number (@value{GDBP}) @b{trace +2} // 2 lines forward (@value{GDBP}) @b{trace my_function} // first source line of function (@value{GDBP}) @b{trace *my_function} // EXACT start address of function (@value{GDBP}) @b{trace *0x2117c4} // an address @end smallexample @noindent You can abbreviate @code{trace} as @code{tr}. @item trace @var{location} if @var{cond} Set a tracepoint with condition @var{cond}; evaluate the expression @var{cond} each time the tracepoint is reached, and collect data only if the value is nonzero---that is, if @var{cond} evaluates as true. @xref{Tracepoint Conditions, ,Tracepoint Conditions}, for more information on tracepoint conditions. @item ftrace @var{location} [ if @var{cond} ] @cindex set fast tracepoint @cindex fast tracepoints, setting @kindex ftrace The @code{ftrace} command sets a fast tracepoint. For targets that support them, fast tracepoints will use a more efficient but possibly less general technique to trigger data collection, such as a jump instruction instead of a trap, or some sort of hardware support. It may not be possible to create a fast tracepoint at the desired location, in which case the command will exit with an explanatory message. @value{GDBN} handles arguments to @code{ftrace} exactly as for @code{trace}. On 32-bit x86-architecture systems, fast tracepoints normally need to be placed at an instruction that is 5 bytes or longer, but can be placed at 4-byte instructions if the low 64K of memory of the target program is available to install trampolines. Some Unix-type systems, such as @sc{gnu}/Linux, exclude low addresses from the program's address space; but for instance with the Linux kernel it is possible to let @value{GDBN} use this area by doing a @command{sysctl} command to set the @code{mmap_min_addr} kernel parameter, as in @example sudo sysctl -w vm.mmap_min_addr=32768 @end example @noindent which sets the low address to 32K, which leaves plenty of room for trampolines. The minimum address should be set to a page boundary. @item strace @var{location} [ if @var{cond} ] @cindex set static tracepoint @cindex static tracepoints, setting @cindex probe static tracepoint marker @kindex strace The @code{strace} command sets a static tracepoint. For targets that support it, setting a static tracepoint probes a static instrumentation point, or marker, found at @var{location}. It may not be possible to set a static tracepoint at the desired location, in which case the command will exit with an explanatory message. @value{GDBN} handles arguments to @code{strace} exactly as for @code{trace}, with the addition that the user can also specify @code{-m @var{marker}} as @var{location}. This probes the marker identified by the @var{marker} string identifier. This identifier depends on the static tracepoint backend library your program is using. You can find all the marker identifiers in the @samp{ID} field of the @code{info static-tracepoint-markers} command output. @xref{Listing Static Tracepoint Markers,,Listing Static Tracepoint Markers}. For example, in the following small program using the UST tracing engine: @smallexample main () @{ trace_mark(ust, bar33, "str %s", "FOOBAZ"); @} @end smallexample @noindent the marker id is composed of joining the first two arguments to the @code{trace_mark} call with a slash, which translates to: @smallexample (@value{GDBP}) info static-tracepoint-markers Cnt Enb ID Address What 1 n ust/bar33 0x0000000000400ddc in main at stexample.c:22 Data: "str %s" [etc...] @end smallexample @noindent so you may probe the marker above with: @smallexample (@value{GDBP}) strace -m ust/bar33 @end smallexample Static tracepoints accept an extra collect action --- @code{collect $_sdata}. This collects arbitrary user data passed in the probe point call to the tracing library. In the UST example above, you'll see that the third argument to @code{trace_mark} is a printf-like format string. The user data is then the result of running that formating string against the following arguments. Note that @code{info static-tracepoint-markers} command output lists that format string in the @samp{Data:} field. You can inspect this data when analyzing the trace buffer, by printing the $_sdata variable like any other variable available to @value{GDBN}. @xref{Tracepoint Actions,,Tracepoint Action Lists}. @vindex $tpnum @cindex last tracepoint number @cindex recent tracepoint number @cindex tracepoint number The convenience variable @code{$tpnum} records the tracepoint number of the most recently set tracepoint. @kindex delete tracepoint @cindex tracepoint deletion @item delete tracepoint @r{[}@var{num}@r{]} Permanently delete one or more tracepoints. With no argument, the default is to delete all tracepoints. Note that the regular @code{delete} command can remove tracepoints also. Examples: @smallexample (@value{GDBP}) @b{delete trace 1 2 3} // remove three tracepoints (@value{GDBP}) @b{delete trace} // remove all tracepoints @end smallexample @noindent You can abbreviate this command as @code{del tr}. @end table @node Enable and Disable Tracepoints @subsection Enable and Disable Tracepoints These commands are deprecated; they are equivalent to plain @code{disable} and @code{enable}. @table @code @kindex disable tracepoint @item disable tracepoint @r{[}@var{num}@r{]} Disable tracepoint @var{num}, or all tracepoints if no argument @var{num} is given. A disabled tracepoint will have no effect during a trace experiment, but it is not forgotten. You can re-enable a disabled tracepoint using the @code{enable tracepoint} command. If the command is issued during a trace experiment and the debug target has support for disabling tracepoints during a trace experiment, then the change will be effective immediately. Otherwise, it will be applied to the next trace experiment. @kindex enable tracepoint @item enable tracepoint @r{[}@var{num}@r{]} Enable tracepoint @var{num}, or all tracepoints. If this command is issued during a trace experiment and the debug target supports enabling tracepoints during a trace experiment, then the enabled tracepoints will become effective immediately. Otherwise, they will become effective the next time a trace experiment is run. @end table @node Tracepoint Passcounts @subsection Tracepoint Passcounts @table @code @kindex passcount @cindex tracepoint pass count @item passcount @r{[}@var{n} @r{[}@var{num}@r{]]} Set the @dfn{passcount} of a tracepoint. The passcount is a way to automatically stop a trace experiment. If a tracepoint's passcount is @var{n}, then the trace experiment will be automatically stopped on the @var{n}'th time that tracepoint is hit. If the tracepoint number @var{num} is not specified, the @code{passcount} command sets the passcount of the most recently defined tracepoint. If no passcount is given, the trace experiment will run until stopped explicitly by the user. Examples: @smallexample (@value{GDBP}) @b{passcount 5 2} // Stop on the 5th execution of @exdent @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @code{// tracepoint 2} (@value{GDBP}) @b{passcount 12} // Stop on the 12th execution of the @exdent @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @code{// most recently defined tracepoint.} (@value{GDBP}) @b{trace foo} (@value{GDBP}) @b{pass 3} (@value{GDBP}) @b{trace bar} (@value{GDBP}) @b{pass 2} (@value{GDBP}) @b{trace baz} (@value{GDBP}) @b{pass 1} // Stop tracing when foo has been @exdent @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @code{// executed 3 times OR when bar has} @exdent @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @code{// been executed 2 times} @exdent @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @code{// OR when baz has been executed 1 time.} @end smallexample @end table @node Tracepoint Conditions @subsection Tracepoint Conditions @cindex conditional tracepoints @cindex tracepoint conditions The simplest sort of tracepoint collects data every time your program reaches a specified place. You can also specify a @dfn{condition} for a tracepoint. A condition is just a Boolean expression in your programming language (@pxref{Expressions, ,Expressions}). A tracepoint with a condition evaluates the expression each time your program reaches it, and data collection happens only if the condition is true. Tracepoint conditions can be specified when a tracepoint is set, by using @samp{if} in the arguments to the @code{trace} command. @xref{Create and Delete Tracepoints, ,Setting Tracepoints}. They can also be set or changed at any time with the @code{condition} command, just as with breakpoints. Unlike breakpoint conditions, @value{GDBN} does not actually evaluate the conditional expression itself. Instead, @value{GDBN} encodes the expression into an agent expression (@pxref{Agent Expressions}) suitable for execution on the target, independently of @value{GDBN}. Global variables become raw memory locations, locals become stack accesses, and so forth. For instance, suppose you have a function that is usually called frequently, but should not be called after an error has occurred. You could use the following tracepoint command to collect data about calls of that function that happen while the error code is propagating through the program; an unconditional tracepoint could end up collecting thousands of useless trace frames that you would have to search through. @smallexample (@value{GDBP}) @kbd{trace normal_operation if errcode > 0} @end smallexample @node Trace State Variables @subsection Trace State Variables @cindex trace state variables A @dfn{trace state variable} is a special type of variable that is created and managed by target-side code. The syntax is the same as that for GDB's convenience variables (a string prefixed with ``$''), but they are stored on the target. They must be created explicitly, using a @code{tvariable} command. They are always 64-bit signed integers. Trace state variables are remembered by @value{GDBN}, and downloaded to the target along with tracepoint information when the trace experiment starts. There are no intrinsic limits on the number of trace state variables, beyond memory limitations of the target. @cindex convenience variables, and trace state variables Although trace state variables are managed by the target, you can use them in print commands and expressions as if they were convenience variables; @value{GDBN} will get the current value from the target while the trace experiment is running. Trace state variables share the same namespace as other ``$'' variables, which means that you cannot have trace state variables with names like @code{$23} or @code{$pc}, nor can you have a trace state variable and a convenience variable with the same name. @table @code @item tvariable $@var{name} [ = @var{expression} ] @kindex tvariable The @code{tvariable} command creates a new trace state variable named @code{$@var{name}}, and optionally gives it an initial value of @var{expression}. @var{expression} is evaluated when this command is entered; the result will be converted to an integer if possible, otherwise @value{GDBN} will report an error. A subsequent @code{tvariable} command specifying the same name does not create a variable, but instead assigns the supplied initial value to the existing variable of that name, overwriting any previous initial value. The default initial value is 0. @item info tvariables @kindex info tvariables List all the trace state variables along with their initial values. Their current values may also be displayed, if the trace experiment is currently running. @item delete tvariable @r{[} $@var{name} @dots{} @r{]} @kindex delete tvariable Delete the given trace state variables, or all of them if no arguments are specified. @end table @node Tracepoint Actions @subsection Tracepoint Action Lists @table @code @kindex actions @cindex tracepoint actions @item actions @r{[}@var{num}@r{]} This command will prompt for a list of actions to be taken when the tracepoint is hit. If the tracepoint number @var{num} is not specified, this command sets the actions for the one that was most recently defined (so that you can define a tracepoint and then say @code{actions} without bothering about its number). You specify the actions themselves on the following lines, one action at a time, and terminate the actions list with a line containing just @code{end}. So far, the only defined actions are @code{collect}, @code{teval}, and @code{while-stepping}. @code{actions} is actually equivalent to @code{commands} (@pxref{Break Commands, ,Breakpoint Command Lists}), except that only the defined actions are allowed; any other @value{GDBN} command is rejected. @cindex remove actions from a tracepoint To remove all actions from a tracepoint, type @samp{actions @var{num}} and follow it immediately with @samp{end}. @smallexample (@value{GDBP}) @b{collect @var{data}} // collect some data (@value{GDBP}) @b{while-stepping 5} // single-step 5 times, collect data (@value{GDBP}) @b{end} // signals the end of actions. @end smallexample In the following example, the action list begins with @code{collect} commands indicating the things to be collected when the tracepoint is hit. Then, in order to single-step and collect additional data following the tracepoint, a @code{while-stepping} command is used, followed by the list of things to be collected after each step in a sequence of single steps. The @code{while-stepping} command is terminated by its own separate @code{end} command. Lastly, the action list is terminated by an @code{end} command. @smallexample (@value{GDBP}) @b{trace foo} (@value{GDBP}) @b{actions} Enter actions for tracepoint 1, one per line: > collect bar,baz > collect $regs > while-stepping 12 > collect $pc, arr[i] > end end @end smallexample @kindex collect @r{(tracepoints)} @item collect@r{[}/@var{mods}@r{]} @var{expr1}, @var{expr2}, @dots{} Collect values of the given expressions when the tracepoint is hit. This command accepts a comma-separated list of any valid expressions. In addition to global, static, or local variables, the following special arguments are supported: @table @code @item $regs Collect all registers. @item $args Collect all function arguments. @item $locals Collect all local variables. @item $_ret Collect the return address. This is helpful if you want to see more of a backtrace. @item $_probe_argc Collects the number of arguments from the static probe at which the tracepoint is located. @xref{Static Probe Points}. @item $_probe_arg@var{n} @var{n} is an integer between 0 and 11. Collects the @var{n}th argument from the static probe at which the tracepoint is located. @xref{Static Probe Points}. @item $_sdata @vindex $_sdata@r{, collect} Collect static tracepoint marker specific data. Only available for static tracepoints. @xref{Tracepoint Actions,,Tracepoint Action Lists}. On the UST static tracepoints library backend, an instrumentation point resembles a @code{printf} function call. The tracing library is able to collect user specified data formatted to a character string using the format provided by the programmer that instrumented the program. Other backends have similar mechanisms. Here's an example of a UST marker call: @smallexample const char master_name[] = "$your_name"; trace_mark(channel1, marker1, "hello %s", master_name) @end smallexample In this case, collecting @code{$_sdata} collects the string @samp{hello $yourname}. When analyzing the trace buffer, you can inspect @samp{$_sdata} like any other variable available to @value{GDBN}. @end table You can give several consecutive @code{collect} commands, each one with a single argument, or one @code{collect} command with several arguments separated by commas; the effect is the same. The optional @var{mods} changes the usual handling of the arguments. @code{s} requests that pointers to chars be handled as strings, in particular collecting the contents of the memory being pointed at, up to the first zero. The upper bound is by default the value of the @code{print elements} variable; if @code{s} is followed by a decimal number, that is the upper bound instead. So for instance @samp{collect/s25 mystr} collects as many as 25 characters at @samp{mystr}. The command @code{info scope} (@pxref{Symbols, info scope}) is particularly useful for figuring out what data to collect. @kindex teval @r{(tracepoints)} @item teval @var{expr1}, @var{expr2}, @dots{} Evaluate the given expressions when the tracepoint is hit. This command accepts a comma-separated list of expressions. The results are discarded, so this is mainly useful for assigning values to trace state variables (@pxref{Trace State Variables}) without adding those values to the trace buffer, as would be the case if the @code{collect} action were used. @kindex while-stepping @r{(tracepoints)} @item while-stepping @var{n} Perform @var{n} single-step instruction traces after the tracepoint, collecting new data after each step. The @code{while-stepping} command is followed by the list of what to collect while stepping (followed by its own @code{end} command): @smallexample > while-stepping 12 > collect $regs, myglobal > end > @end smallexample @noindent Note that @code{$pc} is not automatically collected by @code{while-stepping}; you need to explicitly collect that register if you need it. You may abbreviate @code{while-stepping} as @code{ws} or @code{stepping}. @item set default-collect @var{expr1}, @var{expr2}, @dots{} @kindex set default-collect @cindex default collection action This variable is a list of expressions to collect at each tracepoint hit. It is effectively an additional @code{collect} action prepended to every tracepoint action list. The expressions are parsed individually for each tracepoint, so for instance a variable named @code{xyz} may be interpreted as a global for one tracepoint, and a local for another, as appropriate to the tracepoint's location. @item show default-collect @kindex show default-collect Show the list of expressions that are collected by default at each tracepoint hit. @end table @node Listing Tracepoints @subsection Listing Tracepoints @table @code @kindex info tracepoints @r{[}@var{n}@dots{}@r{]} @kindex info tp @r{[}@var{n}@dots{}@r{]} @cindex information about tracepoints @item info tracepoints @r{[}@var{num}@dots{}@r{]} Display information about the tracepoint @var{num}. If you don't specify a tracepoint number, displays information about all the tracepoints defined so far. The format is similar to that used for @code{info breakpoints}; in fact, @code{info tracepoints} is the same command, simply restricting itself to tracepoints. A tracepoint's listing may include additional information specific to tracing: @itemize @bullet @item its passcount as given by the @code{passcount @var{n}} command @item the state about installed on target of each location @end itemize @smallexample (@value{GDBP}) @b{info trace} Num Type Disp Enb Address What 1 tracepoint keep y 0x0804ab57 in foo() at main.cxx:7 while-stepping 20 collect globfoo, $regs end collect globfoo2 end pass count 1200 2 tracepoint keep y collect $eip 2.1 y 0x0804859c in func4 at change-loc.h:35 installed on target 2.2 y 0xb7ffc480 in func4 at change-loc.h:35 installed on target 2.3 y set_tracepoint 3 tracepoint keep y 0x080485b1 in foo at change-loc.c:29 not installed on target (@value{GDBP}) @end smallexample @noindent This command can be abbreviated @code{info tp}. @end table @node Listing Static Tracepoint Markers @subsection Listing Static Tracepoint Markers @table @code @kindex info static-tracepoint-markers @cindex information about static tracepoint markers @item info static-tracepoint-markers Display information about all static tracepoint markers defined in the program. For each marker, the following columns are printed: @table @emph @item Count An incrementing counter, output to help readability. This is not a stable identifier. @item ID The marker ID, as reported by the target. @item Enabled or Disabled Probed markers are tagged with @samp{y}. @samp{n} identifies marks that are not enabled. @item Address Where the marker is in your program, as a memory address. @item What Where the marker is in the source for your program, as a file and line number. If the debug information included in the program does not allow @value{GDBN} to locate the source of the marker, this column will be left blank. @end table @noindent In addition, the following information may be printed for each marker: @table @emph @item Data User data passed to the tracing library by the marker call. In the UST backend, this is the format string passed as argument to the marker call. @item Static tracepoints probing the marker The list of static tracepoints attached to the marker. @end table @smallexample (@value{GDBP}) info static-tracepoint-markers Cnt ID Enb Address What 1 ust/bar2 y 0x0000000000400e1a in main at stexample.c:25 Data: number1 %d number2 %d Probed by static tracepoints: #2 2 ust/bar33 n 0x0000000000400c87 in main at stexample.c:24 Data: str %s (@value{GDBP}) @end smallexample @end table @node Starting and Stopping Trace Experiments @subsection Starting and Stopping Trace Experiments @table @code @kindex tstart [ @var{notes} ] @cindex start a new trace experiment @cindex collected data discarded @item tstart This command starts the trace experiment, and begins collecting data. It has the side effect of discarding all the data collected in the trace buffer during the previous trace experiment. If any arguments are supplied, they are taken as a note and stored with the trace experiment's state. The notes may be arbitrary text, and are especially useful with disconnected tracing in a multi-user context; the notes can explain what the trace is doing, supply user contact information, and so forth. @kindex tstop [ @var{notes} ] @cindex stop a running trace experiment @item tstop This command stops the trace experiment. If any arguments are supplied, they are recorded with the experiment as a note. This is useful if you are stopping a trace started by someone else, for instance if the trace is interfering with the system's behavior and needs to be stopped quickly. @strong{Note}: a trace experiment and data collection may stop automatically if any tracepoint's passcount is reached (@pxref{Tracepoint Passcounts}), or if the trace buffer becomes full. @kindex tstatus @cindex status of trace data collection @cindex trace experiment, status of @item tstatus This command displays the status of the current trace data collection. @end table Here is an example of the commands we described so far: @smallexample (@value{GDBP}) @b{trace gdb_c_test} (@value{GDBP}) @b{actions} Enter actions for tracepoint #1, one per line. > collect $regs,$locals,$args > while-stepping 11 > collect $regs > end > end (@value{GDBP}) @b{tstart} [time passes @dots{}] (@value{GDBP}) @b{tstop} @end smallexample @anchor{disconnected tracing} @cindex disconnected tracing You can choose to continue running the trace experiment even if @value{GDBN} disconnects from the target, voluntarily or involuntarily. For commands such as @code{detach}, the debugger will ask what you want to do with the trace. But for unexpected terminations (@value{GDBN} crash, network outage), it would be unfortunate to lose hard-won trace data, so the variable @code{disconnected-tracing} lets you decide whether the trace should continue running without @value{GDBN}. @table @code @item set disconnected-tracing on @itemx set disconnected-tracing off @kindex set disconnected-tracing Choose whether a tracing run should continue to run if @value{GDBN} has disconnected from the target. Note that @code{detach} or @code{quit} will ask you directly what to do about a running trace no matter what this variable's setting, so the variable is mainly useful for handling unexpected situations, such as loss of the network. @item show disconnected-tracing @kindex show disconnected-tracing Show the current choice for disconnected tracing. @end table When you reconnect to the target, the trace experiment may or may not still be running; it might have filled the trace buffer in the meantime, or stopped for one of the other reasons. If it is running, it will continue after reconnection. Upon reconnection, the target will upload information about the tracepoints in effect. @value{GDBN} will then compare that information to the set of tracepoints currently defined, and attempt to match them up, allowing for the possibility that the numbers may have changed due to creation and deletion in the meantime. If one of the target's tracepoints does not match any in @value{GDBN}, the debugger will create a new tracepoint, so that you have a number with which to specify that tracepoint. This matching-up process is necessarily heuristic, and it may result in useless tracepoints being created; you may simply delete them if they are of no use. @cindex circular trace buffer If your target agent supports a @dfn{circular trace buffer}, then you can run a trace experiment indefinitely without filling the trace buffer; when space runs out, the agent deletes already-collected trace frames, oldest first, until there is enough room to continue collecting. This is especially useful if your tracepoints are being hit too often, and your trace gets terminated prematurely because the buffer is full. To ask for a circular trace buffer, simply set @samp{circular-trace-buffer} to on. You can set this at any time, including during tracing; if the agent can do it, it will change buffer handling on the fly, otherwise it will not take effect until the next run. @table @code @item set circular-trace-buffer on @itemx set circular-trace-buffer off @kindex set circular-trace-buffer Choose whether a tracing run should use a linear or circular buffer for trace data. A linear buffer will not lose any trace data, but may fill up prematurely, while a circular buffer will discard old trace data, but it will have always room for the latest tracepoint hits. @item show circular-trace-buffer @kindex show circular-trace-buffer Show the current choice for the trace buffer. Note that this may not match the agent's current buffer handling, nor is it guaranteed to match the setting that might have been in effect during a past run, for instance if you are looking at frames from a trace file. @end table @table @code @item set trace-buffer-size @var{n} @kindex set trace-buffer-size Request that the target use a trace buffer of @var{n} bytes. Not all targets will honor the request; they may have a compiled-in size for the trace buffer, or some other limitation. Set to a value of @code{-1} to let the target use whatever size it likes. This is also the default. @item show trace-buffer-size @kindex show trace-buffer-size Show the current requested size for the trace buffer. Note that this will only match the actual size if the target supports size-setting, and was able to handle the requested size. For instance, if the target can only change buffer size between runs, this variable will not reflect the change until the next run starts. Use @code{tstatus} to get a report of the actual buffer size. @end table @table @code @item set trace-user @var{text} @kindex set trace-user @item show trace-user @kindex show trace-user @item set trace-notes @var{text} @kindex set trace-notes Set the trace run's notes. @item show trace-notes @kindex show trace-notes Show the trace run's notes. @item set trace-stop-notes @var{text} @kindex set trace-stop-notes Set the trace run's stop notes. The handling of the note is as for @code{tstop} arguments; the set command is convenient way to fix a stop note that is mistaken or incomplete. @item show trace-stop-notes @kindex show trace-stop-notes Show the trace run's stop notes. @end table @node Tracepoint Restrictions @subsection Tracepoint Restrictions @cindex tracepoint restrictions There are a number of restrictions on the use of tracepoints. As described above, tracepoint data gathering occurs on the target without interaction from @value{GDBN}. Thus the full capabilities of the debugger are not available during data gathering, and then at data examination time, you will be limited by only having what was collected. The following items describe some common problems, but it is not exhaustive, and you may run into additional difficulties not mentioned here. @itemize @bullet @item Tracepoint expressions are intended to gather objects (lvalues). Thus the full flexibility of GDB's expression evaluator is not available. You cannot call functions, cast objects to aggregate types, access convenience variables or modify values (except by assignment to trace state variables). Some language features may implicitly call functions (for instance Objective-C fields with accessors), and therefore cannot be collected either. @item Collection of local variables, either individually or in bulk with @code{$locals} or @code{$args}, during @code{while-stepping} may behave erratically. The stepping action may enter a new scope (for instance by stepping into a function), or the location of the variable may change (for instance it is loaded into a register). The tracepoint data recorded uses the location information for the variables that is correct for the tracepoint location. When the tracepoint is created, it is not possible, in general, to determine where the steps of a @code{while-stepping} sequence will advance the program---particularly if a conditional branch is stepped. @item Collection of an incompletely-initialized or partially-destroyed object may result in something that @value{GDBN} cannot display, or displays in a misleading way. @item When @value{GDBN} displays a pointer to character it automatically dereferences the pointer to also display characters of the string being pointed to. However, collecting the pointer during tracing does not automatically collect the string. You need to explicitly dereference the pointer and provide size information if you want to collect not only the pointer, but the memory pointed to. For example, @code{*ptr@@50} can be used to collect the 50 element array pointed to by @code{ptr}. @item It is not possible to collect a complete stack backtrace at a tracepoint. Instead, you may collect the registers and a few hundred bytes from the stack pointer with something like @code{*(unsigned char *)$esp@@300} (adjust to use the name of the actual stack pointer register on your target architecture, and the amount of stack you wish to capture). Then the @code{backtrace} command will show a partial backtrace when using a trace frame. The number of stack frames that can be examined depends on the sizes of the frames in the collected stack. Note that if you ask for a block so large that it goes past the bottom of the stack, the target agent may report an error trying to read from an invalid address. @item If you do not collect registers at a tracepoint, @value{GDBN} can infer that the value of @code{$pc} must be the same as the address of the tracepoint and use that when you are looking at a trace frame for that tracepoint. However, this cannot work if the tracepoint has multiple locations (for instance if it was set in a function that was inlined), or if it has a @code{while-stepping} loop. In those cases @value{GDBN} will warn you that it can't infer @code{$pc}, and default it to zero. @end itemize @node Analyze Collected Data @section Using the Collected Data After the tracepoint experiment ends, you use @value{GDBN} commands for examining the trace data. The basic idea is that each tracepoint collects a trace @dfn{snapshot} every time it is hit and another snapshot every time it single-steps. All these snapshots are consecutively numbered from zero and go into a buffer, and you can examine them later. The way you examine them is to @dfn{focus} on a specific trace snapshot. When the remote stub is focused on a trace snapshot, it will respond to all @value{GDBN} requests for memory and registers by reading from the buffer which belongs to that snapshot, rather than from @emph{real} memory or registers of the program being debugged. This means that @strong{all} @value{GDBN} commands (@code{print}, @code{info registers}, @code{backtrace}, etc.) will behave as if we were currently debugging the program state as it was when the tracepoint occurred. Any requests for data that are not in the buffer will fail. @menu * tfind:: How to select a trace snapshot * tdump:: How to display all data for a snapshot * save tracepoints:: How to save tracepoints for a future run @end menu @node tfind @subsection @code{tfind @var{n}} @kindex tfind @cindex select trace snapshot @cindex find trace snapshot The basic command for selecting a trace snapshot from the buffer is @code{tfind @var{n}}, which finds trace snapshot number @var{n}, counting from zero. If no argument @var{n} is given, the next snapshot is selected. Here are the various forms of using the @code{tfind} command. @table @code @item tfind start Find the first snapshot in the buffer. This is a synonym for @code{tfind 0} (since 0 is the number of the first snapshot). @item tfind none Stop debugging trace snapshots, resume @emph{live} debugging. @item tfind end Same as @samp{tfind none}. @item tfind No argument means find the next trace snapshot. @item tfind - Find the previous trace snapshot before the current one. This permits retracing earlier steps. @item tfind tracepoint @var{num} Find the next snapshot associated with tracepoint @var{num}. Search proceeds forward from the last examined trace snapshot. If no argument @var{num} is given, it means find the next snapshot collected for the same tracepoint as the current snapshot. @item tfind pc @var{addr} Find the next snapshot associated with the value @var{addr} of the program counter. Search proceeds forward from the last examined trace snapshot. If no argument @var{addr} is given, it means find the next snapshot with the same value of PC as the current snapshot. @item tfind outside @var{addr1}, @var{addr2} Find the next snapshot whose PC is outside the given range of addresses (exclusive). @item tfind range @var{addr1}, @var{addr2} Find the next snapshot whose PC is between @var{addr1} and @var{addr2} (inclusive). @item tfind line @r{[}@var{file}:@r{]}@var{n} Find the next snapshot associated with the source line @var{n}. If the optional argument @var{file} is given, refer to line @var{n} in that source file. Search proceeds forward from the last examined trace snapshot. If no argument @var{n} is given, it means find the next line other than the one currently being examined; thus saying @code{tfind line} repeatedly can appear to have the same effect as stepping from line to line in a @emph{live} debugging session. @end table The default arguments for the @code{tfind} commands are specifically designed to make it easy to scan through the trace buffer. For instance, @code{tfind} with no argument selects the next trace snapshot, and @code{tfind -} with no argument selects the previous trace snapshot. So, by giving one @code{tfind} command, and then simply hitting @key{RET} repeatedly you can examine all the trace snapshots in order. Or, by saying @code{tfind -} and then hitting @key{RET} repeatedly you can examine the snapshots in reverse order. The @code{tfind line} command with no argument selects the snapshot for the next source line executed. The @code{tfind pc} command with no argument selects the next snapshot with the same program counter (PC) as the current frame. The @code{tfind tracepoint} command with no argument selects the next trace snapshot collected by the same tracepoint as the current one. In addition to letting you scan through the trace buffer manually, these commands make it easy to construct @value{GDBN} scripts that scan through the trace buffer and print out whatever collected data you are interested in. Thus, if we want to examine the PC, FP, and SP registers from each trace frame in the buffer, we can say this: @smallexample (@value{GDBP}) @b{tfind start} (@value{GDBP}) @b{while ($trace_frame != -1)} > printf "Frame %d, PC = %08X, SP = %08X, FP = %08X\n", \ $trace_frame, $pc, $sp, $fp > tfind > end Frame 0, PC = 0020DC64, SP = 0030BF3C, FP = 0030BF44 Frame 1, PC = 0020DC6C, SP = 0030BF38, FP = 0030BF44 Frame 2, PC = 0020DC70, SP = 0030BF34, FP = 0030BF44 Frame 3, PC = 0020DC74, SP = 0030BF30, FP = 0030BF44 Frame 4, PC = 0020DC78, SP = 0030BF2C, FP = 0030BF44 Frame 5, PC = 0020DC7C, SP = 0030BF28, FP = 0030BF44 Frame 6, PC = 0020DC80, SP = 0030BF24, FP = 0030BF44 Frame 7, PC = 0020DC84, SP = 0030BF20, FP = 0030BF44 Frame 8, PC = 0020DC88, SP = 0030BF1C, FP = 0030BF44 Frame 9, PC = 0020DC8E, SP = 0030BF18, FP = 0030BF44 Frame 10, PC = 00203F6C, SP = 0030BE3C, FP = 0030BF14 @end smallexample Or, if we want to examine the variable @code{X} at each source line in the buffer: @smallexample (@value{GDBP}) @b{tfind start} (@value{GDBP}) @b{while ($trace_frame != -1)} > printf "Frame %d, X == %d\n", $trace_frame, X > tfind line > end Frame 0, X = 1 Frame 7, X = 2 Frame 13, X = 255 @end smallexample @node tdump @subsection @code{tdump} @kindex tdump @cindex dump all data collected at tracepoint @cindex tracepoint data, display This command takes no arguments. It prints all the data collected at the current trace snapshot. @smallexample (@value{GDBP}) @b{trace 444} (@value{GDBP}) @b{actions} Enter actions for tracepoint #2, one per line: > collect $regs, $locals, $args, gdb_long_test > end (@value{GDBP}) @b{tstart} (@value{GDBP}) @b{tfind line 444} #0 gdb_test (p1=0x11, p2=0x22, p3=0x33, p4=0x44, p5=0x55, p6=0x66) at gdb_test.c:444 444 printp( "%s: arguments = 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X\n", ) (@value{GDBP}) @b{tdump} Data collected at tracepoint 2, trace frame 1: d0 0xc4aa0085 -995491707 d1 0x18 24 d2 0x80 128 d3 0x33 51 d4 0x71aea3d 119204413 d5 0x22 34 d6 0xe0 224 d7 0x380035 3670069 a0 0x19e24a 1696330 a1 0x3000668 50333288 a2 0x100 256 a3 0x322000 3284992 a4 0x3000698 50333336 a5 0x1ad3cc 1758156 fp 0x30bf3c 0x30bf3c sp 0x30bf34 0x30bf34 ps 0x0 0 pc 0x20b2c8 0x20b2c8 fpcontrol 0x0 0 fpstatus 0x0 0 fpiaddr 0x0 0 p = 0x20e5b4 "gdb-test" p1 = (void *) 0x11 p2 = (void *) 0x22 p3 = (void *) 0x33 p4 = (void *) 0x44 p5 = (void *) 0x55 p6 = (void *) 0x66 gdb_long_test = 17 '\021' (@value{GDBP}) @end smallexample @code{tdump} works by scanning the tracepoint's current collection actions and printing the value of each expression listed. So @code{tdump} can fail, if after a run, you change the tracepoint's actions to mention variables that were not collected during the run. Also, for tracepoints with @code{while-stepping} loops, @code{tdump} uses the collected value of @code{$pc} to distinguish between trace frames that were collected at the tracepoint hit, and frames that were collected while stepping. This allows it to correctly choose whether to display the basic list of collections, or the collections from the body of the while-stepping loop. However, if @code{$pc} was not collected, then @code{tdump} will always attempt to dump using the basic collection list, and may fail if a while-stepping frame does not include all the same data that is collected at the tracepoint hit. @c This is getting pretty arcane, example would be good. @node save tracepoints @subsection @code{save tracepoints @var{filename}} @kindex save tracepoints @kindex save-tracepoints @cindex save tracepoints for future sessions This command saves all current tracepoint definitions together with their actions and passcounts, into a file @file{@var{filename}} suitable for use in a later debugging session. To read the saved tracepoint definitions, use the @code{source} command (@pxref{Command Files}). The @w{@code{save-tracepoints}} command is a deprecated alias for @w{@code{save tracepoints}} @node Tracepoint Variables @section Convenience Variables for Tracepoints @cindex tracepoint variables @cindex convenience variables for tracepoints @table @code @vindex $trace_frame @item (int) $trace_frame The current trace snapshot (a.k.a.@: @dfn{frame}) number, or -1 if no snapshot is selected. @vindex $tracepoint @item (int) $tracepoint The tracepoint for the current trace snapshot. @vindex $trace_line @item (int) $trace_line The line number for the current trace snapshot. @vindex $trace_file @item (char []) $trace_file The source file for the current trace snapshot. @vindex $trace_func @item (char []) $trace_func The name of the function containing @code{$tracepoint}. @end table Note: @code{$trace_file} is not suitable for use in @code{printf}, use @code{output} instead. Here's a simple example of using these convenience variables for stepping through all the trace snapshots and printing some of their data. Note that these are not the same as trace state variables, which are managed by the target. @smallexample (@value{GDBP}) @b{tfind start} (@value{GDBP}) @b{while $trace_frame != -1} > output $trace_file > printf ", line %d (tracepoint #%d)\n", $trace_line, $tracepoint > tfind > end @end smallexample @node Trace Files @section Using Trace Files @cindex trace files In some situations, the target running a trace experiment may no longer be available; perhaps it crashed, or the hardware was needed for a different activity. To handle these cases, you can arrange to dump the trace data into a file, and later use that file as a source of trace data, via the @code{target tfile} command. @table @code @kindex tsave @item tsave [ -r ] @var{filename} Save the trace data to @var{filename}. By default, this command assumes that @var{filename} refers to the host filesystem, so if necessary @value{GDBN} will copy raw trace data up from the target and then save it. If the target supports it, you can also supply the optional argument @code{-r} (``remote'') to direct the target to save the data directly into @var{filename} in its own filesystem, which may be more efficient if the trace buffer is very large. (Note, however, that @code{target tfile} can only read from files accessible to the host.) @kindex target tfile @kindex tfile @item target tfile @var{filename} Use the file named @var{filename} as a source of trace data. Commands that examine data work as they do with a live target, but it is not possible to run any new trace experiments. @code{tstatus} will report the state of the trace run at the moment the data was saved, as well as the current trace frame you are examining. @var{filename} must be on a filesystem accessible to the host. @end table @node Overlays @chapter Debugging Programs That Use Overlays @cindex overlays If your program is too large to fit completely in your target system's memory, you can sometimes use @dfn{overlays} to work around this problem. @value{GDBN} provides some support for debugging programs that use overlays. @menu * How Overlays Work:: A general explanation of overlays. * Overlay Commands:: Managing overlays in @value{GDBN}. * Automatic Overlay Debugging:: @value{GDBN} can find out which overlays are mapped by asking the inferior. * Overlay Sample Program:: A sample program using overlays. @end menu @node How Overlays Work @section How Overlays Work @cindex mapped overlays @cindex unmapped overlays @cindex load address, overlay's @cindex mapped address @cindex overlay area Suppose you have a computer whose instruction address space is only 64 kilobytes long, but which has much more memory which can be accessed by other means: special instructions, segment registers, or memory management hardware, for example. Suppose further that you want to adapt a program which is larger than 64 kilobytes to run on this system. One solution is to identify modules of your program which are relatively independent, and need not call each other directly; call these modules @dfn{overlays}. Separate the overlays from the main program, and place their machine code in the larger memory. Place your main program in instruction memory, but leave at least enough space there to hold the largest overlay as well. Now, to call a function located in an overlay, you must first copy that overlay's machine code from the large memory into the space set aside for it in the instruction memory, and then jump to its entry point there. @c NB: In the below the mapped area's size is greater or equal to the @c size of all overlays. This is intentional to remind the developer @c that overlays don't necessarily need to be the same size. @smallexample @group Data Instruction Larger Address Space Address Space Address Space +-----------+ +-----------+ +-----------+ | | | | | | +-----------+ +-----------+ +-----------+<-- overlay 1 | program | | main | .----| overlay 1 | load address | variables | | program | | +-----------+ | and heap | | | | | | +-----------+ | | | +-----------+<-- overlay 2 | | +-----------+ | | | load address +-----------+ | | | .-| overlay 2 | | | | | | | mapped --->+-----------+ | | +-----------+ address | | | | | | | overlay | <-' | | | | area | <---' +-----------+<-- overlay 3 | | <---. | | load address +-----------+ `--| overlay 3 | | | | | +-----------+ | | +-----------+ | | +-----------+ @anchor{A code overlay}A code overlay @end group @end smallexample The diagram (@pxref{A code overlay}) shows a system with separate data and instruction address spaces. To map an overlay, the program copies its code from the larger address space to the instruction address space. Since the overlays shown here all use the same mapped address, only one may be mapped at a time. For a system with a single address space for data and instructions, the diagram would be similar, except that the program variables and heap would share an address space with the main program and the overlay area. An overlay loaded into instruction memory and ready for use is called a @dfn{mapped} overlay; its @dfn{mapped address} is its address in the instruction memory. An overlay not present (or only partially present) in instruction memory is called @dfn{unmapped}; its @dfn{load address} is its address in the larger memory. The mapped address is also called the @dfn{virtual memory address}, or @dfn{VMA}; the load address is also called the @dfn{load memory address}, or @dfn{LMA}. Unfortunately, overlays are not a completely transparent way to adapt a program to limited instruction memory. They introduce a new set of global constraints you must keep in mind as you design your program: @itemize @bullet @item Before calling or returning to a function in an overlay, your program must make sure that overlay is actually mapped. Otherwise, the call or return will transfer control to the right address, but in the wrong overlay, and your program will probably crash. @item If the process of mapping an overlay is expensive on your system, you will need to choose your overlays carefully to minimize their effect on your program's performance. @item The executable file you load onto your system must contain each overlay's instructions, appearing at the overlay's load address, not its mapped address. However, each overlay's instructions must be relocated and its symbols defined as if the overlay were at its mapped address. You can use GNU linker scripts to specify different load and relocation addresses for pieces of your program; see @ref{Overlay Description,,, ld.info, Using ld: the GNU linker}. @item The procedure for loading executable files onto your system must be able to load their contents into the larger address space as well as the instruction and data spaces. @end itemize The overlay system described above is rather simple, and could be improved in many ways: @itemize @bullet @item If your system has suitable bank switch registers or memory management hardware, you could use those facilities to make an overlay's load area contents simply appear at their mapped address in instruction space. This would probably be faster than copying the overlay to its mapped area in the usual way. @item If your overlays are small enough, you could set aside more than one overlay area, and have more than one overlay mapped at a time. @item You can use overlays to manage data, as well as instructions. In general, data overlays are even less transparent to your design than code overlays: whereas code overlays only require care when you call or return to functions, data overlays require care every time you access the data. Also, if you change the contents of a data overlay, you must copy its contents back out to its load address before you can copy a different data overlay into the same mapped area. @end itemize @node Overlay Commands @section Overlay Commands To use @value{GDBN}'s overlay support, each overlay in your program must correspond to a separate section of the executable file. The section's virtual memory address and load memory address must be the overlay's mapped and load addresses. Identifying overlays with sections allows @value{GDBN} to determine the appropriate address of a function or variable, depending on whether the overlay is mapped or not. @value{GDBN}'s overlay commands all start with the word @code{overlay}; you can abbreviate this as @code{ov} or @code{ovly}. The commands are: @table @code @item overlay off @kindex overlay Disable @value{GDBN}'s overlay support. When overlay support is disabled, @value{GDBN} assumes that all functions and variables are always present at their mapped addresses. By default, @value{GDBN}'s overlay support is disabled. @item overlay manual @cindex manual overlay debugging Enable @dfn{manual} overlay debugging. In this mode, @value{GDBN} relies on you to tell it which overlays are mapped, and which are not, using the @code{overlay map-overlay} and @code{overlay unmap-overlay} commands described below. @item overlay map-overlay @var{overlay} @itemx overlay map @var{overlay} @cindex map an overlay Tell @value{GDBN} that @var{overlay} is now mapped; @var{overlay} must be the name of the object file section containing the overlay. When an overlay is mapped, @value{GDBN} assumes it can find the overlay's functions and variables at their mapped addresses. @value{GDBN} assumes that any other overlays whose mapped ranges overlap that of @var{overlay} are now unmapped. @item overlay unmap-overlay @var{overlay} @itemx overlay unmap @var{overlay} @cindex unmap an overlay Tell @value{GDBN} that @var{overlay} is no longer mapped; @var{overlay} must be the name of the object file section containing the overlay. When an overlay is unmapped, @value{GDBN} assumes it can find the overlay's functions and variables at their load addresses. @item overlay auto Enable @dfn{automatic} overlay debugging. In this mode, @value{GDBN} consults a data structure the overlay manager maintains in the inferior to see which overlays are mapped. For details, see @ref{Automatic Overlay Debugging}. @item overlay load-target @itemx overlay load @cindex reloading the overlay table Re-read the overlay table from the inferior. Normally, @value{GDBN} re-reads the table @value{GDBN} automatically each time the inferior stops, so this command should only be necessary if you have changed the overlay mapping yourself using @value{GDBN}. This command is only useful when using automatic overlay debugging. @item overlay list-overlays @itemx overlay list @cindex listing mapped overlays Display a list of the overlays currently mapped, along with their mapped addresses, load addresses, and sizes. @end table Normally, when @value{GDBN} prints a code address, it includes the name of the function the address falls in: @smallexample (@value{GDBP}) print main $3 = @{int ()@} 0x11a0
@end smallexample @noindent When overlay debugging is enabled, @value{GDBN} recognizes code in unmapped overlays, and prints the names of unmapped functions with asterisks around them. For example, if @code{foo} is a function in an unmapped overlay, @value{GDBN} prints it this way: @smallexample (@value{GDBP}) overlay list No sections are mapped. (@value{GDBP}) print foo $5 = @{int (int)@} 0x100000 <*foo*> @end smallexample @noindent When @code{foo}'s overlay is mapped, @value{GDBN} prints the function's name normally: @smallexample (@value{GDBP}) overlay list Section .ov.foo.text, loaded at 0x100000 - 0x100034, mapped at 0x1016 - 0x104a (@value{GDBP}) print foo $6 = @{int (int)@} 0x1016 @end smallexample When overlay debugging is enabled, @value{GDBN} can find the correct address for functions and variables in an overlay, whether or not the overlay is mapped. This allows most @value{GDBN} commands, like @code{break} and @code{disassemble}, to work normally, even on unmapped code. However, @value{GDBN}'s breakpoint support has some limitations: @itemize @bullet @item @cindex breakpoints in overlays @cindex overlays, setting breakpoints in You can set breakpoints in functions in unmapped overlays, as long as @value{GDBN} can write to the overlay at its load address. @item @value{GDBN} can not set hardware or simulator-based breakpoints in unmapped overlays. However, if you set a breakpoint at the end of your overlay manager (and tell @value{GDBN} which overlays are now mapped, if you are using manual overlay management), @value{GDBN} will re-set its breakpoints properly. @end itemize @node Automatic Overlay Debugging @section Automatic Overlay Debugging @cindex automatic overlay debugging @value{GDBN} can automatically track which overlays are mapped and which are not, given some simple co-operation from the overlay manager in the inferior. If you enable automatic overlay debugging with the @code{overlay auto} command (@pxref{Overlay Commands}), @value{GDBN} looks in the inferior's memory for certain variables describing the current state of the overlays. Here are the variables your overlay manager must define to support @value{GDBN}'s automatic overlay debugging: @table @asis @item @code{_ovly_table}: This variable must be an array of the following structures: @smallexample struct @{ /* The overlay's mapped address. */ unsigned long vma; /* The size of the overlay, in bytes. */ unsigned long size; /* The overlay's load address. */ unsigned long lma; /* Non-zero if the overlay is currently mapped; zero otherwise. */ unsigned long mapped; @} @end smallexample @item @code{_novlys}: This variable must be a four-byte signed integer, holding the total number of elements in @code{_ovly_table}. @end table To decide whether a particular overlay is mapped or not, @value{GDBN} looks for an entry in @w{@code{_ovly_table}} whose @code{vma} and @code{lma} members equal the VMA and LMA of the overlay's section in the executable file. When @value{GDBN} finds a matching entry, it consults the entry's @code{mapped} member to determine whether the overlay is currently mapped. In addition, your overlay manager may define a function called @code{_ovly_debug_event}. If this function is defined, @value{GDBN} will silently set a breakpoint there. If the overlay manager then calls this function whenever it has changed the overlay table, this will enable @value{GDBN} to accurately keep track of which overlays are in program memory, and update any breakpoints that may be set in overlays. This will allow breakpoints to work even if the overlays are kept in ROM or other non-writable memory while they are not being executed. @node Overlay Sample Program @section Overlay Sample Program @cindex overlay example program When linking a program which uses overlays, you must place the overlays at their load addresses, while relocating them to run at their mapped addresses. To do this, you must write a linker script (@pxref{Overlay Description,,, ld.info, Using ld: the GNU linker}). Unfortunately, since linker scripts are specific to a particular host system, target architecture, and target memory layout, this manual cannot provide portable sample code demonstrating @value{GDBN}'s overlay support. However, the @value{GDBN} source distribution does contain an overlaid program, with linker scripts for a few systems, as part of its test suite. The program consists of the following files from @file{gdb/testsuite/gdb.base}: @table @file @item overlays.c The main program file. @item ovlymgr.c A simple overlay manager, used by @file{overlays.c}. @item foo.c @itemx bar.c @itemx baz.c @itemx grbx.c Overlay modules, loaded and used by @file{overlays.c}. @item d10v.ld @itemx m32r.ld Linker scripts for linking the test program on the @code{d10v-elf} and @code{m32r-elf} targets. @end table You can build the test program using the @code{d10v-elf} GCC cross-compiler like this: @smallexample $ d10v-elf-gcc -g -c overlays.c $ d10v-elf-gcc -g -c ovlymgr.c $ d10v-elf-gcc -g -c foo.c $ d10v-elf-gcc -g -c bar.c $ d10v-elf-gcc -g -c baz.c $ d10v-elf-gcc -g -c grbx.c $ d10v-elf-gcc -g overlays.o ovlymgr.o foo.o bar.o \ baz.o grbx.o -Wl,-Td10v.ld -o overlays @end smallexample The build process is identical for any other architecture, except that you must substitute the appropriate compiler and linker script for the target system for @code{d10v-elf-gcc} and @code{d10v.ld}. @node Languages @chapter Using @value{GDBN} with Different Languages @cindex languages Although programming languages generally have common aspects, they are rarely expressed in the same manner. For instance, in ANSI C, dereferencing a pointer @code{p} is accomplished by @code{*p}, but in Modula-2, it is accomplished by @code{p^}. Values can also be represented (and displayed) differently. Hex numbers in C appear as @samp{0x1ae}, while in Modula-2 they appear as @samp{1AEH}. @cindex working language Language-specific information is built into @value{GDBN} for some languages, allowing you to express operations like the above in your program's native language, and allowing @value{GDBN} to output values in a manner consistent with the syntax of your program's native language. The language you use to build expressions is called the @dfn{working language}. @menu * Setting:: Switching between source languages * Show:: Displaying the language * Checks:: Type and range checks * Supported Languages:: Supported languages * Unsupported Languages:: Unsupported languages @end menu @node Setting @section Switching Between Source Languages There are two ways to control the working language---either have @value{GDBN} set it automatically, or select it manually yourself. You can use the @code{set language} command for either purpose. On startup, @value{GDBN} defaults to setting the language automatically. The working language is used to determine how expressions you type are interpreted, how values are printed, etc. In addition to the working language, every source file that @value{GDBN} knows about has its own working language. For some object file formats, the compiler might indicate which language a particular source file is in. However, most of the time @value{GDBN} infers the language from the name of the file. The language of a source file controls whether C@t{++} names are demangled---this way @code{backtrace} can show each frame appropriately for its own language. There is no way to set the language of a source file from within @value{GDBN}, but you can set the language associated with a filename extension. @xref{Show, , Displaying the Language}. This is most commonly a problem when you use a program, such as @code{cfront} or @code{f2c}, that generates C but is written in another language. In that case, make the program use @code{#line} directives in its C output; that way @value{GDBN} will know the correct language of the source code of the original program, and will display that source code, not the generated C code. @menu * Filenames:: Filename extensions and languages. * Manually:: Setting the working language manually * Automatically:: Having @value{GDBN} infer the source language @end menu @node Filenames @subsection List of Filename Extensions and Languages If a source file name ends in one of the following extensions, then @value{GDBN} infers that its language is the one indicated. @table @file @item .ada @itemx .ads @itemx .adb @itemx .a Ada source file. @item .c C source file @item .C @itemx .cc @itemx .cp @itemx .cpp @itemx .cxx @itemx .c++ C@t{++} source file @item .d D source file @item .m Objective-C source file @item .f @itemx .F Fortran source file @item .mod Modula-2 source file @item .s @itemx .S Assembler source file. This actually behaves almost like C, but @value{GDBN} does not skip over function prologues when stepping. @end table In addition, you may set the language associated with a filename extension. @xref{Show, , Displaying the Language}. @node Manually @subsection Setting the Working Language If you allow @value{GDBN} to set the language automatically, expressions are interpreted the same way in your debugging session and your program. @kindex set language If you wish, you may set the language manually. To do this, issue the command @samp{set language @var{lang}}, where @var{lang} is the name of a language, such as @code{c} or @code{modula-2}. For a list of the supported languages, type @samp{set language}. Setting the language manually prevents @value{GDBN} from updating the working language automatically. This can lead to confusion if you try to debug a program when the working language is not the same as the source language, when an expression is acceptable to both languages---but means different things. For instance, if the current source file were written in C, and @value{GDBN} was parsing Modula-2, a command such as: @smallexample print a = b + c @end smallexample @noindent might not have the effect you intended. In C, this means to add @code{b} and @code{c} and place the result in @code{a}. The result printed would be the value of @code{a}. In Modula-2, this means to compare @code{a} to the result of @code{b+c}, yielding a @code{BOOLEAN} value. @node Automatically @subsection Having @value{GDBN} Infer the Source Language To have @value{GDBN} set the working language automatically, use @samp{set language local} or @samp{set language auto}. @value{GDBN} then infers the working language. That is, when your program stops in a frame (usually by encountering a breakpoint), @value{GDBN} sets the working language to the language recorded for the function in that frame. If the language for a frame is unknown (that is, if the function or block corresponding to the frame was defined in a source file that does not have a recognized extension), the current working language is not changed, and @value{GDBN} issues a warning. This may not seem necessary for most programs, which are written entirely in one source language. However, program modules and libraries written in one source language can be used by a main program written in a different source language. Using @samp{set language auto} in this case frees you from having to set the working language manually. @node Show @section Displaying the Language The following commands help you find out which language is the working language, and also what language source files were written in. @table @code @item show language @kindex show language Display the current working language. This is the language you can use with commands such as @code{print} to build and compute expressions that may involve variables in your program. @item info frame @kindex info frame@r{, show the source language} Display the source language for this frame. This language becomes the working language if you use an identifier from this frame. @xref{Frame Info, ,Information about a Frame}, to identify the other information listed here. @item info source @kindex info source@r{, show the source language} Display the source language of this source file. @xref{Symbols, ,Examining the Symbol Table}, to identify the other information listed here. @end table In unusual circumstances, you may have source files with extensions not in the standard list. You can then set the extension associated with a language explicitly: @table @code @item set extension-language @var{ext} @var{language} @kindex set extension-language Tell @value{GDBN} that source files with extension @var{ext} are to be assumed as written in the source language @var{language}. @item info extensions @kindex info extensions List all the filename extensions and the associated languages. @end table @node Checks @section Type and Range Checking Some languages are designed to guard you against making seemingly common errors through a series of compile- and run-time checks. These include checking the type of arguments to functions and operators and making sure mathematical overflows are caught at run time. Checks such as these help to ensure a program's correctness once it has been compiled by eliminating type mismatches and providing active checks for range errors when your program is running. By default @value{GDBN} checks for these errors according to the rules of the current source language. Although @value{GDBN} does not check the statements in your program, it can check expressions entered directly into @value{GDBN} for evaluation via the @code{print} command, for example. @menu * Type Checking:: An overview of type checking * Range Checking:: An overview of range checking @end menu @cindex type checking @cindex checks, type @node Type Checking @subsection An Overview of Type Checking Some languages, such as C and C@t{++}, are strongly typed, meaning that the arguments to operators and functions have to be of the correct type, otherwise an error occurs. These checks prevent type mismatch errors from ever causing any run-time problems. For example, @smallexample int klass::my_method(char *b) @{ return b ? 1 : 2; @} (@value{GDBP}) print obj.my_method (0) $1 = 2 @exdent but (@value{GDBP}) print obj.my_method (0x1234) Cannot resolve method klass::my_method to any overloaded instance @end smallexample The second example fails because in C@t{++} the integer constant @samp{0x1234} is not type-compatible with the pointer parameter type. For the expressions you use in @value{GDBN} commands, you can tell @value{GDBN} to not enforce strict type checking or to treat any mismatches as errors and abandon the expression; When type checking is disabled, @value{GDBN} successfully evaluates expressions like the second example above. Even if type checking is off, there may be other reasons related to type that prevent @value{GDBN} from evaluating an expression. For instance, @value{GDBN} does not know how to add an @code{int} and a @code{struct foo}. These particular type errors have nothing to do with the language in use and usually arise from expressions which make little sense to evaluate anyway. @value{GDBN} provides some additional commands for controlling type checking: @kindex set check type @kindex show check type @table @code @item set check type on @itemx set check type off Set strict type checking on or off. If any type mismatches occur in evaluating an expression while type checking is on, @value{GDBN} prints a message and aborts evaluation of the expression. @item show check type Show the current setting of type checking and whether @value{GDBN} is enforcing strict type checking rules. @end table @cindex range checking @cindex checks, range @node Range Checking @subsection An Overview of Range Checking In some languages (such as Modula-2), it is an error to exceed the bounds of a type; this is enforced with run-time checks. Such range checking is meant to ensure program correctness by making sure computations do not overflow, or indices on an array element access do not exceed the bounds of the array. For expressions you use in @value{GDBN} commands, you can tell @value{GDBN} to treat range errors in one of three ways: ignore them, always treat them as errors and abandon the expression, or issue warnings but evaluate the expression anyway. A range error can result from numerical overflow, from exceeding an array index bound, or when you type a constant that is not a member of any type. Some languages, however, do not treat overflows as an error. In many implementations of C, mathematical overflow causes the result to ``wrap around'' to lower values---for example, if @var{m} is the largest integer value, and @var{s} is the smallest, then @smallexample @var{m} + 1 @result{} @var{s} @end smallexample This, too, is specific to individual languages, and in some cases specific to individual compilers or machines. @xref{Supported Languages, , Supported Languages}, for further details on specific languages. @value{GDBN} provides some additional commands for controlling the range checker: @kindex set check range @kindex show check range @table @code @item set check range auto Set range checking on or off based on the current working language. @xref{Supported Languages, ,Supported Languages}, for the default settings for each language. @item set check range on @itemx set check range off Set range checking on or off, overriding the default setting for the current working language. A warning is issued if the setting does not match the language default. If a range error occurs and range checking is on, then a message is printed and evaluation of the expression is aborted. @item set check range warn Output messages when the @value{GDBN} range checker detects a range error, but attempt to evaluate the expression anyway. Evaluating the expression may still be impossible for other reasons, such as accessing memory that the process does not own (a typical example from many Unix systems). @item show range Show the current setting of the range checker, and whether or not it is being set automatically by @value{GDBN}. @end table @node Supported Languages @section Supported Languages @value{GDBN} supports C, C@t{++}, D, Go, Objective-C, Fortran, Java, OpenCL C, Pascal, assembly, Modula-2, and Ada. @c This is false ... Some @value{GDBN} features may be used in expressions regardless of the language you use: the @value{GDBN} @code{@@} and @code{::} operators, and the @samp{@{type@}addr} construct (@pxref{Expressions, ,Expressions}) can be used with the constructs of any supported language. The following sections detail to what degree each source language is supported by @value{GDBN}. These sections are not meant to be language tutorials or references, but serve only as a reference guide to what the @value{GDBN} expression parser accepts, and what input and output formats should look like for different languages. There are many good books written on each of these languages; please look to these for a language reference or tutorial. @menu * C:: C and C@t{++} * D:: D * Go:: Go * Objective-C:: Objective-C * OpenCL C:: OpenCL C * Fortran:: Fortran * Pascal:: Pascal * Modula-2:: Modula-2 * Ada:: Ada @end menu @node C @subsection C and C@t{++} @cindex C and C@t{++} @cindex expressions in C or C@t{++} Since C and C@t{++} are so closely related, many features of @value{GDBN} apply to both languages. Whenever this is the case, we discuss those languages together. @cindex C@t{++} @cindex @code{g++}, @sc{gnu} C@t{++} compiler @cindex @sc{gnu} C@t{++} The C@t{++} debugging facilities are jointly implemented by the C@t{++} compiler and @value{GDBN}. Therefore, to debug your C@t{++} code effectively, you must compile your C@t{++} programs with a supported C@t{++} compiler, such as @sc{gnu} @code{g++}, or the HP ANSI C@t{++} compiler (@code{aCC}). @menu * C Operators:: C and C@t{++} operators * C Constants:: C and C@t{++} constants * C Plus Plus Expressions:: C@t{++} expressions * C Defaults:: Default settings for C and C@t{++} * C Checks:: C and C@t{++} type and range checks * Debugging C:: @value{GDBN} and C * Debugging C Plus Plus:: @value{GDBN} features for C@t{++} * Decimal Floating Point:: Numbers in Decimal Floating Point format @end menu @node C Operators @subsubsection C and C@t{++} Operators @cindex C and C@t{++} operators Operators must be defined on values of specific types. For instance, @code{+} is defined on numbers, but not on structures. Operators are often defined on groups of types. For the purposes of C and C@t{++}, the following definitions hold: @itemize @bullet @item @emph{Integral types} include @code{int} with any of its storage-class specifiers; @code{char}; @code{enum}; and, for C@t{++}, @code{bool}. @item @emph{Floating-point types} include @code{float}, @code{double}, and @code{long double} (if supported by the target platform). @item @emph{Pointer types} include all types defined as @code{(@var{type} *)}. @item @emph{Scalar types} include all of the above. @end itemize @noindent The following operators are supported. They are listed here in order of increasing precedence: @table @code @item , The comma or sequencing operator. Expressions in a comma-separated list are evaluated from left to right, with the result of the entire expression being the last expression evaluated. @item = Assignment. The value of an assignment expression is the value assigned. Defined on scalar types. @item @var{op}= Used in an expression of the form @w{@code{@var{a} @var{op}= @var{b}}}, and translated to @w{@code{@var{a} = @var{a op b}}}. @w{@code{@var{op}=}} and @code{=} have the same precedence. @var{op} is any one of the operators @code{|}, @code{^}, @code{&}, @code{<<}, @code{>>}, @code{+}, @code{-}, @code{*}, @code{/}, @code{%}. @item ?: The ternary operator. @code{@var{a} ? @var{b} : @var{c}} can be thought of as: if @var{a} then @var{b} else @var{c}. @var{a} should be of an integral type. @item || Logical @sc{or}. Defined on integral types. @item && Logical @sc{and}. Defined on integral types. @item | Bitwise @sc{or}. Defined on integral types. @item ^ Bitwise exclusive-@sc{or}. Defined on integral types. @item & Bitwise @sc{and}. Defined on integral types. @item ==@r{, }!= Equality and inequality. Defined on scalar types. The value of these expressions is 0 for false and non-zero for true. @item <@r{, }>@r{, }<=@r{, }>= Less than, greater than, less than or equal, greater than or equal. Defined on scalar types. The value of these expressions is 0 for false and non-zero for true. @item <<@r{, }>> left shift, and right shift. Defined on integral types. @item @@ The @value{GDBN} ``artificial array'' operator (@pxref{Expressions, ,Expressions}). @item +@r{, }- Addition and subtraction. Defined on integral types, floating-point types and pointer types. @item *@r{, }/@r{, }% Multiplication, division, and modulus. Multiplication and division are defined on integral and floating-point types. Modulus is defined on integral types. @item ++@r{, }-- Increment and decrement. When appearing before a variable, the operation is performed before the variable is used in an expression; when appearing after it, the variable's value is used before the operation takes place. @item * Pointer dereferencing. Defined on pointer types. Same precedence as @code{++}. @item & Address operator. Defined on variables. Same precedence as @code{++}. For debugging C@t{++}, @value{GDBN} implements a use of @samp{&} beyond what is allowed in the C@t{++} language itself: you can use @samp{&(&@var{ref})} to examine the address where a C@t{++} reference variable (declared with @samp{&@var{ref}}) is stored. @item - Negative. Defined on integral and floating-point types. Same precedence as @code{++}. @item ! Logical negation. Defined on integral types. Same precedence as @code{++}. @item ~ Bitwise complement operator. Defined on integral types. Same precedence as @code{++}. @item .@r{, }-> Structure member, and pointer-to-structure member. For convenience, @value{GDBN} regards the two as equivalent, choosing whether to dereference a pointer based on the stored type information. Defined on @code{struct} and @code{union} data. @item .*@r{, }->* Dereferences of pointers to members. @item [] Array indexing. @code{@var{a}[@var{i}]} is defined as @code{*(@var{a}+@var{i})}. Same precedence as @code{->}. @item () Function parameter list. Same precedence as @code{->}. @item :: C@t{++} scope resolution operator. Defined on @code{struct}, @code{union}, and @code{class} types. @item :: Doubled colons also represent the @value{GDBN} scope operator (@pxref{Expressions, ,Expressions}). Same precedence as @code{::}, above. @end table If an operator is redefined in the user code, @value{GDBN} usually attempts to invoke the redefined version instead of using the operator's predefined meaning. @node C Constants @subsubsection C and C@t{++} Constants @cindex C and C@t{++} constants @value{GDBN} allows you to express the constants of C and C@t{++} in the following ways: @itemize @bullet @item Integer constants are a sequence of digits. Octal constants are specified by a leading @samp{0} (i.e.@: zero), and hexadecimal constants by a leading @samp{0x} or @samp{0X}. Constants may also end with a letter @samp{l}, specifying that the constant should be treated as a @code{long} value. @item Floating point constants are a sequence of digits, followed by a decimal point, followed by a sequence of digits, and optionally followed by an exponent. An exponent is of the form: @samp{@w{e@r{[[}+@r{]|}-@r{]}@var{nnn}}}, where @var{nnn} is another sequence of digits. The @samp{+} is optional for positive exponents. A floating-point constant may also end with a letter @samp{f} or @samp{F}, specifying that the constant should be treated as being of the @code{float} (as opposed to the default @code{double}) type; or with a letter @samp{l} or @samp{L}, which specifies a @code{long double} constant. @item Enumerated constants consist of enumerated identifiers, or their integral equivalents. @item Character constants are a single character surrounded by single quotes (@code{'}), or a number---the ordinal value of the corresponding character (usually its @sc{ascii} value). Within quotes, the single character may be represented by a letter or by @dfn{escape sequences}, which are of the form @samp{\@var{nnn}}, where @var{nnn} is the octal representation of the character's ordinal value; or of the form @samp{\@var{x}}, where @samp{@var{x}} is a predefined special character---for example, @samp{\n} for newline. Wide character constants can be written by prefixing a character constant with @samp{L}, as in C. For example, @samp{L'x'} is the wide form of @samp{x}. The target wide character set is used when computing the value of this constant (@pxref{Character Sets}). @item String constants are a sequence of character constants surrounded by double quotes (@code{"}). Any valid character constant (as described above) may appear. Double quotes within the string must be preceded by a backslash, so for instance @samp{"a\"b'c"} is a string of five characters. Wide string constants can be written by prefixing a string constant with @samp{L}, as in C. The target wide character set is used when computing the value of this constant (@pxref{Character Sets}). @item Pointer constants are an integral value. You can also write pointers to constants using the C operator @samp{&}. @item Array constants are comma-separated lists surrounded by braces @samp{@{} and @samp{@}}; for example, @samp{@{1,2,3@}} is a three-element array of integers, @samp{@{@{1,2@}, @{3,4@}, @{5,6@}@}} is a three-by-two array, and @samp{@{&"hi", &"there", &"fred"@}} is a three-element array of pointers. @end itemize @node C Plus Plus Expressions @subsubsection C@t{++} Expressions @cindex expressions in C@t{++} @value{GDBN} expression handling can interpret most C@t{++} expressions. @cindex debugging C@t{++} programs @cindex C@t{++} compilers @cindex debug formats and C@t{++} @cindex @value{NGCC} and C@t{++} @quotation @emph{Warning:} @value{GDBN} can only debug C@t{++} code if you use the proper compiler and the proper debug format. Currently, @value{GDBN} works best when debugging C@t{++} code that is compiled with the most recent version of @value{NGCC} possible. The DWARF debugging format is preferred; @value{NGCC} defaults to this on most popular platforms. Other compilers and/or debug formats are likely to work badly or not at all when using @value{GDBN} to debug C@t{++} code. @xref{Compilation}. @end quotation @enumerate @cindex member functions @item Member function calls are allowed; you can use expressions like @smallexample count = aml->GetOriginal(x, y) @end smallexample @vindex this@r{, inside C@t{++} member functions} @cindex namespace in C@t{++} @item While a member function is active (in the selected stack frame), your expressions have the same namespace available as the member function; that is, @value{GDBN} allows implicit references to the class instance pointer @code{this} following the same rules as C@t{++}. @code{using} declarations in the current scope are also respected by @value{GDBN}. @cindex call overloaded functions @cindex overloaded functions, calling @cindex type conversions in C@t{++} @item You can call overloaded functions; @value{GDBN} resolves the function call to the right definition, with some restrictions. @value{GDBN} does not perform overload resolution involving user-defined type conversions, calls to constructors, or instantiations of templates that do not exist in the program. It also cannot handle ellipsis argument lists or default arguments. It does perform integral conversions and promotions, floating-point promotions, arithmetic conversions, pointer conversions, conversions of class objects to base classes, and standard conversions such as those of functions or arrays to pointers; it requires an exact match on the number of function arguments. Overload resolution is always performed, unless you have specified @code{set overload-resolution off}. @xref{Debugging C Plus Plus, ,@value{GDBN} Features for C@t{++}}. You must specify @code{set overload-resolution off} in order to use an explicit function signature to call an overloaded function, as in @smallexample p 'foo(char,int)'('x', 13) @end smallexample The @value{GDBN} command-completion facility can simplify this; see @ref{Completion, ,Command Completion}. @cindex reference declarations @item @value{GDBN} understands variables declared as C@t{++} references; you can use them in expressions just as you do in C@t{++} source---they are automatically dereferenced. In the parameter list shown when @value{GDBN} displays a frame, the values of reference variables are not displayed (unlike other variables); this avoids clutter, since references are often used for large structures. The @emph{address} of a reference variable is always shown, unless you have specified @samp{set print address off}. @item @value{GDBN} supports the C@t{++} name resolution operator @code{::}---your expressions can use it just as expressions in your program do. Since one scope may be defined in another, you can use @code{::} repeatedly if necessary, for example in an expression like @samp{@var{scope1}::@var{scope2}::@var{name}}. @value{GDBN} also allows resolving name scope by reference to source files, in both C and C@t{++} debugging (@pxref{Variables, ,Program Variables}). @item @value{GDBN} performs argument-dependent lookup, following the C@t{++} specification. @end enumerate @node C Defaults @subsubsection C and C@t{++} Defaults @cindex C and C@t{++} defaults If you allow @value{GDBN} to set range checking automatically, it defaults to @code{off} whenever the working language changes to C or C@t{++}. This happens regardless of whether you or @value{GDBN} selects the working language. If you allow @value{GDBN} to set the language automatically, it recognizes source files whose names end with @file{.c}, @file{.C}, or @file{.cc}, etc, and when @value{GDBN} enters code compiled from one of these files, it sets the working language to C or C@t{++}. @xref{Automatically, ,Having @value{GDBN} Infer the Source Language}, for further details. @node C Checks @subsubsection C and C@t{++} Type and Range Checks @cindex C and C@t{++} checks By default, when @value{GDBN} parses C or C@t{++} expressions, strict type checking is used. However, if you turn type checking off, @value{GDBN} will allow certain non-standard conversions, such as promoting integer constants to pointers. Range checking, if turned on, is done on mathematical operations. Array indices are not checked, since they are often used to index a pointer that is not itself an array. @node Debugging C @subsubsection @value{GDBN} and C The @code{set print union} and @code{show print union} commands apply to the @code{union} type. When set to @samp{on}, any @code{union} that is inside a @code{struct} or @code{class} is also printed. Otherwise, it appears as @samp{@{...@}}. The @code{@@} operator aids in the debugging of dynamic arrays, formed with pointers and a memory allocation function. @xref{Expressions, ,Expressions}. @node Debugging C Plus Plus @subsubsection @value{GDBN} Features for C@t{++} @cindex commands for C@t{++} Some @value{GDBN} commands are particularly useful with C@t{++}, and some are designed specifically for use with C@t{++}. Here is a summary: @table @code @cindex break in overloaded functions @item @r{breakpoint menus} When you want a breakpoint in a function whose name is overloaded, @value{GDBN} has the capability to display a menu of possible breakpoint locations to help you specify which function definition you want. @xref{Ambiguous Expressions,,Ambiguous Expressions}. @cindex overloading in C@t{++} @item rbreak @var{regex} Setting breakpoints using regular expressions is helpful for setting breakpoints on overloaded functions that are not members of any special classes. @xref{Set Breaks, ,Setting Breakpoints}. @cindex C@t{++} exception handling @item catch throw @itemx catch catch Debug C@t{++} exception handling using these commands. @xref{Set Catchpoints, , Setting Catchpoints}. @cindex inheritance @item ptype @var{typename} Print inheritance relationships as well as other information for type @var{typename}. @xref{Symbols, ,Examining the Symbol Table}. @item info vtbl @var{expression}. The @code{info vtbl} command can be used to display the virtual method tables of the object computed by @var{expression}. This shows one entry per virtual table; there may be multiple virtual tables when multiple inheritance is in use. @cindex C@t{++} symbol display @item set print demangle @itemx show print demangle @itemx set print asm-demangle @itemx show print asm-demangle Control whether C@t{++} symbols display in their source form, both when displaying code as C@t{++} source and when displaying disassemblies. @xref{Print Settings, ,Print Settings}. @item set print object @itemx show print object Choose whether to print derived (actual) or declared types of objects. @xref{Print Settings, ,Print Settings}. @item set print vtbl @itemx show print vtbl Control the format for printing virtual function tables. @xref{Print Settings, ,Print Settings}. (The @code{vtbl} commands do not work on programs compiled with the HP ANSI C@t{++} compiler (@code{aCC}).) @kindex set overload-resolution @cindex overloaded functions, overload resolution @item set overload-resolution on Enable overload resolution for C@t{++} expression evaluation. The default is on. For overloaded functions, @value{GDBN} evaluates the arguments and searches for a function whose signature matches the argument types, using the standard C@t{++} conversion rules (see @ref{C Plus Plus Expressions, ,C@t{++} Expressions}, for details). If it cannot find a match, it emits a message. @item set overload-resolution off Disable overload resolution for C@t{++} expression evaluation. For overloaded functions that are not class member functions, @value{GDBN} chooses the first function of the specified name that it finds in the symbol table, whether or not its arguments are of the correct type. For overloaded functions that are class member functions, @value{GDBN} searches for a function whose signature @emph{exactly} matches the argument types. @kindex show overload-resolution @item show overload-resolution Show the current setting of overload resolution. @item @r{Overloaded symbol names} You can specify a particular definition of an overloaded symbol, using the same notation that is used to declare such symbols in C@t{++}: type @code{@var{symbol}(@var{types})} rather than just @var{symbol}. You can also use the @value{GDBN} command-line word completion facilities to list the available choices, or to finish the type list for you. @xref{Completion,, Command Completion}, for details on how to do this. @end table @node Decimal Floating Point @subsubsection Decimal Floating Point format @cindex decimal floating point format @value{GDBN} can examine, set and perform computations with numbers in decimal floating point format, which in the C language correspond to the @code{_Decimal32}, @code{_Decimal64} and @code{_Decimal128} types as specified by the extension to support decimal floating-point arithmetic. There are two encodings in use, depending on the architecture: BID (Binary Integer Decimal) for x86 and x86-64, and DPD (Densely Packed Decimal) for PowerPC. @value{GDBN} will use the appropriate encoding for the configured target. Because of a limitation in @file{libdecnumber}, the library used by @value{GDBN} to manipulate decimal floating point numbers, it is not possible to convert (using a cast, for example) integers wider than 32-bit to decimal float. In addition, in order to imitate @value{GDBN}'s behaviour with binary floating point computations, error checking in decimal float operations ignores underflow, overflow and divide by zero exceptions. In the PowerPC architecture, @value{GDBN} provides a set of pseudo-registers to inspect @code{_Decimal128} values stored in floating point registers. See @ref{PowerPC,,PowerPC} for more details. @node D @subsection D @cindex D @value{GDBN} can be used to debug programs written in D and compiled with GDC, LDC or DMD compilers. Currently @value{GDBN} supports only one D specific feature --- dynamic arrays. @node Go @subsection Go @cindex Go (programming language) @value{GDBN} can be used to debug programs written in Go and compiled with @file{gccgo} or @file{6g} compilers. Here is a summary of the Go-specific features and restrictions: @table @code @cindex current Go package @item The current Go package The name of the current package does not need to be specified when specifying global variables and functions. For example, given the program: @example package main var myglob = "Shall we?" func main () @{ // ... @} @end example When stopped inside @code{main} either of these work: @example (gdb) p myglob (gdb) p main.myglob @end example @cindex builtin Go types @item Builtin Go types The @code{string} type is recognized by @value{GDBN} and is printed as a string. @cindex builtin Go functions @item Builtin Go functions The @value{GDBN} expression parser recognizes the @code{unsafe.Sizeof} function and handles it internally. @cindex restrictions on Go expressions @item Restrictions on Go expressions All Go operators are supported except @code{&^}. The Go @code{_} ``blank identifier'' is not supported. Automatic dereferencing of pointers is not supported. @end table @node Objective-C @subsection Objective-C @cindex Objective-C This section provides information about some commands and command options that are useful for debugging Objective-C code. See also @ref{Symbols, info classes}, and @ref{Symbols, info selectors}, for a few more commands specific to Objective-C support. @menu * Method Names in Commands:: * The Print Command with Objective-C:: @end menu @node Method Names in Commands @subsubsection Method Names in Commands The following commands have been extended to accept Objective-C method names as line specifications: @kindex clear@r{, and Objective-C} @kindex break@r{, and Objective-C} @kindex info line@r{, and Objective-C} @kindex jump@r{, and Objective-C} @kindex list@r{, and Objective-C} @itemize @item @code{clear} @item @code{break} @item @code{info line} @item @code{jump} @item @code{list} @end itemize A fully qualified Objective-C method name is specified as @smallexample -[@var{Class} @var{methodName}] @end smallexample where the minus sign is used to indicate an instance method and a plus sign (not shown) is used to indicate a class method. The class name @var{Class} and method name @var{methodName} are enclosed in brackets, similar to the way messages are specified in Objective-C source code. For example, to set a breakpoint at the @code{create} instance method of class @code{Fruit} in the program currently being debugged, enter: @smallexample break -[Fruit create] @end smallexample To list ten program lines around the @code{initialize} class method, enter: @smallexample list +[NSText initialize] @end smallexample In the current version of @value{GDBN}, the plus or minus sign is required. In future versions of @value{GDBN}, the plus or minus sign will be optional, but you can use it to narrow the search. It is also possible to specify just a method name: @smallexample break create @end smallexample You must specify the complete method name, including any colons. If your program's source files contain more than one @code{create} method, you'll be presented with a numbered list of classes that implement that method. Indicate your choice by number, or type @samp{0} to exit if none apply. As another example, to clear a breakpoint established at the @code{makeKeyAndOrderFront:} method of the @code{NSWindow} class, enter: @smallexample clear -[NSWindow makeKeyAndOrderFront:] @end smallexample @node The Print Command with Objective-C @subsubsection The Print Command With Objective-C @cindex Objective-C, print objects @kindex print-object @kindex po @r{(@code{print-object})} The print command has also been extended to accept methods. For example: @smallexample print -[@var{object} hash] @end smallexample @cindex print an Objective-C object description @cindex @code{_NSPrintForDebugger}, and printing Objective-C objects @noindent will tell @value{GDBN} to send the @code{hash} message to @var{object} and print the result. Also, an additional command has been added, @code{print-object} or @code{po} for short, which is meant to print the description of an object. However, this command may only work with certain Objective-C libraries that have a particular hook function, @code{_NSPrintForDebugger}, defined. @node OpenCL C @subsection OpenCL C @cindex OpenCL C This section provides information about @value{GDBN}s OpenCL C support. @menu * OpenCL C Datatypes:: * OpenCL C Expressions:: * OpenCL C Operators:: @end menu @node OpenCL C Datatypes @subsubsection OpenCL C Datatypes @cindex OpenCL C Datatypes @value{GDBN} supports the builtin scalar and vector datatypes specified by OpenCL 1.1. In addition the half- and double-precision floating point data types of the @code{cl_khr_fp16} and @code{cl_khr_fp64} OpenCL extensions are also known to @value{GDBN}. @node OpenCL C Expressions @subsubsection OpenCL C Expressions @cindex OpenCL C Expressions @value{GDBN} supports accesses to vector components including the access as lvalue where possible. Since OpenCL C is based on C99 most C expressions supported by @value{GDBN} can be used as well. @node OpenCL C Operators @subsubsection OpenCL C Operators @cindex OpenCL C Operators @value{GDBN} supports the operators specified by OpenCL 1.1 for scalar and vector data types. @node Fortran @subsection Fortran @cindex Fortran-specific support in @value{GDBN} @value{GDBN} can be used to debug programs written in Fortran, but it currently supports only the features of Fortran 77 language. @cindex trailing underscore, in Fortran symbols Some Fortran compilers (@sc{gnu} Fortran 77 and Fortran 95 compilers among them) append an underscore to the names of variables and functions. When you debug programs compiled by those compilers, you will need to refer to variables and functions with a trailing underscore. @menu * Fortran Operators:: Fortran operators and expressions * Fortran Defaults:: Default settings for Fortran * Special Fortran Commands:: Special @value{GDBN} commands for Fortran @end menu @node Fortran Operators @subsubsection Fortran Operators and Expressions @cindex Fortran operators and expressions Operators must be defined on values of specific types. For instance, @code{+} is defined on numbers, but not on characters or other non- arithmetic types. Operators are often defined on groups of types. @table @code @item ** The exponentiation operator. It raises the first operand to the power of the second one. @item : The range operator. Normally used in the form of array(low:high) to represent a section of array. @item % The access component operator. Normally used to access elements in derived types. Also suitable for unions. As unions aren't part of regular Fortran, this can only happen when accessing a register that uses a gdbarch-defined union type. @end table @node Fortran Defaults @subsubsection Fortran Defaults @cindex Fortran Defaults Fortran symbols are usually case-insensitive, so @value{GDBN} by default uses case-insensitive matches for Fortran symbols. You can change that with the @samp{set case-insensitive} command, see @ref{Symbols}, for the details. @node Special Fortran Commands @subsubsection Special Fortran Commands @cindex Special Fortran commands @value{GDBN} has some commands to support Fortran-specific features, such as displaying common blocks. @table @code @cindex @code{COMMON} blocks, Fortran @kindex info common @item info common @r{[}@var{common-name}@r{]} This command prints the values contained in the Fortran @code{COMMON} block whose name is @var{common-name}. With no argument, the names of all @code{COMMON} blocks visible at the current program location are printed. @end table @node Pascal @subsection Pascal @cindex Pascal support in @value{GDBN}, limitations Debugging Pascal programs which use sets, subranges, file variables, or nested functions does not currently work. @value{GDBN} does not support entering expressions, printing values, or similar features using Pascal syntax. The Pascal-specific command @code{set print pascal_static-members} controls whether static members of Pascal objects are displayed. @xref{Print Settings, pascal_static-members}. @node Modula-2 @subsection Modula-2 @cindex Modula-2, @value{GDBN} support The extensions made to @value{GDBN} to support Modula-2 only support output from the @sc{gnu} Modula-2 compiler (which is currently being developed). Other Modula-2 compilers are not currently supported, and attempting to debug executables produced by them is most likely to give an error as @value{GDBN} reads in the executable's symbol table. @cindex expressions in Modula-2 @menu * M2 Operators:: Built-in operators * Built-In Func/Proc:: Built-in functions and procedures * M2 Constants:: Modula-2 constants * M2 Types:: Modula-2 types * M2 Defaults:: Default settings for Modula-2 * Deviations:: Deviations from standard Modula-2 * M2 Checks:: Modula-2 type and range checks * M2 Scope:: The scope operators @code{::} and @code{.} * GDB/M2:: @value{GDBN} and Modula-2 @end menu @node M2 Operators @subsubsection Operators @cindex Modula-2 operators Operators must be defined on values of specific types. For instance, @code{+} is defined on numbers, but not on structures. Operators are often defined on groups of types. For the purposes of Modula-2, the following definitions hold: @itemize @bullet @item @emph{Integral types} consist of @code{INTEGER}, @code{CARDINAL}, and their subranges. @item @emph{Character types} consist of @code{CHAR} and its subranges. @item @emph{Floating-point types} consist of @code{REAL}. @item @emph{Pointer types} consist of anything declared as @code{POINTER TO @var{type}}. @item @emph{Scalar types} consist of all of the above. @item @emph{Set types} consist of @code{SET} and @code{BITSET} types. @item @emph{Boolean types} consist of @code{BOOLEAN}. @end itemize @noindent The following operators are supported, and appear in order of increasing precedence: @table @code @item , Function argument or array index separator. @item := Assignment. The value of @var{var} @code{:=} @var{value} is @var{value}. @item <@r{, }> Less than, greater than on integral, floating-point, or enumerated types. @item <=@r{, }>= Less than or equal to, greater than or equal to on integral, floating-point and enumerated types, or set inclusion on set types. Same precedence as @code{<}. @item =@r{, }<>@r{, }# Equality and two ways of expressing inequality, valid on scalar types. Same precedence as @code{<}. In @value{GDBN} scripts, only @code{<>} is available for inequality, since @code{#} conflicts with the script comment character. @item IN Set membership. Defined on set types and the types of their members. Same precedence as @code{<}. @item OR Boolean disjunction. Defined on boolean types. @item AND@r{, }& Boolean conjunction. Defined on boolean types. @item @@ The @value{GDBN} ``artificial array'' operator (@pxref{Expressions, ,Expressions}). @item +@r{, }- Addition and subtraction on integral and floating-point types, or union and difference on set types. @item * Multiplication on integral and floating-point types, or set intersection on set types. @item / Division on floating-point types, or symmetric set difference on set types. Same precedence as @code{*}. @item DIV@r{, }MOD Integer division and remainder. Defined on integral types. Same precedence as @code{*}. @item - Negative. Defined on @code{INTEGER} and @code{REAL} data. @item ^ Pointer dereferencing. Defined on pointer types. @item NOT Boolean negation. Defined on boolean types. Same precedence as @code{^}. @item . @code{RECORD} field selector. Defined on @code{RECORD} data. Same precedence as @code{^}. @item [] Array indexing. Defined on @code{ARRAY} data. Same precedence as @code{^}. @item () Procedure argument list. Defined on @code{PROCEDURE} objects. Same precedence as @code{^}. @item ::@r{, }. @value{GDBN} and Modula-2 scope operators. @end table @quotation @emph{Warning:} Set expressions and their operations are not yet supported, so @value{GDBN} treats the use of the operator @code{IN}, or the use of operators @code{+}, @code{-}, @code{*}, @code{/}, @code{=}, , @code{<>}, @code{#}, @code{<=}, and @code{>=} on sets as an error. @end quotation @node Built-In Func/Proc @subsubsection Built-in Functions and Procedures @cindex Modula-2 built-ins Modula-2 also makes available several built-in procedures and functions. In describing these, the following metavariables are used: @table @var @item a represents an @code{ARRAY} variable. @item c represents a @code{CHAR} constant or variable. @item i represents a variable or constant of integral type. @item m represents an identifier that belongs to a set. Generally used in the same function with the metavariable @var{s}. The type of @var{s} should be @code{SET OF @var{mtype}} (where @var{mtype} is the type of @var{m}). @item n represents a variable or constant of integral or floating-point type. @item r represents a variable or constant of floating-point type. @item t represents a type. @item v represents a variable. @item x represents a variable or constant of one of many types. See the explanation of the function for details. @end table All Modula-2 built-in procedures also return a result, described below. @table @code @item ABS(@var{n}) Returns the absolute value of @var{n}. @item CAP(@var{c}) If @var{c} is a lower case letter, it returns its upper case equivalent, otherwise it returns its argument. @item CHR(@var{i}) Returns the character whose ordinal value is @var{i}. @item DEC(@var{v}) Decrements the value in the variable @var{v} by one. Returns the new value. @item DEC(@var{v},@var{i}) Decrements the value in the variable @var{v} by @var{i}. Returns the new value. @item EXCL(@var{m},@var{s}) Removes the element @var{m} from the set @var{s}. Returns the new set. @item FLOAT(@var{i}) Returns the floating point equivalent of the integer @var{i}. @item HIGH(@var{a}) Returns the index of the last member of @var{a}. @item INC(@var{v}) Increments the value in the variable @var{v} by one. Returns the new value. @item INC(@var{v},@var{i}) Increments the value in the variable @var{v} by @var{i}. Returns the new value. @item INCL(@var{m},@var{s}) Adds the element @var{m} to the set @var{s} if it is not already there. Returns the new set. @item MAX(@var{t}) Returns the maximum value of the type @var{t}. @item MIN(@var{t}) Returns the minimum value of the type @var{t}. @item ODD(@var{i}) Returns boolean TRUE if @var{i} is an odd number. @item ORD(@var{x}) Returns the ordinal value of its argument. For example, the ordinal value of a character is its @sc{ascii} value (on machines supporting the @sc{ascii} character set). @var{x} must be of an ordered type, which include integral, character and enumerated types. @item SIZE(@var{x}) Returns the size of its argument. @var{x} can be a variable or a type. @item TRUNC(@var{r}) Returns the integral part of @var{r}. @item TSIZE(@var{x}) Returns the size of its argument. @var{x} can be a variable or a type. @item VAL(@var{t},@var{i}) Returns the member of the type @var{t} whose ordinal value is @var{i}. @end table @quotation @emph{Warning:} Sets and their operations are not yet supported, so @value{GDBN} treats the use of procedures @code{INCL} and @code{EXCL} as an error. @end quotation @cindex Modula-2 constants @node M2 Constants @subsubsection Constants @value{GDBN} allows you to express the constants of Modula-2 in the following ways: @itemize @bullet @item Integer constants are simply a sequence of digits. When used in an expression, a constant is interpreted to be type-compatible with the rest of the expression. Hexadecimal integers are specified by a trailing @samp{H}, and octal integers by a trailing @samp{B}. @item Floating point constants appear as a sequence of digits, followed by a decimal point and another sequence of digits. An optional exponent can then be specified, in the form @samp{E@r{[}+@r{|}-@r{]}@var{nnn}}, where @samp{@r{[}+@r{|}-@r{]}@var{nnn}} is the desired exponent. All of the digits of the floating point constant must be valid decimal (base 10) digits. @item Character constants consist of a single character enclosed by a pair of like quotes, either single (@code{'}) or double (@code{"}). They may also be expressed by their ordinal value (their @sc{ascii} value, usually) followed by a @samp{C}. @item String constants consist of a sequence of characters enclosed by a pair of like quotes, either single (@code{'}) or double (@code{"}). Escape sequences in the style of C are also allowed. @xref{C Constants, ,C and C@t{++} Constants}, for a brief explanation of escape sequences. @item Enumerated constants consist of an enumerated identifier. @item Boolean constants consist of the identifiers @code{TRUE} and @code{FALSE}. @item Pointer constants consist of integral values only. @item Set constants are not yet supported. @end itemize @node M2 Types @subsubsection Modula-2 Types @cindex Modula-2 types Currently @value{GDBN} can print the following data types in Modula-2 syntax: array types, record types, set types, pointer types, procedure types, enumerated types, subrange types and base types. You can also print the contents of variables declared using these type. This section gives a number of simple source code examples together with sample @value{GDBN} sessions. The first example contains the following section of code: @smallexample VAR s: SET OF CHAR ; r: [20..40] ; @end smallexample @noindent and you can request @value{GDBN} to interrogate the type and value of @code{r} and @code{s}. @smallexample (@value{GDBP}) print s @{'A'..'C', 'Z'@} (@value{GDBP}) ptype s SET OF CHAR (@value{GDBP}) print r 21 (@value{GDBP}) ptype r [20..40] @end smallexample @noindent Likewise if your source code declares @code{s} as: @smallexample VAR s: SET ['A'..'Z'] ; @end smallexample @noindent then you may query the type of @code{s} by: @smallexample (@value{GDBP}) ptype s type = SET ['A'..'Z'] @end smallexample @noindent Note that at present you cannot interactively manipulate set expressions using the debugger. The following example shows how you might declare an array in Modula-2 and how you can interact with @value{GDBN} to print its type and contents: @smallexample VAR s: ARRAY [-10..10] OF CHAR ; @end smallexample @smallexample (@value{GDBP}) ptype s ARRAY [-10..10] OF CHAR @end smallexample Note that the array handling is not yet complete and although the type is printed correctly, expression handling still assumes that all arrays have a lower bound of zero and not @code{-10} as in the example above. Here are some more type related Modula-2 examples: @smallexample TYPE colour = (blue, red, yellow, green) ; t = [blue..yellow] ; VAR s: t ; BEGIN s := blue ; @end smallexample @noindent The @value{GDBN} interaction shows how you can query the data type and value of a variable. @smallexample (@value{GDBP}) print s $1 = blue (@value{GDBP}) ptype t type = [blue..yellow] @end smallexample @noindent In this example a Modula-2 array is declared and its contents displayed. Observe that the contents are written in the same way as their @code{C} counterparts. @smallexample VAR s: ARRAY [1..5] OF CARDINAL ; BEGIN s[1] := 1 ; @end smallexample @smallexample (@value{GDBP}) print s $1 = @{1, 0, 0, 0, 0@} (@value{GDBP}) ptype s type = ARRAY [1..5] OF CARDINAL @end smallexample The Modula-2 language interface to @value{GDBN} also understands pointer types as shown in this example: @smallexample VAR s: POINTER TO ARRAY [1..5] OF CARDINAL ; BEGIN NEW(s) ; s^[1] := 1 ; @end smallexample @noindent and you can request that @value{GDBN} describes the type of @code{s}. @smallexample (@value{GDBP}) ptype s type = POINTER TO ARRAY [1..5] OF CARDINAL @end smallexample @value{GDBN} handles compound types as we can see in this example. Here we combine array types, record types, pointer types and subrange types: @smallexample TYPE foo = RECORD f1: CARDINAL ; f2: CHAR ; f3: myarray ; END ; myarray = ARRAY myrange OF CARDINAL ; myrange = [-2..2] ; VAR s: POINTER TO ARRAY myrange OF foo ; @end smallexample @noindent and you can ask @value{GDBN} to describe the type of @code{s} as shown below. @smallexample (@value{GDBP}) ptype s type = POINTER TO ARRAY [-2..2] OF foo = RECORD f1 : CARDINAL; f2 : CHAR; f3 : ARRAY [-2..2] OF CARDINAL; END @end smallexample @node M2 Defaults @subsubsection Modula-2 Defaults @cindex Modula-2 defaults If type and range checking are set automatically by @value{GDBN}, they both default to @code{on} whenever the working language changes to Modula-2. This happens regardless of whether you or @value{GDBN} selected the working language. If you allow @value{GDBN} to set the language automatically, then entering code compiled from a file whose name ends with @file{.mod} sets the working language to Modula-2. @xref{Automatically, ,Having @value{GDBN} Infer the Source Language}, for further details. @node Deviations @subsubsection Deviations from Standard Modula-2 @cindex Modula-2, deviations from A few changes have been made to make Modula-2 programs easier to debug. This is done primarily via loosening its type strictness: @itemize @bullet @item Unlike in standard Modula-2, pointer constants can be formed by integers. This allows you to modify pointer variables during debugging. (In standard Modula-2, the actual address contained in a pointer variable is hidden from you; it can only be modified through direct assignment to another pointer variable or expression that returned a pointer.) @item C escape sequences can be used in strings and characters to represent non-printable characters. @value{GDBN} prints out strings with these escape sequences embedded. Single non-printable characters are printed using the @samp{CHR(@var{nnn})} format. @item The assignment operator (@code{:=}) returns the value of its right-hand argument. @item All built-in procedures both modify @emph{and} return their argument. @end itemize @node M2 Checks @subsubsection Modula-2 Type and Range Checks @cindex Modula-2 checks @quotation @emph{Warning:} in this release, @value{GDBN} does not yet perform type or range checking. @end quotation @c FIXME remove warning when type/range checks added @value{GDBN} considers two Modula-2 variables type equivalent if: @itemize @bullet @item They are of types that have been declared equivalent via a @code{TYPE @var{t1} = @var{t2}} statement @item They have been declared on the same line. (Note: This is true of the @sc{gnu} Modula-2 compiler, but it may not be true of other compilers.) @end itemize As long as type checking is enabled, any attempt to combine variables whose types are not equivalent is an error. Range checking is done on all mathematical operations, assignment, array index bounds, and all built-in functions and procedures. @node M2 Scope @subsubsection The Scope Operators @code{::} and @code{.} @cindex scope @cindex @code{.}, Modula-2 scope operator @cindex colon, doubled as scope operator @ifinfo @vindex colon-colon@r{, in Modula-2} @c Info cannot handle :: but TeX can. @end ifinfo @ifnotinfo @vindex ::@r{, in Modula-2} @end ifnotinfo There are a few subtle differences between the Modula-2 scope operator (@code{.}) and the @value{GDBN} scope operator (@code{::}). The two have similar syntax: @smallexample @var{module} . @var{id} @var{scope} :: @var{id} @end smallexample @noindent where @var{scope} is the name of a module or a procedure, @var{module} the name of a module, and @var{id} is any declared identifier within your program, except another module. Using the @code{::} operator makes @value{GDBN} search the scope specified by @var{scope} for the identifier @var{id}. If it is not found in the specified scope, then @value{GDBN} searches all scopes enclosing the one specified by @var{scope}. Using the @code{.} operator makes @value{GDBN} search the current scope for the identifier specified by @var{id} that was imported from the definition module specified by @var{module}. With this operator, it is an error if the identifier @var{id} was not imported from definition module @var{module}, or if @var{id} is not an identifier in @var{module}. @node GDB/M2 @subsubsection @value{GDBN} and Modula-2 Some @value{GDBN} commands have little use when debugging Modula-2 programs. Five subcommands of @code{set print} and @code{show print} apply specifically to C and C@t{++}: @samp{vtbl}, @samp{demangle}, @samp{asm-demangle}, @samp{object}, and @samp{union}. The first four apply to C@t{++}, and the last to the C @code{union} type, which has no direct analogue in Modula-2. The @code{@@} operator (@pxref{Expressions, ,Expressions}), while available with any language, is not useful with Modula-2. Its intent is to aid the debugging of @dfn{dynamic arrays}, which cannot be created in Modula-2 as they can in C or C@t{++}. However, because an address can be specified by an integral constant, the construct @samp{@{@var{type}@}@var{adrexp}} is still useful. @cindex @code{#} in Modula-2 In @value{GDBN} scripts, the Modula-2 inequality operator @code{#} is interpreted as the beginning of a comment. Use @code{<>} instead. @node Ada @subsection Ada @cindex Ada The extensions made to @value{GDBN} for Ada only support output from the @sc{gnu} Ada (GNAT) compiler. Other Ada compilers are not currently supported, and attempting to debug executables produced by them is most likely to be difficult. @cindex expressions in Ada @menu * Ada Mode Intro:: General remarks on the Ada syntax and semantics supported by Ada mode in @value{GDBN}. * Omissions from Ada:: Restrictions on the Ada expression syntax. * Additions to Ada:: Extensions of the Ada expression syntax. * Stopping Before Main Program:: Debugging the program during elaboration. * Ada Tasks:: Listing and setting breakpoints in tasks. * Ada Tasks and Core Files:: Tasking Support when Debugging Core Files * Ravenscar Profile:: Tasking Support when using the Ravenscar Profile * Ada Glitches:: Known peculiarities of Ada mode. @end menu @node Ada Mode Intro @subsubsection Introduction @cindex Ada mode, general The Ada mode of @value{GDBN} supports a fairly large subset of Ada expression syntax, with some extensions. The philosophy behind the design of this subset is @itemize @bullet @item That @value{GDBN} should provide basic literals and access to operations for arithmetic, dereferencing, field selection, indexing, and subprogram calls, leaving more sophisticated computations to subprograms written into the program (which therefore may be called from @value{GDBN}). @item That type safety and strict adherence to Ada language restrictions are not particularly important to the @value{GDBN} user. @item That brevity is important to the @value{GDBN} user. @end itemize Thus, for brevity, the debugger acts as if all names declared in user-written packages are directly visible, even if they are not visible according to Ada rules, thus making it unnecessary to fully qualify most names with their packages, regardless of context. Where this causes ambiguity, @value{GDBN} asks the user's intent. The debugger will start in Ada mode if it detects an Ada main program. As for other languages, it will enter Ada mode when stopped in a program that was translated from an Ada source file. While in Ada mode, you may use `@t{--}' for comments. This is useful mostly for documenting command files. The standard @value{GDBN} comment (@samp{#}) still works at the beginning of a line in Ada mode, but not in the middle (to allow based literals). The debugger supports limited overloading. Given a subprogram call in which the function symbol has multiple definitions, it will use the number of actual parameters and some information about their types to attempt to narrow the set of definitions. It also makes very limited use of context, preferring procedures to functions in the context of the @code{call} command, and functions to procedures elsewhere. @node Omissions from Ada @subsubsection Omissions from Ada @cindex Ada, omissions from Here are the notable omissions from the subset: @itemize @bullet @item Only a subset of the attributes are supported: @itemize @minus @item @t{'First}, @t{'Last}, and @t{'Length} on array objects (not on types and subtypes). @item @t{'Min} and @t{'Max}. @item @t{'Pos} and @t{'Val}. @item @t{'Tag}. @item @t{'Range} on array objects (not subtypes), but only as the right operand of the membership (@code{in}) operator. @item @t{'Access}, @t{'Unchecked_Access}, and @t{'Unrestricted_Access} (a GNAT extension). @item @t{'Address}. @end itemize @item The names in @code{Characters.Latin_1} are not available and concatenation is not implemented. Thus, escape characters in strings are not currently available. @item Equality tests (@samp{=} and @samp{/=}) on arrays test for bitwise equality of representations. They will generally work correctly for strings and arrays whose elements have integer or enumeration types. They may not work correctly for arrays whose element types have user-defined equality, for arrays of real values (in particular, IEEE-conformant floating point, because of negative zeroes and NaNs), and for arrays whose elements contain unused bits with indeterminate values. @item The other component-by-component array operations (@code{and}, @code{or}, @code{xor}, @code{not}, and relational tests other than equality) are not implemented. @item @cindex array aggregates (Ada) @cindex record aggregates (Ada) @cindex aggregates (Ada) There is limited support for array and record aggregates. They are permitted only on the right sides of assignments, as in these examples: @smallexample (@value{GDBP}) set An_Array := (1, 2, 3, 4, 5, 6) (@value{GDBP}) set An_Array := (1, others => 0) (@value{GDBP}) set An_Array := (0|4 => 1, 1..3 => 2, 5 => 6) (@value{GDBP}) set A_2D_Array := ((1, 2, 3), (4, 5, 6), (7, 8, 9)) (@value{GDBP}) set A_Record := (1, "Peter", True); (@value{GDBP}) set A_Record := (Name => "Peter", Id => 1, Alive => True) @end smallexample Changing a discriminant's value by assigning an aggregate has an undefined effect if that discriminant is used within the record. However, you can first modify discriminants by directly assigning to them (which normally would not be allowed in Ada), and then performing an aggregate assignment. For example, given a variable @code{A_Rec} declared to have a type such as: @smallexample type Rec (Len : Small_Integer := 0) is record Id : Integer; Vals : IntArray (1 .. Len); end record; @end smallexample you can assign a value with a different size of @code{Vals} with two assignments: @smallexample (@value{GDBP}) set A_Rec.Len := 4 (@value{GDBP}) set A_Rec := (Id => 42, Vals => (1, 2, 3, 4)) @end smallexample As this example also illustrates, @value{GDBN} is very loose about the usual rules concerning aggregates. You may leave out some of the components of an array or record aggregate (such as the @code{Len} component in the assignment to @code{A_Rec} above); they will retain their original values upon assignment. You may freely use dynamic values as indices in component associations. You may even use overlapping or redundant component associations, although which component values are assigned in such cases is not defined. @item Calls to dispatching subprograms are not implemented. @item The overloading algorithm is much more limited (i.e., less selective) than that of real Ada. It makes only limited use of the context in which a subexpression appears to resolve its meaning, and it is much looser in its rules for allowing type matches. As a result, some function calls will be ambiguous, and the user will be asked to choose the proper resolution. @item The @code{new} operator is not implemented. @item Entry calls are not implemented. @item Aside from printing, arithmetic operations on the native VAX floating-point formats are not supported. @item It is not possible to slice a packed array. @item The names @code{True} and @code{False}, when not part of a qualified name, are interpreted as if implicitly prefixed by @code{Standard}, regardless of context. Should your program redefine these names in a package or procedure (at best a dubious practice), you will have to use fully qualified names to access their new definitions. @end itemize @node Additions to Ada @subsubsection Additions to Ada @cindex Ada, deviations from As it does for other languages, @value{GDBN} makes certain generic extensions to Ada (@pxref{Expressions}): @itemize @bullet @item If the expression @var{E} is a variable residing in memory (typically a local variable or array element) and @var{N} is a positive integer, then @code{@var{E}@@@var{N}} displays the values of @var{E} and the @var{N}-1 adjacent variables following it in memory as an array. In Ada, this operator is generally not necessary, since its prime use is in displaying parts of an array, and slicing will usually do this in Ada. However, there are occasional uses when debugging programs in which certain debugging information has been optimized away. @item @code{@var{B}::@var{var}} means ``the variable named @var{var} that appears in function or file @var{B}.'' When @var{B} is a file name, you must typically surround it in single quotes. @item The expression @code{@{@var{type}@} @var{addr}} means ``the variable of type @var{type} that appears at address @var{addr}.'' @item A name starting with @samp{$} is a convenience variable (@pxref{Convenience Vars}) or a machine register (@pxref{Registers}). @end itemize In addition, @value{GDBN} provides a few other shortcuts and outright additions specific to Ada: @itemize @bullet @item The assignment statement is allowed as an expression, returning its right-hand operand as its value. Thus, you may enter @smallexample (@value{GDBP}) set x := y + 3 (@value{GDBP}) print A(tmp := y + 1) @end smallexample @item The semicolon is allowed as an ``operator,'' returning as its value the value of its right-hand operand. This allows, for example, complex conditional breaks: @smallexample (@value{GDBP}) break f (@value{GDBP}) condition 1 (report(i); k += 1; A(k) > 100) @end smallexample @item Rather than use catenation and symbolic character names to introduce special characters into strings, one may instead use a special bracket notation, which is also used to print strings. A sequence of characters of the form @samp{["@var{XX}"]} within a string or character literal denotes the (single) character whose numeric encoding is @var{XX} in hexadecimal. The sequence of characters @samp{["""]} also denotes a single quotation mark in strings. For example, @smallexample "One line.["0a"]Next line.["0a"]" @end smallexample @noindent contains an ASCII newline character (@code{Ada.Characters.Latin_1.LF}) after each period. @item The subtype used as a prefix for the attributes @t{'Pos}, @t{'Min}, and @t{'Max} is optional (and is ignored in any case). For example, it is valid to write @smallexample (@value{GDBP}) print 'max(x, y) @end smallexample @item When printing arrays, @value{GDBN} uses positional notation when the array has a lower bound of 1, and uses a modified named notation otherwise. For example, a one-dimensional array of three integers with a lower bound of 3 might print as @smallexample (3 => 10, 17, 1) @end smallexample @noindent That is, in contrast to valid Ada, only the first component has a @code{=>} clause. @item You may abbreviate attributes in expressions with any unique, multi-character subsequence of their names (an exact match gets preference). For example, you may use @t{a'len}, @t{a'gth}, or @t{a'lh} in place of @t{a'length}. @item @cindex quoting Ada internal identifiers Since Ada is case-insensitive, the debugger normally maps identifiers you type to lower case. The GNAT compiler uses upper-case characters for some of its internal identifiers, which are normally of no interest to users. For the rare occasions when you actually have to look at them, enclose them in angle brackets to avoid the lower-case mapping. For example, @smallexample (@value{GDBP}) print [0] @end smallexample @item Printing an object of class-wide type or dereferencing an access-to-class-wide value will display all the components of the object's specific type (as indicated by its run-time tag). Likewise, component selection on such a value will operate on the specific type of the object. @end itemize @node Stopping Before Main Program @subsubsection Stopping at the Very Beginning @cindex breakpointing Ada elaboration code It is sometimes necessary to debug the program during elaboration, and before reaching the main procedure. As defined in the Ada Reference Manual, the elaboration code is invoked from a procedure called @code{adainit}. To run your program up to the beginning of elaboration, simply use the following two commands: @code{tbreak adainit} and @code{run}. @node Ada Tasks @subsubsection Extensions for Ada Tasks @cindex Ada, tasking Support for Ada tasks is analogous to that for threads (@pxref{Threads}). @value{GDBN} provides the following task-related commands: @table @code @kindex info tasks @item info tasks This command shows a list of current Ada tasks, as in the following example: @smallexample @iftex @leftskip=0.5cm @end iftex (@value{GDBP}) info tasks ID TID P-ID Pri State Name 1 8088000 0 15 Child Activation Wait main_task 2 80a4000 1 15 Accept Statement b 3 809a800 1 15 Child Activation Wait a * 4 80ae800 3 15 Runnable c @end smallexample @noindent In this listing, the asterisk before the last task indicates it to be the task currently being inspected. @table @asis @item ID Represents @value{GDBN}'s internal task number. @item TID The Ada task ID. @item P-ID The parent's task ID (@value{GDBN}'s internal task number). @item Pri The base priority of the task. @item State Current state of the task. @table @code @item Unactivated The task has been created but has not been activated. It cannot be executing. @item Runnable The task is not blocked for any reason known to Ada. (It may be waiting for a mutex, though.) It is conceptually "executing" in normal mode. @item Terminated The task is terminated, in the sense of ARM 9.3 (5). Any dependents that were waiting on terminate alternatives have been awakened and have terminated themselves. @item Child Activation Wait The task is waiting for created tasks to complete activation. @item Accept Statement The task is waiting on an accept or selective wait statement. @item Waiting on entry call The task is waiting on an entry call. @item Async Select Wait The task is waiting to start the abortable part of an asynchronous select statement. @item Delay Sleep The task is waiting on a select statement with only a delay alternative open. @item Child Termination Wait The task is sleeping having completed a master within itself, and is waiting for the tasks dependent on that master to become terminated or waiting on a terminate Phase. @item Wait Child in Term Alt The task is sleeping waiting for tasks on terminate alternatives to finish terminating. @item Accepting RV with @var{taskno} The task is accepting a rendez-vous with the task @var{taskno}. @end table @item Name Name of the task in the program. @end table @kindex info task @var{taskno} @item info task @var{taskno} This command shows detailled informations on the specified task, as in the following example: @smallexample @iftex @leftskip=0.5cm @end iftex (@value{GDBP}) info tasks ID TID P-ID Pri State Name 1 8077880 0 15 Child Activation Wait main_task * 2 807c468 1 15 Runnable task_1 (@value{GDBP}) info task 2 Ada Task: 0x807c468 Name: task_1 Thread: 0x807f378 Parent: 1 (main_task) Base Priority: 15 State: Runnable @end smallexample @item task @kindex task@r{ (Ada)} @cindex current Ada task ID This command prints the ID of the current task. @smallexample @iftex @leftskip=0.5cm @end iftex (@value{GDBP}) info tasks ID TID P-ID Pri State Name 1 8077870 0 15 Child Activation Wait main_task * 2 807c458 1 15 Runnable t (@value{GDBP}) task [Current task is 2] @end smallexample @item task @var{taskno} @cindex Ada task switching This command is like the @code{thread @var{threadno}} command (@pxref{Threads}). It switches the context of debugging from the current task to the given task. @smallexample @iftex @leftskip=0.5cm @end iftex (@value{GDBP}) info tasks ID TID P-ID Pri State Name 1 8077870 0 15 Child Activation Wait main_task * 2 807c458 1 15 Runnable t (@value{GDBP}) task 1 [Switching to task 1] #0 0x8067726 in pthread_cond_wait () (@value{GDBP}) bt #0 0x8067726 in pthread_cond_wait () #1 0x8056714 in system.os_interface.pthread_cond_wait () #2 0x805cb63 in system.task_primitives.operations.sleep () #3 0x806153e in system.tasking.stages.activate_tasks () #4 0x804aacc in un () at un.adb:5 @end smallexample @item break @var{linespec} task @var{taskno} @itemx break @var{linespec} task @var{taskno} if @dots{} @cindex breakpoints and tasks, in Ada @cindex task breakpoints, in Ada @kindex break @dots{} task @var{taskno}@r{ (Ada)} These commands are like the @code{break @dots{} thread @dots{}} command (@pxref{Thread Stops}). @var{linespec} specifies source lines, as described in @ref{Specify Location}. Use the qualifier @samp{task @var{taskno}} with a breakpoint command to specify that you only want @value{GDBN} to stop the program when a particular Ada task reaches this breakpoint. @var{taskno} is one of the numeric task identifiers assigned by @value{GDBN}, shown in the first column of the @samp{info tasks} display. If you do not specify @samp{task @var{taskno}} when you set a breakpoint, the breakpoint applies to @emph{all} tasks of your program. You can use the @code{task} qualifier on conditional breakpoints as well; in this case, place @samp{task @var{taskno}} before the breakpoint condition (before the @code{if}). For example, @smallexample @iftex @leftskip=0.5cm @end iftex (@value{GDBP}) info tasks ID TID P-ID Pri State Name 1 140022020 0 15 Child Activation Wait main_task 2 140045060 1 15 Accept/Select Wait t2 3 140044840 1 15 Runnable t1 * 4 140056040 1 15 Runnable t3 (@value{GDBP}) b 15 task 2 Breakpoint 5 at 0x120044cb0: file test_task_debug.adb, line 15. (@value{GDBP}) cont Continuing. task # 1 running task # 2 running Breakpoint 5, test_task_debug () at test_task_debug.adb:15 15 flush; (@value{GDBP}) info tasks ID TID P-ID Pri State Name 1 140022020 0 15 Child Activation Wait main_task * 2 140045060 1 15 Runnable t2 3 140044840 1 15 Runnable t1 4 140056040 1 15 Delay Sleep t3 @end smallexample @end table @node Ada Tasks and Core Files @subsubsection Tasking Support when Debugging Core Files @cindex Ada tasking and core file debugging When inspecting a core file, as opposed to debugging a live program, tasking support may be limited or even unavailable, depending on the platform being used. For instance, on x86-linux, the list of tasks is available, but task switching is not supported. On Tru64, however, task switching will work as usual. On certain platforms, including Tru64, the debugger needs to perform some memory writes in order to provide Ada tasking support. When inspecting a core file, this means that the core file must be opened with read-write privileges, using the command @samp{"set write on"} (@pxref{Patching}). Under these circumstances, you should make a backup copy of the core file before inspecting it with @value{GDBN}. @node Ravenscar Profile @subsubsection Tasking Support when using the Ravenscar Profile @cindex Ravenscar Profile The @dfn{Ravenscar Profile} is a subset of the Ada tasking features, specifically designed for systems with safety-critical real-time requirements. @table @code @kindex set ravenscar task-switching on @cindex task switching with program using Ravenscar Profile @item set ravenscar task-switching on Allows task switching when debugging a program that uses the Ravenscar Profile. This is the default. @kindex set ravenscar task-switching off @item set ravenscar task-switching off Turn off task switching when debugging a program that uses the Ravenscar Profile. This is mostly intended to disable the code that adds support for the Ravenscar Profile, in case a bug in either @value{GDBN} or in the Ravenscar runtime is preventing @value{GDBN} from working properly. To be effective, this command should be run before the program is started. @kindex show ravenscar task-switching @item show ravenscar task-switching Show whether it is possible to switch from task to task in a program using the Ravenscar Profile. @end table @node Ada Glitches @subsubsection Known Peculiarities of Ada Mode @cindex Ada, problems Besides the omissions listed previously (@pxref{Omissions from Ada}), we know of several problems with and limitations of Ada mode in @value{GDBN}, some of which will be fixed with planned future releases of the debugger and the GNU Ada compiler. @itemize @bullet @item Static constants that the compiler chooses not to materialize as objects in storage are invisible to the debugger. @item Named parameter associations in function argument lists are ignored (the argument lists are treated as positional). @item Many useful library packages are currently invisible to the debugger. @item Fixed-point arithmetic, conversions, input, and output is carried out using floating-point arithmetic, and may give results that only approximate those on the host machine. @item The GNAT compiler never generates the prefix @code{Standard} for any of the standard symbols defined by the Ada language. @value{GDBN} knows about this: it will strip the prefix from names when you use it, and will never look for a name you have so qualified among local symbols, nor match against symbols in other packages or subprograms. If you have defined entities anywhere in your program other than parameters and local variables whose simple names match names in @code{Standard}, GNAT's lack of qualification here can cause confusion. When this happens, you can usually resolve the confusion by qualifying the problematic names with package @code{Standard} explicitly. @end itemize Older versions of the compiler sometimes generate erroneous debugging information, resulting in the debugger incorrectly printing the value of affected entities. In some cases, the debugger is able to work around an issue automatically. In other cases, the debugger is able to work around the issue, but the work-around has to be specifically enabled. @kindex set ada trust-PAD-over-XVS @kindex show ada trust-PAD-over-XVS @table @code @item set ada trust-PAD-over-XVS on Configure GDB to strictly follow the GNAT encoding when computing the value of Ada entities, particularly when @code{PAD} and @code{PAD___XVS} types are involved (see @code{ada/exp_dbug.ads} in the GCC sources for a complete description of the encoding used by the GNAT compiler). This is the default. @item set ada trust-PAD-over-XVS off This is related to the encoding using by the GNAT compiler. If @value{GDBN} sometimes prints the wrong value for certain entities, changing @code{ada trust-PAD-over-XVS} to @code{off} activates a work-around which may fix the issue. It is always safe to set @code{ada trust-PAD-over-XVS} to @code{off}, but this incurs a slight performance penalty, so it is recommended to leave this setting to @code{on} unless necessary. @end table @node Unsupported Languages @section Unsupported Languages @cindex unsupported languages @cindex minimal language In addition to the other fully-supported programming languages, @value{GDBN} also provides a pseudo-language, called @code{minimal}. It does not represent a real programming language, but provides a set of capabilities close to what the C or assembly languages provide. This should allow most simple operations to be performed while debugging an application that uses a language currently not supported by @value{GDBN}. If the language is set to @code{auto}, @value{GDBN} will automatically select this language if the current frame corresponds to an unsupported language. @node Symbols @chapter Examining the Symbol Table The commands described in this chapter allow you to inquire about the symbols (names of variables, functions and types) defined in your program. This information is inherent in the text of your program and does not change as your program executes. @value{GDBN} finds it in your program's symbol table, in the file indicated when you started @value{GDBN} (@pxref{File Options, ,Choosing Files}), or by one of the file-management commands (@pxref{Files, ,Commands to Specify Files}). @cindex symbol names @cindex names of symbols @cindex quoting names Occasionally, you may need to refer to symbols that contain unusual characters, which @value{GDBN} ordinarily treats as word delimiters. The most frequent case is in referring to static variables in other source files (@pxref{Variables,,Program Variables}). File names are recorded in object files as debugging symbols, but @value{GDBN} would ordinarily parse a typical file name, like @file{foo.c}, as the three words @samp{foo} @samp{.} @samp{c}. To allow @value{GDBN} to recognize @samp{foo.c} as a single symbol, enclose it in single quotes; for example, @smallexample p 'foo.c'::x @end smallexample @noindent looks up the value of @code{x} in the scope of the file @file{foo.c}. @table @code @cindex case-insensitive symbol names @cindex case sensitivity in symbol names @kindex set case-sensitive @item set case-sensitive on @itemx set case-sensitive off @itemx set case-sensitive auto Normally, when @value{GDBN} looks up symbols, it matches their names with case sensitivity determined by the current source language. Occasionally, you may wish to control that. The command @code{set case-sensitive} lets you do that by specifying @code{on} for case-sensitive matches or @code{off} for case-insensitive ones. If you specify @code{auto}, case sensitivity is reset to the default suitable for the source language. The default is case-sensitive matches for all languages except for Fortran, for which the default is case-insensitive matches. @kindex show case-sensitive @item show case-sensitive This command shows the current setting of case sensitivity for symbols lookups. @kindex set print type methods @item set print type methods @itemx set print type methods on @itemx set print type methods off Normally, when @value{GDBN} prints a class, it displays any methods declared in that class. You can control this behavior either by passing the appropriate flag to @code{ptype}, or using @command{set print type methods}. Specifying @code{on} will cause @value{GDBN} to display the methods; this is the default. Specifying @code{off} will cause @value{GDBN} to omit the methods. @kindex show print type methods @item show print type methods This command shows the current setting of method display when printing classes. @kindex set print type typedefs @item set print type typedefs @itemx set print type typedefs on @itemx set print type typedefs off Normally, when @value{GDBN} prints a class, it displays any typedefs defined in that class. You can control this behavior either by passing the appropriate flag to @code{ptype}, or using @command{set print type typedefs}. Specifying @code{on} will cause @value{GDBN} to display the typedef definitions; this is the default. Specifying @code{off} will cause @value{GDBN} to omit the typedef definitions. Note that this controls whether the typedef definition itself is printed, not whether typedef names are substituted when printing other types. @kindex show print type typedefs @item show print type typedefs This command shows the current setting of typedef display when printing classes. @kindex info address @cindex address of a symbol @item info address @var{symbol} Describe where the data for @var{symbol} is stored. For a register variable, this says which register it is kept in. For a non-register local variable, this prints the stack-frame offset at which the variable is always stored. Note the contrast with @samp{print &@var{symbol}}, which does not work at all for a register variable, and for a stack local variable prints the exact address of the current instantiation of the variable. @kindex info symbol @cindex symbol from address @cindex closest symbol and offset for an address @item info symbol @var{addr} Print the name of a symbol which is stored at the address @var{addr}. If no symbol is stored exactly at @var{addr}, @value{GDBN} prints the nearest symbol and an offset from it: @smallexample (@value{GDBP}) info symbol 0x54320 _initialize_vx + 396 in section .text @end smallexample @noindent This is the opposite of the @code{info address} command. You can use it to find out the name of a variable or a function given its address. For dynamically linked executables, the name of executable or shared library containing the symbol is also printed: @smallexample (@value{GDBP}) info symbol 0x400225 _start + 5 in section .text of /tmp/a.out (@value{GDBP}) info symbol 0x2aaaac2811cf __read_nocancel + 6 in section .text of /usr/lib64/libc.so.6 @end smallexample @kindex whatis @item whatis[/@var{flags}] [@var{arg}] Print the data type of @var{arg}, which can be either an expression or a name of a data type. With no argument, print the data type of @code{$}, the last value in the value history. If @var{arg} is an expression (@pxref{Expressions, ,Expressions}), it is not actually evaluated, and any side-effecting operations (such as assignments or function calls) inside it do not take place. If @var{arg} is a variable or an expression, @code{whatis} prints its literal type as it is used in the source code. If the type was defined using a @code{typedef}, @code{whatis} will @emph{not} print the data type underlying the @code{typedef}. If the type of the variable or the expression is a compound data type, such as @code{struct} or @code{class}, @code{whatis} never prints their fields or methods. It just prints the @code{struct}/@code{class} name (a.k.a.@: its @dfn{tag}). If you want to see the members of such a compound data type, use @code{ptype}. If @var{arg} is a type name that was defined using @code{typedef}, @code{whatis} @dfn{unrolls} only one level of that @code{typedef}. Unrolling means that @code{whatis} will show the underlying type used in the @code{typedef} declaration of @var{arg}. However, if that underlying type is also a @code{typedef}, @code{whatis} will not unroll it. For C code, the type names may also have the form @samp{class @var{class-name}}, @samp{struct @var{struct-tag}}, @samp{union @var{union-tag}} or @samp{enum @var{enum-tag}}. @var{flags} can be used to modify how the type is displayed. Available flags are: @table @code @item r Display in ``raw'' form. Normally, @value{GDBN} substitutes template parameters and typedefs defined in a class when printing the class' members. The @code{/r} flag disables this. @item m Do not print methods defined in the class. @item M Print methods defined in the class. This is the default, but the flag exists in case you change the default with @command{set print type methods}. @item t Do not print typedefs defined in the class. Note that this controls whether the typedef definition itself is printed, not whether typedef names are substituted when printing other types. @item T Print typedefs defined in the class. This is the default, but the flag exists in case you change the default with @command{set print type typedefs}. @end table @kindex ptype @item ptype[/@var{flags}] [@var{arg}] @code{ptype} accepts the same arguments as @code{whatis}, but prints a detailed description of the type, instead of just the name of the type. @xref{Expressions, ,Expressions}. Contrary to @code{whatis}, @code{ptype} always unrolls any @code{typedef}s in its argument declaration, whether the argument is a variable, expression, or a data type. This means that @code{ptype} of a variable or an expression will not print literally its type as present in the source code---use @code{whatis} for that. @code{typedef}s at the pointer or reference targets are also unrolled. Only @code{typedef}s of fields, methods and inner @code{class typedef}s of @code{struct}s, @code{class}es and @code{union}s are not unrolled even with @code{ptype}. For example, for this variable declaration: @smallexample typedef double real_t; struct complex @{ real_t real; double imag; @}; typedef struct complex complex_t; complex_t var; real_t *real_pointer_var; @end smallexample @noindent the two commands give this output: @smallexample @group (@value{GDBP}) whatis var type = complex_t (@value{GDBP}) ptype var type = struct complex @{ real_t real; double imag; @} (@value{GDBP}) whatis complex_t type = struct complex (@value{GDBP}) whatis struct complex type = struct complex (@value{GDBP}) ptype struct complex type = struct complex @{ real_t real; double imag; @} (@value{GDBP}) whatis real_pointer_var type = real_t * (@value{GDBP}) ptype real_pointer_var type = double * @end group @end smallexample @noindent As with @code{whatis}, using @code{ptype} without an argument refers to the type of @code{$}, the last value in the value history. @cindex incomplete type Sometimes, programs use opaque data types or incomplete specifications of complex data structure. If the debug information included in the program does not allow @value{GDBN} to display a full declaration of the data type, it will say @samp{}. For example, given these declarations: @smallexample struct foo; struct foo *fooptr; @end smallexample @noindent but no definition for @code{struct foo} itself, @value{GDBN} will say: @smallexample (@value{GDBP}) ptype foo $1 = @end smallexample @noindent ``Incomplete type'' is C terminology for data types that are not completely specified. @kindex info types @item info types @var{regexp} @itemx info types Print a brief description of all types whose names match the regular expression @var{regexp} (or all types in your program, if you supply no argument). Each complete typename is matched as though it were a complete line; thus, @samp{i type value} gives information on all types in your program whose names include the string @code{value}, but @samp{i type ^value$} gives information only on types whose complete name is @code{value}. This command differs from @code{ptype} in two ways: first, like @code{whatis}, it does not print a detailed description; second, it lists all source files where a type is defined. @kindex info type-printers @item info type-printers Versions of @value{GDBN} that ship with Python scripting enabled may have ``type printers'' available. When using @command{ptype} or @command{whatis}, these printers are consulted when the name of a type is needed. @xref{Type Printing API}, for more information on writing type printers. @code{info type-printers} displays all the available type printers. @kindex enable type-printer @kindex disable type-printer @item enable type-printer @var{name}@dots{} @item disable type-printer @var{name}@dots{} These commands can be used to enable or disable type printers. @kindex info scope @cindex local variables @item info scope @var{location} List all the variables local to a particular scope. This command accepts a @var{location} argument---a function name, a source line, or an address preceded by a @samp{*}, and prints all the variables local to the scope defined by that location. (@xref{Specify Location}, for details about supported forms of @var{location}.) For example: @smallexample (@value{GDBP}) @b{info scope command_line_handler} Scope for command_line_handler: Symbol rl is an argument at stack/frame offset 8, length 4. Symbol linebuffer is in static storage at address 0x150a18, length 4. Symbol linelength is in static storage at address 0x150a1c, length 4. Symbol p is a local variable in register $esi, length 4. Symbol p1 is a local variable in register $ebx, length 4. Symbol nline is a local variable in register $edx, length 4. Symbol repeat is a local variable at frame offset -8, length 4. @end smallexample @noindent This command is especially useful for determining what data to collect during a @dfn{trace experiment}, see @ref{Tracepoint Actions, collect}. @kindex info source @item info source Show information about the current source file---that is, the source file for the function containing the current point of execution: @itemize @bullet @item the name of the source file, and the directory containing it, @item the directory it was compiled in, @item its length, in lines, @item which programming language it is written in, @item whether the executable includes debugging information for that file, and if so, what format the information is in (e.g., STABS, Dwarf 2, etc.), and @item whether the debugging information includes information about preprocessor macros. @end itemize @kindex info sources @item info sources Print the names of all source files in your program for which there is debugging information, organized into two lists: files whose symbols have already been read, and files whose symbols will be read when needed. @kindex info functions @item info functions Print the names and data types of all defined functions. @item info functions @var{regexp} Print the names and data types of all defined functions whose names contain a match for regular expression @var{regexp}. Thus, @samp{info fun step} finds all functions whose names include @code{step}; @samp{info fun ^step} finds those whose names start with @code{step}. If a function name contains characters that conflict with the regular expression language (e.g.@: @samp{operator*()}), they may be quoted with a backslash. @kindex info variables @item info variables Print the names and data types of all variables that are defined outside of functions (i.e.@: excluding local variables). @item info variables @var{regexp} Print the names and data types of all variables (except for local variables) whose names contain a match for regular expression @var{regexp}. @kindex info classes @cindex Objective-C, classes and selectors @item info classes @itemx info classes @var{regexp} Display all Objective-C classes in your program, or (with the @var{regexp} argument) all those matching a particular regular expression. @kindex info selectors @item info selectors @itemx info selectors @var{regexp} Display all Objective-C selectors in your program, or (with the @var{regexp} argument) all those matching a particular regular expression. @ignore This was never implemented. @kindex info methods @item info methods @itemx info methods @var{regexp} The @code{info methods} command permits the user to examine all defined methods within C@t{++} program, or (with the @var{regexp} argument) a specific set of methods found in the various C@t{++} classes. Many C@t{++} classes provide a large number of methods. Thus, the output from the @code{ptype} command can be overwhelming and hard to use. The @code{info-methods} command filters the methods, printing only those which match the regular-expression @var{regexp}. @end ignore @cindex opaque data types @kindex set opaque-type-resolution @item set opaque-type-resolution on Tell @value{GDBN} to resolve opaque types. An opaque type is a type declared as a pointer to a @code{struct}, @code{class}, or @code{union}---for example, @code{struct MyType *}---that is used in one source file although the full declaration of @code{struct MyType} is in another source file. The default is on. A change in the setting of this subcommand will not take effect until the next time symbols for a file are loaded. @item set opaque-type-resolution off Tell @value{GDBN} not to resolve opaque types. In this case, the type is printed as follows: @smallexample @{@} @end smallexample @kindex show opaque-type-resolution @item show opaque-type-resolution Show whether opaque types are resolved or not. @kindex maint print symbols @cindex symbol dump @kindex maint print psymbols @cindex partial symbol dump @item maint print symbols @var{filename} @itemx maint print psymbols @var{filename} @itemx maint print msymbols @var{filename} Write a dump of debugging symbol data into the file @var{filename}. These commands are used to debug the @value{GDBN} symbol-reading code. Only symbols with debugging data are included. If you use @samp{maint print symbols}, @value{GDBN} includes all the symbols for which it has already collected full details: that is, @var{filename} reflects symbols for only those files whose symbols @value{GDBN} has read. You can use the command @code{info sources} to find out which files these are. If you use @samp{maint print psymbols} instead, the dump shows information about symbols that @value{GDBN} only knows partially---that is, symbols defined in files that @value{GDBN} has skimmed, but not yet read completely. Finally, @samp{maint print msymbols} dumps just the minimal symbol information required for each object file from which @value{GDBN} has read some symbols. @xref{Files, ,Commands to Specify Files}, for a discussion of how @value{GDBN} reads symbols (in the description of @code{symbol-file}). @kindex maint info symtabs @kindex maint info psymtabs @cindex listing @value{GDBN}'s internal symbol tables @cindex symbol tables, listing @value{GDBN}'s internal @cindex full symbol tables, listing @value{GDBN}'s internal @cindex partial symbol tables, listing @value{GDBN}'s internal @item maint info symtabs @r{[} @var{regexp} @r{]} @itemx maint info psymtabs @r{[} @var{regexp} @r{]} List the @code{struct symtab} or @code{struct partial_symtab} structures whose names match @var{regexp}. If @var{regexp} is not given, list them all. The output includes expressions which you can copy into a @value{GDBN} debugging this one to examine a particular structure in more detail. For example: @smallexample (@value{GDBP}) maint info psymtabs dwarf2read @{ objfile /home/gnu/build/gdb/gdb ((struct objfile *) 0x82e69d0) @{ psymtab /home/gnu/src/gdb/dwarf2read.c ((struct partial_symtab *) 0x8474b10) readin no fullname (null) text addresses 0x814d3c8 -- 0x8158074 globals (* (struct partial_symbol **) 0x8507a08 @@ 9) statics (* (struct partial_symbol **) 0x40e95b78 @@ 2882) dependencies (none) @} @} (@value{GDBP}) maint info symtabs (@value{GDBP}) @end smallexample @noindent We see that there is one partial symbol table whose filename contains the string @samp{dwarf2read}, belonging to the @samp{gdb} executable; and we see that @value{GDBN} has not read in any symtabs yet at all. If we set a breakpoint on a function, that will cause @value{GDBN} to read the symtab for the compilation unit containing that function: @smallexample (@value{GDBP}) break dwarf2_psymtab_to_symtab Breakpoint 1 at 0x814e5da: file /home/gnu/src/gdb/dwarf2read.c, line 1574. (@value{GDBP}) maint info symtabs @{ objfile /home/gnu/build/gdb/gdb ((struct objfile *) 0x82e69d0) @{ symtab /home/gnu/src/gdb/dwarf2read.c ((struct symtab *) 0x86c1f38) dirname (null) fullname (null) blockvector ((struct blockvector *) 0x86c1bd0) (primary) linetable ((struct linetable *) 0x8370fa0) debugformat DWARF 2 @} @} (@value{GDBP}) @end smallexample @end table @node Altering @chapter Altering Execution Once you think you have found an error in your program, you might want to find out for certain whether correcting the apparent error would lead to correct results in the rest of the run. You can find the answer by experiment, using the @value{GDBN} features for altering execution of the program. For example, you can store new values into variables or memory locations, give your program a signal, restart it at a different address, or even return prematurely from a function. @menu * Assignment:: Assignment to variables * Jumping:: Continuing at a different address * Signaling:: Giving your program a signal * Returning:: Returning from a function * Calling:: Calling your program's functions * Patching:: Patching your program @end menu @node Assignment @section Assignment to Variables @cindex assignment @cindex setting variables To alter the value of a variable, evaluate an assignment expression. @xref{Expressions, ,Expressions}. For example, @smallexample print x=4 @end smallexample @noindent stores the value 4 into the variable @code{x}, and then prints the value of the assignment expression (which is 4). @xref{Languages, ,Using @value{GDBN} with Different Languages}, for more information on operators in supported languages. @kindex set variable @cindex variables, setting If you are not interested in seeing the value of the assignment, use the @code{set} command instead of the @code{print} command. @code{set} is really the same as @code{print} except that the expression's value is not printed and is not put in the value history (@pxref{Value History, ,Value History}). The expression is evaluated only for its effects. If the beginning of the argument string of the @code{set} command appears identical to a @code{set} subcommand, use the @code{set variable} command instead of just @code{set}. This command is identical to @code{set} except for its lack of subcommands. For example, if your program has a variable @code{width}, you get an error if you try to set a new value with just @samp{set width=13}, because @value{GDBN} has the command @code{set width}: @smallexample (@value{GDBP}) whatis width type = double (@value{GDBP}) p width $4 = 13 (@value{GDBP}) set width=47 Invalid syntax in expression. @end smallexample @noindent The invalid expression, of course, is @samp{=47}. In order to actually set the program's variable @code{width}, use @smallexample (@value{GDBP}) set var width=47 @end smallexample Because the @code{set} command has many subcommands that can conflict with the names of program variables, it is a good idea to use the @code{set variable} command instead of just @code{set}. For example, if your program has a variable @code{g}, you run into problems if you try to set a new value with just @samp{set g=4}, because @value{GDBN} has the command @code{set gnutarget}, abbreviated @code{set g}: @smallexample @group (@value{GDBP}) whatis g type = double (@value{GDBP}) p g $1 = 1 (@value{GDBP}) set g=4 (@value{GDBP}) p g $2 = 1 (@value{GDBP}) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/smith/cc_progs/a.out "/home/smith/cc_progs/a.out": can't open to read symbols: Invalid bfd target. (@value{GDBP}) show g The current BFD target is "=4". @end group @end smallexample @noindent The program variable @code{g} did not change, and you silently set the @code{gnutarget} to an invalid value. In order to set the variable @code{g}, use @smallexample (@value{GDBP}) set var g=4 @end smallexample @value{GDBN} allows more implicit conversions in assignments than C; you can freely store an integer value into a pointer variable or vice versa, and you can convert any structure to any other structure that is the same length or shorter. @comment FIXME: how do structs align/pad in these conversions? @comment /doc@cygnus.com 18dec1990 To store values into arbitrary places in memory, use the @samp{@{@dots{}@}} construct to generate a value of specified type at a specified address (@pxref{Expressions, ,Expressions}). For example, @code{@{int@}0x83040} refers to memory location @code{0x83040} as an integer (which implies a certain size and representation in memory), and @smallexample set @{int@}0x83040 = 4 @end smallexample @noindent stores the value 4 into that memory location. @node Jumping @section Continuing at a Different Address Ordinarily, when you continue your program, you do so at the place where it stopped, with the @code{continue} command. You can instead continue at an address of your own choosing, with the following commands: @table @code @kindex jump @kindex j @r{(@code{jump})} @item jump @var{linespec} @itemx j @var{linespec} @itemx jump @var{location} @itemx j @var{location} Resume execution at line @var{linespec} or at address given by @var{location}. Execution stops again immediately if there is a breakpoint there. @xref{Specify Location}, for a description of the different forms of @var{linespec} and @var{location}. It is common practice to use the @code{tbreak} command in conjunction with @code{jump}. @xref{Set Breaks, ,Setting Breakpoints}. The @code{jump} command does not change the current stack frame, or the stack pointer, or the contents of any memory location or any register other than the program counter. If line @var{linespec} is in a different function from the one currently executing, the results may be bizarre if the two functions expect different patterns of arguments or of local variables. For this reason, the @code{jump} command requests confirmation if the specified line is not in the function currently executing. However, even bizarre results are predictable if you are well acquainted with the machine-language code of your program. @end table @c Doesn't work on HP-UX; have to set $pcoqh and $pcoqt. On many systems, you can get much the same effect as the @code{jump} command by storing a new value into the register @code{$pc}. The difference is that this does not start your program running; it only changes the address of where it @emph{will} run when you continue. For example, @smallexample set $pc = 0x485 @end smallexample @noindent makes the next @code{continue} command or stepping command execute at address @code{0x485}, rather than at the address where your program stopped. @xref{Continuing and Stepping, ,Continuing and Stepping}. The most common occasion to use the @code{jump} command is to back up---perhaps with more breakpoints set---over a portion of a program that has already executed, in order to examine its execution in more detail. @c @group @node Signaling @section Giving your Program a Signal @cindex deliver a signal to a program @table @code @kindex signal @item signal @var{signal} Resume execution where your program stopped, but immediately give it the signal @var{signal}. @var{signal} can be the name or the number of a signal. For example, on many systems @code{signal 2} and @code{signal SIGINT} are both ways of sending an interrupt signal. Alternatively, if @var{signal} is zero, continue execution without giving a signal. This is useful when your program stopped on account of a signal and would ordinarily see the signal when resumed with the @code{continue} command; @samp{signal 0} causes it to resume without a signal. @code{signal} does not repeat when you press @key{RET} a second time after executing the command. @end table @c @end group Invoking the @code{signal} command is not the same as invoking the @code{kill} utility from the shell. Sending a signal with @code{kill} causes @value{GDBN} to decide what to do with the signal depending on the signal handling tables (@pxref{Signals}). The @code{signal} command passes the signal directly to your program. @node Returning @section Returning from a Function @table @code @cindex returning from a function @kindex return @item return @itemx return @var{expression} You can cancel execution of a function call with the @code{return} command. If you give an @var{expression} argument, its value is used as the function's return value. @end table When you use @code{return}, @value{GDBN} discards the selected stack frame (and all frames within it). You can think of this as making the discarded frame return prematurely. If you wish to specify a value to be returned, give that value as the argument to @code{return}. This pops the selected stack frame (@pxref{Selection, ,Selecting a Frame}), and any other frames inside of it, leaving its caller as the innermost remaining frame. That frame becomes selected. The specified value is stored in the registers used for returning values of functions. The @code{return} command does not resume execution; it leaves the program stopped in the state that would exist if the function had just returned. In contrast, the @code{finish} command (@pxref{Continuing and Stepping, ,Continuing and Stepping}) resumes execution until the selected stack frame returns naturally. @value{GDBN} needs to know how the @var{expression} argument should be set for the inferior. The concrete registers assignment depends on the OS ABI and the type being returned by the selected stack frame. For example it is common for OS ABI to return floating point values in FPU registers while integer values in CPU registers. Still some ABIs return even floating point values in CPU registers. Larger integer widths (such as @code{long long int}) also have specific placement rules. @value{GDBN} already knows the OS ABI from its current target so it needs to find out also the type being returned to make the assignment into the right register(s). Normally, the selected stack frame has debug info. @value{GDBN} will always use the debug info instead of the implicit type of @var{expression} when the debug info is available. For example, if you type @kbd{return -1}, and the function in the current stack frame is declared to return a @code{long long int}, @value{GDBN} transparently converts the implicit @code{int} value of -1 into a @code{long long int}: @smallexample Breakpoint 1, func () at gdb.base/return-nodebug.c:29 29 return 31; (@value{GDBP}) return -1 Make func return now? (y or n) y #0 0x004004f6 in main () at gdb.base/return-nodebug.c:43 43 printf ("result=%lld\n", func ()); (@value{GDBP}) @end smallexample However, if the selected stack frame does not have a debug info, e.g., if the function was compiled without debug info, @value{GDBN} has to find out the type to return from user. Specifying a different type by mistake may set the value in different inferior registers than the caller code expects. For example, typing @kbd{return -1} with its implicit type @code{int} would set only a part of a @code{long long int} result for a debug info less function (on 32-bit architectures). Therefore the user is required to specify the return type by an appropriate cast explicitly: @smallexample Breakpoint 2, 0x0040050b in func () (@value{GDBP}) return -1 Return value type not available for selected stack frame. Please use an explicit cast of the value to return. (@value{GDBP}) return (long long int) -1 Make selected stack frame return now? (y or n) y #0 0x00400526 in main () (@value{GDBP}) @end smallexample @node Calling @section Calling Program Functions @table @code @cindex calling functions @cindex inferior functions, calling @item print @var{expr} Evaluate the expression @var{expr} and display the resulting value. @var{expr} may include calls to functions in the program being debugged. @kindex call @item call @var{expr} Evaluate the expression @var{expr} without displaying @code{void} returned values. You can use this variant of the @code{print} command if you want to execute a function from your program that does not return anything (a.k.a.@: @dfn{a void function}), but without cluttering the output with @code{void} returned values that @value{GDBN} will otherwise print. If the result is not void, it is printed and saved in the value history. @end table It is possible for the function you call via the @code{print} or @code{call} command to generate a signal (e.g., if there's a bug in the function, or if you passed it incorrect arguments). What happens in that case is controlled by the @code{set unwindonsignal} command. Similarly, with a C@t{++} program it is possible for the function you call via the @code{print} or @code{call} command to generate an exception that is not handled due to the constraints of the dummy frame. In this case, any exception that is raised in the frame, but has an out-of-frame exception handler will not be found. GDB builds a dummy-frame for the inferior function call, and the unwinder cannot seek for exception handlers outside of this dummy-frame. What happens in that case is controlled by the @code{set unwind-on-terminating-exception} command. @table @code @item set unwindonsignal @kindex set unwindonsignal @cindex unwind stack in called functions @cindex call dummy stack unwinding Set unwinding of the stack if a signal is received while in a function that @value{GDBN} called in the program being debugged. If set to on, @value{GDBN} unwinds the stack it created for the call and restores the context to what it was before the call. If set to off (the default), @value{GDBN} stops in the frame where the signal was received. @item show unwindonsignal @kindex show unwindonsignal Show the current setting of stack unwinding in the functions called by @value{GDBN}. @item set unwind-on-terminating-exception @kindex set unwind-on-terminating-exception @cindex unwind stack in called functions with unhandled exceptions @cindex call dummy stack unwinding on unhandled exception. Set unwinding of the stack if a C@t{++} exception is raised, but left unhandled while in a function that @value{GDBN} called in the program being debugged. If set to on (the default), @value{GDBN} unwinds the stack it created for the call and restores the context to what it was before the call. If set to off, @value{GDBN} the exception is delivered to the default C@t{++} exception handler and the inferior terminated. @item show unwind-on-terminating-exception @kindex show unwind-on-terminating-exception Show the current setting of stack unwinding in the functions called by @value{GDBN}. @end table @cindex weak alias functions Sometimes, a function you wish to call is actually a @dfn{weak alias} for another function. In such case, @value{GDBN} might not pick up the type information, including the types of the function arguments, which causes @value{GDBN} to call the inferior function incorrectly. As a result, the called function will function erroneously and may even crash. A solution to that is to use the name of the aliased function instead. @node Patching @section Patching Programs @cindex patching binaries @cindex writing into executables @cindex writing into corefiles By default, @value{GDBN} opens the file containing your program's executable code (or the corefile) read-only. This prevents accidental alterations to machine code; but it also prevents you from intentionally patching your program's binary. If you'd like to be able to patch the binary, you can specify that explicitly with the @code{set write} command. For example, you might want to turn on internal debugging flags, or even to make emergency repairs. @table @code @kindex set write @item set write on @itemx set write off If you specify @samp{set write on}, @value{GDBN} opens executable and core files for both reading and writing; if you specify @kbd{set write off} (the default), @value{GDBN} opens them read-only. If you have already loaded a file, you must load it again (using the @code{exec-file} or @code{core-file} command) after changing @code{set write}, for your new setting to take effect. @item show write @kindex show write Display whether executable files and core files are opened for writing as well as reading. @end table @node GDB Files @chapter @value{GDBN} Files @value{GDBN} needs to know the file name of the program to be debugged, both in order to read its symbol table and in order to start your program. To debug a core dump of a previous run, you must also tell @value{GDBN} the name of the core dump file. @menu * Files:: Commands to specify files * Separate Debug Files:: Debugging information in separate files * MiniDebugInfo:: Debugging information in a special section * Index Files:: Index files speed up GDB * Symbol Errors:: Errors reading symbol files * Data Files:: GDB data files @end menu @node Files @section Commands to Specify Files @cindex symbol table @cindex core dump file You may want to specify executable and core dump file names. The usual way to do this is at start-up time, using the arguments to @value{GDBN}'s start-up commands (@pxref{Invocation, , Getting In and Out of @value{GDBN}}). Occasionally it is necessary to change to a different file during a @value{GDBN} session. Or you may run @value{GDBN} and forget to specify a file you want to use. Or you are debugging a remote target via @code{gdbserver} (@pxref{Server, file, Using the @code{gdbserver} Program}). In these situations the @value{GDBN} commands to specify new files are useful. @table @code @cindex executable file @kindex file @item file @var{filename} Use @var{filename} as the program to be debugged. It is read for its symbols and for the contents of pure memory. It is also the program executed when you use the @code{run} command. If you do not specify a directory and the file is not found in the @value{GDBN} working directory, @value{GDBN} uses the environment variable @code{PATH} as a list of directories to search, just as the shell does when looking for a program to run. You can change the value of this variable, for both @value{GDBN} and your program, using the @code{path} command. @cindex unlinked object files @cindex patching object files You can load unlinked object @file{.o} files into @value{GDBN} using the @code{file} command. You will not be able to ``run'' an object file, but you can disassemble functions and inspect variables. Also, if the underlying BFD functionality supports it, you could use @kbd{gdb -write} to patch object files using this technique. Note that @value{GDBN} can neither interpret nor modify relocations in this case, so branches and some initialized variables will appear to go to the wrong place. But this feature is still handy from time to time. @item file @code{file} with no argument makes @value{GDBN} discard any information it has on both executable file and the symbol table. @kindex exec-file @item exec-file @r{[} @var{filename} @r{]} Specify that the program to be run (but not the symbol table) is found in @var{filename}. @value{GDBN} searches the environment variable @code{PATH} if necessary to locate your program. Omitting @var{filename} means to discard information on the executable file. @kindex symbol-file @item symbol-file @r{[} @var{filename} @r{]} Read symbol table information from file @var{filename}. @code{PATH} is searched when necessary. Use the @code{file} command to get both symbol table and program to run from the same file. @code{symbol-file} with no argument clears out @value{GDBN} information on your program's symbol table. The @code{symbol-file} command causes @value{GDBN} to forget the contents of some breakpoints and auto-display expressions. This is because they may contain pointers to the internal data recording symbols and data types, which are part of the old symbol table data being discarded inside @value{GDBN}. @code{symbol-file} does not repeat if you press @key{RET} again after executing it once. When @value{GDBN} is configured for a particular environment, it understands debugging information in whatever format is the standard generated for that environment; you may use either a @sc{gnu} compiler, or other compilers that adhere to the local conventions. Best results are usually obtained from @sc{gnu} compilers; for example, using @code{@value{NGCC}} you can generate debugging information for optimized code. For most kinds of object files, with the exception of old SVR3 systems using COFF, the @code{symbol-file} command does not normally read the symbol table in full right away. Instead, it scans the symbol table quickly to find which source files and which symbols are present. The details are read later, one source file at a time, as they are needed. The purpose of this two-stage reading strategy is to make @value{GDBN} start up faster. For the most part, it is invisible except for occasional pauses while the symbol table details for a particular source file are being read. (The @code{set verbose} command can turn these pauses into messages if desired. @xref{Messages/Warnings, ,Optional Warnings and Messages}.) We have not implemented the two-stage strategy for COFF yet. When the symbol table is stored in COFF format, @code{symbol-file} reads the symbol table data in full right away. Note that ``stabs-in-COFF'' still does the two-stage strategy, since the debug info is actually in stabs format. @kindex readnow @cindex reading symbols immediately @cindex symbols, reading immediately @item symbol-file @r{[} -readnow @r{]} @var{filename} @itemx file @r{[} -readnow @r{]} @var{filename} You can override the @value{GDBN} two-stage strategy for reading symbol tables by using the @samp{-readnow} option with any of the commands that load symbol table information, if you want to be sure @value{GDBN} has the entire symbol table available. @c FIXME: for now no mention of directories, since this seems to be in @c flux. 13mar1992 status is that in theory GDB would look either in @c current dir or in same dir as myprog; but issues like competing @c GDB's, or clutter in system dirs, mean that in practice right now @c only current dir is used. FFish says maybe a special GDB hierarchy @c (eg rooted in val of env var GDBSYMS) could exist for mappable symbol @c files. @kindex core-file @item core-file @r{[}@var{filename}@r{]} @itemx core Specify the whereabouts of a core dump file to be used as the ``contents of memory''. Traditionally, core files contain only some parts of the address space of the process that generated them; @value{GDBN} can access the executable file itself for other parts. @code{core-file} with no argument specifies that no core file is to be used. Note that the core file is ignored when your program is actually running under @value{GDBN}. So, if you have been running your program and you wish to debug a core file instead, you must kill the subprocess in which the program is running. To do this, use the @code{kill} command (@pxref{Kill Process, ,Killing the Child Process}). @kindex add-symbol-file @cindex dynamic linking @item add-symbol-file @var{filename} @var{address} @itemx add-symbol-file @var{filename} @var{address} @r{[} -readnow @r{]} @itemx add-symbol-file @var{filename} @var{address} -s @var{section} @var{address} @dots{} The @code{add-symbol-file} command reads additional symbol table information from the file @var{filename}. You would use this command when @var{filename} has been dynamically loaded (by some other means) into the program that is running. @var{address} should be the memory address at which the file has been loaded; @value{GDBN} cannot figure this out for itself. You can additionally specify an arbitrary number of @samp{-s @var{section} @var{address}} pairs, to give an explicit section name and base address for that section. You can specify any @var{address} as an expression. The symbol table of the file @var{filename} is added to the symbol table originally read with the @code{symbol-file} command. You can use the @code{add-symbol-file} command any number of times; the new symbol data thus read keeps adding to the old. To discard all old symbol data instead, use the @code{symbol-file} command without any arguments. @cindex relocatable object files, reading symbols from @cindex object files, relocatable, reading symbols from @cindex reading symbols from relocatable object files @cindex symbols, reading from relocatable object files @cindex @file{.o} files, reading symbols from Although @var{filename} is typically a shared library file, an executable file, or some other object file which has been fully relocated for loading into a process, you can also load symbolic information from relocatable @file{.o} files, as long as: @itemize @bullet @item the file's symbolic information refers only to linker symbols defined in that file, not to symbols defined by other object files, @item every section the file's symbolic information refers to has actually been loaded into the inferior, as it appears in the file, and @item you can determine the address at which every section was loaded, and provide these to the @code{add-symbol-file} command. @end itemize @noindent Some embedded operating systems, like Sun Chorus and VxWorks, can load relocatable files into an already running program; such systems typically make the requirements above easy to meet. However, it's important to recognize that many native systems use complex link procedures (@code{.linkonce} section factoring and C@t{++} constructor table assembly, for example) that make the requirements difficult to meet. In general, one cannot assume that using @code{add-symbol-file} to read a relocatable object file's symbolic information will have the same effect as linking the relocatable object file into the program in the normal way. @code{add-symbol-file} does not repeat if you press @key{RET} after using it. @kindex add-symbol-file-from-memory @cindex @code{syscall DSO} @cindex load symbols from memory @item add-symbol-file-from-memory @var{address} Load symbols from the given @var{address} in a dynamically loaded object file whose image is mapped directly into the inferior's memory. For example, the Linux kernel maps a @code{syscall DSO} into each process's address space; this DSO provides kernel-specific code for some system calls. The argument can be any expression whose evaluation yields the address of the file's shared object file header. For this command to work, you must have used @code{symbol-file} or @code{exec-file} commands in advance. @kindex add-shared-symbol-files @kindex assf @item add-shared-symbol-files @var{library-file} @itemx assf @var{library-file} The @code{add-shared-symbol-files} command can currently be used only in the Cygwin build of @value{GDBN} on MS-Windows OS, where it is an alias for the @code{dll-symbols} command (@pxref{Cygwin Native}). @value{GDBN} automatically looks for shared libraries, however if @value{GDBN} does not find yours, you can invoke @code{add-shared-symbol-files}. It takes one argument: the shared library's file name. @code{assf} is a shorthand alias for @code{add-shared-symbol-files}. @kindex section @item section @var{section} @var{addr} The @code{section} command changes the base address of the named @var{section} of the exec file to @var{addr}. This can be used if the exec file does not contain section addresses, (such as in the @code{a.out} format), or when the addresses specified in the file itself are wrong. Each section must be changed separately. The @code{info files} command, described below, lists all the sections and their addresses. @kindex info files @kindex info target @item info files @itemx info target @code{info files} and @code{info target} are synonymous; both print the current target (@pxref{Targets, ,Specifying a Debugging Target}), including the names of the executable and core dump files currently in use by @value{GDBN}, and the files from which symbols were loaded. The command @code{help target} lists all possible targets rather than current ones. @kindex maint info sections @item maint info sections Another command that can give you extra information about program sections is @code{maint info sections}. In addition to the section information displayed by @code{info files}, this command displays the flags and file offset of each section in the executable and core dump files. In addition, @code{maint info sections} provides the following command options (which may be arbitrarily combined): @table @code @item ALLOBJ Display sections for all loaded object files, including shared libraries. @item @var{sections} Display info only for named @var{sections}. @item @var{section-flags} Display info only for sections for which @var{section-flags} are true. The section flags that @value{GDBN} currently knows about are: @table @code @item ALLOC Section will have space allocated in the process when loaded. Set for all sections except those containing debug information. @item LOAD Section will be loaded from the file into the child process memory. Set for pre-initialized code and data, clear for @code{.bss} sections. @item RELOC Section needs to be relocated before loading. @item READONLY Section cannot be modified by the child process. @item CODE Section contains executable code only. @item DATA Section contains data only (no executable code). @item ROM Section will reside in ROM. @item CONSTRUCTOR Section contains data for constructor/destructor lists. @item HAS_CONTENTS Section is not empty. @item NEVER_LOAD An instruction to the linker to not output the section. @item COFF_SHARED_LIBRARY A notification to the linker that the section contains COFF shared library information. @item IS_COMMON Section contains common symbols. @end table @end table @kindex set trust-readonly-sections @cindex read-only sections @item set trust-readonly-sections on Tell @value{GDBN} that readonly sections in your object file really are read-only (i.e.@: that their contents will not change). In that case, @value{GDBN} can fetch values from these sections out of the object file, rather than from the target program. For some targets (notably embedded ones), this can be a significant enhancement to debugging performance. The default is off. @item set trust-readonly-sections off Tell @value{GDBN} not to trust readonly sections. This means that the contents of the section might change while the program is running, and must therefore be fetched from the target when needed. @item show trust-readonly-sections Show the current setting of trusting readonly sections. @end table All file-specifying commands allow both absolute and relative file names as arguments. @value{GDBN} always converts the file name to an absolute file name and remembers it that way. @cindex shared libraries @anchor{Shared Libraries} @value{GDBN} supports @sc{gnu}/Linux, MS-Windows, HP-UX, SunOS, SVr4, Irix, and IBM RS/6000 AIX shared libraries. On MS-Windows @value{GDBN} must be linked with the Expat library to support shared libraries. @xref{Expat}. @value{GDBN} automatically loads symbol definitions from shared libraries when you use the @code{run} command, or when you examine a core file. (Before you issue the @code{run} command, @value{GDBN} does not understand references to a function in a shared library, however---unless you are debugging a core file). On HP-UX, if the program loads a library explicitly, @value{GDBN} automatically loads the symbols at the time of the @code{shl_load} call. @c FIXME: some @value{GDBN} release may permit some refs to undef @c FIXME...symbols---eg in a break cmd---assuming they are from a shared @c FIXME...lib; check this from time to time when updating manual There are times, however, when you may wish to not automatically load symbol definitions from shared libraries, such as when they are particularly large or there are many of them. To control the automatic loading of shared library symbols, use the commands: @table @code @kindex set auto-solib-add @item set auto-solib-add @var{mode} If @var{mode} is @code{on}, symbols from all shared object libraries will be loaded automatically when the inferior begins execution, you attach to an independently started inferior, or when the dynamic linker informs @value{GDBN} that a new library has been loaded. If @var{mode} is @code{off}, symbols must be loaded manually, using the @code{sharedlibrary} command. The default value is @code{on}. @cindex memory used for symbol tables If your program uses lots of shared libraries with debug info that takes large amounts of memory, you can decrease the @value{GDBN} memory footprint by preventing it from automatically loading the symbols from shared libraries. To that end, type @kbd{set auto-solib-add off} before running the inferior, then load each library whose debug symbols you do need with @kbd{sharedlibrary @var{regexp}}, where @var{regexp} is a regular expression that matches the libraries whose symbols you want to be loaded. @kindex show auto-solib-add @item show auto-solib-add Display the current autoloading mode. @end table @cindex load shared library To explicitly load shared library symbols, use the @code{sharedlibrary} command: @table @code @kindex info sharedlibrary @kindex info share @item info share @var{regex} @itemx info sharedlibrary @var{regex} Print the names of the shared libraries which are currently loaded that match @var{regex}. If @var{regex} is omitted then print all shared libraries that are loaded. @kindex sharedlibrary @kindex share @item sharedlibrary @var{regex} @itemx share @var{regex} Load shared object library symbols for files matching a Unix regular expression. As with files loaded automatically, it only loads shared libraries required by your program for a core file or after typing @code{run}. If @var{regex} is omitted all shared libraries required by your program are loaded. @item nosharedlibrary @kindex nosharedlibrary @cindex unload symbols from shared libraries Unload all shared object library symbols. This discards all symbols that have been loaded from all shared libraries. Symbols from shared libraries that were loaded by explicit user requests are not discarded. @end table Sometimes you may wish that @value{GDBN} stops and gives you control when any of shared library events happen. The best way to do this is to use @code{catch load} and @code{catch unload} (@pxref{Set Catchpoints}). @value{GDBN} also supports the the @code{set stop-on-solib-events} command for this. This command exists for historical reasons. It is less useful than setting a catchpoint, because it does not allow for conditions or commands as a catchpoint does. @table @code @item set stop-on-solib-events @kindex set stop-on-solib-events This command controls whether @value{GDBN} should give you control when the dynamic linker notifies it about some shared library event. The most common event of interest is loading or unloading of a new shared library. @item show stop-on-solib-events @kindex show stop-on-solib-events Show whether @value{GDBN} stops and gives you control when shared library events happen. @end table Shared libraries are also supported in many cross or remote debugging configurations. @value{GDBN} needs to have access to the target's libraries; this can be accomplished either by providing copies of the libraries on the host system, or by asking @value{GDBN} to automatically retrieve the libraries from the target. If copies of the target libraries are provided, they need to be the same as the target libraries, although the copies on the target can be stripped as long as the copies on the host are not. @cindex where to look for shared libraries For remote debugging, you need to tell @value{GDBN} where the target libraries are, so that it can load the correct copies---otherwise, it may try to load the host's libraries. @value{GDBN} has two variables to specify the search directories for target libraries. @table @code @cindex prefix for shared library file names @cindex system root, alternate @kindex set solib-absolute-prefix @kindex set sysroot @item set sysroot @var{path} Use @var{path} as the system root for the program being debugged. Any absolute shared library paths will be prefixed with @var{path}; many runtime loaders store the absolute paths to the shared library in the target program's memory. If you use @code{set sysroot} to find shared libraries, they need to be laid out in the same way that they are on the target, with e.g.@: a @file{/lib} and @file{/usr/lib} hierarchy under @var{path}. If @var{path} starts with the sequence @file{remote:}, @value{GDBN} will retrieve the target libraries from the remote system. This is only supported when using a remote target that supports the @code{remote get} command (@pxref{File Transfer,,Sending files to a remote system}). The part of @var{path} following the initial @file{remote:} (if present) is used as system root prefix on the remote file system. @footnote{If you want to specify a local system root using a directory that happens to be named @file{remote:}, you need to use some equivalent variant of the name like @file{./remote:}.} For targets with an MS-DOS based filesystem, such as MS-Windows and SymbianOS, @value{GDBN} tries prefixing a few variants of the target absolute file name with @var{path}. But first, on Unix hosts, @value{GDBN} converts all backslash directory separators into forward slashes, because the backslash is not a directory separator on Unix: @smallexample c:\foo\bar.dll @result{} c:/foo/bar.dll @end smallexample Then, @value{GDBN} attempts prefixing the target file name with @var{path}, and looks for the resulting file name in the host file system: @smallexample c:/foo/bar.dll @result{} /path/to/sysroot/c:/foo/bar.dll @end smallexample If that does not find the shared library, @value{GDBN} tries removing the @samp{:} character from the drive spec, both for convenience, and, for the case of the host file system not supporting file names with colons: @smallexample c:/foo/bar.dll @result{} /path/to/sysroot/c/foo/bar.dll @end smallexample This makes it possible to have a system root that mirrors a target with more than one drive. E.g., you may want to setup your local copies of the target system shared libraries like so (note @samp{c} vs @samp{z}): @smallexample @file{/path/to/sysroot/c/sys/bin/foo.dll} @file{/path/to/sysroot/c/sys/bin/bar.dll} @file{/path/to/sysroot/z/sys/bin/bar.dll} @end smallexample @noindent and point the system root at @file{/path/to/sysroot}, so that @value{GDBN} can find the correct copies of both @file{c:\sys\bin\foo.dll}, and @file{z:\sys\bin\bar.dll}. If that still does not find the shared library, @value{GDBN} tries removing the whole drive spec from the target file name: @smallexample c:/foo/bar.dll @result{} /path/to/sysroot/foo/bar.dll @end smallexample This last lookup makes it possible to not care about the drive name, if you don't want or need to. The @code{set solib-absolute-prefix} command is an alias for @code{set sysroot}. @cindex default system root @cindex @samp{--with-sysroot} You can set the default system root by using the configure-time @samp{--with-sysroot} option. If the system root is inside @value{GDBN}'s configured binary prefix (set with @samp{--prefix} or @samp{--exec-prefix}), then the default system root will be updated automatically if the installed @value{GDBN} is moved to a new location. @kindex show sysroot @item show sysroot Display the current shared library prefix. @kindex set solib-search-path @item set solib-search-path @var{path} If this variable is set, @var{path} is a colon-separated list of directories to search for shared libraries. @samp{solib-search-path} is used after @samp{sysroot} fails to locate the library, or if the path to the library is relative instead of absolute. If you want to use @samp{solib-search-path} instead of @samp{sysroot}, be sure to set @samp{sysroot} to a nonexistent directory to prevent @value{GDBN} from finding your host's libraries. @samp{sysroot} is preferred; setting it to a nonexistent directory may interfere with automatic loading of shared library symbols. @kindex show solib-search-path @item show solib-search-path Display the current shared library search path. @cindex DOS file-name semantics of file names. @kindex set target-file-system-kind (unix|dos-based|auto) @kindex show target-file-system-kind @item set target-file-system-kind @var{kind} Set assumed file system kind for target reported file names. Shared library file names as reported by the target system may not make sense as is on the system @value{GDBN} is running on. For example, when remote debugging a target that has MS-DOS based file system semantics, from a Unix host, the target may be reporting to @value{GDBN} a list of loaded shared libraries with file names such as @file{c:\Windows\kernel32.dll}. On Unix hosts, there's no concept of drive letters, so the @samp{c:\} prefix is not normally understood as indicating an absolute file name, and neither is the backslash normally considered a directory separator character. In that case, the native file system would interpret this whole absolute file name as a relative file name with no directory components. This would make it impossible to point @value{GDBN} at a copy of the remote target's shared libraries on the host using @code{set sysroot}, and impractical with @code{set solib-search-path}. Setting @code{target-file-system-kind} to @code{dos-based} tells @value{GDBN} to interpret such file names similarly to how the target would, and to map them to file names valid on @value{GDBN}'s native file system semantics. The value of @var{kind} can be @code{"auto"}, in addition to one of the supported file system kinds. In that case, @value{GDBN} tries to determine the appropriate file system variant based on the current target's operating system (@pxref{ABI, ,Configuring the Current ABI}). The supported file system settings are: @table @code @item unix Instruct @value{GDBN} to assume the target file system is of Unix kind. Only file names starting the forward slash (@samp{/}) character are considered absolute, and the directory separator character is also the forward slash. @item dos-based Instruct @value{GDBN} to assume the target file system is DOS based. File names starting with either a forward slash, or a drive letter followed by a colon (e.g., @samp{c:}), are considered absolute, and both the slash (@samp{/}) and the backslash (@samp{\\}) characters are considered directory separators. @item auto Instruct @value{GDBN} to use the file system kind associated with the target operating system (@pxref{ABI, ,Configuring the Current ABI}). This is the default. @end table @end table @cindex file name canonicalization @cindex base name differences When processing file names provided by the user, @value{GDBN} frequently needs to compare them to the file names recorded in the program's debug info. Normally, @value{GDBN} compares just the @dfn{base names} of the files as strings, which is reasonably fast even for very large programs. (The base name of a file is the last portion of its name, after stripping all the leading directories.) This shortcut in comparison is based upon the assumption that files cannot have more than one base name. This is usually true, but references to files that use symlinks or similar filesystem facilities violate that assumption. If your program records files using such facilities, or if you provide file names to @value{GDBN} using symlinks etc., you can set @code{basenames-may-differ} to @code{true} to instruct @value{GDBN} to completely canonicalize each pair of file names it needs to compare. This will make file-name comparisons accurate, but at a price of a significant slowdown. @table @code @item set basenames-may-differ @kindex set basenames-may-differ Set whether a source file may have multiple base names. @item show basenames-may-differ @kindex show basenames-may-differ Show whether a source file may have multiple base names. @end table @node Separate Debug Files @section Debugging Information in Separate Files @cindex separate debugging information files @cindex debugging information in separate files @cindex @file{.debug} subdirectories @cindex debugging information directory, global @cindex global debugging information directories @cindex build ID, and separate debugging files @cindex @file{.build-id} directory @value{GDBN} allows you to put a program's debugging information in a file separate from the executable itself, in a way that allows @value{GDBN} to find and load the debugging information automatically. Since debugging information can be very large---sometimes larger than the executable code itself---some systems distribute debugging information for their executables in separate files, which users can install only when they need to debug a problem. @value{GDBN} supports two ways of specifying the separate debug info file: @itemize @bullet @item The executable contains a @dfn{debug link} that specifies the name of the separate debug info file. The separate debug file's name is usually @file{@var{executable}.debug}, where @var{executable} is the name of the corresponding executable file without leading directories (e.g., @file{ls.debug} for @file{/usr/bin/ls}). In addition, the debug link specifies a 32-bit @dfn{Cyclic Redundancy Check} (CRC) checksum for the debug file, which @value{GDBN} uses to validate that the executable and the debug file came from the same build. @item The executable contains a @dfn{build ID}, a unique bit string that is also present in the corresponding debug info file. (This is supported only on some operating systems, notably those which use the ELF format for binary files and the @sc{gnu} Binutils.) For more details about this feature, see the description of the @option{--build-id} command-line option in @ref{Options, , Command Line Options, ld.info, The GNU Linker}. The debug info file's name is not specified explicitly by the build ID, but can be computed from the build ID, see below. @end itemize Depending on the way the debug info file is specified, @value{GDBN} uses two different methods of looking for the debug file: @itemize @bullet @item For the ``debug link'' method, @value{GDBN} looks up the named file in the directory of the executable file, then in a subdirectory of that directory named @file{.debug}, and finally under each one of the global debug directories, in a subdirectory whose name is identical to the leading directories of the executable's absolute file name. @item For the ``build ID'' method, @value{GDBN} looks in the @file{.build-id} subdirectory of each one of the global debug directories for a file named @file{@var{nn}/@var{nnnnnnnn}.debug}, where @var{nn} are the first 2 hex characters of the build ID bit string, and @var{nnnnnnnn} are the rest of the bit string. (Real build ID strings are 32 or more hex characters, not 10.) @end itemize So, for example, suppose you ask @value{GDBN} to debug @file{/usr/bin/ls}, which has a debug link that specifies the file @file{ls.debug}, and a build ID whose value in hex is @code{abcdef1234}. If the list of the global debug directories includes @file{/usr/lib/debug}, then @value{GDBN} will look for the following debug information files, in the indicated order: @itemize @minus @item @file{/usr/lib/debug/.build-id/ab/cdef1234.debug} @item @file{/usr/bin/ls.debug} @item @file{/usr/bin/.debug/ls.debug} @item @file{/usr/lib/debug/usr/bin/ls.debug}. @end itemize @anchor{debug-file-directory} Global debugging info directories default to what is set by @value{GDBN} configure option @option{--with-separate-debug-dir}. During @value{GDBN} run you can also set the global debugging info directories, and view the list @value{GDBN} is currently using. @table @code @kindex set debug-file-directory @item set debug-file-directory @var{directories} Set the directories which @value{GDBN} searches for separate debugging information files to @var{directory}. Multiple path components can be set concatenating them by a path separator. @kindex show debug-file-directory @item show debug-file-directory Show the directories @value{GDBN} searches for separate debugging information files. @end table @cindex @code{.gnu_debuglink} sections @cindex debug link sections A debug link is a special section of the executable file named @code{.gnu_debuglink}. The section must contain: @itemize @item A filename, with any leading directory components removed, followed by a zero byte, @item zero to three bytes of padding, as needed to reach the next four-byte boundary within the section, and @item a four-byte CRC checksum, stored in the same endianness used for the executable file itself. The checksum is computed on the debugging information file's full contents by the function given below, passing zero as the @var{crc} argument. @end itemize Any executable file format can carry a debug link, as long as it can contain a section named @code{.gnu_debuglink} with the contents described above. @cindex @code{.note.gnu.build-id} sections @cindex build ID sections The build ID is a special section in the executable file (and in other ELF binary files that @value{GDBN} may consider). This section is often named @code{.note.gnu.build-id}, but that name is not mandatory. It contains unique identification for the built files---the ID remains the same across multiple builds of the same build tree. The default algorithm SHA1 produces 160 bits (40 hexadecimal characters) of the content for the build ID string. The same section with an identical value is present in the original built binary with symbols, in its stripped variant, and in the separate debugging information file. The debugging information file itself should be an ordinary executable, containing a full set of linker symbols, sections, and debugging information. The sections of the debugging information file should have the same names, addresses, and sizes as the original file, but they need not contain any data---much like a @code{.bss} section in an ordinary executable. The @sc{gnu} binary utilities (Binutils) package includes the @samp{objcopy} utility that can produce the separated executable / debugging information file pairs using the following commands: @smallexample @kbd{objcopy --only-keep-debug foo foo.debug} @kbd{strip -g foo} @end smallexample @noindent These commands remove the debugging information from the executable file @file{foo} and place it in the file @file{foo.debug}. You can use the first, second or both methods to link the two files: @itemize @bullet @item The debug link method needs the following additional command to also leave behind a debug link in @file{foo}: @smallexample @kbd{objcopy --add-gnu-debuglink=foo.debug foo} @end smallexample Ulrich Drepper's @file{elfutils} package, starting with version 0.53, contains a version of the @code{strip} command such that the command @kbd{strip foo -f foo.debug} has the same functionality as the two @code{objcopy} commands and the @code{ln -s} command above, together. @item Build ID gets embedded into the main executable using @code{ld --build-id} or the @value{NGCC} counterpart @code{gcc -Wl,--build-id}. Build ID support plus compatibility fixes for debug files separation are present in @sc{gnu} binary utilities (Binutils) package since version 2.18. @end itemize @noindent @cindex CRC algorithm definition The CRC used in @code{.gnu_debuglink} is the CRC-32 defined in IEEE 802.3 using the polynomial: @c TexInfo requires naked braces for multi-digit exponents for Tex @c output, but this causes HTML output to barf. HTML has to be set using @c raw commands. So we end up having to specify this equation in 2 @c different ways! @ifhtml @display @html x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x + 1 @end html @end display @end ifhtml @ifnothtml @display @math{x^{32} + x^{26} + x^{23} + x^{22} + x^{16} + x^{12} + x^{11}} @math{+ x^{10} + x^8 + x^7 + x^5 + x^4 + x^2 + x + 1} @end display @end ifnothtml The function is computed byte at a time, taking the least significant bit of each byte first. The initial pattern @code{0xffffffff} is used, to ensure leading zeros affect the CRC and the final result is inverted to ensure trailing zeros also affect the CRC. @emph{Note:} This is the same CRC polynomial as used in handling the @dfn{Remote Serial Protocol} @code{qCRC} packet (@pxref{Remote Protocol, , @value{GDBN} Remote Serial Protocol}). However in the case of the Remote Serial Protocol, the CRC is computed @emph{most} significant bit first, and the result is not inverted, so trailing zeros have no effect on the CRC value. To complete the description, we show below the code of the function which produces the CRC used in @code{.gnu_debuglink}. Inverting the initially supplied @code{crc} argument means that an initial call to this function passing in zero will start computing the CRC using @code{0xffffffff}. @kindex gnu_debuglink_crc32 @smallexample unsigned long gnu_debuglink_crc32 (unsigned long crc, unsigned char *buf, size_t len) @{ static const unsigned long crc32_table[256] = @{ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d @}; unsigned char *end; crc = ~crc & 0xffffffff; for (end = buf + len; buf < end; ++buf) crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8); return ~crc & 0xffffffff; @} @end smallexample @noindent This computation does not apply to the ``build ID'' method. @node MiniDebugInfo @section Debugging information in a special section @cindex separate debug sections @cindex @samp{.gnu_debugdata} section Some systems ship pre-built executables and libraries that have a special @samp{.gnu_debugdata} section. This feature is called @dfn{MiniDebugInfo}. This section holds an LZMA-compressed object and is used to supply extra symbols for backtraces. The intent of this section is to provide extra minimal debugging information for use in simple backtraces. It is not intended to be a replacement for full separate debugging information (@pxref{Separate Debug Files}). The example below shows the intended use; however, @value{GDBN} does not currently put restrictions on what sort of debugging information might be included in the section. @value{GDBN} has support for this extension. If the section exists, then it is used provided that no other source of debugging information can be found, and that @value{GDBN} was configured with LZMA support. This section can be easily created using @command{objcopy} and other standard utilities: @smallexample # Extract the dynamic symbols from the main binary, there is no need # to also have these in the normal symbol table nm -D @var{binary} --format=posix --defined-only \ | awk '@{ print $1 @}' | sort > dynsyms # Extract all the text (i.e. function) symbols from the debuginfo . nm @var{binary} --format=posix --defined-only \ | awk '@{ if ($2 == "T" || $2 == "t") print $1 @}' \ | sort > funcsyms # Keep all the function symbols not already in the dynamic symbol # table. comm -13 dynsyms funcsyms > keep_symbols # Copy the full debuginfo, keeping only a minimal set of symbols and # removing some unnecessary sections. objcopy -S --remove-section .gdb_index --remove-section .comment \ --keep-symbols=keep_symbols @var{binary} mini_debuginfo # Inject the compressed data into the .gnu_debugdata section of the # original binary. xz mini_debuginfo objcopy --add-section .gnu_debugdata=mini_debuginfo.xz @var{binary} @end smallexample @node Index Files @section Index Files Speed Up @value{GDBN} @cindex index files @cindex @samp{.gdb_index} section When @value{GDBN} finds a symbol file, it scans the symbols in the file in order to construct an internal symbol table. This lets most @value{GDBN} operations work quickly---at the cost of a delay early on. For large programs, this delay can be quite lengthy, so @value{GDBN} provides a way to build an index, which speeds up startup. The index is stored as a section in the symbol file. @value{GDBN} can write the index to a file, then you can put it into the symbol file using @command{objcopy}. To create an index file, use the @code{save gdb-index} command: @table @code @item save gdb-index @var{directory} @kindex save gdb-index Create an index file for each symbol file currently known by @value{GDBN}. Each file is named after its corresponding symbol file, with @samp{.gdb-index} appended, and is written into the given @var{directory}. @end table Once you have created an index file you can merge it into your symbol file, here named @file{symfile}, using @command{objcopy}: @smallexample $ objcopy --add-section .gdb_index=symfile.gdb-index \ --set-section-flags .gdb_index=readonly symfile symfile @end smallexample @value{GDBN} will normally ignore older versions of @file{.gdb_index} sections that have been deprecated. Usually they are deprecated because they are missing a new feature or have performance issues. To tell @value{GDBN} to use a deprecated index section anyway specify @code{set use-deprecated-index-sections on}. The default is @code{off}. This can speed up startup, but may result in some functionality being lost. @xref{Index Section Format}. @emph{Warning:} Setting @code{use-deprecated-index-sections} to @code{on} must be done before gdb reads the file. The following will not work: @smallexample $ gdb -ex "set use-deprecated-index-sections on" @end smallexample Instead you must do, for example, @smallexample $ gdb -iex "set use-deprecated-index-sections on" @end smallexample There are currently some limitation on indices. They only work when for DWARF debugging information, not stabs. And, they do not currently work for programs using Ada. @node Symbol Errors @section Errors Reading Symbol Files While reading a symbol file, @value{GDBN} occasionally encounters problems, such as symbol types it does not recognize, or known bugs in compiler output. By default, @value{GDBN} does not notify you of such problems, since they are relatively common and primarily of interest to people debugging compilers. If you are interested in seeing information about ill-constructed symbol tables, you can either ask @value{GDBN} to print only one message about each such type of problem, no matter how many times the problem occurs; or you can ask @value{GDBN} to print more messages, to see how many times the problems occur, with the @code{set complaints} command (@pxref{Messages/Warnings, ,Optional Warnings and Messages}). The messages currently printed, and their meanings, include: @table @code @item inner block not inside outer block in @var{symbol} The symbol information shows where symbol scopes begin and end (such as at the start of a function or a block of statements). This error indicates that an inner scope block is not fully contained in its outer scope blocks. @value{GDBN} circumvents the problem by treating the inner block as if it had the same scope as the outer block. In the error message, @var{symbol} may be shown as ``@code{(don't know)}'' if the outer block is not a function. @item block at @var{address} out of order The symbol information for symbol scope blocks should occur in order of increasing addresses. This error indicates that it does not do so. @value{GDBN} does not circumvent this problem, and has trouble locating symbols in the source file whose symbols it is reading. (You can often determine what source file is affected by specifying @code{set verbose on}. @xref{Messages/Warnings, ,Optional Warnings and Messages}.) @item bad block start address patched The symbol information for a symbol scope block has a start address smaller than the address of the preceding source line. This is known to occur in the SunOS 4.1.1 (and earlier) C compiler. @value{GDBN} circumvents the problem by treating the symbol scope block as starting on the previous source line. @item bad string table offset in symbol @var{n} @cindex foo Symbol number @var{n} contains a pointer into the string table which is larger than the size of the string table. @value{GDBN} circumvents the problem by considering the symbol to have the name @code{foo}, which may cause other problems if many symbols end up with this name. @item unknown symbol type @code{0x@var{nn}} The symbol information contains new data types that @value{GDBN} does not yet know how to read. @code{0x@var{nn}} is the symbol type of the uncomprehended information, in hexadecimal. @value{GDBN} circumvents the error by ignoring this symbol information. This usually allows you to debug your program, though certain symbols are not accessible. If you encounter such a problem and feel like debugging it, you can debug @code{@value{GDBP}} with itself, breakpoint on @code{complain}, then go up to the function @code{read_dbx_symtab} and examine @code{*bufp} to see the symbol. @item stub type has NULL name @value{GDBN} could not find the full definition for a struct or class. @item const/volatile indicator missing (ok if using g++ v1.x), got@dots{} The symbol information for a C@t{++} member function is missing some information that recent versions of the compiler should have output for it. @item info mismatch between compiler and debugger @value{GDBN} could not parse a type specification output by the compiler. @end table @node Data Files @section GDB Data Files @cindex prefix for data files @value{GDBN} will sometimes read an auxiliary data file. These files are kept in a directory known as the @dfn{data directory}. You can set the data directory's name, and view the name @value{GDBN} is currently using. @table @code @kindex set data-directory @item set data-directory @var{directory} Set the directory which @value{GDBN} searches for auxiliary data files to @var{directory}. @kindex show data-directory @item show data-directory Show the directory @value{GDBN} searches for auxiliary data files. @end table @cindex default data directory @cindex @samp{--with-gdb-datadir} You can set the default data directory by using the configure-time @samp{--with-gdb-datadir} option. If the data directory is inside @value{GDBN}'s configured binary prefix (set with @samp{--prefix} or @samp{--exec-prefix}), then the default data directory will be updated automatically if the installed @value{GDBN} is moved to a new location. The data directory may also be specified with the @code{--data-directory} command line option. @xref{Mode Options}. @node Targets @chapter Specifying a Debugging Target @cindex debugging target A @dfn{target} is the execution environment occupied by your program. Often, @value{GDBN} runs in the same host environment as your program; in that case, the debugging target is specified as a side effect when you use the @code{file} or @code{core} commands. When you need more flexibility---for example, running @value{GDBN} on a physically separate host, or controlling a standalone system over a serial port or a realtime system over a TCP/IP connection---you can use the @code{target} command to specify one of the target types configured for @value{GDBN} (@pxref{Target Commands, ,Commands for Managing Targets}). @cindex target architecture It is possible to build @value{GDBN} for several different @dfn{target architectures}. When @value{GDBN} is built like that, you can choose one of the available architectures with the @kbd{set architecture} command. @table @code @kindex set architecture @kindex show architecture @item set architecture @var{arch} This command sets the current target architecture to @var{arch}. The value of @var{arch} can be @code{"auto"}, in addition to one of the supported architectures. @item show architecture Show the current target architecture. @item set processor @itemx processor @kindex set processor @kindex show processor These are alias commands for, respectively, @code{set architecture} and @code{show architecture}. @end table @menu * Active Targets:: Active targets * Target Commands:: Commands for managing targets * Byte Order:: Choosing target byte order @end menu @node Active Targets @section Active Targets @cindex stacking targets @cindex active targets @cindex multiple targets There are multiple classes of targets such as: processes, executable files or recording sessions. Core files belong to the process class, making core file and process mutually exclusive. Otherwise, @value{GDBN} can work concurrently on multiple active targets, one in each class. This allows you to (for example) start a process and inspect its activity, while still having access to the executable file after the process finishes. Or if you start process recording (@pxref{Reverse Execution}) and @code{reverse-step} there, you are presented a virtual layer of the recording target, while the process target remains stopped at the chronologically last point of the process execution. Use the @code{core-file} and @code{exec-file} commands to select a new core file or executable target (@pxref{Files, ,Commands to Specify Files}). To specify as a target a process that is already running, use the @code{attach} command (@pxref{Attach, ,Debugging an Already-running Process}). @node Target Commands @section Commands for Managing Targets @table @code @item target @var{type} @var{parameters} Connects the @value{GDBN} host environment to a target machine or process. A target is typically a protocol for talking to debugging facilities. You use the argument @var{type} to specify the type or protocol of the target machine. Further @var{parameters} are interpreted by the target protocol, but typically include things like device names or host names to connect with, process numbers, and baud rates. The @code{target} command does not repeat if you press @key{RET} again after executing the command. @kindex help target @item help target Displays the names of all targets available. To display targets currently selected, use either @code{info target} or @code{info files} (@pxref{Files, ,Commands to Specify Files}). @item help target @var{name} Describe a particular target, including any parameters necessary to select it. @kindex set gnutarget @item set gnutarget @var{args} @value{GDBN} uses its own library BFD to read your files. @value{GDBN} knows whether it is reading an @dfn{executable}, a @dfn{core}, or a @dfn{.o} file; however, you can specify the file format with the @code{set gnutarget} command. Unlike most @code{target} commands, with @code{gnutarget} the @code{target} refers to a program, not a machine. @quotation @emph{Warning:} To specify a file format with @code{set gnutarget}, you must know the actual BFD name. @end quotation @noindent @xref{Files, , Commands to Specify Files}. @kindex show gnutarget @item show gnutarget Use the @code{show gnutarget} command to display what file format @code{gnutarget} is set to read. If you have not set @code{gnutarget}, @value{GDBN} will determine the file format for each file automatically, and @code{show gnutarget} displays @samp{The current BFD target is "auto"}. @end table @cindex common targets Here are some common targets (available, or not, depending on the GDB configuration): @table @code @kindex target @item target exec @var{program} @cindex executable file target An executable file. @samp{target exec @var{program}} is the same as @samp{exec-file @var{program}}. @item target core @var{filename} @cindex core dump file target A core dump file. @samp{target core @var{filename}} is the same as @samp{core-file @var{filename}}. @item target remote @var{medium} @cindex remote target A remote system connected to @value{GDBN} via a serial line or network connection. This command tells @value{GDBN} to use its own remote protocol over @var{medium} for debugging. @xref{Remote Debugging}. For example, if you have a board connected to @file{/dev/ttya} on the machine running @value{GDBN}, you could say: @smallexample target remote /dev/ttya @end smallexample @code{target remote} supports the @code{load} command. This is only useful if you have some other way of getting the stub to the target system, and you can put it somewhere in memory where it won't get clobbered by the download. @item target sim @r{[}@var{simargs}@r{]} @dots{} @cindex built-in simulator target Builtin CPU simulator. @value{GDBN} includes simulators for most architectures. In general, @smallexample target sim load run @end smallexample @noindent works; however, you cannot assume that a specific memory map, device drivers, or even basic I/O is available, although some simulators do provide these. For info about any processor-specific simulator details, see the appropriate section in @ref{Embedded Processors, ,Embedded Processors}. @end table Some configurations may include these targets as well: @table @code @item target nrom @var{dev} @cindex NetROM ROM emulator target NetROM ROM emulator. This target only supports downloading. @end table Different targets are available on different configurations of @value{GDBN}; your configuration may have more or fewer targets. Many remote targets require you to download the executable's code once you've successfully established a connection. You may wish to control various aspects of this process. @table @code @item set hash @kindex set hash@r{, for remote monitors} @cindex hash mark while downloading This command controls whether a hash mark @samp{#} is displayed while downloading a file to the remote monitor. If on, a hash mark is displayed after each S-record is successfully downloaded to the monitor. @item show hash @kindex show hash@r{, for remote monitors} Show the current status of displaying the hash mark. @item set debug monitor @kindex set debug monitor @cindex display remote monitor communications Enable or disable display of communications messages between @value{GDBN} and the remote monitor. @item show debug monitor @kindex show debug monitor Show the current status of displaying communications between @value{GDBN} and the remote monitor. @end table @table @code @kindex load @var{filename} @item load @var{filename} @anchor{load} Depending on what remote debugging facilities are configured into @value{GDBN}, the @code{load} command may be available. Where it exists, it is meant to make @var{filename} (an executable) available for debugging on the remote system---by downloading, or dynamic linking, for example. @code{load} also records the @var{filename} symbol table in @value{GDBN}, like the @code{add-symbol-file} command. If your @value{GDBN} does not have a @code{load} command, attempting to execute it gets the error message ``@code{You can't do that when your target is @dots{}}'' The file is loaded at whatever address is specified in the executable. For some object file formats, you can specify the load address when you link the program; for other formats, like a.out, the object file format specifies a fixed address. @c FIXME! This would be a good place for an xref to the GNU linker doc. Depending on the remote side capabilities, @value{GDBN} may be able to load programs into flash memory. @code{load} does not repeat if you press @key{RET} again after using it. @end table @node Byte Order @section Choosing Target Byte Order @cindex choosing target byte order @cindex target byte order Some types of processors, such as the @acronym{MIPS}, PowerPC, and Renesas SH, offer the ability to run either big-endian or little-endian byte orders. Usually the executable or symbol will include a bit to designate the endian-ness, and you will not need to worry about which to use. However, you may still find it useful to adjust @value{GDBN}'s idea of processor endian-ness manually. @table @code @kindex set endian @item set endian big Instruct @value{GDBN} to assume the target is big-endian. @item set endian little Instruct @value{GDBN} to assume the target is little-endian. @item set endian auto Instruct @value{GDBN} to use the byte order associated with the executable. @item show endian Display @value{GDBN}'s current idea of the target byte order. @end table Note that these commands merely adjust interpretation of symbolic data on the host, and that they have absolutely no effect on the target system. @node Remote Debugging @chapter Debugging Remote Programs @cindex remote debugging If you are trying to debug a program running on a machine that cannot run @value{GDBN} in the usual way, it is often useful to use remote debugging. For example, you might use remote debugging on an operating system kernel, or on a small system which does not have a general purpose operating system powerful enough to run a full-featured debugger. Some configurations of @value{GDBN} have special serial or TCP/IP interfaces to make this work with particular debugging targets. In addition, @value{GDBN} comes with a generic serial protocol (specific to @value{GDBN}, but not specific to any particular target system) which you can use if you write the remote stubs---the code that runs on the remote system to communicate with @value{GDBN}. Other remote targets may be available in your configuration of @value{GDBN}; use @code{help target} to list them. @menu * Connecting:: Connecting to a remote target * File Transfer:: Sending files to a remote system * Server:: Using the gdbserver program * Remote Configuration:: Remote configuration * Remote Stub:: Implementing a remote stub @end menu @node Connecting @section Connecting to a Remote Target On the @value{GDBN} host machine, you will need an unstripped copy of your program, since @value{GDBN} needs symbol and debugging information. Start up @value{GDBN} as usual, using the name of the local copy of your program as the first argument. @cindex @code{target remote} @value{GDBN} can communicate with the target over a serial line, or over an @acronym{IP} network using @acronym{TCP} or @acronym{UDP}. In each case, @value{GDBN} uses the same protocol for debugging your program; only the medium carrying the debugging packets varies. The @code{target remote} command establishes a connection to the target. Its arguments indicate which medium to use: @table @code @item target remote @var{serial-device} @cindex serial line, @code{target remote} Use @var{serial-device} to communicate with the target. For example, to use a serial line connected to the device named @file{/dev/ttyb}: @smallexample target remote /dev/ttyb @end smallexample If you're using a serial line, you may want to give @value{GDBN} the @w{@samp{--baud}} option, or use the @code{set remotebaud} command (@pxref{Remote Configuration, set remotebaud}) before the @code{target} command. @item target remote @code{@var{host}:@var{port}} @itemx target remote @code{tcp:@var{host}:@var{port}} @cindex @acronym{TCP} port, @code{target remote} Debug using a @acronym{TCP} connection to @var{port} on @var{host}. The @var{host} may be either a host name or a numeric @acronym{IP} address; @var{port} must be a decimal number. The @var{host} could be the target machine itself, if it is directly connected to the net, or it might be a terminal server which in turn has a serial line to the target. For example, to connect to port 2828 on a terminal server named @code{manyfarms}: @smallexample target remote manyfarms:2828 @end smallexample If your remote target is actually running on the same machine as your debugger session (e.g.@: a simulator for your target running on the same host), you can omit the hostname. For example, to connect to port 1234 on your local machine: @smallexample target remote :1234 @end smallexample @noindent Note that the colon is still required here. @item target remote @code{udp:@var{host}:@var{port}} @cindex @acronym{UDP} port, @code{target remote} Debug using @acronym{UDP} packets to @var{port} on @var{host}. For example, to connect to @acronym{UDP} port 2828 on a terminal server named @code{manyfarms}: @smallexample target remote udp:manyfarms:2828 @end smallexample When using a @acronym{UDP} connection for remote debugging, you should keep in mind that the `U' stands for ``Unreliable''. @acronym{UDP} can silently drop packets on busy or unreliable networks, which will cause havoc with your debugging session. @item target remote | @var{command} @cindex pipe, @code{target remote} to Run @var{command} in the background and communicate with it using a pipe. The @var{command} is a shell command, to be parsed and expanded by the system's command shell, @code{/bin/sh}; it should expect remote protocol packets on its standard input, and send replies on its standard output. You could use this to run a stand-alone simulator that speaks the remote debugging protocol, to make net connections using programs like @code{ssh}, or for other similar tricks. If @var{command} closes its standard output (perhaps by exiting), @value{GDBN} will try to send it a @code{SIGTERM} signal. (If the program has already exited, this will have no effect.) @end table Once the connection has been established, you can use all the usual commands to examine and change data. The remote program is already running; you can use @kbd{step} and @kbd{continue}, and you do not need to use @kbd{run}. @cindex interrupting remote programs @cindex remote programs, interrupting Whenever @value{GDBN} is waiting for the remote program, if you type the interrupt character (often @kbd{Ctrl-c}), @value{GDBN} attempts to stop the program. This may or may not succeed, depending in part on the hardware and the serial drivers the remote system uses. If you type the interrupt character once again, @value{GDBN} displays this prompt: @smallexample Interrupted while waiting for the program. Give up (and stop debugging it)? (y or n) @end smallexample If you type @kbd{y}, @value{GDBN} abandons the remote debugging session. (If you decide you want to try again later, you can use @samp{target remote} again to connect once more.) If you type @kbd{n}, @value{GDBN} goes back to waiting. @table @code @kindex detach (remote) @item detach When you have finished debugging the remote program, you can use the @code{detach} command to release it from @value{GDBN} control. Detaching from the target normally resumes its execution, but the results will depend on your particular remote stub. After the @code{detach} command, @value{GDBN} is free to connect to another target. @kindex disconnect @item disconnect The @code{disconnect} command behaves like @code{detach}, except that the target is generally not resumed. It will wait for @value{GDBN} (this instance or another one) to connect and continue debugging. After the @code{disconnect} command, @value{GDBN} is again free to connect to another target. @cindex send command to remote monitor @cindex extend @value{GDBN} for remote targets @cindex add new commands for external monitor @kindex monitor @item monitor @var{cmd} This command allows you to send arbitrary commands directly to the remote monitor. Since @value{GDBN} doesn't care about the commands it sends like this, this command is the way to extend @value{GDBN}---you can add new commands that only the external monitor will understand and implement. @end table @node File Transfer @section Sending files to a remote system @cindex remote target, file transfer @cindex file transfer @cindex sending files to remote systems Some remote targets offer the ability to transfer files over the same connection used to communicate with @value{GDBN}. This is convenient for targets accessible through other means, e.g.@: @sc{gnu}/Linux systems running @code{gdbserver} over a network interface. For other targets, e.g.@: embedded devices with only a single serial port, this may be the only way to upload or download files. Not all remote targets support these commands. @table @code @kindex remote put @item remote put @var{hostfile} @var{targetfile} Copy file @var{hostfile} from the host system (the machine running @value{GDBN}) to @var{targetfile} on the target system. @kindex remote get @item remote get @var{targetfile} @var{hostfile} Copy file @var{targetfile} from the target system to @var{hostfile} on the host system. @kindex remote delete @item remote delete @var{targetfile} Delete @var{targetfile} from the target system. @end table @node Server @section Using the @code{gdbserver} Program @kindex gdbserver @cindex remote connection without stubs @code{gdbserver} is a control program for Unix-like systems, which allows you to connect your program with a remote @value{GDBN} via @code{target remote}---but without linking in the usual debugging stub. @code{gdbserver} is not a complete replacement for the debugging stubs, because it requires essentially the same operating-system facilities that @value{GDBN} itself does. In fact, a system that can run @code{gdbserver} to connect to a remote @value{GDBN} could also run @value{GDBN} locally! @code{gdbserver} is sometimes useful nevertheless, because it is a much smaller program than @value{GDBN} itself. It is also easier to port than all of @value{GDBN}, so you may be able to get started more quickly on a new system by using @code{gdbserver}. Finally, if you develop code for real-time systems, you may find that the tradeoffs involved in real-time operation make it more convenient to do as much development work as possible on another system, for example by cross-compiling. You can use @code{gdbserver} to make a similar choice for debugging. @value{GDBN} and @code{gdbserver} communicate via either a serial line or a TCP connection, using the standard @value{GDBN} remote serial protocol. @quotation @emph{Warning:} @code{gdbserver} does not have any built-in security. Do not run @code{gdbserver} connected to any public network; a @value{GDBN} connection to @code{gdbserver} provides access to the target system with the same privileges as the user running @code{gdbserver}. @end quotation @subsection Running @code{gdbserver} @cindex arguments, to @code{gdbserver} @cindex @code{gdbserver}, command-line arguments Run @code{gdbserver} on the target system. You need a copy of the program you want to debug, including any libraries it requires. @code{gdbserver} does not need your program's symbol table, so you can strip the program if necessary to save space. @value{GDBN} on the host system does all the symbol handling. To use the server, you must tell it how to communicate with @value{GDBN}; the name of your program; and the arguments for your program. The usual syntax is: @smallexample target> gdbserver @var{comm} @var{program} [ @var{args} @dots{} ] @end smallexample @var{comm} is either a device name (to use a serial line), or a TCP hostname and portnumber, or @code{-} or @code{stdio} to use stdin/stdout of @code{gdbserver}. For example, to debug Emacs with the argument @samp{foo.txt} and communicate with @value{GDBN} over the serial port @file{/dev/com1}: @smallexample target> gdbserver /dev/com1 emacs foo.txt @end smallexample @code{gdbserver} waits passively for the host @value{GDBN} to communicate with it. To use a TCP connection instead of a serial line: @smallexample target> gdbserver host:2345 emacs foo.txt @end smallexample The only difference from the previous example is the first argument, specifying that you are communicating with the host @value{GDBN} via TCP. The @samp{host:2345} argument means that @code{gdbserver} is to expect a TCP connection from machine @samp{host} to local TCP port 2345. (Currently, the @samp{host} part is ignored.) You can choose any number you want for the port number as long as it does not conflict with any TCP ports already in use on the target system (for example, @code{23} is reserved for @code{telnet}).@footnote{If you choose a port number that conflicts with another service, @code{gdbserver} prints an error message and exits.} You must use the same port number with the host @value{GDBN} @code{target remote} command. The @code{stdio} connection is useful when starting @code{gdbserver} with ssh: @smallexample (gdb) target remote | ssh -T hostname gdbserver - hello @end smallexample The @samp{-T} option to ssh is provided because we don't need a remote pty, and we don't want escape-character handling. Ssh does this by default when a command is provided, the flag is provided to make it explicit. You could elide it if you want to. Programs started with stdio-connected gdbserver have @file{/dev/null} for @code{stdin}, and @code{stdout},@code{stderr} are sent back to gdb for display through a pipe connected to gdbserver. Both @code{stdout} and @code{stderr} use the same pipe. @subsubsection Attaching to a Running Program @cindex attach to a program, @code{gdbserver} @cindex @option{--attach}, @code{gdbserver} option On some targets, @code{gdbserver} can also attach to running programs. This is accomplished via the @code{--attach} argument. The syntax is: @smallexample target> gdbserver --attach @var{comm} @var{pid} @end smallexample @var{pid} is the process ID of a currently running process. It isn't necessary to point @code{gdbserver} at a binary for the running process. @pindex pidof You can debug processes by name instead of process ID if your target has the @code{pidof} utility: @smallexample target> gdbserver --attach @var{comm} `pidof @var{program}` @end smallexample In case more than one copy of @var{program} is running, or @var{program} has multiple threads, most versions of @code{pidof} support the @code{-s} option to only return the first process ID. @subsubsection Multi-Process Mode for @code{gdbserver} @cindex @code{gdbserver}, multiple processes @cindex multiple processes with @code{gdbserver} When you connect to @code{gdbserver} using @code{target remote}, @code{gdbserver} debugs the specified program only once. When the program exits, or you detach from it, @value{GDBN} closes the connection and @code{gdbserver} exits. If you connect using @kbd{target extended-remote}, @code{gdbserver} enters multi-process mode. When the debugged program exits, or you detach from it, @value{GDBN} stays connected to @code{gdbserver} even though no program is running. The @code{run} and @code{attach} commands instruct @code{gdbserver} to run or attach to a new program. The @code{run} command uses @code{set remote exec-file} (@pxref{set remote exec-file}) to select the program to run. Command line arguments are supported, except for wildcard expansion and I/O redirection (@pxref{Arguments}). @cindex @option{--multi}, @code{gdbserver} option To start @code{gdbserver} without supplying an initial command to run or process ID to attach, use the @option{--multi} command line option. Then you can connect using @kbd{target extended-remote} and start the program you want to debug. In multi-process mode @code{gdbserver} does not automatically exit unless you use the option @option{--once}. You can terminate it by using @code{monitor exit} (@pxref{Monitor Commands for gdbserver}). Note that the conditions under which @code{gdbserver} terminates depend on how @value{GDBN} connects to it (@kbd{target remote} or @kbd{target extended-remote}). The @option{--multi} option to @code{gdbserver} has no influence on that. @subsubsection TCP port allocation lifecycle of @code{gdbserver} This section applies only when @code{gdbserver} is run to listen on a TCP port. @code{gdbserver} normally terminates after all of its debugged processes have terminated in @kbd{target remote} mode. On the other hand, for @kbd{target extended-remote}, @code{gdbserver} stays running even with no processes left. @value{GDBN} normally terminates the spawned debugged process on its exit, which normally also terminates @code{gdbserver} in the @kbd{target remote} mode. Therefore, when the connection drops unexpectedly, and @value{GDBN} cannot ask @code{gdbserver} to kill its debugged processes, @code{gdbserver} stays running even in the @kbd{target remote} mode. When @code{gdbserver} stays running, @value{GDBN} can connect to it again later. Such reconnecting is useful for features like @ref{disconnected tracing}. For completeness, at most one @value{GDBN} can be connected at a time. @cindex @option{--once}, @code{gdbserver} option By default, @code{gdbserver} keeps the listening TCP port open, so that additional connections are possible. However, if you start @code{gdbserver} with the @option{--once} option, it will stop listening for any further connection attempts after connecting to the first @value{GDBN} session. This means no further connections to @code{gdbserver} will be possible after the first one. It also means @code{gdbserver} will terminate after the first connection with remote @value{GDBN} has closed, even for unexpectedly closed connections and even in the @kbd{target extended-remote} mode. The @option{--once} option allows reusing the same port number for connecting to multiple instances of @code{gdbserver} running on the same host, since each instance closes its port after the first connection. @subsubsection Other Command-Line Arguments for @code{gdbserver} @cindex @option{--debug}, @code{gdbserver} option The @option{--debug} option tells @code{gdbserver} to display extra status information about the debugging process. @cindex @option{--remote-debug}, @code{gdbserver} option The @option{--remote-debug} option tells @code{gdbserver} to display remote protocol debug output. These options are intended for @code{gdbserver} development and for bug reports to the developers. @cindex @option{--wrapper}, @code{gdbserver} option The @option{--wrapper} option specifies a wrapper to launch programs for debugging. The option should be followed by the name of the wrapper, then any command-line arguments to pass to the wrapper, then @kbd{--} indicating the end of the wrapper arguments. @code{gdbserver} runs the specified wrapper program with a combined command line including the wrapper arguments, then the name of the program to debug, then any arguments to the program. The wrapper runs until it executes your program, and then @value{GDBN} gains control. You can use any program that eventually calls @code{execve} with its arguments as a wrapper. Several standard Unix utilities do this, e.g.@: @code{env} and @code{nohup}. Any Unix shell script ending with @code{exec "$@@"} will also work. For example, you can use @code{env} to pass an environment variable to the debugged program, without setting the variable in @code{gdbserver}'s environment: @smallexample $ gdbserver --wrapper env LD_PRELOAD=libtest.so -- :2222 ./testprog @end smallexample @subsection Connecting to @code{gdbserver} Run @value{GDBN} on the host system. First make sure you have the necessary symbol files. Load symbols for your application using the @code{file} command before you connect. Use @code{set sysroot} to locate target libraries (unless your @value{GDBN} was compiled with the correct sysroot using @code{--with-sysroot}). The symbol file and target libraries must exactly match the executable and libraries on the target, with one exception: the files on the host system should not be stripped, even if the files on the target system are. Mismatched or missing files will lead to confusing results during debugging. On @sc{gnu}/Linux targets, mismatched or missing files may also prevent @code{gdbserver} from debugging multi-threaded programs. Connect to your target (@pxref{Connecting,,Connecting to a Remote Target}). For TCP connections, you must start up @code{gdbserver} prior to using the @code{target remote} command. Otherwise you may get an error whose text depends on the host system, but which usually looks something like @samp{Connection refused}. Don't use the @code{load} command in @value{GDBN} when using @code{gdbserver}, since the program is already on the target. @subsection Monitor Commands for @code{gdbserver} @cindex monitor commands, for @code{gdbserver} @anchor{Monitor Commands for gdbserver} During a @value{GDBN} session using @code{gdbserver}, you can use the @code{monitor} command to send special requests to @code{gdbserver}. Here are the available commands. @table @code @item monitor help List the available monitor commands. @item monitor set debug 0 @itemx monitor set debug 1 Disable or enable general debugging messages. @item monitor set remote-debug 0 @itemx monitor set remote-debug 1 Disable or enable specific debugging messages associated with the remote protocol (@pxref{Remote Protocol}). @item monitor set libthread-db-search-path [PATH] @cindex gdbserver, search path for @code{libthread_db} When this command is issued, @var{path} is a colon-separated list of directories to search for @code{libthread_db} (@pxref{Threads,,set libthread-db-search-path}). If you omit @var{path}, @samp{libthread-db-search-path} will be reset to its default value. The special entry @samp{$pdir} for @samp{libthread-db-search-path} is not supported in @code{gdbserver}. @item monitor exit Tell gdbserver to exit immediately. This command should be followed by @code{disconnect} to close the debugging session. @code{gdbserver} will detach from any attached processes and kill any processes it created. Use @code{monitor exit} to terminate @code{gdbserver} at the end of a multi-process mode debug session. @end table @subsection Tracepoints support in @code{gdbserver} @cindex tracepoints support in @code{gdbserver} On some targets, @code{gdbserver} supports tracepoints, fast tracepoints and static tracepoints. For fast or static tracepoints to work, a special library called the @dfn{in-process agent} (IPA), must be loaded in the inferior process. This library is built and distributed as an integral part of @code{gdbserver}. In addition, support for static tracepoints requires building the in-process agent library with static tracepoints support. At present, the UST (LTTng Userspace Tracer, @url{http://lttng.org/ust}) tracing engine is supported. This support is automatically available if UST development headers are found in the standard include path when @code{gdbserver} is built, or if @code{gdbserver} was explicitly configured using @option{--with-ust} to point at such headers. You can explicitly disable the support using @option{--with-ust=no}. There are several ways to load the in-process agent in your program: @table @code @item Specifying it as dependency at link time You can link your program dynamically with the in-process agent library. On most systems, this is accomplished by adding @code{-linproctrace} to the link command. @item Using the system's preloading mechanisms You can force loading the in-process agent at startup time by using your system's support for preloading shared libraries. Many Unixes support the concept of preloading user defined libraries. In most cases, you do that by specifying @code{LD_PRELOAD=libinproctrace.so} in the environment. See also the description of @code{gdbserver}'s @option{--wrapper} command line option. @item Using @value{GDBN} to force loading the agent at run time On some systems, you can force the inferior to load a shared library, by calling a dynamic loader function in the inferior that takes care of dynamically looking up and loading a shared library. On most Unix systems, the function is @code{dlopen}. You'll use the @code{call} command for that. For example: @smallexample (@value{GDBP}) call dlopen ("libinproctrace.so", ...) @end smallexample Note that on most Unix systems, for the @code{dlopen} function to be available, the program needs to be linked with @code{-ldl}. @end table On systems that have a userspace dynamic loader, like most Unix systems, when you connect to @code{gdbserver} using @code{target remote}, you'll find that the program is stopped at the dynamic loader's entry point, and no shared library has been loaded in the program's address space yet, including the in-process agent. In that case, before being able to use any of the fast or static tracepoints features, you need to let the loader run and load the shared libraries. The simplest way to do that is to run the program to the main procedure. E.g., if debugging a C or C@t{++} program, start @code{gdbserver} like so: @smallexample $ gdbserver :9999 myprogram @end smallexample Start GDB and connect to @code{gdbserver} like so, and run to main: @smallexample $ gdb myprogram (@value{GDBP}) target remote myhost:9999 0x00007f215893ba60 in ?? () from /lib64/ld-linux-x86-64.so.2 (@value{GDBP}) b main (@value{GDBP}) continue @end smallexample The in-process tracing agent library should now be loaded into the process; you can confirm it with the @code{info sharedlibrary} command, which will list @file{libinproctrace.so} as loaded in the process. You are now ready to install fast tracepoints, list static tracepoint markers, probe static tracepoints markers, and start tracing. @node Remote Configuration @section Remote Configuration @kindex set remote @kindex show remote This section documents the configuration options available when debugging remote programs. For the options related to the File I/O extensions of the remote protocol, see @ref{system, system-call-allowed}. @table @code @item set remoteaddresssize @var{bits} @cindex address size for remote targets @cindex bits in remote address Set the maximum size of address in a memory packet to the specified number of bits. @value{GDBN} will mask off the address bits above that number, when it passes addresses to the remote target. The default value is the number of bits in the target's address. @item show remoteaddresssize Show the current value of remote address size in bits. @item set remotebaud @var{n} @cindex baud rate for remote targets Set the baud rate for the remote serial I/O to @var{n} baud. The value is used to set the speed of the serial port used for debugging remote targets. @item show remotebaud Show the current speed of the remote connection. @item set remotebreak @cindex interrupt remote programs @cindex BREAK signal instead of Ctrl-C @anchor{set remotebreak} If set to on, @value{GDBN} sends a @code{BREAK} signal to the remote when you type @kbd{Ctrl-c} to interrupt the program running on the remote. If set to off, @value{GDBN} sends the @samp{Ctrl-C} character instead. The default is off, since most remote systems expect to see @samp{Ctrl-C} as the interrupt signal. @item show remotebreak Show whether @value{GDBN} sends @code{BREAK} or @samp{Ctrl-C} to interrupt the remote program. @item set remoteflow on @itemx set remoteflow off @kindex set remoteflow Enable or disable hardware flow control (@code{RTS}/@code{CTS}) on the serial port used to communicate to the remote target. @item show remoteflow @kindex show remoteflow Show the current setting of hardware flow control. @item set remotelogbase @var{base} Set the base (a.k.a.@: radix) of logging serial protocol communications to @var{base}. Supported values of @var{base} are: @code{ascii}, @code{octal}, and @code{hex}. The default is @code{ascii}. @item show remotelogbase Show the current setting of the radix for logging remote serial protocol. @item set remotelogfile @var{file} @cindex record serial communications on file Record remote serial communications on the named @var{file}. The default is not to record at all. @item show remotelogfile. Show the current setting of the file name on which to record the serial communications. @item set remotetimeout @var{num} @cindex timeout for serial communications @cindex remote timeout Set the timeout limit to wait for the remote target to respond to @var{num} seconds. The default is 2 seconds. @item show remotetimeout Show the current number of seconds to wait for the remote target responses. @cindex limit hardware breakpoints and watchpoints @cindex remote target, limit break- and watchpoints @anchor{set remote hardware-watchpoint-limit} @anchor{set remote hardware-breakpoint-limit} @item set remote hardware-watchpoint-limit @var{limit} @itemx set remote hardware-breakpoint-limit @var{limit} Restrict @value{GDBN} to using @var{limit} remote hardware breakpoint or watchpoints. A limit of -1, the default, is treated as unlimited. @cindex limit hardware watchpoints length @cindex remote target, limit watchpoints length @anchor{set remote hardware-watchpoint-length-limit} @item set remote hardware-watchpoint-length-limit @var{limit} Restrict @value{GDBN} to using @var{limit} bytes for the maximum length of a remote hardware watchpoint. A limit of -1, the default, is treated as unlimited. @item show remote hardware-watchpoint-length-limit Show the current limit (in bytes) of the maximum length of a remote hardware watchpoint. @item set remote exec-file @var{filename} @itemx show remote exec-file @anchor{set remote exec-file} @cindex executable file, for remote target Select the file used for @code{run} with @code{target extended-remote}. This should be set to a filename valid on the target system. If it is not set, the target will use a default filename (e.g.@: the last program run). @item set remote interrupt-sequence @cindex interrupt remote programs @cindex select Ctrl-C, BREAK or BREAK-g Allow the user to select one of @samp{Ctrl-C}, a @code{BREAK} or @samp{BREAK-g} as the sequence to the remote target in order to interrupt the execution. @samp{Ctrl-C} is a default. Some system prefers @code{BREAK} which is high level of serial line for some certain time. Linux kernel prefers @samp{BREAK-g}, a.k.a Magic SysRq g. It is @code{BREAK} signal followed by character @code{g}. @item show interrupt-sequence Show which of @samp{Ctrl-C}, @code{BREAK} or @code{BREAK-g} is sent by @value{GDBN} to interrupt the remote program. @code{BREAK-g} is BREAK signal followed by @code{g} and also known as Magic SysRq g. @item set remote interrupt-on-connect @cindex send interrupt-sequence on start Specify whether interrupt-sequence is sent to remote target when @value{GDBN} connects to it. This is mostly needed when you debug Linux kernel. Linux kernel expects @code{BREAK} followed by @code{g} which is known as Magic SysRq g in order to connect @value{GDBN}. @item show interrupt-on-connect Show whether interrupt-sequence is sent to remote target when @value{GDBN} connects to it. @kindex set tcp @kindex show tcp @item set tcp auto-retry on @cindex auto-retry, for remote TCP target Enable auto-retry for remote TCP connections. This is useful if the remote debugging agent is launched in parallel with @value{GDBN}; there is a race condition because the agent may not become ready to accept the connection before @value{GDBN} attempts to connect. When auto-retry is enabled, if the initial attempt to connect fails, @value{GDBN} reattempts to establish the connection using the timeout specified by @code{set tcp connect-timeout}. @item set tcp auto-retry off Do not auto-retry failed TCP connections. @item show tcp auto-retry Show the current auto-retry setting. @item set tcp connect-timeout @var{seconds} @cindex connection timeout, for remote TCP target @cindex timeout, for remote target connection Set the timeout for establishing a TCP connection to the remote target to @var{seconds}. The timeout affects both polling to retry failed connections (enabled by @code{set tcp auto-retry on}) and waiting for connections that are merely slow to complete, and represents an approximate cumulative value. @item show tcp connect-timeout Show the current connection timeout setting. @end table @cindex remote packets, enabling and disabling The @value{GDBN} remote protocol autodetects the packets supported by your debugging stub. If you need to override the autodetection, you can use these commands to enable or disable individual packets. Each packet can be set to @samp{on} (the remote target supports this packet), @samp{off} (the remote target does not support this packet), or @samp{auto} (detect remote target support for this packet). They all default to @samp{auto}. For more information about each packet, see @ref{Remote Protocol}. During normal use, you should not have to use any of these commands. If you do, that may be a bug in your remote debugging stub, or a bug in @value{GDBN}. You may want to report the problem to the @value{GDBN} developers. For each packet @var{name}, the command to enable or disable the packet is @code{set remote @var{name}-packet}. The available settings are: @multitable @columnfractions 0.28 0.32 0.25 @item Command Name @tab Remote Packet @tab Related Features @item @code{fetch-register} @tab @code{p} @tab @code{info registers} @item @code{set-register} @tab @code{P} @tab @code{set} @item @code{binary-download} @tab @code{X} @tab @code{load}, @code{set} @item @code{read-aux-vector} @tab @code{qXfer:auxv:read} @tab @code{info auxv} @item @code{symbol-lookup} @tab @code{qSymbol} @tab Detecting multiple threads @item @code{attach} @tab @code{vAttach} @tab @code{attach} @item @code{verbose-resume} @tab @code{vCont} @tab Stepping or resuming multiple threads @item @code{run} @tab @code{vRun} @tab @code{run} @item @code{software-breakpoint} @tab @code{Z0} @tab @code{break} @item @code{hardware-breakpoint} @tab @code{Z1} @tab @code{hbreak} @item @code{write-watchpoint} @tab @code{Z2} @tab @code{watch} @item @code{read-watchpoint} @tab @code{Z3} @tab @code{rwatch} @item @code{access-watchpoint} @tab @code{Z4} @tab @code{awatch} @item @code{target-features} @tab @code{qXfer:features:read} @tab @code{set architecture} @item @code{library-info} @tab @code{qXfer:libraries:read} @tab @code{info sharedlibrary} @item @code{memory-map} @tab @code{qXfer:memory-map:read} @tab @code{info mem} @item @code{read-sdata-object} @tab @code{qXfer:sdata:read} @tab @code{print $_sdata} @item @code{read-spu-object} @tab @code{qXfer:spu:read} @tab @code{info spu} @item @code{write-spu-object} @tab @code{qXfer:spu:write} @tab @code{info spu} @item @code{read-siginfo-object} @tab @code{qXfer:siginfo:read} @tab @code{print $_siginfo} @item @code{write-siginfo-object} @tab @code{qXfer:siginfo:write} @tab @code{set $_siginfo} @item @code{threads} @tab @code{qXfer:threads:read} @tab @code{info threads} @item @code{get-thread-local-@*storage-address} @tab @code{qGetTLSAddr} @tab Displaying @code{__thread} variables @item @code{get-thread-information-block-address} @tab @code{qGetTIBAddr} @tab Display MS-Windows Thread Information Block. @item @code{search-memory} @tab @code{qSearch:memory} @tab @code{find} @item @code{supported-packets} @tab @code{qSupported} @tab Remote communications parameters @item @code{pass-signals} @tab @code{QPassSignals} @tab @code{handle @var{signal}} @item @code{program-signals} @tab @code{QProgramSignals} @tab @code{handle @var{signal}} @item @code{hostio-close-packet} @tab @code{vFile:close} @tab @code{remote get}, @code{remote put} @item @code{hostio-open-packet} @tab @code{vFile:open} @tab @code{remote get}, @code{remote put} @item @code{hostio-pread-packet} @tab @code{vFile:pread} @tab @code{remote get}, @code{remote put} @item @code{hostio-pwrite-packet} @tab @code{vFile:pwrite} @tab @code{remote get}, @code{remote put} @item @code{hostio-unlink-packet} @tab @code{vFile:unlink} @tab @code{remote delete} @item @code{hostio-readlink-packet} @tab @code{vFile:readlink} @tab Host I/O @item @code{noack-packet} @tab @code{QStartNoAckMode} @tab Packet acknowledgment @item @code{osdata} @tab @code{qXfer:osdata:read} @tab @code{info os} @item @code{query-attached} @tab @code{qAttached} @tab Querying remote process attach state. @item @code{trace-buffer-size} @tab @code{QTBuffer:size} @tab @code{set trace-buffer-size} @item @code{traceframe-info} @tab @code{qXfer:traceframe-info:read} @tab Traceframe info @item @code{install-in-trace} @tab @code{InstallInTrace} @tab Install tracepoint in tracing @item @code{disable-randomization} @tab @code{QDisableRandomization} @tab @code{set disable-randomization} @item @code{conditional-breakpoints-packet} @tab @code{Z0 and Z1} @tab @code{Support for target-side breakpoint condition evaluation} @end multitable @node Remote Stub @section Implementing a Remote Stub @cindex debugging stub, example @cindex remote stub, example @cindex stub example, remote debugging The stub files provided with @value{GDBN} implement the target side of the communication protocol, and the @value{GDBN} side is implemented in the @value{GDBN} source file @file{remote.c}. Normally, you can simply allow these subroutines to communicate, and ignore the details. (If you're implementing your own stub file, you can still ignore the details: start with one of the existing stub files. @file{sparc-stub.c} is the best organized, and therefore the easiest to read.) @cindex remote serial debugging, overview To debug a program running on another machine (the debugging @dfn{target} machine), you must first arrange for all the usual prerequisites for the program to run by itself. For example, for a C program, you need: @enumerate @item A startup routine to set up the C runtime environment; these usually have a name like @file{crt0}. The startup routine may be supplied by your hardware supplier, or you may have to write your own. @item A C subroutine library to support your program's subroutine calls, notably managing input and output. @item A way of getting your program to the other machine---for example, a download program. These are often supplied by the hardware manufacturer, but you may have to write your own from hardware documentation. @end enumerate The next step is to arrange for your program to use a serial port to communicate with the machine where @value{GDBN} is running (the @dfn{host} machine). In general terms, the scheme looks like this: @table @emph @item On the host, @value{GDBN} already understands how to use this protocol; when everything else is set up, you can simply use the @samp{target remote} command (@pxref{Targets,,Specifying a Debugging Target}). @item On the target, you must link with your program a few special-purpose subroutines that implement the @value{GDBN} remote serial protocol. The file containing these subroutines is called a @dfn{debugging stub}. On certain remote targets, you can use an auxiliary program @code{gdbserver} instead of linking a stub into your program. @xref{Server,,Using the @code{gdbserver} Program}, for details. @end table The debugging stub is specific to the architecture of the remote machine; for example, use @file{sparc-stub.c} to debug programs on @sc{sparc} boards. @cindex remote serial stub list These working remote stubs are distributed with @value{GDBN}: @table @code @item i386-stub.c @cindex @file{i386-stub.c} @cindex Intel @cindex i386 For Intel 386 and compatible architectures. @item m68k-stub.c @cindex @file{m68k-stub.c} @cindex Motorola 680x0 @cindex m680x0 For Motorola 680x0 architectures. @item sh-stub.c @cindex @file{sh-stub.c} @cindex Renesas @cindex SH For Renesas SH architectures. @item sparc-stub.c @cindex @file{sparc-stub.c} @cindex Sparc For @sc{sparc} architectures. @item sparcl-stub.c @cindex @file{sparcl-stub.c} @cindex Fujitsu @cindex SparcLite For Fujitsu @sc{sparclite} architectures. @end table The @file{README} file in the @value{GDBN} distribution may list other recently added stubs. @menu * Stub Contents:: What the stub can do for you * Bootstrapping:: What you must do for the stub * Debug Session:: Putting it all together @end menu @node Stub Contents @subsection What the Stub Can Do for You @cindex remote serial stub The debugging stub for your architecture supplies these three subroutines: @table @code @item set_debug_traps @findex set_debug_traps @cindex remote serial stub, initialization This routine arranges for @code{handle_exception} to run when your program stops. You must call this subroutine explicitly in your program's startup code. @item handle_exception @findex handle_exception @cindex remote serial stub, main routine This is the central workhorse, but your program never calls it explicitly---the setup code arranges for @code{handle_exception} to run when a trap is triggered. @code{handle_exception} takes control when your program stops during execution (for example, on a breakpoint), and mediates communications with @value{GDBN} on the host machine. This is where the communications protocol is implemented; @code{handle_exception} acts as the @value{GDBN} representative on the target machine. It begins by sending summary information on the state of your program, then continues to execute, retrieving and transmitting any information @value{GDBN} needs, until you execute a @value{GDBN} command that makes your program resume; at that point, @code{handle_exception} returns control to your own code on the target machine. @item breakpoint @cindex @code{breakpoint} subroutine, remote Use this auxiliary subroutine to make your program contain a breakpoint. Depending on the particular situation, this may be the only way for @value{GDBN} to get control. For instance, if your target machine has some sort of interrupt button, you won't need to call this; pressing the interrupt button transfers control to @code{handle_exception}---in effect, to @value{GDBN}. On some machines, simply receiving characters on the serial port may also trigger a trap; again, in that situation, you don't need to call @code{breakpoint} from your own program---simply running @samp{target remote} from the host @value{GDBN} session gets control. Call @code{breakpoint} if none of these is true, or if you simply want to make certain your program stops at a predetermined point for the start of your debugging session. @end table @node Bootstrapping @subsection What You Must Do for the Stub @cindex remote stub, support routines The debugging stubs that come with @value{GDBN} are set up for a particular chip architecture, but they have no information about the rest of your debugging target machine. First of all you need to tell the stub how to communicate with the serial port. @table @code @item int getDebugChar() @findex getDebugChar Write this subroutine to read a single character from the serial port. It may be identical to @code{getchar} for your target system; a different name is used to allow you to distinguish the two if you wish. @item void putDebugChar(int) @findex putDebugChar Write this subroutine to write a single character to the serial port. It may be identical to @code{putchar} for your target system; a different name is used to allow you to distinguish the two if you wish. @end table @cindex control C, and remote debugging @cindex interrupting remote targets If you want @value{GDBN} to be able to stop your program while it is running, you need to use an interrupt-driven serial driver, and arrange for it to stop when it receives a @code{^C} (@samp{\003}, the control-C character). That is the character which @value{GDBN} uses to tell the remote system to stop. Getting the debugging target to return the proper status to @value{GDBN} probably requires changes to the standard stub; one quick and dirty way is to just execute a breakpoint instruction (the ``dirty'' part is that @value{GDBN} reports a @code{SIGTRAP} instead of a @code{SIGINT}). Other routines you need to supply are: @table @code @item void exceptionHandler (int @var{exception_number}, void *@var{exception_address}) @findex exceptionHandler Write this function to install @var{exception_address} in the exception handling tables. You need to do this because the stub does not have any way of knowing what the exception handling tables on your target system are like (for example, the processor's table might be in @sc{rom}, containing entries which point to a table in @sc{ram}). @var{exception_number} is the exception number which should be changed; its meaning is architecture-dependent (for example, different numbers might represent divide by zero, misaligned access, etc). When this exception occurs, control should be transferred directly to @var{exception_address}, and the processor state (stack, registers, and so on) should be just as it is when a processor exception occurs. So if you want to use a jump instruction to reach @var{exception_address}, it should be a simple jump, not a jump to subroutine. For the 386, @var{exception_address} should be installed as an interrupt gate so that interrupts are masked while the handler runs. The gate should be at privilege level 0 (the most privileged level). The @sc{sparc} and 68k stubs are able to mask interrupts themselves without help from @code{exceptionHandler}. @item void flush_i_cache() @findex flush_i_cache On @sc{sparc} and @sc{sparclite} only, write this subroutine to flush the instruction cache, if any, on your target machine. If there is no instruction cache, this subroutine may be a no-op. On target machines that have instruction caches, @value{GDBN} requires this function to make certain that the state of your program is stable. @end table @noindent You must also make sure this library routine is available: @table @code @item void *memset(void *, int, int) @findex memset This is the standard library function @code{memset} that sets an area of memory to a known value. If you have one of the free versions of @code{libc.a}, @code{memset} can be found there; otherwise, you must either obtain it from your hardware manufacturer, or write your own. @end table If you do not use the GNU C compiler, you may need other standard library subroutines as well; this varies from one stub to another, but in general the stubs are likely to use any of the common library subroutines which @code{@value{NGCC}} generates as inline code. @node Debug Session @subsection Putting it All Together @cindex remote serial debugging summary In summary, when your program is ready to debug, you must follow these steps. @enumerate @item Make sure you have defined the supporting low-level routines (@pxref{Bootstrapping,,What You Must Do for the Stub}): @display @code{getDebugChar}, @code{putDebugChar}, @code{flush_i_cache}, @code{memset}, @code{exceptionHandler}. @end display @item Insert these lines in your program's startup code, before the main procedure is called: @smallexample set_debug_traps(); breakpoint(); @end smallexample On some machines, when a breakpoint trap is raised, the hardware automatically makes the PC point to the instruction after the breakpoint. If your machine doesn't do that, you may need to adjust @code{handle_exception} to arrange for it to return to the instruction after the breakpoint on this first invocation, so that your program doesn't keep hitting the initial breakpoint instead of making progress. @item For the 680x0 stub only, you need to provide a variable called @code{exceptionHook}. Normally you just use: @smallexample void (*exceptionHook)() = 0; @end smallexample @noindent but if before calling @code{set_debug_traps}, you set it to point to a function in your program, that function is called when @code{@value{GDBN}} continues after stopping on a trap (for example, bus error). The function indicated by @code{exceptionHook} is called with one parameter: an @code{int} which is the exception number. @item Compile and link together: your program, the @value{GDBN} debugging stub for your target architecture, and the supporting subroutines. @item Make sure you have a serial connection between your target machine and the @value{GDBN} host, and identify the serial port on the host. @item @c The "remote" target now provides a `load' command, so we should @c document that. FIXME. Download your program to your target machine (or get it there by whatever means the manufacturer provides), and start it. @item Start @value{GDBN} on the host, and connect to the target (@pxref{Connecting,,Connecting to a Remote Target}). @end enumerate @node Configurations @chapter Configuration-Specific Information While nearly all @value{GDBN} commands are available for all native and cross versions of the debugger, there are some exceptions. This chapter describes things that are only available in certain configurations. There are three major categories of configurations: native configurations, where the host and target are the same, embedded operating system configurations, which are usually the same for several different processor architectures, and bare embedded processors, which are quite different from each other. @menu * Native:: * Embedded OS:: * Embedded Processors:: * Architectures:: @end menu @node Native @section Native This section describes details specific to particular native configurations. @menu * HP-UX:: HP-UX * BSD libkvm Interface:: Debugging BSD kernel memory images * SVR4 Process Information:: SVR4 process information * DJGPP Native:: Features specific to the DJGPP port * Cygwin Native:: Features specific to the Cygwin port * Hurd Native:: Features specific to @sc{gnu} Hurd * Darwin:: Features specific to Darwin @end menu @node HP-UX @subsection HP-UX On HP-UX systems, if you refer to a function or variable name that begins with a dollar sign, @value{GDBN} searches for a user or system name first, before it searches for a convenience variable. @node BSD libkvm Interface @subsection BSD libkvm Interface @cindex libkvm @cindex kernel memory image @cindex kernel crash dump BSD-derived systems (FreeBSD/NetBSD/OpenBSD) have a kernel memory interface that provides a uniform interface for accessing kernel virtual memory images, including live systems and crash dumps. @value{GDBN} uses this interface to allow you to debug live kernels and kernel crash dumps on many native BSD configurations. This is implemented as a special @code{kvm} debugging target. For debugging a live system, load the currently running kernel into @value{GDBN} and connect to the @code{kvm} target: @smallexample (@value{GDBP}) @b{target kvm} @end smallexample For debugging crash dumps, provide the file name of the crash dump as an argument: @smallexample (@value{GDBP}) @b{target kvm /var/crash/bsd.0} @end smallexample Once connected to the @code{kvm} target, the following commands are available: @table @code @kindex kvm @item kvm pcb Set current context from the @dfn{Process Control Block} (PCB) address. @item kvm proc Set current context from proc address. This command isn't available on modern FreeBSD systems. @end table @node SVR4 Process Information @subsection SVR4 Process Information @cindex /proc @cindex examine process image @cindex process info via @file{/proc} Many versions of SVR4 and compatible systems provide a facility called @samp{/proc} that can be used to examine the image of a running process using file-system subroutines. If @value{GDBN} is configured for an operating system with this facility, the command @code{info proc} is available to report information about the process running your program, or about any process running on your system. This includes, as of this writing, @sc{gnu}/Linux, OSF/1 (Digital Unix), Solaris, and Irix, but not HP-UX, for example. This command may also work on core files that were created on a system that has the @samp{/proc} facility. @table @code @kindex info proc @cindex process ID @item info proc @itemx info proc @var{process-id} Summarize available information about any running process. If a process ID is specified by @var{process-id}, display information about that process; otherwise display information about the program being debugged. The summary includes the debugged process ID, the command line used to invoke it, its current working directory, and its executable file's absolute file name. On some systems, @var{process-id} can be of the form @samp{[@var{pid}]/@var{tid}} which specifies a certain thread ID within a process. If the optional @var{pid} part is missing, it means a thread from the process being debugged (the leading @samp{/} still needs to be present, or else @value{GDBN} will interpret the number as a process ID rather than a thread ID). @item info proc cmdline @cindex info proc cmdline Show the original command line of the process. This command is specific to @sc{gnu}/Linux. @item info proc cwd @cindex info proc cwd Show the current working directory of the process. This command is specific to @sc{gnu}/Linux. @item info proc exe @cindex info proc exe Show the name of executable of the process. This command is specific to @sc{gnu}/Linux. @item info proc mappings @cindex memory address space mappings Report the memory address space ranges accessible in the program, with information on whether the process has read, write, or execute access rights to each range. On @sc{gnu}/Linux systems, each memory range includes the object file which is mapped to that range, instead of the memory access rights to that range. @item info proc stat @itemx info proc status @cindex process detailed status information These subcommands are specific to @sc{gnu}/Linux systems. They show the process-related information, including the user ID and group ID; how many threads are there in the process; its virtual memory usage; the signals that are pending, blocked, and ignored; its TTY; its consumption of system and user time; its stack size; its @samp{nice} value; etc. For more information, see the @samp{proc} man page (type @kbd{man 5 proc} from your shell prompt). @item info proc all Show all the information about the process described under all of the above @code{info proc} subcommands. @ignore @comment These sub-options of 'info proc' were not included when @comment procfs.c was re-written. Keep their descriptions around @comment against the day when someone finds the time to put them back in. @kindex info proc times @item info proc times Starting time, user CPU time, and system CPU time for your program and its children. @kindex info proc id @item info proc id Report on the process IDs related to your program: its own process ID, the ID of its parent, the process group ID, and the session ID. @end ignore @item set procfs-trace @kindex set procfs-trace @cindex @code{procfs} API calls This command enables and disables tracing of @code{procfs} API calls. @item show procfs-trace @kindex show procfs-trace Show the current state of @code{procfs} API call tracing. @item set procfs-file @var{file} @kindex set procfs-file Tell @value{GDBN} to write @code{procfs} API trace to the named @var{file}. @value{GDBN} appends the trace info to the previous contents of the file. The default is to display the trace on the standard output. @item show procfs-file @kindex show procfs-file Show the file to which @code{procfs} API trace is written. @item proc-trace-entry @itemx proc-trace-exit @itemx proc-untrace-entry @itemx proc-untrace-exit @kindex proc-trace-entry @kindex proc-trace-exit @kindex proc-untrace-entry @kindex proc-untrace-exit These commands enable and disable tracing of entries into and exits from the @code{syscall} interface. @item info pidlist @kindex info pidlist @cindex process list, QNX Neutrino For QNX Neutrino only, this command displays the list of all the processes and all the threads within each process. @item info meminfo @kindex info meminfo @cindex mapinfo list, QNX Neutrino For QNX Neutrino only, this command displays the list of all mapinfos. @end table @node DJGPP Native @subsection Features for Debugging @sc{djgpp} Programs @cindex @sc{djgpp} debugging @cindex native @sc{djgpp} debugging @cindex MS-DOS-specific commands @cindex DPMI @sc{djgpp} is a port of the @sc{gnu} development tools to MS-DOS and MS-Windows. @sc{djgpp} programs are 32-bit protected-mode programs that use the @dfn{DPMI} (DOS Protected-Mode Interface) API to run on top of real-mode DOS systems and their emulations. @value{GDBN} supports native debugging of @sc{djgpp} programs, and defines a few commands specific to the @sc{djgpp} port. This subsection describes those commands. @table @code @kindex info dos @item info dos This is a prefix of @sc{djgpp}-specific commands which print information about the target system and important OS structures. @kindex sysinfo @cindex MS-DOS system info @cindex free memory information (MS-DOS) @item info dos sysinfo This command displays assorted information about the underlying platform: the CPU type and features, the OS version and flavor, the DPMI version, and the available conventional and DPMI memory. @cindex GDT @cindex LDT @cindex IDT @cindex segment descriptor tables @cindex descriptor tables display @item info dos gdt @itemx info dos ldt @itemx info dos idt These 3 commands display entries from, respectively, Global, Local, and Interrupt Descriptor Tables (GDT, LDT, and IDT). The descriptor tables are data structures which store a descriptor for each segment that is currently in use. The segment's selector is an index into a descriptor table; the table entry for that index holds the descriptor's base address and limit, and its attributes and access rights. A typical @sc{djgpp} program uses 3 segments: a code segment, a data segment (used for both data and the stack), and a DOS segment (which allows access to DOS/BIOS data structures and absolute addresses in conventional memory). However, the DPMI host will usually define additional segments in order to support the DPMI environment. @cindex garbled pointers These commands allow to display entries from the descriptor tables. Without an argument, all entries from the specified table are displayed. An argument, which should be an integer expression, means display a single entry whose index is given by the argument. For example, here's a convenient way to display information about the debugged program's data segment: @smallexample @exdent @code{(@value{GDBP}) info dos ldt $ds} @exdent @code{0x13f: base=0x11970000 limit=0x0009ffff 32-Bit Data (Read/Write, Exp-up)} @end smallexample @noindent This comes in handy when you want to see whether a pointer is outside the data segment's limit (i.e.@: @dfn{garbled}). @cindex page tables display (MS-DOS) @item info dos pde @itemx info dos pte These two commands display entries from, respectively, the Page Directory and the Page Tables. Page Directories and Page Tables are data structures which control how virtual memory addresses are mapped into physical addresses. A Page Table includes an entry for every page of memory that is mapped into the program's address space; there may be several Page Tables, each one holding up to 4096 entries. A Page Directory has up to 4096 entries, one each for every Page Table that is currently in use. Without an argument, @kbd{info dos pde} displays the entire Page Directory, and @kbd{info dos pte} displays all the entries in all of the Page Tables. An argument, an integer expression, given to the @kbd{info dos pde} command means display only that entry from the Page Directory table. An argument given to the @kbd{info dos pte} command means display entries from a single Page Table, the one pointed to by the specified entry in the Page Directory. @cindex direct memory access (DMA) on MS-DOS These commands are useful when your program uses @dfn{DMA} (Direct Memory Access), which needs physical addresses to program the DMA controller. These commands are supported only with some DPMI servers. @cindex physical address from linear address @item info dos address-pte @var{addr} This command displays the Page Table entry for a specified linear address. The argument @var{addr} is a linear address which should already have the appropriate segment's base address added to it, because this command accepts addresses which may belong to @emph{any} segment. For example, here's how to display the Page Table entry for the page where a variable @code{i} is stored: @smallexample @exdent @code{(@value{GDBP}) info dos address-pte __djgpp_base_address + (char *)&i} @exdent @code{Page Table entry for address 0x11a00d30:} @exdent @code{Base=0x02698000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0xd30} @end smallexample @noindent This says that @code{i} is stored at offset @code{0xd30} from the page whose physical base address is @code{0x02698000}, and shows all the attributes of that page. Note that you must cast the addresses of variables to a @code{char *}, since otherwise the value of @code{__djgpp_base_address}, the base address of all variables and functions in a @sc{djgpp} program, will be added using the rules of C pointer arithmetics: if @code{i} is declared an @code{int}, @value{GDBN} will add 4 times the value of @code{__djgpp_base_address} to the address of @code{i}. Here's another example, it displays the Page Table entry for the transfer buffer: @smallexample @exdent @code{(@value{GDBP}) info dos address-pte *((unsigned *)&_go32_info_block + 3)} @exdent @code{Page Table entry for address 0x29110:} @exdent @code{Base=0x00029000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0x110} @end smallexample @noindent (The @code{+ 3} offset is because the transfer buffer's address is the 3rd member of the @code{_go32_info_block} structure.) The output clearly shows that this DPMI server maps the addresses in conventional memory 1:1, i.e.@: the physical (@code{0x00029000} + @code{0x110}) and linear (@code{0x29110}) addresses are identical. This command is supported only with some DPMI servers. @end table @cindex DOS serial data link, remote debugging In addition to native debugging, the DJGPP port supports remote debugging via a serial data link. The following commands are specific to remote serial debugging in the DJGPP port of @value{GDBN}. @table @code @kindex set com1base @kindex set com1irq @kindex set com2base @kindex set com2irq @kindex set com3base @kindex set com3irq @kindex set com4base @kindex set com4irq @item set com1base @var{addr} This command sets the base I/O port address of the @file{COM1} serial port. @item set com1irq @var{irq} This command sets the @dfn{Interrupt Request} (@code{IRQ}) line to use for the @file{COM1} serial port. There are similar commands @samp{set com2base}, @samp{set com3irq}, etc.@: for setting the port address and the @code{IRQ} lines for the other 3 COM ports. @kindex show com1base @kindex show com1irq @kindex show com2base @kindex show com2irq @kindex show com3base @kindex show com3irq @kindex show com4base @kindex show com4irq The related commands @samp{show com1base}, @samp{show com1irq} etc.@: display the current settings of the base address and the @code{IRQ} lines used by the COM ports. @item info serial @kindex info serial @cindex DOS serial port status This command prints the status of the 4 DOS serial ports. For each port, it prints whether it's active or not, its I/O base address and IRQ number, whether it uses a 16550-style FIFO, its baudrate, and the counts of various errors encountered so far. @end table @node Cygwin Native @subsection Features for Debugging MS Windows PE Executables @cindex MS Windows debugging @cindex native Cygwin debugging @cindex Cygwin-specific commands @value{GDBN} supports native debugging of MS Windows programs, including DLLs with and without symbolic debugging information. @cindex Ctrl-BREAK, MS-Windows @cindex interrupt debuggee on MS-Windows MS-Windows programs that call @code{SetConsoleMode} to switch off the special meaning of the @samp{Ctrl-C} keystroke cannot be interrupted by typing @kbd{C-c}. For this reason, @value{GDBN} on MS-Windows supports @kbd{C-@key{BREAK}} as an alternative interrupt key sequence, which can be used to interrupt the debuggee even if it ignores @kbd{C-c}. There are various additional Cygwin-specific commands, described in this section. Working with DLLs that have no debugging symbols is described in @ref{Non-debug DLL Symbols}. @table @code @kindex info w32 @item info w32 This is a prefix of MS Windows-specific commands which print information about the target system and important OS structures. @item info w32 selector This command displays information returned by the Win32 API @code{GetThreadSelectorEntry} function. It takes an optional argument that is evaluated to a long value to give the information about this given selector. Without argument, this command displays information about the six segment registers. @item info w32 thread-information-block This command displays thread specific information stored in the Thread Information Block (readable on the X86 CPU family using @code{$fs} selector for 32-bit programs and @code{$gs} for 64-bit programs). @kindex info dll @item info dll This is a Cygwin-specific alias of @code{info shared}. @kindex dll-symbols @item dll-symbols This command loads symbols from a dll similarly to add-sym command but without the need to specify a base address. @kindex set cygwin-exceptions @cindex debugging the Cygwin DLL @cindex Cygwin DLL, debugging @item set cygwin-exceptions @var{mode} If @var{mode} is @code{on}, @value{GDBN} will break on exceptions that happen inside the Cygwin DLL. If @var{mode} is @code{off}, @value{GDBN} will delay recognition of exceptions, and may ignore some exceptions which seem to be caused by internal Cygwin DLL ``bookkeeping''. This option is meant primarily for debugging the Cygwin DLL itself; the default value is @code{off} to avoid annoying @value{GDBN} users with false @code{SIGSEGV} signals. @kindex show cygwin-exceptions @item show cygwin-exceptions Displays whether @value{GDBN} will break on exceptions that happen inside the Cygwin DLL itself. @kindex set new-console @item set new-console @var{mode} If @var{mode} is @code{on} the debuggee will be started in a new console on next start. If @var{mode} is @code{off}, the debuggee will be started in the same console as the debugger. @kindex show new-console @item show new-console Displays whether a new console is used when the debuggee is started. @kindex set new-group @item set new-group @var{mode} This boolean value controls whether the debuggee should start a new group or stay in the same group as the debugger. This affects the way the Windows OS handles @samp{Ctrl-C}. @kindex show new-group @item show new-group Displays current value of new-group boolean. @kindex set debugevents @item set debugevents This boolean value adds debug output concerning kernel events related to the debuggee seen by the debugger. This includes events that signal thread and process creation and exit, DLL loading and unloading, console interrupts, and debugging messages produced by the Windows @code{OutputDebugString} API call. @kindex set debugexec @item set debugexec This boolean value adds debug output concerning execute events (such as resume thread) seen by the debugger. @kindex set debugexceptions @item set debugexceptions This boolean value adds debug output concerning exceptions in the debuggee seen by the debugger. @kindex set debugmemory @item set debugmemory This boolean value adds debug output concerning debuggee memory reads and writes by the debugger. @kindex set shell @item set shell This boolean values specifies whether the debuggee is called via a shell or directly (default value is on). @kindex show shell @item show shell Displays if the debuggee will be started with a shell. @end table @menu * Non-debug DLL Symbols:: Support for DLLs without debugging symbols @end menu @node Non-debug DLL Symbols @subsubsection Support for DLLs without Debugging Symbols @cindex DLLs with no debugging symbols @cindex Minimal symbols and DLLs Very often on windows, some of the DLLs that your program relies on do not include symbolic debugging information (for example, @file{kernel32.dll}). When @value{GDBN} doesn't recognize any debugging symbols in a DLL, it relies on the minimal amount of symbolic information contained in the DLL's export table. This section describes working with such symbols, known internally to @value{GDBN} as ``minimal symbols''. Note that before the debugged program has started execution, no DLLs will have been loaded. The easiest way around this problem is simply to start the program --- either by setting a breakpoint or letting the program run once to completion. It is also possible to force @value{GDBN} to load a particular DLL before starting the executable --- see the shared library information in @ref{Files}, or the @code{dll-symbols} command in @ref{Cygwin Native}. Currently, explicitly loading symbols from a DLL with no debugging information will cause the symbol names to be duplicated in @value{GDBN}'s lookup table, which may adversely affect symbol lookup performance. @subsubsection DLL Name Prefixes In keeping with the naming conventions used by the Microsoft debugging tools, DLL export symbols are made available with a prefix based on the DLL name, for instance @code{KERNEL32!CreateFileA}. The plain name is also entered into the symbol table, so @code{CreateFileA} is often sufficient. In some cases there will be name clashes within a program (particularly if the executable itself includes full debugging symbols) necessitating the use of the fully qualified name when referring to the contents of the DLL. Use single-quotes around the name to avoid the exclamation mark (``!'') being interpreted as a language operator. Note that the internal name of the DLL may be all upper-case, even though the file name of the DLL is lower-case, or vice-versa. Since symbols within @value{GDBN} are @emph{case-sensitive} this may cause some confusion. If in doubt, try the @code{info functions} and @code{info variables} commands or even @code{maint print msymbols} (@pxref{Symbols}). Here's an example: @smallexample (@value{GDBP}) info function CreateFileA All functions matching regular expression "CreateFileA": Non-debugging symbols: 0x77e885f4 CreateFileA 0x77e885f4 KERNEL32!CreateFileA @end smallexample @smallexample (@value{GDBP}) info function ! All functions matching regular expression "!": Non-debugging symbols: 0x6100114c cygwin1!__assert 0x61004034 cygwin1!_dll_crt0@@0 0x61004240 cygwin1!dll_crt0(per_process *) [etc...] @end smallexample @subsubsection Working with Minimal Symbols Symbols extracted from a DLL's export table do not contain very much type information. All that @value{GDBN} can do is guess whether a symbol refers to a function or variable depending on the linker section that contains the symbol. Also note that the actual contents of the memory contained in a DLL are not available unless the program is running. This means that you cannot examine the contents of a variable or disassemble a function within a DLL without a running program. Variables are generally treated as pointers and dereferenced automatically. For this reason, it is often necessary to prefix a variable name with the address-of operator (``&'') and provide explicit type information in the command. Here's an example of the type of problem: @smallexample (@value{GDBP}) print 'cygwin1!__argv' $1 = 268572168 @end smallexample @smallexample (@value{GDBP}) x 'cygwin1!__argv' 0x10021610: "\230y\"" @end smallexample And two possible solutions: @smallexample (@value{GDBP}) print ((char **)'cygwin1!__argv')[0] $2 = 0x22fd98 "/cygdrive/c/mydirectory/myprogram" @end smallexample @smallexample (@value{GDBP}) x/2x &'cygwin1!__argv' 0x610c0aa8 : 0x10021608 0x00000000 (@value{GDBP}) x/x 0x10021608 0x10021608: 0x0022fd98 (@value{GDBP}) x/s 0x0022fd98 0x22fd98: "/cygdrive/c/mydirectory/myprogram" @end smallexample Setting a break point within a DLL is possible even before the program starts execution. However, under these circumstances, @value{GDBN} can't examine the initial instructions of the function in order to skip the function's frame set-up code. You can work around this by using ``*&'' to set the breakpoint at a raw memory address: @smallexample (@value{GDBP}) break *&'python22!PyOS_Readline' Breakpoint 1 at 0x1e04eff0 @end smallexample The author of these extensions is not entirely convinced that setting a break point within a shared DLL like @file{kernel32.dll} is completely safe. @node Hurd Native @subsection Commands Specific to @sc{gnu} Hurd Systems @cindex @sc{gnu} Hurd debugging This subsection describes @value{GDBN} commands specific to the @sc{gnu} Hurd native debugging. @table @code @item set signals @itemx set sigs @kindex set signals@r{, Hurd command} @kindex set sigs@r{, Hurd command} This command toggles the state of inferior signal interception by @value{GDBN}. Mach exceptions, such as breakpoint traps, are not affected by this command. @code{sigs} is a shorthand alias for @code{signals}. @item show signals @itemx show sigs @kindex show signals@r{, Hurd command} @kindex show sigs@r{, Hurd command} Show the current state of intercepting inferior's signals. @item set signal-thread @itemx set sigthread @kindex set signal-thread @kindex set sigthread This command tells @value{GDBN} which thread is the @code{libc} signal thread. That thread is run when a signal is delivered to a running process. @code{set sigthread} is the shorthand alias of @code{set signal-thread}. @item show signal-thread @itemx show sigthread @kindex show signal-thread @kindex show sigthread These two commands show which thread will run when the inferior is delivered a signal. @item set stopped @kindex set stopped@r{, Hurd command} This commands tells @value{GDBN} that the inferior process is stopped, as with the @code{SIGSTOP} signal. The stopped process can be continued by delivering a signal to it. @item show stopped @kindex show stopped@r{, Hurd command} This command shows whether @value{GDBN} thinks the debuggee is stopped. @item set exceptions @kindex set exceptions@r{, Hurd command} Use this command to turn off trapping of exceptions in the inferior. When exception trapping is off, neither breakpoints nor single-stepping will work. To restore the default, set exception trapping on. @item show exceptions @kindex show exceptions@r{, Hurd command} Show the current state of trapping exceptions in the inferior. @item set task pause @kindex set task@r{, Hurd commands} @cindex task attributes (@sc{gnu} Hurd) @cindex pause current task (@sc{gnu} Hurd) This command toggles task suspension when @value{GDBN} has control. Setting it to on takes effect immediately, and the task is suspended whenever @value{GDBN} gets control. Setting it to off will take effect the next time the inferior is continued. If this option is set to off, you can use @code{set thread default pause on} or @code{set thread pause on} (see below) to pause individual threads. @item show task pause @kindex show task@r{, Hurd commands} Show the current state of task suspension. @item set task detach-suspend-count @cindex task suspend count @cindex detach from task, @sc{gnu} Hurd This command sets the suspend count the task will be left with when @value{GDBN} detaches from it. @item show task detach-suspend-count Show the suspend count the task will be left with when detaching. @item set task exception-port @itemx set task excp @cindex task exception port, @sc{gnu} Hurd This command sets the task exception port to which @value{GDBN} will forward exceptions. The argument should be the value of the @dfn{send rights} of the task. @code{set task excp} is a shorthand alias. @item set noninvasive @cindex noninvasive task options This command switches @value{GDBN} to a mode that is the least invasive as far as interfering with the inferior is concerned. This is the same as using @code{set task pause}, @code{set exceptions}, and @code{set signals} to values opposite to the defaults. @item info send-rights @itemx info receive-rights @itemx info port-rights @itemx info port-sets @itemx info dead-names @itemx info ports @itemx info psets @cindex send rights, @sc{gnu} Hurd @cindex receive rights, @sc{gnu} Hurd @cindex port rights, @sc{gnu} Hurd @cindex port sets, @sc{gnu} Hurd @cindex dead names, @sc{gnu} Hurd These commands display information about, respectively, send rights, receive rights, port rights, port sets, and dead names of a task. There are also shorthand aliases: @code{info ports} for @code{info port-rights} and @code{info psets} for @code{info port-sets}. @item set thread pause @kindex set thread@r{, Hurd command} @cindex thread properties, @sc{gnu} Hurd @cindex pause current thread (@sc{gnu} Hurd) This command toggles current thread suspension when @value{GDBN} has control. Setting it to on takes effect immediately, and the current thread is suspended whenever @value{GDBN} gets control. Setting it to off will take effect the next time the inferior is continued. Normally, this command has no effect, since when @value{GDBN} has control, the whole task is suspended. However, if you used @code{set task pause off} (see above), this command comes in handy to suspend only the current thread. @item show thread pause @kindex show thread@r{, Hurd command} This command shows the state of current thread suspension. @item set thread run This command sets whether the current thread is allowed to run. @item show thread run Show whether the current thread is allowed to run. @item set thread detach-suspend-count @cindex thread suspend count, @sc{gnu} Hurd @cindex detach from thread, @sc{gnu} Hurd This command sets the suspend count @value{GDBN} will leave on a thread when detaching. This number is relative to the suspend count found by @value{GDBN} when it notices the thread; use @code{set thread takeover-suspend-count} to force it to an absolute value. @item show thread detach-suspend-count Show the suspend count @value{GDBN} will leave on the thread when detaching. @item set thread exception-port @itemx set thread excp Set the thread exception port to which to forward exceptions. This overrides the port set by @code{set task exception-port} (see above). @code{set thread excp} is the shorthand alias. @item set thread takeover-suspend-count Normally, @value{GDBN}'s thread suspend counts are relative to the value @value{GDBN} finds when it notices each thread. This command changes the suspend counts to be absolute instead. @item set thread default @itemx show thread default @cindex thread default settings, @sc{gnu} Hurd Each of the above @code{set thread} commands has a @code{set thread default} counterpart (e.g., @code{set thread default pause}, @code{set thread default exception-port}, etc.). The @code{thread default} variety of commands sets the default thread properties for all threads; you can then change the properties of individual threads with the non-default commands. @end table @node Darwin @subsection Darwin @cindex Darwin @value{GDBN} provides the following commands specific to the Darwin target: @table @code @item set debug darwin @var{num} @kindex set debug darwin When set to a non zero value, enables debugging messages specific to the Darwin support. Higher values produce more verbose output. @item show debug darwin @kindex show debug darwin Show the current state of Darwin messages. @item set debug mach-o @var{num} @kindex set debug mach-o When set to a non zero value, enables debugging messages while @value{GDBN} is reading Darwin object files. (@dfn{Mach-O} is the file format used on Darwin for object and executable files.) Higher values produce more verbose output. This is a command to diagnose problems internal to @value{GDBN} and should not be needed in normal usage. @item show debug mach-o @kindex show debug mach-o Show the current state of Mach-O file messages. @item set mach-exceptions on @itemx set mach-exceptions off @kindex set mach-exceptions On Darwin, faults are first reported as a Mach exception and are then mapped to a Posix signal. Use this command to turn on trapping of Mach exceptions in the inferior. This might be sometimes useful to better understand the cause of a fault. The default is off. @item show mach-exceptions @kindex show mach-exceptions Show the current state of exceptions trapping. @end table @node Embedded OS @section Embedded Operating Systems This section describes configurations involving the debugging of embedded operating systems that are available for several different architectures. @menu * VxWorks:: Using @value{GDBN} with VxWorks @end menu @value{GDBN} includes the ability to debug programs running on various real-time operating systems. @node VxWorks @subsection Using @value{GDBN} with VxWorks @cindex VxWorks @table @code @kindex target vxworks @item target vxworks @var{machinename} A VxWorks system, attached via TCP/IP. The argument @var{machinename} is the target system's machine name or IP address. @end table On VxWorks, @code{load} links @var{filename} dynamically on the current target system as well as adding its symbols in @value{GDBN}. @value{GDBN} enables developers to spawn and debug tasks running on networked VxWorks targets from a Unix host. Already-running tasks spawned from the VxWorks shell can also be debugged. @value{GDBN} uses code that runs on both the Unix host and on the VxWorks target. The program @code{@value{GDBP}} is installed and executed on the Unix host. (It may be installed with the name @code{vxgdb}, to distinguish it from a @value{GDBN} for debugging programs on the host itself.) @table @code @item VxWorks-timeout @var{args} @kindex vxworks-timeout All VxWorks-based targets now support the option @code{vxworks-timeout}. This option is set by the user, and @var{args} represents the number of seconds @value{GDBN} waits for responses to rpc's. You might use this if your VxWorks target is a slow software simulator or is on the far side of a thin network line. @end table The following information on connecting to VxWorks was current when this manual was produced; newer releases of VxWorks may use revised procedures. @findex INCLUDE_RDB To use @value{GDBN} with VxWorks, you must rebuild your VxWorks kernel to include the remote debugging interface routines in the VxWorks library @file{rdb.a}. To do this, define @code{INCLUDE_RDB} in the VxWorks configuration file @file{configAll.h} and rebuild your VxWorks kernel. The resulting kernel contains @file{rdb.a}, and spawns the source debugging task @code{tRdbTask} when VxWorks is booted. For more information on configuring and remaking VxWorks, see the manufacturer's manual. @c VxWorks, see the @cite{VxWorks Programmer's Guide}. Once you have included @file{rdb.a} in your VxWorks system image and set your Unix execution search path to find @value{GDBN}, you are ready to run @value{GDBN}. From your Unix host, run @code{@value{GDBP}} (or @code{vxgdb}, depending on your installation). @value{GDBN} comes up showing the prompt: @smallexample (vxgdb) @end smallexample @menu * VxWorks Connection:: Connecting to VxWorks * VxWorks Download:: VxWorks download * VxWorks Attach:: Running tasks @end menu @node VxWorks Connection @subsubsection Connecting to VxWorks The @value{GDBN} command @code{target} lets you connect to a VxWorks target on the network. To connect to a target whose host name is ``@code{tt}'', type: @smallexample (vxgdb) target vxworks tt @end smallexample @need 750 @value{GDBN} displays messages like these: @smallexample Attaching remote machine across net... Connected to tt. @end smallexample @need 1000 @value{GDBN} then attempts to read the symbol tables of any object modules loaded into the VxWorks target since it was last booted. @value{GDBN} locates these files by searching the directories listed in the command search path (@pxref{Environment, ,Your Program's Environment}); if it fails to find an object file, it displays a message such as: @smallexample prog.o: No such file or directory. @end smallexample When this happens, add the appropriate directory to the search path with the @value{GDBN} command @code{path}, and execute the @code{target} command again. @node VxWorks Download @subsubsection VxWorks Download @cindex download to VxWorks If you have connected to the VxWorks target and you want to debug an object that has not yet been loaded, you can use the @value{GDBN} @code{load} command to download a file from Unix to VxWorks incrementally. The object file given as an argument to the @code{load} command is actually opened twice: first by the VxWorks target in order to download the code, then by @value{GDBN} in order to read the symbol table. This can lead to problems if the current working directories on the two systems differ. If both systems have NFS mounted the same filesystems, you can avoid these problems by using absolute paths. Otherwise, it is simplest to set the working directory on both systems to the directory in which the object file resides, and then to reference the file by its name, without any path. For instance, a program @file{prog.o} may reside in @file{@var{vxpath}/vw/demo/rdb} in VxWorks and in @file{@var{hostpath}/vw/demo/rdb} on the host. To load this program, type this on VxWorks: @smallexample -> cd "@var{vxpath}/vw/demo/rdb" @end smallexample @noindent Then, in @value{GDBN}, type: @smallexample (vxgdb) cd @var{hostpath}/vw/demo/rdb (vxgdb) load prog.o @end smallexample @value{GDBN} displays a response similar to this: @smallexample Reading symbol data from wherever/vw/demo/rdb/prog.o... done. @end smallexample You can also use the @code{load} command to reload an object module after editing and recompiling the corresponding source file. Note that this makes @value{GDBN} delete all currently-defined breakpoints, auto-displays, and convenience variables, and to clear the value history. (This is necessary in order to preserve the integrity of debugger's data structures that reference the target system's symbol table.) @node VxWorks Attach @subsubsection Running Tasks @cindex running VxWorks tasks You can also attach to an existing task using the @code{attach} command as follows: @smallexample (vxgdb) attach @var{task} @end smallexample @noindent where @var{task} is the VxWorks hexadecimal task ID. The task can be running or suspended when you attach to it. Running tasks are suspended at the time of attachment. @node Embedded Processors @section Embedded Processors This section goes into details specific to particular embedded configurations. @cindex send command to simulator Whenever a specific embedded processor has a simulator, @value{GDBN} allows to send an arbitrary command to the simulator. @table @code @item sim @var{command} @kindex sim@r{, a command} Send an arbitrary @var{command} string to the simulator. Consult the documentation for the specific simulator in use for information about acceptable commands. @end table @menu * ARM:: ARM RDI * M32R/D:: Renesas M32R/D * M68K:: Motorola M68K * MicroBlaze:: Xilinx MicroBlaze * MIPS Embedded:: MIPS Embedded * OpenRISC 1000:: OpenRisc 1000 * PowerPC Embedded:: PowerPC Embedded * PA:: HP PA Embedded * Sparclet:: Tsqware Sparclet * Sparclite:: Fujitsu Sparclite * Z8000:: Zilog Z8000 * AVR:: Atmel AVR * CRIS:: CRIS * Super-H:: Renesas Super-H @end menu @node ARM @subsection ARM @cindex ARM RDI @table @code @kindex target rdi @item target rdi @var{dev} ARM Angel monitor, via RDI library interface to ADP protocol. You may use this target to communicate with both boards running the Angel monitor, or with the EmbeddedICE JTAG debug device. @kindex target rdp @item target rdp @var{dev} ARM Demon monitor. @end table @value{GDBN} provides the following ARM-specific commands: @table @code @item set arm disassembler @kindex set arm This commands selects from a list of disassembly styles. The @code{"std"} style is the standard style. @item show arm disassembler @kindex show arm Show the current disassembly style. @item set arm apcs32 @cindex ARM 32-bit mode This command toggles ARM operation mode between 32-bit and 26-bit. @item show arm apcs32 Display the current usage of the ARM 32-bit mode. @item set arm fpu @var{fputype} This command sets the ARM floating-point unit (FPU) type. The argument @var{fputype} can be one of these: @table @code @item auto Determine the FPU type by querying the OS ABI. @item softfpa Software FPU, with mixed-endian doubles on little-endian ARM processors. @item fpa GCC-compiled FPA co-processor. @item softvfp Software FPU with pure-endian doubles. @item vfp VFP co-processor. @end table @item show arm fpu Show the current type of the FPU. @item set arm abi This command forces @value{GDBN} to use the specified ABI. @item show arm abi Show the currently used ABI. @item set arm fallback-mode (arm|thumb|auto) @value{GDBN} uses the symbol table, when available, to determine whether instructions are ARM or Thumb. This command controls @value{GDBN}'s default behavior when the symbol table is not available. The default is @samp{auto}, which causes @value{GDBN} to use the current execution mode (from the @code{T} bit in the @code{CPSR} register). @item show arm fallback-mode Show the current fallback instruction mode. @item set arm force-mode (arm|thumb|auto) This command overrides use of the symbol table to determine whether instructions are ARM or Thumb. The default is @samp{auto}, which causes @value{GDBN} to use the symbol table and then the setting of @samp{set arm fallback-mode}. @item show arm force-mode Show the current forced instruction mode. @item set debug arm Toggle whether to display ARM-specific debugging messages from the ARM target support subsystem. @item show debug arm Show whether ARM-specific debugging messages are enabled. @end table The following commands are available when an ARM target is debugged using the RDI interface: @table @code @item rdilogfile @r{[}@var{file}@r{]} @kindex rdilogfile @cindex ADP (Angel Debugger Protocol) logging Set the filename for the ADP (Angel Debugger Protocol) packet log. With an argument, sets the log file to the specified @var{file}. With no argument, show the current log file name. The default log file is @file{rdi.log}. @item rdilogenable @r{[}@var{arg}@r{]} @kindex rdilogenable Control logging of ADP packets. With an argument of 1 or @code{"yes"} enables logging, with an argument 0 or @code{"no"} disables it. With no arguments displays the current setting. When logging is enabled, ADP packets exchanged between @value{GDBN} and the RDI target device are logged to a file. @item set rdiromatzero @kindex set rdiromatzero @cindex ROM at zero address, RDI Tell @value{GDBN} whether the target has ROM at address 0. If on, vector catching is disabled, so that zero address can be used. If off (the default), vector catching is enabled. For this command to take effect, it needs to be invoked prior to the @code{target rdi} command. @item show rdiromatzero @kindex show rdiromatzero Show the current setting of ROM at zero address. @item set rdiheartbeat @kindex set rdiheartbeat @cindex RDI heartbeat Enable or disable RDI heartbeat packets. It is not recommended to turn on this option, since it confuses ARM and EPI JTAG interface, as well as the Angel monitor. @item show rdiheartbeat @kindex show rdiheartbeat Show the setting of RDI heartbeat packets. @end table @table @code @item target sim @r{[}@var{simargs}@r{]} @dots{} The @value{GDBN} ARM simulator accepts the following optional arguments. @table @code @item --swi-support=@var{type} Tell the simulator which SWI interfaces to support. @var{type} may be a comma separated list of the following values. The default value is @code{all}. @table @code @item none @item demon @item angel @item redboot @item all @end table @end table @end table @node M32R/D @subsection Renesas M32R/D and M32R/SDI @table @code @kindex target m32r @item target m32r @var{dev} Renesas M32R/D ROM monitor. @kindex target m32rsdi @item target m32rsdi @var{dev} Renesas M32R SDI server, connected via parallel port to the board. @end table The following @value{GDBN} commands are specific to the M32R monitor: @table @code @item set download-path @var{path} @kindex set download-path @cindex find downloadable @sc{srec} files (M32R) Set the default path for finding downloadable @sc{srec} files. @item show download-path @kindex show download-path Show the default path for downloadable @sc{srec} files. @item set board-address @var{addr} @kindex set board-address @cindex M32-EVA target board address Set the IP address for the M32R-EVA target board. @item show board-address @kindex show board-address Show the current IP address of the target board. @item set server-address @var{addr} @kindex set server-address @cindex download server address (M32R) Set the IP address for the download server, which is the @value{GDBN}'s host machine. @item show server-address @kindex show server-address Display the IP address of the download server. @item upload @r{[}@var{file}@r{]} @kindex upload@r{, M32R} Upload the specified @sc{srec} @var{file} via the monitor's Ethernet upload capability. If no @var{file} argument is given, the current executable file is uploaded. @item tload @r{[}@var{file}@r{]} @kindex tload@r{, M32R} Test the @code{upload} command. @end table The following commands are available for M32R/SDI: @table @code @item sdireset @kindex sdireset @cindex reset SDI connection, M32R This command resets the SDI connection. @item sdistatus @kindex sdistatus This command shows the SDI connection status. @item debug_chaos @kindex debug_chaos @cindex M32R/Chaos debugging Instructs the remote that M32R/Chaos debugging is to be used. @item use_debug_dma @kindex use_debug_dma Instructs the remote to use the DEBUG_DMA method of accessing memory. @item use_mon_code @kindex use_mon_code Instructs the remote to use the MON_CODE method of accessing memory. @item use_ib_break @kindex use_ib_break Instructs the remote to set breakpoints by IB break. @item use_dbt_break @kindex use_dbt_break Instructs the remote to set breakpoints by DBT. @end table @node M68K @subsection M68k The Motorola m68k configuration includes ColdFire support, and a target command for the following ROM monitor. @table @code @kindex target dbug @item target dbug @var{dev} dBUG ROM monitor for Motorola ColdFire. @end table @node MicroBlaze @subsection MicroBlaze @cindex Xilinx MicroBlaze @cindex XMD, Xilinx Microprocessor Debugger The MicroBlaze is a soft-core processor supported on various Xilinx FPGAs, such as Spartan or Virtex series. Boards with these processors usually have JTAG ports which connect to a host system running the Xilinx Embedded Development Kit (EDK) or Software Development Kit (SDK). This host system is used to download the configuration bitstream to the target FPGA. The Xilinx Microprocessor Debugger (XMD) program communicates with the target board using the JTAG interface and presents a @code{gdbserver} interface to the board. By default @code{xmd} uses port @code{1234}. (While it is possible to change this default port, it requires the use of undocumented @code{xmd} commands. Contact Xilinx support if you need to do this.) Use these GDB commands to connect to the MicroBlaze target processor. @table @code @item target remote :1234 Use this command to connect to the target if you are running @value{GDBN} on the same system as @code{xmd}. @item target remote @var{xmd-host}:1234 Use this command to connect to the target if it is connected to @code{xmd} running on a different system named @var{xmd-host}. @item load Use this command to download a program to the MicroBlaze target. @item set debug microblaze @var{n} Enable MicroBlaze-specific debugging messages if non-zero. @item show debug microblaze @var{n} Show MicroBlaze-specific debugging level. @end table @node MIPS Embedded @subsection @acronym{MIPS} Embedded @cindex @acronym{MIPS} boards @value{GDBN} can use the @acronym{MIPS} remote debugging protocol to talk to a @acronym{MIPS} board attached to a serial line. This is available when you configure @value{GDBN} with @samp{--target=mips-elf}. @need 1000 Use these @value{GDBN} commands to specify the connection to your target board: @table @code @item target mips @var{port} @kindex target mips @var{port} To run a program on the board, start up @code{@value{GDBP}} with the name of your program as the argument. To connect to the board, use the command @samp{target mips @var{port}}, where @var{port} is the name of the serial port connected to the board. If the program has not already been downloaded to the board, you may use the @code{load} command to download it. You can then use all the usual @value{GDBN} commands. For example, this sequence connects to the target board through a serial port, and loads and runs a program called @var{prog} through the debugger: @smallexample host$ @value{GDBP} @var{prog} @value{GDBN} is free software and @dots{} (@value{GDBP}) target mips /dev/ttyb (@value{GDBP}) load @var{prog} (@value{GDBP}) run @end smallexample @item target mips @var{hostname}:@var{portnumber} On some @value{GDBN} host configurations, you can specify a TCP connection (for instance, to a serial line managed by a terminal concentrator) instead of a serial port, using the syntax @samp{@var{hostname}:@var{portnumber}}. @item target pmon @var{port} @kindex target pmon @var{port} PMON ROM monitor. @item target ddb @var{port} @kindex target ddb @var{port} NEC's DDB variant of PMON for Vr4300. @item target lsi @var{port} @kindex target lsi @var{port} LSI variant of PMON. @kindex target r3900 @item target r3900 @var{dev} Densan DVE-R3900 ROM monitor for Toshiba R3900 Mips. @kindex target array @item target array @var{dev} Array Tech LSI33K RAID controller board. @end table @noindent @value{GDBN} also supports these special commands for @acronym{MIPS} targets: @table @code @item set mipsfpu double @itemx set mipsfpu single @itemx set mipsfpu none @itemx set mipsfpu auto @itemx show mipsfpu @kindex set mipsfpu @kindex show mipsfpu @cindex @acronym{MIPS} remote floating point @cindex floating point, @acronym{MIPS} remote If your target board does not support the @acronym{MIPS} floating point coprocessor, you should use the command @samp{set mipsfpu none} (if you need this, you may wish to put the command in your @value{GDBN} init file). This tells @value{GDBN} how to find the return value of functions which return floating point values. It also allows @value{GDBN} to avoid saving the floating point registers when calling functions on the board. If you are using a floating point coprocessor with only single precision floating point support, as on the @sc{r4650} processor, use the command @samp{set mipsfpu single}. The default double precision floating point coprocessor may be selected using @samp{set mipsfpu double}. In previous versions the only choices were double precision or no floating point, so @samp{set mipsfpu on} will select double precision and @samp{set mipsfpu off} will select no floating point. As usual, you can inquire about the @code{mipsfpu} variable with @samp{show mipsfpu}. @item set timeout @var{seconds} @itemx set retransmit-timeout @var{seconds} @itemx show timeout @itemx show retransmit-timeout @cindex @code{timeout}, @acronym{MIPS} protocol @cindex @code{retransmit-timeout}, @acronym{MIPS} protocol @kindex set timeout @kindex show timeout @kindex set retransmit-timeout @kindex show retransmit-timeout You can control the timeout used while waiting for a packet, in the @acronym{MIPS} remote protocol, with the @code{set timeout @var{seconds}} command. The default is 5 seconds. Similarly, you can control the timeout used while waiting for an acknowledgment of a packet with the @code{set retransmit-timeout @var{seconds}} command. The default is 3 seconds. You can inspect both values with @code{show timeout} and @code{show retransmit-timeout}. (These commands are @emph{only} available when @value{GDBN} is configured for @samp{--target=mips-elf}.) The timeout set by @code{set timeout} does not apply when @value{GDBN} is waiting for your program to stop. In that case, @value{GDBN} waits forever because it has no way of knowing how long the program is going to run before stopping. @item set syn-garbage-limit @var{num} @kindex set syn-garbage-limit@r{, @acronym{MIPS} remote} @cindex synchronize with remote @acronym{MIPS} target Limit the maximum number of characters @value{GDBN} should ignore when it tries to synchronize with the remote target. The default is 10 characters. Setting the limit to -1 means there's no limit. @item show syn-garbage-limit @kindex show syn-garbage-limit@r{, @acronym{MIPS} remote} Show the current limit on the number of characters to ignore when trying to synchronize with the remote system. @item set monitor-prompt @var{prompt} @kindex set monitor-prompt@r{, @acronym{MIPS} remote} @cindex remote monitor prompt Tell @value{GDBN} to expect the specified @var{prompt} string from the remote monitor. The default depends on the target: @table @asis @item pmon target @samp{PMON} @item ddb target @samp{NEC010} @item lsi target @samp{PMON>} @end table @item show monitor-prompt @kindex show monitor-prompt@r{, @acronym{MIPS} remote} Show the current strings @value{GDBN} expects as the prompt from the remote monitor. @item set monitor-warnings @kindex set monitor-warnings@r{, @acronym{MIPS} remote} Enable or disable monitor warnings about hardware breakpoints. This has effect only for the @code{lsi} target. When on, @value{GDBN} will display warning messages whose codes are returned by the @code{lsi} PMON monitor for breakpoint commands. @item show monitor-warnings @kindex show monitor-warnings@r{, @acronym{MIPS} remote} Show the current setting of printing monitor warnings. @item pmon @var{command} @kindex pmon@r{, @acronym{MIPS} remote} @cindex send PMON command This command allows sending an arbitrary @var{command} string to the monitor. The monitor must be in debug mode for this to work. @end table @node OpenRISC 1000 @subsection OpenRISC 1000 @cindex OpenRISC 1000 @cindex or1k boards See OR1k Architecture document (@uref{www.opencores.org}) for more information about platform and commands. @table @code @kindex target jtag @item target jtag jtag://@var{host}:@var{port} Connects to remote JTAG server. JTAG remote server can be either an or1ksim or JTAG server, connected via parallel port to the board. Example: @code{target jtag jtag://localhost:9999} @kindex or1ksim @item or1ksim @var{command} If connected to @code{or1ksim} OpenRISC 1000 Architectural Simulator, proprietary commands can be executed. @kindex info or1k spr @item info or1k spr Displays spr groups. @item info or1k spr @var{group} @itemx info or1k spr @var{groupno} Displays register names in selected group. @item info or1k spr @var{group} @var{register} @itemx info or1k spr @var{register} @itemx info or1k spr @var{groupno} @var{registerno} @itemx info or1k spr @var{registerno} Shows information about specified spr register. @kindex spr @item spr @var{group} @var{register} @var{value} @itemx spr @var{register @var{value}} @itemx spr @var{groupno} @var{registerno @var{value}} @itemx spr @var{registerno @var{value}} Writes @var{value} to specified spr register. @end table Some implementations of OpenRISC 1000 Architecture also have hardware trace. It is very similar to @value{GDBN} trace, except it does not interfere with normal program execution and is thus much faster. Hardware breakpoints/watchpoint triggers can be set using: @table @code @item $LEA/$LDATA Load effective address/data @item $SEA/$SDATA Store effective address/data @item $AEA/$ADATA Access effective address ($SEA or $LEA) or data ($SDATA/$LDATA) @item $FETCH Fetch data @end table When triggered, it can capture low level data, like: @code{PC}, @code{LSEA}, @code{LDATA}, @code{SDATA}, @code{READSPR}, @code{WRITESPR}, @code{INSTR}. @code{htrace} commands: @cindex OpenRISC 1000 htrace @table @code @kindex hwatch @item hwatch @var{conditional} Set hardware watchpoint on combination of Load/Store Effective Address(es) or Data. For example: @code{hwatch ($LEA == my_var) && ($LDATA < 50) || ($SEA == my_var) && ($SDATA >= 50)} @code{hwatch ($LEA == my_var) && ($LDATA < 50) || ($SEA == my_var) && ($SDATA >= 50)} @kindex htrace @item htrace info Display information about current HW trace configuration. @item htrace trigger @var{conditional} Set starting criteria for HW trace. @item htrace qualifier @var{conditional} Set acquisition qualifier for HW trace. @item htrace stop @var{conditional} Set HW trace stopping criteria. @item htrace record [@var{data}]* Selects the data to be recorded, when qualifier is met and HW trace was triggered. @item htrace enable @itemx htrace disable Enables/disables the HW trace. @item htrace rewind [@var{filename}] Clears currently recorded trace data. If filename is specified, new trace file is made and any newly collected data will be written there. @item htrace print [@var{start} [@var{len}]] Prints trace buffer, using current record configuration. @item htrace mode continuous Set continuous trace mode. @item htrace mode suspend Set suspend trace mode. @end table @node PowerPC Embedded @subsection PowerPC Embedded @cindex DVC register @value{GDBN} supports using the DVC (Data Value Compare) register to implement in hardware simple hardware watchpoint conditions of the form: @smallexample (@value{GDBP}) watch @var{ADDRESS|VARIABLE} \ if @var{ADDRESS|VARIABLE} == @var{CONSTANT EXPRESSION} @end smallexample The DVC register will be automatically used when @value{GDBN} detects such pattern in a condition expression, and the created watchpoint uses one debug register (either the @code{exact-watchpoints} option is on and the variable is scalar, or the variable has a length of one byte). This feature is available in native @value{GDBN} running on a Linux kernel version 2.6.34 or newer. When running on PowerPC embedded processors, @value{GDBN} automatically uses ranged hardware watchpoints, unless the @code{exact-watchpoints} option is on, in which case watchpoints using only one debug register are created when watching variables of scalar types. You can create an artificial array to watch an arbitrary memory region using one of the following commands (@pxref{Expressions}): @smallexample (@value{GDBP}) watch *((char *) @var{address})@@@var{length} (@value{GDBP}) watch @{char[@var{length}]@} @var{address} @end smallexample PowerPC embedded processors support masked watchpoints. See the discussion about the @code{mask} argument in @ref{Set Watchpoints}. @cindex ranged breakpoint PowerPC embedded processors support hardware accelerated @dfn{ranged breakpoints}. A ranged breakpoint stops execution of the inferior whenever it executes an instruction at any address within the range it specifies. To set a ranged breakpoint in @value{GDBN}, use the @code{break-range} command. @value{GDBN} provides the following PowerPC-specific commands: @table @code @kindex break-range @item break-range @var{start-location}, @var{end-location} Set a breakpoint for an address range. @var{start-location} and @var{end-location} can specify a function name, a line number, an offset of lines from the current line or from the start location, or an address of an instruction (see @ref{Specify Location}, for a list of all the possible ways to specify a @var{location}.) The breakpoint will stop execution of the inferior whenever it executes an instruction at any address within the specified range, (including @var{start-location} and @var{end-location}.) @kindex set powerpc @item set powerpc soft-float @itemx show powerpc soft-float Force @value{GDBN} to use (or not use) a software floating point calling convention. By default, @value{GDBN} selects the calling convention based on the selected architecture and the provided executable file. @item set powerpc vector-abi @itemx show powerpc vector-abi Force @value{GDBN} to use the specified calling convention for vector arguments and return values. The valid options are @samp{auto}; @samp{generic}, to avoid vector registers even if they are present; @samp{altivec}, to use AltiVec registers; and @samp{spe} to use SPE registers. By default, @value{GDBN} selects the calling convention based on the selected architecture and the provided executable file. @item set powerpc exact-watchpoints @itemx show powerpc exact-watchpoints Allow @value{GDBN} to use only one debug register when watching a variable of scalar type, thus assuming that the variable is accessed through the address of its first byte. @kindex target dink32 @item target dink32 @var{dev} DINK32 ROM monitor. @kindex target ppcbug @item target ppcbug @var{dev} @kindex target ppcbug1 @item target ppcbug1 @var{dev} PPCBUG ROM monitor for PowerPC. @kindex target sds @item target sds @var{dev} SDS monitor, running on a PowerPC board (such as Motorola's ADS). @end table @cindex SDS protocol The following commands specific to the SDS protocol are supported by @value{GDBN}: @table @code @item set sdstimeout @var{nsec} @kindex set sdstimeout Set the timeout for SDS protocol reads to be @var{nsec} seconds. The default is 2 seconds. @item show sdstimeout @kindex show sdstimeout Show the current value of the SDS timeout. @item sds @var{command} @kindex sds@r{, a command} Send the specified @var{command} string to the SDS monitor. @end table @node PA @subsection HP PA Embedded @table @code @kindex target op50n @item target op50n @var{dev} OP50N monitor, running on an OKI HPPA board. @kindex target w89k @item target w89k @var{dev} W89K monitor, running on a Winbond HPPA board. @end table @node Sparclet @subsection Tsqware Sparclet @cindex Sparclet @value{GDBN} enables developers to debug tasks running on Sparclet targets from a Unix host. @value{GDBN} uses code that runs on both the Unix host and on the Sparclet target. The program @code{@value{GDBP}} is installed and executed on the Unix host. @table @code @item remotetimeout @var{args} @kindex remotetimeout @value{GDBN} supports the option @code{remotetimeout}. This option is set by the user, and @var{args} represents the number of seconds @value{GDBN} waits for responses. @end table @cindex compiling, on Sparclet When compiling for debugging, include the options @samp{-g} to get debug information and @samp{-Ttext} to relocate the program to where you wish to load it on the target. You may also want to add the options @samp{-n} or @samp{-N} in order to reduce the size of the sections. Example: @smallexample sparclet-aout-gcc prog.c -Ttext 0x12010000 -g -o prog -N @end smallexample You can use @code{objdump} to verify that the addresses are what you intended: @smallexample sparclet-aout-objdump --headers --syms prog @end smallexample @cindex running, on Sparclet Once you have set your Unix execution search path to find @value{GDBN}, you are ready to run @value{GDBN}. From your Unix host, run @code{@value{GDBP}} (or @code{sparclet-aout-gdb}, depending on your installation). @value{GDBN} comes up showing the prompt: @smallexample (gdbslet) @end smallexample @menu * Sparclet File:: Setting the file to debug * Sparclet Connection:: Connecting to Sparclet * Sparclet Download:: Sparclet download * Sparclet Execution:: Running and debugging @end menu @node Sparclet File @subsubsection Setting File to Debug The @value{GDBN} command @code{file} lets you choose with program to debug. @smallexample (gdbslet) file prog @end smallexample @need 1000 @value{GDBN} then attempts to read the symbol table of @file{prog}. @value{GDBN} locates the file by searching the directories listed in the command search path. If the file was compiled with debug information (option @samp{-g}), source files will be searched as well. @value{GDBN} locates the source files by searching the directories listed in the directory search path (@pxref{Environment, ,Your Program's Environment}). If it fails to find a file, it displays a message such as: @smallexample prog: No such file or directory. @end smallexample When this happens, add the appropriate directories to the search paths with the @value{GDBN} commands @code{path} and @code{dir}, and execute the @code{target} command again. @node Sparclet Connection @subsubsection Connecting to Sparclet The @value{GDBN} command @code{target} lets you connect to a Sparclet target. To connect to a target on serial port ``@code{ttya}'', type: @smallexample (gdbslet) target sparclet /dev/ttya Remote target sparclet connected to /dev/ttya main () at ../prog.c:3 @end smallexample @need 750 @value{GDBN} displays messages like these: @smallexample Connected to ttya. @end smallexample @node Sparclet Download @subsubsection Sparclet Download @cindex download to Sparclet Once connected to the Sparclet target, you can use the @value{GDBN} @code{load} command to download the file from the host to the target. The file name and load offset should be given as arguments to the @code{load} command. Since the file format is aout, the program must be loaded to the starting address. You can use @code{objdump} to find out what this value is. The load offset is an offset which is added to the VMA (virtual memory address) of each of the file's sections. For instance, if the program @file{prog} was linked to text address 0x1201000, with data at 0x12010160 and bss at 0x12010170, in @value{GDBN}, type: @smallexample (gdbslet) load prog 0x12010000 Loading section .text, size 0xdb0 vma 0x12010000 @end smallexample If the code is loaded at a different address then what the program was linked to, you may need to use the @code{section} and @code{add-symbol-file} commands to tell @value{GDBN} where to map the symbol table. @node Sparclet Execution @subsubsection Running and Debugging @cindex running and debugging Sparclet programs You can now begin debugging the task using @value{GDBN}'s execution control commands, @code{b}, @code{step}, @code{run}, etc. See the @value{GDBN} manual for the list of commands. @smallexample (gdbslet) b main Breakpoint 1 at 0x12010000: file prog.c, line 3. (gdbslet) run Starting program: prog Breakpoint 1, main (argc=1, argv=0xeffff21c) at prog.c:3 3 char *symarg = 0; (gdbslet) step 4 char *execarg = "hello!"; (gdbslet) @end smallexample @node Sparclite @subsection Fujitsu Sparclite @table @code @kindex target sparclite @item target sparclite @var{dev} Fujitsu sparclite boards, used only for the purpose of loading. You must use an additional command to debug the program. For example: target remote @var{dev} using @value{GDBN} standard remote protocol. @end table @node Z8000 @subsection Zilog Z8000 @cindex Z8000 @cindex simulator, Z8000 @cindex Zilog Z8000 simulator When configured for debugging Zilog Z8000 targets, @value{GDBN} includes a Z8000 simulator. For the Z8000 family, @samp{target sim} simulates either the Z8002 (the unsegmented variant of the Z8000 architecture) or the Z8001 (the segmented variant). The simulator recognizes which architecture is appropriate by inspecting the object code. @table @code @item target sim @var{args} @kindex sim @kindex target sim@r{, with Z8000} Debug programs on a simulated CPU. If the simulator supports setup options, specify them via @var{args}. @end table @noindent After specifying this target, you can debug programs for the simulated CPU in the same style as programs for your host computer; use the @code{file} command to load a new program image, the @code{run} command to run your program, and so on. As well as making available all the usual machine registers (@pxref{Registers, ,Registers}), the Z8000 simulator provides three additional items of information as specially named registers: @table @code @item cycles Counts clock-ticks in the simulator. @item insts Counts instructions run in the simulator. @item time Execution time in 60ths of a second. @end table You can refer to these values in @value{GDBN} expressions with the usual conventions; for example, @w{@samp{b fputc if $cycles>5000}} sets a conditional breakpoint that suspends only after at least 5000 simulated clock ticks. @node AVR @subsection Atmel AVR @cindex AVR When configured for debugging the Atmel AVR, @value{GDBN} supports the following AVR-specific commands: @table @code @item info io_registers @kindex info io_registers@r{, AVR} @cindex I/O registers (Atmel AVR) This command displays information about the AVR I/O registers. For each register, @value{GDBN} prints its number and value. @end table @node CRIS @subsection CRIS @cindex CRIS When configured for debugging CRIS, @value{GDBN} provides the following CRIS-specific commands: @table @code @item set cris-version @var{ver} @cindex CRIS version Set the current CRIS version to @var{ver}, either @samp{10} or @samp{32}. The CRIS version affects register names and sizes. This command is useful in case autodetection of the CRIS version fails. @item show cris-version Show the current CRIS version. @item set cris-dwarf2-cfi @cindex DWARF-2 CFI and CRIS Set the usage of DWARF-2 CFI for CRIS debugging. The default is @samp{on}. Change to @samp{off} when using @code{gcc-cris} whose version is below @code{R59}. @item show cris-dwarf2-cfi Show the current state of using DWARF-2 CFI. @item set cris-mode @var{mode} @cindex CRIS mode Set the current CRIS mode to @var{mode}. It should only be changed when debugging in guru mode, in which case it should be set to @samp{guru} (the default is @samp{normal}). @item show cris-mode Show the current CRIS mode. @end table @node Super-H @subsection Renesas Super-H @cindex Super-H For the Renesas Super-H processor, @value{GDBN} provides these commands: @table @code @item set sh calling-convention @var{convention} @kindex set sh calling-convention Set the calling-convention used when calling functions from @value{GDBN}. Allowed values are @samp{gcc}, which is the default setting, and @samp{renesas}. With the @samp{gcc} setting, functions are called using the @value{NGCC} calling convention. If the DWARF-2 information of the called function specifies that the function follows the Renesas calling convention, the function is called using the Renesas calling convention. If the calling convention is set to @samp{renesas}, the Renesas calling convention is always used, regardless of the DWARF-2 information. This can be used to override the default of @samp{gcc} if debug information is missing, or the compiler does not emit the DWARF-2 calling convention entry for a function. @item show sh calling-convention @kindex show sh calling-convention Show the current calling convention setting. @end table @node Architectures @section Architectures This section describes characteristics of architectures that affect all uses of @value{GDBN} with the architecture, both native and cross. @menu * AArch64:: * i386:: * Alpha:: * MIPS:: * HPPA:: HP PA architecture * SPU:: Cell Broadband Engine SPU architecture * PowerPC:: @end menu @node AArch64 @subsection AArch64 @cindex AArch64 support When @value{GDBN} is debugging the AArch64 architecture, it provides the following special commands: @table @code @item set debug aarch64 @kindex set debug aarch64 This command determines whether AArch64 architecture-specific debugging messages are to be displayed. @item show debug aarch64 Show whether AArch64 debugging messages are displayed. @end table @node i386 @subsection x86 Architecture-specific Issues @table @code @item set struct-convention @var{mode} @kindex set struct-convention @cindex struct return convention @cindex struct/union returned in registers Set the convention used by the inferior to return @code{struct}s and @code{union}s from functions to @var{mode}. Possible values of @var{mode} are @code{"pcc"}, @code{"reg"}, and @code{"default"} (the default). @code{"default"} or @code{"pcc"} means that @code{struct}s are returned on the stack, while @code{"reg"} means that a @code{struct} or a @code{union} whose size is 1, 2, 4, or 8 bytes will be returned in a register. @item show struct-convention @kindex show struct-convention Show the current setting of the convention to return @code{struct}s from functions. @end table @node Alpha @subsection Alpha See the following section. @node MIPS @subsection @acronym{MIPS} @cindex stack on Alpha @cindex stack on @acronym{MIPS} @cindex Alpha stack @cindex @acronym{MIPS} stack Alpha- and @acronym{MIPS}-based computers use an unusual stack frame, which sometimes requires @value{GDBN} to search backward in the object code to find the beginning of a function. @cindex response time, @acronym{MIPS} debugging To improve response time (especially for embedded applications, where @value{GDBN} may be restricted to a slow serial line for this search) you may want to limit the size of this search, using one of these commands: @table @code @cindex @code{heuristic-fence-post} (Alpha, @acronym{MIPS}) @item set heuristic-fence-post @var{limit} Restrict @value{GDBN} to examining at most @var{limit} bytes in its search for the beginning of a function. A value of @var{0} (the default) means there is no limit. However, except for @var{0}, the larger the limit the more bytes @code{heuristic-fence-post} must search and therefore the longer it takes to run. You should only need to use this command when debugging a stripped executable. @item show heuristic-fence-post Display the current limit. @end table @noindent These commands are available @emph{only} when @value{GDBN} is configured for debugging programs on Alpha or @acronym{MIPS} processors. Several @acronym{MIPS}-specific commands are available when debugging @acronym{MIPS} programs: @table @code @item set mips abi @var{arg} @kindex set mips abi @cindex set ABI for @acronym{MIPS} Tell @value{GDBN} which @acronym{MIPS} ABI is used by the inferior. Possible values of @var{arg} are: @table @samp @item auto The default ABI associated with the current binary (this is the default). @item o32 @item o64 @item n32 @item n64 @item eabi32 @item eabi64 @end table @item show mips abi @kindex show mips abi Show the @acronym{MIPS} ABI used by @value{GDBN} to debug the inferior. @item set mips compression @var{arg} @kindex set mips compression @cindex code compression, @acronym{MIPS} Tell @value{GDBN} which @acronym{MIPS} compressed @acronym{ISA, Instruction Set Architecture} encoding is used by the inferior. @value{GDBN} uses this for code disassembly and other internal interpretation purposes. This setting is only referred to when no executable has been associated with the debugging session or the executable does not provide information about the encoding it uses. Otherwise this setting is automatically updated from information provided by the executable. Possible values of @var{arg} are @samp{mips16} and @samp{micromips}. The default compressed @acronym{ISA} encoding is @samp{mips16}, as executables containing @acronym{MIPS16} code frequently are not identified as such. This setting is ``sticky''; that is, it retains its value across debugging sessions until reset either explicitly with this command or implicitly from an executable. The compiler and/or assembler typically add symbol table annotations to identify functions compiled for the @acronym{MIPS16} or @acronym{microMIPS} @acronym{ISA}s. If these function-scope annotations are present, @value{GDBN} uses them in preference to the global compressed @acronym{ISA} encoding setting. @item show mips compression @kindex show mips compression Show the @acronym{MIPS} compressed @acronym{ISA} encoding used by @value{GDBN} to debug the inferior. @item set mipsfpu @itemx show mipsfpu @xref{MIPS Embedded, set mipsfpu}. @item set mips mask-address @var{arg} @kindex set mips mask-address @cindex @acronym{MIPS} addresses, masking This command determines whether the most-significant 32 bits of 64-bit @acronym{MIPS} addresses are masked off. The argument @var{arg} can be @samp{on}, @samp{off}, or @samp{auto}. The latter is the default setting, which lets @value{GDBN} determine the correct value. @item show mips mask-address @kindex show mips mask-address Show whether the upper 32 bits of @acronym{MIPS} addresses are masked off or not. @item set remote-mips64-transfers-32bit-regs @kindex set remote-mips64-transfers-32bit-regs This command controls compatibility with 64-bit @acronym{MIPS} targets that transfer data in 32-bit quantities. If you have an old @acronym{MIPS} 64 target that transfers 32 bits for some registers, like @sc{sr} and @sc{fsr}, and 64 bits for other registers, set this option to @samp{on}. @item show remote-mips64-transfers-32bit-regs @kindex show remote-mips64-transfers-32bit-regs Show the current setting of compatibility with older @acronym{MIPS} 64 targets. @item set debug mips @kindex set debug mips This command turns on and off debugging messages for the @acronym{MIPS}-specific target code in @value{GDBN}. @item show debug mips @kindex show debug mips Show the current setting of @acronym{MIPS} debugging messages. @end table @node HPPA @subsection HPPA @cindex HPPA support When @value{GDBN} is debugging the HP PA architecture, it provides the following special commands: @table @code @item set debug hppa @kindex set debug hppa This command determines whether HPPA architecture-specific debugging messages are to be displayed. @item show debug hppa Show whether HPPA debugging messages are displayed. @item maint print unwind @var{address} @kindex maint print unwind@r{, HPPA} This command displays the contents of the unwind table entry at the given @var{address}. @end table @node SPU @subsection Cell Broadband Engine SPU architecture @cindex Cell Broadband Engine @cindex SPU When @value{GDBN} is debugging the Cell Broadband Engine SPU architecture, it provides the following special commands: @table @code @item info spu event @kindex info spu Display SPU event facility status. Shows current event mask and pending event status. @item info spu signal Display SPU signal notification facility status. Shows pending signal-control word and signal notification mode of both signal notification channels. @item info spu mailbox Display SPU mailbox facility status. Shows all pending entries, in order of processing, in each of the SPU Write Outbound, SPU Write Outbound Interrupt, and SPU Read Inbound mailboxes. @item info spu dma Display MFC DMA status. Shows all pending commands in the MFC DMA queue. For each entry, opcode, tag, class IDs, effective and local store addresses and transfer size are shown. @item info spu proxydma Display MFC Proxy-DMA status. Shows all pending commands in the MFC Proxy-DMA queue. For each entry, opcode, tag, class IDs, effective and local store addresses and transfer size are shown. @end table When @value{GDBN} is debugging a combined PowerPC/SPU application on the Cell Broadband Engine, it provides in addition the following special commands: @table @code @item set spu stop-on-load @var{arg} @kindex set spu Set whether to stop for new SPE threads. When set to @code{on}, @value{GDBN} will give control to the user when a new SPE thread enters its @code{main} function. The default is @code{off}. @item show spu stop-on-load @kindex show spu Show whether to stop for new SPE threads. @item set spu auto-flush-cache @var{arg} Set whether to automatically flush the software-managed cache. When set to @code{on}, @value{GDBN} will automatically cause the SPE software-managed cache to be flushed whenever SPE execution stops. This provides a consistent view of PowerPC memory that is accessed via the cache. If an application does not use the software-managed cache, this option has no effect. @item show spu auto-flush-cache Show whether to automatically flush the software-managed cache. @end table @node PowerPC @subsection PowerPC @cindex PowerPC architecture When @value{GDBN} is debugging the PowerPC architecture, it provides a set of pseudo-registers to enable inspection of 128-bit wide Decimal Floating Point numbers stored in the floating point registers. These values must be stored in two consecutive registers, always starting at an even register like @code{f0} or @code{f2}. The pseudo-registers go from @code{$dl0} through @code{$dl15}, and are formed by joining the even/odd register pairs @code{f0} and @code{f1} for @code{$dl0}, @code{f2} and @code{f3} for @code{$dl1} and so on. For POWER7 processors, @value{GDBN} provides a set of pseudo-registers, the 64-bit wide Extended Floating Point Registers (@samp{f32} through @samp{f63}). @node Controlling GDB @chapter Controlling @value{GDBN} You can alter the way @value{GDBN} interacts with you by using the @code{set} command. For commands controlling how @value{GDBN} displays data, see @ref{Print Settings, ,Print Settings}. Other settings are described here. @menu * Prompt:: Prompt * Editing:: Command editing * Command History:: Command history * Screen Size:: Screen size * Numbers:: Numbers * ABI:: Configuring the current ABI * Auto-loading:: Automatically loading associated files * Messages/Warnings:: Optional warnings and messages * Debugging Output:: Optional messages about internal happenings * Other Misc Settings:: Other Miscellaneous Settings @end menu @node Prompt @section Prompt @cindex prompt @value{GDBN} indicates its readiness to read a command by printing a string called the @dfn{prompt}. This string is normally @samp{(@value{GDBP})}. You can change the prompt string with the @code{set prompt} command. For instance, when debugging @value{GDBN} with @value{GDBN}, it is useful to change the prompt in one of the @value{GDBN} sessions so that you can always tell which one you are talking to. @emph{Note:} @code{set prompt} does not add a space for you after the prompt you set. This allows you to set a prompt which ends in a space or a prompt that does not. @table @code @kindex set prompt @item set prompt @var{newprompt} Directs @value{GDBN} to use @var{newprompt} as its prompt string henceforth. @kindex show prompt @item show prompt Prints a line of the form: @samp{Gdb's prompt is: @var{your-prompt}} @end table Versions of @value{GDBN} that ship with Python scripting enabled have prompt extensions. The commands for interacting with these extensions are: @table @code @kindex set extended-prompt @item set extended-prompt @var{prompt} Set an extended prompt that allows for substitutions. @xref{gdb.prompt}, for a list of escape sequences that can be used for substitution. Any escape sequences specified as part of the prompt string are replaced with the corresponding strings each time the prompt is displayed. For example: @smallexample set extended-prompt Current working directory: \w (gdb) @end smallexample Note that when an extended-prompt is set, it takes control of the @var{prompt_hook} hook. @xref{prompt_hook}, for further information. @kindex show extended-prompt @item show extended-prompt Prints the extended prompt. Any escape sequences specified as part of the prompt string with @code{set extended-prompt}, are replaced with the corresponding strings each time the prompt is displayed. @end table @node Editing @section Command Editing @cindex readline @cindex command line editing @value{GDBN} reads its input commands via the @dfn{Readline} interface. This @sc{gnu} library provides consistent behavior for programs which provide a command line interface to the user. Advantages are @sc{gnu} Emacs-style or @dfn{vi}-style inline editing of commands, @code{csh}-like history substitution, and a storage and recall of command history across debugging sessions. You may control the behavior of command line editing in @value{GDBN} with the command @code{set}. @table @code @kindex set editing @cindex editing @item set editing @itemx set editing on Enable command line editing (enabled by default). @item set editing off Disable command line editing. @kindex show editing @item show editing Show whether command line editing is enabled. @end table @ifset SYSTEM_READLINE @xref{Command Line Editing, , , rluserman, GNU Readline Library}, @end ifset @ifclear SYSTEM_READLINE @xref{Command Line Editing}, @end ifclear for more details about the Readline interface. Users unfamiliar with @sc{gnu} Emacs or @code{vi} are encouraged to read that chapter. @node Command History @section Command History @cindex command history @value{GDBN} can keep track of the commands you type during your debugging sessions, so that you can be certain of precisely what happened. Use these commands to manage the @value{GDBN} command history facility. @value{GDBN} uses the @sc{gnu} History library, a part of the Readline package, to provide the history facility. @ifset SYSTEM_READLINE @xref{Using History Interactively, , , history, GNU History Library}, @end ifset @ifclear SYSTEM_READLINE @xref{Using History Interactively}, @end ifclear for the detailed description of the History library. To issue a command to @value{GDBN} without affecting certain aspects of the state which is seen by users, prefix it with @samp{server } (@pxref{Server Prefix}). This means that this command will not affect the command history, nor will it affect @value{GDBN}'s notion of which command to repeat if @key{RET} is pressed on a line by itself. @cindex @code{server}, command prefix The server prefix does not affect the recording of values into the value history; to print a value without recording it into the value history, use the @code{output} command instead of the @code{print} command. Here is the description of @value{GDBN} commands related to command history. @table @code @cindex history substitution @cindex history file @kindex set history filename @cindex @env{GDBHISTFILE}, environment variable @item set history filename @var{fname} Set the name of the @value{GDBN} command history file to @var{fname}. This is the file where @value{GDBN} reads an initial command history list, and where it writes the command history from this session when it exits. You can access this list through history expansion or through the history command editing characters listed below. This file defaults to the value of the environment variable @code{GDBHISTFILE}, or to @file{./.gdb_history} (@file{./_gdb_history} on MS-DOS) if this variable is not set. @cindex save command history @kindex set history save @item set history save @itemx set history save on Record command history in a file, whose name may be specified with the @code{set history filename} command. By default, this option is disabled. @item set history save off Stop recording command history in a file. @cindex history size @kindex set history size @cindex @env{HISTSIZE}, environment variable @item set history size @var{size} Set the number of commands which @value{GDBN} keeps in its history list. This defaults to the value of the environment variable @code{HISTSIZE}, or to 256 if this variable is not set. @end table History expansion assigns special meaning to the character @kbd{!}. @ifset SYSTEM_READLINE @xref{Event Designators, , , history, GNU History Library}, @end ifset @ifclear SYSTEM_READLINE @xref{Event Designators}, @end ifclear for more details. @cindex history expansion, turn on/off Since @kbd{!} is also the logical not operator in C, history expansion is off by default. If you decide to enable history expansion with the @code{set history expansion on} command, you may sometimes need to follow @kbd{!} (when it is used as logical not, in an expression) with a space or a tab to prevent it from being expanded. The readline history facilities do not attempt substitution on the strings @kbd{!=} and @kbd{!(}, even when history expansion is enabled. The commands to control history expansion are: @table @code @item set history expansion on @itemx set history expansion @kindex set history expansion Enable history expansion. History expansion is off by default. @item set history expansion off Disable history expansion. @c @group @kindex show history @item show history @itemx show history filename @itemx show history save @itemx show history size @itemx show history expansion These commands display the state of the @value{GDBN} history parameters. @code{show history} by itself displays all four states. @c @end group @end table @table @code @kindex show commands @cindex show last commands @cindex display command history @item show commands Display the last ten commands in the command history. @item show commands @var{n} Print ten commands centered on command number @var{n}. @item show commands + Print ten commands just after the commands last printed. @end table @node Screen Size @section Screen Size @cindex size of screen @cindex pauses in output Certain commands to @value{GDBN} may produce large amounts of information output to the screen. To help you read all of it, @value{GDBN} pauses and asks you for input at the end of each page of output. Type @key{RET} when you want to continue the output, or @kbd{q} to discard the remaining output. Also, the screen width setting determines when to wrap lines of output. Depending on what is being printed, @value{GDBN} tries to break the line at a readable place, rather than simply letting it overflow onto the following line. Normally @value{GDBN} knows the size of the screen from the terminal driver software. For example, on Unix @value{GDBN} uses the termcap data base together with the value of the @code{TERM} environment variable and the @code{stty rows} and @code{stty cols} settings. If this is not correct, you can override it with the @code{set height} and @code{set width} commands: @table @code @kindex set height @kindex set width @kindex show width @kindex show height @item set height @var{lpp} @itemx show height @itemx set width @var{cpl} @itemx show width These @code{set} commands specify a screen height of @var{lpp} lines and a screen width of @var{cpl} characters. The associated @code{show} commands display the current settings. If you specify a height of zero lines, @value{GDBN} does not pause during output no matter how long the output is. This is useful if output is to a file or to an editor buffer. Likewise, you can specify @samp{set width 0} to prevent @value{GDBN} from wrapping its output. @item set pagination on @itemx set pagination off @kindex set pagination Turn the output pagination on or off; the default is on. Turning pagination off is the alternative to @code{set height 0}. Note that running @value{GDBN} with the @option{--batch} option (@pxref{Mode Options, -batch}) also automatically disables pagination. @item show pagination @kindex show pagination Show the current pagination mode. @end table @node Numbers @section Numbers @cindex number representation @cindex entering numbers You can always enter numbers in octal, decimal, or hexadecimal in @value{GDBN} by the usual conventions: octal numbers begin with @samp{0}, decimal numbers end with @samp{.}, and hexadecimal numbers begin with @samp{0x}. Numbers that neither begin with @samp{0} or @samp{0x}, nor end with a @samp{.} are, by default, entered in base 10; likewise, the default display for numbers---when no particular format is specified---is base 10. You can change the default base for both input and output with the commands described below. @table @code @kindex set input-radix @item set input-radix @var{base} Set the default base for numeric input. Supported choices for @var{base} are decimal 8, 10, or 16. @var{base} must itself be specified either unambiguously or using the current input radix; for example, any of @smallexample set input-radix 012 set input-radix 10. set input-radix 0xa @end smallexample @noindent sets the input base to decimal. On the other hand, @samp{set input-radix 10} leaves the input radix unchanged, no matter what it was, since @samp{10}, being without any leading or trailing signs of its base, is interpreted in the current radix. Thus, if the current radix is 16, @samp{10} is interpreted in hex, i.e.@: as 16 decimal, which doesn't change the radix. @kindex set output-radix @item set output-radix @var{base} Set the default base for numeric display. Supported choices for @var{base} are decimal 8, 10, or 16. @var{base} must itself be specified either unambiguously or using the current input radix. @kindex show input-radix @item show input-radix Display the current default base for numeric input. @kindex show output-radix @item show output-radix Display the current default base for numeric display. @item set radix @r{[}@var{base}@r{]} @itemx show radix @kindex set radix @kindex show radix These commands set and show the default base for both input and output of numbers. @code{set radix} sets the radix of input and output to the same base; without an argument, it resets the radix back to its default value of 10. @end table @node ABI @section Configuring the Current ABI @value{GDBN} can determine the @dfn{ABI} (Application Binary Interface) of your application automatically. However, sometimes you need to override its conclusions. Use these commands to manage @value{GDBN}'s view of the current ABI. @cindex OS ABI @kindex set osabi @kindex show osabi @cindex Newlib OS ABI and its influence on the longjmp handling One @value{GDBN} configuration can debug binaries for multiple operating system targets, either via remote debugging or native emulation. @value{GDBN} will autodetect the @dfn{OS ABI} (Operating System ABI) in use, but you can override its conclusion using the @code{set osabi} command. One example where this is useful is in debugging of binaries which use an alternate C library (e.g.@: @sc{uClibc} for @sc{gnu}/Linux) which does not have the same identifying marks that the standard C library for your platform provides. When @value{GDBN} is debugging the AArch64 architecture, it provides a ``Newlib'' OS ABI. This is useful for handling @code{setjmp} and @code{longjmp} when debugging binaries that use the @sc{newlib} C library. The ``Newlib'' OS ABI can be selected by @code{set osabi Newlib}. @table @code @item show osabi Show the OS ABI currently in use. @item set osabi With no argument, show the list of registered available OS ABI's. @item set osabi @var{abi} Set the current OS ABI to @var{abi}. @end table @cindex float promotion Generally, the way that an argument of type @code{float} is passed to a function depends on whether the function is prototyped. For a prototyped (i.e.@: ANSI/ISO style) function, @code{float} arguments are passed unchanged, according to the architecture's convention for @code{float}. For unprototyped (i.e.@: K&R style) functions, @code{float} arguments are first promoted to type @code{double} and then passed. Unfortunately, some forms of debug information do not reliably indicate whether a function is prototyped. If @value{GDBN} calls a function that is not marked as prototyped, it consults @kbd{set coerce-float-to-double}. @table @code @kindex set coerce-float-to-double @item set coerce-float-to-double @itemx set coerce-float-to-double on Arguments of type @code{float} will be promoted to @code{double} when passed to an unprototyped function. This is the default setting. @item set coerce-float-to-double off Arguments of type @code{float} will be passed directly to unprototyped functions. @kindex show coerce-float-to-double @item show coerce-float-to-double Show the current setting of promoting @code{float} to @code{double}. @end table @kindex set cp-abi @kindex show cp-abi @value{GDBN} needs to know the ABI used for your program's C@t{++} objects. The correct C@t{++} ABI depends on which C@t{++} compiler was used to build your application. @value{GDBN} only fully supports programs with a single C@t{++} ABI; if your program contains code using multiple C@t{++} ABI's or if @value{GDBN} can not identify your program's ABI correctly, you can tell @value{GDBN} which ABI to use. Currently supported ABI's include ``gnu-v2'', for @code{g++} versions before 3.0, ``gnu-v3'', for @code{g++} versions 3.0 and later, and ``hpaCC'' for the HP ANSI C@t{++} compiler. Other C@t{++} compilers may use the ``gnu-v2'' or ``gnu-v3'' ABI's as well. The default setting is ``auto''. @table @code @item show cp-abi Show the C@t{++} ABI currently in use. @item set cp-abi With no argument, show the list of supported C@t{++} ABI's. @item set cp-abi @var{abi} @itemx set cp-abi auto Set the current C@t{++} ABI to @var{abi}, or return to automatic detection. @end table @node Auto-loading @section Automatically loading associated files @cindex auto-loading @value{GDBN} sometimes reads files with commands and settings automatically, without being explicitly told so by the user. We call this feature @dfn{auto-loading}. While auto-loading is useful for automatically adapting @value{GDBN} to the needs of your project, it can sometimes produce unexpected results or introduce security risks (e.g., if the file comes from untrusted sources). Note that loading of these associated files (including the local @file{.gdbinit} file) requires accordingly configured @code{auto-load safe-path} (@pxref{Auto-loading safe path}). For these reasons, @value{GDBN} includes commands and options to let you control when to auto-load files and which files should be auto-loaded. @table @code @anchor{set auto-load off} @kindex set auto-load off @item set auto-load off Globally disable loading of all auto-loaded files. You may want to use this command with the @samp{-iex} option (@pxref{Option -init-eval-command}) such as: @smallexample $ @kbd{gdb -iex "set auto-load off" untrusted-executable corefile} @end smallexample Be aware that system init file (@pxref{System-wide configuration}) and init files from your home directory (@pxref{Home Directory Init File}) still get read (as they come from generally trusted directories). To prevent @value{GDBN} from auto-loading even those init files, use the @option{-nx} option (@pxref{Mode Options}), in addition to @code{set auto-load no}. @anchor{show auto-load} @kindex show auto-load @item show auto-load Show whether auto-loading of each specific @samp{auto-load} file(s) is enabled or disabled. @smallexample (gdb) show auto-load gdb-scripts: Auto-loading of canned sequences of commands scripts is on. libthread-db: Auto-loading of inferior specific libthread_db is on. local-gdbinit: Auto-loading of .gdbinit script from current directory is on. python-scripts: Auto-loading of Python scripts is on. safe-path: List of directories from which it is safe to auto-load files is $debugdir:$datadir/auto-load. scripts-directory: List of directories from which to load auto-loaded scripts is $debugdir:$datadir/auto-load. @end smallexample @anchor{info auto-load} @kindex info auto-load @item info auto-load Print whether each specific @samp{auto-load} file(s) have been auto-loaded or not. @smallexample (gdb) info auto-load gdb-scripts: Loaded Script Yes /home/user/gdb/gdb-gdb.gdb libthread-db: No auto-loaded libthread-db. local-gdbinit: Local .gdbinit file "/home/user/gdb/.gdbinit" has been loaded. python-scripts: Loaded Script Yes /home/user/gdb/gdb-gdb.py @end smallexample @end table These are various kinds of files @value{GDBN} can automatically load: @itemize @bullet @item @xref{objfile-gdb.py file}, controlled by @ref{set auto-load python-scripts}. @item @xref{objfile-gdb.gdb file}, controlled by @ref{set auto-load gdb-scripts}. @item @xref{dotdebug_gdb_scripts section}, controlled by @ref{set auto-load python-scripts}. @item @xref{Init File in the Current Directory}, controlled by @ref{set auto-load local-gdbinit}. @item @xref{libthread_db.so.1 file}, controlled by @ref{set auto-load libthread-db}. @end itemize These are @value{GDBN} control commands for the auto-loading: @multitable @columnfractions .5 .5 @item @xref{set auto-load off}. @tab Disable auto-loading globally. @item @xref{show auto-load}. @tab Show setting of all kinds of files. @item @xref{info auto-load}. @tab Show state of all kinds of files. @item @xref{set auto-load gdb-scripts}. @tab Control for @value{GDBN} command scripts. @item @xref{show auto-load gdb-scripts}. @tab Show setting of @value{GDBN} command scripts. @item @xref{info auto-load gdb-scripts}. @tab Show state of @value{GDBN} command scripts. @item @xref{set auto-load python-scripts}. @tab Control for @value{GDBN} Python scripts. @item @xref{show auto-load python-scripts}. @tab Show setting of @value{GDBN} Python scripts. @item @xref{info auto-load python-scripts}. @tab Show state of @value{GDBN} Python scripts. @item @xref{set auto-load scripts-directory}. @tab Control for @value{GDBN} auto-loaded scripts location. @item @xref{show auto-load scripts-directory}. @tab Show @value{GDBN} auto-loaded scripts location. @item @xref{set auto-load local-gdbinit}. @tab Control for init file in the current directory. @item @xref{show auto-load local-gdbinit}. @tab Show setting of init file in the current directory. @item @xref{info auto-load local-gdbinit}. @tab Show state of init file in the current directory. @item @xref{set auto-load libthread-db}. @tab Control for thread debugging library. @item @xref{show auto-load libthread-db}. @tab Show setting of thread debugging library. @item @xref{info auto-load libthread-db}. @tab Show state of thread debugging library. @item @xref{set auto-load safe-path}. @tab Control directories trusted for automatic loading. @item @xref{show auto-load safe-path}. @tab Show directories trusted for automatic loading. @item @xref{add-auto-load-safe-path}. @tab Add directory trusted for automatic loading. @end multitable @menu * Init File in the Current Directory:: @samp{set/show/info auto-load local-gdbinit} * libthread_db.so.1 file:: @samp{set/show/info auto-load libthread-db} * objfile-gdb.gdb file:: @samp{set/show/info auto-load gdb-script} * Auto-loading safe path:: @samp{set/show/info auto-load safe-path} * Auto-loading verbose mode:: @samp{set/show debug auto-load} @xref{Python Auto-loading}. @end menu @node Init File in the Current Directory @subsection Automatically loading init file in the current directory @cindex auto-loading init file in the current directory By default, @value{GDBN} reads and executes the canned sequences of commands from init file (if any) in the current working directory, see @ref{Init File in the Current Directory during Startup}. Note that loading of this local @file{.gdbinit} file also requires accordingly configured @code{auto-load safe-path} (@pxref{Auto-loading safe path}). @table @code @anchor{set auto-load local-gdbinit} @kindex set auto-load local-gdbinit @item set auto-load local-gdbinit [on|off] Enable or disable the auto-loading of canned sequences of commands (@pxref{Sequences}) found in init file in the current directory. @anchor{show auto-load local-gdbinit} @kindex show auto-load local-gdbinit @item show auto-load local-gdbinit Show whether auto-loading of canned sequences of commands from init file in the current directory is enabled or disabled. @anchor{info auto-load local-gdbinit} @kindex info auto-load local-gdbinit @item info auto-load local-gdbinit Print whether canned sequences of commands from init file in the current directory have been auto-loaded. @end table @node libthread_db.so.1 file @subsection Automatically loading thread debugging library @cindex auto-loading libthread_db.so.1 This feature is currently present only on @sc{gnu}/Linux native hosts. @value{GDBN} reads in some cases thread debugging library from places specific to the inferior (@pxref{set libthread-db-search-path}). The special @samp{libthread-db-search-path} entry @samp{$sdir} is processed without checking this @samp{set auto-load libthread-db} switch as system libraries have to be trusted in general. In all other cases of @samp{libthread-db-search-path} entries @value{GDBN} checks first if @samp{set auto-load libthread-db} is enabled before trying to open such thread debugging library. Note that loading of this debugging library also requires accordingly configured @code{auto-load safe-path} (@pxref{Auto-loading safe path}). @table @code @anchor{set auto-load libthread-db} @kindex set auto-load libthread-db @item set auto-load libthread-db [on|off] Enable or disable the auto-loading of inferior specific thread debugging library. @anchor{show auto-load libthread-db} @kindex show auto-load libthread-db @item show auto-load libthread-db Show whether auto-loading of inferior specific thread debugging library is enabled or disabled. @anchor{info auto-load libthread-db} @kindex info auto-load libthread-db @item info auto-load libthread-db Print the list of all loaded inferior specific thread debugging libraries and for each such library print list of inferior @var{pid}s using it. @end table @node objfile-gdb.gdb file @subsection The @file{@var{objfile}-gdb.gdb} file @cindex auto-loading @file{@var{objfile}-gdb.gdb} @value{GDBN} tries to load an @file{@var{objfile}-gdb.gdb} file containing canned sequences of commands (@pxref{Sequences}), as long as @samp{set auto-load gdb-scripts} is set to @samp{on}. Note that loading of this script file also requires accordingly configured @code{auto-load safe-path} (@pxref{Auto-loading safe path}). For more background refer to the similar Python scripts auto-loading description (@pxref{objfile-gdb.py file}). @table @code @anchor{set auto-load gdb-scripts} @kindex set auto-load gdb-scripts @item set auto-load gdb-scripts [on|off] Enable or disable the auto-loading of canned sequences of commands scripts. @anchor{show auto-load gdb-scripts} @kindex show auto-load gdb-scripts @item show auto-load gdb-scripts Show whether auto-loading of canned sequences of commands scripts is enabled or disabled. @anchor{info auto-load gdb-scripts} @kindex info auto-load gdb-scripts @cindex print list of auto-loaded canned sequences of commands scripts @item info auto-load gdb-scripts [@var{regexp}] Print the list of all canned sequences of commands scripts that @value{GDBN} auto-loaded. @end table If @var{regexp} is supplied only canned sequences of commands scripts with matching names are printed. @node Auto-loading safe path @subsection Security restriction for auto-loading @cindex auto-loading safe-path As the files of inferior can come from untrusted source (such as submitted by an application user) @value{GDBN} does not always load any files automatically. @value{GDBN} provides the @samp{set auto-load safe-path} setting to list directories trusted for loading files not explicitly requested by user. Each directory can also be a shell wildcard pattern. If the path is not set properly you will see a warning and the file will not get loaded: @smallexample $ ./gdb -q ./gdb Reading symbols from /home/user/gdb/gdb...done. warning: File "/home/user/gdb/gdb-gdb.gdb" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". warning: File "/home/user/gdb/gdb-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". @end smallexample @noindent To instruct @value{GDBN} to go ahead and use the init files anyway, invoke @value{GDBN} like this: @smallexample $ gdb -q -iex "set auto-load safe-path /home/user/gdb" ./gdb @end smallexample The list of trusted directories is controlled by the following commands: @table @code @anchor{set auto-load safe-path} @kindex set auto-load safe-path @item set auto-load safe-path @r{[}@var{directories}@r{]} Set the list of directories (and their subdirectories) trusted for automatic loading and execution of scripts. You can also enter a specific trusted file. Each directory can also be a shell wildcard pattern; wildcards do not match directory separator - see @code{FNM_PATHNAME} for system function @code{fnmatch} (@pxref{Wildcard Matching, fnmatch, , libc, GNU C Library Reference Manual}). If you omit @var{directories}, @samp{auto-load safe-path} will be reset to its default value as specified during @value{GDBN} compilation. The list of directories uses path separator (@samp{:} on GNU and Unix systems, @samp{;} on MS-Windows and MS-DOS) to separate directories, similarly to the @env{PATH} environment variable. @anchor{show auto-load safe-path} @kindex show auto-load safe-path @item show auto-load safe-path Show the list of directories trusted for automatic loading and execution of scripts. @anchor{add-auto-load-safe-path} @kindex add-auto-load-safe-path @item add-auto-load-safe-path Add an entry (or list of entries) the list of directories trusted for automatic loading and execution of scripts. Multiple entries may be delimited by the host platform path separator in use. @end table This variable defaults to what @code{--with-auto-load-dir} has been configured to (@pxref{with-auto-load-dir}). @file{$debugdir} and @file{$datadir} substitution applies the same as for @ref{set auto-load scripts-directory}. The default @code{set auto-load safe-path} value can be also overriden by @value{GDBN} configuration option @option{--with-auto-load-safe-path}. Setting this variable to @file{/} disables this security protection, corresponding @value{GDBN} configuration option is @option{--without-auto-load-safe-path}. This variable is supposed to be set to the system directories writable by the system superuser only. Users can add their source directories in init files in their home directories (@pxref{Home Directory Init File}). See also deprecated init file in the current directory (@pxref{Init File in the Current Directory during Startup}). To force @value{GDBN} to load the files it declined to load in the previous example, you could use one of the following ways: @table @asis @item @file{~/.gdbinit}: @samp{add-auto-load-safe-path ~/src/gdb} Specify this trusted directory (or a file) as additional component of the list. You have to specify also any existing directories displayed by by @samp{show auto-load safe-path} (such as @samp{/usr:/bin} in this example). @item @kbd{gdb -iex "set auto-load safe-path /usr:/bin:~/src/gdb" @dots{}} Specify this directory as in the previous case but just for a single @value{GDBN} session. @item @kbd{gdb -iex "set auto-load safe-path /" @dots{}} Disable auto-loading safety for a single @value{GDBN} session. This assumes all the files you debug during this @value{GDBN} session will come from trusted sources. @item @kbd{./configure --without-auto-load-safe-path} During compilation of @value{GDBN} you may disable any auto-loading safety. This assumes all the files you will ever debug with this @value{GDBN} come from trusted sources. @end table On the other hand you can also explicitly forbid automatic files loading which also suppresses any such warning messages: @table @asis @item @kbd{gdb -iex "set auto-load no" @dots{}} You can use @value{GDBN} command-line option for a single @value{GDBN} session. @item @file{~/.gdbinit}: @samp{set auto-load no} Disable auto-loading globally for the user (@pxref{Home Directory Init File}). While it is improbable, you could also use system init file instead (@pxref{System-wide configuration}). @end table This setting applies to the file names as entered by user. If no entry matches @value{GDBN} tries as a last resort to also resolve all the file names into their canonical form (typically resolving symbolic links) and compare the entries again. @value{GDBN} already canonicalizes most of the filenames on its own before starting the comparison so a canonical form of directories is recommended to be entered. @node Auto-loading verbose mode @subsection Displaying files tried for auto-load @cindex auto-loading verbose mode For better visibility of all the file locations where you can place scripts to be auto-loaded with inferior --- or to protect yourself against accidental execution of untrusted scripts --- @value{GDBN} provides a feature for printing all the files attempted to be loaded. Both existing and non-existing files may be printed. For example the list of directories from which it is safe to auto-load files (@pxref{Auto-loading safe path}) applies also to canonicalized filenames which may not be too obvious while setting it up. @smallexample (gdb) set debug auto-load on (gdb) file ~/src/t/true auto-load: Loading canned sequences of commands script "/tmp/true-gdb.gdb" for objfile "/tmp/true". auto-load: Updating directories of "/usr:/opt". auto-load: Using directory "/usr". auto-load: Using directory "/opt". warning: File "/tmp/true-gdb.gdb" auto-loading has been declined by your `auto-load safe-path' set to "/usr:/opt". @end smallexample @table @code @anchor{set debug auto-load} @kindex set debug auto-load @item set debug auto-load [on|off] Set whether to print the filenames attempted to be auto-loaded. @anchor{show debug auto-load} @kindex show debug auto-load @item show debug auto-load Show whether printing of the filenames attempted to be auto-loaded is turned on or off. @end table @node Messages/Warnings @section Optional Warnings and Messages @cindex verbose operation @cindex optional warnings By default, @value{GDBN} is silent about its inner workings. If you are running on a slow machine, you may want to use the @code{set verbose} command. This makes @value{GDBN} tell you when it does a lengthy internal operation, so you will not think it has crashed. Currently, the messages controlled by @code{set verbose} are those which announce that the symbol table for a source file is being read; see @code{symbol-file} in @ref{Files, ,Commands to Specify Files}. @table @code @kindex set verbose @item set verbose on Enables @value{GDBN} output of certain informational messages. @item set verbose off Disables @value{GDBN} output of certain informational messages. @kindex show verbose @item show verbose Displays whether @code{set verbose} is on or off. @end table By default, if @value{GDBN} encounters bugs in the symbol table of an object file, it is silent; but if you are debugging a compiler, you may find this information useful (@pxref{Symbol Errors, ,Errors Reading Symbol Files}). @table @code @kindex set complaints @item set complaints @var{limit} Permits @value{GDBN} to output @var{limit} complaints about each type of unusual symbols before becoming silent about the problem. Set @var{limit} to zero to suppress all complaints; set it to a large number to prevent complaints from being suppressed. @kindex show complaints @item show complaints Displays how many symbol complaints @value{GDBN} is permitted to produce. @end table @anchor{confirmation requests} By default, @value{GDBN} is cautious, and asks what sometimes seems to be a lot of stupid questions to confirm certain commands. For example, if you try to run a program which is already running: @smallexample (@value{GDBP}) run The program being debugged has been started already. Start it from the beginning? (y or n) @end smallexample If you are willing to unflinchingly face the consequences of your own commands, you can disable this ``feature'': @table @code @kindex set confirm @cindex flinching @cindex confirmation @cindex stupid questions @item set confirm off Disables confirmation requests. Note that running @value{GDBN} with the @option{--batch} option (@pxref{Mode Options, -batch}) also automatically disables confirmation requests. @item set confirm on Enables confirmation requests (the default). @kindex show confirm @item show confirm Displays state of confirmation requests. @end table @cindex command tracing If you need to debug user-defined commands or sourced files you may find it useful to enable @dfn{command tracing}. In this mode each command will be printed as it is executed, prefixed with one or more @samp{+} symbols, the quantity denoting the call depth of each command. @table @code @kindex set trace-commands @cindex command scripts, debugging @item set trace-commands on Enable command tracing. @item set trace-commands off Disable command tracing. @item show trace-commands Display the current state of command tracing. @end table @node Debugging Output @section Optional Messages about Internal Happenings @cindex optional debugging messages @value{GDBN} has commands that enable optional debugging messages from various @value{GDBN} subsystems; normally these commands are of interest to @value{GDBN} maintainers, or when reporting a bug. This section documents those commands. @table @code @kindex set exec-done-display @item set exec-done-display Turns on or off the notification of asynchronous commands' completion. When on, @value{GDBN} will print a message when an asynchronous command finishes its execution. The default is off. @kindex show exec-done-display @item show exec-done-display Displays the current setting of asynchronous command completion notification. @kindex set debug @cindex ARM AArch64 @item set debug aarch64 Turns on or off display of debugging messages related to ARM AArch64. The default is off. @kindex show debug @item show debug aarch64 Displays the current state of displaying debugging messages related to ARM AArch64. @cindex gdbarch debugging info @cindex architecture debugging info @item set debug arch Turns on or off display of gdbarch debugging info. The default is off @item show debug arch Displays the current state of displaying gdbarch debugging info. @item set debug aix-thread @cindex AIX threads Display debugging messages about inner workings of the AIX thread module. @item show debug aix-thread Show the current state of AIX thread debugging info display. @item set debug check-physname @cindex physname Check the results of the ``physname'' computation. When reading DWARF debugging information for C@t{++}, @value{GDBN} attempts to compute each entity's name. @value{GDBN} can do this computation in two different ways, depending on exactly what information is present. When enabled, this setting causes @value{GDBN} to compute the names both ways and display any discrepancies. @item show debug check-physname Show the current state of ``physname'' checking. @item set debug coff-pe-read @cindex COFF/PE exported symbols Control display of debugging messages related to reading of COFF/PE exported symbols. The default is off. @item show debug coff-pe-read Displays the current state of displaying debugging messages related to reading of COFF/PE exported symbols. @item set debug dwarf2-die @cindex DWARF2 DIEs Dump DWARF2 DIEs after they are read in. The value is the number of nesting levels to print. A value of zero turns off the display. @item show debug dwarf2-die Show the current state of DWARF2 DIE debugging. @item set debug dwarf2-read @cindex DWARF2 Reading Turns on or off display of debugging messages related to reading DWARF debug info. The default is off. @item show debug dwarf2-read Show the current state of DWARF2 reader debugging. @item set debug displaced @cindex displaced stepping debugging info Turns on or off display of @value{GDBN} debugging info for the displaced stepping support. The default is off. @item show debug displaced Displays the current state of displaying @value{GDBN} debugging info related to displaced stepping. @item set debug event @cindex event debugging info Turns on or off display of @value{GDBN} event debugging info. The default is off. @item show debug event Displays the current state of displaying @value{GDBN} event debugging info. @item set debug expression @cindex expression debugging info Turns on or off display of debugging info about @value{GDBN} expression parsing. The default is off. @item show debug expression Displays the current state of displaying debugging info about @value{GDBN} expression parsing. @item set debug frame @cindex frame debugging info Turns on or off display of @value{GDBN} frame debugging info. The default is off. @item show debug frame Displays the current state of displaying @value{GDBN} frame debugging info. @item set debug gnu-nat @cindex @sc{gnu}/Hurd debug messages Turns on or off debugging messages from the @sc{gnu}/Hurd debug support. @item show debug gnu-nat Show the current state of @sc{gnu}/Hurd debugging messages. @item set debug infrun @cindex inferior debugging info Turns on or off display of @value{GDBN} debugging info for running the inferior. The default is off. @file{infrun.c} contains GDB's runtime state machine used for implementing operations such as single-stepping the inferior. @item show debug infrun Displays the current state of @value{GDBN} inferior debugging. @item set debug jit @cindex just-in-time compilation, debugging messages Turns on or off debugging messages from JIT debug support. @item show debug jit Displays the current state of @value{GDBN} JIT debugging. @item set debug lin-lwp @cindex @sc{gnu}/Linux LWP debug messages @cindex Linux lightweight processes Turns on or off debugging messages from the Linux LWP debug support. @item show debug lin-lwp Show the current state of Linux LWP debugging messages. @item set debug mach-o @cindex Mach-O symbols processing Control display of debugging messages related to Mach-O symbols processing. The default is off. @item show debug mach-o Displays the current state of displaying debugging messages related to reading of COFF/PE exported symbols. @item set debug notification @cindex remote async notification debugging info Turns on or off debugging messages about remote async notification. The default is off. @item show debug notification Displays the current state of remote async notification debugging messages. @item set debug observer @cindex observer debugging info Turns on or off display of @value{GDBN} observer debugging. This includes info such as the notification of observable events. @item show debug observer Displays the current state of observer debugging. @item set debug overload @cindex C@t{++} overload debugging info Turns on or off display of @value{GDBN} C@t{++} overload debugging info. This includes info such as ranking of functions, etc. The default is off. @item show debug overload Displays the current state of displaying @value{GDBN} C@t{++} overload debugging info. @cindex expression parser, debugging info @cindex debug expression parser @item set debug parser Turns on or off the display of expression parser debugging output. Internally, this sets the @code{yydebug} variable in the expression parser. @xref{Tracing, , Tracing Your Parser, bison, Bison}, for details. The default is off. @item show debug parser Show the current state of expression parser debugging. @cindex packets, reporting on stdout @cindex serial connections, debugging @cindex debug remote protocol @cindex remote protocol debugging @cindex display remote packets @item set debug remote Turns on or off display of reports on all packets sent back and forth across the serial line to the remote machine. The info is printed on the @value{GDBN} standard output stream. The default is off. @item show debug remote Displays the state of display of remote packets. @item set debug serial Turns on or off display of @value{GDBN} serial debugging info. The default is off. @item show debug serial Displays the current state of displaying @value{GDBN} serial debugging info. @item set debug solib-frv @cindex FR-V shared-library debugging Turns on or off debugging messages for FR-V shared-library code. @item show debug solib-frv Display the current state of FR-V shared-library code debugging messages. @item set debug symtab-create @cindex symbol table creation Turns on or off display of debugging messages related to symbol table creation. The default is off. @item show debug symtab-create Show the current state of symbol table creation debugging. @item set debug target @cindex target debugging info Turns on or off display of @value{GDBN} target debugging info. This info includes what is going on at the target level of GDB, as it happens. The default is 0. Set it to 1 to track events, and to 2 to also track the value of large memory transfers. Changes to this flag do not take effect until the next time you connect to a target or use the @code{run} command. @item show debug target Displays the current state of displaying @value{GDBN} target debugging info. @item set debug timestamp @cindex timestampping debugging info Turns on or off display of timestamps with @value{GDBN} debugging info. When enabled, seconds and microseconds are displayed before each debugging message. @item show debug timestamp Displays the current state of displaying timestamps with @value{GDBN} debugging info. @item set debugvarobj @cindex variable object debugging info Turns on or off display of @value{GDBN} variable object debugging info. The default is off. @item show debugvarobj Displays the current state of displaying @value{GDBN} variable object debugging info. @item set debug xml @cindex XML parser debugging Turns on or off debugging messages for built-in XML parsers. @item show debug xml Displays the current state of XML debugging messages. @end table @node Other Misc Settings @section Other Miscellaneous Settings @cindex miscellaneous settings @table @code @kindex set interactive-mode @item set interactive-mode If @code{on}, forces @value{GDBN} to assume that GDB was started in a terminal. In practice, this means that @value{GDBN} should wait for the user to answer queries generated by commands entered at the command prompt. If @code{off}, forces @value{GDBN} to operate in the opposite mode, and it uses the default answers to all queries. If @code{auto} (the default), @value{GDBN} tries to determine whether its standard input is a terminal, and works in interactive-mode if it is, non-interactively otherwise. In the vast majority of cases, the debugger should be able to guess correctly which mode should be used. But this setting can be useful in certain specific cases, such as running a MinGW @value{GDBN} inside a cygwin window. @kindex show interactive-mode @item show interactive-mode Displays whether the debugger is operating in interactive mode or not. @end table @node Extending GDB @chapter Extending @value{GDBN} @cindex extending GDB @value{GDBN} provides three mechanisms for extension. The first is based on composition of @value{GDBN} commands, the second is based on the Python scripting language, and the third is for defining new aliases of existing commands. To facilitate the use of the first two extensions, @value{GDBN} is capable of evaluating the contents of a file. When doing so, @value{GDBN} can recognize which scripting language is being used by looking at the filename extension. Files with an unrecognized filename extension are always treated as a @value{GDBN} Command Files. @xref{Command Files,, Command files}. You can control how @value{GDBN} evaluates these files with the following setting: @table @code @kindex set script-extension @kindex show script-extension @item set script-extension off All scripts are always evaluated as @value{GDBN} Command Files. @item set script-extension soft The debugger determines the scripting language based on filename extension. If this scripting language is supported, @value{GDBN} evaluates the script using that language. Otherwise, it evaluates the file as a @value{GDBN} Command File. @item set script-extension strict The debugger determines the scripting language based on filename extension, and evaluates the script using that language. If the language is not supported, then the evaluation fails. @item show script-extension Display the current value of the @code{script-extension} option. @end table @menu * Sequences:: Canned Sequences of Commands * Python:: Scripting @value{GDBN} using Python * Aliases:: Creating new spellings of existing commands @end menu @node Sequences @section Canned Sequences of Commands Aside from breakpoint commands (@pxref{Break Commands, ,Breakpoint Command Lists}), @value{GDBN} provides two ways to store sequences of commands for execution as a unit: user-defined commands and command files. @menu * Define:: How to define your own commands * Hooks:: Hooks for user-defined commands * Command Files:: How to write scripts of commands to be stored in a file * Output:: Commands for controlled output @end menu @node Define @subsection User-defined Commands @cindex user-defined command @cindex arguments, to user-defined commands A @dfn{user-defined command} is a sequence of @value{GDBN} commands to which you assign a new name as a command. This is done with the @code{define} command. User commands may accept up to 10 arguments separated by whitespace. Arguments are accessed within the user command via @code{$arg0@dots{}$arg9}. A trivial example: @smallexample define adder print $arg0 + $arg1 + $arg2 end @end smallexample @noindent To execute the command use: @smallexample adder 1 2 3 @end smallexample @noindent This defines the command @code{adder}, which prints the sum of its three arguments. Note the arguments are text substitutions, so they may reference variables, use complex expressions, or even perform inferior functions calls. @cindex argument count in user-defined commands @cindex how many arguments (user-defined commands) In addition, @code{$argc} may be used to find out how many arguments have been passed. This expands to a number in the range 0@dots{}10. @smallexample define adder if $argc == 2 print $arg0 + $arg1 end if $argc == 3 print $arg0 + $arg1 + $arg2 end end @end smallexample @table @code @kindex define @item define @var{commandname} Define a command named @var{commandname}. If there is already a command by that name, you are asked to confirm that you want to redefine it. @var{commandname} may be a bare command name consisting of letters, numbers, dashes, and underscores. It may also start with any predefined prefix command. For example, @samp{define target my-target} creates a user-defined @samp{target my-target} command. The definition of the command is made up of other @value{GDBN} command lines, which are given following the @code{define} command. The end of these commands is marked by a line containing @code{end}. @kindex document @kindex end@r{ (user-defined commands)} @item document @var{commandname} Document the user-defined command @var{commandname}, so that it can be accessed by @code{help}. The command @var{commandname} must already be defined. This command reads lines of documentation just as @code{define} reads the lines of the command definition, ending with @code{end}. After the @code{document} command is finished, @code{help} on command @var{commandname} displays the documentation you have written. You may use the @code{document} command again to change the documentation of a command. Redefining the command with @code{define} does not change the documentation. @kindex dont-repeat @cindex don't repeat command @item dont-repeat Used inside a user-defined command, this tells @value{GDBN} that this command should not be repeated when the user hits @key{RET} (@pxref{Command Syntax, repeat last command}). @kindex help user-defined @item help user-defined List all user-defined commands and all python commands defined in class COMAND_USER. The first line of the documentation or docstring is included (if any). @kindex show user @item show user @itemx show user @var{commandname} Display the @value{GDBN} commands used to define @var{commandname} (but not its documentation). If no @var{commandname} is given, display the definitions for all user-defined commands. This does not work for user-defined python commands. @cindex infinite recursion in user-defined commands @kindex show max-user-call-depth @kindex set max-user-call-depth @item show max-user-call-depth @itemx set max-user-call-depth The value of @code{max-user-call-depth} controls how many recursion levels are allowed in user-defined commands before @value{GDBN} suspects an infinite recursion and aborts the command. This does not apply to user-defined python commands. @end table In addition to the above commands, user-defined commands frequently use control flow commands, described in @ref{Command Files}. When user-defined commands are executed, the commands of the definition are not printed. An error in any command stops execution of the user-defined command. If used interactively, commands that would ask for confirmation proceed without asking when used inside a user-defined command. Many @value{GDBN} commands that normally print messages to say what they are doing omit the messages when used in a user-defined command. @node Hooks @subsection User-defined Command Hooks @cindex command hooks @cindex hooks, for commands @cindex hooks, pre-command @kindex hook You may define @dfn{hooks}, which are a special kind of user-defined command. Whenever you run the command @samp{foo}, if the user-defined command @samp{hook-foo} exists, it is executed (with no arguments) before that command. @cindex hooks, post-command @kindex hookpost A hook may also be defined which is run after the command you executed. Whenever you run the command @samp{foo}, if the user-defined command @samp{hookpost-foo} exists, it is executed (with no arguments) after that command. Post-execution hooks may exist simultaneously with pre-execution hooks, for the same command. It is valid for a hook to call the command which it hooks. If this occurs, the hook is not re-executed, thereby avoiding infinite recursion. @c It would be nice if hookpost could be passed a parameter indicating @c if the command it hooks executed properly or not. FIXME! @kindex stop@r{, a pseudo-command} In addition, a pseudo-command, @samp{stop} exists. Defining (@samp{hook-stop}) makes the associated commands execute every time execution stops in your program: before breakpoint commands are run, displays are printed, or the stack frame is printed. For example, to ignore @code{SIGALRM} signals while single-stepping, but treat them normally during normal execution, you could define: @smallexample define hook-stop handle SIGALRM nopass end define hook-run handle SIGALRM pass end define hook-continue handle SIGALRM pass end @end smallexample As a further example, to hook at the beginning and end of the @code{echo} command, and to add extra text to the beginning and end of the message, you could define: @smallexample define hook-echo echo <<<--- end define hookpost-echo echo --->>>\n end (@value{GDBP}) echo Hello World <<<---Hello World--->>> (@value{GDBP}) @end smallexample You can define a hook for any single-word command in @value{GDBN}, but not for command aliases; you should define a hook for the basic command name, e.g.@: @code{backtrace} rather than @code{bt}. @c FIXME! So how does Joe User discover whether a command is an alias @c or not? You can hook a multi-word command by adding @code{hook-} or @code{hookpost-} to the last word of the command, e.g.@: @samp{define target hook-remote} to add a hook to @samp{target remote}. If an error occurs during the execution of your hook, execution of @value{GDBN} commands stops and @value{GDBN} issues a prompt (before the command that you actually typed had a chance to run). If you try to define a hook which does not match any known command, you get a warning from the @code{define} command. @node Command Files @subsection Command Files @cindex command files @cindex scripting commands A command file for @value{GDBN} is a text file made of lines that are @value{GDBN} commands. Comments (lines starting with @kbd{#}) may also be included. An empty line in a command file does nothing; it does not mean to repeat the last command, as it would from the terminal. You can request the execution of a command file with the @code{source} command. Note that the @code{source} command is also used to evaluate scripts that are not Command Files. The exact behavior can be configured using the @code{script-extension} setting. @xref{Extending GDB,, Extending GDB}. @table @code @kindex source @cindex execute commands from a file @item source [-s] [-v] @var{filename} Execute the command file @var{filename}. @end table The lines in a command file are generally executed sequentially, unless the order of execution is changed by one of the @emph{flow-control commands} described below. The commands are not printed as they are executed. An error in any command terminates execution of the command file and control is returned to the console. @value{GDBN} first searches for @var{filename} in the current directory. If the file is not found there, and @var{filename} does not specify a directory, then @value{GDBN} also looks for the file on the source search path (specified with the @samp{directory} command); except that @file{$cdir} is not searched because the compilation directory is not relevant to scripts. If @code{-s} is specified, then @value{GDBN} searches for @var{filename} on the search path even if @var{filename} specifies a directory. The search is done by appending @var{filename} to each element of the search path. So, for example, if @var{filename} is @file{mylib/myscript} and the search path contains @file{/home/user} then @value{GDBN} will look for the script @file{/home/user/mylib/myscript}. The search is also done if @var{filename} is an absolute path. For example, if @var{filename} is @file{/tmp/myscript} and the search path contains @file{/home/user} then @value{GDBN} will look for the script @file{/home/user/tmp/myscript}. For DOS-like systems, if @var{filename} contains a drive specification, it is stripped before concatenation. For example, if @var{filename} is @file{d:myscript} and the search path contains @file{c:/tmp} then @value{GDBN} will look for the script @file{c:/tmp/myscript}. If @code{-v}, for verbose mode, is given then @value{GDBN} displays each command as it is executed. The option must be given before @var{filename}, and is interpreted as part of the filename anywhere else. Commands that would ask for confirmation if used interactively proceed without asking when used in a command file. Many @value{GDBN} commands that normally print messages to say what they are doing omit the messages when called from command files. @value{GDBN} also accepts command input from standard input. In this mode, normal output goes to standard output and error output goes to standard error. Errors in a command file supplied on standard input do not terminate execution of the command file---execution continues with the next command. @smallexample gdb < cmds > log 2>&1 @end smallexample (The syntax above will vary depending on the shell used.) This example will execute commands from the file @file{cmds}. All output and errors would be directed to @file{log}. Since commands stored on command files tend to be more general than commands typed interactively, they frequently need to deal with complicated situations, such as different or unexpected values of variables and symbols, changes in how the program being debugged is built, etc. @value{GDBN} provides a set of flow-control commands to deal with these complexities. Using these commands, you can write complex scripts that loop over data structures, execute commands conditionally, etc. @table @code @kindex if @kindex else @item if @itemx else This command allows to include in your script conditionally executed commands. The @code{if} command takes a single argument, which is an expression to evaluate. It is followed by a series of commands that are executed only if the expression is true (its value is nonzero). There can then optionally be an @code{else} line, followed by a series of commands that are only executed if the expression was false. The end of the list is marked by a line containing @code{end}. @kindex while @item while This command allows to write loops. Its syntax is similar to @code{if}: the command takes a single argument, which is an expression to evaluate, and must be followed by the commands to execute, one per line, terminated by an @code{end}. These commands are called the @dfn{body} of the loop. The commands in the body of @code{while} are executed repeatedly as long as the expression evaluates to true. @kindex loop_break @item loop_break This command exits the @code{while} loop in whose body it is included. Execution of the script continues after that @code{while}s @code{end} line. @kindex loop_continue @item loop_continue This command skips the execution of the rest of the body of commands in the @code{while} loop in whose body it is included. Execution branches to the beginning of the @code{while} loop, where it evaluates the controlling expression. @kindex end@r{ (if/else/while commands)} @item end Terminate the block of commands that are the body of @code{if}, @code{else}, or @code{while} flow-control commands. @end table @node Output @subsection Commands for Controlled Output During the execution of a command file or a user-defined command, normal @value{GDBN} output is suppressed; the only output that appears is what is explicitly printed by the commands in the definition. This section describes three commands useful for generating exactly the output you want. @table @code @kindex echo @item echo @var{text} @c I do not consider backslash-space a standard C escape sequence @c because it is not in ANSI. Print @var{text}. Nonprinting characters can be included in @var{text} using C escape sequences, such as @samp{\n} to print a newline. @strong{No newline is printed unless you specify one.} In addition to the standard C escape sequences, a backslash followed by a space stands for a space. This is useful for displaying a string with spaces at the beginning or the end, since leading and trailing spaces are otherwise trimmed from all arguments. To print @samp{@w{ }and foo =@w{ }}, use the command @samp{echo \@w{ }and foo = \@w{ }}. A backslash at the end of @var{text} can be used, as in C, to continue the command onto subsequent lines. For example, @smallexample echo This is some text\n\ which is continued\n\ onto several lines.\n @end smallexample produces the same output as @smallexample echo This is some text\n echo which is continued\n echo onto several lines.\n @end smallexample @kindex output @item output @var{expression} Print the value of @var{expression} and nothing but that value: no newlines, no @samp{$@var{nn} = }. The value is not entered in the value history either. @xref{Expressions, ,Expressions}, for more information on expressions. @item output/@var{fmt} @var{expression} Print the value of @var{expression} in format @var{fmt}. You can use the same formats as for @code{print}. @xref{Output Formats,,Output Formats}, for more information. @kindex printf @item printf @var{template}, @var{expressions}@dots{} Print the values of one or more @var{expressions} under the control of the string @var{template}. To print several values, make @var{expressions} be a comma-separated list of individual expressions, which may be either numbers or pointers. Their values are printed as specified by @var{template}, exactly as a C program would do by executing the code below: @smallexample printf (@var{template}, @var{expressions}@dots{}); @end smallexample As in @code{C} @code{printf}, ordinary characters in @var{template} are printed verbatim, while @dfn{conversion specification} introduced by the @samp{%} character cause subsequent @var{expressions} to be evaluated, their values converted and formatted according to type and style information encoded in the conversion specifications, and then printed. For example, you can print two values in hex like this: @smallexample printf "foo, bar-foo = 0x%x, 0x%x\n", foo, bar-foo @end smallexample @code{printf} supports all the standard @code{C} conversion specifications, including the flags and modifiers between the @samp{%} character and the conversion letter, with the following exceptions: @itemize @bullet @item The argument-ordering modifiers, such as @samp{2$}, are not supported. @item The modifier @samp{*} is not supported for specifying precision or width. @item The @samp{'} flag (for separation of digits into groups according to @code{LC_NUMERIC'}) is not supported. @item The type modifiers @samp{hh}, @samp{j}, @samp{t}, and @samp{z} are not supported. @item The conversion letter @samp{n} (as in @samp{%n}) is not supported. @item The conversion letters @samp{a} and @samp{A} are not supported. @end itemize @noindent Note that the @samp{ll} type modifier is supported only if the underlying @code{C} implementation used to build @value{GDBN} supports the @code{long long int} type, and the @samp{L} type modifier is supported only if @code{long double} type is available. As in @code{C}, @code{printf} supports simple backslash-escape sequences, such as @code{\n}, @samp{\t}, @samp{\\}, @samp{\"}, @samp{\a}, and @samp{\f}, that consist of backslash followed by a single character. Octal and hexadecimal escape sequences are not supported. Additionally, @code{printf} supports conversion specifications for DFP (@dfn{Decimal Floating Point}) types using the following length modifiers together with a floating point specifier. letters: @itemize @bullet @item @samp{H} for printing @code{Decimal32} types. @item @samp{D} for printing @code{Decimal64} types. @item @samp{DD} for printing @code{Decimal128} types. @end itemize If the underlying @code{C} implementation used to build @value{GDBN} has support for the three length modifiers for DFP types, other modifiers such as width and precision will also be available for @value{GDBN} to use. In case there is no such @code{C} support, no additional modifiers will be available and the value will be printed in the standard way. Here's an example of printing DFP types using the above conversion letters: @smallexample printf "D32: %Hf - D64: %Df - D128: %DDf\n",1.2345df,1.2E10dd,1.2E1dl @end smallexample @kindex eval @item eval @var{template}, @var{expressions}@dots{} Convert the values of one or more @var{expressions} under the control of the string @var{template} to a command line, and call it. @end table @node Python @section Scripting @value{GDBN} using Python @cindex python scripting @cindex scripting with python You can script @value{GDBN} using the @uref{http://www.python.org/, Python programming language}. This feature is available only if @value{GDBN} was configured using @option{--with-python}. @cindex python directory Python scripts used by @value{GDBN} should be installed in @file{@var{data-directory}/python}, where @var{data-directory} is the data directory as determined at @value{GDBN} startup (@pxref{Data Files}). This directory, known as the @dfn{python directory}, is automatically added to the Python Search Path in order to allow the Python interpreter to locate all scripts installed at this location. Additionally, @value{GDBN} commands and convenience functions which are written in Python and are located in the @file{@var{data-directory}/python/gdb/command} or @file{@var{data-directory}/python/gdb/function} directories are automatically imported when @value{GDBN} starts. @menu * Python Commands:: Accessing Python from @value{GDBN}. * Python API:: Accessing @value{GDBN} from Python. * Python Auto-loading:: Automatically loading Python code. * Python modules:: Python modules provided by @value{GDBN}. @end menu @node Python Commands @subsection Python Commands @cindex python commands @cindex commands to access python @value{GDBN} provides two commands for accessing the Python interpreter, and one related setting: @table @code @kindex python-interactive @kindex pi @item python-interactive @r{[}@var{command}@r{]} @itemx pi @r{[}@var{command}@r{]} Without an argument, the @code{python-interactive} command can be used to start an interactive Python prompt. To return to @value{GDBN}, type the @code{EOF} character (e.g., @kbd{Ctrl-D} on an empty prompt). Alternatively, a single-line Python command can be given as an argument and evaluated. If the command is an expression, the result will be printed; otherwise, nothing will be printed. For example: @smallexample (@value{GDBP}) python-interactive 2 + 3 5 @end smallexample @kindex python @kindex py @item python @r{[}@var{command}@r{]} @itemx py @r{[}@var{command}@r{]} The @code{python} command can be used to evaluate Python code. If given an argument, the @code{python} command will evaluate the argument as a Python command. For example: @smallexample (@value{GDBP}) python print 23 23 @end smallexample If you do not provide an argument to @code{python}, it will act as a multi-line command, like @code{define}. In this case, the Python script is made up of subsequent command lines, given after the @code{python} command. This command list is terminated using a line containing @code{end}. For example: @smallexample (@value{GDBP}) python Type python script End with a line saying just "end". >print 23 >end 23 @end smallexample @kindex set python print-stack @item set python print-stack By default, @value{GDBN} will print only the message component of a Python exception when an error occurs in a Python script. This can be controlled using @code{set python print-stack}: if @code{full}, then full Python stack printing is enabled; if @code{none}, then Python stack and message printing is disabled; if @code{message}, the default, only the message component of the error is printed. @end table It is also possible to execute a Python script from the @value{GDBN} interpreter: @table @code @item source @file{script-name} The script name must end with @samp{.py} and @value{GDBN} must be configured to recognize the script language based on filename extension using the @code{script-extension} setting. @xref{Extending GDB, ,Extending GDB}. @item python execfile ("script-name") This method is based on the @code{execfile} Python built-in function, and thus is always available. @end table @node Python API @subsection Python API @cindex python api @cindex programming in python @cindex python stdout @cindex python pagination At startup, @value{GDBN} overrides Python's @code{sys.stdout} and @code{sys.stderr} to print using @value{GDBN}'s output-paging streams. A Python program which outputs to one of these streams may have its output interrupted by the user (@pxref{Screen Size}). In this situation, a Python @code{KeyboardInterrupt} exception is thrown. @menu * Basic Python:: Basic Python Functions. * Exception Handling:: How Python exceptions are translated. * Values From Inferior:: Python representation of values. * Types In Python:: Python representation of types. * Pretty Printing API:: Pretty-printing values. * Selecting Pretty-Printers:: How GDB chooses a pretty-printer. * Writing a Pretty-Printer:: Writing a Pretty-Printer. * Type Printing API:: Pretty-printing types. * Inferiors In Python:: Python representation of inferiors (processes) * Events In Python:: Listening for events from @value{GDBN}. * Threads In Python:: Accessing inferior threads from Python. * Commands In Python:: Implementing new commands in Python. * Parameters In Python:: Adding new @value{GDBN} parameters. * Functions In Python:: Writing new convenience functions. * Progspaces In Python:: Program spaces. * Objfiles In Python:: Object files. * Frames In Python:: Accessing inferior stack frames from Python. * Blocks In Python:: Accessing frame blocks from Python. * Symbols In Python:: Python representation of symbols. * Symbol Tables In Python:: Python representation of symbol tables. * Breakpoints In Python:: Manipulating breakpoints using Python. * Finish Breakpoints in Python:: Setting Breakpoints on function return using Python. * Lazy Strings In Python:: Python representation of lazy strings. * Architectures In Python:: Python representation of architectures. @end menu @node Basic Python @subsubsection Basic Python @cindex python functions @cindex python module @cindex gdb module @value{GDBN} introduces a new Python module, named @code{gdb}. All methods and classes added by @value{GDBN} are placed in this module. @value{GDBN} automatically @code{import}s the @code{gdb} module for use in all scripts evaluated by the @code{python} command. @findex gdb.PYTHONDIR @defvar gdb.PYTHONDIR A string containing the python directory (@pxref{Python}). @end defvar @findex gdb.execute @defun gdb.execute (command @r{[}, from_tty @r{[}, to_string@r{]]}) Evaluate @var{command}, a string, as a @value{GDBN} CLI command. If a GDB exception happens while @var{command} runs, it is translated as described in @ref{Exception Handling,,Exception Handling}. @var{from_tty} specifies whether @value{GDBN} ought to consider this command as having originated from the user invoking it interactively. It must be a boolean value. If omitted, it defaults to @code{False}. By default, any output produced by @var{command} is sent to @value{GDBN}'s standard output. If the @var{to_string} parameter is @code{True}, then output will be collected by @code{gdb.execute} and returned as a string. The default is @code{False}, in which case the return value is @code{None}. If @var{to_string} is @code{True}, the @value{GDBN} virtual terminal will be temporarily set to unlimited width and height, and its pagination will be disabled; @pxref{Screen Size}. @end defun @findex gdb.breakpoints @defun gdb.breakpoints () Return a sequence holding all of @value{GDBN}'s breakpoints. @xref{Breakpoints In Python}, for more information. @end defun @findex gdb.parameter @defun gdb.parameter (parameter) Return the value of a @value{GDBN} parameter. @var{parameter} is a string naming the parameter to look up; @var{parameter} may contain spaces if the parameter has a multi-part name. For example, @samp{print object} is a valid parameter name. If the named parameter does not exist, this function throws a @code{gdb.error} (@pxref{Exception Handling}). Otherwise, the parameter's value is converted to a Python value of the appropriate type, and returned. @end defun @findex gdb.history @defun gdb.history (number) Return a value from @value{GDBN}'s value history (@pxref{Value History}). @var{number} indicates which history element to return. If @var{number} is negative, then @value{GDBN} will take its absolute value and count backward from the last element (i.e., the most recent element) to find the value to return. If @var{number} is zero, then @value{GDBN} will return the most recent element. If the element specified by @var{number} doesn't exist in the value history, a @code{gdb.error} exception will be raised. If no exception is raised, the return value is always an instance of @code{gdb.Value} (@pxref{Values From Inferior}). @end defun @findex gdb.parse_and_eval @defun gdb.parse_and_eval (expression) Parse @var{expression} as an expression in the current language, evaluate it, and return the result as a @code{gdb.Value}. @var{expression} must be a string. This function can be useful when implementing a new command (@pxref{Commands In Python}), as it provides a way to parse the command's argument as an expression. It is also useful simply to compute values, for example, it is the only way to get the value of a convenience variable (@pxref{Convenience Vars}) as a @code{gdb.Value}. @end defun @findex gdb.find_pc_line @defun gdb.find_pc_line (pc) Return the @code{gdb.Symtab_and_line} object corresponding to the @var{pc} value. @xref{Symbol Tables In Python}. If an invalid value of @var{pc} is passed as an argument, then the @code{symtab} and @code{line} attributes of the returned @code{gdb.Symtab_and_line} object will be @code{None} and 0 respectively. @end defun @findex gdb.post_event @defun gdb.post_event (event) Put @var{event}, a callable object taking no arguments, into @value{GDBN}'s internal event queue. This callable will be invoked at some later point, during @value{GDBN}'s event processing. Events posted using @code{post_event} will be run in the order in which they were posted; however, there is no way to know when they will be processed relative to other events inside @value{GDBN}. @value{GDBN} is not thread-safe. If your Python program uses multiple threads, you must be careful to only call @value{GDBN}-specific functions in the main @value{GDBN} thread. @code{post_event} ensures this. For example: @smallexample (@value{GDBP}) python >import threading > >class Writer(): > def __init__(self, message): > self.message = message; > def __call__(self): > gdb.write(self.message) > >class MyThread1 (threading.Thread): > def run (self): > gdb.post_event(Writer("Hello ")) > >class MyThread2 (threading.Thread): > def run (self): > gdb.post_event(Writer("World\n")) > >MyThread1().start() >MyThread2().start() >end (@value{GDBP}) Hello World @end smallexample @end defun @findex gdb.write @defun gdb.write (string @r{[}, stream{]}) Print a string to @value{GDBN}'s paginated output stream. The optional @var{stream} determines the stream to print to. The default stream is @value{GDBN}'s standard output stream. Possible stream values are: @table @code @findex STDOUT @findex gdb.STDOUT @item gdb.STDOUT @value{GDBN}'s standard output stream. @findex STDERR @findex gdb.STDERR @item gdb.STDERR @value{GDBN}'s standard error stream. @findex STDLOG @findex gdb.STDLOG @item gdb.STDLOG @value{GDBN}'s log stream (@pxref{Logging Output}). @end table Writing to @code{sys.stdout} or @code{sys.stderr} will automatically call this function and will automatically direct the output to the relevant stream. @end defun @findex gdb.flush @defun gdb.flush () Flush the buffer of a @value{GDBN} paginated stream so that the contents are displayed immediately. @value{GDBN} will flush the contents of a stream automatically when it encounters a newline in the buffer. The optional @var{stream} determines the stream to flush. The default stream is @value{GDBN}'s standard output stream. Possible stream values are: @table @code @findex STDOUT @findex gdb.STDOUT @item gdb.STDOUT @value{GDBN}'s standard output stream. @findex STDERR @findex gdb.STDERR @item gdb.STDERR @value{GDBN}'s standard error stream. @findex STDLOG @findex gdb.STDLOG @item gdb.STDLOG @value{GDBN}'s log stream (@pxref{Logging Output}). @end table Flushing @code{sys.stdout} or @code{sys.stderr} will automatically call this function for the relevant stream. @end defun @findex gdb.target_charset @defun gdb.target_charset () Return the name of the current target character set (@pxref{Character Sets}). This differs from @code{gdb.parameter('target-charset')} in that @samp{auto} is never returned. @end defun @findex gdb.target_wide_charset @defun gdb.target_wide_charset () Return the name of the current target wide character set (@pxref{Character Sets}). This differs from @code{gdb.parameter('target-wide-charset')} in that @samp{auto} is never returned. @end defun @findex gdb.solib_name @defun gdb.solib_name (address) Return the name of the shared library holding the given @var{address} as a string, or @code{None}. @end defun @findex gdb.decode_line @defun gdb.decode_line @r{[}expression@r{]} Return locations of the line specified by @var{expression}, or of the current line if no argument was given. This function returns a Python tuple containing two elements. The first element contains a string holding any unparsed section of @var{expression} (or @code{None} if the expression has been fully parsed). The second element contains either @code{None} or another tuple that contains all the locations that match the expression represented as @code{gdb.Symtab_and_line} objects (@pxref{Symbol Tables In Python}). If @var{expression} is provided, it is decoded the way that @value{GDBN}'s inbuilt @code{break} or @code{edit} commands do (@pxref{Specify Location}). @end defun @defun gdb.prompt_hook (current_prompt) @anchor{prompt_hook} If @var{prompt_hook} is callable, @value{GDBN} will call the method assigned to this operation before a prompt is displayed by @value{GDBN}. The parameter @code{current_prompt} contains the current @value{GDBN} prompt. This method must return a Python string, or @code{None}. If a string is returned, the @value{GDBN} prompt will be set to that string. If @code{None} is returned, @value{GDBN} will continue to use the current prompt. Some prompts cannot be substituted in @value{GDBN}. Secondary prompts such as those used by readline for command input, and annotation related prompts are prohibited from being changed. @end defun @node Exception Handling @subsubsection Exception Handling @cindex python exceptions @cindex exceptions, python When executing the @code{python} command, Python exceptions uncaught within the Python code are translated to calls to @value{GDBN} error-reporting mechanism. If the command that called @code{python} does not handle the error, @value{GDBN} will terminate it and print an error message containing the Python exception name, the associated value, and the Python call stack backtrace at the point where the exception was raised. Example: @smallexample (@value{GDBP}) python print foo Traceback (most recent call last): File "", line 1, in NameError: name 'foo' is not defined @end smallexample @value{GDBN} errors that happen in @value{GDBN} commands invoked by Python code are converted to Python exceptions. The type of the Python exception depends on the error. @ftable @code @item gdb.error This is the base class for most exceptions generated by @value{GDBN}. It is derived from @code{RuntimeError}, for compatibility with earlier versions of @value{GDBN}. If an error occurring in @value{GDBN} does not fit into some more specific category, then the generated exception will have this type. @item gdb.MemoryError This is a subclass of @code{gdb.error} which is thrown when an operation tried to access invalid memory in the inferior. @item KeyboardInterrupt User interrupt (via @kbd{C-c} or by typing @kbd{q} at a pagination prompt) is translated to a Python @code{KeyboardInterrupt} exception. @end ftable In all cases, your exception handler will see the @value{GDBN} error message as its value and the Python call stack backtrace at the Python statement closest to where the @value{GDBN} error occured as the traceback. @findex gdb.GdbError When implementing @value{GDBN} commands in Python via @code{gdb.Command}, it is useful to be able to throw an exception that doesn't cause a traceback to be printed. For example, the user may have invoked the command incorrectly. Use the @code{gdb.GdbError} exception to handle this case. Example: @smallexample (gdb) python >class HelloWorld (gdb.Command): > """Greet the whole world.""" > def __init__ (self): > super (HelloWorld, self).__init__ ("hello-world", gdb.COMMAND_USER) > def invoke (self, args, from_tty): > argv = gdb.string_to_argv (args) > if len (argv) != 0: > raise gdb.GdbError ("hello-world takes no arguments") > print "Hello, World!" >HelloWorld () >end (gdb) hello-world 42 hello-world takes no arguments @end smallexample @node Values From Inferior @subsubsection Values From Inferior @cindex values from inferior, with Python @cindex python, working with values from inferior @cindex @code{gdb.Value} @value{GDBN} provides values it obtains from the inferior program in an object of type @code{gdb.Value}. @value{GDBN} uses this object for its internal bookkeeping of the inferior's values, and for fetching values when necessary. Inferior values that are simple scalars can be used directly in Python expressions that are valid for the value's data type. Here's an example for an integer or floating-point value @code{some_val}: @smallexample bar = some_val + 2 @end smallexample @noindent As result of this, @code{bar} will also be a @code{gdb.Value} object whose values are of the same type as those of @code{some_val}. Inferior values that are structures or instances of some class can be accessed using the Python @dfn{dictionary syntax}. For example, if @code{some_val} is a @code{gdb.Value} instance holding a structure, you can access its @code{foo} element with: @smallexample bar = some_val['foo'] @end smallexample Again, @code{bar} will also be a @code{gdb.Value} object. A @code{gdb.Value} that represents a function can be executed via inferior function call. Any arguments provided to the call must match the function's prototype, and must be provided in the order specified by that prototype. For example, @code{some_val} is a @code{gdb.Value} instance representing a function that takes two integers as arguments. To execute this function, call it like so: @smallexample result = some_val (10,20) @end smallexample Any values returned from a function call will be stored as a @code{gdb.Value}. The following attributes are provided: @defvar Value.address If this object is addressable, this read-only attribute holds a @code{gdb.Value} object representing the address. Otherwise, this attribute holds @code{None}. @end defvar @cindex optimized out value in Python @defvar Value.is_optimized_out This read-only boolean attribute is true if the compiler optimized out this value, thus it is not available for fetching from the inferior. @end defvar @defvar Value.type The type of this @code{gdb.Value}. The value of this attribute is a @code{gdb.Type} object (@pxref{Types In Python}). @end defvar @defvar Value.dynamic_type The dynamic type of this @code{gdb.Value}. This uses C@t{++} run-time type information (@acronym{RTTI}) to determine the dynamic type of the value. If this value is of class type, it will return the class in which the value is embedded, if any. If this value is of pointer or reference to a class type, it will compute the dynamic type of the referenced object, and return a pointer or reference to that type, respectively. In all other cases, it will return the value's static type. Note that this feature will only work when debugging a C@t{++} program that includes @acronym{RTTI} for the object in question. Otherwise, it will just return the static type of the value as in @kbd{ptype foo} (@pxref{Symbols, ptype}). @end defvar @defvar Value.is_lazy The value of this read-only boolean attribute is @code{True} if this @code{gdb.Value} has not yet been fetched from the inferior. @value{GDBN} does not fetch values until necessary, for efficiency. For example: @smallexample myval = gdb.parse_and_eval ('somevar') @end smallexample The value of @code{somevar} is not fetched at this time. It will be fetched when the value is needed, or when the @code{fetch_lazy} method is invoked. @end defvar The following methods are provided: @defun Value.__init__ (@var{val}) Many Python values can be converted directly to a @code{gdb.Value} via this object initializer. Specifically: @table @asis @item Python boolean A Python boolean is converted to the boolean type from the current language. @item Python integer A Python integer is converted to the C @code{long} type for the current architecture. @item Python long A Python long is converted to the C @code{long long} type for the current architecture. @item Python float A Python float is converted to the C @code{double} type for the current architecture. @item Python string A Python string is converted to a target string, using the current target encoding. @item @code{gdb.Value} If @code{val} is a @code{gdb.Value}, then a copy of the value is made. @item @code{gdb.LazyString} If @code{val} is a @code{gdb.LazyString} (@pxref{Lazy Strings In Python}), then the lazy string's @code{value} method is called, and its result is used. @end table @end defun @defun Value.cast (type) Return a new instance of @code{gdb.Value} that is the result of casting this instance to the type described by @var{type}, which must be a @code{gdb.Type} object. If the cast cannot be performed for some reason, this method throws an exception. @end defun @defun Value.dereference () For pointer data types, this method returns a new @code{gdb.Value} object whose contents is the object pointed to by the pointer. For example, if @code{foo} is a C pointer to an @code{int}, declared in your C program as @smallexample int *foo; @end smallexample @noindent then you can use the corresponding @code{gdb.Value} to access what @code{foo} points to like this: @smallexample bar = foo.dereference () @end smallexample The result @code{bar} will be a @code{gdb.Value} object holding the value pointed to by @code{foo}. A similar function @code{Value.referenced_value} exists which also returns @code{gdb.Value} objects corresonding to the values pointed to by pointer values (and additionally, values referenced by reference values). However, the behavior of @code{Value.dereference} differs from @code{Value.referenced_value} by the fact that the behavior of @code{Value.dereference} is identical to applying the C unary operator @code{*} on a given value. For example, consider a reference to a pointer @code{ptrref}, declared in your C@t{++} program as @smallexample typedef int *intptr; ... int val = 10; intptr ptr = &val; intptr &ptrref = ptr; @end smallexample Though @code{ptrref} is a reference value, one can apply the method @code{Value.dereference} to the @code{gdb.Value} object corresponding to it and obtain a @code{gdb.Value} which is identical to that corresponding to @code{val}. However, if you apply the method @code{Value.referenced_value}, the result would be a @code{gdb.Value} object identical to that corresponding to @code{ptr}. @smallexample py_ptrref = gdb.parse_and_eval ("ptrref") py_val = py_ptrref.dereference () py_ptr = py_ptrref.referenced_value () @end smallexample The @code{gdb.Value} object @code{py_val} is identical to that corresponding to @code{val}, and @code{py_ptr} is identical to that corresponding to @code{ptr}. In general, @code{Value.dereference} can be applied whenever the C unary operator @code{*} can be applied to the corresponding C value. For those cases where applying both @code{Value.dereference} and @code{Value.referenced_value} is allowed, the results obtained need not be identical (as we have seen in the above example). The results are however identical when applied on @code{gdb.Value} objects corresponding to pointers (@code{gdb.Value} objects with type code @code{TYPE_CODE_PTR}) in a C/C@t{++} program. @end defun @defun Value.referenced_value () For pointer or reference data types, this method returns a new @code{gdb.Value} object corresponding to the value referenced by the pointer/reference value. For pointer data types, @code{Value.dereference} and @code{Value.referenced_value} produce identical results. The difference between these methods is that @code{Value.dereference} cannot get the values referenced by reference values. For example, consider a reference to an @code{int}, declared in your C@t{++} program as @smallexample int val = 10; int &ref = val; @end smallexample @noindent then applying @code{Value.dereference} to the @code{gdb.Value} object corresponding to @code{ref} will result in an error, while applying @code{Value.referenced_value} will result in a @code{gdb.Value} object identical to that corresponding to @code{val}. @smallexample py_ref = gdb.parse_and_eval ("ref") er_ref = py_ref.dereference () # Results in error py_val = py_ref.referenced_value () # Returns the referenced value @end smallexample The @code{gdb.Value} object @code{py_val} is identical to that corresponding to @code{val}. @end defun @defun Value.dynamic_cast (type) Like @code{Value.cast}, but works as if the C@t{++} @code{dynamic_cast} operator were used. Consult a C@t{++} reference for details. @end defun @defun Value.reinterpret_cast (type) Like @code{Value.cast}, but works as if the C@t{++} @code{reinterpret_cast} operator were used. Consult a C@t{++} reference for details. @end defun @defun Value.string (@r{[}encoding@r{[}, errors@r{[}, length@r{]]]}) If this @code{gdb.Value} represents a string, then this method converts the contents to a Python string. Otherwise, this method will throw an exception. Strings are recognized in a language-specific way; whether a given @code{gdb.Value} represents a string is determined by the current language. For C-like languages, a value is a string if it is a pointer to or an array of characters or ints. The string is assumed to be terminated by a zero of the appropriate width. However if the optional length argument is given, the string will be converted to that given length, ignoring any embedded zeros that the string may contain. If the optional @var{encoding} argument is given, it must be a string naming the encoding of the string in the @code{gdb.Value}, such as @code{"ascii"}, @code{"iso-8859-6"} or @code{"utf-8"}. It accepts the same encodings as the corresponding argument to Python's @code{string.decode} method, and the Python codec machinery will be used to convert the string. If @var{encoding} is not given, or if @var{encoding} is the empty string, then either the @code{target-charset} (@pxref{Character Sets}) will be used, or a language-specific encoding will be used, if the current language is able to supply one. The optional @var{errors} argument is the same as the corresponding argument to Python's @code{string.decode} method. If the optional @var{length} argument is given, the string will be fetched and converted to the given length. @end defun @defun Value.lazy_string (@r{[}encoding @r{[}, length@r{]]}) If this @code{gdb.Value} represents a string, then this method converts the contents to a @code{gdb.LazyString} (@pxref{Lazy Strings In Python}). Otherwise, this method will throw an exception. If the optional @var{encoding} argument is given, it must be a string naming the encoding of the @code{gdb.LazyString}. Some examples are: @samp{ascii}, @samp{iso-8859-6} or @samp{utf-8}. If the @var{encoding} argument is an encoding that @value{GDBN} does recognize, @value{GDBN} will raise an error. When a lazy string is printed, the @value{GDBN} encoding machinery is used to convert the string during printing. If the optional @var{encoding} argument is not provided, or is an empty string, @value{GDBN} will automatically select the encoding most suitable for the string type. For further information on encoding in @value{GDBN} please see @ref{Character Sets}. If the optional @var{length} argument is given, the string will be fetched and encoded to the length of characters specified. If the @var{length} argument is not provided, the string will be fetched and encoded until a null of appropriate width is found. @end defun @defun Value.fetch_lazy () If the @code{gdb.Value} object is currently a lazy value (@code{gdb.Value.is_lazy} is @code{True}), then the value is fetched from the inferior. Any errors that occur in the process will produce a Python exception. If the @code{gdb.Value} object is not a lazy value, this method has no effect. This method does not return a value. @end defun @node Types In Python @subsubsection Types In Python @cindex types in Python @cindex Python, working with types @tindex gdb.Type @value{GDBN} represents types from the inferior using the class @code{gdb.Type}. The following type-related functions are available in the @code{gdb} module: @findex gdb.lookup_type @defun gdb.lookup_type (name @r{[}, block@r{]}) This function looks up a type by name. @var{name} is the name of the type to look up. It must be a string. If @var{block} is given, then @var{name} is looked up in that scope. Otherwise, it is searched for globally. Ordinarily, this function will return an instance of @code{gdb.Type}. If the named type cannot be found, it will throw an exception. @end defun If the type is a structure or class type, or an enum type, the fields of that type can be accessed using the Python @dfn{dictionary syntax}. For example, if @code{some_type} is a @code{gdb.Type} instance holding a structure type, you can access its @code{foo} field with: @smallexample bar = some_type['foo'] @end smallexample @code{bar} will be a @code{gdb.Field} object; see below under the description of the @code{Type.fields} method for a description of the @code{gdb.Field} class. An instance of @code{Type} has the following attributes: @defvar Type.code The type code for this type. The type code will be one of the @code{TYPE_CODE_} constants defined below. @end defvar @defvar Type.sizeof The size of this type, in target @code{char} units. Usually, a target's @code{char} type will be an 8-bit byte. However, on some unusual platforms, this type may have a different size. @end defvar @defvar Type.tag The tag name for this type. The tag name is the name after @code{struct}, @code{union}, or @code{enum} in C and C@t{++}; not all languages have this concept. If this type has no tag name, then @code{None} is returned. @end defvar The following methods are provided: @defun Type.fields () For structure and union types, this method returns the fields. Range types have two fields, the minimum and maximum values. Enum types have one field per enum constant. Function and method types have one field per parameter. The base types of C@t{++} classes are also represented as fields. If the type has no fields, or does not fit into one of these categories, an empty sequence will be returned. Each field is a @code{gdb.Field} object, with some pre-defined attributes: @table @code @item bitpos This attribute is not available for @code{static} fields (as in C@t{++} or Java). For non-@code{static} fields, the value is the bit position of the field. For @code{enum} fields, the value is the enumeration member's integer representation. @item name The name of the field, or @code{None} for anonymous fields. @item artificial This is @code{True} if the field is artificial, usually meaning that it was provided by the compiler and not the user. This attribute is always provided, and is @code{False} if the field is not artificial. @item is_base_class This is @code{True} if the field represents a base class of a C@t{++} structure. This attribute is always provided, and is @code{False} if the field is not a base class of the type that is the argument of @code{fields}, or if that type was not a C@t{++} class. @item bitsize If the field is packed, or is a bitfield, then this will have a non-zero value, which is the size of the field in bits. Otherwise, this will be zero; in this case the field's size is given by its type. @item type The type of the field. This is usually an instance of @code{Type}, but it can be @code{None} in some situations. @end table @end defun @defun Type.array (@var{n1} @r{[}, @var{n2}@r{]}) Return a new @code{gdb.Type} object which represents an array of this type. If one argument is given, it is the inclusive upper bound of the array; in this case the lower bound is zero. If two arguments are given, the first argument is the lower bound of the array, and the second argument is the upper bound of the array. An array's length must not be negative, but the bounds can be. @end defun @defun Type.vector (@var{n1} @r{[}, @var{n2}@r{]}) Return a new @code{gdb.Type} object which represents a vector of this type. If one argument is given, it is the inclusive upper bound of the vector; in this case the lower bound is zero. If two arguments are given, the first argument is the lower bound of the vector, and the second argument is the upper bound of the vector. A vector's length must not be negative, but the bounds can be. The difference between an @code{array} and a @code{vector} is that arrays behave like in C: when used in expressions they decay to a pointer to the first element whereas vectors are treated as first class values. @end defun @defun Type.const () Return a new @code{gdb.Type} object which represents a @code{const}-qualified variant of this type. @end defun @defun Type.volatile () Return a new @code{gdb.Type} object which represents a @code{volatile}-qualified variant of this type. @end defun @defun Type.unqualified () Return a new @code{gdb.Type} object which represents an unqualified variant of this type. That is, the result is neither @code{const} nor @code{volatile}. @end defun @defun Type.range () Return a Python @code{Tuple} object that contains two elements: the low bound of the argument type and the high bound of that type. If the type does not have a range, @value{GDBN} will raise a @code{gdb.error} exception (@pxref{Exception Handling}). @end defun @defun Type.reference () Return a new @code{gdb.Type} object which represents a reference to this type. @end defun @defun Type.pointer () Return a new @code{gdb.Type} object which represents a pointer to this type. @end defun @defun Type.strip_typedefs () Return a new @code{gdb.Type} that represents the real type, after removing all layers of typedefs. @end defun @defun Type.target () Return a new @code{gdb.Type} object which represents the target type of this type. For a pointer type, the target type is the type of the pointed-to object. For an array type (meaning C-like arrays), the target type is the type of the elements of the array. For a function or method type, the target type is the type of the return value. For a complex type, the target type is the type of the elements. For a typedef, the target type is the aliased type. If the type does not have a target, this method will throw an exception. @end defun @defun Type.template_argument (n @r{[}, block@r{]}) If this @code{gdb.Type} is an instantiation of a template, this will return a new @code{gdb.Type} which represents the type of the @var{n}th template argument. If this @code{gdb.Type} is not a template type, this will throw an exception. Ordinarily, only C@t{++} code will have template types. If @var{block} is given, then @var{name} is looked up in that scope. Otherwise, it is searched for globally. @end defun Each type has a code, which indicates what category this type falls into. The available type categories are represented by constants defined in the @code{gdb} module: @table @code @findex TYPE_CODE_PTR @findex gdb.TYPE_CODE_PTR @item gdb.TYPE_CODE_PTR The type is a pointer. @findex TYPE_CODE_ARRAY @findex gdb.TYPE_CODE_ARRAY @item gdb.TYPE_CODE_ARRAY The type is an array. @findex TYPE_CODE_STRUCT @findex gdb.TYPE_CODE_STRUCT @item gdb.TYPE_CODE_STRUCT The type is a structure. @findex TYPE_CODE_UNION @findex gdb.TYPE_CODE_UNION @item gdb.TYPE_CODE_UNION The type is a union. @findex TYPE_CODE_ENUM @findex gdb.TYPE_CODE_ENUM @item gdb.TYPE_CODE_ENUM The type is an enum. @findex TYPE_CODE_FLAGS @findex gdb.TYPE_CODE_FLAGS @item gdb.TYPE_CODE_FLAGS A bit flags type, used for things such as status registers. @findex TYPE_CODE_FUNC @findex gdb.TYPE_CODE_FUNC @item gdb.TYPE_CODE_FUNC The type is a function. @findex TYPE_CODE_INT @findex gdb.TYPE_CODE_INT @item gdb.TYPE_CODE_INT The type is an integer type. @findex TYPE_CODE_FLT @findex gdb.TYPE_CODE_FLT @item gdb.TYPE_CODE_FLT A floating point type. @findex TYPE_CODE_VOID @findex gdb.TYPE_CODE_VOID @item gdb.TYPE_CODE_VOID The special type @code{void}. @findex TYPE_CODE_SET @findex gdb.TYPE_CODE_SET @item gdb.TYPE_CODE_SET A Pascal set type. @findex TYPE_CODE_RANGE @findex gdb.TYPE_CODE_RANGE @item gdb.TYPE_CODE_RANGE A range type, that is, an integer type with bounds. @findex TYPE_CODE_STRING @findex gdb.TYPE_CODE_STRING @item gdb.TYPE_CODE_STRING A string type. Note that this is only used for certain languages with language-defined string types; C strings are not represented this way. @findex TYPE_CODE_BITSTRING @findex gdb.TYPE_CODE_BITSTRING @item gdb.TYPE_CODE_BITSTRING A string of bits. It is deprecated. @findex TYPE_CODE_ERROR @findex gdb.TYPE_CODE_ERROR @item gdb.TYPE_CODE_ERROR An unknown or erroneous type. @findex TYPE_CODE_METHOD @findex gdb.TYPE_CODE_METHOD @item gdb.TYPE_CODE_METHOD A method type, as found in C@t{++} or Java. @findex TYPE_CODE_METHODPTR @findex gdb.TYPE_CODE_METHODPTR @item gdb.TYPE_CODE_METHODPTR A pointer-to-member-function. @findex TYPE_CODE_MEMBERPTR @findex gdb.TYPE_CODE_MEMBERPTR @item gdb.TYPE_CODE_MEMBERPTR A pointer-to-member. @findex TYPE_CODE_REF @findex gdb.TYPE_CODE_REF @item gdb.TYPE_CODE_REF A reference type. @findex TYPE_CODE_CHAR @findex gdb.TYPE_CODE_CHAR @item gdb.TYPE_CODE_CHAR A character type. @findex TYPE_CODE_BOOL @findex gdb.TYPE_CODE_BOOL @item gdb.TYPE_CODE_BOOL A boolean type. @findex TYPE_CODE_COMPLEX @findex gdb.TYPE_CODE_COMPLEX @item gdb.TYPE_CODE_COMPLEX A complex float type. @findex TYPE_CODE_TYPEDEF @findex gdb.TYPE_CODE_TYPEDEF @item gdb.TYPE_CODE_TYPEDEF A typedef to some other type. @findex TYPE_CODE_NAMESPACE @findex gdb.TYPE_CODE_NAMESPACE @item gdb.TYPE_CODE_NAMESPACE A C@t{++} namespace. @findex TYPE_CODE_DECFLOAT @findex gdb.TYPE_CODE_DECFLOAT @item gdb.TYPE_CODE_DECFLOAT A decimal floating point type. @findex TYPE_CODE_INTERNAL_FUNCTION @findex gdb.TYPE_CODE_INTERNAL_FUNCTION @item gdb.TYPE_CODE_INTERNAL_FUNCTION A function internal to @value{GDBN}. This is the type used to represent convenience functions. @end table Further support for types is provided in the @code{gdb.types} Python module (@pxref{gdb.types}). @node Pretty Printing API @subsubsection Pretty Printing API An example output is provided (@pxref{Pretty Printing}). A pretty-printer is just an object that holds a value and implements a specific interface, defined here. @defun pretty_printer.children (self) @value{GDBN} will call this method on a pretty-printer to compute the children of the pretty-printer's value. This method must return an object conforming to the Python iterator protocol. Each item returned by the iterator must be a tuple holding two elements. The first element is the ``name'' of the child; the second element is the child's value. The value can be any Python object which is convertible to a @value{GDBN} value. This method is optional. If it does not exist, @value{GDBN} will act as though the value has no children. @end defun @defun pretty_printer.display_hint (self) The CLI may call this method and use its result to change the formatting of a value. The result will also be supplied to an MI consumer as a @samp{displayhint} attribute of the variable being printed. This method is optional. If it does exist, this method must return a string. Some display hints are predefined by @value{GDBN}: @table @samp @item array Indicate that the object being printed is ``array-like''. The CLI uses this to respect parameters such as @code{set print elements} and @code{set print array}. @item map Indicate that the object being printed is ``map-like'', and that the children of this value can be assumed to alternate between keys and values. @item string Indicate that the object being printed is ``string-like''. If the printer's @code{to_string} method returns a Python string of some kind, then @value{GDBN} will call its internal language-specific string-printing function to format the string. For the CLI this means adding quotation marks, possibly escaping some characters, respecting @code{set print elements}, and the like. @end table @end defun @defun pretty_printer.to_string (self) @value{GDBN} will call this method to display the string representation of the value passed to the object's constructor. When printing from the CLI, if the @code{to_string} method exists, then @value{GDBN} will prepend its result to the values returned by @code{children}. Exactly how this formatting is done is dependent on the display hint, and may change as more hints are added. Also, depending on the print settings (@pxref{Print Settings}), the CLI may print just the result of @code{to_string} in a stack trace, omitting the result of @code{children}. If this method returns a string, it is printed verbatim. Otherwise, if this method returns an instance of @code{gdb.Value}, then @value{GDBN} prints this value. This may result in a call to another pretty-printer. If instead the method returns a Python value which is convertible to a @code{gdb.Value}, then @value{GDBN} performs the conversion and prints the resulting value. Again, this may result in a call to another pretty-printer. Python scalars (integers, floats, and booleans) and strings are convertible to @code{gdb.Value}; other types are not. Finally, if this method returns @code{None} then no further operations are peformed in this method and nothing is printed. If the result is not one of these types, an exception is raised. @end defun @value{GDBN} provides a function which can be used to look up the default pretty-printer for a @code{gdb.Value}: @findex gdb.default_visualizer @defun gdb.default_visualizer (value) This function takes a @code{gdb.Value} object as an argument. If a pretty-printer for this value exists, then it is returned. If no such printer exists, then this returns @code{None}. @end defun @node Selecting Pretty-Printers @subsubsection Selecting Pretty-Printers The Python list @code{gdb.pretty_printers} contains an array of functions or callable objects that have been registered via addition as a pretty-printer. Printers in this list are called @code{global} printers, they're available when debugging all inferiors. Each @code{gdb.Progspace} contains a @code{pretty_printers} attribute. Each @code{gdb.Objfile} also contains a @code{pretty_printers} attribute. Each function on these lists is passed a single @code{gdb.Value} argument and should return a pretty-printer object conforming to the interface definition above (@pxref{Pretty Printing API}). If a function cannot create a pretty-printer for the value, it should return @code{None}. @value{GDBN} first checks the @code{pretty_printers} attribute of each @code{gdb.Objfile} in the current program space and iteratively calls each enabled lookup routine in the list for that @code{gdb.Objfile} until it receives a pretty-printer object. If no pretty-printer is found in the objfile lists, @value{GDBN} then searches the pretty-printer list of the current program space, calling each enabled function until an object is returned. After these lists have been exhausted, it tries the global @code{gdb.pretty_printers} list, again calling each enabled function until an object is returned. The order in which the objfiles are searched is not specified. For a given list, functions are always invoked from the head of the list, and iterated over sequentially until the end of the list, or a printer object is returned. For various reasons a pretty-printer may not work. For example, the underlying data structure may have changed and the pretty-printer is out of date. The consequences of a broken pretty-printer are severe enough that @value{GDBN} provides support for enabling and disabling individual printers. For example, if @code{print frame-arguments} is on, a backtrace can become highly illegible if any argument is printed with a broken printer. Pretty-printers are enabled and disabled by attaching an @code{enabled} attribute to the registered function or callable object. If this attribute is present and its value is @code{False}, the printer is disabled, otherwise the printer is enabled. @node Writing a Pretty-Printer @subsubsection Writing a Pretty-Printer @cindex writing a pretty-printer A pretty-printer consists of two parts: a lookup function to detect if the type is supported, and the printer itself. Here is an example showing how a @code{std::string} printer might be written. @xref{Pretty Printing API}, for details on the API this class must provide. @smallexample class StdStringPrinter(object): "Print a std::string" def __init__(self, val): self.val = val def to_string(self): return self.val['_M_dataplus']['_M_p'] def display_hint(self): return 'string' @end smallexample And here is an example showing how a lookup function for the printer example above might be written. @smallexample def str_lookup_function(val): lookup_tag = val.type.tag if lookup_tag == None: return None regex = re.compile("^std::basic_string$") if regex.match(lookup_tag): return StdStringPrinter(val) return None @end smallexample The example lookup function extracts the value's type, and attempts to match it to a type that it can pretty-print. If it is a type the printer can pretty-print, it will return a printer object. If not, it returns @code{None}. We recommend that you put your core pretty-printers into a Python package. If your pretty-printers are for use with a library, we further recommend embedding a version number into the package name. This practice will enable @value{GDBN} to load multiple versions of your pretty-printers at the same time, because they will have different names. You should write auto-loaded code (@pxref{Python Auto-loading}) such that it can be evaluated multiple times without changing its meaning. An ideal auto-load file will consist solely of @code{import}s of your printer modules, followed by a call to a register pretty-printers with the current objfile. Taken as a whole, this approach will scale nicely to multiple inferiors, each potentially using a different library version. Embedding a version number in the Python package name will ensure that @value{GDBN} is able to load both sets of printers simultaneously. Then, because the search for pretty-printers is done by objfile, and because your auto-loaded code took care to register your library's printers with a specific objfile, @value{GDBN} will find the correct printers for the specific version of the library used by each inferior. To continue the @code{std::string} example (@pxref{Pretty Printing API}), this code might appear in @code{gdb.libstdcxx.v6}: @smallexample def register_printers(objfile): objfile.pretty_printers.append(str_lookup_function) @end smallexample @noindent And then the corresponding contents of the auto-load file would be: @smallexample import gdb.libstdcxx.v6 gdb.libstdcxx.v6.register_printers(gdb.current_objfile()) @end smallexample The previous example illustrates a basic pretty-printer. There are a few things that can be improved on. The printer doesn't have a name, making it hard to identify in a list of installed printers. The lookup function has a name, but lookup functions can have arbitrary, even identical, names. Second, the printer only handles one type, whereas a library typically has several types. One could install a lookup function for each desired type in the library, but one could also have a single lookup function recognize several types. The latter is the conventional way this is handled. If a pretty-printer can handle multiple data types, then its @dfn{subprinters} are the printers for the individual data types. The @code{gdb.printing} module provides a formal way of solving these problems (@pxref{gdb.printing}). Here is another example that handles multiple types. These are the types we are going to pretty-print: @smallexample struct foo @{ int a, b; @}; struct bar @{ struct foo x, y; @}; @end smallexample Here are the printers: @smallexample class fooPrinter: """Print a foo object.""" def __init__(self, val): self.val = val def to_string(self): return ("a=<" + str(self.val["a"]) + "> b=<" + str(self.val["b"]) + ">") class barPrinter: """Print a bar object.""" def __init__(self, val): self.val = val def to_string(self): return ("x=<" + str(self.val["x"]) + "> y=<" + str(self.val["y"]) + ">") @end smallexample This example doesn't need a lookup function, that is handled by the @code{gdb.printing} module. Instead a function is provided to build up the object that handles the lookup. @smallexample import gdb.printing def build_pretty_printer(): pp = gdb.printing.RegexpCollectionPrettyPrinter( "my_library") pp.add_printer('foo', '^foo$', fooPrinter) pp.add_printer('bar', '^bar$', barPrinter) return pp @end smallexample And here is the autoload support: @smallexample import gdb.printing import my_library gdb.printing.register_pretty_printer( gdb.current_objfile(), my_library.build_pretty_printer()) @end smallexample Finally, when this printer is loaded into @value{GDBN}, here is the corresponding output of @samp{info pretty-printer}: @smallexample (gdb) info pretty-printer my_library.so: my_library foo bar @end smallexample @node Type Printing API @subsubsection Type Printing API @cindex type printing API for Python @value{GDBN} provides a way for Python code to customize type display. This is mainly useful for substituting canonical typedef names for types. @cindex type printer A @dfn{type printer} is just a Python object conforming to a certain protocol. A simple base class implementing the protocol is provided; see @ref{gdb.types}. A type printer must supply at least: @defivar type_printer enabled A boolean which is True if the printer is enabled, and False otherwise. This is manipulated by the @code{enable type-printer} and @code{disable type-printer} commands. @end defivar @defivar type_printer name The name of the type printer. This must be a string. This is used by the @code{enable type-printer} and @code{disable type-printer} commands. @end defivar @defmethod type_printer instantiate (self) This is called by @value{GDBN} at the start of type-printing. It is only called if the type printer is enabled. This method must return a new object that supplies a @code{recognize} method, as described below. @end defmethod When displaying a type, say via the @code{ptype} command, @value{GDBN} will compute a list of type recognizers. This is done by iterating first over the per-objfile type printers (@pxref{Objfiles In Python}), followed by the per-progspace type printers (@pxref{Progspaces In Python}), and finally the global type printers. @value{GDBN} will call the @code{instantiate} method of each enabled type printer. If this method returns @code{None}, then the result is ignored; otherwise, it is appended to the list of recognizers. Then, when @value{GDBN} is going to display a type name, it iterates over the list of recognizers. For each one, it calls the recognition function, stopping if the function returns a non-@code{None} value. The recognition function is defined as: @defmethod type_recognizer recognize (self, type) If @var{type} is not recognized, return @code{None}. Otherwise, return a string which is to be printed as the name of @var{type}. @var{type} will be an instance of @code{gdb.Type} (@pxref{Types In Python}). @end defmethod @value{GDBN} uses this two-pass approach so that type printers can efficiently cache information without holding on to it too long. For example, it can be convenient to look up type information in a type printer and hold it for a recognizer's lifetime; if a single pass were done then type printers would have to make use of the event system in order to avoid holding information that could become stale as the inferior changed. @node Inferiors In Python @subsubsection Inferiors In Python @cindex inferiors in Python @findex gdb.Inferior Programs which are being run under @value{GDBN} are called inferiors (@pxref{Inferiors and Programs}). Python scripts can access information about and manipulate inferiors controlled by @value{GDBN} via objects of the @code{gdb.Inferior} class. The following inferior-related functions are available in the @code{gdb} module: @defun gdb.inferiors () Return a tuple containing all inferior objects. @end defun @defun gdb.selected_inferior () Return an object representing the current inferior. @end defun A @code{gdb.Inferior} object has the following attributes: @defvar Inferior.num ID of inferior, as assigned by GDB. @end defvar @defvar Inferior.pid Process ID of the inferior, as assigned by the underlying operating system. @end defvar @defvar Inferior.was_attached Boolean signaling whether the inferior was created using `attach', or started by @value{GDBN} itself. @end defvar A @code{gdb.Inferior} object has the following methods: @defun Inferior.is_valid () Returns @code{True} if the @code{gdb.Inferior} object is valid, @code{False} if not. A @code{gdb.Inferior} object will become invalid if the inferior no longer exists within @value{GDBN}. All other @code{gdb.Inferior} methods will throw an exception if it is invalid at the time the method is called. @end defun @defun Inferior.threads () This method returns a tuple holding all the threads which are valid when it is called. If there are no valid threads, the method will return an empty tuple. @end defun @findex Inferior.read_memory @defun Inferior.read_memory (address, length) Read @var{length} bytes of memory from the inferior, starting at @var{address}. Returns a buffer object, which behaves much like an array or a string. It can be modified and given to the @code{Inferior.write_memory} function. In @code{Python} 3, the return value is a @code{memoryview} object. @end defun @findex Inferior.write_memory @defun Inferior.write_memory (address, buffer @r{[}, length@r{]}) Write the contents of @var{buffer} to the inferior, starting at @var{address}. The @var{buffer} parameter must be a Python object which supports the buffer protocol, i.e., a string, an array or the object returned from @code{Inferior.read_memory}. If given, @var{length} determines the number of bytes from @var{buffer} to be written. @end defun @findex gdb.search_memory @defun Inferior.search_memory (address, length, pattern) Search a region of the inferior memory starting at @var{address} with the given @var{length} using the search pattern supplied in @var{pattern}. The @var{pattern} parameter must be a Python object which supports the buffer protocol, i.e., a string, an array or the object returned from @code{gdb.read_memory}. Returns a Python @code{Long} containing the address where the pattern was found, or @code{None} if the pattern could not be found. @end defun @node Events In Python @subsubsection Events In Python @cindex inferior events in Python @value{GDBN} provides a general event facility so that Python code can be notified of various state changes, particularly changes that occur in the inferior. An @dfn{event} is just an object that describes some state change. The type of the object and its attributes will vary depending on the details of the change. All the existing events are described below. In order to be notified of an event, you must register an event handler with an @dfn{event registry}. An event registry is an object in the @code{gdb.events} module which dispatches particular events. A registry provides methods to register and unregister event handlers: @defun EventRegistry.connect (object) Add the given callable @var{object} to the registry. This object will be called when an event corresponding to this registry occurs. @end defun @defun EventRegistry.disconnect (object) Remove the given @var{object} from the registry. Once removed, the object will no longer receive notifications of events. @end defun Here is an example: @smallexample def exit_handler (event): print "event type: exit" print "exit code: %d" % (event.exit_code) gdb.events.exited.connect (exit_handler) @end smallexample In the above example we connect our handler @code{exit_handler} to the registry @code{events.exited}. Once connected, @code{exit_handler} gets called when the inferior exits. The argument @dfn{event} in this example is of type @code{gdb.ExitedEvent}. As you can see in the example the @code{ExitedEvent} object has an attribute which indicates the exit code of the inferior. The following is a listing of the event registries that are available and details of the events they emit: @table @code @item events.cont Emits @code{gdb.ThreadEvent}. Some events can be thread specific when @value{GDBN} is running in non-stop mode. When represented in Python, these events all extend @code{gdb.ThreadEvent}. Note, this event is not emitted directly; instead, events which are emitted by this or other modules might extend this event. Examples of these events are @code{gdb.BreakpointEvent} and @code{gdb.ContinueEvent}. @defvar ThreadEvent.inferior_thread In non-stop mode this attribute will be set to the specific thread which was involved in the emitted event. Otherwise, it will be set to @code{None}. @end defvar Emits @code{gdb.ContinueEvent} which extends @code{gdb.ThreadEvent}. This event indicates that the inferior has been continued after a stop. For inherited attribute refer to @code{gdb.ThreadEvent} above. @item events.exited Emits @code{events.ExitedEvent} which indicates that the inferior has exited. @code{events.ExitedEvent} has two attributes: @defvar ExitedEvent.exit_code An integer representing the exit code, if available, which the inferior has returned. (The exit code could be unavailable if, for example, @value{GDBN} detaches from the inferior.) If the exit code is unavailable, the attribute does not exist. @end defvar @defvar ExitedEvent inferior A reference to the inferior which triggered the @code{exited} event. @end defvar @item events.stop Emits @code{gdb.StopEvent} which extends @code{gdb.ThreadEvent}. Indicates that the inferior has stopped. All events emitted by this registry extend StopEvent. As a child of @code{gdb.ThreadEvent}, @code{gdb.StopEvent} will indicate the stopped thread when @value{GDBN} is running in non-stop mode. Refer to @code{gdb.ThreadEvent} above for more details. Emits @code{gdb.SignalEvent} which extends @code{gdb.StopEvent}. This event indicates that the inferior or one of its threads has received as signal. @code{gdb.SignalEvent} has the following attributes: @defvar SignalEvent.stop_signal A string representing the signal received by the inferior. A list of possible signal values can be obtained by running the command @code{info signals} in the @value{GDBN} command prompt. @end defvar Also emits @code{gdb.BreakpointEvent} which extends @code{gdb.StopEvent}. @code{gdb.BreakpointEvent} event indicates that one or more breakpoints have been hit, and has the following attributes: @defvar BreakpointEvent.breakpoints A sequence containing references to all the breakpoints (type @code{gdb.Breakpoint}) that were hit. @xref{Breakpoints In Python}, for details of the @code{gdb.Breakpoint} object. @end defvar @defvar BreakpointEvent.breakpoint A reference to the first breakpoint that was hit. This function is maintained for backward compatibility and is now deprecated in favor of the @code{gdb.BreakpointEvent.breakpoints} attribute. @end defvar @item events.new_objfile Emits @code{gdb.NewObjFileEvent} which indicates that a new object file has been loaded by @value{GDBN}. @code{gdb.NewObjFileEvent} has one attribute: @defvar NewObjFileEvent.new_objfile A reference to the object file (@code{gdb.Objfile}) which has been loaded. @xref{Objfiles In Python}, for details of the @code{gdb.Objfile} object. @end defvar @end table @node Threads In Python @subsubsection Threads In Python @cindex threads in python @findex gdb.InferiorThread Python scripts can access information about, and manipulate inferior threads controlled by @value{GDBN}, via objects of the @code{gdb.InferiorThread} class. The following thread-related functions are available in the @code{gdb} module: @findex gdb.selected_thread @defun gdb.selected_thread () This function returns the thread object for the selected thread. If there is no selected thread, this will return @code{None}. @end defun A @code{gdb.InferiorThread} object has the following attributes: @defvar InferiorThread.name The name of the thread. If the user specified a name using @code{thread name}, then this returns that name. Otherwise, if an OS-supplied name is available, then it is returned. Otherwise, this returns @code{None}. This attribute can be assigned to. The new value must be a string object, which sets the new name, or @code{None}, which removes any user-specified thread name. @end defvar @defvar InferiorThread.num ID of the thread, as assigned by GDB. @end defvar @defvar InferiorThread.ptid ID of the thread, as assigned by the operating system. This attribute is a tuple containing three integers. The first is the Process ID (PID); the second is the Lightweight Process ID (LWPID), and the third is the Thread ID (TID). Either the LWPID or TID may be 0, which indicates that the operating system does not use that identifier. @end defvar A @code{gdb.InferiorThread} object has the following methods: @defun InferiorThread.is_valid () Returns @code{True} if the @code{gdb.InferiorThread} object is valid, @code{False} if not. A @code{gdb.InferiorThread} object will become invalid if the thread exits, or the inferior that the thread belongs is deleted. All other @code{gdb.InferiorThread} methods will throw an exception if it is invalid at the time the method is called. @end defun @defun InferiorThread.switch () This changes @value{GDBN}'s currently selected thread to the one represented by this object. @end defun @defun InferiorThread.is_stopped () Return a Boolean indicating whether the thread is stopped. @end defun @defun InferiorThread.is_running () Return a Boolean indicating whether the thread is running. @end defun @defun InferiorThread.is_exited () Return a Boolean indicating whether the thread is exited. @end defun @node Commands In Python @subsubsection Commands In Python @cindex commands in python @cindex python commands You can implement new @value{GDBN} CLI commands in Python. A CLI command is implemented using an instance of the @code{gdb.Command} class, most commonly using a subclass. @defun Command.__init__ (name, @var{command_class} @r{[}, @var{completer_class} @r{[}, @var{prefix}@r{]]}) The object initializer for @code{Command} registers the new command with @value{GDBN}. This initializer is normally invoked from the subclass' own @code{__init__} method. @var{name} is the name of the command. If @var{name} consists of multiple words, then the initial words are looked for as prefix commands. In this case, if one of the prefix commands does not exist, an exception is raised. There is no support for multi-line commands. @var{command_class} should be one of the @samp{COMMAND_} constants defined below. This argument tells @value{GDBN} how to categorize the new command in the help system. @var{completer_class} is an optional argument. If given, it should be one of the @samp{COMPLETE_} constants defined below. This argument tells @value{GDBN} how to perform completion for this command. If not given, @value{GDBN} will attempt to complete using the object's @code{complete} method (see below); if no such method is found, an error will occur when completion is attempted. @var{prefix} is an optional argument. If @code{True}, then the new command is a prefix command; sub-commands of this command may be registered. The help text for the new command is taken from the Python documentation string for the command's class, if there is one. If no documentation string is provided, the default value ``This command is not documented.'' is used. @end defun @cindex don't repeat Python command @defun Command.dont_repeat () By default, a @value{GDBN} command is repeated when the user enters a blank line at the command prompt. A command can suppress this behavior by invoking the @code{dont_repeat} method. This is similar to the user command @code{dont-repeat}, see @ref{Define, dont-repeat}. @end defun @defun Command.invoke (argument, from_tty) This method is called by @value{GDBN} when this command is invoked. @var{argument} is a string. It is the argument to the command, after leading and trailing whitespace has been stripped. @var{from_tty} is a boolean argument. When true, this means that the command was entered by the user at the terminal; when false it means that the command came from elsewhere. If this method throws an exception, it is turned into a @value{GDBN} @code{error} call. Otherwise, the return value is ignored. @findex gdb.string_to_argv To break @var{argument} up into an argv-like string use @code{gdb.string_to_argv}. This function behaves identically to @value{GDBN}'s internal argument lexer @code{buildargv}. It is recommended to use this for consistency. Arguments are separated by spaces and may be quoted. Example: @smallexample print gdb.string_to_argv ("1 2\ \\\"3 '4 \"5' \"6 '7\"") ['1', '2 "3', '4 "5', "6 '7"] @end smallexample @end defun @cindex completion of Python commands @defun Command.complete (text, word) This method is called by @value{GDBN} when the user attempts completion on this command. All forms of completion are handled by this method, that is, the @key{TAB} and @key{M-?} key bindings (@pxref{Completion}), and the @code{complete} command (@pxref{Help, complete}). The arguments @var{text} and @var{word} are both strings. @var{text} holds the complete command line up to the cursor's location. @var{word} holds the last word of the command line; this is computed using a word-breaking heuristic. The @code{complete} method can return several values: @itemize @bullet @item If the return value is a sequence, the contents of the sequence are used as the completions. It is up to @code{complete} to ensure that the contents actually do complete the word. A zero-length sequence is allowed, it means that there were no completions available. Only string elements of the sequence are used; other elements in the sequence are ignored. @item If the return value is one of the @samp{COMPLETE_} constants defined below, then the corresponding @value{GDBN}-internal completion function is invoked, and its result is used. @item All other results are treated as though there were no available completions. @end itemize @end defun When a new command is registered, it must be declared as a member of some general class of commands. This is used to classify top-level commands in the on-line help system; note that prefix commands are not listed under their own category but rather that of their top-level command. The available classifications are represented by constants defined in the @code{gdb} module: @table @code @findex COMMAND_NONE @findex gdb.COMMAND_NONE @item gdb.COMMAND_NONE The command does not belong to any particular class. A command in this category will not be displayed in any of the help categories. @findex COMMAND_RUNNING @findex gdb.COMMAND_RUNNING @item gdb.COMMAND_RUNNING The command is related to running the inferior. For example, @code{start}, @code{step}, and @code{continue} are in this category. Type @kbd{help running} at the @value{GDBN} prompt to see a list of commands in this category. @findex COMMAND_DATA @findex gdb.COMMAND_DATA @item gdb.COMMAND_DATA The command is related to data or variables. For example, @code{call}, @code{find}, and @code{print} are in this category. Type @kbd{help data} at the @value{GDBN} prompt to see a list of commands in this category. @findex COMMAND_STACK @findex gdb.COMMAND_STACK @item gdb.COMMAND_STACK The command has to do with manipulation of the stack. For example, @code{backtrace}, @code{frame}, and @code{return} are in this category. Type @kbd{help stack} at the @value{GDBN} prompt to see a list of commands in this category. @findex COMMAND_FILES @findex gdb.COMMAND_FILES @item gdb.COMMAND_FILES This class is used for file-related commands. For example, @code{file}, @code{list} and @code{section} are in this category. Type @kbd{help files} at the @value{GDBN} prompt to see a list of commands in this category. @findex COMMAND_SUPPORT @findex gdb.COMMAND_SUPPORT @item gdb.COMMAND_SUPPORT This should be used for ``support facilities'', generally meaning things that are useful to the user when interacting with @value{GDBN}, but not related to the state of the inferior. For example, @code{help}, @code{make}, and @code{shell} are in this category. Type @kbd{help support} at the @value{GDBN} prompt to see a list of commands in this category. @findex COMMAND_STATUS @findex gdb.COMMAND_STATUS @item gdb.COMMAND_STATUS The command is an @samp{info}-related command, that is, related to the state of @value{GDBN} itself. For example, @code{info}, @code{macro}, and @code{show} are in this category. Type @kbd{help status} at the @value{GDBN} prompt to see a list of commands in this category. @findex COMMAND_BREAKPOINTS @findex gdb.COMMAND_BREAKPOINTS @item gdb.COMMAND_BREAKPOINTS The command has to do with breakpoints. For example, @code{break}, @code{clear}, and @code{delete} are in this category. Type @kbd{help breakpoints} at the @value{GDBN} prompt to see a list of commands in this category. @findex COMMAND_TRACEPOINTS @findex gdb.COMMAND_TRACEPOINTS @item gdb.COMMAND_TRACEPOINTS The command has to do with tracepoints. For example, @code{trace}, @code{actions}, and @code{tfind} are in this category. Type @kbd{help tracepoints} at the @value{GDBN} prompt to see a list of commands in this category. @findex COMMAND_USER @findex gdb.COMMAND_USER @item gdb.COMMAND_USER The command is a general purpose command for the user, and typically does not fit in one of the other categories. Type @kbd{help user-defined} at the @value{GDBN} prompt to see a list of commands in this category, as well as the list of gdb macros (@pxref{Sequences}). @findex COMMAND_OBSCURE @findex gdb.COMMAND_OBSCURE @item gdb.COMMAND_OBSCURE The command is only used in unusual circumstances, or is not of general interest to users. For example, @code{checkpoint}, @code{fork}, and @code{stop} are in this category. Type @kbd{help obscure} at the @value{GDBN} prompt to see a list of commands in this category. @findex COMMAND_MAINTENANCE @findex gdb.COMMAND_MAINTENANCE @item gdb.COMMAND_MAINTENANCE The command is only useful to @value{GDBN} maintainers. The @code{maintenance} and @code{flushregs} commands are in this category. Type @kbd{help internals} at the @value{GDBN} prompt to see a list of commands in this category. @end table A new command can use a predefined completion function, either by specifying it via an argument at initialization, or by returning it from the @code{complete} method. These predefined completion constants are all defined in the @code{gdb} module: @table @code @findex COMPLETE_NONE @findex gdb.COMPLETE_NONE @item gdb.COMPLETE_NONE This constant means that no completion should be done. @findex COMPLETE_FILENAME @findex gdb.COMPLETE_FILENAME @item gdb.COMPLETE_FILENAME This constant means that filename completion should be performed. @findex COMPLETE_LOCATION @findex gdb.COMPLETE_LOCATION @item gdb.COMPLETE_LOCATION This constant means that location completion should be done. @xref{Specify Location}. @findex COMPLETE_COMMAND @findex gdb.COMPLETE_COMMAND @item gdb.COMPLETE_COMMAND This constant means that completion should examine @value{GDBN} command names. @findex COMPLETE_SYMBOL @findex gdb.COMPLETE_SYMBOL @item gdb.COMPLETE_SYMBOL This constant means that completion should be done using symbol names as the source. @end table The following code snippet shows how a trivial CLI command can be implemented in Python: @smallexample class HelloWorld (gdb.Command): """Greet the whole world.""" def __init__ (self): super (HelloWorld, self).__init__ ("hello-world", gdb.COMMAND_USER) def invoke (self, arg, from_tty): print "Hello, World!" HelloWorld () @end smallexample The last line instantiates the class, and is necessary to trigger the registration of the command with @value{GDBN}. Depending on how the Python code is read into @value{GDBN}, you may need to import the @code{gdb} module explicitly. @node Parameters In Python @subsubsection Parameters In Python @cindex parameters in python @cindex python parameters @tindex gdb.Parameter @tindex Parameter You can implement new @value{GDBN} parameters using Python. A new parameter is implemented as an instance of the @code{gdb.Parameter} class. Parameters are exposed to the user via the @code{set} and @code{show} commands. @xref{Help}. There are many parameters that already exist and can be set in @value{GDBN}. Two examples are: @code{set follow fork} and @code{set charset}. Setting these parameters influences certain behavior in @value{GDBN}. Similarly, you can define parameters that can be used to influence behavior in custom Python scripts and commands. @defun Parameter.__init__ (name, @var{command-class}, @var{parameter-class} @r{[}, @var{enum-sequence}@r{]}) The object initializer for @code{Parameter} registers the new parameter with @value{GDBN}. This initializer is normally invoked from the subclass' own @code{__init__} method. @var{name} is the name of the new parameter. If @var{name} consists of multiple words, then the initial words are looked for as prefix parameters. An example of this can be illustrated with the @code{set print} set of parameters. If @var{name} is @code{print foo}, then @code{print} will be searched as the prefix parameter. In this case the parameter can subsequently be accessed in @value{GDBN} as @code{set print foo}. If @var{name} consists of multiple words, and no prefix parameter group can be found, an exception is raised. @var{command-class} should be one of the @samp{COMMAND_} constants (@pxref{Commands In Python}). This argument tells @value{GDBN} how to categorize the new parameter in the help system. @var{parameter-class} should be one of the @samp{PARAM_} constants defined below. This argument tells @value{GDBN} the type of the new parameter; this information is used for input validation and completion. If @var{parameter-class} is @code{PARAM_ENUM}, then @var{enum-sequence} must be a sequence of strings. These strings represent the possible values for the parameter. If @var{parameter-class} is not @code{PARAM_ENUM}, then the presence of a fourth argument will cause an exception to be thrown. The help text for the new parameter is taken from the Python documentation string for the parameter's class, if there is one. If there is no documentation string, a default value is used. @end defun @defvar Parameter.set_doc If this attribute exists, and is a string, then its value is used as the help text for this parameter's @code{set} command. The value is examined when @code{Parameter.__init__} is invoked; subsequent changes have no effect. @end defvar @defvar Parameter.show_doc If this attribute exists, and is a string, then its value is used as the help text for this parameter's @code{show} command. The value is examined when @code{Parameter.__init__} is invoked; subsequent changes have no effect. @end defvar @defvar Parameter.value The @code{value} attribute holds the underlying value of the parameter. It can be read and assigned to just as any other attribute. @value{GDBN} does validation when assignments are made. @end defvar There are two methods that should be implemented in any @code{Parameter} class. These are: @defun Parameter.get_set_string (self) @value{GDBN} will call this method when a @var{parameter}'s value has been changed via the @code{set} API (for example, @kbd{set foo off}). The @code{value} attribute has already been populated with the new value and may be used in output. This method must return a string. @end defun @defun Parameter.get_show_string (self, svalue) @value{GDBN} will call this method when a @var{parameter}'s @code{show} API has been invoked (for example, @kbd{show foo}). The argument @code{svalue} receives the string representation of the current value. This method must return a string. @end defun When a new parameter is defined, its type must be specified. The available types are represented by constants defined in the @code{gdb} module: @table @code @findex PARAM_BOOLEAN @findex gdb.PARAM_BOOLEAN @item gdb.PARAM_BOOLEAN The value is a plain boolean. The Python boolean values, @code{True} and @code{False} are the only valid values. @findex PARAM_AUTO_BOOLEAN @findex gdb.PARAM_AUTO_BOOLEAN @item gdb.PARAM_AUTO_BOOLEAN The value has three possible states: true, false, and @samp{auto}. In Python, true and false are represented using boolean constants, and @samp{auto} is represented using @code{None}. @findex PARAM_UINTEGER @findex gdb.PARAM_UINTEGER @item gdb.PARAM_UINTEGER The value is an unsigned integer. The value of 0 should be interpreted to mean ``unlimited''. @findex PARAM_INTEGER @findex gdb.PARAM_INTEGER @item gdb.PARAM_INTEGER The value is a signed integer. The value of 0 should be interpreted to mean ``unlimited''. @findex PARAM_STRING @findex gdb.PARAM_STRING @item gdb.PARAM_STRING The value is a string. When the user modifies the string, any escape sequences, such as @samp{\t}, @samp{\f}, and octal escapes, are translated into corresponding characters and encoded into the current host charset. @findex PARAM_STRING_NOESCAPE @findex gdb.PARAM_STRING_NOESCAPE @item gdb.PARAM_STRING_NOESCAPE The value is a string. When the user modifies the string, escapes are passed through untranslated. @findex PARAM_OPTIONAL_FILENAME @findex gdb.PARAM_OPTIONAL_FILENAME @item gdb.PARAM_OPTIONAL_FILENAME The value is a either a filename (a string), or @code{None}. @findex PARAM_FILENAME @findex gdb.PARAM_FILENAME @item gdb.PARAM_FILENAME The value is a filename. This is just like @code{PARAM_STRING_NOESCAPE}, but uses file names for completion. @findex PARAM_ZINTEGER @findex gdb.PARAM_ZINTEGER @item gdb.PARAM_ZINTEGER The value is an integer. This is like @code{PARAM_INTEGER}, except 0 is interpreted as itself. @findex PARAM_ENUM @findex gdb.PARAM_ENUM @item gdb.PARAM_ENUM The value is a string, which must be one of a collection string constants provided when the parameter is created. @end table @node Functions In Python @subsubsection Writing new convenience functions @cindex writing convenience functions @cindex convenience functions in python @cindex python convenience functions @tindex gdb.Function @tindex Function You can implement new convenience functions (@pxref{Convenience Vars}) in Python. A convenience function is an instance of a subclass of the class @code{gdb.Function}. @defun Function.__init__ (name) The initializer for @code{Function} registers the new function with @value{GDBN}. The argument @var{name} is the name of the function, a string. The function will be visible to the user as a convenience variable of type @code{internal function}, whose name is the same as the given @var{name}. The documentation for the new function is taken from the documentation string for the new class. @end defun @defun Function.invoke (@var{*args}) When a convenience function is evaluated, its arguments are converted to instances of @code{gdb.Value}, and then the function's @code{invoke} method is called. Note that @value{GDBN} does not predetermine the arity of convenience functions. Instead, all available arguments are passed to @code{invoke}, following the standard Python calling convention. In particular, a convenience function can have default values for parameters without ill effect. The return value of this method is used as its value in the enclosing expression. If an ordinary Python value is returned, it is converted to a @code{gdb.Value} following the usual rules. @end defun The following code snippet shows how a trivial convenience function can be implemented in Python: @smallexample class Greet (gdb.Function): """Return string to greet someone. Takes a name as argument.""" def __init__ (self): super (Greet, self).__init__ ("greet") def invoke (self, name): return "Hello, %s!" % name.string () Greet () @end smallexample The last line instantiates the class, and is necessary to trigger the registration of the function with @value{GDBN}. Depending on how the Python code is read into @value{GDBN}, you may need to import the @code{gdb} module explicitly. Now you can use the function in an expression: @smallexample (gdb) print $greet("Bob") $1 = "Hello, Bob!" @end smallexample @node Progspaces In Python @subsubsection Program Spaces In Python @cindex progspaces in python @tindex gdb.Progspace @tindex Progspace A program space, or @dfn{progspace}, represents a symbolic view of an address space. It consists of all of the objfiles of the program. @xref{Objfiles In Python}. @xref{Inferiors and Programs, program spaces}, for more details about program spaces. The following progspace-related functions are available in the @code{gdb} module: @findex gdb.current_progspace @defun gdb.current_progspace () This function returns the program space of the currently selected inferior. @xref{Inferiors and Programs}. @end defun @findex gdb.progspaces @defun gdb.progspaces () Return a sequence of all the progspaces currently known to @value{GDBN}. @end defun Each progspace is represented by an instance of the @code{gdb.Progspace} class. @defvar Progspace.filename The file name of the progspace as a string. @end defvar @defvar Progspace.pretty_printers The @code{pretty_printers} attribute is a list of functions. It is used to look up pretty-printers. A @code{Value} is passed to each function in order; if the function returns @code{None}, then the search continues. Otherwise, the return value should be an object which is used to format the value. @xref{Pretty Printing API}, for more information. @end defvar @defvar Progspace.type_printers The @code{type_printers} attribute is a list of type printer objects. @xref{Type Printing API}, for more information. @end defvar @node Objfiles In Python @subsubsection Objfiles In Python @cindex objfiles in python @tindex gdb.Objfile @tindex Objfile @value{GDBN} loads symbols for an inferior from various symbol-containing files (@pxref{Files}). These include the primary executable file, any shared libraries used by the inferior, and any separate debug info files (@pxref{Separate Debug Files}). @value{GDBN} calls these symbol-containing files @dfn{objfiles}. The following objfile-related functions are available in the @code{gdb} module: @findex gdb.current_objfile @defun gdb.current_objfile () When auto-loading a Python script (@pxref{Python Auto-loading}), @value{GDBN} sets the ``current objfile'' to the corresponding objfile. This function returns the current objfile. If there is no current objfile, this function returns @code{None}. @end defun @findex gdb.objfiles @defun gdb.objfiles () Return a sequence of all the objfiles current known to @value{GDBN}. @xref{Objfiles In Python}. @end defun Each objfile is represented by an instance of the @code{gdb.Objfile} class. @defvar Objfile.filename The file name of the objfile as a string. @end defvar @defvar Objfile.pretty_printers The @code{pretty_printers} attribute is a list of functions. It is used to look up pretty-printers. A @code{Value} is passed to each function in order; if the function returns @code{None}, then the search continues. Otherwise, the return value should be an object which is used to format the value. @xref{Pretty Printing API}, for more information. @end defvar @defvar Objfile.type_printers The @code{type_printers} attribute is a list of type printer objects. @xref{Type Printing API}, for more information. @end defvar A @code{gdb.Objfile} object has the following methods: @defun Objfile.is_valid () Returns @code{True} if the @code{gdb.Objfile} object is valid, @code{False} if not. A @code{gdb.Objfile} object can become invalid if the object file it refers to is not loaded in @value{GDBN} any longer. All other @code{gdb.Objfile} methods will throw an exception if it is invalid at the time the method is called. @end defun @node Frames In Python @subsubsection Accessing inferior stack frames from Python. @cindex frames in python When the debugged program stops, @value{GDBN} is able to analyze its call stack (@pxref{Frames,,Stack frames}). The @code{gdb.Frame} class represents a frame in the stack. A @code{gdb.Frame} object is only valid while its corresponding frame exists in the inferior's stack. If you try to use an invalid frame object, @value{GDBN} will throw a @code{gdb.error} exception (@pxref{Exception Handling}). Two @code{gdb.Frame} objects can be compared for equality with the @code{==} operator, like: @smallexample (@value{GDBP}) python print gdb.newest_frame() == gdb.selected_frame () True @end smallexample The following frame-related functions are available in the @code{gdb} module: @findex gdb.selected_frame @defun gdb.selected_frame () Return the selected frame object. (@pxref{Selection,,Selecting a Frame}). @end defun @findex gdb.newest_frame @defun gdb.newest_frame () Return the newest frame object for the selected thread. @end defun @defun gdb.frame_stop_reason_string (reason) Return a string explaining the reason why @value{GDBN} stopped unwinding frames, as expressed by the given @var{reason} code (an integer, see the @code{unwind_stop_reason} method further down in this section). @end defun A @code{gdb.Frame} object has the following methods: @defun Frame.is_valid () Returns true if the @code{gdb.Frame} object is valid, false if not. A frame object can become invalid if the frame it refers to doesn't exist anymore in the inferior. All @code{gdb.Frame} methods will throw an exception if it is invalid at the time the method is called. @end defun @defun Frame.name () Returns the function name of the frame, or @code{None} if it can't be obtained. @end defun @defun Frame.architecture () Returns the @code{gdb.Architecture} object corresponding to the frame's architecture. @xref{Architectures In Python}. @end defun @defun Frame.type () Returns the type of the frame. The value can be one of: @table @code @item gdb.NORMAL_FRAME An ordinary stack frame. @item gdb.DUMMY_FRAME A fake stack frame that was created by @value{GDBN} when performing an inferior function call. @item gdb.INLINE_FRAME A frame representing an inlined function. The function was inlined into a @code{gdb.NORMAL_FRAME} that is older than this one. @item gdb.TAILCALL_FRAME A frame representing a tail call. @xref{Tail Call Frames}. @item gdb.SIGTRAMP_FRAME A signal trampoline frame. This is the frame created by the OS when it calls into a signal handler. @item gdb.ARCH_FRAME A fake stack frame representing a cross-architecture call. @item gdb.SENTINEL_FRAME This is like @code{gdb.NORMAL_FRAME}, but it is only used for the newest frame. @end table @end defun @defun Frame.unwind_stop_reason () Return an integer representing the reason why it's not possible to find more frames toward the outermost frame. Use @code{gdb.frame_stop_reason_string} to convert the value returned by this function to a string. The value can be one of: @table @code @item gdb.FRAME_UNWIND_NO_REASON No particular reason (older frames should be available). @item gdb.FRAME_UNWIND_NULL_ID The previous frame's analyzer returns an invalid result. @item gdb.FRAME_UNWIND_OUTERMOST This frame is the outermost. @item gdb.FRAME_UNWIND_UNAVAILABLE Cannot unwind further, because that would require knowing the values of registers or memory that have not been collected. @item gdb.FRAME_UNWIND_INNER_ID This frame ID looks like it ought to belong to a NEXT frame, but we got it for a PREV frame. Normally, this is a sign of unwinder failure. It could also indicate stack corruption. @item gdb.FRAME_UNWIND_SAME_ID This frame has the same ID as the previous one. That means that unwinding further would almost certainly give us another frame with exactly the same ID, so break the chain. Normally, this is a sign of unwinder failure. It could also indicate stack corruption. @item gdb.FRAME_UNWIND_NO_SAVED_PC The frame unwinder did not find any saved PC, but we needed one to unwind further. @item gdb.FRAME_UNWIND_FIRST_ERROR Any stop reason greater or equal to this value indicates some kind of error. This special value facilitates writing code that tests for errors in unwinding in a way that will work correctly even if the list of the other values is modified in future @value{GDBN} versions. Using it, you could write: @smallexample reason = gdb.selected_frame().unwind_stop_reason () reason_str = gdb.frame_stop_reason_string (reason) if reason >= gdb.FRAME_UNWIND_FIRST_ERROR: print "An error occured: %s" % reason_str @end smallexample @end table @end defun @defun Frame.pc () Returns the frame's resume address. @end defun @defun Frame.block () Return the frame's code block. @xref{Blocks In Python}. @end defun @defun Frame.function () Return the symbol for the function corresponding to this frame. @xref{Symbols In Python}. @end defun @defun Frame.older () Return the frame that called this frame. @end defun @defun Frame.newer () Return the frame called by this frame. @end defun @defun Frame.find_sal () Return the frame's symtab and line object. @xref{Symbol Tables In Python}. @end defun @defun Frame.read_var (variable @r{[}, block@r{]}) Return the value of @var{variable} in this frame. If the optional argument @var{block} is provided, search for the variable from that block; otherwise start at the frame's current block (which is determined by the frame's current program counter). @var{variable} must be a string or a @code{gdb.Symbol} object. @var{block} must be a @code{gdb.Block} object. @end defun @defun Frame.select () Set this frame to be the selected frame. @xref{Stack, ,Examining the Stack}. @end defun @node Blocks In Python @subsubsection Accessing frame blocks from Python. @cindex blocks in python @tindex gdb.Block Within each frame, @value{GDBN} maintains information on each block stored in that frame. These blocks are organized hierarchically, and are represented individually in Python as a @code{gdb.Block}. Please see @ref{Frames In Python}, for a more in-depth discussion on frames. Furthermore, see @ref{Stack, ,Examining the Stack}, for more detailed technical information on @value{GDBN}'s book-keeping of the stack. A @code{gdb.Block} is iterable. The iterator returns the symbols (@pxref{Symbols In Python}) local to the block. Python programs should not assume that a specific block object will always contain a given symbol, since changes in @value{GDBN} features and infrastructure may cause symbols move across blocks in a symbol table. The following block-related functions are available in the @code{gdb} module: @findex gdb.block_for_pc @defun gdb.block_for_pc (pc) Return the @code{gdb.Block} containing the given @var{pc} value. If the block cannot be found for the @var{pc} value specified, the function will return @code{None}. @end defun A @code{gdb.Block} object has the following methods: @defun Block.is_valid () Returns @code{True} if the @code{gdb.Block} object is valid, @code{False} if not. A block object can become invalid if the block it refers to doesn't exist anymore in the inferior. All other @code{gdb.Block} methods will throw an exception if it is invalid at the time the method is called. The block's validity is also checked during iteration over symbols of the block. @end defun A @code{gdb.Block} object has the following attributes: @defvar Block.start The start address of the block. This attribute is not writable. @end defvar @defvar Block.end The end address of the block. This attribute is not writable. @end defvar @defvar Block.function The name of the block represented as a @code{gdb.Symbol}. If the block is not named, then this attribute holds @code{None}. This attribute is not writable. @end defvar @defvar Block.superblock The block containing this block. If this parent block does not exist, this attribute holds @code{None}. This attribute is not writable. @end defvar @defvar Block.global_block The global block associated with this block. This attribute is not writable. @end defvar @defvar Block.static_block The static block associated with this block. This attribute is not writable. @end defvar @defvar Block.is_global @code{True} if the @code{gdb.Block} object is a global block, @code{False} if not. This attribute is not writable. @end defvar @defvar Block.is_static @code{True} if the @code{gdb.Block} object is a static block, @code{False} if not. This attribute is not writable. @end defvar @node Symbols In Python @subsubsection Python representation of Symbols. @cindex symbols in python @tindex gdb.Symbol @value{GDBN} represents every variable, function and type as an entry in a symbol table. @xref{Symbols, ,Examining the Symbol Table}. Similarly, Python represents these symbols in @value{GDBN} with the @code{gdb.Symbol} object. The following symbol-related functions are available in the @code{gdb} module: @findex gdb.lookup_symbol @defun gdb.lookup_symbol (name @r{[}, block @r{[}, domain@r{]]}) This function searches for a symbol by name. The search scope can be restricted to the parameters defined in the optional domain and block arguments. @var{name} is the name of the symbol. It must be a string. The optional @var{block} argument restricts the search to symbols visible in that @var{block}. The @var{block} argument must be a @code{gdb.Block} object. If omitted, the block for the current frame is used. The optional @var{domain} argument restricts the search to the domain type. The @var{domain} argument must be a domain constant defined in the @code{gdb} module and described later in this chapter. The result is a tuple of two elements. The first element is a @code{gdb.Symbol} object or @code{None} if the symbol is not found. If the symbol is found, the second element is @code{True} if the symbol is a field of a method's object (e.g., @code{this} in C@t{++}), otherwise it is @code{False}. If the symbol is not found, the second element is @code{False}. @end defun @findex gdb.lookup_global_symbol @defun gdb.lookup_global_symbol (name @r{[}, domain@r{]}) This function searches for a global symbol by name. The search scope can be restricted to by the domain argument. @var{name} is the name of the symbol. It must be a string. The optional @var{domain} argument restricts the search to the domain type. The @var{domain} argument must be a domain constant defined in the @code{gdb} module and described later in this chapter. The result is a @code{gdb.Symbol} object or @code{None} if the symbol is not found. @end defun A @code{gdb.Symbol} object has the following attributes: @defvar Symbol.type The type of the symbol or @code{None} if no type is recorded. This attribute is represented as a @code{gdb.Type} object. @xref{Types In Python}. This attribute is not writable. @end defvar @defvar Symbol.symtab The symbol table in which the symbol appears. This attribute is represented as a @code{gdb.Symtab} object. @xref{Symbol Tables In Python}. This attribute is not writable. @end defvar @defvar Symbol.line The line number in the source code at which the symbol was defined. This is an integer. @end defvar @defvar Symbol.name The name of the symbol as a string. This attribute is not writable. @end defvar @defvar Symbol.linkage_name The name of the symbol, as used by the linker (i.e., may be mangled). This attribute is not writable. @end defvar @defvar Symbol.print_name The name of the symbol in a form suitable for output. This is either @code{name} or @code{linkage_name}, depending on whether the user asked @value{GDBN} to display demangled or mangled names. @end defvar @defvar Symbol.addr_class The address class of the symbol. This classifies how to find the value of a symbol. Each address class is a constant defined in the @code{gdb} module and described later in this chapter. @end defvar @defvar Symbol.needs_frame This is @code{True} if evaluating this symbol's value requires a frame (@pxref{Frames In Python}) and @code{False} otherwise. Typically, local variables will require a frame, but other symbols will not. @end defvar @defvar Symbol.is_argument @code{True} if the symbol is an argument of a function. @end defvar @defvar Symbol.is_constant @code{True} if the symbol is a constant. @end defvar @defvar Symbol.is_function @code{True} if the symbol is a function or a method. @end defvar @defvar Symbol.is_variable @code{True} if the symbol is a variable. @end defvar A @code{gdb.Symbol} object has the following methods: @defun Symbol.is_valid () Returns @code{True} if the @code{gdb.Symbol} object is valid, @code{False} if not. A @code{gdb.Symbol} object can become invalid if the symbol it refers to does not exist in @value{GDBN} any longer. All other @code{gdb.Symbol} methods will throw an exception if it is invalid at the time the method is called. @end defun @defun Symbol.value (@r{[}frame@r{]}) Compute the value of the symbol, as a @code{gdb.Value}. For functions, this computes the address of the function, cast to the appropriate type. If the symbol requires a frame in order to compute its value, then @var{frame} must be given. If @var{frame} is not given, or if @var{frame} is invalid, then this method will throw an exception. @end defun The available domain categories in @code{gdb.Symbol} are represented as constants in the @code{gdb} module: @table @code @findex SYMBOL_UNDEF_DOMAIN @findex gdb.SYMBOL_UNDEF_DOMAIN @item gdb.SYMBOL_UNDEF_DOMAIN This is used when a domain has not been discovered or none of the following domains apply. This usually indicates an error either in the symbol information or in @value{GDBN}'s handling of symbols. @findex SYMBOL_VAR_DOMAIN @findex gdb.SYMBOL_VAR_DOMAIN @item gdb.SYMBOL_VAR_DOMAIN This domain contains variables, function names, typedef names and enum type values. @findex SYMBOL_STRUCT_DOMAIN @findex gdb.SYMBOL_STRUCT_DOMAIN @item gdb.SYMBOL_STRUCT_DOMAIN This domain holds struct, union and enum type names. @findex SYMBOL_LABEL_DOMAIN @findex gdb.SYMBOL_LABEL_DOMAIN @item gdb.SYMBOL_LABEL_DOMAIN This domain contains names of labels (for gotos). @findex SYMBOL_VARIABLES_DOMAIN @findex gdb.SYMBOL_VARIABLES_DOMAIN @item gdb.SYMBOL_VARIABLES_DOMAIN This domain holds a subset of the @code{SYMBOLS_VAR_DOMAIN}; it contains everything minus functions and types. @findex SYMBOL_FUNCTIONS_DOMAIN @findex gdb.SYMBOL_FUNCTIONS_DOMAIN @item gdb.SYMBOL_FUNCTION_DOMAIN This domain contains all functions. @findex SYMBOL_TYPES_DOMAIN @findex gdb.SYMBOL_TYPES_DOMAIN @item gdb.SYMBOL_TYPES_DOMAIN This domain contains all types. @end table The available address class categories in @code{gdb.Symbol} are represented as constants in the @code{gdb} module: @table @code @findex SYMBOL_LOC_UNDEF @findex gdb.SYMBOL_LOC_UNDEF @item gdb.SYMBOL_LOC_UNDEF If this is returned by address class, it indicates an error either in the symbol information or in @value{GDBN}'s handling of symbols. @findex SYMBOL_LOC_CONST @findex gdb.SYMBOL_LOC_CONST @item gdb.SYMBOL_LOC_CONST Value is constant int. @findex SYMBOL_LOC_STATIC @findex gdb.SYMBOL_LOC_STATIC @item gdb.SYMBOL_LOC_STATIC Value is at a fixed address. @findex SYMBOL_LOC_REGISTER @findex gdb.SYMBOL_LOC_REGISTER @item gdb.SYMBOL_LOC_REGISTER Value is in a register. @findex SYMBOL_LOC_ARG @findex gdb.SYMBOL_LOC_ARG @item gdb.SYMBOL_LOC_ARG Value is an argument. This value is at the offset stored within the symbol inside the frame's argument list. @findex SYMBOL_LOC_REF_ARG @findex gdb.SYMBOL_LOC_REF_ARG @item gdb.SYMBOL_LOC_REF_ARG Value address is stored in the frame's argument list. Just like @code{LOC_ARG} except that the value's address is stored at the offset, not the value itself. @findex SYMBOL_LOC_REGPARM_ADDR @findex gdb.SYMBOL_LOC_REGPARM_ADDR @item gdb.SYMBOL_LOC_REGPARM_ADDR Value is a specified register. Just like @code{LOC_REGISTER} except the register holds the address of the argument instead of the argument itself. @findex SYMBOL_LOC_LOCAL @findex gdb.SYMBOL_LOC_LOCAL @item gdb.SYMBOL_LOC_LOCAL Value is a local variable. @findex SYMBOL_LOC_TYPEDEF @findex gdb.SYMBOL_LOC_TYPEDEF @item gdb.SYMBOL_LOC_TYPEDEF Value not used. Symbols in the domain @code{SYMBOL_STRUCT_DOMAIN} all have this class. @findex SYMBOL_LOC_BLOCK @findex gdb.SYMBOL_LOC_BLOCK @item gdb.SYMBOL_LOC_BLOCK Value is a block. @findex SYMBOL_LOC_CONST_BYTES @findex gdb.SYMBOL_LOC_CONST_BYTES @item gdb.SYMBOL_LOC_CONST_BYTES Value is a byte-sequence. @findex SYMBOL_LOC_UNRESOLVED @findex gdb.SYMBOL_LOC_UNRESOLVED @item gdb.SYMBOL_LOC_UNRESOLVED Value is at a fixed address, but the address of the variable has to be determined from the minimal symbol table whenever the variable is referenced. @findex SYMBOL_LOC_OPTIMIZED_OUT @findex gdb.SYMBOL_LOC_OPTIMIZED_OUT @item gdb.SYMBOL_LOC_OPTIMIZED_OUT The value does not actually exist in the program. @findex SYMBOL_LOC_COMPUTED @findex gdb.SYMBOL_LOC_COMPUTED @item gdb.SYMBOL_LOC_COMPUTED The value's address is a computed location. @end table @node Symbol Tables In Python @subsubsection Symbol table representation in Python. @cindex symbol tables in python @tindex gdb.Symtab @tindex gdb.Symtab_and_line Access to symbol table data maintained by @value{GDBN} on the inferior is exposed to Python via two objects: @code{gdb.Symtab_and_line} and @code{gdb.Symtab}. Symbol table and line data for a frame is returned from the @code{find_sal} method in @code{gdb.Frame} object. @xref{Frames In Python}. For more information on @value{GDBN}'s symbol table management, see @ref{Symbols, ,Examining the Symbol Table}, for more information. A @code{gdb.Symtab_and_line} object has the following attributes: @defvar Symtab_and_line.symtab The symbol table object (@code{gdb.Symtab}) for this frame. This attribute is not writable. @end defvar @defvar Symtab_and_line.pc Indicates the start of the address range occupied by code for the current source line. This attribute is not writable. @end defvar @defvar Symtab_and_line.last Indicates the end of the address range occupied by code for the current source line. This attribute is not writable. @end defvar @defvar Symtab_and_line.line Indicates the current line number for this object. This attribute is not writable. @end defvar A @code{gdb.Symtab_and_line} object has the following methods: @defun Symtab_and_line.is_valid () Returns @code{True} if the @code{gdb.Symtab_and_line} object is valid, @code{False} if not. A @code{gdb.Symtab_and_line} object can become invalid if the Symbol table and line object it refers to does not exist in @value{GDBN} any longer. All other @code{gdb.Symtab_and_line} methods will throw an exception if it is invalid at the time the method is called. @end defun A @code{gdb.Symtab} object has the following attributes: @defvar Symtab.filename The symbol table's source filename. This attribute is not writable. @end defvar @defvar Symtab.objfile The symbol table's backing object file. @xref{Objfiles In Python}. This attribute is not writable. @end defvar A @code{gdb.Symtab} object has the following methods: @defun Symtab.is_valid () Returns @code{True} if the @code{gdb.Symtab} object is valid, @code{False} if not. A @code{gdb.Symtab} object can become invalid if the symbol table it refers to does not exist in @value{GDBN} any longer. All other @code{gdb.Symtab} methods will throw an exception if it is invalid at the time the method is called. @end defun @defun Symtab.fullname () Return the symbol table's source absolute file name. @end defun @defun Symtab.global_block () Return the global block of the underlying symbol table. @xref{Blocks In Python}. @end defun @defun Symtab.static_block () Return the static block of the underlying symbol table. @xref{Blocks In Python}. @end defun @node Breakpoints In Python @subsubsection Manipulating breakpoints using Python @cindex breakpoints in python @tindex gdb.Breakpoint Python code can manipulate breakpoints via the @code{gdb.Breakpoint} class. @defun Breakpoint.__init__ (spec @r{[}, type @r{[}, wp_class @r{[},internal@r{]]]}) Create a new breakpoint. @var{spec} is a string naming the location of the breakpoint, or an expression that defines a watchpoint. The contents can be any location recognized by the @code{break} command, or in the case of a watchpoint, by the @code{watch} command. The optional @var{type} denotes the breakpoint to create from the types defined later in this chapter. This argument can be either: @code{gdb.BP_BREAKPOINT} or @code{gdb.BP_WATCHPOINT}. @var{type} defaults to @code{gdb.BP_BREAKPOINT}. The optional @var{internal} argument allows the breakpoint to become invisible to the user. The breakpoint will neither be reported when created, nor will it be listed in the output from @code{info breakpoints} (but will be listed with the @code{maint info breakpoints} command). The optional @var{wp_class} argument defines the class of watchpoint to create, if @var{type} is @code{gdb.BP_WATCHPOINT}. If a watchpoint class is not provided, it is assumed to be a @code{gdb.WP_WRITE} class. @end defun @defun Breakpoint.stop (self) The @code{gdb.Breakpoint} class can be sub-classed and, in particular, you may choose to implement the @code{stop} method. If this method is defined as a sub-class of @code{gdb.Breakpoint}, it will be called when the inferior reaches any location of a breakpoint which instantiates that sub-class. If the method returns @code{True}, the inferior will be stopped at the location of the breakpoint, otherwise the inferior will continue. If there are multiple breakpoints at the same location with a @code{stop} method, each one will be called regardless of the return status of the previous. This ensures that all @code{stop} methods have a chance to execute at that location. In this scenario if one of the methods returns @code{True} but the others return @code{False}, the inferior will still be stopped. You should not alter the execution state of the inferior (i.e.@:, step, next, etc.), alter the current frame context (i.e.@:, change the current active frame), or alter, add or delete any breakpoint. As a general rule, you should not alter any data within @value{GDBN} or the inferior at this time. Example @code{stop} implementation: @smallexample class MyBreakpoint (gdb.Breakpoint): def stop (self): inf_val = gdb.parse_and_eval("foo") if inf_val == 3: return True return False @end smallexample @end defun The available watchpoint types represented by constants are defined in the @code{gdb} module: @table @code @findex WP_READ @findex gdb.WP_READ @item gdb.WP_READ Read only watchpoint. @findex WP_WRITE @findex gdb.WP_WRITE @item gdb.WP_WRITE Write only watchpoint. @findex WP_ACCESS @findex gdb.WP_ACCESS @item gdb.WP_ACCESS Read/Write watchpoint. @end table @defun Breakpoint.is_valid () Return @code{True} if this @code{Breakpoint} object is valid, @code{False} otherwise. A @code{Breakpoint} object can become invalid if the user deletes the breakpoint. In this case, the object still exists, but the underlying breakpoint does not. In the cases of watchpoint scope, the watchpoint remains valid even if execution of the inferior leaves the scope of that watchpoint. @end defun @defun Breakpoint.delete Permanently deletes the @value{GDBN} breakpoint. This also invalidates the Python @code{Breakpoint} object. Any further access to this object's attributes or methods will raise an error. @end defun @defvar Breakpoint.enabled This attribute is @code{True} if the breakpoint is enabled, and @code{False} otherwise. This attribute is writable. @end defvar @defvar Breakpoint.silent This attribute is @code{True} if the breakpoint is silent, and @code{False} otherwise. This attribute is writable. Note that a breakpoint can also be silent if it has commands and the first command is @code{silent}. This is not reported by the @code{silent} attribute. @end defvar @defvar Breakpoint.thread If the breakpoint is thread-specific, this attribute holds the thread id. If the breakpoint is not thread-specific, this attribute is @code{None}. This attribute is writable. @end defvar @defvar Breakpoint.task If the breakpoint is Ada task-specific, this attribute holds the Ada task id. If the breakpoint is not task-specific (or the underlying language is not Ada), this attribute is @code{None}. This attribute is writable. @end defvar @defvar Breakpoint.ignore_count This attribute holds the ignore count for the breakpoint, an integer. This attribute is writable. @end defvar @defvar Breakpoint.number This attribute holds the breakpoint's number --- the identifier used by the user to manipulate the breakpoint. This attribute is not writable. @end defvar @defvar Breakpoint.type This attribute holds the breakpoint's type --- the identifier used to determine the actual breakpoint type or use-case. This attribute is not writable. @end defvar @defvar Breakpoint.visible This attribute tells whether the breakpoint is visible to the user when set, or when the @samp{info breakpoints} command is run. This attribute is not writable. @end defvar The available types are represented by constants defined in the @code{gdb} module: @table @code @findex BP_BREAKPOINT @findex gdb.BP_BREAKPOINT @item gdb.BP_BREAKPOINT Normal code breakpoint. @findex BP_WATCHPOINT @findex gdb.BP_WATCHPOINT @item gdb.BP_WATCHPOINT Watchpoint breakpoint. @findex BP_HARDWARE_WATCHPOINT @findex gdb.BP_HARDWARE_WATCHPOINT @item gdb.BP_HARDWARE_WATCHPOINT Hardware assisted watchpoint. @findex BP_READ_WATCHPOINT @findex gdb.BP_READ_WATCHPOINT @item gdb.BP_READ_WATCHPOINT Hardware assisted read watchpoint. @findex BP_ACCESS_WATCHPOINT @findex gdb.BP_ACCESS_WATCHPOINT @item gdb.BP_ACCESS_WATCHPOINT Hardware assisted access watchpoint. @end table @defvar Breakpoint.hit_count This attribute holds the hit count for the breakpoint, an integer. This attribute is writable, but currently it can only be set to zero. @end defvar @defvar Breakpoint.location This attribute holds the location of the breakpoint, as specified by the user. It is a string. If the breakpoint does not have a location (that is, it is a watchpoint) the attribute's value is @code{None}. This attribute is not writable. @end defvar @defvar Breakpoint.expression This attribute holds a breakpoint expression, as specified by the user. It is a string. If the breakpoint does not have an expression (the breakpoint is not a watchpoint) the attribute's value is @code{None}. This attribute is not writable. @end defvar @defvar Breakpoint.condition This attribute holds the condition of the breakpoint, as specified by the user. It is a string. If there is no condition, this attribute's value is @code{None}. This attribute is writable. @end defvar @defvar Breakpoint.commands This attribute holds the commands attached to the breakpoint. If there are commands, this attribute's value is a string holding all the commands, separated by newlines. If there are no commands, this attribute is @code{None}. This attribute is not writable. @end defvar @node Finish Breakpoints in Python @subsubsection Finish Breakpoints @cindex python finish breakpoints @tindex gdb.FinishBreakpoint A finish breakpoint is a temporary breakpoint set at the return address of a frame, based on the @code{finish} command. @code{gdb.FinishBreakpoint} extends @code{gdb.Breakpoint}. The underlying breakpoint will be disabled and deleted when the execution will run out of the breakpoint scope (i.e.@: @code{Breakpoint.stop} or @code{FinishBreakpoint.out_of_scope} triggered). Finish breakpoints are thread specific and must be create with the right thread selected. @defun FinishBreakpoint.__init__ (@r{[}frame@r{]} @r{[}, internal@r{]}) Create a finish breakpoint at the return address of the @code{gdb.Frame} object @var{frame}. If @var{frame} is not provided, this defaults to the newest frame. The optional @var{internal} argument allows the breakpoint to become invisible to the user. @xref{Breakpoints In Python}, for further details about this argument. @end defun @defun FinishBreakpoint.out_of_scope (self) In some circumstances (e.g.@: @code{longjmp}, C@t{++} exceptions, @value{GDBN} @code{return} command, @dots{}), a function may not properly terminate, and thus never hit the finish breakpoint. When @value{GDBN} notices such a situation, the @code{out_of_scope} callback will be triggered. You may want to sub-class @code{gdb.FinishBreakpoint} and override this method: @smallexample class MyFinishBreakpoint (gdb.FinishBreakpoint) def stop (self): print "normal finish" return True def out_of_scope (): print "abnormal finish" @end smallexample @end defun @defvar FinishBreakpoint.return_value When @value{GDBN} is stopped at a finish breakpoint and the frame used to build the @code{gdb.FinishBreakpoint} object had debug symbols, this attribute will contain a @code{gdb.Value} object corresponding to the return value of the function. The value will be @code{None} if the function return type is @code{void} or if the return value was not computable. This attribute is not writable. @end defvar @node Lazy Strings In Python @subsubsection Python representation of lazy strings. @cindex lazy strings in python @tindex gdb.LazyString A @dfn{lazy string} is a string whose contents is not retrieved or encoded until it is needed. A @code{gdb.LazyString} is represented in @value{GDBN} as an @code{address} that points to a region of memory, an @code{encoding} that will be used to encode that region of memory, and a @code{length} to delimit the region of memory that represents the string. The difference between a @code{gdb.LazyString} and a string wrapped within a @code{gdb.Value} is that a @code{gdb.LazyString} will be treated differently by @value{GDBN} when printing. A @code{gdb.LazyString} is retrieved and encoded during printing, while a @code{gdb.Value} wrapping a string is immediately retrieved and encoded on creation. A @code{gdb.LazyString} object has the following functions: @defun LazyString.value () Convert the @code{gdb.LazyString} to a @code{gdb.Value}. This value will point to the string in memory, but will lose all the delayed retrieval, encoding and handling that @value{GDBN} applies to a @code{gdb.LazyString}. @end defun @defvar LazyString.address This attribute holds the address of the string. This attribute is not writable. @end defvar @defvar LazyString.length This attribute holds the length of the string in characters. If the length is -1, then the string will be fetched and encoded up to the first null of appropriate width. This attribute is not writable. @end defvar @defvar LazyString.encoding This attribute holds the encoding that will be applied to the string when the string is printed by @value{GDBN}. If the encoding is not set, or contains an empty string, then @value{GDBN} will select the most appropriate encoding when the string is printed. This attribute is not writable. @end defvar @defvar LazyString.type This attribute holds the type that is represented by the lazy string's type. For a lazy string this will always be a pointer type. To resolve this to the lazy string's character type, use the type's @code{target} method. @xref{Types In Python}. This attribute is not writable. @end defvar @node Architectures In Python @subsubsection Python representation of architectures @cindex Python architectures @value{GDBN} uses architecture specific parameters and artifacts in a number of its various computations. An architecture is represented by an instance of the @code{gdb.Architecture} class. A @code{gdb.Architecture} class has the following methods: @defun Architecture.name () Return the name (string value) of the architecture. @end defun @defun Architecture.disassemble (@var{start_pc} @r{[}, @var{end_pc} @r{[}, @var{count}@r{]]}) Return a list of disassembled instructions starting from the memory address @var{start_pc}. The optional arguments @var{end_pc} and @var{count} determine the number of instructions in the returned list. If both the optional arguments @var{end_pc} and @var{count} are specified, then a list of at most @var{count} disassembled instructions whose start address falls in the closed memory address interval from @var{start_pc} to @var{end_pc} are returned. If @var{end_pc} is not specified, but @var{count} is specified, then @var{count} number of instructions starting from the address @var{start_pc} are returned. If @var{count} is not specified but @var{end_pc} is specified, then all instructions whose start address falls in the closed memory address interval from @var{start_pc} to @var{end_pc} are returned. If neither @var{end_pc} nor @var{count} are specified, then a single instruction at @var{start_pc} is returned. For all of these cases, each element of the returned list is a Python @code{dict} with the following string keys: @table @code @item addr The value corresponding to this key is a Python long integer capturing the memory address of the instruction. @item asm The value corresponding to this key is a string value which represents the instruction with assembly language mnemonics. The assembly language flavor used is the same as that specified by the current CLI variable @code{disassembly-flavor}. @xref{Machine Code}. @item length The value corresponding to this key is the length (integer value) of the instruction in bytes. @end table @end defun @node Python Auto-loading @subsection Python Auto-loading @cindex Python auto-loading When a new object file is read (for example, due to the @code{file} command, or because the inferior has loaded a shared library), @value{GDBN} will look for Python support scripts in several ways: @file{@var{objfile}-gdb.py} (@pxref{objfile-gdb.py file}) and @code{.debug_gdb_scripts} section (@pxref{dotdebug_gdb_scripts section}). The auto-loading feature is useful for supplying application-specific debugging commands and scripts. Auto-loading can be enabled or disabled, and the list of auto-loaded scripts can be printed. @table @code @anchor{set auto-load python-scripts} @kindex set auto-load python-scripts @item set auto-load python-scripts [on|off] Enable or disable the auto-loading of Python scripts. @anchor{show auto-load python-scripts} @kindex show auto-load python-scripts @item show auto-load python-scripts Show whether auto-loading of Python scripts is enabled or disabled. @anchor{info auto-load python-scripts} @kindex info auto-load python-scripts @cindex print list of auto-loaded Python scripts @item info auto-load python-scripts [@var{regexp}] Print the list of all Python scripts that @value{GDBN} auto-loaded. Also printed is the list of Python scripts that were mentioned in the @code{.debug_gdb_scripts} section and were not found (@pxref{dotdebug_gdb_scripts section}). This is useful because their names are not printed when @value{GDBN} tries to load them and fails. There may be many of them, and printing an error message for each one is problematic. If @var{regexp} is supplied only Python scripts with matching names are printed. Example: @smallexample (gdb) info auto-load python-scripts Loaded Script Yes py-section-script.py full name: /tmp/py-section-script.py No my-foo-pretty-printers.py @end smallexample @end table When reading an auto-loaded file, @value{GDBN} sets the @dfn{current objfile}. This is available via the @code{gdb.current_objfile} function (@pxref{Objfiles In Python}). This can be useful for registering objfile-specific pretty-printers. @menu * objfile-gdb.py file:: The @file{@var{objfile}-gdb.py} file * dotdebug_gdb_scripts section:: The @code{.debug_gdb_scripts} section * Which flavor to choose?:: @end menu @node objfile-gdb.py file @subsubsection The @file{@var{objfile}-gdb.py} file @cindex @file{@var{objfile}-gdb.py} When a new object file is read, @value{GDBN} looks for a file named @file{@var{objfile}-gdb.py} (we call it @var{script-name} below), where @var{objfile} is the object file's real name, formed by ensuring that the file name is absolute, following all symlinks, and resolving @code{.} and @code{..} components. If this file exists and is readable, @value{GDBN} will evaluate it as a Python script. If this file does not exist, then @value{GDBN} will look for @var{script-name} file in all of the directories as specified below. Note that loading of this script file also requires accordingly configured @code{auto-load safe-path} (@pxref{Auto-loading safe path}). For object files using @file{.exe} suffix @value{GDBN} tries to load first the scripts normally according to its @file{.exe} filename. But if no scripts are found @value{GDBN} also tries script filenames matching the object file without its @file{.exe} suffix. This @file{.exe} stripping is case insensitive and it is attempted on any platform. This makes the script filenames compatible between Unix and MS-Windows hosts. @table @code @anchor{set auto-load scripts-directory} @kindex set auto-load scripts-directory @item set auto-load scripts-directory @r{[}@var{directories}@r{]} Control @value{GDBN} auto-loaded scripts location. Multiple directory entries may be delimited by the host platform path separator in use (@samp{:} on Unix, @samp{;} on MS-Windows and MS-DOS). Each entry here needs to be covered also by the security setting @code{set auto-load safe-path} (@pxref{set auto-load safe-path}). @anchor{with-auto-load-dir} This variable defaults to @file{$debugdir:$datadir/auto-load}. The default @code{set auto-load safe-path} value can be also overriden by @value{GDBN} configuration option @option{--with-auto-load-dir}. Any reference to @file{$debugdir} will get replaced by @var{debug-file-directory} value (@pxref{Separate Debug Files}) and any reference to @file{$datadir} will get replaced by @var{data-directory} which is determined at @value{GDBN} startup (@pxref{Data Files}). @file{$debugdir} and @file{$datadir} must be placed as a directory component --- either alone or delimited by @file{/} or @file{\} directory separators, depending on the host platform. The list of directories uses path separator (@samp{:} on GNU and Unix systems, @samp{;} on MS-Windows and MS-DOS) to separate directories, similarly to the @env{PATH} environment variable. @anchor{show auto-load scripts-directory} @kindex show auto-load scripts-directory @item show auto-load scripts-directory Show @value{GDBN} auto-loaded scripts location. @end table @value{GDBN} does not track which files it has already auto-loaded this way. @value{GDBN} will load the associated script every time the corresponding @var{objfile} is opened. So your @file{-gdb.py} file should be careful to avoid errors if it is evaluated more than once. @node dotdebug_gdb_scripts section @subsubsection The @code{.debug_gdb_scripts} section @cindex @code{.debug_gdb_scripts} section For systems using file formats like ELF and COFF, when @value{GDBN} loads a new object file it will look for a special section named @samp{.debug_gdb_scripts}. If this section exists, its contents is a list of names of scripts to load. @value{GDBN} will look for each specified script file first in the current directory and then along the source search path (@pxref{Source Path, ,Specifying Source Directories}), except that @file{$cdir} is not searched, since the compilation directory is not relevant to scripts. Entries can be placed in section @code{.debug_gdb_scripts} with, for example, this GCC macro: @example /* Note: The "MS" section flags are to remove duplicates. */ #define DEFINE_GDB_SCRIPT(script_name) \ asm("\ .pushsection \".debug_gdb_scripts\", \"MS\",@@progbits,1\n\ .byte 1\n\ .asciz \"" script_name "\"\n\ .popsection \n\ "); @end example @noindent Then one can reference the macro in a header or source file like this: @example DEFINE_GDB_SCRIPT ("my-app-scripts.py") @end example The script name may include directories if desired. Note that loading of this script file also requires accordingly configured @code{auto-load safe-path} (@pxref{Auto-loading safe path}). If the macro is put in a header, any application or library using this header will get a reference to the specified script. @node Which flavor to choose? @subsubsection Which flavor to choose? Given the multiple ways of auto-loading Python scripts, it might not always be clear which one to choose. This section provides some guidance. Benefits of the @file{-gdb.py} way: @itemize @bullet @item Can be used with file formats that don't support multiple sections. @item Ease of finding scripts for public libraries. Scripts specified in the @code{.debug_gdb_scripts} section are searched for in the source search path. For publicly installed libraries, e.g., @file{libstdc++}, there typically isn't a source directory in which to find the script. @item Doesn't require source code additions. @end itemize Benefits of the @code{.debug_gdb_scripts} way: @itemize @bullet @item Works with static linking. Scripts for libraries done the @file{-gdb.py} way require an objfile to trigger their loading. When an application is statically linked the only objfile available is the executable, and it is cumbersome to attach all the scripts from all the input libraries to the executable's @file{-gdb.py} script. @item Works with classes that are entirely inlined. Some classes can be entirely inlined, and thus there may not be an associated shared library to attach a @file{-gdb.py} script to. @item Scripts needn't be copied out of the source tree. In some circumstances, apps can be built out of large collections of internal libraries, and the build infrastructure necessary to install the @file{-gdb.py} scripts in a place where @value{GDBN} can find them is cumbersome. It may be easier to specify the scripts in the @code{.debug_gdb_scripts} section as relative paths, and add a path to the top of the source tree to the source search path. @end itemize @node Python modules @subsection Python modules @cindex python modules @value{GDBN} comes with several modules to assist writing Python code. @menu * gdb.printing:: Building and registering pretty-printers. * gdb.types:: Utilities for working with types. * gdb.prompt:: Utilities for prompt value substitution. @end menu @node gdb.printing @subsubsection gdb.printing @cindex gdb.printing This module provides a collection of utilities for working with pretty-printers. @table @code @item PrettyPrinter (@var{name}, @var{subprinters}=None) This class specifies the API that makes @samp{info pretty-printer}, @samp{enable pretty-printer} and @samp{disable pretty-printer} work. Pretty-printers should generally inherit from this class. @item SubPrettyPrinter (@var{name}) For printers that handle multiple types, this class specifies the corresponding API for the subprinters. @item RegexpCollectionPrettyPrinter (@var{name}) Utility class for handling multiple printers, all recognized via regular expressions. @xref{Writing a Pretty-Printer}, for an example. @item FlagEnumerationPrinter (@var{name}) A pretty-printer which handles printing of @code{enum} values. Unlike @value{GDBN}'s built-in @code{enum} printing, this printer attempts to work properly when there is some overlap between the enumeration constants. @var{name} is the name of the printer and also the name of the @code{enum} type to look up. @item register_pretty_printer (@var{obj}, @var{printer}, @var{replace}=False) Register @var{printer} with the pretty-printer list of @var{obj}. If @var{replace} is @code{True} then any existing copy of the printer is replaced. Otherwise a @code{RuntimeError} exception is raised if a printer with the same name already exists. @end table @node gdb.types @subsubsection gdb.types @cindex gdb.types This module provides a collection of utilities for working with @code{gdb.Type} objects. @table @code @item get_basic_type (@var{type}) Return @var{type} with const and volatile qualifiers stripped, and with typedefs and C@t{++} references converted to the underlying type. C@t{++} example: @smallexample typedef const int const_int; const_int foo (3); const_int& foo_ref (foo); int main () @{ return 0; @} @end smallexample Then in gdb: @smallexample (gdb) start (gdb) python import gdb.types (gdb) python foo_ref = gdb.parse_and_eval("foo_ref") (gdb) python print gdb.types.get_basic_type(foo_ref.type) int @end smallexample @item has_field (@var{type}, @var{field}) Return @code{True} if @var{type}, assumed to be a type with fields (e.g., a structure or union), has field @var{field}. @item make_enum_dict (@var{enum_type}) Return a Python @code{dictionary} type produced from @var{enum_type}. @item deep_items (@var{type}) Returns a Python iterator similar to the standard @code{gdb.Type.iteritems} method, except that the iterator returned by @code{deep_items} will recursively traverse anonymous struct or union fields. For example: @smallexample struct A @{ int a; union @{ int b0; int b1; @}; @}; @end smallexample @noindent Then in @value{GDBN}: @smallexample (@value{GDBP}) python import gdb.types (@value{GDBP}) python struct_a = gdb.lookup_type("struct A") (@value{GDBP}) python print struct_a.keys () @{['a', '']@} (@value{GDBP}) python print [k for k,v in gdb.types.deep_items(struct_a)] @{['a', 'b0', 'b1']@} @end smallexample @item get_type_recognizers () Return a list of the enabled type recognizers for the current context. This is called by @value{GDBN} during the type-printing process (@pxref{Type Printing API}). @item apply_type_recognizers (recognizers, type_obj) Apply the type recognizers, @var{recognizers}, to the type object @var{type_obj}. If any recognizer returns a string, return that string. Otherwise, return @code{None}. This is called by @value{GDBN} during the type-printing process (@pxref{Type Printing API}). @item register_type_printer (locus, printer) This is a convenience function to register a type printer. @var{printer} is the type printer to register. It must implement the type printer protocol. @var{locus} is either a @code{gdb.Objfile}, in which case the printer is registered with that objfile; a @code{gdb.Progspace}, in which case the printer is registered with that progspace; or @code{None}, in which case the printer is registered globally. @item TypePrinter This is a base class that implements the type printer protocol. Type printers are encouraged, but not required, to derive from this class. It defines a constructor: @defmethod TypePrinter __init__ (self, name) Initialize the type printer with the given name. The new printer starts in the enabled state. @end defmethod @end table @node gdb.prompt @subsubsection gdb.prompt @cindex gdb.prompt This module provides a method for prompt value-substitution. @table @code @item substitute_prompt (@var{string}) Return @var{string} with escape sequences substituted by values. Some escape sequences take arguments. You can specify arguments inside ``@{@}'' immediately following the escape sequence. The escape sequences you can pass to this function are: @table @code @item \\ Substitute a backslash. @item \e Substitute an ESC character. @item \f Substitute the selected frame; an argument names a frame parameter. @item \n Substitute a newline. @item \p Substitute a parameter's value; the argument names the parameter. @item \r Substitute a carriage return. @item \t Substitute the selected thread; an argument names a thread parameter. @item \v Substitute the version of GDB. @item \w Substitute the current working directory. @item \[ Begin a sequence of non-printing characters. These sequences are typically used with the ESC character, and are not counted in the string length. Example: ``\[\e[0;34m\](gdb)\[\e[0m\]'' will return a blue-colored ``(gdb)'' prompt where the length is five. @item \] End a sequence of non-printing characters. @end table For example: @smallexample substitute_prompt (``frame: \f, print arguments: \p@{print frame-arguments@}'') @end smallexample @exdent will return the string: @smallexample "frame: main, print arguments: scalars" @end smallexample @end table @node Aliases @section Creating new spellings of existing commands @cindex aliases for commands It is often useful to define alternate spellings of existing commands. For example, if a new @value{GDBN} command defined in Python has a long name to type, it is handy to have an abbreviated version of it that involves less typing. @value{GDBN} itself uses aliases. For example @samp{s} is an alias of the @samp{step} command even though it is otherwise an ambiguous abbreviation of other commands like @samp{set} and @samp{show}. Aliases are also used to provide shortened or more common versions of multi-word commands. For example, @value{GDBN} provides the @samp{tty} alias of the @samp{set inferior-tty} command. You can define a new alias with the @samp{alias} command. @table @code @kindex alias @item alias [-a] [--] @var{ALIAS} = @var{COMMAND} @end table @var{ALIAS} specifies the name of the new alias. Each word of @var{ALIAS} must consist of letters, numbers, dashes and underscores. @var{COMMAND} specifies the name of an existing command that is being aliased. The @samp{-a} option specifies that the new alias is an abbreviation of the command. Abbreviations are not shown in command lists displayed by the @samp{help} command. The @samp{--} option specifies the end of options, and is useful when @var{ALIAS} begins with a dash. Here is a simple example showing how to make an abbreviation of a command so that there is less to type. Suppose you were tired of typing @samp{disas}, the current shortest unambiguous abbreviation of the @samp{disassemble} command and you wanted an even shorter version named @samp{di}. The following will accomplish this. @smallexample (gdb) alias -a di = disas @end smallexample Note that aliases are different from user-defined commands. With a user-defined command, you also need to write documentation for it with the @samp{document} command. An alias automatically picks up the documentation of the existing command. Here is an example where we make @samp{elms} an abbreviation of @samp{elements} in the @samp{set print elements} command. This is to show that you can make an abbreviation of any part of a command. @smallexample (gdb) alias -a set print elms = set print elements (gdb) alias -a show print elms = show print elements (gdb) set p elms 20 (gdb) show p elms Limit on string chars or array elements to print is 200. @end smallexample Note that if you are defining an alias of a @samp{set} command, and you want to have an alias for the corresponding @samp{show} command, then you need to define the latter separately. Unambiguously abbreviated commands are allowed in @var{COMMAND} and @var{ALIAS}, just as they are normally. @smallexample (gdb) alias -a set pr elms = set p ele @end smallexample Finally, here is an example showing the creation of a one word alias for a more complex command. This creates alias @samp{spe} of the command @samp{set print elements}. @smallexample (gdb) alias spe = set print elements (gdb) spe 20 @end smallexample @node Interpreters @chapter Command Interpreters @cindex command interpreters @value{GDBN} supports multiple command interpreters, and some command infrastructure to allow users or user interface writers to switch between interpreters or run commands in other interpreters. @value{GDBN} currently supports two command interpreters, the console interpreter (sometimes called the command-line interpreter or @sc{cli}) and the machine interface interpreter (or @sc{gdb/mi}). This manual describes both of these interfaces in great detail. By default, @value{GDBN} will start with the console interpreter. However, the user may choose to start @value{GDBN} with another interpreter by specifying the @option{-i} or @option{--interpreter} startup options. Defined interpreters include: @table @code @item console @cindex console interpreter The traditional console or command-line interpreter. This is the most often used interpreter with @value{GDBN}. With no interpreter specified at runtime, @value{GDBN} will use this interpreter. @item mi @cindex mi interpreter The newest @sc{gdb/mi} interface (currently @code{mi2}). Used primarily by programs wishing to use @value{GDBN} as a backend for a debugger GUI or an IDE. For more information, see @ref{GDB/MI, ,The @sc{gdb/mi} Interface}. @item mi2 @cindex mi2 interpreter The current @sc{gdb/mi} interface. @item mi1 @cindex mi1 interpreter The @sc{gdb/mi} interface included in @value{GDBN} 5.1, 5.2, and 5.3. @end table @cindex invoke another interpreter The interpreter being used by @value{GDBN} may not be dynamically switched at runtime. Although possible, this could lead to a very precarious situation. Consider an IDE using @sc{gdb/mi}. If a user enters the command "interpreter-set console" in a console view, @value{GDBN} would switch to using the console interpreter, rendering the IDE inoperable! @kindex interpreter-exec Although you may only choose a single interpreter at startup, you may execute commands in any interpreter from the current interpreter using the appropriate command. If you are running the console interpreter, simply use the @code{interpreter-exec} command: @smallexample interpreter-exec mi "-data-list-register-names" @end smallexample @sc{gdb/mi} has a similar command, although it is only available in versions of @value{GDBN} which support @sc{gdb/mi} version 2 (or greater). @node TUI @chapter @value{GDBN} Text User Interface @cindex TUI @cindex Text User Interface @menu * TUI Overview:: TUI overview * TUI Keys:: TUI key bindings * TUI Single Key Mode:: TUI single key mode * TUI Commands:: TUI-specific commands * TUI Configuration:: TUI configuration variables @end menu The @value{GDBN} Text User Interface (TUI) is a terminal interface which uses the @code{curses} library to show the source file, the assembly output, the program registers and @value{GDBN} commands in separate text windows. The TUI mode is supported only on platforms where a suitable version of the @code{curses} library is available. The TUI mode is enabled by default when you invoke @value{GDBN} as @samp{@value{GDBP} -tui}. You can also switch in and out of TUI mode while @value{GDBN} runs by using various TUI commands and key bindings, such as @kbd{C-x C-a}. @xref{TUI Keys, ,TUI Key Bindings}. @node TUI Overview @section TUI Overview In TUI mode, @value{GDBN} can display several text windows: @table @emph @item command This window is the @value{GDBN} command window with the @value{GDBN} prompt and the @value{GDBN} output. The @value{GDBN} input is still managed using readline. @item source The source window shows the source file of the program. The current line and active breakpoints are displayed in this window. @item assembly The assembly window shows the disassembly output of the program. @item register This window shows the processor registers. Registers are highlighted when their values change. @end table The source and assembly windows show the current program position by highlighting the current line and marking it with a @samp{>} marker. Breakpoints are indicated with two markers. The first marker indicates the breakpoint type: @table @code @item B Breakpoint which was hit at least once. @item b Breakpoint which was never hit. @item H Hardware breakpoint which was hit at least once. @item h Hardware breakpoint which was never hit. @end table The second marker indicates whether the breakpoint is enabled or not: @table @code @item + Breakpoint is enabled. @item - Breakpoint is disabled. @end table The source, assembly and register windows are updated when the current thread changes, when the frame changes, or when the program counter changes. These windows are not all visible at the same time. The command window is always visible. The others can be arranged in several layouts: @itemize @bullet @item source only, @item assembly only, @item source and assembly, @item source and registers, or @item assembly and registers. @end itemize A status line above the command window shows the following information: @table @emph @item target Indicates the current @value{GDBN} target. (@pxref{Targets, ,Specifying a Debugging Target}). @item process Gives the current process or thread number. When no process is being debugged, this field is set to @code{No process}. @item function Gives the current function name for the selected frame. The name is demangled if demangling is turned on (@pxref{Print Settings}). When there is no symbol corresponding to the current program counter, the string @code{??} is displayed. @item line Indicates the current line number for the selected frame. When the current line number is not known, the string @code{??} is displayed. @item pc Indicates the current program counter address. @end table @node TUI Keys @section TUI Key Bindings @cindex TUI key bindings The TUI installs several key bindings in the readline keymaps @ifset SYSTEM_READLINE (@pxref{Command Line Editing, , , rluserman, GNU Readline Library}). @end ifset @ifclear SYSTEM_READLINE (@pxref{Command Line Editing}). @end ifclear The following key bindings are installed for both TUI mode and the @value{GDBN} standard mode. @table @kbd @kindex C-x C-a @item C-x C-a @kindex C-x a @itemx C-x a @kindex C-x A @itemx C-x A Enter or leave the TUI mode. When leaving the TUI mode, the curses window management stops and @value{GDBN} operates using its standard mode, writing on the terminal directly. When reentering the TUI mode, control is given back to the curses windows. The screen is then refreshed. @kindex C-x 1 @item C-x 1 Use a TUI layout with only one window. The layout will either be @samp{source} or @samp{assembly}. When the TUI mode is not active, it will switch to the TUI mode. Think of this key binding as the Emacs @kbd{C-x 1} binding. @kindex C-x 2 @item C-x 2 Use a TUI layout with at least two windows. When the current layout already has two windows, the next layout with two windows is used. When a new layout is chosen, one window will always be common to the previous layout and the new one. Think of it as the Emacs @kbd{C-x 2} binding. @kindex C-x o @item C-x o Change the active window. The TUI associates several key bindings (like scrolling and arrow keys) with the active window. This command gives the focus to the next TUI window. Think of it as the Emacs @kbd{C-x o} binding. @kindex C-x s @item C-x s Switch in and out of the TUI SingleKey mode that binds single keys to @value{GDBN} commands (@pxref{TUI Single Key Mode}). @end table The following key bindings only work in the TUI mode: @table @asis @kindex PgUp @item @key{PgUp} Scroll the active window one page up. @kindex PgDn @item @key{PgDn} Scroll the active window one page down. @kindex Up @item @key{Up} Scroll the active window one line up. @kindex Down @item @key{Down} Scroll the active window one line down. @kindex Left @item @key{Left} Scroll the active window one column left. @kindex Right @item @key{Right} Scroll the active window one column right. @kindex C-L @item @kbd{C-L} Refresh the screen. @end table Because the arrow keys scroll the active window in the TUI mode, they are not available for their normal use by readline unless the command window has the focus. When another window is active, you must use other readline key bindings such as @kbd{C-p}, @kbd{C-n}, @kbd{C-b} and @kbd{C-f} to control the command window. @node TUI Single Key Mode @section TUI Single Key Mode @cindex TUI single key mode The TUI also provides a @dfn{SingleKey} mode, which binds several frequently used @value{GDBN} commands to single keys. Type @kbd{C-x s} to switch into this mode, where the following key bindings are used: @table @kbd @kindex c @r{(SingleKey TUI key)} @item c continue @kindex d @r{(SingleKey TUI key)} @item d down @kindex f @r{(SingleKey TUI key)} @item f finish @kindex n @r{(SingleKey TUI key)} @item n next @kindex q @r{(SingleKey TUI key)} @item q exit the SingleKey mode. @kindex r @r{(SingleKey TUI key)} @item r run @kindex s @r{(SingleKey TUI key)} @item s step @kindex u @r{(SingleKey TUI key)} @item u up @kindex v @r{(SingleKey TUI key)} @item v info locals @kindex w @r{(SingleKey TUI key)} @item w where @end table Other keys temporarily switch to the @value{GDBN} command prompt. The key that was pressed is inserted in the editing buffer so that it is possible to type most @value{GDBN} commands without interaction with the TUI SingleKey mode. Once the command is entered the TUI SingleKey mode is restored. The only way to permanently leave this mode is by typing @kbd{q} or @kbd{C-x s}. @node TUI Commands @section TUI-specific Commands @cindex TUI commands The TUI has specific commands to control the text windows. These commands are always available, even when @value{GDBN} is not in the TUI mode. When @value{GDBN} is in the standard mode, most of these commands will automatically switch to the TUI mode. Note that if @value{GDBN}'s @code{stdout} is not connected to a terminal, or @value{GDBN} has been started with the machine interface interpreter (@pxref{GDB/MI, ,The @sc{gdb/mi} Interface}), most of these commands will fail with an error, because it would not be possible or desirable to enable curses window management. @table @code @item info win @kindex info win List and give the size of all displayed windows. @item layout next @kindex layout Display the next layout. @item layout prev Display the previous layout. @item layout src Display the source window only. @item layout asm Display the assembly window only. @item layout split Display the source and assembly window. @item layout regs Display the register window together with the source or assembly window. @item focus next @kindex focus Make the next window active for scrolling. @item focus prev Make the previous window active for scrolling. @item focus src Make the source window active for scrolling. @item focus asm Make the assembly window active for scrolling. @item focus regs Make the register window active for scrolling. @item focus cmd Make the command window active for scrolling. @item refresh @kindex refresh Refresh the screen. This is similar to typing @kbd{C-L}. @item tui reg float @kindex tui reg Show the floating point registers in the register window. @item tui reg general Show the general registers in the register window. @item tui reg next Show the next register group. The list of register groups as well as their order is target specific. The predefined register groups are the following: @code{general}, @code{float}, @code{system}, @code{vector}, @code{all}, @code{save}, @code{restore}. @item tui reg system Show the system registers in the register window. @item update @kindex update Update the source window and the current execution point. @item winheight @var{name} +@var{count} @itemx winheight @var{name} -@var{count} @kindex winheight Change the height of the window @var{name} by @var{count} lines. Positive counts increase the height, while negative counts decrease it. @item tabset @var{nchars} @kindex tabset Set the width of tab stops to be @var{nchars} characters. @end table @node TUI Configuration @section TUI Configuration Variables @cindex TUI configuration variables Several configuration variables control the appearance of TUI windows. @table @code @item set tui border-kind @var{kind} @kindex set tui border-kind Select the border appearance for the source, assembly and register windows. The possible values are the following: @table @code @item space Use a space character to draw the border. @item ascii Use @sc{ascii} characters @samp{+}, @samp{-} and @samp{|} to draw the border. @item acs Use the Alternate Character Set to draw the border. The border is drawn using character line graphics if the terminal supports them. @end table @item set tui border-mode @var{mode} @kindex set tui border-mode @itemx set tui active-border-mode @var{mode} @kindex set tui active-border-mode Select the display attributes for the borders of the inactive windows or the active window. The @var{mode} can be one of the following: @table @code @item normal Use normal attributes to display the border. @item standout Use standout mode. @item reverse Use reverse video mode. @item half Use half bright mode. @item half-standout Use half bright and standout mode. @item bold Use extra bright or bold mode. @item bold-standout Use extra bright or bold and standout mode. @end table @end table @node Emacs @chapter Using @value{GDBN} under @sc{gnu} Emacs @cindex Emacs @cindex @sc{gnu} Emacs A special interface allows you to use @sc{gnu} Emacs to view (and edit) the source files for the program you are debugging with @value{GDBN}. To use this interface, use the command @kbd{M-x gdb} in Emacs. Give the executable file you want to debug as an argument. This command starts @value{GDBN} as a subprocess of Emacs, with input and output through a newly created Emacs buffer. @c (Do not use the @code{-tui} option to run @value{GDBN} from Emacs.) Running @value{GDBN} under Emacs can be just like running @value{GDBN} normally except for two things: @itemize @bullet @item All ``terminal'' input and output goes through an Emacs buffer, called the GUD buffer. This applies both to @value{GDBN} commands and their output, and to the input and output done by the program you are debugging. This is useful because it means that you can copy the text of previous commands and input them again; you can even use parts of the output in this way. All the facilities of Emacs' Shell mode are available for interacting with your program. In particular, you can send signals the usual way---for example, @kbd{C-c C-c} for an interrupt, @kbd{C-c C-z} for a stop. @item @value{GDBN} displays source code through Emacs. Each time @value{GDBN} displays a stack frame, Emacs automatically finds the source file for that frame and puts an arrow (@samp{=>}) at the left margin of the current line. Emacs uses a separate buffer for source display, and splits the screen to show both your @value{GDBN} session and the source. Explicit @value{GDBN} @code{list} or search commands still produce output as usual, but you probably have no reason to use them from Emacs. @end itemize We call this @dfn{text command mode}. Emacs 22.1, and later, also uses a graphical mode, enabled by default, which provides further buffers that can control the execution and describe the state of your program. @xref{GDB Graphical Interface,,, Emacs, The @sc{gnu} Emacs Manual}. If you specify an absolute file name when prompted for the @kbd{M-x gdb} argument, then Emacs sets your current working directory to where your program resides. If you only specify the file name, then Emacs sets your current working directory to the directory associated with the previous buffer. In this case, @value{GDBN} may find your program by searching your environment's @code{PATH} variable, but on some operating systems it might not find the source. So, although the @value{GDBN} input and output session proceeds normally, the auxiliary buffer does not display the current source and line of execution. The initial working directory of @value{GDBN} is printed on the top line of the GUD buffer and this serves as a default for the commands that specify files for @value{GDBN} to operate on. @xref{Files, ,Commands to Specify Files}. By default, @kbd{M-x gdb} calls the program called @file{gdb}. If you need to call @value{GDBN} by a different name (for example, if you keep several configurations around, with different names) you can customize the Emacs variable @code{gud-gdb-command-name} to run the one you want. In the GUD buffer, you can use these special Emacs commands in addition to the standard Shell mode commands: @table @kbd @item C-h m Describe the features of Emacs' GUD Mode. @item C-c C-s Execute to another source line, like the @value{GDBN} @code{step} command; also update the display window to show the current file and location. @item C-c C-n Execute to next source line in this function, skipping all function calls, like the @value{GDBN} @code{next} command. Then update the display window to show the current file and location. @item C-c C-i Execute one instruction, like the @value{GDBN} @code{stepi} command; update display window accordingly. @item C-c C-f Execute until exit from the selected stack frame, like the @value{GDBN} @code{finish} command. @item C-c C-r Continue execution of your program, like the @value{GDBN} @code{continue} command. @item C-c < Go up the number of frames indicated by the numeric argument (@pxref{Arguments, , Numeric Arguments, Emacs, The @sc{gnu} Emacs Manual}), like the @value{GDBN} @code{up} command. @item C-c > Go down the number of frames indicated by the numeric argument, like the @value{GDBN} @code{down} command. @end table In any source file, the Emacs command @kbd{C-x @key{SPC}} (@code{gud-break}) tells @value{GDBN} to set a breakpoint on the source line point is on. In text command mode, if you type @kbd{M-x speedbar}, Emacs displays a separate frame which shows a backtrace when the GUD buffer is current. Move point to any frame in the stack and type @key{RET} to make it become the current frame and display the associated source in the source buffer. Alternatively, click @kbd{Mouse-2} to make the selected frame become the current one. In graphical mode, the speedbar displays watch expressions. If you accidentally delete the source-display buffer, an easy way to get it back is to type the command @code{f} in the @value{GDBN} buffer, to request a frame display; when you run under Emacs, this recreates the source buffer if necessary to show you the context of the current frame. The source files displayed in Emacs are in ordinary Emacs buffers which are visiting the source files in the usual way. You can edit the files with these buffers if you wish; but keep in mind that @value{GDBN} communicates with Emacs in terms of line numbers. If you add or delete lines from the text, the line numbers that @value{GDBN} knows cease to correspond properly with the code. A more detailed description of Emacs' interaction with @value{GDBN} is given in the Emacs manual (@pxref{Debuggers,,, Emacs, The @sc{gnu} Emacs Manual}). @node GDB/MI @chapter The @sc{gdb/mi} Interface @unnumberedsec Function and Purpose @cindex @sc{gdb/mi}, its purpose @sc{gdb/mi} is a line based machine oriented text interface to @value{GDBN} and is activated by specifying using the @option{--interpreter} command line option (@pxref{Mode Options}). It is specifically intended to support the development of systems which use the debugger as just one small component of a larger system. This chapter is a specification of the @sc{gdb/mi} interface. It is written in the form of a reference manual. Note that @sc{gdb/mi} is still under construction, so some of the features described below are incomplete and subject to change (@pxref{GDB/MI Development and Front Ends, , @sc{gdb/mi} Development and Front Ends}). @unnumberedsec Notation and Terminology @cindex notational conventions, for @sc{gdb/mi} This chapter uses the following notation: @itemize @bullet @item @code{|} separates two alternatives. @item @code{[ @var{something} ]} indicates that @var{something} is optional: it may or may not be given. @item @code{( @var{group} )*} means that @var{group} inside the parentheses may repeat zero or more times. @item @code{( @var{group} )+} means that @var{group} inside the parentheses may repeat one or more times. @item @code{"@var{string}"} means a literal @var{string}. @end itemize @ignore @heading Dependencies @end ignore @menu * GDB/MI General Design:: * GDB/MI Command Syntax:: * GDB/MI Compatibility with CLI:: * GDB/MI Development and Front Ends:: * GDB/MI Output Records:: * GDB/MI Simple Examples:: * GDB/MI Command Description Format:: * GDB/MI Breakpoint Commands:: * GDB/MI Catchpoint Commands:: * GDB/MI Program Context:: * GDB/MI Thread Commands:: * GDB/MI Ada Tasking Commands:: * GDB/MI Program Execution:: * GDB/MI Stack Manipulation:: * GDB/MI Variable Objects:: * GDB/MI Data Manipulation:: * GDB/MI Tracepoint Commands:: * GDB/MI Symbol Query:: * GDB/MI File Commands:: @ignore * GDB/MI Kod Commands:: * GDB/MI Memory Overlay Commands:: * GDB/MI Signal Handling Commands:: @end ignore * GDB/MI Target Manipulation:: * GDB/MI File Transfer Commands:: * GDB/MI Miscellaneous Commands:: @end menu @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI General Design @section @sc{gdb/mi} General Design @cindex GDB/MI General Design Interaction of a @sc{GDB/MI} frontend with @value{GDBN} involves three parts---commands sent to @value{GDBN}, responses to those commands and notifications. Each command results in exactly one response, indicating either successful completion of the command, or an error. For the commands that do not resume the target, the response contains the requested information. For the commands that resume the target, the response only indicates whether the target was successfully resumed. Notifications is the mechanism for reporting changes in the state of the target, or in @value{GDBN} state, that cannot conveniently be associated with a command and reported as part of that command response. The important examples of notifications are: @itemize @bullet @item Exec notifications. These are used to report changes in target state---when a target is resumed, or stopped. It would not be feasible to include this information in response of resuming commands, because one resume commands can result in multiple events in different threads. Also, quite some time may pass before any event happens in the target, while a frontend needs to know whether the resuming command itself was successfully executed. @item Console output, and status notifications. Console output notifications are used to report output of CLI commands, as well as diagnostics for other commands. Status notifications are used to report the progress of a long-running operation. Naturally, including this information in command response would mean no output is produced until the command is finished, which is undesirable. @item General notifications. Commands may have various side effects on the @value{GDBN} or target state beyond their official purpose. For example, a command may change the selected thread. Although such changes can be included in command response, using notification allows for more orthogonal frontend design. @end itemize There's no guarantee that whenever an MI command reports an error, @value{GDBN} or the target are in any specific state, and especially, the state is not reverted to the state before the MI command was processed. Therefore, whenever an MI command results in an error, we recommend that the frontend refreshes all the information shown in the user interface. @menu * Context management:: * Asynchronous and non-stop modes:: * Thread groups:: @end menu @node Context management @subsection Context management In most cases when @value{GDBN} accesses the target, this access is done in context of a specific thread and frame (@pxref{Frames}). Often, even when accessing global data, the target requires that a thread be specified. The CLI interface maintains the selected thread and frame, and supplies them to target on each command. This is convenient, because a command line user would not want to specify that information explicitly on each command, and because user interacts with @value{GDBN} via a single terminal, so no confusion is possible as to what thread and frame are the current ones. In the case of MI, the concept of selected thread and frame is less useful. First, a frontend can easily remember this information itself. Second, a graphical frontend can have more than one window, each one used for debugging a different thread, and the frontend might want to access additional threads for internal purposes. This increases the risk that by relying on implicitly selected thread, the frontend may be operating on a wrong one. Therefore, each MI command should explicitly specify which thread and frame to operate on. To make it possible, each MI command accepts the @samp{--thread} and @samp{--frame} options, the value to each is @value{GDBN} identifier for thread and frame to operate on. Usually, each top-level window in a frontend allows the user to select a thread and a frame, and remembers the user selection for further operations. However, in some cases @value{GDBN} may suggest that the current thread be changed. For example, when stopping on a breakpoint it is reasonable to switch to the thread where breakpoint is hit. For another example, if the user issues the CLI @samp{thread} command via the frontend, it is desirable to change the frontend's selected thread to the one specified by user. @value{GDBN} communicates the suggestion to change current thread using the @samp{=thread-selected} notification. No such notification is available for the selected frame at the moment. Note that historically, MI shares the selected thread with CLI, so frontends used the @code{-thread-select} to execute commands in the right context. However, getting this to work right is cumbersome. The simplest way is for frontend to emit @code{-thread-select} command before every command. This doubles the number of commands that need to be sent. The alternative approach is to suppress @code{-thread-select} if the selected thread in @value{GDBN} is supposed to be identical to the thread the frontend wants to operate on. However, getting this optimization right can be tricky. In particular, if the frontend sends several commands to @value{GDBN}, and one of the commands changes the selected thread, then the behaviour of subsequent commands will change. So, a frontend should either wait for response from such problematic commands, or explicitly add @code{-thread-select} for all subsequent commands. No frontend is known to do this exactly right, so it is suggested to just always pass the @samp{--thread} and @samp{--frame} options. @node Asynchronous and non-stop modes @subsection Asynchronous command execution and non-stop mode On some targets, @value{GDBN} is capable of processing MI commands even while the target is running. This is called @dfn{asynchronous command execution} (@pxref{Background Execution}). The frontend may specify a preferrence for asynchronous execution using the @code{-gdb-set target-async 1} command, which should be emitted before either running the executable or attaching to the target. After the frontend has started the executable or attached to the target, it can find if asynchronous execution is enabled using the @code{-list-target-features} command. Even if @value{GDBN} can accept a command while target is running, many commands that access the target do not work when the target is running. Therefore, asynchronous command execution is most useful when combined with non-stop mode (@pxref{Non-Stop Mode}). Then, it is possible to examine the state of one thread, while other threads are running. When a given thread is running, MI commands that try to access the target in the context of that thread may not work, or may work only on some targets. In particular, commands that try to operate on thread's stack will not work, on any target. Commands that read memory, or modify breakpoints, may work or not work, depending on the target. Note that even commands that operate on global state, such as @code{print}, @code{set}, and breakpoint commands, still access the target in the context of a specific thread, so frontend should try to find a stopped thread and perform the operation on that thread (using the @samp{--thread} option). Which commands will work in the context of a running thread is highly target dependent. However, the two commands @code{-exec-interrupt}, to stop a thread, and @code{-thread-info}, to find the state of a thread, will always work. @node Thread groups @subsection Thread groups @value{GDBN} may be used to debug several processes at the same time. On some platfroms, @value{GDBN} may support debugging of several hardware systems, each one having several cores with several different processes running on each core. This section describes the MI mechanism to support such debugging scenarios. The key observation is that regardless of the structure of the target, MI can have a global list of threads, because most commands that accept the @samp{--thread} option do not need to know what process that thread belongs to. Therefore, it is not necessary to introduce neither additional @samp{--process} option, nor an notion of the current process in the MI interface. The only strictly new feature that is required is the ability to find how the threads are grouped into processes. To allow the user to discover such grouping, and to support arbitrary hierarchy of machines/cores/processes, MI introduces the concept of a @dfn{thread group}. Thread group is a collection of threads and other thread groups. A thread group always has a string identifier, a type, and may have additional attributes specific to the type. A new command, @code{-list-thread-groups}, returns the list of top-level thread groups, which correspond to processes that @value{GDBN} is debugging at the moment. By passing an identifier of a thread group to the @code{-list-thread-groups} command, it is possible to obtain the members of specific thread group. To allow the user to easily discover processes, and other objects, he wishes to debug, a concept of @dfn{available thread group} is introduced. Available thread group is an thread group that @value{GDBN} is not debugging, but that can be attached to, using the @code{-target-attach} command. The list of available top-level thread groups can be obtained using @samp{-list-thread-groups --available}. In general, the content of a thread group may be only retrieved only after attaching to that thread group. Thread groups are related to inferiors (@pxref{Inferiors and Programs}). Each inferior corresponds to a thread group of a special type @samp{process}, and some additional operations are permitted on such thread groups. @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Command Syntax @section @sc{gdb/mi} Command Syntax @menu * GDB/MI Input Syntax:: * GDB/MI Output Syntax:: @end menu @node GDB/MI Input Syntax @subsection @sc{gdb/mi} Input Syntax @cindex input syntax for @sc{gdb/mi} @cindex @sc{gdb/mi}, input syntax @table @code @item @var{command} @expansion{} @code{@var{cli-command} | @var{mi-command}} @item @var{cli-command} @expansion{} @code{[ @var{token} ] @var{cli-command} @var{nl}}, where @var{cli-command} is any existing @value{GDBN} CLI command. @item @var{mi-command} @expansion{} @code{[ @var{token} ] "-" @var{operation} ( " " @var{option} )* @code{[} " --" @code{]} ( " " @var{parameter} )* @var{nl}} @item @var{token} @expansion{} "any sequence of digits" @item @var{option} @expansion{} @code{"-" @var{parameter} [ " " @var{parameter} ]} @item @var{parameter} @expansion{} @code{@var{non-blank-sequence} | @var{c-string}} @item @var{operation} @expansion{} @emph{any of the operations described in this chapter} @item @var{non-blank-sequence} @expansion{} @emph{anything, provided it doesn't contain special characters such as "-", @var{nl}, """ and of course " "} @item @var{c-string} @expansion{} @code{""" @var{seven-bit-iso-c-string-content} """} @item @var{nl} @expansion{} @code{CR | CR-LF} @end table @noindent Notes: @itemize @bullet @item The CLI commands are still handled by the @sc{mi} interpreter; their output is described below. @item The @code{@var{token}}, when present, is passed back when the command finishes. @item Some @sc{mi} commands accept optional arguments as part of the parameter list. Each option is identified by a leading @samp{-} (dash) and may be followed by an optional argument parameter. Options occur first in the parameter list and can be delimited from normal parameters using @samp{--} (this is useful when some parameters begin with a dash). @end itemize Pragmatics: @itemize @bullet @item We want easy access to the existing CLI syntax (for debugging). @item We want it to be easy to spot a @sc{mi} operation. @end itemize @node GDB/MI Output Syntax @subsection @sc{gdb/mi} Output Syntax @cindex output syntax of @sc{gdb/mi} @cindex @sc{gdb/mi}, output syntax The output from @sc{gdb/mi} consists of zero or more out-of-band records followed, optionally, by a single result record. This result record is for the most recent command. The sequence of output records is terminated by @samp{(gdb)}. If an input command was prefixed with a @code{@var{token}} then the corresponding output for that command will also be prefixed by that same @var{token}. @table @code @item @var{output} @expansion{} @code{( @var{out-of-band-record} )* [ @var{result-record} ] "(gdb)" @var{nl}} @item @var{result-record} @expansion{} @code{ [ @var{token} ] "^" @var{result-class} ( "," @var{result} )* @var{nl}} @item @var{out-of-band-record} @expansion{} @code{@var{async-record} | @var{stream-record}} @item @var{async-record} @expansion{} @code{@var{exec-async-output} | @var{status-async-output} | @var{notify-async-output}} @item @var{exec-async-output} @expansion{} @code{[ @var{token} ] "*" @var{async-output}} @item @var{status-async-output} @expansion{} @code{[ @var{token} ] "+" @var{async-output}} @item @var{notify-async-output} @expansion{} @code{[ @var{token} ] "=" @var{async-output}} @item @var{async-output} @expansion{} @code{@var{async-class} ( "," @var{result} )* @var{nl}} @item @var{result-class} @expansion{} @code{"done" | "running" | "connected" | "error" | "exit"} @item @var{async-class} @expansion{} @code{"stopped" | @var{others}} (where @var{others} will be added depending on the needs---this is still in development). @item @var{result} @expansion{} @code{ @var{variable} "=" @var{value}} @item @var{variable} @expansion{} @code{ @var{string} } @item @var{value} @expansion{} @code{ @var{const} | @var{tuple} | @var{list} } @item @var{const} @expansion{} @code{@var{c-string}} @item @var{tuple} @expansion{} @code{ "@{@}" | "@{" @var{result} ( "," @var{result} )* "@}" } @item @var{list} @expansion{} @code{ "[]" | "[" @var{value} ( "," @var{value} )* "]" | "[" @var{result} ( "," @var{result} )* "]" } @item @var{stream-record} @expansion{} @code{@var{console-stream-output} | @var{target-stream-output} | @var{log-stream-output}} @item @var{console-stream-output} @expansion{} @code{"~" @var{c-string}} @item @var{target-stream-output} @expansion{} @code{"@@" @var{c-string}} @item @var{log-stream-output} @expansion{} @code{"&" @var{c-string}} @item @var{nl} @expansion{} @code{CR | CR-LF} @item @var{token} @expansion{} @emph{any sequence of digits}. @end table @noindent Notes: @itemize @bullet @item All output sequences end in a single line containing a period. @item The @code{@var{token}} is from the corresponding request. Note that for all async output, while the token is allowed by the grammar and may be output by future versions of @value{GDBN} for select async output messages, it is generally omitted. Frontends should treat all async output as reporting general changes in the state of the target and there should be no need to associate async output to any prior command. @item @cindex status output in @sc{gdb/mi} @var{status-async-output} contains on-going status information about the progress of a slow operation. It can be discarded. All status output is prefixed by @samp{+}. @item @cindex async output in @sc{gdb/mi} @var{exec-async-output} contains asynchronous state change on the target (stopped, started, disappeared). All async output is prefixed by @samp{*}. @item @cindex notify output in @sc{gdb/mi} @var{notify-async-output} contains supplementary information that the client should handle (e.g., a new breakpoint information). All notify output is prefixed by @samp{=}. @item @cindex console output in @sc{gdb/mi} @var{console-stream-output} is output that should be displayed as is in the console. It is the textual response to a CLI command. All the console output is prefixed by @samp{~}. @item @cindex target output in @sc{gdb/mi} @var{target-stream-output} is the output produced by the target program. All the target output is prefixed by @samp{@@}. @item @cindex log output in @sc{gdb/mi} @var{log-stream-output} is output text coming from @value{GDBN}'s internals, for instance messages that should be displayed as part of an error log. All the log output is prefixed by @samp{&}. @item @cindex list output in @sc{gdb/mi} New @sc{gdb/mi} commands should only output @var{lists} containing @var{values}. @end itemize @xref{GDB/MI Stream Records, , @sc{gdb/mi} Stream Records}, for more details about the various output records. @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Compatibility with CLI @section @sc{gdb/mi} Compatibility with CLI @cindex compatibility, @sc{gdb/mi} and CLI @cindex @sc{gdb/mi}, compatibility with CLI For the developers convenience CLI commands can be entered directly, but there may be some unexpected behaviour. For example, commands that query the user will behave as if the user replied yes, breakpoint command lists are not executed and some CLI commands, such as @code{if}, @code{when} and @code{define}, prompt for further input with @samp{>}, which is not valid MI output. This feature may be removed at some stage in the future and it is recommended that front ends use the @code{-interpreter-exec} command (@pxref{-interpreter-exec}). @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Development and Front Ends @section @sc{gdb/mi} Development and Front Ends @cindex @sc{gdb/mi} development The application which takes the MI output and presents the state of the program being debugged to the user is called a @dfn{front end}. Although @sc{gdb/mi} is still incomplete, it is currently being used by a variety of front ends to @value{GDBN}. This makes it difficult to introduce new functionality without breaking existing usage. This section tries to minimize the problems by describing how the protocol might change. Some changes in MI need not break a carefully designed front end, and for these the MI version will remain unchanged. The following is a list of changes that may occur within one level, so front ends should parse MI output in a way that can handle them: @itemize @bullet @item New MI commands may be added. @item New fields may be added to the output of any MI command. @item The range of values for fields with specified values, e.g., @code{in_scope} (@pxref{-var-update}) may be extended. @c The format of field's content e.g type prefix, may change so parse it @c at your own risk. Yes, in general? @c The order of fields may change? Shouldn't really matter but it might @c resolve inconsistencies. @end itemize If the changes are likely to break front ends, the MI version level will be increased by one. This will allow the front end to parse the output according to the MI version. Apart from mi0, new versions of @value{GDBN} will not support old versions of MI and it will be the responsibility of the front end to work with the new one. @c Starting with mi3, add a new command -mi-version that prints the MI @c version? The best way to avoid unexpected changes in MI that might break your front end is to make your project known to @value{GDBN} developers and follow development on @email{gdb@@sourceware.org} and @email{gdb-patches@@sourceware.org}. @cindex mailing lists @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Output Records @section @sc{gdb/mi} Output Records @menu * GDB/MI Result Records:: * GDB/MI Stream Records:: * GDB/MI Async Records:: * GDB/MI Breakpoint Information:: * GDB/MI Frame Information:: * GDB/MI Thread Information:: * GDB/MI Ada Exception Information:: @end menu @node GDB/MI Result Records @subsection @sc{gdb/mi} Result Records @cindex result records in @sc{gdb/mi} @cindex @sc{gdb/mi}, result records In addition to a number of out-of-band notifications, the response to a @sc{gdb/mi} command includes one of the following result indications: @table @code @findex ^done @item "^done" [ "," @var{results} ] The synchronous operation was successful, @code{@var{results}} are the return values. @item "^running" @findex ^running This result record is equivalent to @samp{^done}. Historically, it was output instead of @samp{^done} if the command has resumed the target. This behaviour is maintained for backward compatibility, but all frontends should treat @samp{^done} and @samp{^running} identically and rely on the @samp{*running} output record to determine which threads are resumed. @item "^connected" @findex ^connected @value{GDBN} has connected to a remote target. @item "^error" "," @var{c-string} @findex ^error The operation failed. The @code{@var{c-string}} contains the corresponding error message. @item "^exit" @findex ^exit @value{GDBN} has terminated. @end table @node GDB/MI Stream Records @subsection @sc{gdb/mi} Stream Records @cindex @sc{gdb/mi}, stream records @cindex stream records in @sc{gdb/mi} @value{GDBN} internally maintains a number of output streams: the console, the target, and the log. The output intended for each of these streams is funneled through the @sc{gdb/mi} interface using @dfn{stream records}. Each stream record begins with a unique @dfn{prefix character} which identifies its stream (@pxref{GDB/MI Output Syntax, , @sc{gdb/mi} Output Syntax}). In addition to the prefix, each stream record contains a @code{@var{string-output}}. This is either raw text (with an implicit new line) or a quoted C string (which does not contain an implicit newline). @table @code @item "~" @var{string-output} The console output stream contains text that should be displayed in the CLI console window. It contains the textual responses to CLI commands. @item "@@" @var{string-output} The target output stream contains any textual output from the running target. This is only present when GDB's event loop is truly asynchronous, which is currently only the case for remote targets. @item "&" @var{string-output} The log stream contains debugging messages being produced by @value{GDBN}'s internals. @end table @node GDB/MI Async Records @subsection @sc{gdb/mi} Async Records @cindex async records in @sc{gdb/mi} @cindex @sc{gdb/mi}, async records @dfn{Async} records are used to notify the @sc{gdb/mi} client of additional changes that have occurred. Those changes can either be a consequence of @sc{gdb/mi} commands (e.g., a breakpoint modified) or a result of target activity (e.g., target stopped). The following is the list of possible async records: @table @code @item *running,thread-id="@var{thread}" The target is now running. The @var{thread} field tells which specific thread is now running, and can be @samp{all} if all threads are running. The frontend should assume that no interaction with a running thread is possible after this notification is produced. The frontend should not assume that this notification is output only once for any command. @value{GDBN} may emit this notification several times, either for different threads, because it cannot resume all threads together, or even for a single thread, if the thread must be stepped though some code before letting it run freely. @item *stopped,reason="@var{reason}",thread-id="@var{id}",stopped-threads="@var{stopped}",core="@var{core}" The target has stopped. The @var{reason} field can have one of the following values: @table @code @item breakpoint-hit A breakpoint was reached. @item watchpoint-trigger A watchpoint was triggered. @item read-watchpoint-trigger A read watchpoint was triggered. @item access-watchpoint-trigger An access watchpoint was triggered. @item function-finished An -exec-finish or similar CLI command was accomplished. @item location-reached An -exec-until or similar CLI command was accomplished. @item watchpoint-scope A watchpoint has gone out of scope. @item end-stepping-range An -exec-next, -exec-next-instruction, -exec-step, -exec-step-instruction or similar CLI command was accomplished. @item exited-signalled The inferior exited because of a signal. @item exited The inferior exited. @item exited-normally The inferior exited normally. @item signal-received A signal was received by the inferior. @item solib-event The inferior has stopped due to a library being loaded or unloaded. This can happen when @code{stop-on-solib-events} (@pxref{Files}) is set or when a @code{catch load} or @code{catch unload} catchpoint is in use (@pxref{Set Catchpoints}). @item fork The inferior has forked. This is reported when @code{catch fork} (@pxref{Set Catchpoints}) has been used. @item vfork The inferior has vforked. This is reported in when @code{catch vfork} (@pxref{Set Catchpoints}) has been used. @item syscall-entry The inferior entered a system call. This is reported when @code{catch syscall} (@pxref{Set Catchpoints}) has been used. @item syscall-entry The inferior returned from a system call. This is reported when @code{catch syscall} (@pxref{Set Catchpoints}) has been used. @item exec The inferior called @code{exec}. This is reported when @code{catch exec} (@pxref{Set Catchpoints}) has been used. @end table The @var{id} field identifies the thread that directly caused the stop -- for example by hitting a breakpoint. Depending on whether all-stop mode is in effect (@pxref{All-Stop Mode}), @value{GDBN} may either stop all threads, or only the thread that directly triggered the stop. If all threads are stopped, the @var{stopped} field will have the value of @code{"all"}. Otherwise, the value of the @var{stopped} field will be a list of thread identifiers. Presently, this list will always include a single thread, but frontend should be prepared to see several threads in the list. The @var{core} field reports the processor core on which the stop event has happened. This field may be absent if such information is not available. @item =thread-group-added,id="@var{id}" @itemx =thread-group-removed,id="@var{id}" A thread group was either added or removed. The @var{id} field contains the @value{GDBN} identifier of the thread group. When a thread group is added, it generally might not be associated with a running process. When a thread group is removed, its id becomes invalid and cannot be used in any way. @item =thread-group-started,id="@var{id}",pid="@var{pid}" A thread group became associated with a running program, either because the program was just started or the thread group was attached to a program. The @var{id} field contains the @value{GDBN} identifier of the thread group. The @var{pid} field contains process identifier, specific to the operating system. @item =thread-group-exited,id="@var{id}"[,exit-code="@var{code}"] A thread group is no longer associated with a running program, either because the program has exited, or because it was detached from. The @var{id} field contains the @value{GDBN} identifier of the thread group. @var{code} is the exit code of the inferior; it exists only when the inferior exited with some code. @item =thread-created,id="@var{id}",group-id="@var{gid}" @itemx =thread-exited,id="@var{id}",group-id="@var{gid}" A thread either was created, or has exited. The @var{id} field contains the @value{GDBN} identifier of the thread. The @var{gid} field identifies the thread group this thread belongs to. @item =thread-selected,id="@var{id}" Informs that the selected thread was changed as result of the last command. This notification is not emitted as result of @code{-thread-select} command but is emitted whenever an MI command that is not documented to change the selected thread actually changes it. In particular, invoking, directly or indirectly (via user-defined command), the CLI @code{thread} command, will generate this notification. We suggest that in response to this notification, front ends highlight the selected thread and cause subsequent commands to apply to that thread. @item =library-loaded,... Reports that a new library file was loaded by the program. This notification has 4 fields---@var{id}, @var{target-name}, @var{host-name}, and @var{symbols-loaded}. The @var{id} field is an opaque identifier of the library. For remote debugging case, @var{target-name} and @var{host-name} fields give the name of the library file on the target, and on the host respectively. For native debugging, both those fields have the same value. The @var{symbols-loaded} field is emitted only for backward compatibility and should not be relied on to convey any useful information. The @var{thread-group} field, if present, specifies the id of the thread group in whose context the library was loaded. If the field is absent, it means the library was loaded in the context of all present thread groups. @item =library-unloaded,... Reports that a library was unloaded by the program. This notification has 3 fields---@var{id}, @var{target-name} and @var{host-name} with the same meaning as for the @code{=library-loaded} notification. The @var{thread-group} field, if present, specifies the id of the thread group in whose context the library was unloaded. If the field is absent, it means the library was unloaded in the context of all present thread groups. @item =traceframe-changed,num=@var{tfnum},tracepoint=@var{tpnum} @itemx =traceframe-changed,end Reports that the trace frame was changed and its new number is @var{tfnum}. The number of the tracepoint associated with this trace frame is @var{tpnum}. @item =tsv-created,name=@var{name},initial=@var{initial} Reports that the new trace state variable @var{name} is created with initial value @var{initial}. @item =tsv-deleted,name=@var{name} @itemx =tsv-deleted Reports that the trace state variable @var{name} is deleted or all trace state variables are deleted. @item =tsv-modified,name=@var{name},initial=@var{initial}[,current=@var{current}] Reports that the trace state variable @var{name} is modified with the initial value @var{initial}. The current value @var{current} of trace state variable is optional and is reported if the current value of trace state variable is known. @item =breakpoint-created,bkpt=@{...@} @itemx =breakpoint-modified,bkpt=@{...@} @itemx =breakpoint-deleted,id=@var{number} Reports that a breakpoint was created, modified, or deleted, respectively. Only user-visible breakpoints are reported to the MI user. The @var{bkpt} argument is of the same form as returned by the various breakpoint commands; @xref{GDB/MI Breakpoint Commands}. The @var{number} is the ordinal number of the breakpoint. Note that if a breakpoint is emitted in the result record of a command, then it will not also be emitted in an async record. @item =record-started,thread-group="@var{id}" @itemx =record-stopped,thread-group="@var{id}" Execution log recording was either started or stopped on an inferior. The @var{id} is the @value{GDBN} identifier of the thread group corresponding to the affected inferior. @item =cmd-param-changed,param=@var{param},value=@var{value} Reports that a parameter of the command @code{set @var{param}} is changed to @var{value}. In the multi-word @code{set} command, the @var{param} is the whole parameter list to @code{set} command. For example, In command @code{set check type on}, @var{param} is @code{check type} and @var{value} is @code{on}. @item =memory-changed,thread-group=@var{id},addr=@var{addr},len=@var{len}[,type="code"] Reports that bytes from @var{addr} to @var{data} + @var{len} were written in an inferior. The @var{id} is the identifier of the thread group corresponding to the affected inferior. The optional @code{type="code"} part is reported if the memory written to holds executable code. @end table @node GDB/MI Breakpoint Information @subsection @sc{gdb/mi} Breakpoint Information When @value{GDBN} reports information about a breakpoint, a tracepoint, a watchpoint, or a catchpoint, it uses a tuple with the following fields: @table @code @item number The breakpoint number. For a breakpoint that represents one location of a multi-location breakpoint, this will be a dotted pair, like @samp{1.2}. @item type The type of the breakpoint. For ordinary breakpoints this will be @samp{breakpoint}, but many values are possible. @item catch-type If the type of the breakpoint is @samp{catchpoint}, then this indicates the exact type of catchpoint. @item disp This is the breakpoint disposition---either @samp{del}, meaning that the breakpoint will be deleted at the next stop, or @samp{keep}, meaning that the breakpoint will not be deleted. @item enabled This indicates whether the breakpoint is enabled, in which case the value is @samp{y}, or disabled, in which case the value is @samp{n}. Note that this is not the same as the field @code{enable}. @item addr The address of the breakpoint. This may be a hexidecimal number, giving the address; or the string @samp{}, for a pending breakpoint; or the string @samp{}, for a breakpoint with multiple locations. This field will not be present if no address can be determined. For example, a watchpoint does not have an address. @item func If known, the function in which the breakpoint appears. If not known, this field is not present. @item filename The name of the source file which contains this function, if known. If not known, this field is not present. @item fullname The full file name of the source file which contains this function, if known. If not known, this field is not present. @item line The line number at which this breakpoint appears, if known. If not known, this field is not present. @item at If the source file is not known, this field may be provided. If provided, this holds the address of the breakpoint, possibly followed by a symbol name. @item pending If this breakpoint is pending, this field is present and holds the text used to set the breakpoint, as entered by the user. @item evaluated-by Where this breakpoint's condition is evaluated, either @samp{host} or @samp{target}. @item thread If this is a thread-specific breakpoint, then this identifies the thread in which the breakpoint can trigger. @item task If this breakpoint is restricted to a particular Ada task, then this field will hold the task identifier. @item cond If the breakpoint is conditional, this is the condition expression. @item ignore The ignore count of the breakpoint. @item enable The enable count of the breakpoint. @item traceframe-usage FIXME. @item static-tracepoint-marker-string-id For a static tracepoint, the name of the static tracepoint marker. @item mask For a masked watchpoint, this is the mask. @item pass A tracepoint's pass count. @item original-location The location of the breakpoint as originally specified by the user. This field is optional. @item times The number of times the breakpoint has been hit. @item installed This field is only given for tracepoints. This is either @samp{y}, meaning that the tracepoint is installed, or @samp{n}, meaning that it is not. @item what Some extra data, the exact contents of which are type-dependent. @end table For example, here is what the output of @code{-break-insert} (@pxref{GDB/MI Breakpoint Commands}) might be: @smallexample -> -break-insert main <- ^done,bkpt=@{number="1",type="breakpoint",disp="keep", enabled="y",addr="0x08048564",func="main",file="myprog.c", fullname="/home/nickrob/myprog.c",line="68",thread-groups=["i1"], times="0"@} <- (gdb) @end smallexample @node GDB/MI Frame Information @subsection @sc{gdb/mi} Frame Information Response from many MI commands includes an information about stack frame. This information is a tuple that may have the following fields: @table @code @item level The level of the stack frame. The innermost frame has the level of zero. This field is always present. @item func The name of the function corresponding to the frame. This field may be absent if @value{GDBN} is unable to determine the function name. @item addr The code address for the frame. This field is always present. @item file The name of the source files that correspond to the frame's code address. This field may be absent. @item line The source line corresponding to the frames' code address. This field may be absent. @item from The name of the binary file (either executable or shared library) the corresponds to the frame's code address. This field may be absent. @end table @node GDB/MI Thread Information @subsection @sc{gdb/mi} Thread Information Whenever @value{GDBN} has to report an information about a thread, it uses a tuple with the following fields: @table @code @item id The numeric id assigned to the thread by @value{GDBN}. This field is always present. @item target-id Target-specific string identifying the thread. This field is always present. @item details Additional information about the thread provided by the target. It is supposed to be human-readable and not interpreted by the frontend. This field is optional. @item state Either @samp{stopped} or @samp{running}, depending on whether the thread is presently running. This field is always present. @item core The value of this field is an integer number of the processor core the thread was last seen on. This field is optional. @end table @node GDB/MI Ada Exception Information @subsection @sc{gdb/mi} Ada Exception Information Whenever a @code{*stopped} record is emitted because the program stopped after hitting an exception catchpoint (@pxref{Set Catchpoints}), @value{GDBN} provides the name of the exception that was raised via the @code{exception-name} field. @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Simple Examples @section Simple Examples of @sc{gdb/mi} Interaction @cindex @sc{gdb/mi}, simple examples This subsection presents several simple examples of interaction using the @sc{gdb/mi} interface. In these examples, @samp{->} means that the following line is passed to @sc{gdb/mi} as input, while @samp{<-} means the output received from @sc{gdb/mi}. Note the line breaks shown in the examples are here only for readability, they don't appear in the real output. @subheading Setting a Breakpoint Setting a breakpoint generates synchronous output which contains detailed information of the breakpoint. @smallexample -> -break-insert main <- ^done,bkpt=@{number="1",type="breakpoint",disp="keep", enabled="y",addr="0x08048564",func="main",file="myprog.c", fullname="/home/nickrob/myprog.c",line="68",thread-groups=["i1"], times="0"@} <- (gdb) @end smallexample @subheading Program Execution Program execution generates asynchronous records and MI gives the reason that execution stopped. @smallexample -> -exec-run <- ^running <- (gdb) <- *stopped,reason="breakpoint-hit",disp="keep",bkptno="1",thread-id="0", frame=@{addr="0x08048564",func="main", args=[@{name="argc",value="1"@},@{name="argv",value="0xbfc4d4d4"@}], file="myprog.c",fullname="/home/nickrob/myprog.c",line="68"@} <- (gdb) -> -exec-continue <- ^running <- (gdb) <- *stopped,reason="exited-normally" <- (gdb) @end smallexample @subheading Quitting @value{GDBN} Quitting @value{GDBN} just prints the result class @samp{^exit}. @smallexample -> (gdb) <- -gdb-exit <- ^exit @end smallexample Please note that @samp{^exit} is printed immediately, but it might take some time for @value{GDBN} to actually exit. During that time, @value{GDBN} performs necessary cleanups, including killing programs being debugged or disconnecting from debug hardware, so the frontend should wait till @value{GDBN} exits and should only forcibly kill @value{GDBN} if it fails to exit in reasonable time. @subheading A Bad Command Here's what happens if you pass a non-existent command: @smallexample -> -rubbish <- ^error,msg="Undefined MI command: rubbish" <- (gdb) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Command Description Format @section @sc{gdb/mi} Command Description Format The remaining sections describe blocks of commands. Each block of commands is laid out in a fashion similar to this section. @subheading Motivation The motivation for this collection of commands. @subheading Introduction A brief introduction to this collection of commands as a whole. @subheading Commands For each command in the block, the following is described: @subsubheading Synopsis @smallexample -command @var{args}@dots{} @end smallexample @subsubheading Result @subsubheading @value{GDBN} Command The corresponding @value{GDBN} CLI command(s), if any. @subsubheading Example Example(s) formatted for readability. Some of the described commands have not been implemented yet and these are labeled N.A.@: (not available). @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Breakpoint Commands @section @sc{gdb/mi} Breakpoint Commands @cindex breakpoint commands for @sc{gdb/mi} @cindex @sc{gdb/mi}, breakpoint commands This section documents @sc{gdb/mi} commands for manipulating breakpoints. @subheading The @code{-break-after} Command @findex -break-after @subsubheading Synopsis @smallexample -break-after @var{number} @var{count} @end smallexample The breakpoint number @var{number} is not in effect until it has been hit @var{count} times. To see how this is reflected in the output of the @samp{-break-list} command, see the description of the @samp{-break-list} command below. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{ignore}. @subsubheading Example @smallexample (gdb) -break-insert main ^done,bkpt=@{number="1",type="breakpoint",disp="keep", enabled="y",addr="0x000100d0",func="main",file="hello.c", fullname="/home/foo/hello.c",line="5",thread-groups=["i1"], times="0"@} (gdb) -break-after 1 3 ~ ^done (gdb) -break-list ^done,BreakpointTable=@{nr_rows="1",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @{width="14",alignment="-1",col_name="type",colhdr="Type"@}, @{width="4",alignment="-1",col_name="disp",colhdr="Disp"@}, @{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@}, @{width="10",alignment="-1",col_name="addr",colhdr="Address"@}, @{width="40",alignment="2",col_name="what",colhdr="What"@}], body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y", addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c", line="5",thread-groups=["i1"],times="0",ignore="3"@}]@} (gdb) @end smallexample @ignore @subheading The @code{-break-catch} Command @findex -break-catch @end ignore @subheading The @code{-break-commands} Command @findex -break-commands @subsubheading Synopsis @smallexample -break-commands @var{number} [ @var{command1} ... @var{commandN} ] @end smallexample Specifies the CLI commands that should be executed when breakpoint @var{number} is hit. The parameters @var{command1} to @var{commandN} are the commands. If no command is specified, any previously-set commands are cleared. @xref{Break Commands}. Typical use of this functionality is tracing a program, that is, printing of values of some variables whenever breakpoint is hit and then continuing. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{commands}. @subsubheading Example @smallexample (gdb) -break-insert main ^done,bkpt=@{number="1",type="breakpoint",disp="keep", enabled="y",addr="0x000100d0",func="main",file="hello.c", fullname="/home/foo/hello.c",line="5",thread-groups=["i1"], times="0"@} (gdb) -break-commands 1 "print v" "continue" ^done (gdb) @end smallexample @subheading The @code{-break-condition} Command @findex -break-condition @subsubheading Synopsis @smallexample -break-condition @var{number} @var{expr} @end smallexample Breakpoint @var{number} will stop the program only if the condition in @var{expr} is true. The condition becomes part of the @samp{-break-list} output (see the description of the @samp{-break-list} command below). @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{condition}. @subsubheading Example @smallexample (gdb) -break-condition 1 1 ^done (gdb) -break-list ^done,BreakpointTable=@{nr_rows="1",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @{width="14",alignment="-1",col_name="type",colhdr="Type"@}, @{width="4",alignment="-1",col_name="disp",colhdr="Disp"@}, @{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@}, @{width="10",alignment="-1",col_name="addr",colhdr="Address"@}, @{width="40",alignment="2",col_name="what",colhdr="What"@}], body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y", addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c", line="5",cond="1",thread-groups=["i1"],times="0",ignore="3"@}]@} (gdb) @end smallexample @subheading The @code{-break-delete} Command @findex -break-delete @subsubheading Synopsis @smallexample -break-delete ( @var{breakpoint} )+ @end smallexample Delete the breakpoint(s) whose number(s) are specified in the argument list. This is obviously reflected in the breakpoint list. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{delete}. @subsubheading Example @smallexample (gdb) -break-delete 1 ^done (gdb) -break-list ^done,BreakpointTable=@{nr_rows="0",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @{width="14",alignment="-1",col_name="type",colhdr="Type"@}, @{width="4",alignment="-1",col_name="disp",colhdr="Disp"@}, @{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@}, @{width="10",alignment="-1",col_name="addr",colhdr="Address"@}, @{width="40",alignment="2",col_name="what",colhdr="What"@}], body=[]@} (gdb) @end smallexample @subheading The @code{-break-disable} Command @findex -break-disable @subsubheading Synopsis @smallexample -break-disable ( @var{breakpoint} )+ @end smallexample Disable the named @var{breakpoint}(s). The field @samp{enabled} in the break list is now set to @samp{n} for the named @var{breakpoint}(s). @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{disable}. @subsubheading Example @smallexample (gdb) -break-disable 2 ^done (gdb) -break-list ^done,BreakpointTable=@{nr_rows="1",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @{width="14",alignment="-1",col_name="type",colhdr="Type"@}, @{width="4",alignment="-1",col_name="disp",colhdr="Disp"@}, @{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@}, @{width="10",alignment="-1",col_name="addr",colhdr="Address"@}, @{width="40",alignment="2",col_name="what",colhdr="What"@}], body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="n", addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c", line="5",thread-groups=["i1"],times="0"@}]@} (gdb) @end smallexample @subheading The @code{-break-enable} Command @findex -break-enable @subsubheading Synopsis @smallexample -break-enable ( @var{breakpoint} )+ @end smallexample Enable (previously disabled) @var{breakpoint}(s). @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{enable}. @subsubheading Example @smallexample (gdb) -break-enable 2 ^done (gdb) -break-list ^done,BreakpointTable=@{nr_rows="1",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @{width="14",alignment="-1",col_name="type",colhdr="Type"@}, @{width="4",alignment="-1",col_name="disp",colhdr="Disp"@}, @{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@}, @{width="10",alignment="-1",col_name="addr",colhdr="Address"@}, @{width="40",alignment="2",col_name="what",colhdr="What"@}], body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y", addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c", line="5",thread-groups=["i1"],times="0"@}]@} (gdb) @end smallexample @subheading The @code{-break-info} Command @findex -break-info @subsubheading Synopsis @smallexample -break-info @var{breakpoint} @end smallexample @c REDUNDANT??? Get information about a single breakpoint. The result is a table of breakpoints. @xref{GDB/MI Breakpoint Information}, for details on the format of each breakpoint in the table. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{info break @var{breakpoint}}. @subsubheading Example N.A. @subheading The @code{-break-insert} Command @findex -break-insert @subsubheading Synopsis @smallexample -break-insert [ -t ] [ -h ] [ -f ] [ -d ] [ -a ] [ -c @var{condition} ] [ -i @var{ignore-count} ] [ -p @var{thread-id} ] [ @var{location} ] @end smallexample @noindent If specified, @var{location}, can be one of: @itemize @bullet @item function @c @item +offset @c @item -offset @c @item linenum @item filename:linenum @item filename:function @item *address @end itemize The possible optional parameters of this command are: @table @samp @item -t Insert a temporary breakpoint. @item -h Insert a hardware breakpoint. @item -f If @var{location} cannot be parsed (for example if it refers to unknown files or functions), create a pending breakpoint. Without this flag, @value{GDBN} will report an error, and won't create a breakpoint, if @var{location} cannot be parsed. @item -d Create a disabled breakpoint. @item -a Create a tracepoint. @xref{Tracepoints}. When this parameter is used together with @samp{-h}, a fast tracepoint is created. @item -c @var{condition} Make the breakpoint conditional on @var{condition}. @item -i @var{ignore-count} Initialize the @var{ignore-count}. @item -p @var{thread-id} Restrict the breakpoint to the specified @var{thread-id}. @end table @subsubheading Result @xref{GDB/MI Breakpoint Information}, for details on the format of the resulting breakpoint. Note: this format is open to change. @c An out-of-band breakpoint instead of part of the result? @subsubheading @value{GDBN} Command The corresponding @value{GDBN} commands are @samp{break}, @samp{tbreak}, @samp{hbreak}, and @samp{thbreak}. @c and @samp{rbreak}. @subsubheading Example @smallexample (gdb) -break-insert main ^done,bkpt=@{number="1",addr="0x0001072c",file="recursive2.c", fullname="/home/foo/recursive2.c,line="4",thread-groups=["i1"], times="0"@} (gdb) -break-insert -t foo ^done,bkpt=@{number="2",addr="0x00010774",file="recursive2.c", fullname="/home/foo/recursive2.c,line="11",thread-groups=["i1"], times="0"@} (gdb) -break-list ^done,BreakpointTable=@{nr_rows="2",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @{width="14",alignment="-1",col_name="type",colhdr="Type"@}, @{width="4",alignment="-1",col_name="disp",colhdr="Disp"@}, @{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@}, @{width="10",alignment="-1",col_name="addr",colhdr="Address"@}, @{width="40",alignment="2",col_name="what",colhdr="What"@}], body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y", addr="0x0001072c", func="main",file="recursive2.c", fullname="/home/foo/recursive2.c,"line="4",thread-groups=["i1"], times="0"@}, bkpt=@{number="2",type="breakpoint",disp="del",enabled="y", addr="0x00010774",func="foo",file="recursive2.c", fullname="/home/foo/recursive2.c",line="11",thread-groups=["i1"], times="0"@}]@} (gdb) @c -break-insert -r foo.* @c ~int foo(int, int); @c ^done,bkpt=@{number="3",addr="0x00010774",file="recursive2.c, @c "fullname="/home/foo/recursive2.c",line="11",thread-groups=["i1"], @c times="0"@} @c (gdb) @end smallexample @subheading The @code{-break-list} Command @findex -break-list @subsubheading Synopsis @smallexample -break-list @end smallexample Displays the list of inserted breakpoints, showing the following fields: @table @samp @item Number number of the breakpoint @item Type type of the breakpoint: @samp{breakpoint} or @samp{watchpoint} @item Disposition should the breakpoint be deleted or disabled when it is hit: @samp{keep} or @samp{nokeep} @item Enabled is the breakpoint enabled or no: @samp{y} or @samp{n} @item Address memory location at which the breakpoint is set @item What logical location of the breakpoint, expressed by function name, file name, line number @item Thread-groups list of thread groups to which this breakpoint applies @item Times number of times the breakpoint has been hit @end table If there are no breakpoints or watchpoints, the @code{BreakpointTable} @code{body} field is an empty list. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{info break}. @subsubheading Example @smallexample (gdb) -break-list ^done,BreakpointTable=@{nr_rows="2",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @{width="14",alignment="-1",col_name="type",colhdr="Type"@}, @{width="4",alignment="-1",col_name="disp",colhdr="Disp"@}, @{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@}, @{width="10",alignment="-1",col_name="addr",colhdr="Address"@}, @{width="40",alignment="2",col_name="what",colhdr="What"@}], body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y", addr="0x000100d0",func="main",file="hello.c",line="5",thread-groups=["i1"], times="0"@}, bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y", addr="0x00010114",func="foo",file="hello.c",fullname="/home/foo/hello.c", line="13",thread-groups=["i1"],times="0"@}]@} (gdb) @end smallexample Here's an example of the result when there are no breakpoints: @smallexample (gdb) -break-list ^done,BreakpointTable=@{nr_rows="0",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @{width="14",alignment="-1",col_name="type",colhdr="Type"@}, @{width="4",alignment="-1",col_name="disp",colhdr="Disp"@}, @{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@}, @{width="10",alignment="-1",col_name="addr",colhdr="Address"@}, @{width="40",alignment="2",col_name="what",colhdr="What"@}], body=[]@} (gdb) @end smallexample @subheading The @code{-break-passcount} Command @findex -break-passcount @subsubheading Synopsis @smallexample -break-passcount @var{tracepoint-number} @var{passcount} @end smallexample Set the passcount for tracepoint @var{tracepoint-number} to @var{passcount}. If the breakpoint referred to by @var{tracepoint-number} is not a tracepoint, error is emitted. This corresponds to CLI command @samp{passcount}. @subheading The @code{-break-watch} Command @findex -break-watch @subsubheading Synopsis @smallexample -break-watch [ -a | -r ] @end smallexample Create a watchpoint. With the @samp{-a} option it will create an @dfn{access} watchpoint, i.e., a watchpoint that triggers either on a read from or on a write to the memory location. With the @samp{-r} option, the watchpoint created is a @dfn{read} watchpoint, i.e., it will trigger only when the memory location is accessed for reading. Without either of the options, the watchpoint created is a regular watchpoint, i.e., it will trigger when the memory location is accessed for writing. @xref{Set Watchpoints, , Setting Watchpoints}. Note that @samp{-break-list} will report a single list of watchpoints and breakpoints inserted. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} commands are @samp{watch}, @samp{awatch}, and @samp{rwatch}. @subsubheading Example Setting a watchpoint on a variable in the @code{main} function: @smallexample (gdb) -break-watch x ^done,wpt=@{number="2",exp="x"@} (gdb) -exec-continue ^running (gdb) *stopped,reason="watchpoint-trigger",wpt=@{number="2",exp="x"@}, value=@{old="-268439212",new="55"@}, frame=@{func="main",args=[],file="recursive2.c", fullname="/home/foo/bar/recursive2.c",line="5"@} (gdb) @end smallexample Setting a watchpoint on a variable local to a function. @value{GDBN} will stop the program execution twice: first for the variable changing value, then for the watchpoint going out of scope. @smallexample (gdb) -break-watch C ^done,wpt=@{number="5",exp="C"@} (gdb) -exec-continue ^running (gdb) *stopped,reason="watchpoint-trigger", wpt=@{number="5",exp="C"@},value=@{old="-276895068",new="3"@}, frame=@{func="callee4",args=[], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="13"@} (gdb) -exec-continue ^running (gdb) *stopped,reason="watchpoint-scope",wpnum="5", frame=@{func="callee3",args=[@{name="strarg", value="0x11940 \"A string argument.\""@}], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="18"@} (gdb) @end smallexample Listing breakpoints and watchpoints, at different points in the program execution. Note that once the watchpoint goes out of scope, it is deleted. @smallexample (gdb) -break-watch C ^done,wpt=@{number="2",exp="C"@} (gdb) -break-list ^done,BreakpointTable=@{nr_rows="2",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @{width="14",alignment="-1",col_name="type",colhdr="Type"@}, @{width="4",alignment="-1",col_name="disp",colhdr="Disp"@}, @{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@}, @{width="10",alignment="-1",col_name="addr",colhdr="Address"@}, @{width="40",alignment="2",col_name="what",colhdr="What"@}], body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y", addr="0x00010734",func="callee4", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/devo/gdb/testsuite/gdb.mi/basics.c"line="8",thread-groups=["i1"], times="1"@}, bkpt=@{number="2",type="watchpoint",disp="keep", enabled="y",addr="",what="C",thread-groups=["i1"],times="0"@}]@} (gdb) -exec-continue ^running (gdb) *stopped,reason="watchpoint-trigger",wpt=@{number="2",exp="C"@}, value=@{old="-276895068",new="3"@}, frame=@{func="callee4",args=[], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="13"@} (gdb) -break-list ^done,BreakpointTable=@{nr_rows="2",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @{width="14",alignment="-1",col_name="type",colhdr="Type"@}, @{width="4",alignment="-1",col_name="disp",colhdr="Disp"@}, @{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@}, @{width="10",alignment="-1",col_name="addr",colhdr="Address"@}, @{width="40",alignment="2",col_name="what",colhdr="What"@}], body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y", addr="0x00010734",func="callee4", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/devo/gdb/testsuite/gdb.mi/basics.c",line="8",thread-groups=["i1"], times="1"@}, bkpt=@{number="2",type="watchpoint",disp="keep", enabled="y",addr="",what="C",thread-groups=["i1"],times="-5"@}]@} (gdb) -exec-continue ^running ^done,reason="watchpoint-scope",wpnum="2", frame=@{func="callee3",args=[@{name="strarg", value="0x11940 \"A string argument.\""@}], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="18"@} (gdb) -break-list ^done,BreakpointTable=@{nr_rows="1",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @{width="14",alignment="-1",col_name="type",colhdr="Type"@}, @{width="4",alignment="-1",col_name="disp",colhdr="Disp"@}, @{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@}, @{width="10",alignment="-1",col_name="addr",colhdr="Address"@}, @{width="40",alignment="2",col_name="what",colhdr="What"@}], body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y", addr="0x00010734",func="callee4", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/devo/gdb/testsuite/gdb.mi/basics.c",line="8", thread-groups=["i1"],times="1"@}]@} (gdb) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Catchpoint Commands @section @sc{gdb/mi} Catchpoint Commands This section documents @sc{gdb/mi} commands for manipulating catchpoints. @subheading The @code{-catch-load} Command @findex -catch-load @subsubheading Synopsis @smallexample -catch-load [ -t ] [ -d ] @var{regexp} @end smallexample Add a catchpoint for library load events. If the @samp{-t} option is used, the catchpoint is a temporary one (@pxref{Set Breaks, ,Setting Breakpoints}). If the @samp{-d} option is used, the catchpoint is created in a disabled state. The @samp{regexp} argument is a regular expression used to match the name of the loaded library. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{catch load}. @subsubheading Example @smallexample -catch-load -t foo.so ^done,bkpt=@{number="1",type="catchpoint",disp="del",enabled="y", what="load of library matching foo.so",catch-type="load",times="0"@} (gdb) @end smallexample @subheading The @code{-catch-unload} Command @findex -catch-unload @subsubheading Synopsis @smallexample -catch-unload [ -t ] [ -d ] @var{regexp} @end smallexample Add a catchpoint for library unload events. If the @samp{-t} option is used, the catchpoint is a temporary one (@pxref{Set Breaks, ,Setting Breakpoints}). If the @samp{-d} option is used, the catchpoint is created in a disabled state. The @samp{regexp} argument is a regular expression used to match the name of the unloaded library. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{catch unload}. @subsubheading Example @smallexample -catch-unload -d bar.so ^done,bkpt=@{number="2",type="catchpoint",disp="keep",enabled="n", what="load of library matching bar.so",catch-type="unload",times="0"@} (gdb) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Program Context @section @sc{gdb/mi} Program Context @subheading The @code{-exec-arguments} Command @findex -exec-arguments @subsubheading Synopsis @smallexample -exec-arguments @var{args} @end smallexample Set the inferior program arguments, to be used in the next @samp{-exec-run}. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{set args}. @subsubheading Example @smallexample (gdb) -exec-arguments -v word ^done (gdb) @end smallexample @ignore @subheading The @code{-exec-show-arguments} Command @findex -exec-show-arguments @subsubheading Synopsis @smallexample -exec-show-arguments @end smallexample Print the arguments of the program. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{show args}. @subsubheading Example N.A. @end ignore @subheading The @code{-environment-cd} Command @findex -environment-cd @subsubheading Synopsis @smallexample -environment-cd @var{pathdir} @end smallexample Set @value{GDBN}'s working directory. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{cd}. @subsubheading Example @smallexample (gdb) -environment-cd /kwikemart/marge/ezannoni/flathead-dev/devo/gdb ^done (gdb) @end smallexample @subheading The @code{-environment-directory} Command @findex -environment-directory @subsubheading Synopsis @smallexample -environment-directory [ -r ] [ @var{pathdir} ]+ @end smallexample Add directories @var{pathdir} to beginning of search path for source files. If the @samp{-r} option is used, the search path is reset to the default search path. If directories @var{pathdir} are supplied in addition to the @samp{-r} option, the search path is first reset and then addition occurs as normal. Multiple directories may be specified, separated by blanks. Specifying multiple directories in a single command results in the directories added to the beginning of the search path in the same order they were presented in the command. If blanks are needed as part of a directory name, double-quotes should be used around the name. In the command output, the path will show up separated by the system directory-separator character. The directory-separator character must not be used in any directory name. If no directories are specified, the current search path is displayed. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{dir}. @subsubheading Example @smallexample (gdb) -environment-directory /kwikemart/marge/ezannoni/flathead-dev/devo/gdb ^done,source-path="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb:$cdir:$cwd" (gdb) -environment-directory "" ^done,source-path="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb:$cdir:$cwd" (gdb) -environment-directory -r /home/jjohnstn/src/gdb /usr/src ^done,source-path="/home/jjohnstn/src/gdb:/usr/src:$cdir:$cwd" (gdb) -environment-directory -r ^done,source-path="$cdir:$cwd" (gdb) @end smallexample @subheading The @code{-environment-path} Command @findex -environment-path @subsubheading Synopsis @smallexample -environment-path [ -r ] [ @var{pathdir} ]+ @end smallexample Add directories @var{pathdir} to beginning of search path for object files. If the @samp{-r} option is used, the search path is reset to the original search path that existed at gdb start-up. If directories @var{pathdir} are supplied in addition to the @samp{-r} option, the search path is first reset and then addition occurs as normal. Multiple directories may be specified, separated by blanks. Specifying multiple directories in a single command results in the directories added to the beginning of the search path in the same order they were presented in the command. If blanks are needed as part of a directory name, double-quotes should be used around the name. In the command output, the path will show up separated by the system directory-separator character. The directory-separator character must not be used in any directory name. If no directories are specified, the current path is displayed. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{path}. @subsubheading Example @smallexample (gdb) -environment-path ^done,path="/usr/bin" (gdb) -environment-path /kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb /bin ^done,path="/kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb:/bin:/usr/bin" (gdb) -environment-path -r /usr/local/bin ^done,path="/usr/local/bin:/usr/bin" (gdb) @end smallexample @subheading The @code{-environment-pwd} Command @findex -environment-pwd @subsubheading Synopsis @smallexample -environment-pwd @end smallexample Show the current working directory. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{pwd}. @subsubheading Example @smallexample (gdb) -environment-pwd ^done,cwd="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb" (gdb) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Thread Commands @section @sc{gdb/mi} Thread Commands @subheading The @code{-thread-info} Command @findex -thread-info @subsubheading Synopsis @smallexample -thread-info [ @var{thread-id} ] @end smallexample Reports information about either a specific thread, if the @var{thread-id} parameter is present, or about all threads. When printing information about all threads, also reports the current thread. @subsubheading @value{GDBN} Command The @samp{info thread} command prints the same information about all threads. @subsubheading Result The result is a list of threads. The following attributes are defined for a given thread: @table @samp @item current This field exists only for the current thread. It has the value @samp{*}. @item id The identifier that @value{GDBN} uses to refer to the thread. @item target-id The identifier that the target uses to refer to the thread. @item details Extra information about the thread, in a target-specific format. This field is optional. @item name The name of the thread. If the user specified a name using the @code{thread name} command, then this name is given. Otherwise, if @value{GDBN} can extract the thread name from the target, then that name is given. If @value{GDBN} cannot find the thread name, then this field is omitted. @item frame The stack frame currently executing in the thread. @item state The thread's state. The @samp{state} field may have the following values: @table @code @item stopped The thread is stopped. Frame information is available for stopped threads. @item running The thread is running. There's no frame information for running threads. @end table @item core If @value{GDBN} can find the CPU core on which this thread is running, then this field is the core identifier. This field is optional. @end table @subsubheading Example @smallexample -thread-info ^done,threads=[ @{id="2",target-id="Thread 0xb7e14b90 (LWP 21257)", frame=@{level="0",addr="0xffffe410",func="__kernel_vsyscall", args=[]@},state="running"@}, @{id="1",target-id="Thread 0xb7e156b0 (LWP 21254)", frame=@{level="0",addr="0x0804891f",func="foo", args=[@{name="i",value="10"@}], file="/tmp/a.c",fullname="/tmp/a.c",line="158"@}, state="running"@}], current-thread-id="1" (gdb) @end smallexample @subheading The @code{-thread-list-ids} Command @findex -thread-list-ids @subsubheading Synopsis @smallexample -thread-list-ids @end smallexample Produces a list of the currently known @value{GDBN} thread ids. At the end of the list it also prints the total number of such threads. This command is retained for historical reasons, the @code{-thread-info} command should be used instead. @subsubheading @value{GDBN} Command Part of @samp{info threads} supplies the same information. @subsubheading Example @smallexample (gdb) -thread-list-ids ^done,thread-ids=@{thread-id="3",thread-id="2",thread-id="1"@}, current-thread-id="1",number-of-threads="3" (gdb) @end smallexample @subheading The @code{-thread-select} Command @findex -thread-select @subsubheading Synopsis @smallexample -thread-select @var{threadnum} @end smallexample Make @var{threadnum} the current thread. It prints the number of the new current thread, and the topmost frame for that thread. This command is deprecated in favor of explicitly using the @samp{--thread} option to each command. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{thread}. @subsubheading Example @smallexample (gdb) -exec-next ^running (gdb) *stopped,reason="end-stepping-range",thread-id="2",line="187", file="../../../devo/gdb/testsuite/gdb.threads/linux-dp.c" (gdb) -thread-list-ids ^done, thread-ids=@{thread-id="3",thread-id="2",thread-id="1"@}, number-of-threads="3" (gdb) -thread-select 3 ^done,new-thread-id="3", frame=@{level="0",func="vprintf", args=[@{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""@}, @{name="arg",value="0x2"@}],file="vprintf.c",line="31"@} (gdb) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Ada Tasking Commands @section @sc{gdb/mi} Ada Tasking Commands @subheading The @code{-ada-task-info} Command @findex -ada-task-info @subsubheading Synopsis @smallexample -ada-task-info [ @var{task-id} ] @end smallexample Reports information about either a specific Ada task, if the @var{task-id} parameter is present, or about all Ada tasks. @subsubheading @value{GDBN} Command The @samp{info tasks} command prints the same information about all Ada tasks (@pxref{Ada Tasks}). @subsubheading Result The result is a table of Ada tasks. The following columns are defined for each Ada task: @table @samp @item current This field exists only for the current thread. It has the value @samp{*}. @item id The identifier that @value{GDBN} uses to refer to the Ada task. @item task-id The identifier that the target uses to refer to the Ada task. @item thread-id The identifier of the thread corresponding to the Ada task. This field should always exist, as Ada tasks are always implemented on top of a thread. But if @value{GDBN} cannot find this corresponding thread for any reason, the field is omitted. @item parent-id This field exists only when the task was created by another task. In this case, it provides the ID of the parent task. @item priority The base priority of the task. @item state The current state of the task. For a detailed description of the possible states, see @ref{Ada Tasks}. @item name The name of the task. @end table @subsubheading Example @smallexample -ada-task-info ^done,tasks=@{nr_rows="3",nr_cols="8", hdr=[@{width="1",alignment="-1",col_name="current",colhdr=""@}, @{width="3",alignment="1",col_name="id",colhdr="ID"@}, @{width="9",alignment="1",col_name="task-id",colhdr="TID"@}, @{width="4",alignment="1",col_name="thread-id",colhdr=""@}, @{width="4",alignment="1",col_name="parent-id",colhdr="P-ID"@}, @{width="3",alignment="1",col_name="priority",colhdr="Pri"@}, @{width="22",alignment="-1",col_name="state",colhdr="State"@}, @{width="1",alignment="2",col_name="name",colhdr="Name"@}], body=[@{current="*",id="1",task-id=" 644010",thread-id="1",priority="48", state="Child Termination Wait",name="main_task"@}]@} (gdb) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Program Execution @section @sc{gdb/mi} Program Execution These are the asynchronous commands which generate the out-of-band record @samp{*stopped}. Currently @value{GDBN} only really executes asynchronously with remote targets and this interaction is mimicked in other cases. @subheading The @code{-exec-continue} Command @findex -exec-continue @subsubheading Synopsis @smallexample -exec-continue [--reverse] [--all|--thread-group N] @end smallexample Resumes the execution of the inferior program, which will continue to execute until it reaches a debugger stop event. If the @samp{--reverse} option is specified, execution resumes in reverse until it reaches a stop event. Stop events may include @itemize @bullet @item breakpoints or watchpoints @item signals or exceptions @item the end of the process (or its beginning under @samp{--reverse}) @item the end or beginning of a replay log if one is being used. @end itemize In all-stop mode (@pxref{All-Stop Mode}), may resume only one thread, or all threads, depending on the value of the @samp{scheduler-locking} variable. If @samp{--all} is specified, all threads (in all inferiors) will be resumed. The @samp{--all} option is ignored in all-stop mode. If the @samp{--thread-group} options is specified, then all threads in that thread group are resumed. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} corresponding is @samp{continue}. @subsubheading Example @smallexample -exec-continue ^running (gdb) @@Hello world *stopped,reason="breakpoint-hit",disp="keep",bkptno="2",frame=@{ func="foo",args=[],file="hello.c",fullname="/home/foo/bar/hello.c", line="13"@} (gdb) @end smallexample @subheading The @code{-exec-finish} Command @findex -exec-finish @subsubheading Synopsis @smallexample -exec-finish [--reverse] @end smallexample Resumes the execution of the inferior program until the current function is exited. Displays the results returned by the function. If the @samp{--reverse} option is specified, resumes the reverse execution of the inferior program until the point where current function was called. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{finish}. @subsubheading Example Function returning @code{void}. @smallexample -exec-finish ^running (gdb) @@hello from foo *stopped,reason="function-finished",frame=@{func="main",args=[], file="hello.c",fullname="/home/foo/bar/hello.c",line="7"@} (gdb) @end smallexample Function returning other than @code{void}. The name of the internal @value{GDBN} variable storing the result is printed, together with the value itself. @smallexample -exec-finish ^running (gdb) *stopped,reason="function-finished",frame=@{addr="0x000107b0",func="foo", args=[@{name="a",value="1"],@{name="b",value="9"@}@}, file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}, gdb-result-var="$1",return-value="0" (gdb) @end smallexample @subheading The @code{-exec-interrupt} Command @findex -exec-interrupt @subsubheading Synopsis @smallexample -exec-interrupt [--all|--thread-group N] @end smallexample Interrupts the background execution of the target. Note how the token associated with the stop message is the one for the execution command that has been interrupted. The token for the interrupt itself only appears in the @samp{^done} output. If the user is trying to interrupt a non-running program, an error message will be printed. Note that when asynchronous execution is enabled, this command is asynchronous just like other execution commands. That is, first the @samp{^done} response will be printed, and the target stop will be reported after that using the @samp{*stopped} notification. In non-stop mode, only the context thread is interrupted by default. All threads (in all inferiors) will be interrupted if the @samp{--all} option is specified. If the @samp{--thread-group} option is specified, all threads in that group will be interrupted. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{interrupt}. @subsubheading Example @smallexample (gdb) 111-exec-continue 111^running (gdb) 222-exec-interrupt 222^done (gdb) 111*stopped,signal-name="SIGINT",signal-meaning="Interrupt", frame=@{addr="0x00010140",func="foo",args=[],file="try.c", fullname="/home/foo/bar/try.c",line="13"@} (gdb) (gdb) -exec-interrupt ^error,msg="mi_cmd_exec_interrupt: Inferior not executing." (gdb) @end smallexample @subheading The @code{-exec-jump} Command @findex -exec-jump @subsubheading Synopsis @smallexample -exec-jump @var{location} @end smallexample Resumes execution of the inferior program at the location specified by parameter. @xref{Specify Location}, for a description of the different forms of @var{location}. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{jump}. @subsubheading Example @smallexample -exec-jump foo.c:10 *running,thread-id="all" ^running @end smallexample @subheading The @code{-exec-next} Command @findex -exec-next @subsubheading Synopsis @smallexample -exec-next [--reverse] @end smallexample Resumes execution of the inferior program, stopping when the beginning of the next source line is reached. If the @samp{--reverse} option is specified, resumes reverse execution of the inferior program, stopping at the beginning of the previous source line. If you issue this command on the first line of a function, it will take you back to the caller of that function, to the source line where the function was called. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{next}. @subsubheading Example @smallexample -exec-next ^running (gdb) *stopped,reason="end-stepping-range",line="8",file="hello.c" (gdb) @end smallexample @subheading The @code{-exec-next-instruction} Command @findex -exec-next-instruction @subsubheading Synopsis @smallexample -exec-next-instruction [--reverse] @end smallexample Executes one machine instruction. If the instruction is a function call, continues until the function returns. If the program stops at an instruction in the middle of a source line, the address will be printed as well. If the @samp{--reverse} option is specified, resumes reverse execution of the inferior program, stopping at the previous instruction. If the previously executed instruction was a return from another function, it will continue to execute in reverse until the call to that function (from the current stack frame) is reached. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{nexti}. @subsubheading Example @smallexample (gdb) -exec-next-instruction ^running (gdb) *stopped,reason="end-stepping-range", addr="0x000100d4",line="5",file="hello.c" (gdb) @end smallexample @subheading The @code{-exec-return} Command @findex -exec-return @subsubheading Synopsis @smallexample -exec-return @end smallexample Makes current function return immediately. Doesn't execute the inferior. Displays the new current frame. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{return}. @subsubheading Example @smallexample (gdb) 200-break-insert callee4 200^done,bkpt=@{number="1",addr="0x00010734", file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@} (gdb) 000-exec-run 000^running (gdb) 000*stopped,reason="breakpoint-hit",disp="keep",bkptno="1", frame=@{func="callee4",args=[], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="8"@} (gdb) 205-break-delete 205^done (gdb) 111-exec-return 111^done,frame=@{level="0",func="callee3", args=[@{name="strarg", value="0x11940 \"A string argument.\""@}], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="18"@} (gdb) @end smallexample @subheading The @code{-exec-run} Command @findex -exec-run @subsubheading Synopsis @smallexample -exec-run [--all | --thread-group N] @end smallexample Starts execution of the inferior from the beginning. The inferior executes until either a breakpoint is encountered or the program exits. In the latter case the output will include an exit code, if the program has exited exceptionally. When no option is specified, the current inferior is started. If the @samp{--thread-group} option is specified, it should refer to a thread group of type @samp{process}, and that thread group will be started. If the @samp{--all} option is specified, then all inferiors will be started. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{run}. @subsubheading Examples @smallexample (gdb) -break-insert main ^done,bkpt=@{number="1",addr="0x0001072c",file="recursive2.c",line="4"@} (gdb) -exec-run ^running (gdb) *stopped,reason="breakpoint-hit",disp="keep",bkptno="1", frame=@{func="main",args=[],file="recursive2.c", fullname="/home/foo/bar/recursive2.c",line="4"@} (gdb) @end smallexample @noindent Program exited normally: @smallexample (gdb) -exec-run ^running (gdb) x = 55 *stopped,reason="exited-normally" (gdb) @end smallexample @noindent Program exited exceptionally: @smallexample (gdb) -exec-run ^running (gdb) x = 55 *stopped,reason="exited",exit-code="01" (gdb) @end smallexample Another way the program can terminate is if it receives a signal such as @code{SIGINT}. In this case, @sc{gdb/mi} displays this: @smallexample (gdb) *stopped,reason="exited-signalled",signal-name="SIGINT", signal-meaning="Interrupt" @end smallexample @c @subheading -exec-signal @subheading The @code{-exec-step} Command @findex -exec-step @subsubheading Synopsis @smallexample -exec-step [--reverse] @end smallexample Resumes execution of the inferior program, stopping when the beginning of the next source line is reached, if the next source line is not a function call. If it is, stop at the first instruction of the called function. If the @samp{--reverse} option is specified, resumes reverse execution of the inferior program, stopping at the beginning of the previously executed source line. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{step}. @subsubheading Example Stepping into a function: @smallexample -exec-step ^running (gdb) *stopped,reason="end-stepping-range", frame=@{func="foo",args=[@{name="a",value="10"@}, @{name="b",value="0"@}],file="recursive2.c", fullname="/home/foo/bar/recursive2.c",line="11"@} (gdb) @end smallexample Regular stepping: @smallexample -exec-step ^running (gdb) *stopped,reason="end-stepping-range",line="14",file="recursive2.c" (gdb) @end smallexample @subheading The @code{-exec-step-instruction} Command @findex -exec-step-instruction @subsubheading Synopsis @smallexample -exec-step-instruction [--reverse] @end smallexample Resumes the inferior which executes one machine instruction. If the @samp{--reverse} option is specified, resumes reverse execution of the inferior program, stopping at the previously executed instruction. The output, once @value{GDBN} has stopped, will vary depending on whether we have stopped in the middle of a source line or not. In the former case, the address at which the program stopped will be printed as well. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{stepi}. @subsubheading Example @smallexample (gdb) -exec-step-instruction ^running (gdb) *stopped,reason="end-stepping-range", frame=@{func="foo",args=[],file="try.c", fullname="/home/foo/bar/try.c",line="10"@} (gdb) -exec-step-instruction ^running (gdb) *stopped,reason="end-stepping-range", frame=@{addr="0x000100f4",func="foo",args=[],file="try.c", fullname="/home/foo/bar/try.c",line="10"@} (gdb) @end smallexample @subheading The @code{-exec-until} Command @findex -exec-until @subsubheading Synopsis @smallexample -exec-until [ @var{location} ] @end smallexample Executes the inferior until the @var{location} specified in the argument is reached. If there is no argument, the inferior executes until a source line greater than the current one is reached. The reason for stopping in this case will be @samp{location-reached}. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{until}. @subsubheading Example @smallexample (gdb) -exec-until recursive2.c:6 ^running (gdb) x = 55 *stopped,reason="location-reached",frame=@{func="main",args=[], file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="6"@} (gdb) @end smallexample @ignore @subheading -file-clear Is this going away???? @end ignore @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Stack Manipulation @section @sc{gdb/mi} Stack Manipulation Commands @subheading The @code{-stack-info-frame} Command @findex -stack-info-frame @subsubheading Synopsis @smallexample -stack-info-frame @end smallexample Get info on the selected frame. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{info frame} or @samp{frame} (without arguments). @subsubheading Example @smallexample (gdb) -stack-info-frame ^done,frame=@{level="1",addr="0x0001076c",func="callee3", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="17"@} (gdb) @end smallexample @subheading The @code{-stack-info-depth} Command @findex -stack-info-depth @subsubheading Synopsis @smallexample -stack-info-depth [ @var{max-depth} ] @end smallexample Return the depth of the stack. If the integer argument @var{max-depth} is specified, do not count beyond @var{max-depth} frames. @subsubheading @value{GDBN} Command There's no equivalent @value{GDBN} command. @subsubheading Example For a stack with frame levels 0 through 11: @smallexample (gdb) -stack-info-depth ^done,depth="12" (gdb) -stack-info-depth 4 ^done,depth="4" (gdb) -stack-info-depth 12 ^done,depth="12" (gdb) -stack-info-depth 11 ^done,depth="11" (gdb) -stack-info-depth 13 ^done,depth="12" (gdb) @end smallexample @subheading The @code{-stack-list-arguments} Command @findex -stack-list-arguments @subsubheading Synopsis @smallexample -stack-list-arguments @var{print-values} [ @var{low-frame} @var{high-frame} ] @end smallexample Display a list of the arguments for the frames between @var{low-frame} and @var{high-frame} (inclusive). If @var{low-frame} and @var{high-frame} are not provided, list the arguments for the whole call stack. If the two arguments are equal, show the single frame at the corresponding level. It is an error if @var{low-frame} is larger than the actual number of frames. On the other hand, @var{high-frame} may be larger than the actual number of frames, in which case only existing frames will be returned. If @var{print-values} is 0 or @code{--no-values}, print only the names of the variables; if it is 1 or @code{--all-values}, print also their values; and if it is 2 or @code{--simple-values}, print the name, type and value for simple data types, and the name and type for arrays, structures and unions. Use of this command to obtain arguments in a single frame is deprecated in favor of the @samp{-stack-list-variables} command. @subsubheading @value{GDBN} Command @value{GDBN} does not have an equivalent command. @code{gdbtk} has a @samp{gdb_get_args} command which partially overlaps with the functionality of @samp{-stack-list-arguments}. @subsubheading Example @smallexample (gdb) -stack-list-frames ^done, stack=[ frame=@{level="0",addr="0x00010734",func="callee4", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="8"@}, frame=@{level="1",addr="0x0001076c",func="callee3", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="17"@}, frame=@{level="2",addr="0x0001078c",func="callee2", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="22"@}, frame=@{level="3",addr="0x000107b4",func="callee1", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="27"@}, frame=@{level="4",addr="0x000107e0",func="main", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="32"@}] (gdb) -stack-list-arguments 0 ^done, stack-args=[ frame=@{level="0",args=[]@}, frame=@{level="1",args=[name="strarg"]@}, frame=@{level="2",args=[name="intarg",name="strarg"]@}, frame=@{level="3",args=[name="intarg",name="strarg",name="fltarg"]@}, frame=@{level="4",args=[]@}] (gdb) -stack-list-arguments 1 ^done, stack-args=[ frame=@{level="0",args=[]@}, frame=@{level="1", args=[@{name="strarg",value="0x11940 \"A string argument.\""@}]@}, frame=@{level="2",args=[ @{name="intarg",value="2"@}, @{name="strarg",value="0x11940 \"A string argument.\""@}]@}, @{frame=@{level="3",args=[ @{name="intarg",value="2"@}, @{name="strarg",value="0x11940 \"A string argument.\""@}, @{name="fltarg",value="3.5"@}]@}, frame=@{level="4",args=[]@}] (gdb) -stack-list-arguments 0 2 2 ^done,stack-args=[frame=@{level="2",args=[name="intarg",name="strarg"]@}] (gdb) -stack-list-arguments 1 2 2 ^done,stack-args=[frame=@{level="2", args=[@{name="intarg",value="2"@}, @{name="strarg",value="0x11940 \"A string argument.\""@}]@}] (gdb) @end smallexample @c @subheading -stack-list-exception-handlers @subheading The @code{-stack-list-frames} Command @findex -stack-list-frames @subsubheading Synopsis @smallexample -stack-list-frames [ @var{low-frame} @var{high-frame} ] @end smallexample List the frames currently on the stack. For each frame it displays the following info: @table @samp @item @var{level} The frame number, 0 being the topmost frame, i.e., the innermost function. @item @var{addr} The @code{$pc} value for that frame. @item @var{func} Function name. @item @var{file} File name of the source file where the function lives. @item @var{fullname} The full file name of the source file where the function lives. @item @var{line} Line number corresponding to the @code{$pc}. @item @var{from} The shared library where this function is defined. This is only given if the frame's function is not known. @end table If invoked without arguments, this command prints a backtrace for the whole stack. If given two integer arguments, it shows the frames whose levels are between the two arguments (inclusive). If the two arguments are equal, it shows the single frame at the corresponding level. It is an error if @var{low-frame} is larger than the actual number of frames. On the other hand, @var{high-frame} may be larger than the actual number of frames, in which case only existing frames will be returned. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} commands are @samp{backtrace} and @samp{where}. @subsubheading Example Full stack backtrace: @smallexample (gdb) -stack-list-frames ^done,stack= [frame=@{level="0",addr="0x0001076c",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="11"@}, frame=@{level="1",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}, frame=@{level="2",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}, frame=@{level="3",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}, frame=@{level="4",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}, frame=@{level="5",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}, frame=@{level="6",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}, frame=@{level="7",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}, frame=@{level="8",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}, frame=@{level="9",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}, frame=@{level="10",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}, frame=@{level="11",addr="0x00010738",func="main", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="4"@}] (gdb) @end smallexample Show frames between @var{low_frame} and @var{high_frame}: @smallexample (gdb) -stack-list-frames 3 5 ^done,stack= [frame=@{level="3",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}, frame=@{level="4",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}, frame=@{level="5",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}] (gdb) @end smallexample Show a single frame: @smallexample (gdb) -stack-list-frames 3 3 ^done,stack= [frame=@{level="3",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14"@}] (gdb) @end smallexample @subheading The @code{-stack-list-locals} Command @findex -stack-list-locals @subsubheading Synopsis @smallexample -stack-list-locals @var{print-values} @end smallexample Display the local variable names for the selected frame. If @var{print-values} is 0 or @code{--no-values}, print only the names of the variables; if it is 1 or @code{--all-values}, print also their values; and if it is 2 or @code{--simple-values}, print the name, type and value for simple data types, and the name and type for arrays, structures and unions. In this last case, a frontend can immediately display the value of simple data types and create variable objects for other data types when the user wishes to explore their values in more detail. This command is deprecated in favor of the @samp{-stack-list-variables} command. @subsubheading @value{GDBN} Command @samp{info locals} in @value{GDBN}, @samp{gdb_get_locals} in @code{gdbtk}. @subsubheading Example @smallexample (gdb) -stack-list-locals 0 ^done,locals=[name="A",name="B",name="C"] (gdb) -stack-list-locals --all-values ^done,locals=[@{name="A",value="1"@},@{name="B",value="2"@}, @{name="C",value="@{1, 2, 3@}"@}] -stack-list-locals --simple-values ^done,locals=[@{name="A",type="int",value="1"@}, @{name="B",type="int",value="2"@},@{name="C",type="int [3]"@}] (gdb) @end smallexample @subheading The @code{-stack-list-variables} Command @findex -stack-list-variables @subsubheading Synopsis @smallexample -stack-list-variables @var{print-values} @end smallexample Display the names of local variables and function arguments for the selected frame. If @var{print-values} is 0 or @code{--no-values}, print only the names of the variables; if it is 1 or @code{--all-values}, print also their values; and if it is 2 or @code{--simple-values}, print the name, type and value for simple data types, and the name and type for arrays, structures and unions. @subsubheading Example @smallexample (gdb) -stack-list-variables --thread 1 --frame 0 --all-values ^done,variables=[@{name="x",value="11"@},@{name="s",value="@{a = 1, b = 2@}"@}] (gdb) @end smallexample @subheading The @code{-stack-select-frame} Command @findex -stack-select-frame @subsubheading Synopsis @smallexample -stack-select-frame @var{framenum} @end smallexample Change the selected frame. Select a different frame @var{framenum} on the stack. This command in deprecated in favor of passing the @samp{--frame} option to every command. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} commands are @samp{frame}, @samp{up}, @samp{down}, @samp{select-frame}, @samp{up-silent}, and @samp{down-silent}. @subsubheading Example @smallexample (gdb) -stack-select-frame 2 ^done (gdb) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Variable Objects @section @sc{gdb/mi} Variable Objects @ignore @subheading Motivation for Variable Objects in @sc{gdb/mi} For the implementation of a variable debugger window (locals, watched expressions, etc.), we are proposing the adaptation of the existing code used by @code{Insight}. The two main reasons for that are: @enumerate 1 @item It has been proven in practice (it is already on its second generation). @item It will shorten development time (needless to say how important it is now). @end enumerate The original interface was designed to be used by Tcl code, so it was slightly changed so it could be used through @sc{gdb/mi}. This section describes the @sc{gdb/mi} operations that will be available and gives some hints about their use. @emph{Note}: In addition to the set of operations described here, we expect the @sc{gui} implementation of a variable window to require, at least, the following operations: @itemize @bullet @item @code{-gdb-show} @code{output-radix} @item @code{-stack-list-arguments} @item @code{-stack-list-locals} @item @code{-stack-select-frame} @end itemize @end ignore @subheading Introduction to Variable Objects @cindex variable objects in @sc{gdb/mi} Variable objects are "object-oriented" MI interface for examining and changing values of expressions. Unlike some other MI interfaces that work with expressions, variable objects are specifically designed for simple and efficient presentation in the frontend. A variable object is identified by string name. When a variable object is created, the frontend specifies the expression for that variable object. The expression can be a simple variable, or it can be an arbitrary complex expression, and can even involve CPU registers. After creating a variable object, the frontend can invoke other variable object operations---for example to obtain or change the value of a variable object, or to change display format. Variable objects have hierarchical tree structure. Any variable object that corresponds to a composite type, such as structure in C, has a number of child variable objects, for example corresponding to each element of a structure. A child variable object can itself have children, recursively. Recursion ends when we reach leaf variable objects, which always have built-in types. Child variable objects are created only by explicit request, so if a frontend is not interested in the children of a particular variable object, no child will be created. For a leaf variable object it is possible to obtain its value as a string, or set the value from a string. String value can be also obtained for a non-leaf variable object, but it's generally a string that only indicates the type of the object, and does not list its contents. Assignment to a non-leaf variable object is not allowed. A frontend does not need to read the values of all variable objects each time the program stops. Instead, MI provides an update command that lists all variable objects whose values has changed since the last update operation. This considerably reduces the amount of data that must be transferred to the frontend. As noted above, children variable objects are created on demand, and only leaf variable objects have a real value. As result, gdb will read target memory only for leaf variables that frontend has created. The automatic update is not always desirable. For example, a frontend might want to keep a value of some expression for future reference, and never update it. For another example, fetching memory is relatively slow for embedded targets, so a frontend might want to disable automatic update for the variables that are either not visible on the screen, or ``closed''. This is possible using so called ``frozen variable objects''. Such variable objects are never implicitly updated. Variable objects can be either @dfn{fixed} or @dfn{floating}. For the fixed variable object, the expression is parsed when the variable object is created, including associating identifiers to specific variables. The meaning of expression never changes. For a floating variable object the values of variables whose names appear in the expressions are re-evaluated every time in the context of the current frame. Consider this example: @smallexample void do_work(...) @{ struct work_state state; if (...) do_work(...); @} @end smallexample If a fixed variable object for the @code{state} variable is created in this function, and we enter the recursive call, the variable object will report the value of @code{state} in the top-level @code{do_work} invocation. On the other hand, a floating variable object will report the value of @code{state} in the current frame. If an expression specified when creating a fixed variable object refers to a local variable, the variable object becomes bound to the thread and frame in which the variable object is created. When such variable object is updated, @value{GDBN} makes sure that the thread/frame combination the variable object is bound to still exists, and re-evaluates the variable object in context of that thread/frame. The following is the complete set of @sc{gdb/mi} operations defined to access this functionality: @multitable @columnfractions .4 .6 @item @strong{Operation} @tab @strong{Description} @item @code{-enable-pretty-printing} @tab enable Python-based pretty-printing @item @code{-var-create} @tab create a variable object @item @code{-var-delete} @tab delete the variable object and/or its children @item @code{-var-set-format} @tab set the display format of this variable @item @code{-var-show-format} @tab show the display format of this variable @item @code{-var-info-num-children} @tab tells how many children this object has @item @code{-var-list-children} @tab return a list of the object's children @item @code{-var-info-type} @tab show the type of this variable object @item @code{-var-info-expression} @tab print parent-relative expression that this variable object represents @item @code{-var-info-path-expression} @tab print full expression that this variable object represents @item @code{-var-show-attributes} @tab is this variable editable? does it exist here? @item @code{-var-evaluate-expression} @tab get the value of this variable @item @code{-var-assign} @tab set the value of this variable @item @code{-var-update} @tab update the variable and its children @item @code{-var-set-frozen} @tab set frozeness attribute @item @code{-var-set-update-range} @tab set range of children to display on update @end multitable In the next subsection we describe each operation in detail and suggest how it can be used. @subheading Description And Use of Operations on Variable Objects @subheading The @code{-enable-pretty-printing} Command @findex -enable-pretty-printing @smallexample -enable-pretty-printing @end smallexample @value{GDBN} allows Python-based visualizers to affect the output of the MI variable object commands. However, because there was no way to implement this in a fully backward-compatible way, a front end must request that this functionality be enabled. Once enabled, this feature cannot be disabled. Note that if Python support has not been compiled into @value{GDBN}, this command will still succeed (and do nothing). This feature is currently (as of @value{GDBN} 7.0) experimental, and may work differently in future versions of @value{GDBN}. @subheading The @code{-var-create} Command @findex -var-create @subsubheading Synopsis @smallexample -var-create @{@var{name} | "-"@} @{@var{frame-addr} | "*" | "@@"@} @var{expression} @end smallexample This operation creates a variable object, which allows the monitoring of a variable, the result of an expression, a memory cell or a CPU register. The @var{name} parameter is the string by which the object can be referenced. It must be unique. If @samp{-} is specified, the varobj system will generate a string ``varNNNNNN'' automatically. It will be unique provided that one does not specify @var{name} of that format. The command fails if a duplicate name is found. The frame under which the expression should be evaluated can be specified by @var{frame-addr}. A @samp{*} indicates that the current frame should be used. A @samp{@@} indicates that a floating variable object must be created. @var{expression} is any expression valid on the current language set (must not begin with a @samp{*}), or one of the following: @itemize @bullet @item @samp{*@var{addr}}, where @var{addr} is the address of a memory cell @item @samp{*@var{addr}-@var{addr}} --- a memory address range (TBD) @item @samp{$@var{regname}} --- a CPU register name @end itemize @cindex dynamic varobj A varobj's contents may be provided by a Python-based pretty-printer. In this case the varobj is known as a @dfn{dynamic varobj}. Dynamic varobjs have slightly different semantics in some cases. If the @code{-enable-pretty-printing} command is not sent, then @value{GDBN} will never create a dynamic varobj. This ensures backward compatibility for existing clients. @subsubheading Result This operation returns attributes of the newly-created varobj. These are: @table @samp @item name The name of the varobj. @item numchild The number of children of the varobj. This number is not necessarily reliable for a dynamic varobj. Instead, you must examine the @samp{has_more} attribute. @item value The varobj's scalar value. For a varobj whose type is some sort of aggregate (e.g., a @code{struct}), or for a dynamic varobj, this value will not be interesting. @item type The varobj's type. This is a string representation of the type, as would be printed by the @value{GDBN} CLI. If @samp{print object} (@pxref{Print Settings, set print object}) is set to @code{on}, the @emph{actual} (derived) type of the object is shown rather than the @emph{declared} one. @item thread-id If a variable object is bound to a specific thread, then this is the thread's identifier. @item has_more For a dynamic varobj, this indicates whether there appear to be any children available. For a non-dynamic varobj, this will be 0. @item dynamic This attribute will be present and have the value @samp{1} if the varobj is a dynamic varobj. If the varobj is not a dynamic varobj, then this attribute will not be present. @item displayhint A dynamic varobj can supply a display hint to the front end. The value comes directly from the Python pretty-printer object's @code{display_hint} method. @xref{Pretty Printing API}. @end table Typical output will look like this: @smallexample name="@var{name}",numchild="@var{N}",type="@var{type}",thread-id="@var{M}", has_more="@var{has_more}" @end smallexample @subheading The @code{-var-delete} Command @findex -var-delete @subsubheading Synopsis @smallexample -var-delete [ -c ] @var{name} @end smallexample Deletes a previously created variable object and all of its children. With the @samp{-c} option, just deletes the children. Returns an error if the object @var{name} is not found. @subheading The @code{-var-set-format} Command @findex -var-set-format @subsubheading Synopsis @smallexample -var-set-format @var{name} @var{format-spec} @end smallexample Sets the output format for the value of the object @var{name} to be @var{format-spec}. @anchor{-var-set-format} The syntax for the @var{format-spec} is as follows: @smallexample @var{format-spec} @expansion{} @{binary | decimal | hexadecimal | octal | natural@} @end smallexample The natural format is the default format choosen automatically based on the variable type (like decimal for an @code{int}, hex for pointers, etc.). For a variable with children, the format is set only on the variable itself, and the children are not affected. @subheading The @code{-var-show-format} Command @findex -var-show-format @subsubheading Synopsis @smallexample -var-show-format @var{name} @end smallexample Returns the format used to display the value of the object @var{name}. @smallexample @var{format} @expansion{} @var{format-spec} @end smallexample @subheading The @code{-var-info-num-children} Command @findex -var-info-num-children @subsubheading Synopsis @smallexample -var-info-num-children @var{name} @end smallexample Returns the number of children of a variable object @var{name}: @smallexample numchild=@var{n} @end smallexample Note that this number is not completely reliable for a dynamic varobj. It will return the current number of children, but more children may be available. @subheading The @code{-var-list-children} Command @findex -var-list-children @subsubheading Synopsis @smallexample -var-list-children [@var{print-values}] @var{name} [@var{from} @var{to}] @end smallexample @anchor{-var-list-children} Return a list of the children of the specified variable object and create variable objects for them, if they do not already exist. With a single argument or if @var{print-values} has a value of 0 or @code{--no-values}, print only the names of the variables; if @var{print-values} is 1 or @code{--all-values}, also print their values; and if it is 2 or @code{--simple-values} print the name and value for simple data types and just the name for arrays, structures and unions. @var{from} and @var{to}, if specified, indicate the range of children to report. If @var{from} or @var{to} is less than zero, the range is reset and all children will be reported. Otherwise, children starting at @var{from} (zero-based) and up to and excluding @var{to} will be reported. If a child range is requested, it will only affect the current call to @code{-var-list-children}, but not future calls to @code{-var-update}. For this, you must instead use @code{-var-set-update-range}. The intent of this approach is to enable a front end to implement any update approach it likes; for example, scrolling a view may cause the front end to request more children with @code{-var-list-children}, and then the front end could call @code{-var-set-update-range} with a different range to ensure that future updates are restricted to just the visible items. For each child the following results are returned: @table @var @item name Name of the variable object created for this child. @item exp The expression to be shown to the user by the front end to designate this child. For example this may be the name of a structure member. For a dynamic varobj, this value cannot be used to form an expression. There is no way to do this at all with a dynamic varobj. For C/C@t{++} structures there are several pseudo children returned to designate access qualifiers. For these pseudo children @var{exp} is @samp{public}, @samp{private}, or @samp{protected}. In this case the type and value are not present. A dynamic varobj will not report the access qualifying pseudo-children, regardless of the language. This information is not available at all with a dynamic varobj. @item numchild Number of children this child has. For a dynamic varobj, this will be 0. @item type The type of the child. If @samp{print object} (@pxref{Print Settings, set print object}) is set to @code{on}, the @emph{actual} (derived) type of the object is shown rather than the @emph{declared} one. @item value If values were requested, this is the value. @item thread-id If this variable object is associated with a thread, this is the thread id. Otherwise this result is not present. @item frozen If the variable object is frozen, this variable will be present with a value of 1. @end table The result may have its own attributes: @table @samp @item displayhint A dynamic varobj can supply a display hint to the front end. The value comes directly from the Python pretty-printer object's @code{display_hint} method. @xref{Pretty Printing API}. @item has_more This is an integer attribute which is nonzero if there are children remaining after the end of the selected range. @end table @subsubheading Example @smallexample (gdb) -var-list-children n ^done,numchild=@var{n},children=[child=@{name=@var{name},exp=@var{exp}, numchild=@var{n},type=@var{type}@},@r{(repeats N times)}] (gdb) -var-list-children --all-values n ^done,numchild=@var{n},children=[child=@{name=@var{name},exp=@var{exp}, numchild=@var{n},value=@var{value},type=@var{type}@},@r{(repeats N times)}] @end smallexample @subheading The @code{-var-info-type} Command @findex -var-info-type @subsubheading Synopsis @smallexample -var-info-type @var{name} @end smallexample Returns the type of the specified variable @var{name}. The type is returned as a string in the same format as it is output by the @value{GDBN} CLI: @smallexample type=@var{typename} @end smallexample @subheading The @code{-var-info-expression} Command @findex -var-info-expression @subsubheading Synopsis @smallexample -var-info-expression @var{name} @end smallexample Returns a string that is suitable for presenting this variable object in user interface. The string is generally not valid expression in the current language, and cannot be evaluated. For example, if @code{a} is an array, and variable object @code{A} was created for @code{a}, then we'll get this output: @smallexample (gdb) -var-info-expression A.1 ^done,lang="C",exp="1" @end smallexample @noindent Here, the values of @code{lang} can be @code{@{"C" | "C++" | "Java"@}}. Note that the output of the @code{-var-list-children} command also includes those expressions, so the @code{-var-info-expression} command is of limited use. @subheading The @code{-var-info-path-expression} Command @findex -var-info-path-expression @subsubheading Synopsis @smallexample -var-info-path-expression @var{name} @end smallexample Returns an expression that can be evaluated in the current context and will yield the same value that a variable object has. Compare this with the @code{-var-info-expression} command, which result can be used only for UI presentation. Typical use of the @code{-var-info-path-expression} command is creating a watchpoint from a variable object. This command is currently not valid for children of a dynamic varobj, and will give an error when invoked on one. For example, suppose @code{C} is a C@t{++} class, derived from class @code{Base}, and that the @code{Base} class has a member called @code{m_size}. Assume a variable @code{c} is has the type of @code{C} and a variable object @code{C} was created for variable @code{c}. Then, we'll get this output: @smallexample (gdb) -var-info-path-expression C.Base.public.m_size ^done,path_expr=((Base)c).m_size) @end smallexample @subheading The @code{-var-show-attributes} Command @findex -var-show-attributes @subsubheading Synopsis @smallexample -var-show-attributes @var{name} @end smallexample List attributes of the specified variable object @var{name}: @smallexample status=@var{attr} [ ( ,@var{attr} )* ] @end smallexample @noindent where @var{attr} is @code{@{ @{ editable | noneditable @} | TBD @}}. @subheading The @code{-var-evaluate-expression} Command @findex -var-evaluate-expression @subsubheading Synopsis @smallexample -var-evaluate-expression [-f @var{format-spec}] @var{name} @end smallexample Evaluates the expression that is represented by the specified variable object and returns its value as a string. The format of the string can be specified with the @samp{-f} option. The possible values of this option are the same as for @code{-var-set-format} (@pxref{-var-set-format}). If the @samp{-f} option is not specified, the current display format will be used. The current display format can be changed using the @code{-var-set-format} command. @smallexample value=@var{value} @end smallexample Note that one must invoke @code{-var-list-children} for a variable before the value of a child variable can be evaluated. @subheading The @code{-var-assign} Command @findex -var-assign @subsubheading Synopsis @smallexample -var-assign @var{name} @var{expression} @end smallexample Assigns the value of @var{expression} to the variable object specified by @var{name}. The object must be @samp{editable}. If the variable's value is altered by the assign, the variable will show up in any subsequent @code{-var-update} list. @subsubheading Example @smallexample (gdb) -var-assign var1 3 ^done,value="3" (gdb) -var-update * ^done,changelist=[@{name="var1",in_scope="true",type_changed="false"@}] (gdb) @end smallexample @subheading The @code{-var-update} Command @findex -var-update @subsubheading Synopsis @smallexample -var-update [@var{print-values}] @{@var{name} | "*"@} @end smallexample Reevaluate the expressions corresponding to the variable object @var{name} and all its direct and indirect children, and return the list of variable objects whose values have changed; @var{name} must be a root variable object. Here, ``changed'' means that the result of @code{-var-evaluate-expression} before and after the @code{-var-update} is different. If @samp{*} is used as the variable object names, all existing variable objects are updated, except for frozen ones (@pxref{-var-set-frozen}). The option @var{print-values} determines whether both names and values, or just names are printed. The possible values of this option are the same as for @code{-var-list-children} (@pxref{-var-list-children}). It is recommended to use the @samp{--all-values} option, to reduce the number of MI commands needed on each program stop. With the @samp{*} parameter, if a variable object is bound to a currently running thread, it will not be updated, without any diagnostic. If @code{-var-set-update-range} was previously used on a varobj, then only the selected range of children will be reported. @code{-var-update} reports all the changed varobjs in a tuple named @samp{changelist}. Each item in the change list is itself a tuple holding: @table @samp @item name The name of the varobj. @item value If values were requested for this update, then this field will be present and will hold the value of the varobj. @item in_scope @anchor{-var-update} This field is a string which may take one of three values: @table @code @item "true" The variable object's current value is valid. @item "false" The variable object does not currently hold a valid value but it may hold one in the future if its associated expression comes back into scope. @item "invalid" The variable object no longer holds a valid value. This can occur when the executable file being debugged has changed, either through recompilation or by using the @value{GDBN} @code{file} command. The front end should normally choose to delete these variable objects. @end table In the future new values may be added to this list so the front should be prepared for this possibility. @xref{GDB/MI Development and Front Ends, ,@sc{GDB/MI} Development and Front Ends}. @item type_changed This is only present if the varobj is still valid. If the type changed, then this will be the string @samp{true}; otherwise it will be @samp{false}. When a varobj's type changes, its children are also likely to have become incorrect. Therefore, the varobj's children are automatically deleted when this attribute is @samp{true}. Also, the varobj's update range, when set using the @code{-var-set-update-range} command, is unset. @item new_type If the varobj's type changed, then this field will be present and will hold the new type. @item new_num_children For a dynamic varobj, if the number of children changed, or if the type changed, this will be the new number of children. The @samp{numchild} field in other varobj responses is generally not valid for a dynamic varobj -- it will show the number of children that @value{GDBN} knows about, but because dynamic varobjs lazily instantiate their children, this will not reflect the number of children which may be available. The @samp{new_num_children} attribute only reports changes to the number of children known by @value{GDBN}. This is the only way to detect whether an update has removed children (which necessarily can only happen at the end of the update range). @item displayhint The display hint, if any. @item has_more This is an integer value, which will be 1 if there are more children available outside the varobj's update range. @item dynamic This attribute will be present and have the value @samp{1} if the varobj is a dynamic varobj. If the varobj is not a dynamic varobj, then this attribute will not be present. @item new_children If new children were added to a dynamic varobj within the selected update range (as set by @code{-var-set-update-range}), then they will be listed in this attribute. @end table @subsubheading Example @smallexample (gdb) -var-assign var1 3 ^done,value="3" (gdb) -var-update --all-values var1 ^done,changelist=[@{name="var1",value="3",in_scope="true", type_changed="false"@}] (gdb) @end smallexample @subheading The @code{-var-set-frozen} Command @findex -var-set-frozen @anchor{-var-set-frozen} @subsubheading Synopsis @smallexample -var-set-frozen @var{name} @var{flag} @end smallexample Set the frozenness flag on the variable object @var{name}. The @var{flag} parameter should be either @samp{1} to make the variable frozen or @samp{0} to make it unfrozen. If a variable object is frozen, then neither itself, nor any of its children, are implicitly updated by @code{-var-update} of a parent variable or by @code{-var-update *}. Only @code{-var-update} of the variable itself will update its value and values of its children. After a variable object is unfrozen, it is implicitly updated by all subsequent @code{-var-update} operations. Unfreezing a variable does not update it, only subsequent @code{-var-update} does. @subsubheading Example @smallexample (gdb) -var-set-frozen V 1 ^done (gdb) @end smallexample @subheading The @code{-var-set-update-range} command @findex -var-set-update-range @anchor{-var-set-update-range} @subsubheading Synopsis @smallexample -var-set-update-range @var{name} @var{from} @var{to} @end smallexample Set the range of children to be returned by future invocations of @code{-var-update}. @var{from} and @var{to} indicate the range of children to report. If @var{from} or @var{to} is less than zero, the range is reset and all children will be reported. Otherwise, children starting at @var{from} (zero-based) and up to and excluding @var{to} will be reported. @subsubheading Example @smallexample (gdb) -var-set-update-range V 1 2 ^done @end smallexample @subheading The @code{-var-set-visualizer} command @findex -var-set-visualizer @anchor{-var-set-visualizer} @subsubheading Synopsis @smallexample -var-set-visualizer @var{name} @var{visualizer} @end smallexample Set a visualizer for the variable object @var{name}. @var{visualizer} is the visualizer to use. The special value @samp{None} means to disable any visualizer in use. If not @samp{None}, @var{visualizer} must be a Python expression. This expression must evaluate to a callable object which accepts a single argument. @value{GDBN} will call this object with the value of the varobj @var{name} as an argument (this is done so that the same Python pretty-printing code can be used for both the CLI and MI). When called, this object must return an object which conforms to the pretty-printing interface (@pxref{Pretty Printing API}). The pre-defined function @code{gdb.default_visualizer} may be used to select a visualizer by following the built-in process (@pxref{Selecting Pretty-Printers}). This is done automatically when a varobj is created, and so ordinarily is not needed. This feature is only available if Python support is enabled. The MI command @code{-list-features} (@pxref{GDB/MI Miscellaneous Commands}) can be used to check this. @subsubheading Example Resetting the visualizer: @smallexample (gdb) -var-set-visualizer V None ^done @end smallexample Reselecting the default (type-based) visualizer: @smallexample (gdb) -var-set-visualizer V gdb.default_visualizer ^done @end smallexample Suppose @code{SomeClass} is a visualizer class. A lambda expression can be used to instantiate this class for a varobj: @smallexample (gdb) -var-set-visualizer V "lambda val: SomeClass()" ^done @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Data Manipulation @section @sc{gdb/mi} Data Manipulation @cindex data manipulation, in @sc{gdb/mi} @cindex @sc{gdb/mi}, data manipulation This section describes the @sc{gdb/mi} commands that manipulate data: examine memory and registers, evaluate expressions, etc. @c REMOVED FROM THE INTERFACE. @c @subheading -data-assign @c Change the value of a program variable. Plenty of side effects. @c @subsubheading GDB Command @c set variable @c @subsubheading Example @c N.A. @subheading The @code{-data-disassemble} Command @findex -data-disassemble @subsubheading Synopsis @smallexample -data-disassemble [ -s @var{start-addr} -e @var{end-addr} ] | [ -f @var{filename} -l @var{linenum} [ -n @var{lines} ] ] -- @var{mode} @end smallexample @noindent Where: @table @samp @item @var{start-addr} is the beginning address (or @code{$pc}) @item @var{end-addr} is the end address @item @var{filename} is the name of the file to disassemble @item @var{linenum} is the line number to disassemble around @item @var{lines} is the number of disassembly lines to be produced. If it is -1, the whole function will be disassembled, in case no @var{end-addr} is specified. If @var{end-addr} is specified as a non-zero value, and @var{lines} is lower than the number of disassembly lines between @var{start-addr} and @var{end-addr}, only @var{lines} lines are displayed; if @var{lines} is higher than the number of lines between @var{start-addr} and @var{end-addr}, only the lines up to @var{end-addr} are displayed. @item @var{mode} is either 0 (meaning only disassembly), 1 (meaning mixed source and disassembly), 2 (meaning disassembly with raw opcodes), or 3 (meaning mixed source and disassembly with raw opcodes). @end table @subsubheading Result The result of the @code{-data-disassemble} command will be a list named @samp{asm_insns}, the contents of this list depend on the @var{mode} used with the @code{-data-disassemble} command. For modes 0 and 2 the @samp{asm_insns} list contains tuples with the following fields: @table @code @item address The address at which this instruction was disassembled. @item func-name The name of the function this instruction is within. @item offset The decimal offset in bytes from the start of @samp{func-name}. @item inst The text disassembly for this @samp{address}. @item opcodes This field is only present for mode 2. This contains the raw opcode bytes for the @samp{inst} field. @end table For modes 1 and 3 the @samp{asm_insns} list contains tuples named @samp{src_and_asm_line}, each of which has the following fields: @table @code @item line The line number within @samp{file}. @item file The file name from the compilation unit. This might be an absolute file name or a relative file name depending on the compile command used. @item fullname Absolute file name of @samp{file}. It is converted to a canonical form using the source file search path (@pxref{Source Path, ,Specifying Source Directories}) and after resolving all the symbolic links. If the source file is not found this field will contain the path as present in the debug information. @item line_asm_insn This is a list of tuples containing the disassembly for @samp{line} in @samp{file}. The fields of each tuple are the same as for @code{-data-disassemble} in @var{mode} 0 and 2, so @samp{address}, @samp{func-name}, @samp{offset}, @samp{inst}, and optionally @samp{opcodes}. @end table Note that whatever included in the @samp{inst} field, is not manipulated directly by @sc{gdb/mi}, i.e., it is not possible to adjust its format. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{disassemble}. @subsubheading Example Disassemble from the current value of @code{$pc} to @code{$pc + 20}: @smallexample (gdb) -data-disassemble -s $pc -e "$pc + 20" -- 0 ^done, asm_insns=[ @{address="0x000107c0",func-name="main",offset="4", inst="mov 2, %o0"@}, @{address="0x000107c4",func-name="main",offset="8", inst="sethi %hi(0x11800), %o2"@}, @{address="0x000107c8",func-name="main",offset="12", inst="or %o2, 0x140, %o1\t! 0x11940 <_lib_version+8>"@}, @{address="0x000107cc",func-name="main",offset="16", inst="sethi %hi(0x11800), %o2"@}, @{address="0x000107d0",func-name="main",offset="20", inst="or %o2, 0x168, %o4\t! 0x11968 <_lib_version+48>"@}] (gdb) @end smallexample Disassemble the whole @code{main} function. Line 32 is part of @code{main}. @smallexample -data-disassemble -f basics.c -l 32 -- 0 ^done,asm_insns=[ @{address="0x000107bc",func-name="main",offset="0", inst="save %sp, -112, %sp"@}, @{address="0x000107c0",func-name="main",offset="4", inst="mov 2, %o0"@}, @{address="0x000107c4",func-name="main",offset="8", inst="sethi %hi(0x11800), %o2"@}, [@dots{}] @{address="0x0001081c",func-name="main",offset="96",inst="ret "@}, @{address="0x00010820",func-name="main",offset="100",inst="restore "@}] (gdb) @end smallexample Disassemble 3 instructions from the start of @code{main}: @smallexample (gdb) -data-disassemble -f basics.c -l 32 -n 3 -- 0 ^done,asm_insns=[ @{address="0x000107bc",func-name="main",offset="0", inst="save %sp, -112, %sp"@}, @{address="0x000107c0",func-name="main",offset="4", inst="mov 2, %o0"@}, @{address="0x000107c4",func-name="main",offset="8", inst="sethi %hi(0x11800), %o2"@}] (gdb) @end smallexample Disassemble 3 instructions from the start of @code{main} in mixed mode: @smallexample (gdb) -data-disassemble -f basics.c -l 32 -n 3 -- 1 ^done,asm_insns=[ src_and_asm_line=@{line="31", file="../../../src/gdb/testsuite/gdb.mi/basics.c", fullname="/absolute/path/to/src/gdb/testsuite/gdb.mi/basics.c", line_asm_insn=[@{address="0x000107bc", func-name="main",offset="0",inst="save %sp, -112, %sp"@}]@}, src_and_asm_line=@{line="32", file="../../../src/gdb/testsuite/gdb.mi/basics.c", fullname="/absolute/path/to/src/gdb/testsuite/gdb.mi/basics.c", line_asm_insn=[@{address="0x000107c0", func-name="main",offset="4",inst="mov 2, %o0"@}, @{address="0x000107c4",func-name="main",offset="8", inst="sethi %hi(0x11800), %o2"@}]@}] (gdb) @end smallexample @subheading The @code{-data-evaluate-expression} Command @findex -data-evaluate-expression @subsubheading Synopsis @smallexample -data-evaluate-expression @var{expr} @end smallexample Evaluate @var{expr} as an expression. The expression could contain an inferior function call. The function call will execute synchronously. If the expression contains spaces, it must be enclosed in double quotes. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} commands are @samp{print}, @samp{output}, and @samp{call}. In @code{gdbtk} only, there's a corresponding @samp{gdb_eval} command. @subsubheading Example In the following example, the numbers that precede the commands are the @dfn{tokens} described in @ref{GDB/MI Command Syntax, ,@sc{gdb/mi} Command Syntax}. Notice how @sc{gdb/mi} returns the same tokens in its output. @smallexample 211-data-evaluate-expression A 211^done,value="1" (gdb) 311-data-evaluate-expression &A 311^done,value="0xefffeb7c" (gdb) 411-data-evaluate-expression A+3 411^done,value="4" (gdb) 511-data-evaluate-expression "A + 3" 511^done,value="4" (gdb) @end smallexample @subheading The @code{-data-list-changed-registers} Command @findex -data-list-changed-registers @subsubheading Synopsis @smallexample -data-list-changed-registers @end smallexample Display a list of the registers that have changed. @subsubheading @value{GDBN} Command @value{GDBN} doesn't have a direct analog for this command; @code{gdbtk} has the corresponding command @samp{gdb_changed_register_list}. @subsubheading Example On a PPC MBX board: @smallexample (gdb) -exec-continue ^running (gdb) *stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame=@{ func="main",args=[],file="try.c",fullname="/home/foo/bar/try.c", line="5"@} (gdb) -data-list-changed-registers ^done,changed-registers=["0","1","2","4","5","6","7","8","9", "10","11","13","14","15","16","17","18","19","20","21","22","23", "24","25","26","27","28","30","31","64","65","66","67","69"] (gdb) @end smallexample @subheading The @code{-data-list-register-names} Command @findex -data-list-register-names @subsubheading Synopsis @smallexample -data-list-register-names [ ( @var{regno} )+ ] @end smallexample Show a list of register names for the current target. If no arguments are given, it shows a list of the names of all the registers. If integer numbers are given as arguments, it will print a list of the names of the registers corresponding to the arguments. To ensure consistency between a register name and its number, the output list may include empty register names. @subsubheading @value{GDBN} Command @value{GDBN} does not have a command which corresponds to @samp{-data-list-register-names}. In @code{gdbtk} there is a corresponding command @samp{gdb_regnames}. @subsubheading Example For the PPC MBX board: @smallexample (gdb) -data-list-register-names ^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7", "r8","r9","r10","r11","r12","r13","r14","r15","r16","r17","r18", "r19","r20","r21","r22","r23","r24","r25","r26","r27","r28","r29", "r30","r31","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9", "f10","f11","f12","f13","f14","f15","f16","f17","f18","f19","f20", "f21","f22","f23","f24","f25","f26","f27","f28","f29","f30","f31", "", "pc","ps","cr","lr","ctr","xer"] (gdb) -data-list-register-names 1 2 3 ^done,register-names=["r1","r2","r3"] (gdb) @end smallexample @subheading The @code{-data-list-register-values} Command @findex -data-list-register-values @subsubheading Synopsis @smallexample -data-list-register-values @var{fmt} [ ( @var{regno} )*] @end smallexample Display the registers' contents. @var{fmt} is the format according to which the registers' contents are to be returned, followed by an optional list of numbers specifying the registers to display. A missing list of numbers indicates that the contents of all the registers must be returned. Allowed formats for @var{fmt} are: @table @code @item x Hexadecimal @item o Octal @item t Binary @item d Decimal @item r Raw @item N Natural @end table @subsubheading @value{GDBN} Command The corresponding @value{GDBN} commands are @samp{info reg}, @samp{info all-reg}, and (in @code{gdbtk}) @samp{gdb_fetch_registers}. @subsubheading Example For a PPC MBX board (note: line breaks are for readability only, they don't appear in the actual output): @smallexample (gdb) -data-list-register-values r 64 65 ^done,register-values=[@{number="64",value="0xfe00a300"@}, @{number="65",value="0x00029002"@}] (gdb) -data-list-register-values x ^done,register-values=[@{number="0",value="0xfe0043c8"@}, @{number="1",value="0x3fff88"@},@{number="2",value="0xfffffffe"@}, @{number="3",value="0x0"@},@{number="4",value="0xa"@}, @{number="5",value="0x3fff68"@},@{number="6",value="0x3fff58"@}, @{number="7",value="0xfe011e98"@},@{number="8",value="0x2"@}, @{number="9",value="0xfa202820"@},@{number="10",value="0xfa202808"@}, @{number="11",value="0x1"@},@{number="12",value="0x0"@}, @{number="13",value="0x4544"@},@{number="14",value="0xffdfffff"@}, @{number="15",value="0xffffffff"@},@{number="16",value="0xfffffeff"@}, @{number="17",value="0xefffffed"@},@{number="18",value="0xfffffffe"@}, @{number="19",value="0xffffffff"@},@{number="20",value="0xffffffff"@}, @{number="21",value="0xffffffff"@},@{number="22",value="0xfffffff7"@}, @{number="23",value="0xffffffff"@},@{number="24",value="0xffffffff"@}, @{number="25",value="0xffffffff"@},@{number="26",value="0xfffffffb"@}, @{number="27",value="0xffffffff"@},@{number="28",value="0xf7bfffff"@}, @{number="29",value="0x0"@},@{number="30",value="0xfe010000"@}, @{number="31",value="0x0"@},@{number="32",value="0x0"@}, @{number="33",value="0x0"@},@{number="34",value="0x0"@}, @{number="35",value="0x0"@},@{number="36",value="0x0"@}, @{number="37",value="0x0"@},@{number="38",value="0x0"@}, @{number="39",value="0x0"@},@{number="40",value="0x0"@}, @{number="41",value="0x0"@},@{number="42",value="0x0"@}, @{number="43",value="0x0"@},@{number="44",value="0x0"@}, @{number="45",value="0x0"@},@{number="46",value="0x0"@}, @{number="47",value="0x0"@},@{number="48",value="0x0"@}, @{number="49",value="0x0"@},@{number="50",value="0x0"@}, @{number="51",value="0x0"@},@{number="52",value="0x0"@}, @{number="53",value="0x0"@},@{number="54",value="0x0"@}, @{number="55",value="0x0"@},@{number="56",value="0x0"@}, @{number="57",value="0x0"@},@{number="58",value="0x0"@}, @{number="59",value="0x0"@},@{number="60",value="0x0"@}, @{number="61",value="0x0"@},@{number="62",value="0x0"@}, @{number="63",value="0x0"@},@{number="64",value="0xfe00a300"@}, @{number="65",value="0x29002"@},@{number="66",value="0x202f04b5"@}, @{number="67",value="0xfe0043b0"@},@{number="68",value="0xfe00b3e4"@}, @{number="69",value="0x20002b03"@}] (gdb) @end smallexample @subheading The @code{-data-read-memory} Command @findex -data-read-memory This command is deprecated, use @code{-data-read-memory-bytes} instead. @subsubheading Synopsis @smallexample -data-read-memory [ -o @var{byte-offset} ] @var{address} @var{word-format} @var{word-size} @var{nr-rows} @var{nr-cols} [ @var{aschar} ] @end smallexample @noindent where: @table @samp @item @var{address} An expression specifying the address of the first memory word to be read. Complex expressions containing embedded white space should be quoted using the C convention. @item @var{word-format} The format to be used to print the memory words. The notation is the same as for @value{GDBN}'s @code{print} command (@pxref{Output Formats, ,Output Formats}). @item @var{word-size} The size of each memory word in bytes. @item @var{nr-rows} The number of rows in the output table. @item @var{nr-cols} The number of columns in the output table. @item @var{aschar} If present, indicates that each row should include an @sc{ascii} dump. The value of @var{aschar} is used as a padding character when a byte is not a member of the printable @sc{ascii} character set (printable @sc{ascii} characters are those whose code is between 32 and 126, inclusively). @item @var{byte-offset} An offset to add to the @var{address} before fetching memory. @end table This command displays memory contents as a table of @var{nr-rows} by @var{nr-cols} words, each word being @var{word-size} bytes. In total, @code{@var{nr-rows} * @var{nr-cols} * @var{word-size}} bytes are read (returned as @samp{total-bytes}). Should less than the requested number of bytes be returned by the target, the missing words are identified using @samp{N/A}. The number of bytes read from the target is returned in @samp{nr-bytes} and the starting address used to read memory in @samp{addr}. The address of the next/previous row or page is available in @samp{next-row} and @samp{prev-row}, @samp{next-page} and @samp{prev-page}. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{x}. @code{gdbtk} has @samp{gdb_get_mem} memory read command. @subsubheading Example Read six bytes of memory starting at @code{bytes+6} but then offset by @code{-6} bytes. Format as three rows of two columns. One byte per word. Display each word in hex. @smallexample (gdb) 9-data-read-memory -o -6 -- bytes+6 x 1 3 2 9^done,addr="0x00001390",nr-bytes="6",total-bytes="6", next-row="0x00001396",prev-row="0x0000138e",next-page="0x00001396", prev-page="0x0000138a",memory=[ @{addr="0x00001390",data=["0x00","0x01"]@}, @{addr="0x00001392",data=["0x02","0x03"]@}, @{addr="0x00001394",data=["0x04","0x05"]@}] (gdb) @end smallexample Read two bytes of memory starting at address @code{shorts + 64} and display as a single word formatted in decimal. @smallexample (gdb) 5-data-read-memory shorts+64 d 2 1 1 5^done,addr="0x00001510",nr-bytes="2",total-bytes="2", next-row="0x00001512",prev-row="0x0000150e", next-page="0x00001512",prev-page="0x0000150e",memory=[ @{addr="0x00001510",data=["128"]@}] (gdb) @end smallexample Read thirty two bytes of memory starting at @code{bytes+16} and format as eight rows of four columns. Include a string encoding with @samp{x} used as the non-printable character. @smallexample (gdb) 4-data-read-memory bytes+16 x 1 8 4 x 4^done,addr="0x000013a0",nr-bytes="32",total-bytes="32", next-row="0x000013c0",prev-row="0x0000139c", next-page="0x000013c0",prev-page="0x00001380",memory=[ @{addr="0x000013a0",data=["0x10","0x11","0x12","0x13"],ascii="xxxx"@}, @{addr="0x000013a4",data=["0x14","0x15","0x16","0x17"],ascii="xxxx"@}, @{addr="0x000013a8",data=["0x18","0x19","0x1a","0x1b"],ascii="xxxx"@}, @{addr="0x000013ac",data=["0x1c","0x1d","0x1e","0x1f"],ascii="xxxx"@}, @{addr="0x000013b0",data=["0x20","0x21","0x22","0x23"],ascii=" !\"#"@}, @{addr="0x000013b4",data=["0x24","0x25","0x26","0x27"],ascii="$%&'"@}, @{addr="0x000013b8",data=["0x28","0x29","0x2a","0x2b"],ascii="()*+"@}, @{addr="0x000013bc",data=["0x2c","0x2d","0x2e","0x2f"],ascii=",-./"@}] (gdb) @end smallexample @subheading The @code{-data-read-memory-bytes} Command @findex -data-read-memory-bytes @subsubheading Synopsis @smallexample -data-read-memory-bytes [ -o @var{byte-offset} ] @var{address} @var{count} @end smallexample @noindent where: @table @samp @item @var{address} An expression specifying the address of the first memory word to be read. Complex expressions containing embedded white space should be quoted using the C convention. @item @var{count} The number of bytes to read. This should be an integer literal. @item @var{byte-offset} The offsets in bytes relative to @var{address} at which to start reading. This should be an integer literal. This option is provided so that a frontend is not required to first evaluate address and then perform address arithmetics itself. @end table This command attempts to read all accessible memory regions in the specified range. First, all regions marked as unreadable in the memory map (if one is defined) will be skipped. @xref{Memory Region Attributes}. Second, @value{GDBN} will attempt to read the remaining regions. For each one, if reading full region results in an errors, @value{GDBN} will try to read a subset of the region. In general, every single byte in the region may be readable or not, and the only way to read every readable byte is to try a read at every address, which is not practical. Therefore, @value{GDBN} will attempt to read all accessible bytes at either beginning or the end of the region, using a binary division scheme. This heuristic works well for reading accross a memory map boundary. Note that if a region has a readable range that is neither at the beginning or the end, @value{GDBN} will not read it. The result record (@pxref{GDB/MI Result Records}) that is output of the command includes a field named @samp{memory} whose content is a list of tuples. Each tuple represent a successfully read memory block and has the following fields: @table @code @item begin The start address of the memory block, as hexadecimal literal. @item end The end address of the memory block, as hexadecimal literal. @item offset The offset of the memory block, as hexadecimal literal, relative to the start address passed to @code{-data-read-memory-bytes}. @item contents The contents of the memory block, in hex. @end table @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{x}. @subsubheading Example @smallexample (gdb) -data-read-memory-bytes &a 10 ^done,memory=[@{begin="0xbffff154",offset="0x00000000", end="0xbffff15e", contents="01000000020000000300"@}] (gdb) @end smallexample @subheading The @code{-data-write-memory-bytes} Command @findex -data-write-memory-bytes @subsubheading Synopsis @smallexample -data-write-memory-bytes @var{address} @var{contents} -data-write-memory-bytes @var{address} @var{contents} @r{[}@var{count}@r{]} @end smallexample @noindent where: @table @samp @item @var{address} An expression specifying the address of the first memory word to be read. Complex expressions containing embedded white space should be quoted using the C convention. @item @var{contents} The hex-encoded bytes to write. @item @var{count} Optional argument indicating the number of bytes to be written. If @var{count} is greater than @var{contents}' length, @value{GDBN} will repeatedly write @var{contents} until it fills @var{count} bytes. @end table @subsubheading @value{GDBN} Command There's no corresponding @value{GDBN} command. @subsubheading Example @smallexample (gdb) -data-write-memory-bytes &a "aabbccdd" ^done (gdb) @end smallexample @smallexample (gdb) -data-write-memory-bytes &a "aabbccdd" 16e ^done (gdb) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Tracepoint Commands @section @sc{gdb/mi} Tracepoint Commands The commands defined in this section implement MI support for tracepoints. For detailed introduction, see @ref{Tracepoints}. @subheading The @code{-trace-find} Command @findex -trace-find @subsubheading Synopsis @smallexample -trace-find @var{mode} [@var{parameters}@dots{}] @end smallexample Find a trace frame using criteria defined by @var{mode} and @var{parameters}. The following table lists permissible modes and their parameters. For details of operation, see @ref{tfind}. @table @samp @item none No parameters are required. Stops examining trace frames. @item frame-number An integer is required as parameter. Selects tracepoint frame with that index. @item tracepoint-number An integer is required as parameter. Finds next trace frame that corresponds to tracepoint with the specified number. @item pc An address is required as parameter. Finds next trace frame that corresponds to any tracepoint at the specified address. @item pc-inside-range Two addresses are required as parameters. Finds next trace frame that corresponds to a tracepoint at an address inside the specified range. Both bounds are considered to be inside the range. @item pc-outside-range Two addresses are required as parameters. Finds next trace frame that corresponds to a tracepoint at an address outside the specified range. Both bounds are considered to be inside the range. @item line Line specification is required as parameter. @xref{Specify Location}. Finds next trace frame that corresponds to a tracepoint at the specified location. @end table If @samp{none} was passed as @var{mode}, the response does not have fields. Otherwise, the response may have the following fields: @table @samp @item found This field has either @samp{0} or @samp{1} as the value, depending on whether a matching tracepoint was found. @item traceframe The index of the found traceframe. This field is present iff the @samp{found} field has value of @samp{1}. @item tracepoint The index of the found tracepoint. This field is present iff the @samp{found} field has value of @samp{1}. @item frame The information about the frame corresponding to the found trace frame. This field is present only if a trace frame was found. @xref{GDB/MI Frame Information}, for description of this field. @end table @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{tfind}. @subheading -trace-define-variable @findex -trace-define-variable @subsubheading Synopsis @smallexample -trace-define-variable @var{name} [ @var{value} ] @end smallexample Create trace variable @var{name} if it does not exist. If @var{value} is specified, sets the initial value of the specified trace variable to that value. Note that the @var{name} should start with the @samp{$} character. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{tvariable}. @subheading -trace-list-variables @findex -trace-list-variables @subsubheading Synopsis @smallexample -trace-list-variables @end smallexample Return a table of all defined trace variables. Each element of the table has the following fields: @table @samp @item name The name of the trace variable. This field is always present. @item initial The initial value. This is a 64-bit signed integer. This field is always present. @item current The value the trace variable has at the moment. This is a 64-bit signed integer. This field is absent iff current value is not defined, for example if the trace was never run, or is presently running. @end table @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{tvariables}. @subsubheading Example @smallexample (gdb) -trace-list-variables ^done,trace-variables=@{nr_rows="1",nr_cols="3", hdr=[@{width="15",alignment="-1",col_name="name",colhdr="Name"@}, @{width="11",alignment="-1",col_name="initial",colhdr="Initial"@}, @{width="11",alignment="-1",col_name="current",colhdr="Current"@}], body=[variable=@{name="$trace_timestamp",initial="0"@} variable=@{name="$foo",initial="10",current="15"@}]@} (gdb) @end smallexample @subheading -trace-save @findex -trace-save @subsubheading Synopsis @smallexample -trace-save [-r ] @var{filename} @end smallexample Saves the collected trace data to @var{filename}. Without the @samp{-r} option, the data is downloaded from the target and saved in a local file. With the @samp{-r} option the target is asked to perform the save. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{tsave}. @subheading -trace-start @findex -trace-start @subsubheading Synopsis @smallexample -trace-start @end smallexample Starts a tracing experiments. The result of this command does not have any fields. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{tstart}. @subheading -trace-status @findex -trace-status @subsubheading Synopsis @smallexample -trace-status @end smallexample Obtains the status of a tracing experiment. The result may include the following fields: @table @samp @item supported May have a value of either @samp{0}, when no tracing operations are supported, @samp{1}, when all tracing operations are supported, or @samp{file} when examining trace file. In the latter case, examining of trace frame is possible but new tracing experiement cannot be started. This field is always present. @item running May have a value of either @samp{0} or @samp{1} depending on whether tracing experiement is in progress on target. This field is present if @samp{supported} field is not @samp{0}. @item stop-reason Report the reason why the tracing was stopped last time. This field may be absent iff tracing was never stopped on target yet. The value of @samp{request} means the tracing was stopped as result of the @code{-trace-stop} command. The value of @samp{overflow} means the tracing buffer is full. The value of @samp{disconnection} means tracing was automatically stopped when @value{GDBN} has disconnected. The value of @samp{passcount} means tracing was stopped when a tracepoint was passed a maximal number of times for that tracepoint. This field is present if @samp{supported} field is not @samp{0}. @item stopping-tracepoint The number of tracepoint whose passcount as exceeded. This field is present iff the @samp{stop-reason} field has the value of @samp{passcount}. @item frames @itemx frames-created The @samp{frames} field is a count of the total number of trace frames in the trace buffer, while @samp{frames-created} is the total created during the run, including ones that were discarded, such as when a circular trace buffer filled up. Both fields are optional. @item buffer-size @itemx buffer-free These fields tell the current size of the tracing buffer and the remaining space. These fields are optional. @item circular The value of the circular trace buffer flag. @code{1} means that the trace buffer is circular and old trace frames will be discarded if necessary to make room, @code{0} means that the trace buffer is linear and may fill up. @item disconnected The value of the disconnected tracing flag. @code{1} means that tracing will continue after @value{GDBN} disconnects, @code{0} means that the trace run will stop. @item trace-file The filename of the trace file being examined. This field is optional, and only present when examining a trace file. @end table @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{tstatus}. @subheading -trace-stop @findex -trace-stop @subsubheading Synopsis @smallexample -trace-stop @end smallexample Stops a tracing experiment. The result of this command has the same fields as @code{-trace-status}, except that the @samp{supported} and @samp{running} fields are not output. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{tstop}. @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Symbol Query @section @sc{gdb/mi} Symbol Query Commands @ignore @subheading The @code{-symbol-info-address} Command @findex -symbol-info-address @subsubheading Synopsis @smallexample -symbol-info-address @var{symbol} @end smallexample Describe where @var{symbol} is stored. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{info address}. @subsubheading Example N.A. @subheading The @code{-symbol-info-file} Command @findex -symbol-info-file @subsubheading Synopsis @smallexample -symbol-info-file @end smallexample Show the file for the symbol. @subsubheading @value{GDBN} Command There's no equivalent @value{GDBN} command. @code{gdbtk} has @samp{gdb_find_file}. @subsubheading Example N.A. @subheading The @code{-symbol-info-function} Command @findex -symbol-info-function @subsubheading Synopsis @smallexample -symbol-info-function @end smallexample Show which function the symbol lives in. @subsubheading @value{GDBN} Command @samp{gdb_get_function} in @code{gdbtk}. @subsubheading Example N.A. @subheading The @code{-symbol-info-line} Command @findex -symbol-info-line @subsubheading Synopsis @smallexample -symbol-info-line @end smallexample Show the core addresses of the code for a source line. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{info line}. @code{gdbtk} has the @samp{gdb_get_line} and @samp{gdb_get_file} commands. @subsubheading Example N.A. @subheading The @code{-symbol-info-symbol} Command @findex -symbol-info-symbol @subsubheading Synopsis @smallexample -symbol-info-symbol @var{addr} @end smallexample Describe what symbol is at location @var{addr}. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{info symbol}. @subsubheading Example N.A. @subheading The @code{-symbol-list-functions} Command @findex -symbol-list-functions @subsubheading Synopsis @smallexample -symbol-list-functions @end smallexample List the functions in the executable. @subsubheading @value{GDBN} Command @samp{info functions} in @value{GDBN}, @samp{gdb_listfunc} and @samp{gdb_search} in @code{gdbtk}. @subsubheading Example N.A. @end ignore @subheading The @code{-symbol-list-lines} Command @findex -symbol-list-lines @subsubheading Synopsis @smallexample -symbol-list-lines @var{filename} @end smallexample Print the list of lines that contain code and their associated program addresses for the given source filename. The entries are sorted in ascending PC order. @subsubheading @value{GDBN} Command There is no corresponding @value{GDBN} command. @subsubheading Example @smallexample (gdb) -symbol-list-lines basics.c ^done,lines=[@{pc="0x08048554",line="7"@},@{pc="0x0804855a",line="8"@}] (gdb) @end smallexample @ignore @subheading The @code{-symbol-list-types} Command @findex -symbol-list-types @subsubheading Synopsis @smallexample -symbol-list-types @end smallexample List all the type names. @subsubheading @value{GDBN} Command The corresponding commands are @samp{info types} in @value{GDBN}, @samp{gdb_search} in @code{gdbtk}. @subsubheading Example N.A. @subheading The @code{-symbol-list-variables} Command @findex -symbol-list-variables @subsubheading Synopsis @smallexample -symbol-list-variables @end smallexample List all the global and static variable names. @subsubheading @value{GDBN} Command @samp{info variables} in @value{GDBN}, @samp{gdb_search} in @code{gdbtk}. @subsubheading Example N.A. @subheading The @code{-symbol-locate} Command @findex -symbol-locate @subsubheading Synopsis @smallexample -symbol-locate @end smallexample @subsubheading @value{GDBN} Command @samp{gdb_loc} in @code{gdbtk}. @subsubheading Example N.A. @subheading The @code{-symbol-type} Command @findex -symbol-type @subsubheading Synopsis @smallexample -symbol-type @var{variable} @end smallexample Show type of @var{variable}. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{ptype}, @code{gdbtk} has @samp{gdb_obj_variable}. @subsubheading Example N.A. @end ignore @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI File Commands @section @sc{gdb/mi} File Commands This section describes the GDB/MI commands to specify executable file names and to read in and obtain symbol table information. @subheading The @code{-file-exec-and-symbols} Command @findex -file-exec-and-symbols @subsubheading Synopsis @smallexample -file-exec-and-symbols @var{file} @end smallexample Specify the executable file to be debugged. This file is the one from which the symbol table is also read. If no file is specified, the command clears the executable and symbol information. If breakpoints are set when using this command with no arguments, @value{GDBN} will produce error messages. Otherwise, no output is produced, except a completion notification. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{file}. @subsubheading Example @smallexample (gdb) -file-exec-and-symbols /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx ^done (gdb) @end smallexample @subheading The @code{-file-exec-file} Command @findex -file-exec-file @subsubheading Synopsis @smallexample -file-exec-file @var{file} @end smallexample Specify the executable file to be debugged. Unlike @samp{-file-exec-and-symbols}, the symbol table is @emph{not} read from this file. If used without argument, @value{GDBN} clears the information about the executable file. No output is produced, except a completion notification. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{exec-file}. @subsubheading Example @smallexample (gdb) -file-exec-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx ^done (gdb) @end smallexample @ignore @subheading The @code{-file-list-exec-sections} Command @findex -file-list-exec-sections @subsubheading Synopsis @smallexample -file-list-exec-sections @end smallexample List the sections of the current executable file. @subsubheading @value{GDBN} Command The @value{GDBN} command @samp{info file} shows, among the rest, the same information as this command. @code{gdbtk} has a corresponding command @samp{gdb_load_info}. @subsubheading Example N.A. @end ignore @subheading The @code{-file-list-exec-source-file} Command @findex -file-list-exec-source-file @subsubheading Synopsis @smallexample -file-list-exec-source-file @end smallexample List the line number, the current source file, and the absolute path to the current source file for the current executable. The macro information field has a value of @samp{1} or @samp{0} depending on whether or not the file includes preprocessor macro information. @subsubheading @value{GDBN} Command The @value{GDBN} equivalent is @samp{info source} @subsubheading Example @smallexample (gdb) 123-file-list-exec-source-file 123^done,line="1",file="foo.c",fullname="/home/bar/foo.c,macro-info="1" (gdb) @end smallexample @subheading The @code{-file-list-exec-source-files} Command @findex -file-list-exec-source-files @subsubheading Synopsis @smallexample -file-list-exec-source-files @end smallexample List the source files for the current executable. It will always output both the filename and fullname (absolute file name) of a source file. @subsubheading @value{GDBN} Command The @value{GDBN} equivalent is @samp{info sources}. @code{gdbtk} has an analogous command @samp{gdb_listfiles}. @subsubheading Example @smallexample (gdb) -file-list-exec-source-files ^done,files=[ @{file=foo.c,fullname=/home/foo.c@}, @{file=/home/bar.c,fullname=/home/bar.c@}, @{file=gdb_could_not_find_fullpath.c@}] (gdb) @end smallexample @ignore @subheading The @code{-file-list-shared-libraries} Command @findex -file-list-shared-libraries @subsubheading Synopsis @smallexample -file-list-shared-libraries @end smallexample List the shared libraries in the program. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{info shared}. @subsubheading Example N.A. @subheading The @code{-file-list-symbol-files} Command @findex -file-list-symbol-files @subsubheading Synopsis @smallexample -file-list-symbol-files @end smallexample List symbol files. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{info file} (part of it). @subsubheading Example N.A. @end ignore @subheading The @code{-file-symbol-file} Command @findex -file-symbol-file @subsubheading Synopsis @smallexample -file-symbol-file @var{file} @end smallexample Read symbol table info from the specified @var{file} argument. When used without arguments, clears @value{GDBN}'s symbol table info. No output is produced, except for a completion notification. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{symbol-file}. @subsubheading Example @smallexample (gdb) -file-symbol-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx ^done (gdb) @end smallexample @ignore @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Memory Overlay Commands @section @sc{gdb/mi} Memory Overlay Commands The memory overlay commands are not implemented. @c @subheading -overlay-auto @c @subheading -overlay-list-mapping-state @c @subheading -overlay-list-overlays @c @subheading -overlay-map @c @subheading -overlay-off @c @subheading -overlay-on @c @subheading -overlay-unmap @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Signal Handling Commands @section @sc{gdb/mi} Signal Handling Commands Signal handling commands are not implemented. @c @subheading -signal-handle @c @subheading -signal-list-handle-actions @c @subheading -signal-list-signal-types @end ignore @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Target Manipulation @section @sc{gdb/mi} Target Manipulation Commands @subheading The @code{-target-attach} Command @findex -target-attach @subsubheading Synopsis @smallexample -target-attach @var{pid} | @var{gid} | @var{file} @end smallexample Attach to a process @var{pid} or a file @var{file} outside of @value{GDBN}, or a thread group @var{gid}. If attaching to a thread group, the id previously returned by @samp{-list-thread-groups --available} must be used. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{attach}. @subsubheading Example @smallexample (gdb) -target-attach 34 =thread-created,id="1" *stopped,thread-id="1",frame=@{addr="0xb7f7e410",func="bar",args=[]@} ^done (gdb) @end smallexample @ignore @subheading The @code{-target-compare-sections} Command @findex -target-compare-sections @subsubheading Synopsis @smallexample -target-compare-sections [ @var{section} ] @end smallexample Compare data of section @var{section} on target to the exec file. Without the argument, all sections are compared. @subsubheading @value{GDBN} Command The @value{GDBN} equivalent is @samp{compare-sections}. @subsubheading Example N.A. @end ignore @subheading The @code{-target-detach} Command @findex -target-detach @subsubheading Synopsis @smallexample -target-detach [ @var{pid} | @var{gid} ] @end smallexample Detach from the remote target which normally resumes its execution. If either @var{pid} or @var{gid} is specified, detaches from either the specified process, or specified thread group. There's no output. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{detach}. @subsubheading Example @smallexample (gdb) -target-detach ^done (gdb) @end smallexample @subheading The @code{-target-disconnect} Command @findex -target-disconnect @subsubheading Synopsis @smallexample -target-disconnect @end smallexample Disconnect from the remote target. There's no output and the target is generally not resumed. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{disconnect}. @subsubheading Example @smallexample (gdb) -target-disconnect ^done (gdb) @end smallexample @subheading The @code{-target-download} Command @findex -target-download @subsubheading Synopsis @smallexample -target-download @end smallexample Loads the executable onto the remote target. It prints out an update message every half second, which includes the fields: @table @samp @item section The name of the section. @item section-sent The size of what has been sent so far for that section. @item section-size The size of the section. @item total-sent The total size of what was sent so far (the current and the previous sections). @item total-size The size of the overall executable to download. @end table @noindent Each message is sent as status record (@pxref{GDB/MI Output Syntax, , @sc{gdb/mi} Output Syntax}). In addition, it prints the name and size of the sections, as they are downloaded. These messages include the following fields: @table @samp @item section The name of the section. @item section-size The size of the section. @item total-size The size of the overall executable to download. @end table @noindent At the end, a summary is printed. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{load}. @subsubheading Example Note: each status message appears on a single line. Here the messages have been broken down so that they can fit onto a page. @smallexample (gdb) -target-download +download,@{section=".text",section-size="6668",total-size="9880"@} +download,@{section=".text",section-sent="512",section-size="6668", total-sent="512",total-size="9880"@} +download,@{section=".text",section-sent="1024",section-size="6668", total-sent="1024",total-size="9880"@} +download,@{section=".text",section-sent="1536",section-size="6668", total-sent="1536",total-size="9880"@} +download,@{section=".text",section-sent="2048",section-size="6668", total-sent="2048",total-size="9880"@} +download,@{section=".text",section-sent="2560",section-size="6668", total-sent="2560",total-size="9880"@} +download,@{section=".text",section-sent="3072",section-size="6668", total-sent="3072",total-size="9880"@} +download,@{section=".text",section-sent="3584",section-size="6668", total-sent="3584",total-size="9880"@} +download,@{section=".text",section-sent="4096",section-size="6668", total-sent="4096",total-size="9880"@} +download,@{section=".text",section-sent="4608",section-size="6668", total-sent="4608",total-size="9880"@} +download,@{section=".text",section-sent="5120",section-size="6668", total-sent="5120",total-size="9880"@} +download,@{section=".text",section-sent="5632",section-size="6668", total-sent="5632",total-size="9880"@} +download,@{section=".text",section-sent="6144",section-size="6668", total-sent="6144",total-size="9880"@} +download,@{section=".text",section-sent="6656",section-size="6668", total-sent="6656",total-size="9880"@} +download,@{section=".init",section-size="28",total-size="9880"@} +download,@{section=".fini",section-size="28",total-size="9880"@} +download,@{section=".data",section-size="3156",total-size="9880"@} +download,@{section=".data",section-sent="512",section-size="3156", total-sent="7236",total-size="9880"@} +download,@{section=".data",section-sent="1024",section-size="3156", total-sent="7748",total-size="9880"@} +download,@{section=".data",section-sent="1536",section-size="3156", total-sent="8260",total-size="9880"@} +download,@{section=".data",section-sent="2048",section-size="3156", total-sent="8772",total-size="9880"@} +download,@{section=".data",section-sent="2560",section-size="3156", total-sent="9284",total-size="9880"@} +download,@{section=".data",section-sent="3072",section-size="3156", total-sent="9796",total-size="9880"@} ^done,address="0x10004",load-size="9880",transfer-rate="6586", write-rate="429" (gdb) @end smallexample @ignore @subheading The @code{-target-exec-status} Command @findex -target-exec-status @subsubheading Synopsis @smallexample -target-exec-status @end smallexample Provide information on the state of the target (whether it is running or not, for instance). @subsubheading @value{GDBN} Command There's no equivalent @value{GDBN} command. @subsubheading Example N.A. @subheading The @code{-target-list-available-targets} Command @findex -target-list-available-targets @subsubheading Synopsis @smallexample -target-list-available-targets @end smallexample List the possible targets to connect to. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{help target}. @subsubheading Example N.A. @subheading The @code{-target-list-current-targets} Command @findex -target-list-current-targets @subsubheading Synopsis @smallexample -target-list-current-targets @end smallexample Describe the current target. @subsubheading @value{GDBN} Command The corresponding information is printed by @samp{info file} (among other things). @subsubheading Example N.A. @subheading The @code{-target-list-parameters} Command @findex -target-list-parameters @subsubheading Synopsis @smallexample -target-list-parameters @end smallexample @c ???? @end ignore @subsubheading @value{GDBN} Command No equivalent. @subsubheading Example N.A. @subheading The @code{-target-select} Command @findex -target-select @subsubheading Synopsis @smallexample -target-select @var{type} @var{parameters @dots{}} @end smallexample Connect @value{GDBN} to the remote target. This command takes two args: @table @samp @item @var{type} The type of target, for instance @samp{remote}, etc. @item @var{parameters} Device names, host names and the like. @xref{Target Commands, , Commands for Managing Targets}, for more details. @end table The output is a connection notification, followed by the address at which the target program is, in the following form: @smallexample ^connected,addr="@var{address}",func="@var{function name}", args=[@var{arg list}] @end smallexample @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{target}. @subsubheading Example @smallexample (gdb) -target-select remote /dev/ttya ^connected,addr="0xfe00a300",func="??",args=[] (gdb) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI File Transfer Commands @section @sc{gdb/mi} File Transfer Commands @subheading The @code{-target-file-put} Command @findex -target-file-put @subsubheading Synopsis @smallexample -target-file-put @var{hostfile} @var{targetfile} @end smallexample Copy file @var{hostfile} from the host system (the machine running @value{GDBN}) to @var{targetfile} on the target system. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{remote put}. @subsubheading Example @smallexample (gdb) -target-file-put localfile remotefile ^done (gdb) @end smallexample @subheading The @code{-target-file-get} Command @findex -target-file-get @subsubheading Synopsis @smallexample -target-file-get @var{targetfile} @var{hostfile} @end smallexample Copy file @var{targetfile} from the target system to @var{hostfile} on the host system. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{remote get}. @subsubheading Example @smallexample (gdb) -target-file-get remotefile localfile ^done (gdb) @end smallexample @subheading The @code{-target-file-delete} Command @findex -target-file-delete @subsubheading Synopsis @smallexample -target-file-delete @var{targetfile} @end smallexample Delete @var{targetfile} from the target system. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{remote delete}. @subsubheading Example @smallexample (gdb) -target-file-delete remotefile ^done (gdb) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node GDB/MI Miscellaneous Commands @section Miscellaneous @sc{gdb/mi} Commands @c @subheading -gdb-complete @subheading The @code{-gdb-exit} Command @findex -gdb-exit @subsubheading Synopsis @smallexample -gdb-exit @end smallexample Exit @value{GDBN} immediately. @subsubheading @value{GDBN} Command Approximately corresponds to @samp{quit}. @subsubheading Example @smallexample (gdb) -gdb-exit ^exit @end smallexample @ignore @subheading The @code{-exec-abort} Command @findex -exec-abort @subsubheading Synopsis @smallexample -exec-abort @end smallexample Kill the inferior running program. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{kill}. @subsubheading Example N.A. @end ignore @subheading The @code{-gdb-set} Command @findex -gdb-set @subsubheading Synopsis @smallexample -gdb-set @end smallexample Set an internal @value{GDBN} variable. @c IS THIS A DOLLAR VARIABLE? OR SOMETHING LIKE ANNOTATE ????? @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{set}. @subsubheading Example @smallexample (gdb) -gdb-set $foo=3 ^done (gdb) @end smallexample @subheading The @code{-gdb-show} Command @findex -gdb-show @subsubheading Synopsis @smallexample -gdb-show @end smallexample Show the current value of a @value{GDBN} variable. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{show}. @subsubheading Example @smallexample (gdb) -gdb-show annotate ^done,value="0" (gdb) @end smallexample @c @subheading -gdb-source @subheading The @code{-gdb-version} Command @findex -gdb-version @subsubheading Synopsis @smallexample -gdb-version @end smallexample Show version information for @value{GDBN}. Used mostly in testing. @subsubheading @value{GDBN} Command The @value{GDBN} equivalent is @samp{show version}. @value{GDBN} by default shows this information when you start an interactive session. @subsubheading Example @c This example modifies the actual output from GDB to avoid overfull @c box in TeX. @smallexample (gdb) -gdb-version ~GNU gdb 5.2.1 ~Copyright 2000 Free Software Foundation, Inc. ~GDB is free software, covered by the GNU General Public License, and ~you are welcome to change it and/or distribute copies of it under ~ certain conditions. ~Type "show copying" to see the conditions. ~There is absolutely no warranty for GDB. Type "show warranty" for ~ details. ~This GDB was configured as "--host=sparc-sun-solaris2.5.1 --target=ppc-eabi". ^done (gdb) @end smallexample @subheading The @code{-list-features} Command @findex -list-features Returns a list of particular features of the MI protocol that this version of gdb implements. A feature can be a command, or a new field in an output of some command, or even an important bugfix. While a frontend can sometimes detect presence of a feature at runtime, it is easier to perform detection at debugger startup. The command returns a list of strings, with each string naming an available feature. Each returned string is just a name, it does not have any internal structure. The list of possible feature names is given below. Example output: @smallexample (gdb) -list-features ^done,result=["feature1","feature2"] @end smallexample The current list of features is: @table @samp @item frozen-varobjs Indicates support for the @code{-var-set-frozen} command, as well as possible presense of the @code{frozen} field in the output of @code{-varobj-create}. @item pending-breakpoints Indicates support for the @option{-f} option to the @code{-break-insert} command. @item python Indicates Python scripting support, Python-based pretty-printing commands, and possible presence of the @samp{display_hint} field in the output of @code{-var-list-children} @item thread-info Indicates support for the @code{-thread-info} command. @item data-read-memory-bytes Indicates support for the @code{-data-read-memory-bytes} and the @code{-data-write-memory-bytes} commands. @item breakpoint-notifications Indicates that changes to breakpoints and breakpoints created via the CLI will be announced via async records. @item ada-task-info Indicates support for the @code{-ada-task-info} command. @end table @subheading The @code{-list-target-features} Command @findex -list-target-features Returns a list of particular features that are supported by the target. Those features affect the permitted MI commands, but unlike the features reported by the @code{-list-features} command, the features depend on which target GDB is using at the moment. Whenever a target can change, due to commands such as @code{-target-select}, @code{-target-attach} or @code{-exec-run}, the list of target features may change, and the frontend should obtain it again. Example output: @smallexample (gdb) -list-features ^done,result=["async"] @end smallexample The current list of features is: @table @samp @item async Indicates that the target is capable of asynchronous command execution, which means that @value{GDBN} will accept further commands while the target is running. @item reverse Indicates that the target is capable of reverse execution. @xref{Reverse Execution}, for more information. @end table @subheading The @code{-list-thread-groups} Command @findex -list-thread-groups @subheading Synopsis @smallexample -list-thread-groups [ --available ] [ --recurse 1 ] [ @var{group} ... ] @end smallexample Lists thread groups (@pxref{Thread groups}). When a single thread group is passed as the argument, lists the children of that group. When several thread group are passed, lists information about those thread groups. Without any parameters, lists information about all top-level thread groups. Normally, thread groups that are being debugged are reported. With the @samp{--available} option, @value{GDBN} reports thread groups available on the target. The output of this command may have either a @samp{threads} result or a @samp{groups} result. The @samp{thread} result has a list of tuples as value, with each tuple describing a thread (@pxref{GDB/MI Thread Information}). The @samp{groups} result has a list of tuples as value, each tuple describing a thread group. If top-level groups are requested (that is, no parameter is passed), or when several groups are passed, the output always has a @samp{groups} result. The format of the @samp{group} result is described below. To reduce the number of roundtrips it's possible to list thread groups together with their children, by passing the @samp{--recurse} option and the recursion depth. Presently, only recursion depth of 1 is permitted. If this option is present, then every reported thread group will also include its children, either as @samp{group} or @samp{threads} field. In general, any combination of option and parameters is permitted, with the following caveats: @itemize @bullet @item When a single thread group is passed, the output will typically be the @samp{threads} result. Because threads may not contain anything, the @samp{recurse} option will be ignored. @item When the @samp{--available} option is passed, limited information may be available. In particular, the list of threads of a process might be inaccessible. Further, specifying specific thread groups might not give any performance advantage over listing all thread groups. The frontend should assume that @samp{-list-thread-groups --available} is always an expensive operation and cache the results. @end itemize The @samp{groups} result is a list of tuples, where each tuple may have the following fields: @table @code @item id Identifier of the thread group. This field is always present. The identifier is an opaque string; frontends should not try to convert it to an integer, even though it might look like one. @item type The type of the thread group. At present, only @samp{process} is a valid type. @item pid The target-specific process identifier. This field is only present for thread groups of type @samp{process} and only if the process exists. @item num_children The number of children this thread group has. This field may be absent for an available thread group. @item threads This field has a list of tuples as value, each tuple describing a thread. It may be present if the @samp{--recurse} option is specified, and it's actually possible to obtain the threads. @item cores This field is a list of integers, each identifying a core that one thread of the group is running on. This field may be absent if such information is not available. @item executable The name of the executable file that corresponds to this thread group. The field is only present for thread groups of type @samp{process}, and only if there is a corresponding executable file. @end table @subheading Example @smallexample @value{GDBP} -list-thread-groups ^done,groups=[@{id="17",type="process",pid="yyy",num_children="2"@}] -list-thread-groups 17 ^done,threads=[@{id="2",target-id="Thread 0xb7e14b90 (LWP 21257)", frame=@{level="0",addr="0xffffe410",func="__kernel_vsyscall",args=[]@},state="running"@}, @{id="1",target-id="Thread 0xb7e156b0 (LWP 21254)", frame=@{level="0",addr="0x0804891f",func="foo",args=[@{name="i",value="10"@}], file="/tmp/a.c",fullname="/tmp/a.c",line="158"@},state="running"@}]] -list-thread-groups --available ^done,groups=[@{id="17",type="process",pid="yyy",num_children="2",cores=[1,2]@}] -list-thread-groups --available --recurse 1 ^done,groups=[@{id="17", types="process",pid="yyy",num_children="2",cores=[1,2], threads=[@{id="1",target-id="Thread 0xb7e14b90",cores=[1]@}, @{id="2",target-id="Thread 0xb7e14b90",cores=[2]@}]@},..] -list-thread-groups --available --recurse 1 17 18 ^done,groups=[@{id="17", types="process",pid="yyy",num_children="2",cores=[1,2], threads=[@{id="1",target-id="Thread 0xb7e14b90",cores=[1]@}, @{id="2",target-id="Thread 0xb7e14b90",cores=[2]@}]@},...] @end smallexample @subheading The @code{-info-os} Command @findex -info-os @subsubheading Synopsis @smallexample -info-os [ @var{type} ] @end smallexample If no argument is supplied, the command returns a table of available operating-system-specific information types. If one of these types is supplied as an argument @var{type}, then the command returns a table of data of that type. The types of information available depend on the target operating system. @subsubheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{info os}. @subsubheading Example When run on a @sc{gnu}/Linux system, the output will look something like this: @smallexample @value{GDBP} -info-os ^done,OSDataTable=@{nr_rows="9",nr_cols="3", hdr=[@{width="10",alignment="-1",col_name="col0",colhdr="Type"@}, @{width="10",alignment="-1",col_name="col1",colhdr="Description"@}, @{width="10",alignment="-1",col_name="col2",colhdr="Title"@}], body=[item=@{col0="processes",col1="Listing of all processes", col2="Processes"@}, item=@{col0="procgroups",col1="Listing of all process groups", col2="Process groups"@}, item=@{col0="threads",col1="Listing of all threads", col2="Threads"@}, item=@{col0="files",col1="Listing of all file descriptors", col2="File descriptors"@}, item=@{col0="sockets",col1="Listing of all internet-domain sockets", col2="Sockets"@}, item=@{col0="shm",col1="Listing of all shared-memory regions", col2="Shared-memory regions"@}, item=@{col0="semaphores",col1="Listing of all semaphores", col2="Semaphores"@}, item=@{col0="msg",col1="Listing of all message queues", col2="Message queues"@}, item=@{col0="modules",col1="Listing of all loaded kernel modules", col2="Kernel modules"@}]@} @value{GDBP} -info-os processes ^done,OSDataTable=@{nr_rows="190",nr_cols="4", hdr=[@{width="10",alignment="-1",col_name="col0",colhdr="pid"@}, @{width="10",alignment="-1",col_name="col1",colhdr="user"@}, @{width="10",alignment="-1",col_name="col2",colhdr="command"@}, @{width="10",alignment="-1",col_name="col3",colhdr="cores"@}], body=[item=@{col0="1",col1="root",col2="/sbin/init",col3="0"@}, item=@{col0="2",col1="root",col2="[kthreadd]",col3="1"@}, item=@{col0="3",col1="root",col2="[ksoftirqd/0]",col3="0"@}, ... item=@{col0="26446",col1="stan",col2="bash",col3="0"@}, item=@{col0="28152",col1="stan",col2="bash",col3="1"@}]@} (gdb) @end smallexample (Note that the MI output here includes a @code{"Title"} column that does not appear in command-line @code{info os}; this column is useful for MI clients that want to enumerate the types of data, such as in a popup menu, but is needless clutter on the command line, and @code{info os} omits it.) @subheading The @code{-add-inferior} Command @findex -add-inferior @subheading Synopsis @smallexample -add-inferior @end smallexample Creates a new inferior (@pxref{Inferiors and Programs}). The created inferior is not associated with any executable. Such association may be established with the @samp{-file-exec-and-symbols} command (@pxref{GDB/MI File Commands}). The command response has a single field, @samp{thread-group}, whose value is the identifier of the thread group corresponding to the new inferior. @subheading Example @smallexample @value{GDBP} -add-inferior ^done,thread-group="i3" @end smallexample @subheading The @code{-interpreter-exec} Command @findex -interpreter-exec @subheading Synopsis @smallexample -interpreter-exec @var{interpreter} @var{command} @end smallexample @anchor{-interpreter-exec} Execute the specified @var{command} in the given @var{interpreter}. @subheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{interpreter-exec}. @subheading Example @smallexample (gdb) -interpreter-exec console "break main" &"During symbol reading, couldn't parse type; debugger out of date?.\n" &"During symbol reading, bad structure-type format.\n" ~"Breakpoint 1 at 0x8074fc6: file ../../src/gdb/main.c, line 743.\n" ^done (gdb) @end smallexample @subheading The @code{-inferior-tty-set} Command @findex -inferior-tty-set @subheading Synopsis @smallexample -inferior-tty-set /dev/pts/1 @end smallexample Set terminal for future runs of the program being debugged. @subheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{set inferior-tty} /dev/pts/1. @subheading Example @smallexample (gdb) -inferior-tty-set /dev/pts/1 ^done (gdb) @end smallexample @subheading The @code{-inferior-tty-show} Command @findex -inferior-tty-show @subheading Synopsis @smallexample -inferior-tty-show @end smallexample Show terminal for future runs of program being debugged. @subheading @value{GDBN} Command The corresponding @value{GDBN} command is @samp{show inferior-tty}. @subheading Example @smallexample (gdb) -inferior-tty-set /dev/pts/1 ^done (gdb) -inferior-tty-show ^done,inferior_tty_terminal="/dev/pts/1" (gdb) @end smallexample @subheading The @code{-enable-timings} Command @findex -enable-timings @subheading Synopsis @smallexample -enable-timings [yes | no] @end smallexample Toggle the printing of the wallclock, user and system times for an MI command as a field in its output. This command is to help frontend developers optimize the performance of their code. No argument is equivalent to @samp{yes}. @subheading @value{GDBN} Command No equivalent. @subheading Example @smallexample (gdb) -enable-timings ^done (gdb) -break-insert main ^done,bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y", addr="0x080484ed",func="main",file="myprog.c", fullname="/home/nickrob/myprog.c",line="73",thread-groups=["i1"], times="0"@}, time=@{wallclock="0.05185",user="0.00800",system="0.00000"@} (gdb) -enable-timings no ^done (gdb) -exec-run ^running (gdb) *stopped,reason="breakpoint-hit",disp="keep",bkptno="1",thread-id="0", frame=@{addr="0x080484ed",func="main",args=[@{name="argc",value="1"@}, @{name="argv",value="0xbfb60364"@}],file="myprog.c", fullname="/home/nickrob/myprog.c",line="73"@} (gdb) @end smallexample @node Annotations @chapter @value{GDBN} Annotations This chapter describes annotations in @value{GDBN}. Annotations were designed to interface @value{GDBN} to graphical user interfaces or other similar programs which want to interact with @value{GDBN} at a relatively high level. The annotation mechanism has largely been superseded by @sc{gdb/mi} (@pxref{GDB/MI}). @ignore This is Edition @value{EDITION}, @value{DATE}. @end ignore @menu * Annotations Overview:: What annotations are; the general syntax. * Server Prefix:: Issuing a command without affecting user state. * Prompting:: Annotations marking @value{GDBN}'s need for input. * Errors:: Annotations for error messages. * Invalidation:: Some annotations describe things now invalid. * Annotations for Running:: Whether the program is running, how it stopped, etc. * Source Annotations:: Annotations describing source code. @end menu @node Annotations Overview @section What is an Annotation? @cindex annotations Annotations start with a newline character, two @samp{control-z} characters, and the name of the annotation. If there is no additional information associated with this annotation, the name of the annotation is followed immediately by a newline. If there is additional information, the name of the annotation is followed by a space, the additional information, and a newline. The additional information cannot contain newline characters. Any output not beginning with a newline and two @samp{control-z} characters denotes literal output from @value{GDBN}. Currently there is no need for @value{GDBN} to output a newline followed by two @samp{control-z} characters, but if there was such a need, the annotations could be extended with an @samp{escape} annotation which means those three characters as output. The annotation @var{level}, which is specified using the @option{--annotate} command line option (@pxref{Mode Options}), controls how much information @value{GDBN} prints together with its prompt, values of expressions, source lines, and other types of output. Level 0 is for no annotations, level 1 is for use when @value{GDBN} is run as a subprocess of @sc{gnu} Emacs, level 3 is the maximum annotation suitable for programs that control @value{GDBN}, and level 2 annotations have been made obsolete (@pxref{Limitations, , Limitations of the Annotation Interface, annotate, GDB's Obsolete Annotations}). @table @code @kindex set annotate @item set annotate @var{level} The @value{GDBN} command @code{set annotate} sets the level of annotations to the specified @var{level}. @item show annotate @kindex show annotate Show the current annotation level. @end table This chapter describes level 3 annotations. A simple example of starting up @value{GDBN} with annotations is: @smallexample $ @kbd{gdb --annotate=3} GNU gdb 6.0 Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-pc-linux-gnu" ^Z^Zpre-prompt (@value{GDBP}) ^Z^Zprompt @kbd{quit} ^Z^Zpost-prompt $ @end smallexample Here @samp{quit} is input to @value{GDBN}; the rest is output from @value{GDBN}. The three lines beginning @samp{^Z^Z} (where @samp{^Z} denotes a @samp{control-z} character) are annotations; the rest is output from @value{GDBN}. @node Server Prefix @section The Server Prefix @cindex server prefix If you prefix a command with @samp{server } then it will not affect the command history, nor will it affect @value{GDBN}'s notion of which command to repeat if @key{RET} is pressed on a line by itself. This means that commands can be run behind a user's back by a front-end in a transparent manner. The @code{server } prefix does not affect the recording of values into the value history; to print a value without recording it into the value history, use the @code{output} command instead of the @code{print} command. Using this prefix also disables confirmation requests (@pxref{confirmation requests}). @node Prompting @section Annotation for @value{GDBN} Input @cindex annotations for prompts When @value{GDBN} prompts for input, it annotates this fact so it is possible to know when to send output, when the output from a given command is over, etc. Different kinds of input each have a different @dfn{input type}. Each input type has three annotations: a @code{pre-} annotation, which denotes the beginning of any prompt which is being output, a plain annotation, which denotes the end of the prompt, and then a @code{post-} annotation which denotes the end of any echo which may (or may not) be associated with the input. For example, the @code{prompt} input type features the following annotations: @smallexample ^Z^Zpre-prompt ^Z^Zprompt ^Z^Zpost-prompt @end smallexample The input types are @table @code @findex pre-prompt annotation @findex prompt annotation @findex post-prompt annotation @item prompt When @value{GDBN} is prompting for a command (the main @value{GDBN} prompt). @findex pre-commands annotation @findex commands annotation @findex post-commands annotation @item commands When @value{GDBN} prompts for a set of commands, like in the @code{commands} command. The annotations are repeated for each command which is input. @findex pre-overload-choice annotation @findex overload-choice annotation @findex post-overload-choice annotation @item overload-choice When @value{GDBN} wants the user to select between various overloaded functions. @findex pre-query annotation @findex query annotation @findex post-query annotation @item query When @value{GDBN} wants the user to confirm a potentially dangerous operation. @findex pre-prompt-for-continue annotation @findex prompt-for-continue annotation @findex post-prompt-for-continue annotation @item prompt-for-continue When @value{GDBN} is asking the user to press return to continue. Note: Don't expect this to work well; instead use @code{set height 0} to disable prompting. This is because the counting of lines is buggy in the presence of annotations. @end table @node Errors @section Errors @cindex annotations for errors, warnings and interrupts @findex quit annotation @smallexample ^Z^Zquit @end smallexample This annotation occurs right before @value{GDBN} responds to an interrupt. @findex error annotation @smallexample ^Z^Zerror @end smallexample This annotation occurs right before @value{GDBN} responds to an error. Quit and error annotations indicate that any annotations which @value{GDBN} was in the middle of may end abruptly. For example, if a @code{value-history-begin} annotation is followed by a @code{error}, one cannot expect to receive the matching @code{value-history-end}. One cannot expect not to receive it either, however; an error annotation does not necessarily mean that @value{GDBN} is immediately returning all the way to the top level. @findex error-begin annotation A quit or error annotation may be preceded by @smallexample ^Z^Zerror-begin @end smallexample Any output between that and the quit or error annotation is the error message. Warning messages are not yet annotated. @c If we want to change that, need to fix warning(), type_error(), @c range_error(), and possibly other places. @node Invalidation @section Invalidation Notices @cindex annotations for invalidation messages The following annotations say that certain pieces of state may have changed. @table @code @findex frames-invalid annotation @item ^Z^Zframes-invalid The frames (for example, output from the @code{backtrace} command) may have changed. @findex breakpoints-invalid annotation @item ^Z^Zbreakpoints-invalid The breakpoints may have changed. For example, the user just added or deleted a breakpoint. @end table @node Annotations for Running @section Running the Program @cindex annotations for running programs @findex starting annotation @findex stopping annotation When the program starts executing due to a @value{GDBN} command such as @code{step} or @code{continue}, @smallexample ^Z^Zstarting @end smallexample is output. When the program stops, @smallexample ^Z^Zstopped @end smallexample is output. Before the @code{stopped} annotation, a variety of annotations describe how the program stopped. @table @code @findex exited annotation @item ^Z^Zexited @var{exit-status} The program exited, and @var{exit-status} is the exit status (zero for successful exit, otherwise nonzero). @findex signalled annotation @findex signal-name annotation @findex signal-name-end annotation @findex signal-string annotation @findex signal-string-end annotation @item ^Z^Zsignalled The program exited with a signal. After the @code{^Z^Zsignalled}, the annotation continues: @smallexample @var{intro-text} ^Z^Zsignal-name @var{name} ^Z^Zsignal-name-end @var{middle-text} ^Z^Zsignal-string @var{string} ^Z^Zsignal-string-end @var{end-text} @end smallexample @noindent where @var{name} is the name of the signal, such as @code{SIGILL} or @code{SIGSEGV}, and @var{string} is the explanation of the signal, such as @code{Illegal Instruction} or @code{Segmentation fault}. @var{intro-text}, @var{middle-text}, and @var{end-text} are for the user's benefit and have no particular format. @findex signal annotation @item ^Z^Zsignal The syntax of this annotation is just like @code{signalled}, but @value{GDBN} is just saying that the program received the signal, not that it was terminated with it. @findex breakpoint annotation @item ^Z^Zbreakpoint @var{number} The program hit breakpoint number @var{number}. @findex watchpoint annotation @item ^Z^Zwatchpoint @var{number} The program hit watchpoint number @var{number}. @end table @node Source Annotations @section Displaying Source @cindex annotations for source display @findex source annotation The following annotation is used instead of displaying source code: @smallexample ^Z^Zsource @var{filename}:@var{line}:@var{character}:@var{middle}:@var{addr} @end smallexample where @var{filename} is an absolute file name indicating which source file, @var{line} is the line number within that file (where 1 is the first line in the file), @var{character} is the character position within the file (where 0 is the first character in the file) (for most debug formats this will necessarily point to the beginning of a line), @var{middle} is @samp{middle} if @var{addr} is in the middle of the line, or @samp{beg} if @var{addr} is at the beginning of the line, and @var{addr} is the address in the target program associated with the source which is being displayed. @var{addr} is in the form @samp{0x} followed by one or more lowercase hex digits (note that this does not depend on the language). @node JIT Interface @chapter JIT Compilation Interface @cindex just-in-time compilation @cindex JIT compilation interface This chapter documents @value{GDBN}'s @dfn{just-in-time} (JIT) compilation interface. A JIT compiler is a program or library that generates native executable code at runtime and executes it, usually in order to achieve good performance while maintaining platform independence. Programs that use JIT compilation are normally difficult to debug because portions of their code are generated at runtime, instead of being loaded from object files, which is where @value{GDBN} normally finds the program's symbols and debug information. In order to debug programs that use JIT compilation, @value{GDBN} has an interface that allows the program to register in-memory symbol files with @value{GDBN} at runtime. If you are using @value{GDBN} to debug a program that uses this interface, then it should work transparently so long as you have not stripped the binary. If you are developing a JIT compiler, then the interface is documented in the rest of this chapter. At this time, the only known client of this interface is the LLVM JIT. Broadly speaking, the JIT interface mirrors the dynamic loader interface. The JIT compiler communicates with @value{GDBN} by writing data into a global variable and calling a fuction at a well-known symbol. When @value{GDBN} attaches, it reads a linked list of symbol files from the global variable to find existing code, and puts a breakpoint in the function so that it can find out about additional code. @menu * Declarations:: Relevant C struct declarations * Registering Code:: Steps to register code * Unregistering Code:: Steps to unregister code * Custom Debug Info:: Emit debug information in a custom format @end menu @node Declarations @section JIT Declarations These are the relevant struct declarations that a C program should include to implement the interface: @smallexample typedef enum @{ JIT_NOACTION = 0, JIT_REGISTER_FN, JIT_UNREGISTER_FN @} jit_actions_t; struct jit_code_entry @{ struct jit_code_entry *next_entry; struct jit_code_entry *prev_entry; const char *symfile_addr; uint64_t symfile_size; @}; struct jit_descriptor @{ uint32_t version; /* This type should be jit_actions_t, but we use uint32_t to be explicit about the bitwidth. */ uint32_t action_flag; struct jit_code_entry *relevant_entry; struct jit_code_entry *first_entry; @}; /* GDB puts a breakpoint in this function. */ void __attribute__((noinline)) __jit_debug_register_code() @{ @}; /* Make sure to specify the version statically, because the debugger may check the version before we can set it. */ struct jit_descriptor __jit_debug_descriptor = @{ 1, 0, 0, 0 @}; @end smallexample If the JIT is multi-threaded, then it is important that the JIT synchronize any modifications to this global data properly, which can easily be done by putting a global mutex around modifications to these structures. @node Registering Code @section Registering Code To register code with @value{GDBN}, the JIT should follow this protocol: @itemize @bullet @item Generate an object file in memory with symbols and other desired debug information. The file must include the virtual addresses of the sections. @item Create a code entry for the file, which gives the start and size of the symbol file. @item Add it to the linked list in the JIT descriptor. @item Point the relevant_entry field of the descriptor at the entry. @item Set @code{action_flag} to @code{JIT_REGISTER} and call @code{__jit_debug_register_code}. @end itemize When @value{GDBN} is attached and the breakpoint fires, @value{GDBN} uses the @code{relevant_entry} pointer so it doesn't have to walk the list looking for new code. However, the linked list must still be maintained in order to allow @value{GDBN} to attach to a running process and still find the symbol files. @node Unregistering Code @section Unregistering Code If code is freed, then the JIT should use the following protocol: @itemize @bullet @item Remove the code entry corresponding to the code from the linked list. @item Point the @code{relevant_entry} field of the descriptor at the code entry. @item Set @code{action_flag} to @code{JIT_UNREGISTER} and call @code{__jit_debug_register_code}. @end itemize If the JIT frees or recompiles code without unregistering it, then @value{GDBN} and the JIT will leak the memory used for the associated symbol files. @node Custom Debug Info @section Custom Debug Info @cindex custom JIT debug info @cindex JIT debug info reader Generating debug information in platform-native file formats (like ELF or COFF) may be an overkill for JIT compilers; especially if all the debug info is used for is displaying a meaningful backtrace. The issue can be resolved by having the JIT writers decide on a debug info format and also provide a reader that parses the debug info generated by the JIT compiler. This section gives a brief overview on writing such a parser. More specific details can be found in the source file @file{gdb/jit-reader.in}, which is also installed as a header at @file{@var{includedir}/gdb/jit-reader.h} for easy inclusion. The reader is implemented as a shared object (so this functionality is not available on platforms which don't allow loading shared objects at runtime). Two @value{GDBN} commands, @code{jit-reader-load} and @code{jit-reader-unload} are provided, to be used to load and unload the readers from a preconfigured directory. Once loaded, the shared object is used the parse the debug information emitted by the JIT compiler. @menu * Using JIT Debug Info Readers:: How to use supplied readers correctly * Writing JIT Debug Info Readers:: Creating a debug-info reader @end menu @node Using JIT Debug Info Readers @subsection Using JIT Debug Info Readers @kindex jit-reader-load @kindex jit-reader-unload Readers can be loaded and unloaded using the @code{jit-reader-load} and @code{jit-reader-unload} commands. @table @code @item jit-reader-load @var{reader} Load the JIT reader named @var{reader}. @var{reader} is a shared object specified as either an absolute or a relative file name. In the latter case, @value{GDBN} will try to load the reader from a pre-configured directory, usually @file{@var{libdir}/gdb/} on a UNIX system (here @var{libdir} is the system library directory, often @file{/usr/local/lib}). Only one reader can be active at a time; trying to load a second reader when one is already loaded will result in @value{GDBN} reporting an error. A new JIT reader can be loaded by first unloading the current one using @code{jit-reader-unload} and then invoking @code{jit-reader-load}. @item jit-reader-unload Unload the currently loaded JIT reader. @end table @node Writing JIT Debug Info Readers @subsection Writing JIT Debug Info Readers @cindex writing JIT debug info readers As mentioned, a reader is essentially a shared object conforming to a certain ABI. This ABI is described in @file{jit-reader.h}. @file{jit-reader.h} defines the structures, macros and functions required to write a reader. It is installed (along with @value{GDBN}), in @file{@var{includedir}/gdb} where @var{includedir} is the system include directory. Readers need to be released under a GPL compatible license. A reader can be declared as released under such a license by placing the macro @code{GDB_DECLARE_GPL_COMPATIBLE_READER} in a source file. The entry point for readers is the symbol @code{gdb_init_reader}, which is expected to be a function with the prototype @findex gdb_init_reader @smallexample extern struct gdb_reader_funcs *gdb_init_reader (void); @end smallexample @cindex @code{struct gdb_reader_funcs} @code{struct gdb_reader_funcs} contains a set of pointers to callback functions. These functions are executed to read the debug info generated by the JIT compiler (@code{read}), to unwind stack frames (@code{unwind}) and to create canonical frame IDs (@code{get_Frame_id}). It also has a callback that is called when the reader is being unloaded (@code{destroy}). The struct looks like this @smallexample struct gdb_reader_funcs @{ /* Must be set to GDB_READER_INTERFACE_VERSION. */ int reader_version; /* For use by the reader. */ void *priv_data; gdb_read_debug_info *read; gdb_unwind_frame *unwind; gdb_get_frame_id *get_frame_id; gdb_destroy_reader *destroy; @}; @end smallexample @cindex @code{struct gdb_symbol_callbacks} @cindex @code{struct gdb_unwind_callbacks} The callbacks are provided with another set of callbacks by @value{GDBN} to do their job. For @code{read}, these callbacks are passed in a @code{struct gdb_symbol_callbacks} and for @code{unwind} and @code{get_frame_id}, in a @code{struct gdb_unwind_callbacks}. @code{struct gdb_symbol_callbacks} has callbacks to create new object files and new symbol tables inside those object files. @code{struct gdb_unwind_callbacks} has callbacks to read registers off the current frame and to write out the values of the registers in the previous frame. Both have a callback (@code{target_read}) to read bytes off the target's address space. @node In-Process Agent @chapter In-Process Agent @cindex debugging agent The traditional debugging model is conceptually low-speed, but works fine, because most bugs can be reproduced in debugging-mode execution. However, as multi-core or many-core processors are becoming mainstream, and multi-threaded programs become more and more popular, there should be more and more bugs that only manifest themselves at normal-mode execution, for example, thread races, because debugger's interference with the program's timing may conceal the bugs. On the other hand, in some applications, it is not feasible for the debugger to interrupt the program's execution long enough for the developer to learn anything helpful about its behavior. If the program's correctness depends on its real-time behavior, delays introduced by a debugger might cause the program to fail, even when the code itself is correct. It is useful to be able to observe the program's behavior without interrupting it. Therefore, traditional debugging model is too intrusive to reproduce some bugs. In order to reduce the interference with the program, we can reduce the number of operations performed by debugger. The @dfn{In-Process Agent}, a shared library, is running within the same process with inferior, and is able to perform some debugging operations itself. As a result, debugger is only involved when necessary, and performance of debugging can be improved accordingly. Note that interference with program can be reduced but can't be removed completely, because the in-process agent will still stop or slow down the program. The in-process agent can interpret and execute Agent Expressions (@pxref{Agent Expressions}) during performing debugging operations. The agent expressions can be used for different purposes, such as collecting data in tracepoints, and condition evaluation in breakpoints. @anchor{Control Agent} You can control whether the in-process agent is used as an aid for debugging with the following commands: @table @code @kindex set agent on @item set agent on Causes the in-process agent to perform some operations on behalf of the debugger. Just which operations requested by the user will be done by the in-process agent depends on the its capabilities. For example, if you request to evaluate breakpoint conditions in the in-process agent, and the in-process agent has such capability as well, then breakpoint conditions will be evaluated in the in-process agent. @kindex set agent off @item set agent off Disables execution of debugging operations by the in-process agent. All of the operations will be performed by @value{GDBN}. @kindex show agent @item show agent Display the current setting of execution of debugging operations by the in-process agent. @end table @menu * In-Process Agent Protocol:: @end menu @node In-Process Agent Protocol @section In-Process Agent Protocol @cindex in-process agent protocol The in-process agent is able to communicate with both @value{GDBN} and GDBserver (@pxref{In-Process Agent}). This section documents the protocol used for communications between @value{GDBN} or GDBserver and the IPA. In general, @value{GDBN} or GDBserver sends commands (@pxref{IPA Protocol Commands}) and data to in-process agent, and then in-process agent replies back with the return result of the command, or some other information. The data sent to in-process agent is composed of primitive data types, such as 4-byte or 8-byte type, and composite types, which are called objects (@pxref{IPA Protocol Objects}). @menu * IPA Protocol Objects:: * IPA Protocol Commands:: @end menu @node IPA Protocol Objects @subsection IPA Protocol Objects @cindex ipa protocol objects The commands sent to and results received from agent may contain some complex data types called @dfn{objects}. The in-process agent is running on the same machine with @value{GDBN} or GDBserver, so it doesn't have to handle as much differences between two ends as remote protocol (@pxref{Remote Protocol}) tries to handle. However, there are still some differences of two ends in two processes: @enumerate @item word size. On some 64-bit machines, @value{GDBN} or GDBserver can be compiled as a 64-bit executable, while in-process agent is a 32-bit one. @item ABI. Some machines may have multiple types of ABI, @value{GDBN} or GDBserver is compiled with one, and in-process agent is compiled with the other one. @end enumerate Here are the IPA Protocol Objects: @enumerate @item agent expression object. It represents an agent expression (@pxref{Agent Expressions}). @anchor{agent expression object} @item tracepoint action object. It represents a tracepoint action (@pxref{Tracepoint Actions,,Tracepoint Action Lists}) to collect registers, memory, static trace data and to evaluate expression. @anchor{tracepoint action object} @item tracepoint object. It represents a tracepoint (@pxref{Tracepoints}). @anchor{tracepoint object} @end enumerate The following table describes important attributes of each IPA protocol object: @multitable @columnfractions .30 .20 .50 @headitem Name @tab Size @tab Description @item @emph{agent expression object} @tab @tab @item length @tab 4 @tab length of bytes code @item byte code @tab @var{length} @tab contents of byte code @item @emph{tracepoint action for collecting memory} @tab @tab @item 'M' @tab 1 @tab type of tracepoint action @item addr @tab 8 @tab if @var{basereg} is @samp{-1}, @var{addr} is the address of the lowest byte to collect, otherwise @var{addr} is the offset of @var{basereg} for memory collecting. @item len @tab 8 @tab length of memory for collecting @item basereg @tab 4 @tab the register number containing the starting memory address for collecting. @item @emph{tracepoint action for collecting registers} @tab @tab @item 'R' @tab 1 @tab type of tracepoint action @item @emph{tracepoint action for collecting static trace data} @tab @tab @item 'L' @tab 1 @tab type of tracepoint action @item @emph{tracepoint action for expression evaluation} @tab @tab @item 'X' @tab 1 @tab type of tracepoint action @item agent expression @tab length of @tab @ref{agent expression object} @item @emph{tracepoint object} @tab @tab @item number @tab 4 @tab number of tracepoint @item address @tab 8 @tab address of tracepoint inserted on @item type @tab 4 @tab type of tracepoint @item enabled @tab 1 @tab enable or disable of tracepoint @item step_count @tab 8 @tab step @item pass_count @tab 8 @tab pass @item numactions @tab 4 @tab number of tracepoint actions @item hit count @tab 8 @tab hit count @item trace frame usage @tab 8 @tab trace frame usage @item compiled_cond @tab 8 @tab compiled condition @item orig_size @tab 8 @tab orig size @item condition @tab 4 if condition is NULL otherwise length of @ref{agent expression object} @tab zero if condition is NULL, otherwise is @ref{agent expression object} @item actions @tab variable @tab numactions number of @ref{tracepoint action object} @end multitable @node IPA Protocol Commands @subsection IPA Protocol Commands @cindex ipa protocol commands The spaces in each command are delimiters to ease reading this commands specification. They don't exist in real commands. @table @samp @item FastTrace:@var{tracepoint_object} @var{gdb_jump_pad_head} Installs a new fast tracepoint described by @var{tracepoint_object} (@pxref{tracepoint object}). @var{gdb_jump_pad_head}, 8-byte long, is the head of @dfn{jumppad}, which is used to jump to data collection routine in IPA finally. Replies: @table @samp @item OK @var{target_address} @var{gdb_jump_pad_head} @var{fjump_size} @var{fjump} @var{target_address} is address of tracepoint in the inferior. @var{gdb_jump_pad_head} is updated head of jumppad. Both of @var{target_address} and @var{gdb_jump_pad_head} are 8-byte long. @var{fjump} contains a sequence of instructions jump to jumppad entry. @var{fjump_size}, 4-byte long, is the size of @var{fjump}. @item E @var{NN} for an error @end table @item close Closes the in-process agent. This command is sent when @value{GDBN} or GDBserver is about to kill inferiors. @item qTfSTM @xref{qTfSTM}. @item qTsSTM @xref{qTsSTM}. @item qTSTMat @xref{qTSTMat}. @item probe_marker_at:@var{address} Asks in-process agent to probe the marker at @var{address}. Replies: @table @samp @item E @var{NN} for an error @end table @item unprobe_marker_at:@var{address} Asks in-process agent to unprobe the marker at @var{address}. @end table @node GDB Bugs @chapter Reporting Bugs in @value{GDBN} @cindex bugs in @value{GDBN} @cindex reporting bugs in @value{GDBN} Your bug reports play an essential role in making @value{GDBN} reliable. Reporting a bug may help you by bringing a solution to your problem, or it may not. But in any case the principal function of a bug report is to help the entire community by making the next version of @value{GDBN} work better. Bug reports are your contribution to the maintenance of @value{GDBN}. In order for a bug report to serve its purpose, you must include the information that enables us to fix the bug. @menu * Bug Criteria:: Have you found a bug? * Bug Reporting:: How to report bugs @end menu @node Bug Criteria @section Have You Found a Bug? @cindex bug criteria If you are not sure whether you have found a bug, here are some guidelines: @itemize @bullet @cindex fatal signal @cindex debugger crash @cindex crash of debugger @item If the debugger gets a fatal signal, for any input whatever, that is a @value{GDBN} bug. Reliable debuggers never crash. @cindex error on valid input @item If @value{GDBN} produces an error message for valid input, that is a bug. (Note that if you're cross debugging, the problem may also be somewhere in the connection to the target.) @cindex invalid input @item If @value{GDBN} does not produce an error message for invalid input, that is a bug. However, you should note that your idea of ``invalid input'' might be our idea of ``an extension'' or ``support for traditional practice''. @item If you are an experienced user of debugging tools, your suggestions for improvement of @value{GDBN} are welcome in any case. @end itemize @node Bug Reporting @section How to Report Bugs @cindex bug reports @cindex @value{GDBN} bugs, reporting A number of companies and individuals offer support for @sc{gnu} products. If you obtained @value{GDBN} from a support organization, we recommend you contact that organization first. You can find contact information for many support companies and individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs distribution. @c should add a web page ref... @ifset BUGURL @ifset BUGURL_DEFAULT In any event, we also recommend that you submit bug reports for @value{GDBN}. The preferred method is to submit them directly using @uref{http://www.gnu.org/software/gdb/bugs/, @value{GDBN}'s Bugs web page}. Alternatively, the @email{bug-gdb@@gnu.org, e-mail gateway} can be used. @strong{Do not send bug reports to @samp{info-gdb}, or to @samp{help-gdb}, or to any newsgroups.} Most users of @value{GDBN} do not want to receive bug reports. Those that do have arranged to receive @samp{bug-gdb}. The mailing list @samp{bug-gdb} has a newsgroup @samp{gnu.gdb.bug} which serves as a repeater. The mailing list and the newsgroup carry exactly the same messages. Often people think of posting bug reports to the newsgroup instead of mailing them. This appears to work, but it has one problem which can be crucial: a newsgroup posting often lacks a mail path back to the sender. Thus, if we need to ask for more information, we may be unable to reach you. For this reason, it is better to send bug reports to the mailing list. @end ifset @ifclear BUGURL_DEFAULT In any event, we also recommend that you submit bug reports for @value{GDBN} to @value{BUGURL}. @end ifclear @end ifset The fundamental principle of reporting bugs usefully is this: @strong{report all the facts}. If you are not sure whether to state a fact or leave it out, state it! Often people omit facts because they think they know what causes the problem and assume that some details do not matter. Thus, you might assume that the name of the variable you use in an example does not matter. Well, probably it does not, but one cannot be sure. Perhaps the bug is a stray memory reference which happens to fetch from the location where that name is stored in memory; perhaps, if the name were different, the contents of that location would fool the debugger into doing the right thing despite the bug. Play it safe and give a specific, complete example. That is the easiest thing for you to do, and the most helpful. Keep in mind that the purpose of a bug report is to enable us to fix the bug. It may be that the bug has been reported previously, but neither you nor we can know that unless your bug report is complete and self-contained. Sometimes people give a few sketchy facts and ask, ``Does this ring a bell?'' Those bug reports are useless, and we urge everyone to @emph{refuse to respond to them} except to chide the sender to report bugs properly. To enable us to fix the bug, you should include all these things: @itemize @bullet @item The version of @value{GDBN}. @value{GDBN} announces it if you start with no arguments; you can also print it at any time using @code{show version}. Without this, we will not know whether there is any point in looking for the bug in the current version of @value{GDBN}. @item The type of machine you are using, and the operating system name and version number. @item What compiler (and its version) was used to compile @value{GDBN}---e.g.@: ``@value{GCC}--2.8.1''. @item What compiler (and its version) was used to compile the program you are debugging---e.g.@: ``@value{GCC}--2.8.1'', or ``HP92453-01 A.10.32.03 HP C Compiler''. For @value{NGCC}, you can say @kbd{@value{GCC} --version} to get this information; for other compilers, see the documentation for those compilers. @item The command arguments you gave the compiler to compile your example and observe the bug. For example, did you use @samp{-O}? To guarantee you will not omit something important, list them all. A copy of the Makefile (or the output from make) is sufficient. If we were to try to guess the arguments, we would probably guess wrong and then we might not encounter the bug. @item A complete input script, and all necessary source files, that will reproduce the bug. @item A description of what behavior you observe that you believe is incorrect. For example, ``It gets a fatal signal.'' Of course, if the bug is that @value{GDBN} gets a fatal signal, then we will certainly notice it. But if the bug is incorrect output, we might not notice unless it is glaringly wrong. You might as well not give us a chance to make a mistake. Even if the problem you experience is a fatal signal, you should still say so explicitly. Suppose something strange is going on, such as, your copy of @value{GDBN} is out of synch, or you have encountered a bug in the C library on your system. (This has happened!) Your copy might crash and ours would not. If you told us to expect a crash, then when ours fails to crash, we would know that the bug was not happening for us. If you had not told us to expect a crash, then we would not be able to draw any conclusion from our observations. @pindex script @cindex recording a session script To collect all this information, you can use a session recording program such as @command{script}, which is available on many Unix systems. Just run your @value{GDBN} session inside @command{script} and then include the @file{typescript} file with your bug report. Another way to record a @value{GDBN} session is to run @value{GDBN} inside Emacs and then save the entire buffer to a file. @item If you wish to suggest changes to the @value{GDBN} source, send us context diffs. If you even discuss something in the @value{GDBN} source, refer to it by context, not by line number. The line numbers in our development sources will not match those in your sources. Your line numbers would convey no useful information to us. @end itemize Here are some things that are not necessary: @itemize @bullet @item A description of the envelope of the bug. Often people who encounter a bug spend a lot of time investigating which changes to the input file will make the bug go away and which changes will not affect it. This is often time consuming and not very useful, because the way we will find the bug is by running a single example under the debugger with breakpoints, not by pure deduction from a series of examples. We recommend that you save your time for something else. Of course, if you can find a simpler example to report @emph{instead} of the original one, that is a convenience for us. Errors in the output will be easier to spot, running under the debugger will take less time, and so on. However, simplification is not vital; if you do not want to do this, report the bug anyway and send us the entire test case you used. @item A patch for the bug. A patch for the bug does help us if it is a good one. But do not omit the necessary information, such as the test case, on the assumption that a patch is all we need. We might see problems with your patch and decide to fix the problem another way, or we might not understand it at all. Sometimes with a program as complicated as @value{GDBN} it is very hard to construct an example that will make the program follow a certain path through the code. If you do not send us the example, we will not be able to construct one, so we will not be able to verify that the bug is fixed. And if we cannot understand what bug you are trying to fix, or why your patch should be an improvement, we will not install it. A test case will help us to understand. @item A guess about what the bug is or what it depends on. Such guesses are usually wrong. Even we cannot guess right about such things without first using the debugger to find the facts. @end itemize @c The readline documentation is distributed with the readline code @c and consists of the two following files: @c rluser.texi @c hsuser.texi @c Use -I with makeinfo to point to the appropriate directory, @c environment var TEXINPUTS with TeX. @ifclear SYSTEM_READLINE @include rluser.texi @include hsuser.texi @end ifclear @node In Memoriam @appendix In Memoriam The @value{GDBN} project mourns the loss of the following long-time contributors: @table @code @item Fred Fish Fred was a long-standing contributor to @value{GDBN} (1991-2006), and to Free Software in general. Outside of @value{GDBN}, he was known in the Amiga world for his series of Fish Disks, and the GeekGadget project. @item Michael Snyder Michael was one of the Global Maintainers of the @value{GDBN} project, with contributions recorded as early as 1996, until 2011. In addition to his day to day participation, he was a large driving force behind adding Reverse Debugging to @value{GDBN}. @end table Beyond their technical contributions to the project, they were also enjoyable members of the Free Software Community. We will miss them. @node Formatting Documentation @appendix Formatting Documentation @cindex @value{GDBN} reference card @cindex reference card The @value{GDBN} 4 release includes an already-formatted reference card, ready for printing with PostScript or Ghostscript, in the @file{gdb} subdirectory of the main source directory@footnote{In @file{gdb-@value{GDBVN}/gdb/refcard.ps} of the version @value{GDBVN} release.}. If you can use PostScript or Ghostscript with your printer, you can print the reference card immediately with @file{refcard.ps}. The release also includes the source for the reference card. You can format it, using @TeX{}, by typing: @smallexample make refcard.dvi @end smallexample The @value{GDBN} reference card is designed to print in @dfn{landscape} mode on US ``letter'' size paper; that is, on a sheet 11 inches wide by 8.5 inches high. You will need to specify this form of printing as an option to your @sc{dvi} output program. @cindex documentation All the documentation for @value{GDBN} comes as part of the machine-readable distribution. The documentation is written in Texinfo format, which is a documentation system that uses a single source file to produce both on-line information and a printed manual. You can use one of the Info formatting commands to create the on-line version of the documentation and @TeX{} (or @code{texi2roff}) to typeset the printed version. @value{GDBN} includes an already formatted copy of the on-line Info version of this manual in the @file{gdb} subdirectory. The main Info file is @file{gdb-@value{GDBVN}/gdb/gdb.info}, and it refers to subordinate files matching @samp{gdb.info*} in the same directory. If necessary, you can print out these files, or read them with any editor; but they are easier to read using the @code{info} subsystem in @sc{gnu} Emacs or the standalone @code{info} program, available as part of the @sc{gnu} Texinfo distribution. If you want to format these Info files yourself, you need one of the Info formatting programs, such as @code{texinfo-format-buffer} or @code{makeinfo}. If you have @code{makeinfo} installed, and are in the top level @value{GDBN} source directory (@file{gdb-@value{GDBVN}}, in the case of version @value{GDBVN}), you can make the Info file by typing: @smallexample cd gdb make gdb.info @end smallexample If you want to typeset and print copies of this manual, you need @TeX{}, a program to print its @sc{dvi} output files, and @file{texinfo.tex}, the Texinfo definitions file. @TeX{} is a typesetting program; it does not print files directly, but produces output files called @sc{dvi} files. To print a typeset document, you need a program to print @sc{dvi} files. If your system has @TeX{} installed, chances are it has such a program. The precise command to use depends on your system; @kbd{lpr -d} is common; another (for PostScript devices) is @kbd{dvips}. The @sc{dvi} print command may require a file name without any extension or a @samp{.dvi} extension. @TeX{} also requires a macro definitions file called @file{texinfo.tex}. This file tells @TeX{} how to typeset a document written in Texinfo format. On its own, @TeX{} cannot either read or typeset a Texinfo file. @file{texinfo.tex} is distributed with GDB and is located in the @file{gdb-@var{version-number}/texinfo} directory. If you have @TeX{} and a @sc{dvi} printer program installed, you can typeset and print this manual. First switch to the @file{gdb} subdirectory of the main source directory (for example, to @file{gdb-@value{GDBVN}/gdb}) and type: @smallexample make gdb.dvi @end smallexample Then give @file{gdb.dvi} to your @sc{dvi} printing program. @node Installing GDB @appendix Installing @value{GDBN} @cindex installation @menu * Requirements:: Requirements for building @value{GDBN} * Running Configure:: Invoking the @value{GDBN} @file{configure} script * Separate Objdir:: Compiling @value{GDBN} in another directory * Config Names:: Specifying names for hosts and targets * Configure Options:: Summary of options for configure * System-wide configuration:: Having a system-wide init file @end menu @node Requirements @section Requirements for Building @value{GDBN} @cindex building @value{GDBN}, requirements for Building @value{GDBN} requires various tools and packages to be available. Other packages will be used only if they are found. @heading Tools/Packages Necessary for Building @value{GDBN} @table @asis @item ISO C90 compiler @value{GDBN} is written in ISO C90. It should be buildable with any working C90 compiler, e.g.@: GCC. @end table @heading Tools/Packages Optional for Building @value{GDBN} @table @asis @item Expat @anchor{Expat} @value{GDBN} can use the Expat XML parsing library. This library may be included with your operating system distribution; if it is not, you can get the latest version from @url{http://expat.sourceforge.net}. The @file{configure} script will search for this library in several standard locations; if it is installed in an unusual path, you can use the @option{--with-libexpat-prefix} option to specify its location. Expat is used for: @itemize @bullet @item Remote protocol memory maps (@pxref{Memory Map Format}) @item Target descriptions (@pxref{Target Descriptions}) @item Remote shared library lists (@xref{Library List Format}, or alternatively @pxref{Library List Format for SVR4 Targets}) @item MS-Windows shared libraries (@pxref{Shared Libraries}) @item Traceframe info (@pxref{Traceframe Info Format}) @item Branch trace (@pxref{Branch Trace Format}) @end itemize @item zlib @cindex compressed debug sections @value{GDBN} will use the @samp{zlib} library, if available, to read compressed debug sections. Some linkers, such as GNU gold, are capable of producing binaries with compressed debug sections. If @value{GDBN} is compiled with @samp{zlib}, it will be able to read the debug information in such binaries. The @samp{zlib} library is likely included with your operating system distribution; if it is not, you can get the latest version from @url{http://zlib.net}. @item iconv @value{GDBN}'s features related to character sets (@pxref{Character Sets}) require a functioning @code{iconv} implementation. If you are on a GNU system, then this is provided by the GNU C Library. Some other systems also provide a working @code{iconv}. If @value{GDBN} is using the @code{iconv} program which is installed in a non-standard place, you will need to tell @value{GDBN} where to find it. This is done with @option{--with-iconv-bin} which specifies the directory that contains the @code{iconv} program. On systems without @code{iconv}, you can install GNU Libiconv. If you have previously installed Libiconv, you can use the @option{--with-libiconv-prefix} option to configure. @value{GDBN}'s top-level @file{configure} and @file{Makefile} will arrange to build Libiconv if a directory named @file{libiconv} appears in the top-most source directory. If Libiconv is built this way, and if the operating system does not provide a suitable @code{iconv} implementation, then the just-built library will automatically be used by @value{GDBN}. One easy way to set this up is to download GNU Libiconv, unpack it, and then rename the directory holding the Libiconv source code to @samp{libiconv}. @end table @node Running Configure @section Invoking the @value{GDBN} @file{configure} Script @cindex configuring @value{GDBN} @value{GDBN} comes with a @file{configure} script that automates the process of preparing @value{GDBN} for installation; you can then use @code{make} to build the @code{gdb} program. @iftex @c irrelevant in info file; it's as current as the code it lives with. @footnote{If you have a more recent version of @value{GDBN} than @value{GDBVN}, look at the @file{README} file in the sources; we may have improved the installation procedures since publishing this manual.} @end iftex The @value{GDBN} distribution includes all the source code you need for @value{GDBN} in a single directory, whose name is usually composed by appending the version number to @samp{gdb}. For example, the @value{GDBN} version @value{GDBVN} distribution is in the @file{gdb-@value{GDBVN}} directory. That directory contains: @table @code @item gdb-@value{GDBVN}/configure @r{(and supporting files)} script for configuring @value{GDBN} and all its supporting libraries @item gdb-@value{GDBVN}/gdb the source specific to @value{GDBN} itself @item gdb-@value{GDBVN}/bfd source for the Binary File Descriptor library @item gdb-@value{GDBVN}/include @sc{gnu} include files @item gdb-@value{GDBVN}/libiberty source for the @samp{-liberty} free software library @item gdb-@value{GDBVN}/opcodes source for the library of opcode tables and disassemblers @item gdb-@value{GDBVN}/readline source for the @sc{gnu} command-line interface @item gdb-@value{GDBVN}/glob source for the @sc{gnu} filename pattern-matching subroutine @item gdb-@value{GDBVN}/mmalloc source for the @sc{gnu} memory-mapped malloc package @end table The simplest way to configure and build @value{GDBN} is to run @file{configure} from the @file{gdb-@var{version-number}} source directory, which in this example is the @file{gdb-@value{GDBVN}} directory. First switch to the @file{gdb-@var{version-number}} source directory if you are not already in it; then run @file{configure}. Pass the identifier for the platform on which @value{GDBN} will run as an argument. For example: @smallexample cd gdb-@value{GDBVN} ./configure @var{host} make @end smallexample @noindent where @var{host} is an identifier such as @samp{sun4} or @samp{decstation}, that identifies the platform where @value{GDBN} will run. (You can often leave off @var{host}; @file{configure} tries to guess the correct value by examining your system.) Running @samp{configure @var{host}} and then running @code{make} builds the @file{bfd}, @file{readline}, @file{mmalloc}, and @file{libiberty} libraries, then @code{gdb} itself. The configured source files, and the binaries, are left in the corresponding source directories. @need 750 @file{configure} is a Bourne-shell (@code{/bin/sh}) script; if your system does not recognize this automatically when you run a different shell, you may need to run @code{sh} on it explicitly: @smallexample sh configure @var{host} @end smallexample If you run @file{configure} from a directory that contains source directories for multiple libraries or programs, such as the @file{gdb-@value{GDBVN}} source directory for version @value{GDBVN}, @file{configure} creates configuration files for every directory level underneath (unless you tell it not to, with the @samp{--norecursion} option). You should run the @file{configure} script from the top directory in the source tree, the @file{gdb-@var{version-number}} directory. If you run @file{configure} from one of the subdirectories, you will configure only that subdirectory. That is usually not what you want. In particular, if you run the first @file{configure} from the @file{gdb} subdirectory of the @file{gdb-@var{version-number}} directory, you will omit the configuration of @file{bfd}, @file{readline}, and other sibling directories of the @file{gdb} subdirectory. This leads to build errors about missing include files such as @file{bfd/bfd.h}. You can install @code{@value{GDBP}} anywhere; it has no hardwired paths. However, you should make sure that the shell on your path (named by the @samp{SHELL} environment variable) is publicly readable. Remember that @value{GDBN} uses the shell to start your program---some systems refuse to let @value{GDBN} debug child processes whose programs are not readable. @node Separate Objdir @section Compiling @value{GDBN} in Another Directory If you want to run @value{GDBN} versions for several host or target machines, you need a different @code{gdb} compiled for each combination of host and target. @file{configure} is designed to make this easy by allowing you to generate each configuration in a separate subdirectory, rather than in the source directory. If your @code{make} program handles the @samp{VPATH} feature (@sc{gnu} @code{make} does), running @code{make} in each of these directories builds the @code{gdb} program specified there. To build @code{gdb} in a separate directory, run @file{configure} with the @samp{--srcdir} option to specify where to find the source. (You also need to specify a path to find @file{configure} itself from your working directory. If the path to @file{configure} would be the same as the argument to @samp{--srcdir}, you can leave out the @samp{--srcdir} option; it is assumed.) For example, with version @value{GDBVN}, you can build @value{GDBN} in a separate directory for a Sun 4 like this: @smallexample @group cd gdb-@value{GDBVN} mkdir ../gdb-sun4 cd ../gdb-sun4 ../gdb-@value{GDBVN}/configure sun4 make @end group @end smallexample When @file{configure} builds a configuration using a remote source directory, it creates a tree for the binaries with the same structure (and using the same names) as the tree under the source directory. In the example, you'd find the Sun 4 library @file{libiberty.a} in the directory @file{gdb-sun4/libiberty}, and @value{GDBN} itself in @file{gdb-sun4/gdb}. Make sure that your path to the @file{configure} script has just one instance of @file{gdb} in it. If your path to @file{configure} looks like @file{../gdb-@value{GDBVN}/gdb/configure}, you are configuring only one subdirectory of @value{GDBN}, not the whole package. This leads to build errors about missing include files such as @file{bfd/bfd.h}. One popular reason to build several @value{GDBN} configurations in separate directories is to configure @value{GDBN} for cross-compiling (where @value{GDBN} runs on one machine---the @dfn{host}---while debugging programs that run on another machine---the @dfn{target}). You specify a cross-debugging target by giving the @samp{--target=@var{target}} option to @file{configure}. When you run @code{make} to build a program or library, you must run it in a configured directory---whatever directory you were in when you called @file{configure} (or one of its subdirectories). The @code{Makefile} that @file{configure} generates in each source directory also runs recursively. If you type @code{make} in a source directory such as @file{gdb-@value{GDBVN}} (or in a separate configured directory configured with @samp{--srcdir=@var{dirname}/gdb-@value{GDBVN}}), you will build all the required libraries, and then build GDB. When you have multiple hosts or targets configured in separate directories, you can run @code{make} on them in parallel (for example, if they are NFS-mounted on each of the hosts); they will not interfere with each other. @node Config Names @section Specifying Names for Hosts and Targets The specifications used for hosts and targets in the @file{configure} script are based on a three-part naming scheme, but some short predefined aliases are also supported. The full naming scheme encodes three pieces of information in the following pattern: @smallexample @var{architecture}-@var{vendor}-@var{os} @end smallexample For example, you can use the alias @code{sun4} as a @var{host} argument, or as the value for @var{target} in a @code{--target=@var{target}} option. The equivalent full name is @samp{sparc-sun-sunos4}. The @file{configure} script accompanying @value{GDBN} does not provide any query facility to list all supported host and target names or aliases. @file{configure} calls the Bourne shell script @code{config.sub} to map abbreviations to full names; you can read the script, if you wish, or you can use it to test your guesses on abbreviations---for example: @smallexample % sh config.sub i386-linux i386-pc-linux-gnu % sh config.sub alpha-linux alpha-unknown-linux-gnu % sh config.sub hp9k700 hppa1.1-hp-hpux % sh config.sub sun4 sparc-sun-sunos4.1.1 % sh config.sub sun3 m68k-sun-sunos4.1.1 % sh config.sub i986v Invalid configuration `i986v': machine `i986v' not recognized @end smallexample @noindent @code{config.sub} is also distributed in the @value{GDBN} source directory (@file{gdb-@value{GDBVN}}, for version @value{GDBVN}). @node Configure Options @section @file{configure} Options Here is a summary of the @file{configure} options and arguments that are most often useful for building @value{GDBN}. @file{configure} also has several other options not listed here. @inforef{What Configure Does,,configure.info}, for a full explanation of @file{configure}. @smallexample configure @r{[}--help@r{]} @r{[}--prefix=@var{dir}@r{]} @r{[}--exec-prefix=@var{dir}@r{]} @r{[}--srcdir=@var{dirname}@r{]} @r{[}--norecursion@r{]} @r{[}--rm@r{]} @r{[}--target=@var{target}@r{]} @var{host} @end smallexample @noindent You may introduce options with a single @samp{-} rather than @samp{--} if you prefer; but you may abbreviate option names if you use @samp{--}. @table @code @item --help Display a quick summary of how to invoke @file{configure}. @item --prefix=@var{dir} Configure the source to install programs and files under directory @file{@var{dir}}. @item --exec-prefix=@var{dir} Configure the source to install programs under directory @file{@var{dir}}. @c avoid splitting the warning from the explanation: @need 2000 @item --srcdir=@var{dirname} @strong{Warning: using this option requires @sc{gnu} @code{make}, or another @code{make} that implements the @code{VPATH} feature.}@* Use this option to make configurations in directories separate from the @value{GDBN} source directories. Among other things, you can use this to build (or maintain) several configurations simultaneously, in separate directories. @file{configure} writes configuration-specific files in the current directory, but arranges for them to use the source in the directory @var{dirname}. @file{configure} creates directories under the working directory in parallel to the source directories below @var{dirname}. @item --norecursion Configure only the directory level where @file{configure} is executed; do not propagate configuration to subdirectories. @item --target=@var{target} Configure @value{GDBN} for cross-debugging programs running on the specified @var{target}. Without this option, @value{GDBN} is configured to debug programs that run on the same machine (@var{host}) as @value{GDBN} itself. There is no convenient way to generate a list of all available targets. @item @var{host} @dots{} Configure @value{GDBN} to run on the specified @var{host}. There is no convenient way to generate a list of all available hosts. @end table There are many other options available as well, but they are generally needed for special purposes only. @node System-wide configuration @section System-wide configuration and settings @cindex system-wide init file @value{GDBN} can be configured to have a system-wide init file; this file will be read and executed at startup (@pxref{Startup, , What @value{GDBN} does during startup}). Here is the corresponding configure option: @table @code @item --with-system-gdbinit=@var{file} Specify that the default location of the system-wide init file is @var{file}. @end table If @value{GDBN} has been configured with the option @option{--prefix=$prefix}, it may be subject to relocation. Two possible cases: @itemize @bullet @item If the default location of this init file contains @file{$prefix}, it will be subject to relocation. Suppose that the configure options are @option{--prefix=$prefix --with-system-gdbinit=$prefix/etc/gdbinit}; if @value{GDBN} is moved from @file{$prefix} to @file{$install}, the system init file is looked for as @file{$install/etc/gdbinit} instead of @file{$prefix/etc/gdbinit}. @item By contrast, if the default location does not contain the prefix, it will not be relocated. E.g.@: if @value{GDBN} has been configured with @option{--prefix=/usr/local --with-system-gdbinit=/usr/share/gdb/gdbinit}, then @value{GDBN} will always look for @file{/usr/share/gdb/gdbinit}, wherever @value{GDBN} is installed. @end itemize If the configured location of the system-wide init file (as given by the @option{--with-system-gdbinit} option at configure time) is in the data-directory (as specified by @option{--with-gdb-datadir} at configure time) or in one of its subdirectories, then @value{GDBN} will look for the system-wide init file in the directory specified by the @option{--data-directory} command-line option. Note that the system-wide init file is only read once, during @value{GDBN} initialization. If the data-directory is changed after @value{GDBN} has started with the @code{set data-directory} command, the file will not be reread. @node Maintenance Commands @appendix Maintenance Commands @cindex maintenance commands @cindex internal commands In addition to commands intended for @value{GDBN} users, @value{GDBN} includes a number of commands intended for @value{GDBN} developers, that are not documented elsewhere in this manual. These commands are provided here for reference. (For commands that turn on debugging messages, see @ref{Debugging Output}.) @table @code @kindex maint agent @kindex maint agent-eval @item maint agent @r{[}-at @var{location}@r{,}@r{]} @var{expression} @itemx maint agent-eval @r{[}-at @var{location}@r{,}@r{]} @var{expression} Translate the given @var{expression} into remote agent bytecodes. This command is useful for debugging the Agent Expression mechanism (@pxref{Agent Expressions}). The @samp{agent} version produces an expression useful for data collection, such as by tracepoints, while @samp{maint agent-eval} produces an expression that evaluates directly to a result. For instance, a collection expression for @code{globa + globb} will include bytecodes to record four bytes of memory at each of the addresses of @code{globa} and @code{globb}, while discarding the result of the addition, while an evaluation expression will do the addition and return the sum. If @code{-at} is given, generate remote agent bytecode for @var{location}. If not, generate remote agent bytecode for current frame PC address. @kindex maint agent-printf @item maint agent-printf @var{format},@var{expr},... Translate the given format string and list of argument expressions into remote agent bytecodes and display them as a disassembled list. This command is useful for debugging the agent version of dynamic printf (@pxref{Dynamic Printf}. @kindex maint info breakpoints @item @anchor{maint info breakpoints}maint info breakpoints Using the same format as @samp{info breakpoints}, display both the breakpoints you've set explicitly, and those @value{GDBN} is using for internal purposes. Internal breakpoints are shown with negative breakpoint numbers. The type column identifies what kind of breakpoint is shown: @table @code @item breakpoint Normal, explicitly set breakpoint. @item watchpoint Normal, explicitly set watchpoint. @item longjmp Internal breakpoint, used to handle correctly stepping through @code{longjmp} calls. @item longjmp resume Internal breakpoint at the target of a @code{longjmp}. @item until Temporary internal breakpoint used by the @value{GDBN} @code{until} command. @item finish Temporary internal breakpoint used by the @value{GDBN} @code{finish} command. @item shlib events Shared library events. @end table @kindex maint info bfds @item maint info bfds This prints information about each @code{bfd} object that is known to @value{GDBN}. @xref{Top, , BFD, bfd, The Binary File Descriptor Library}. @kindex set displaced-stepping @kindex show displaced-stepping @cindex displaced stepping support @cindex out-of-line single-stepping @item set displaced-stepping @itemx show displaced-stepping Control whether or not @value{GDBN} will do @dfn{displaced stepping} if the target supports it. Displaced stepping is a way to single-step over breakpoints without removing them from the inferior, by executing an out-of-line copy of the instruction that was originally at the breakpoint location. It is also known as out-of-line single-stepping. @table @code @item set displaced-stepping on If the target architecture supports it, @value{GDBN} will use displaced stepping to step over breakpoints. @item set displaced-stepping off @value{GDBN} will not use displaced stepping to step over breakpoints, even if such is supported by the target architecture. @cindex non-stop mode, and @samp{set displaced-stepping} @item set displaced-stepping auto This is the default mode. @value{GDBN} will use displaced stepping only if non-stop mode is active (@pxref{Non-Stop Mode}) and the target architecture supports displaced stepping. @end table @kindex maint check-symtabs @item maint check-symtabs Check the consistency of psymtabs and symtabs. @kindex maint cplus first_component @item maint cplus first_component @var{name} Print the first C@t{++} class/namespace component of @var{name}. @kindex maint cplus namespace @item maint cplus namespace Print the list of possible C@t{++} namespaces. @kindex maint demangle @item maint demangle @var{name} Demangle a C@t{++} or Objective-C mangled @var{name}. @kindex maint deprecate @kindex maint undeprecate @cindex deprecated commands @item maint deprecate @var{command} @r{[}@var{replacement}@r{]} @itemx maint undeprecate @var{command} Deprecate or undeprecate the named @var{command}. Deprecated commands cause @value{GDBN} to issue a warning when you use them. The optional argument @var{replacement} says which newer command should be used in favor of the deprecated one; if it is given, @value{GDBN} will mention the replacement as part of the warning. @kindex maint dump-me @item maint dump-me @cindex @code{SIGQUIT} signal, dump core of @value{GDBN} Cause a fatal signal in the debugger and force it to dump its core. This is supported only on systems which support aborting a program with the @code{SIGQUIT} signal. @kindex maint internal-error @kindex maint internal-warning @item maint internal-error @r{[}@var{message-text}@r{]} @itemx maint internal-warning @r{[}@var{message-text}@r{]} Cause @value{GDBN} to call the internal function @code{internal_error} or @code{internal_warning} and hence behave as though an internal error or internal warning has been detected. In addition to reporting the internal problem, these functions give the user the opportunity to either quit @value{GDBN} or create a core file of the current @value{GDBN} session. These commands take an optional parameter @var{message-text} that is used as the text of the error or warning message. Here's an example of using @code{internal-error}: @smallexample (@value{GDBP}) @kbd{maint internal-error testing, 1, 2} @dots{}/maint.c:121: internal-error: testing, 1, 2 A problem internal to GDB has been detected. Further debugging may prove unreliable. Quit this debugging session? (y or n) @kbd{n} Create a core file? (y or n) @kbd{n} (@value{GDBP}) @end smallexample @cindex @value{GDBN} internal error @cindex internal errors, control of @value{GDBN} behavior @kindex maint set internal-error @kindex maint show internal-error @kindex maint set internal-warning @kindex maint show internal-warning @item maint set internal-error @var{action} [ask|yes|no] @itemx maint show internal-error @var{action} @itemx maint set internal-warning @var{action} [ask|yes|no] @itemx maint show internal-warning @var{action} When @value{GDBN} reports an internal problem (error or warning) it gives the user the opportunity to both quit @value{GDBN} and create a core file of the current @value{GDBN} session. These commands let you override the default behaviour for each particular @var{action}, described in the table below. @table @samp @item quit You can specify that @value{GDBN} should always (yes) or never (no) quit. The default is to ask the user what to do. @item corefile You can specify that @value{GDBN} should always (yes) or never (no) create a core file. The default is to ask the user what to do. @end table @kindex maint packet @item maint packet @var{text} If @value{GDBN} is talking to an inferior via the serial protocol, then this command sends the string @var{text} to the inferior, and displays the response packet. @value{GDBN} supplies the initial @samp{$} character, the terminating @samp{#} character, and the checksum. @kindex maint print architecture @item maint print architecture @r{[}@var{file}@r{]} Print the entire architecture configuration. The optional argument @var{file} names the file where the output goes. @kindex maint print c-tdesc @item maint print c-tdesc Print the current target description (@pxref{Target Descriptions}) as a C source file. The created source file can be used in @value{GDBN} when an XML parser is not available to parse the description. @kindex maint print dummy-frames @item maint print dummy-frames Prints the contents of @value{GDBN}'s internal dummy-frame stack. @smallexample (@value{GDBP}) @kbd{b add} @dots{} (@value{GDBP}) @kbd{print add(2,3)} Breakpoint 2, add (a=2, b=3) at @dots{} 58 return (a + b); The program being debugged stopped while in a function called from GDB. @dots{} (@value{GDBP}) @kbd{maint print dummy-frames} 0x1a57c80: pc=0x01014068 fp=0x0200bddc sp=0x0200bdd6 top=0x0200bdd4 id=@{stack=0x200bddc,code=0x101405c@} call_lo=0x01014000 call_hi=0x01014001 (@value{GDBP}) @end smallexample Takes an optional file parameter. @kindex maint print registers @kindex maint print raw-registers @kindex maint print cooked-registers @kindex maint print register-groups @kindex maint print remote-registers @item maint print registers @r{[}@var{file}@r{]} @itemx maint print raw-registers @r{[}@var{file}@r{]} @itemx maint print cooked-registers @r{[}@var{file}@r{]} @itemx maint print register-groups @r{[}@var{file}@r{]} @itemx maint print remote-registers @r{[}@var{file}@r{]} Print @value{GDBN}'s internal register data structures. The command @code{maint print raw-registers} includes the contents of the raw register cache; the command @code{maint print cooked-registers} includes the (cooked) value of all registers, including registers which aren't available on the target nor visible to user; the command @code{maint print register-groups} includes the groups that each register is a member of; and the command @code{maint print remote-registers} includes the remote target's register numbers and offsets in the `G' packets. @xref{Registers,, Registers, gdbint, @value{GDBN} Internals}. These commands take an optional parameter, a file name to which to write the information. @kindex maint print reggroups @item maint print reggroups @r{[}@var{file}@r{]} Print @value{GDBN}'s internal register group data structures. The optional argument @var{file} tells to what file to write the information. The register groups info looks like this: @smallexample (@value{GDBP}) @kbd{maint print reggroups} Group Type general user float user all user vector user system user save internal restore internal @end smallexample @kindex flushregs @item flushregs This command forces @value{GDBN} to flush its internal register cache. @kindex maint print objfiles @cindex info for known object files @item maint print objfiles Print a dump of all known object files. For each object file, this command prints its name, address in memory, and all of its psymtabs and symtabs. @kindex maint print section-scripts @cindex info for known .debug_gdb_scripts-loaded scripts @item maint print section-scripts [@var{regexp}] Print a dump of scripts specified in the @code{.debug_gdb_section} section. If @var{regexp} is specified, only print scripts loaded by object files matching @var{regexp}. For each script, this command prints its name as specified in the objfile, and the full path if known. @xref{dotdebug_gdb_scripts section}. @kindex maint print statistics @cindex bcache statistics @item maint print statistics This command prints, for each object file in the program, various data about that object file followed by the byte cache (@dfn{bcache}) statistics for the object file. The objfile data includes the number of minimal, partial, full, and stabs symbols, the number of types defined by the objfile, the number of as yet unexpanded psym tables, the number of line tables and string tables, and the amount of memory used by the various tables. The bcache statistics include the counts, sizes, and counts of duplicates of all and unique objects, max, average, and median entry size, total memory used and its overhead and savings, and various measures of the hash table size and chain lengths. @kindex maint print target-stack @cindex target stack description @item maint print target-stack A @dfn{target} is an interface between the debugger and a particular kind of file or process. Targets can be stacked in @dfn{strata}, so that more than one target can potentially respond to a request. In particular, memory accesses will walk down the stack of targets until they find a target that is interested in handling that particular address. This command prints a short description of each layer that was pushed on the @dfn{target stack}, starting from the top layer down to the bottom one. @kindex maint print type @cindex type chain of a data type @item maint print type @var{expr} Print the type chain for a type specified by @var{expr}. The argument can be either a type name or a symbol. If it is a symbol, the type of that symbol is described. The type chain produced by this command is a recursive definition of the data type as stored in @value{GDBN}'s data structures, including its flags and contained types. @kindex maint set dwarf2 always-disassemble @kindex maint show dwarf2 always-disassemble @item maint set dwarf2 always-disassemble @item maint show dwarf2 always-disassemble Control the behavior of @code{info address} when using DWARF debugging information. The default is @code{off}, which means that @value{GDBN} should try to describe a variable's location in an easily readable format. When @code{on}, @value{GDBN} will instead display the DWARF location expression in an assembly-like format. Note that some locations are too complex for @value{GDBN} to describe simply; in this case you will always see the disassembly form. Here is an example of the resulting disassembly: @smallexample (gdb) info addr argc Symbol "argc" is a complex DWARF expression: 1: DW_OP_fbreg 0 @end smallexample For more information on these expressions, see @uref{http://www.dwarfstd.org/, the DWARF standard}. @kindex maint set dwarf2 max-cache-age @kindex maint show dwarf2 max-cache-age @item maint set dwarf2 max-cache-age @itemx maint show dwarf2 max-cache-age Control the DWARF 2 compilation unit cache. @cindex DWARF 2 compilation units cache In object files with inter-compilation-unit references, such as those produced by the GCC option @samp{-feliminate-dwarf2-dups}, the DWARF 2 reader needs to frequently refer to previously read compilation units. This setting controls how long a compilation unit will remain in the cache if it is not referenced. A higher limit means that cached compilation units will be stored in memory longer, and more total memory will be used. Setting it to zero disables caching, which will slow down @value{GDBN} startup, but reduce memory consumption. @kindex maint set profile @kindex maint show profile @cindex profiling GDB @item maint set profile @itemx maint show profile Control profiling of @value{GDBN}. Profiling will be disabled until you use the @samp{maint set profile} command to enable it. When you enable profiling, the system will begin collecting timing and execution count data; when you disable profiling or exit @value{GDBN}, the results will be written to a log file. Remember that if you use profiling, @value{GDBN} will overwrite the profiling log file (often called @file{gmon.out}). If you have a record of important profiling data in a @file{gmon.out} file, be sure to move it to a safe location. Configuring with @samp{--enable-profiling} arranges for @value{GDBN} to be compiled with the @samp{-pg} compiler option. @kindex maint set show-debug-regs @kindex maint show show-debug-regs @cindex hardware debug registers @item maint set show-debug-regs @itemx maint show show-debug-regs Control whether to show variables that mirror the hardware debug registers. Use @code{ON} to enable, @code{OFF} to disable. If enabled, the debug registers values are shown when @value{GDBN} inserts or removes a hardware breakpoint or watchpoint, and when the inferior triggers a hardware-assisted breakpoint or watchpoint. @kindex maint set show-all-tib @kindex maint show show-all-tib @item maint set show-all-tib @itemx maint show show-all-tib Control whether to show all non zero areas within a 1k block starting at thread local base, when using the @samp{info w32 thread-information-block} command. @kindex maint space @cindex memory used by commands @item maint space Control whether to display memory usage for each command. If set to a nonzero value, @value{GDBN} will display how much memory each command took, following the command's own output. This can also be requested by invoking @value{GDBN} with the @option{--statistics} command-line switch (@pxref{Mode Options}). @kindex maint time @cindex time of command execution @item maint time Control whether to display the execution time of @value{GDBN} for each command. If set to a nonzero value, @value{GDBN} will display how much time it took to execute each command, following the command's own output. Both CPU time and wallclock time are printed. Printing both is useful when trying to determine whether the cost is CPU or, e.g., disk/network, latency. Note that the CPU time printed is for @value{GDBN} only, it does not include the execution time of the inferior because there's no mechanism currently to compute how much time was spent by @value{GDBN} and how much time was spent by the program been debugged. This can also be requested by invoking @value{GDBN} with the @option{--statistics} command-line switch (@pxref{Mode Options}). @kindex maint translate-address @item maint translate-address @r{[}@var{section}@r{]} @var{addr} Find the symbol stored at the location specified by the address @var{addr} and an optional section name @var{section}. If found, @value{GDBN} prints the name of the closest symbol and an offset from the symbol's location to the specified address. This is similar to the @code{info address} command (@pxref{Symbols}), except that this command also allows to find symbols in other sections. If section was not specified, the section in which the symbol was found is also printed. For dynamically linked executables, the name of executable or shared library containing the symbol is printed as well. @end table The following command is useful for non-interactive invocations of @value{GDBN}, such as in the test suite. @table @code @item set watchdog @var{nsec} @kindex set watchdog @cindex watchdog timer @cindex timeout for commands Set the maximum number of seconds @value{GDBN} will wait for the target operation to finish. If this time expires, @value{GDBN} reports and error and the command is aborted. @item show watchdog Show the current setting of the target wait timeout. @end table @node Remote Protocol @appendix @value{GDBN} Remote Serial Protocol @menu * Overview:: * Packets:: * Stop Reply Packets:: * General Query Packets:: * Architecture-Specific Protocol Details:: * Tracepoint Packets:: * Host I/O Packets:: * Interrupts:: * Notification Packets:: * Remote Non-Stop:: * Packet Acknowledgment:: * Examples:: * File-I/O Remote Protocol Extension:: * Library List Format:: * Library List Format for SVR4 Targets:: * Memory Map Format:: * Thread List Format:: * Traceframe Info Format:: * Branch Trace Format:: @end menu @node Overview @section Overview There may be occasions when you need to know something about the protocol---for example, if there is only one serial port to your target machine, you might want your program to do something special if it recognizes a packet meant for @value{GDBN}. In the examples below, @samp{->} and @samp{<-} are used to indicate transmitted and received data, respectively. @cindex protocol, @value{GDBN} remote serial @cindex serial protocol, @value{GDBN} remote @cindex remote serial protocol All @value{GDBN} commands and responses (other than acknowledgments and notifications, see @ref{Notification Packets}) are sent as a @var{packet}. A @var{packet} is introduced with the character @samp{$}, the actual @var{packet-data}, and the terminating character @samp{#} followed by a two-digit @var{checksum}: @smallexample @code{$}@var{packet-data}@code{#}@var{checksum} @end smallexample @noindent @cindex checksum, for @value{GDBN} remote @noindent The two-digit @var{checksum} is computed as the modulo 256 sum of all characters between the leading @samp{$} and the trailing @samp{#} (an eight bit unsigned checksum). Implementors should note that prior to @value{GDBN} 5.0 the protocol specification also included an optional two-digit @var{sequence-id}: @smallexample @code{$}@var{sequence-id}@code{:}@var{packet-data}@code{#}@var{checksum} @end smallexample @cindex sequence-id, for @value{GDBN} remote @noindent That @var{sequence-id} was appended to the acknowledgment. @value{GDBN} has never output @var{sequence-id}s. Stubs that handle packets added since @value{GDBN} 5.0 must not accept @var{sequence-id}. When either the host or the target machine receives a packet, the first response expected is an acknowledgment: either @samp{+} (to indicate the package was received correctly) or @samp{-} (to request retransmission): @smallexample -> @code{$}@var{packet-data}@code{#}@var{checksum} <- @code{+} @end smallexample @noindent The @samp{+}/@samp{-} acknowledgments can be disabled once a connection is established. @xref{Packet Acknowledgment}, for details. The host (@value{GDBN}) sends @var{command}s, and the target (the debugging stub incorporated in your program) sends a @var{response}. In the case of step and continue @var{command}s, the response is only sent when the operation has completed, and the target has again stopped all threads in all attached processes. This is the default all-stop mode behavior, but the remote protocol also supports @value{GDBN}'s non-stop execution mode; see @ref{Remote Non-Stop}, for details. @var{packet-data} consists of a sequence of characters with the exception of @samp{#} and @samp{$} (see @samp{X} packet for additional exceptions). @cindex remote protocol, field separator Fields within the packet should be separated using @samp{,} @samp{;} or @samp{:}. Except where otherwise noted all numbers are represented in @sc{hex} with leading zeros suppressed. Implementors should note that prior to @value{GDBN} 5.0, the character @samp{:} could not appear as the third character in a packet (as it would potentially conflict with the @var{sequence-id}). @cindex remote protocol, binary data @anchor{Binary Data} Binary data in most packets is encoded either as two hexadecimal digits per byte of binary data. This allowed the traditional remote protocol to work over connections which were only seven-bit clean. Some packets designed more recently assume an eight-bit clean connection, and use a more efficient encoding to send and receive binary data. The binary data representation uses @code{7d} (@sc{ascii} @samp{@}}) as an escape character. Any escaped byte is transmitted as the escape character followed by the original character XORed with @code{0x20}. For example, the byte @code{0x7d} would be transmitted as the two bytes @code{0x7d 0x5d}. The bytes @code{0x23} (@sc{ascii} @samp{#}), @code{0x24} (@sc{ascii} @samp{$}), and @code{0x7d} (@sc{ascii} @samp{@}}) must always be escaped. Responses sent by the stub must also escape @code{0x2a} (@sc{ascii} @samp{*}), so that it is not interpreted as the start of a run-length encoded sequence (described next). Response @var{data} can be run-length encoded to save space. Run-length encoding replaces runs of identical characters with one instance of the repeated character, followed by a @samp{*} and a repeat count. The repeat count is itself sent encoded, to avoid binary characters in @var{data}: a value of @var{n} is sent as @code{@var{n}+29}. For a repeat count greater or equal to 3, this produces a printable @sc{ascii} character, e.g.@: a space (@sc{ascii} code 32) for a repeat count of 3. (This is because run-length encoding starts to win for counts 3 or more.) Thus, for example, @samp{0* } is a run-length encoding of ``0000'': the space character after @samp{*} means repeat the leading @code{0} @w{@code{32 - 29 = 3}} more times. The printable characters @samp{#} and @samp{$} or with a numeric value greater than 126 must not be used. Runs of six repeats (@samp{#}) or seven repeats (@samp{$}) can be expanded using a repeat count of only five (@samp{"}). For example, @samp{00000000} can be encoded as @samp{0*"00}. The error response returned for some packets includes a two character error number. That number is not well defined. @cindex empty response, for unsupported packets For any @var{command} not supported by the stub, an empty response (@samp{$#00}) should be returned. That way it is possible to extend the protocol. A newer @value{GDBN} can tell if a packet is supported based on that response. At a minimum, a stub is required to support the @samp{g} and @samp{G} commands for register access, and the @samp{m} and @samp{M} commands for memory access. Stubs that only control single-threaded targets can implement run control with the @samp{c} (continue), and @samp{s} (step) commands. Stubs that support multi-threading targets should support the @samp{vCont} command. All other commands are optional. @node Packets @section Packets The following table provides a complete list of all currently defined @var{command}s and their corresponding response @var{data}. @xref{File-I/O Remote Protocol Extension}, for details about the File I/O extension of the remote protocol. Each packet's description has a template showing the packet's overall syntax, followed by an explanation of the packet's meaning. We include spaces in some of the templates for clarity; these are not part of the packet's syntax. No @value{GDBN} packet uses spaces to separate its components. For example, a template like @samp{foo @var{bar} @var{baz}} describes a packet beginning with the three ASCII bytes @samp{foo}, followed by a @var{bar}, followed directly by a @var{baz}. @value{GDBN} does not transmit a space character between the @samp{foo} and the @var{bar}, or between the @var{bar} and the @var{baz}. @cindex @var{thread-id}, in remote protocol @anchor{thread-id syntax} Several packets and replies include a @var{thread-id} field to identify a thread. Normally these are positive numbers with a target-specific interpretation, formatted as big-endian hex strings. A @var{thread-id} can also be a literal @samp{-1} to indicate all threads, or @samp{0} to pick any thread. In addition, the remote protocol supports a multiprocess feature in which the @var{thread-id} syntax is extended to optionally include both process and thread ID fields, as @samp{p@var{pid}.@var{tid}}. The @var{pid} (process) and @var{tid} (thread) components each have the format described above: a positive number with target-specific interpretation formatted as a big-endian hex string, literal @samp{-1} to indicate all processes or threads (respectively), or @samp{0} to indicate an arbitrary process or thread. Specifying just a process, as @samp{p@var{pid}}, is equivalent to @samp{p@var{pid}.-1}. It is an error to specify all processes but a specific thread, such as @samp{p-1.@var{tid}}. Note that the @samp{p} prefix is @emph{not} used for those packets and replies explicitly documented to include a process ID, rather than a @var{thread-id}. The multiprocess @var{thread-id} syntax extensions are only used if both @value{GDBN} and the stub report support for the @samp{multiprocess} feature using @samp{qSupported}. @xref{multiprocess extensions}, for more information. Note that all packet forms beginning with an upper- or lower-case letter, other than those described here, are reserved for future use. Here are the packet descriptions. @table @samp @item ! @cindex @samp{!} packet @anchor{extended mode} Enable extended mode. In extended mode, the remote server is made persistent. The @samp{R} packet is used to restart the program being debugged. Reply: @table @samp @item OK The remote target both supports and has enabled extended mode. @end table @item ? @cindex @samp{?} packet Indicate the reason the target halted. The reply is the same as for step and continue. This packet has a special interpretation when the target is in non-stop mode; see @ref{Remote Non-Stop}. Reply: @xref{Stop Reply Packets}, for the reply specifications. @item A @var{arglen},@var{argnum},@var{arg},@dots{} @cindex @samp{A} packet Initialized @code{argv[]} array passed into program. @var{arglen} specifies the number of bytes in the hex encoded byte stream @var{arg}. See @code{gdbserver} for more details. Reply: @table @samp @item OK The arguments were set. @item E @var{NN} An error occurred. @end table @item b @var{baud} @cindex @samp{b} packet (Don't use this packet; its behavior is not well-defined.) Change the serial line speed to @var{baud}. JTC: @emph{When does the transport layer state change? When it's received, or after the ACK is transmitted. In either case, there are problems if the command or the acknowledgment packet is dropped.} Stan: @emph{If people really wanted to add something like this, and get it working for the first time, they ought to modify ser-unix.c to send some kind of out-of-band message to a specially-setup stub and have the switch happen "in between" packets, so that from remote protocol's point of view, nothing actually happened.} @item B @var{addr},@var{mode} @cindex @samp{B} packet Set (@var{mode} is @samp{S}) or clear (@var{mode} is @samp{C}) a breakpoint at @var{addr}. Don't use this packet. Use the @samp{Z} and @samp{z} packets instead (@pxref{insert breakpoint or watchpoint packet}). @cindex @samp{bc} packet @anchor{bc} @item bc Backward continue. Execute the target system in reverse. No parameter. @xref{Reverse Execution}, for more information. Reply: @xref{Stop Reply Packets}, for the reply specifications. @cindex @samp{bs} packet @anchor{bs} @item bs Backward single step. Execute one instruction in reverse. No parameter. @xref{Reverse Execution}, for more information. Reply: @xref{Stop Reply Packets}, for the reply specifications. @item c @r{[}@var{addr}@r{]} @cindex @samp{c} packet Continue. @var{addr} is address to resume. If @var{addr} is omitted, resume at current address. This packet is deprecated for multi-threading support. @xref{vCont packet}. Reply: @xref{Stop Reply Packets}, for the reply specifications. @item C @var{sig}@r{[};@var{addr}@r{]} @cindex @samp{C} packet Continue with signal @var{sig} (hex signal number). If @samp{;@var{addr}} is omitted, resume at same address. This packet is deprecated for multi-threading support. @xref{vCont packet}. Reply: @xref{Stop Reply Packets}, for the reply specifications. @item d @cindex @samp{d} packet Toggle debug flag. Don't use this packet; instead, define a general set packet (@pxref{General Query Packets}). @item D @itemx D;@var{pid} @cindex @samp{D} packet The first form of the packet is used to detach @value{GDBN} from the remote system. It is sent to the remote target before @value{GDBN} disconnects via the @code{detach} command. The second form, including a process ID, is used when multiprocess protocol extensions are enabled (@pxref{multiprocess extensions}), to detach only a specific process. The @var{pid} is specified as a big-endian hex string. Reply: @table @samp @item OK for success @item E @var{NN} for an error @end table @item F @var{RC},@var{EE},@var{CF};@var{XX} @cindex @samp{F} packet A reply from @value{GDBN} to an @samp{F} packet sent by the target. This is part of the File-I/O protocol extension. @xref{File-I/O Remote Protocol Extension}, for the specification. @item g @anchor{read registers packet} @cindex @samp{g} packet Read general registers. Reply: @table @samp @item @var{XX@dots{}} Each byte of register data is described by two hex digits. The bytes with the register are transmitted in target byte order. The size of each register and their position within the @samp{g} packet are determined by the @value{GDBN} internal gdbarch functions @code{DEPRECATED_REGISTER_RAW_SIZE} and @code{gdbarch_register_name}. The specification of several standard @samp{g} packets is specified below. When reading registers from a trace frame (@pxref{Analyze Collected Data,,Using the Collected Data}), the stub may also return a string of literal @samp{x}'s in place of the register data digits, to indicate that the corresponding register has not been collected, thus its value is unavailable. For example, for an architecture with 4 registers of 4 bytes each, the following reply indicates to @value{GDBN} that registers 0 and 2 have not been collected, while registers 1 and 3 have been collected, and both have zero value: @smallexample -> @code{g} <- @code{xxxxxxxx00000000xxxxxxxx00000000} @end smallexample @item E @var{NN} for an error. @end table @item G @var{XX@dots{}} @cindex @samp{G} packet Write general registers. @xref{read registers packet}, for a description of the @var{XX@dots{}} data. Reply: @table @samp @item OK for success @item E @var{NN} for an error @end table @item H @var{op} @var{thread-id} @cindex @samp{H} packet Set thread for subsequent operations (@samp{m}, @samp{M}, @samp{g}, @samp{G}, et.al.). @var{op} depends on the operation to be performed: it should be @samp{c} for step and continue operations (note that this is deprecated, supporting the @samp{vCont} command is a better option), @samp{g} for other operations. The thread designator @var{thread-id} has the format and interpretation described in @ref{thread-id syntax}. Reply: @table @samp @item OK for success @item E @var{NN} for an error @end table @c FIXME: JTC: @c 'H': How restrictive (or permissive) is the thread model. If a @c thread is selected and stopped, are other threads allowed @c to continue to execute? As I mentioned above, I think the @c semantics of each command when a thread is selected must be @c described. For example: @c @c 'g': If the stub supports threads and a specific thread is @c selected, returns the register block from that thread; @c otherwise returns current registers. @c @c 'G' If the stub supports threads and a specific thread is @c selected, sets the registers of the register block of @c that thread; otherwise sets current registers. @item i @r{[}@var{addr}@r{[},@var{nnn}@r{]]} @anchor{cycle step packet} @cindex @samp{i} packet Step the remote target by a single clock cycle. If @samp{,@var{nnn}} is present, cycle step @var{nnn} cycles. If @var{addr} is present, cycle step starting at that address. @item I @cindex @samp{I} packet Signal, then cycle step. @xref{step with signal packet}. @xref{cycle step packet}. @item k @cindex @samp{k} packet Kill request. FIXME: @emph{There is no description of how to operate when a specific thread context has been selected (i.e.@: does 'k' kill only that thread?)}. @item m @var{addr},@var{length} @cindex @samp{m} packet Read @var{length} bytes of memory starting at address @var{addr}. Note that @var{addr} may not be aligned to any particular boundary. The stub need not use any particular size or alignment when gathering data from memory for the response; even if @var{addr} is word-aligned and @var{length} is a multiple of the word size, the stub is free to use byte accesses, or not. For this reason, this packet may not be suitable for accessing memory-mapped I/O devices. @cindex alignment of remote memory accesses @cindex size of remote memory accesses @cindex memory, alignment and size of remote accesses Reply: @table @samp @item @var{XX@dots{}} Memory contents; each byte is transmitted as a two-digit hexadecimal number. The reply may contain fewer bytes than requested if the server was able to read only part of the region of memory. @item E @var{NN} @var{NN} is errno @end table @item M @var{addr},@var{length}:@var{XX@dots{}} @cindex @samp{M} packet Write @var{length} bytes of memory starting at address @var{addr}. @var{XX@dots{}} is the data; each byte is transmitted as a two-digit hexadecimal number. Reply: @table @samp @item OK for success @item E @var{NN} for an error (this includes the case where only part of the data was written). @end table @item p @var{n} @cindex @samp{p} packet Read the value of register @var{n}; @var{n} is in hex. @xref{read registers packet}, for a description of how the returned register value is encoded. Reply: @table @samp @item @var{XX@dots{}} the register's value @item E @var{NN} for an error @item @w{} Indicating an unrecognized @var{query}. @end table @item P @var{n@dots{}}=@var{r@dots{}} @anchor{write register packet} @cindex @samp{P} packet Write register @var{n@dots{}} with value @var{r@dots{}}. The register number @var{n} is in hexadecimal, and @var{r@dots{}} contains two hex digits for each byte in the register (target byte order). Reply: @table @samp @item OK for success @item E @var{NN} for an error @end table @item q @var{name} @var{params}@dots{} @itemx Q @var{name} @var{params}@dots{} @cindex @samp{q} packet @cindex @samp{Q} packet General query (@samp{q}) and set (@samp{Q}). These packets are described fully in @ref{General Query Packets}. @item r @cindex @samp{r} packet Reset the entire system. Don't use this packet; use the @samp{R} packet instead. @item R @var{XX} @cindex @samp{R} packet Restart the program being debugged. @var{XX}, while needed, is ignored. This packet is only available in extended mode (@pxref{extended mode}). The @samp{R} packet has no reply. @item s @r{[}@var{addr}@r{]} @cindex @samp{s} packet Single step. @var{addr} is the address at which to resume. If @var{addr} is omitted, resume at same address. This packet is deprecated for multi-threading support. @xref{vCont packet}. Reply: @xref{Stop Reply Packets}, for the reply specifications. @item S @var{sig}@r{[};@var{addr}@r{]} @anchor{step with signal packet} @cindex @samp{S} packet Step with signal. This is analogous to the @samp{C} packet, but requests a single-step, rather than a normal resumption of execution. This packet is deprecated for multi-threading support. @xref{vCont packet}. Reply: @xref{Stop Reply Packets}, for the reply specifications. @item t @var{addr}:@var{PP},@var{MM} @cindex @samp{t} packet Search backwards starting at address @var{addr} for a match with pattern @var{PP} and mask @var{MM}. @var{PP} and @var{MM} are 4 bytes. @var{addr} must be at least 3 digits. @item T @var{thread-id} @cindex @samp{T} packet Find out if the thread @var{thread-id} is alive. @xref{thread-id syntax}. Reply: @table @samp @item OK thread is still alive @item E @var{NN} thread is dead @end table @item v Packets starting with @samp{v} are identified by a multi-letter name, up to the first @samp{;} or @samp{?} (or the end of the packet). @item vAttach;@var{pid} @cindex @samp{vAttach} packet Attach to a new process with the specified process ID @var{pid}. The process ID is a hexadecimal integer identifying the process. In all-stop mode, all threads in the attached process are stopped; in non-stop mode, it may be attached without being stopped if that is supported by the target. @c In non-stop mode, on a successful vAttach, the stub should set the @c current thread to a thread of the newly-attached process. After @c attaching, GDB queries for the attached process's thread ID with qC. @c Also note that, from a user perspective, whether or not the @c target is stopped on attach in non-stop mode depends on whether you @c use the foreground or background version of the attach command, not @c on what vAttach does; GDB does the right thing with respect to either @c stopping or restarting threads. This packet is only available in extended mode (@pxref{extended mode}). Reply: @table @samp @item E @var{nn} for an error @item @r{Any stop packet} for success in all-stop mode (@pxref{Stop Reply Packets}) @item OK for success in non-stop mode (@pxref{Remote Non-Stop}) @end table @item vCont@r{[};@var{action}@r{[}:@var{thread-id}@r{]]}@dots{} @cindex @samp{vCont} packet @anchor{vCont packet} Resume the inferior, specifying different actions for each thread. If an action is specified with no @var{thread-id}, then it is applied to any threads that don't have a specific action specified; if no default action is specified then other threads should remain stopped in all-stop mode and in their current state in non-stop mode. Specifying multiple default actions is an error; specifying no actions is also an error. Thread IDs are specified using the syntax described in @ref{thread-id syntax}. Currently supported actions are: @table @samp @item c Continue. @item C @var{sig} Continue with signal @var{sig}. The signal @var{sig} should be two hex digits. @item s Step. @item S @var{sig} Step with signal @var{sig}. The signal @var{sig} should be two hex digits. @item t Stop. @end table The optional argument @var{addr} normally associated with the @samp{c}, @samp{C}, @samp{s}, and @samp{S} packets is not supported in @samp{vCont}. The @samp{t} action is only relevant in non-stop mode (@pxref{Remote Non-Stop}) and may be ignored by the stub otherwise. A stop reply should be generated for any affected thread not already stopped. When a thread is stopped by means of a @samp{t} action, the corresponding stop reply should indicate that the thread has stopped with signal @samp{0}, regardless of whether the target uses some other signal as an implementation detail. The stub must support @samp{vCont} if it reports support for multiprocess extensions (@pxref{multiprocess extensions}). Note that in this case @samp{vCont} actions can be specified to apply to all threads in a process by using the @samp{p@var{pid}.-1} form of the @var{thread-id}. Reply: @xref{Stop Reply Packets}, for the reply specifications. @item vCont? @cindex @samp{vCont?} packet Request a list of actions supported by the @samp{vCont} packet. Reply: @table @samp @item vCont@r{[};@var{action}@dots{}@r{]} The @samp{vCont} packet is supported. Each @var{action} is a supported command in the @samp{vCont} packet. @item @w{} The @samp{vCont} packet is not supported. @end table @item vFile:@var{operation}:@var{parameter}@dots{} @cindex @samp{vFile} packet Perform a file operation on the target system. For details, see @ref{Host I/O Packets}. @item vFlashErase:@var{addr},@var{length} @cindex @samp{vFlashErase} packet Direct the stub to erase @var{length} bytes of flash starting at @var{addr}. The region may enclose any number of flash blocks, but its start and end must fall on block boundaries, as indicated by the flash block size appearing in the memory map (@pxref{Memory Map Format}). @value{GDBN} groups flash memory programming operations together, and sends a @samp{vFlashDone} request after each group; the stub is allowed to delay erase operation until the @samp{vFlashDone} packet is received. Reply: @table @samp @item OK for success @item E @var{NN} for an error @end table @item vFlashWrite:@var{addr}:@var{XX@dots{}} @cindex @samp{vFlashWrite} packet Direct the stub to write data to flash address @var{addr}. The data is passed in binary form using the same encoding as for the @samp{X} packet (@pxref{Binary Data}). The memory ranges specified by @samp{vFlashWrite} packets preceding a @samp{vFlashDone} packet must not overlap, and must appear in order of increasing addresses (although @samp{vFlashErase} packets for higher addresses may already have been received; the ordering is guaranteed only between @samp{vFlashWrite} packets). If a packet writes to an address that was neither erased by a preceding @samp{vFlashErase} packet nor by some other target-specific method, the results are unpredictable. Reply: @table @samp @item OK for success @item E.memtype for vFlashWrite addressing non-flash memory @item E @var{NN} for an error @end table @item vFlashDone @cindex @samp{vFlashDone} packet Indicate to the stub that flash programming operation is finished. The stub is permitted to delay or batch the effects of a group of @samp{vFlashErase} and @samp{vFlashWrite} packets until a @samp{vFlashDone} packet is received. The contents of the affected regions of flash memory are unpredictable until the @samp{vFlashDone} request is completed. @item vKill;@var{pid} @cindex @samp{vKill} packet Kill the process with the specified process ID. @var{pid} is a hexadecimal integer identifying the process. This packet is used in preference to @samp{k} when multiprocess protocol extensions are supported; see @ref{multiprocess extensions}. Reply: @table @samp @item E @var{nn} for an error @item OK for success @end table @item vRun;@var{filename}@r{[};@var{argument}@r{]}@dots{} @cindex @samp{vRun} packet Run the program @var{filename}, passing it each @var{argument} on its command line. The file and arguments are hex-encoded strings. If @var{filename} is an empty string, the stub may use a default program (e.g.@: the last program run). The program is created in the stopped state. @c FIXME: What about non-stop mode? This packet is only available in extended mode (@pxref{extended mode}). Reply: @table @samp @item E @var{nn} for an error @item @r{Any stop packet} for success (@pxref{Stop Reply Packets}) @end table @item vStopped @cindex @samp{vStopped} packet @xref{Notification Packets}. @item X @var{addr},@var{length}:@var{XX@dots{}} @anchor{X packet} @cindex @samp{X} packet Write data to memory, where the data is transmitted in binary. @var{addr} is address, @var{length} is number of bytes, @samp{@var{XX}@dots{}} is binary data (@pxref{Binary Data}). Reply: @table @samp @item OK for success @item E @var{NN} for an error @end table @item z @var{type},@var{addr},@var{kind} @itemx Z @var{type},@var{addr},@var{kind} @anchor{insert breakpoint or watchpoint packet} @cindex @samp{z} packet @cindex @samp{Z} packets Insert (@samp{Z}) or remove (@samp{z}) a @var{type} breakpoint or watchpoint starting at address @var{address} of kind @var{kind}. Each breakpoint and watchpoint packet @var{type} is documented separately. @emph{Implementation notes: A remote target shall return an empty string for an unrecognized breakpoint or watchpoint packet @var{type}. A remote target shall support either both or neither of a given @samp{Z@var{type}@dots{}} and @samp{z@var{type}@dots{}} packet pair. To avoid potential problems with duplicate packets, the operations should be implemented in an idempotent way.} @item z0,@var{addr},@var{kind} @itemx Z0,@var{addr},@var{kind}@r{[};@var{cond_list}@dots{}@r{]}@r{[};cmds:@var{persist},@var{cmd_list}@dots{}@r{]} @cindex @samp{z0} packet @cindex @samp{Z0} packet Insert (@samp{Z0}) or remove (@samp{z0}) a memory breakpoint at address @var{addr} of type @var{kind}. A memory breakpoint is implemented by replacing the instruction at @var{addr} with a software breakpoint or trap instruction. The @var{kind} is target-specific and typically indicates the size of the breakpoint in bytes that should be inserted. E.g., the @sc{arm} and @sc{mips} can insert either a 2 or 4 byte breakpoint. Some architectures have additional meanings for @var{kind}; @var{cond_list} is an optional list of conditional expressions in bytecode form that should be evaluated on the target's side. These are the conditions that should be taken into consideration when deciding if the breakpoint trigger should be reported back to @var{GDBN}. The @var{cond_list} parameter is comprised of a series of expressions, concatenated without separators. Each expression has the following form: @table @samp @item X @var{len},@var{expr} @var{len} is the length of the bytecode expression and @var{expr} is the actual conditional expression in bytecode form. @end table The optional @var{cmd_list} parameter introduces commands that may be run on the target, rather than being reported back to @value{GDBN}. The parameter starts with a numeric flag @var{persist}; if the flag is nonzero, then the breakpoint may remain active and the commands continue to be run even when @value{GDBN} disconnects from the target. Following this flag is a series of expressions concatenated with no separators. Each expression has the following form: @table @samp @item X @var{len},@var{expr} @var{len} is the length of the bytecode expression and @var{expr} is the actual conditional expression in bytecode form. @end table see @ref{Architecture-Specific Protocol Details}. @emph{Implementation note: It is possible for a target to copy or move code that contains memory breakpoints (e.g., when implementing overlays). The behavior of this packet, in the presence of such a target, is not defined.} Reply: @table @samp @item OK success @item @w{} not supported @item E @var{NN} for an error @end table @item z1,@var{addr},@var{kind} @itemx Z1,@var{addr},@var{kind}@r{[};@var{cond_list}@dots{}@r{]} @cindex @samp{z1} packet @cindex @samp{Z1} packet Insert (@samp{Z1}) or remove (@samp{z1}) a hardware breakpoint at address @var{addr}. A hardware breakpoint is implemented using a mechanism that is not dependant on being able to modify the target's memory. @var{kind} and @var{cond_list} have the same meaning as in @samp{Z0} packets. @emph{Implementation note: A hardware breakpoint is not affected by code movement.} Reply: @table @samp @item OK success @item @w{} not supported @item E @var{NN} for an error @end table @item z2,@var{addr},@var{kind} @itemx Z2,@var{addr},@var{kind} @cindex @samp{z2} packet @cindex @samp{Z2} packet Insert (@samp{Z2}) or remove (@samp{z2}) a write watchpoint at @var{addr}. @var{kind} is interpreted as the number of bytes to watch. Reply: @table @samp @item OK success @item @w{} not supported @item E @var{NN} for an error @end table @item z3,@var{addr},@var{kind} @itemx Z3,@var{addr},@var{kind} @cindex @samp{z3} packet @cindex @samp{Z3} packet Insert (@samp{Z3}) or remove (@samp{z3}) a read watchpoint at @var{addr}. @var{kind} is interpreted as the number of bytes to watch. Reply: @table @samp @item OK success @item @w{} not supported @item E @var{NN} for an error @end table @item z4,@var{addr},@var{kind} @itemx Z4,@var{addr},@var{kind} @cindex @samp{z4} packet @cindex @samp{Z4} packet Insert (@samp{Z4}) or remove (@samp{z4}) an access watchpoint at @var{addr}. @var{kind} is interpreted as the number of bytes to watch. Reply: @table @samp @item OK success @item @w{} not supported @item E @var{NN} for an error @end table @end table @node Stop Reply Packets @section Stop Reply Packets @cindex stop reply packets The @samp{C}, @samp{c}, @samp{S}, @samp{s}, @samp{vCont}, @samp{vAttach}, @samp{vRun}, @samp{vStopped}, and @samp{?} packets can receive any of the below as a reply. Except for @samp{?} and @samp{vStopped}, that reply is only returned when the target halts. In the below the exact meaning of @dfn{signal number} is defined by the header @file{include/gdb/signals.h} in the @value{GDBN} source code. As in the description of request packets, we include spaces in the reply templates for clarity; these are not part of the reply packet's syntax. No @value{GDBN} stop reply packet uses spaces to separate its components. @table @samp @item S @var{AA} The program received signal number @var{AA} (a two-digit hexadecimal number). This is equivalent to a @samp{T} response with no @var{n}:@var{r} pairs. @item T @var{AA} @var{n1}:@var{r1};@var{n2}:@var{r2};@dots{} @cindex @samp{T} packet reply The program received signal number @var{AA} (a two-digit hexadecimal number). This is equivalent to an @samp{S} response, except that the @samp{@var{n}:@var{r}} pairs can carry values of important registers and other information directly in the stop reply packet, reducing round-trip latency. Single-step and breakpoint traps are reported this way. Each @samp{@var{n}:@var{r}} pair is interpreted as follows: @itemize @bullet @item If @var{n} is a hexadecimal number, it is a register number, and the corresponding @var{r} gives that register's value. @var{r} is a series of bytes in target byte order, with each byte given by a two-digit hex number. @item If @var{n} is @samp{thread}, then @var{r} is the @var{thread-id} of the stopped thread, as specified in @ref{thread-id syntax}. @item If @var{n} is @samp{core}, then @var{r} is the hexadecimal number of the core on which the stop event was detected. @item If @var{n} is a recognized @dfn{stop reason}, it describes a more specific event that stopped the target. The currently defined stop reasons are listed below. @var{aa} should be @samp{05}, the trap signal. At most one stop reason should be present. @item Otherwise, @value{GDBN} should ignore this @samp{@var{n}:@var{r}} pair and go on to the next; this allows us to extend the protocol in the future. @end itemize The currently defined stop reasons are: @table @samp @item watch @itemx rwatch @itemx awatch The packet indicates a watchpoint hit, and @var{r} is the data address, in hex. @cindex shared library events, remote reply @item library The packet indicates that the loaded libraries have changed. @value{GDBN} should use @samp{qXfer:libraries:read} to fetch a new list of loaded libraries. @var{r} is ignored. @cindex replay log events, remote reply @item replaylog The packet indicates that the target cannot continue replaying logged execution events, because it has reached the end (or the beginning when executing backward) of the log. The value of @var{r} will be either @samp{begin} or @samp{end}. @xref{Reverse Execution}, for more information. @end table @item W @var{AA} @itemx W @var{AA} ; process:@var{pid} The process exited, and @var{AA} is the exit status. This is only applicable to certain targets. The second form of the response, including the process ID of the exited process, can be used only when @value{GDBN} has reported support for multiprocess protocol extensions; see @ref{multiprocess extensions}. The @var{pid} is formatted as a big-endian hex string. @item X @var{AA} @itemx X @var{AA} ; process:@var{pid} The process terminated with signal @var{AA}. The second form of the response, including the process ID of the terminated process, can be used only when @value{GDBN} has reported support for multiprocess protocol extensions; see @ref{multiprocess extensions}. The @var{pid} is formatted as a big-endian hex string. @item O @var{XX}@dots{} @samp{@var{XX}@dots{}} is hex encoding of @sc{ascii} data, to be written as the program's console output. This can happen at any time while the program is running and the debugger should continue to wait for @samp{W}, @samp{T}, etc. This reply is not permitted in non-stop mode. @item F @var{call-id},@var{parameter}@dots{} @var{call-id} is the identifier which says which host system call should be called. This is just the name of the function. Translation into the correct system call is only applicable as it's defined in @value{GDBN}. @xref{File-I/O Remote Protocol Extension}, for a list of implemented system calls. @samp{@var{parameter}@dots{}} is a list of parameters as defined for this very system call. The target replies with this packet when it expects @value{GDBN} to call a host system call on behalf of the target. @value{GDBN} replies with an appropriate @samp{F} packet and keeps up waiting for the next reply packet from the target. The latest @samp{C}, @samp{c}, @samp{S} or @samp{s} action is expected to be continued. @xref{File-I/O Remote Protocol Extension}, for more details. @end table @node General Query Packets @section General Query Packets @cindex remote query requests Packets starting with @samp{q} are @dfn{general query packets}; packets starting with @samp{Q} are @dfn{general set packets}. General query and set packets are a semi-unified form for retrieving and sending information to and from the stub. The initial letter of a query or set packet is followed by a name indicating what sort of thing the packet applies to. For example, @value{GDBN} may use a @samp{qSymbol} packet to exchange symbol definitions with the stub. These packet names follow some conventions: @itemize @bullet @item The name must not contain commas, colons or semicolons. @item Most @value{GDBN} query and set packets have a leading upper case letter. @item The names of custom vendor packets should use a company prefix, in lower case, followed by a period. For example, packets designed at the Acme Corporation might begin with @samp{qacme.foo} (for querying foos) or @samp{Qacme.bar} (for setting bars). @end itemize The name of a query or set packet should be separated from any parameters by a @samp{:}; the parameters themselves should be separated by @samp{,} or @samp{;}. Stubs must be careful to match the full packet name, and check for a separator or the end of the packet, in case two packet names share a common prefix. New packets should not begin with @samp{qC}, @samp{qP}, or @samp{qL}@footnote{The @samp{qP} and @samp{qL} packets predate these conventions, and have arguments without any terminator for the packet name; we suspect they are in widespread use in places that are difficult to upgrade. The @samp{qC} packet has no arguments, but some existing stubs (e.g.@: RedBoot) are known to not check for the end of the packet.}. Like the descriptions of the other packets, each description here has a template showing the packet's overall syntax, followed by an explanation of the packet's meaning. We include spaces in some of the templates for clarity; these are not part of the packet's syntax. No @value{GDBN} packet uses spaces to separate its components. Here are the currently defined query and set packets: @table @samp @item QAgent:1 @itemx QAgent:0 Turn on or off the agent as a helper to perform some debugging operations delegated from @value{GDBN} (@pxref{Control Agent}). @item QAllow:@var{op}:@var{val}@dots{} @cindex @samp{QAllow} packet Specify which operations @value{GDBN} expects to request of the target, as a semicolon-separated list of operation name and value pairs. Possible values for @var{op} include @samp{WriteReg}, @samp{WriteMem}, @samp{InsertBreak}, @samp{InsertTrace}, @samp{InsertFastTrace}, and @samp{Stop}. @var{val} is either 0, indicating that @value{GDBN} will not request the operation, or 1, indicating that it may. (The target can then use this to set up its own internals optimally, for instance if the debugger never expects to insert breakpoints, it may not need to install its own trap handler.) @item qC @cindex current thread, remote request @cindex @samp{qC} packet Return the current thread ID. Reply: @table @samp @item QC @var{thread-id} Where @var{thread-id} is a thread ID as documented in @ref{thread-id syntax}. @item @r{(anything else)} Any other reply implies the old thread ID. @end table @item qCRC:@var{addr},@var{length} @cindex CRC of memory block, remote request @cindex @samp{qCRC} packet Compute the CRC checksum of a block of memory using CRC-32 defined in IEEE 802.3. The CRC is computed byte at a time, taking the most significant bit of each byte first. The initial pattern code @code{0xffffffff} is used to ensure leading zeros affect the CRC. @emph{Note:} This is the same CRC used in validating separate debug files (@pxref{Separate Debug Files, , Debugging Information in Separate Files}). However the algorithm is slightly different. When validating separate debug files, the CRC is computed taking the @emph{least} significant bit of each byte first, and the final result is inverted to detect trailing zeros. Reply: @table @samp @item E @var{NN} An error (such as memory fault) @item C @var{crc32} The specified memory region's checksum is @var{crc32}. @end table @item QDisableRandomization:@var{value} @cindex disable address space randomization, remote request @cindex @samp{QDisableRandomization} packet Some target operating systems will randomize the virtual address space of the inferior process as a security feature, but provide a feature to disable such randomization, e.g.@: to allow for a more deterministic debugging experience. On such systems, this packet with a @var{value} of 1 directs the target to disable address space randomization for processes subsequently started via @samp{vRun} packets, while a packet with a @var{value} of 0 tells the target to enable address space randomization. This packet is only available in extended mode (@pxref{extended mode}). Reply: @table @samp @item OK The request succeeded. @item E @var{nn} An error occurred. @var{nn} are hex digits. @item @w{} An empty reply indicates that @samp{QDisableRandomization} is not supported by the stub. @end table This packet is not probed by default; the remote stub must request it, by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). This should only be done on targets that actually support disabling address space randomization. @item qfThreadInfo @itemx qsThreadInfo @cindex list active threads, remote request @cindex @samp{qfThreadInfo} packet @cindex @samp{qsThreadInfo} packet Obtain a list of all active thread IDs from the target (OS). Since there may be too many active threads to fit into one reply packet, this query works iteratively: it may require more than one query/reply sequence to obtain the entire list of threads. The first query of the sequence will be the @samp{qfThreadInfo} query; subsequent queries in the sequence will be the @samp{qsThreadInfo} query. NOTE: This packet replaces the @samp{qL} query (see below). Reply: @table @samp @item m @var{thread-id} A single thread ID @item m @var{thread-id},@var{thread-id}@dots{} a comma-separated list of thread IDs @item l (lower case letter @samp{L}) denotes end of list. @end table In response to each query, the target will reply with a list of one or more thread IDs, separated by commas. @value{GDBN} will respond to each reply with a request for more thread ids (using the @samp{qs} form of the query), until the target responds with @samp{l} (lower-case ell, for @dfn{last}). Refer to @ref{thread-id syntax}, for the format of the @var{thread-id} fields. @item qGetTLSAddr:@var{thread-id},@var{offset},@var{lm} @cindex get thread-local storage address, remote request @cindex @samp{qGetTLSAddr} packet Fetch the address associated with thread local storage specified by @var{thread-id}, @var{offset}, and @var{lm}. @var{thread-id} is the thread ID associated with the thread for which to fetch the TLS address. @xref{thread-id syntax}. @var{offset} is the (big endian, hex encoded) offset associated with the thread local variable. (This offset is obtained from the debug information associated with the variable.) @var{lm} is the (big endian, hex encoded) OS/ABI-specific encoding of the load module associated with the thread local storage. For example, a @sc{gnu}/Linux system will pass the link map address of the shared object associated with the thread local storage under consideration. Other operating environments may choose to represent the load module differently, so the precise meaning of this parameter will vary. Reply: @table @samp @item @var{XX}@dots{} Hex encoded (big endian) bytes representing the address of the thread local storage requested. @item E @var{nn} An error occurred. @var{nn} are hex digits. @item @w{} An empty reply indicates that @samp{qGetTLSAddr} is not supported by the stub. @end table @item qGetTIBAddr:@var{thread-id} @cindex get thread information block address @cindex @samp{qGetTIBAddr} packet Fetch address of the Windows OS specific Thread Information Block. @var{thread-id} is the thread ID associated with the thread. Reply: @table @samp @item @var{XX}@dots{} Hex encoded (big endian) bytes representing the linear address of the thread information block. @item E @var{nn} An error occured. This means that either the thread was not found, or the address could not be retrieved. @item @w{} An empty reply indicates that @samp{qGetTIBAddr} is not supported by the stub. @end table @item qL @var{startflag} @var{threadcount} @var{nextthread} Obtain thread information from RTOS. Where: @var{startflag} (one hex digit) is one to indicate the first query and zero to indicate a subsequent query; @var{threadcount} (two hex digits) is the maximum number of threads the response packet can contain; and @var{nextthread} (eight hex digits), for subsequent queries (@var{startflag} is zero), is returned in the response as @var{argthread}. Don't use this packet; use the @samp{qfThreadInfo} query instead (see above). Reply: @table @samp @item qM @var{count} @var{done} @var{argthread} @var{thread}@dots{} Where: @var{count} (two hex digits) is the number of threads being returned; @var{done} (one hex digit) is zero to indicate more threads and one indicates no further threads; @var{argthreadid} (eight hex digits) is @var{nextthread} from the request packet; @var{thread}@dots{} is a sequence of thread IDs from the target. @var{threadid} (eight hex digits). See @code{remote.c:parse_threadlist_response()}. @end table @item qOffsets @cindex section offsets, remote request @cindex @samp{qOffsets} packet Get section offsets that the target used when relocating the downloaded image. Reply: @table @samp @item Text=@var{xxx};Data=@var{yyy}@r{[};Bss=@var{zzz}@r{]} Relocate the @code{Text} section by @var{xxx} from its original address. Relocate the @code{Data} section by @var{yyy} from its original address. If the object file format provides segment information (e.g.@: @sc{elf} @samp{PT_LOAD} program headers), @value{GDBN} will relocate entire segments by the supplied offsets. @emph{Note: while a @code{Bss} offset may be included in the response, @value{GDBN} ignores this and instead applies the @code{Data} offset to the @code{Bss} section.} @item TextSeg=@var{xxx}@r{[};DataSeg=@var{yyy}@r{]} Relocate the first segment of the object file, which conventionally contains program code, to a starting address of @var{xxx}. If @samp{DataSeg} is specified, relocate the second segment, which conventionally contains modifiable data, to a starting address of @var{yyy}. @value{GDBN} will report an error if the object file does not contain segment information, or does not contain at least as many segments as mentioned in the reply. Extra segments are kept at fixed offsets relative to the last relocated segment. @end table @item qP @var{mode} @var{thread-id} @cindex thread information, remote request @cindex @samp{qP} packet Returns information on @var{thread-id}. Where: @var{mode} is a hex encoded 32 bit mode; @var{thread-id} is a thread ID (@pxref{thread-id syntax}). Don't use this packet; use the @samp{qThreadExtraInfo} query instead (see below). Reply: see @code{remote.c:remote_unpack_thread_info_response()}. @item QNonStop:1 @itemx QNonStop:0 @cindex non-stop mode, remote request @cindex @samp{QNonStop} packet @anchor{QNonStop} Enter non-stop (@samp{QNonStop:1}) or all-stop (@samp{QNonStop:0}) mode. @xref{Remote Non-Stop}, for more information. Reply: @table @samp @item OK The request succeeded. @item E @var{nn} An error occurred. @var{nn} are hex digits. @item @w{} An empty reply indicates that @samp{QNonStop} is not supported by the stub. @end table This packet is not probed by default; the remote stub must request it, by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). Use of this packet is controlled by the @code{set non-stop} command; @pxref{Non-Stop Mode}. @item QPassSignals: @var{signal} @r{[};@var{signal}@r{]}@dots{} @cindex pass signals to inferior, remote request @cindex @samp{QPassSignals} packet @anchor{QPassSignals} Each listed @var{signal} should be passed directly to the inferior process. Signals are numbered identically to continue packets and stop replies (@pxref{Stop Reply Packets}). Each @var{signal} list item should be strictly greater than the previous item. These signals do not need to stop the inferior, or be reported to @value{GDBN}. All other signals should be reported to @value{GDBN}. Multiple @samp{QPassSignals} packets do not combine; any earlier @samp{QPassSignals} list is completely replaced by the new list. This packet improves performance when using @samp{handle @var{signal} nostop noprint pass}. Reply: @table @samp @item OK The request succeeded. @item E @var{nn} An error occurred. @var{nn} are hex digits. @item @w{} An empty reply indicates that @samp{QPassSignals} is not supported by the stub. @end table Use of this packet is controlled by the @code{set remote pass-signals} command (@pxref{Remote Configuration, set remote pass-signals}). This packet is not probed by default; the remote stub must request it, by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). @item QProgramSignals: @var{signal} @r{[};@var{signal}@r{]}@dots{} @cindex signals the inferior may see, remote request @cindex @samp{QProgramSignals} packet @anchor{QProgramSignals} Each listed @var{signal} may be delivered to the inferior process. Others should be silently discarded. In some cases, the remote stub may need to decide whether to deliver a signal to the program or not without @value{GDBN} involvement. One example of that is while detaching --- the program's threads may have stopped for signals that haven't yet had a chance of being reported to @value{GDBN}, and so the remote stub can use the signal list specified by this packet to know whether to deliver or ignore those pending signals. This does not influence whether to deliver a signal as requested by a resumption packet (@pxref{vCont packet}). Signals are numbered identically to continue packets and stop replies (@pxref{Stop Reply Packets}). Each @var{signal} list item should be strictly greater than the previous item. Multiple @samp{QProgramSignals} packets do not combine; any earlier @samp{QProgramSignals} list is completely replaced by the new list. Reply: @table @samp @item OK The request succeeded. @item E @var{nn} An error occurred. @var{nn} are hex digits. @item @w{} An empty reply indicates that @samp{QProgramSignals} is not supported by the stub. @end table Use of this packet is controlled by the @code{set remote program-signals} command (@pxref{Remote Configuration, set remote program-signals}). This packet is not probed by default; the remote stub must request it, by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). @item qRcmd,@var{command} @cindex execute remote command, remote request @cindex @samp{qRcmd} packet @var{command} (hex encoded) is passed to the local interpreter for execution. Invalid commands should be reported using the output string. Before the final result packet, the target may also respond with a number of intermediate @samp{O@var{output}} console output packets. @emph{Implementors should note that providing access to a stubs's interpreter may have security implications}. Reply: @table @samp @item OK A command response with no output. @item @var{OUTPUT} A command response with the hex encoded output string @var{OUTPUT}. @item E @var{NN} Indicate a badly formed request. @item @w{} An empty reply indicates that @samp{qRcmd} is not recognized. @end table (Note that the @code{qRcmd} packet's name is separated from the command by a @samp{,}, not a @samp{:}, contrary to the naming conventions above. Please don't use this packet as a model for new packets.) @item qSearch:memory:@var{address};@var{length};@var{search-pattern} @cindex searching memory, in remote debugging @ifnotinfo @cindex @samp{qSearch:memory} packet @end ifnotinfo @cindex @samp{qSearch memory} packet @anchor{qSearch memory} Search @var{length} bytes at @var{address} for @var{search-pattern}. @var{address} and @var{length} are encoded in hex. @var{search-pattern} is a sequence of bytes, hex encoded. Reply: @table @samp @item 0 The pattern was not found. @item 1,address The pattern was found at @var{address}. @item E @var{NN} A badly formed request or an error was encountered while searching memory. @item @w{} An empty reply indicates that @samp{qSearch:memory} is not recognized. @end table @item QStartNoAckMode @cindex @samp{QStartNoAckMode} packet @anchor{QStartNoAckMode} Request that the remote stub disable the normal @samp{+}/@samp{-} protocol acknowledgments (@pxref{Packet Acknowledgment}). Reply: @table @samp @item OK The stub has switched to no-acknowledgment mode. @value{GDBN} acknowledges this reponse, but neither the stub nor @value{GDBN} shall send or expect further @samp{+}/@samp{-} acknowledgments in the current connection. @item @w{} An empty reply indicates that the stub does not support no-acknowledgment mode. @end table @item qSupported @r{[}:@var{gdbfeature} @r{[};@var{gdbfeature}@r{]}@dots{} @r{]} @cindex supported packets, remote query @cindex features of the remote protocol @cindex @samp{qSupported} packet @anchor{qSupported} Tell the remote stub about features supported by @value{GDBN}, and query the stub for features it supports. This packet allows @value{GDBN} and the remote stub to take advantage of each others' features. @samp{qSupported} also consolidates multiple feature probes at startup, to improve @value{GDBN} performance---a single larger packet performs better than multiple smaller probe packets on high-latency links. Some features may enable behavior which must not be on by default, e.g.@: because it would confuse older clients or stubs. Other features may describe packets which could be automatically probed for, but are not. These features must be reported before @value{GDBN} will use them. This ``default unsupported'' behavior is not appropriate for all packets, but it helps to keep the initial connection time under control with new versions of @value{GDBN} which support increasing numbers of packets. Reply: @table @samp @item @var{stubfeature} @r{[};@var{stubfeature}@r{]}@dots{} The stub supports or does not support each returned @var{stubfeature}, depending on the form of each @var{stubfeature} (see below for the possible forms). @item @w{} An empty reply indicates that @samp{qSupported} is not recognized, or that no features needed to be reported to @value{GDBN}. @end table The allowed forms for each feature (either a @var{gdbfeature} in the @samp{qSupported} packet, or a @var{stubfeature} in the response) are: @table @samp @item @var{name}=@var{value} The remote protocol feature @var{name} is supported, and associated with the specified @var{value}. The format of @var{value} depends on the feature, but it must not include a semicolon. @item @var{name}+ The remote protocol feature @var{name} is supported, and does not need an associated value. @item @var{name}- The remote protocol feature @var{name} is not supported. @item @var{name}? The remote protocol feature @var{name} may be supported, and @value{GDBN} should auto-detect support in some other way when it is needed. This form will not be used for @var{gdbfeature} notifications, but may be used for @var{stubfeature} responses. @end table Whenever the stub receives a @samp{qSupported} request, the supplied set of @value{GDBN} features should override any previous request. This allows @value{GDBN} to put the stub in a known state, even if the stub had previously been communicating with a different version of @value{GDBN}. The following values of @var{gdbfeature} (for the packet sent by @value{GDBN}) are defined: @table @samp @item multiprocess This feature indicates whether @value{GDBN} supports multiprocess extensions to the remote protocol. @value{GDBN} does not use such extensions unless the stub also reports that it supports them by including @samp{multiprocess+} in its @samp{qSupported} reply. @xref{multiprocess extensions}, for details. @item xmlRegisters This feature indicates that @value{GDBN} supports the XML target description. If the stub sees @samp{xmlRegisters=} with target specific strings separated by a comma, it will report register description. @item qRelocInsn This feature indicates whether @value{GDBN} supports the @samp{qRelocInsn} packet (@pxref{Tracepoint Packets,,Relocate instruction reply packet}). @end table Stubs should ignore any unknown values for @var{gdbfeature}. Any @value{GDBN} which sends a @samp{qSupported} packet supports receiving packets of unlimited length (earlier versions of @value{GDBN} may reject overly long responses). Additional values for @var{gdbfeature} may be defined in the future to let the stub take advantage of new features in @value{GDBN}, e.g.@: incompatible improvements in the remote protocol---the @samp{multiprocess} feature is an example of such a feature. The stub's reply should be independent of the @var{gdbfeature} entries sent by @value{GDBN}; first @value{GDBN} describes all the features it supports, and then the stub replies with all the features it supports. Similarly, @value{GDBN} will silently ignore unrecognized stub feature responses, as long as each response uses one of the standard forms. Some features are flags. A stub which supports a flag feature should respond with a @samp{+} form response. Other features require values, and the stub should respond with an @samp{=} form response. Each feature has a default value, which @value{GDBN} will use if @samp{qSupported} is not available or if the feature is not mentioned in the @samp{qSupported} response. The default values are fixed; a stub is free to omit any feature responses that match the defaults. Not all features can be probed, but for those which can, the probing mechanism is useful: in some cases, a stub's internal architecture may not allow the protocol layer to know some information about the underlying target in advance. This is especially common in stubs which may be configured for multiple targets. These are the currently defined stub features and their properties: @multitable @columnfractions 0.35 0.2 0.12 0.2 @c NOTE: The first row should be @headitem, but we do not yet require @c a new enough version of Texinfo (4.7) to use @headitem. @item Feature Name @tab Value Required @tab Default @tab Probe Allowed @item @samp{PacketSize} @tab Yes @tab @samp{-} @tab No @item @samp{qXfer:auxv:read} @tab No @tab @samp{-} @tab Yes @item @samp{qXfer:btrace:read} @tab No @tab @samp{-} @tab Yes @item @samp{qXfer:features:read} @tab No @tab @samp{-} @tab Yes @item @samp{qXfer:libraries:read} @tab No @tab @samp{-} @tab Yes @item @samp{qXfer:memory-map:read} @tab No @tab @samp{-} @tab Yes @item @samp{qXfer:sdata:read} @tab No @tab @samp{-} @tab Yes @item @samp{qXfer:spu:read} @tab No @tab @samp{-} @tab Yes @item @samp{qXfer:spu:write} @tab No @tab @samp{-} @tab Yes @item @samp{qXfer:siginfo:read} @tab No @tab @samp{-} @tab Yes @item @samp{qXfer:siginfo:write} @tab No @tab @samp{-} @tab Yes @item @samp{qXfer:threads:read} @tab No @tab @samp{-} @tab Yes @item @samp{qXfer:traceframe-info:read} @tab No @tab @samp{-} @tab Yes @item @samp{qXfer:uib:read} @tab No @tab @samp{-} @tab Yes @item @samp{qXfer:fdpic:read} @tab No @tab @samp{-} @tab Yes @item @samp{Qbtrace:off} @tab Yes @tab @samp{-} @tab Yes @item @samp{Qbtrace:bts} @tab Yes @tab @samp{-} @tab Yes @item @samp{QNonStop} @tab No @tab @samp{-} @tab Yes @item @samp{QPassSignals} @tab No @tab @samp{-} @tab Yes @item @samp{QStartNoAckMode} @tab No @tab @samp{-} @tab Yes @item @samp{multiprocess} @tab No @tab @samp{-} @tab No @item @samp{ConditionalBreakpoints} @tab No @tab @samp{-} @tab No @item @samp{ConditionalTracepoints} @tab No @tab @samp{-} @tab No @item @samp{ReverseContinue} @tab No @tab @samp{-} @tab No @item @samp{ReverseStep} @tab No @tab @samp{-} @tab No @item @samp{TracepointSource} @tab No @tab @samp{-} @tab No @item @samp{QAgent} @tab No @tab @samp{-} @tab No @item @samp{QAllow} @tab No @tab @samp{-} @tab No @item @samp{QDisableRandomization} @tab No @tab @samp{-} @tab No @item @samp{EnableDisableTracepoints} @tab No @tab @samp{-} @tab No @item @samp{QTBuffer:size} @tab No @tab @samp{-} @tab No @item @samp{tracenz} @tab No @tab @samp{-} @tab No @item @samp{BreakpointCommands} @tab No @tab @samp{-} @tab No @end multitable These are the currently defined stub features, in more detail: @table @samp @cindex packet size, remote protocol @item PacketSize=@var{bytes} The remote stub can accept packets up to at least @var{bytes} in length. @value{GDBN} will send packets up to this size for bulk transfers, and will never send larger packets. This is a limit on the data characters in the packet, including the frame and checksum. There is no trailing NUL byte in a remote protocol packet; if the stub stores packets in a NUL-terminated format, it should allow an extra byte in its buffer for the NUL. If this stub feature is not supported, @value{GDBN} guesses based on the size of the @samp{g} packet response. @item qXfer:auxv:read The remote stub understands the @samp{qXfer:auxv:read} packet (@pxref{qXfer auxiliary vector read}). @item qXfer:btrace:read The remote stub understands the @samp{qXfer:btrace:read} packet (@pxref{qXfer btrace read}). @item qXfer:features:read The remote stub understands the @samp{qXfer:features:read} packet (@pxref{qXfer target description read}). @item qXfer:libraries:read The remote stub understands the @samp{qXfer:libraries:read} packet (@pxref{qXfer library list read}). @item qXfer:libraries-svr4:read The remote stub understands the @samp{qXfer:libraries-svr4:read} packet (@pxref{qXfer svr4 library list read}). @item qXfer:memory-map:read The remote stub understands the @samp{qXfer:memory-map:read} packet (@pxref{qXfer memory map read}). @item qXfer:sdata:read The remote stub understands the @samp{qXfer:sdata:read} packet (@pxref{qXfer sdata read}). @item qXfer:spu:read The remote stub understands the @samp{qXfer:spu:read} packet (@pxref{qXfer spu read}). @item qXfer:spu:write The remote stub understands the @samp{qXfer:spu:write} packet (@pxref{qXfer spu write}). @item qXfer:siginfo:read The remote stub understands the @samp{qXfer:siginfo:read} packet (@pxref{qXfer siginfo read}). @item qXfer:siginfo:write The remote stub understands the @samp{qXfer:siginfo:write} packet (@pxref{qXfer siginfo write}). @item qXfer:threads:read The remote stub understands the @samp{qXfer:threads:read} packet (@pxref{qXfer threads read}). @item qXfer:traceframe-info:read The remote stub understands the @samp{qXfer:traceframe-info:read} packet (@pxref{qXfer traceframe info read}). @item qXfer:uib:read The remote stub understands the @samp{qXfer:uib:read} packet (@pxref{qXfer unwind info block}). @item qXfer:fdpic:read The remote stub understands the @samp{qXfer:fdpic:read} packet (@pxref{qXfer fdpic loadmap read}). @item QNonStop The remote stub understands the @samp{QNonStop} packet (@pxref{QNonStop}). @item QPassSignals The remote stub understands the @samp{QPassSignals} packet (@pxref{QPassSignals}). @item QStartNoAckMode The remote stub understands the @samp{QStartNoAckMode} packet and prefers to operate in no-acknowledgment mode. @xref{Packet Acknowledgment}. @item multiprocess @anchor{multiprocess extensions} @cindex multiprocess extensions, in remote protocol The remote stub understands the multiprocess extensions to the remote protocol syntax. The multiprocess extensions affect the syntax of thread IDs in both packets and replies (@pxref{thread-id syntax}), and add process IDs to the @samp{D} packet and @samp{W} and @samp{X} replies. Note that reporting this feature indicates support for the syntactic extensions only, not that the stub necessarily supports debugging of more than one process at a time. The stub must not use multiprocess extensions in packet replies unless @value{GDBN} has also indicated it supports them in its @samp{qSupported} request. @item qXfer:osdata:read The remote stub understands the @samp{qXfer:osdata:read} packet ((@pxref{qXfer osdata read}). @item ConditionalBreakpoints The target accepts and implements evaluation of conditional expressions defined for breakpoints. The target will only report breakpoint triggers when such conditions are true (@pxref{Conditions, ,Break Conditions}). @item ConditionalTracepoints The remote stub accepts and implements conditional expressions defined for tracepoints (@pxref{Tracepoint Conditions}). @item ReverseContinue The remote stub accepts and implements the reverse continue packet (@pxref{bc}). @item ReverseStep The remote stub accepts and implements the reverse step packet (@pxref{bs}). @item TracepointSource The remote stub understands the @samp{QTDPsrc} packet that supplies the source form of tracepoint definitions. @item QAgent The remote stub understands the @samp{QAgent} packet. @item QAllow The remote stub understands the @samp{QAllow} packet. @item QDisableRandomization The remote stub understands the @samp{QDisableRandomization} packet. @item StaticTracepoint @cindex static tracepoints, in remote protocol The remote stub supports static tracepoints. @item InstallInTrace @anchor{install tracepoint in tracing} The remote stub supports installing tracepoint in tracing. @item EnableDisableTracepoints The remote stub supports the @samp{QTEnable} (@pxref{QTEnable}) and @samp{QTDisable} (@pxref{QTDisable}) packets that allow tracepoints to be enabled and disabled while a trace experiment is running. @item QTBuffer:size The remote stub supports the @samp{QTBuffer:size} (@pxref{QTBuffer-size}) packet that allows to change the size of the trace buffer. @item tracenz @cindex string tracing, in remote protocol The remote stub supports the @samp{tracenz} bytecode for collecting strings. See @ref{Bytecode Descriptions} for details about the bytecode. @item BreakpointCommands @cindex breakpoint commands, in remote protocol The remote stub supports running a breakpoint's command list itself, rather than reporting the hit to @value{GDBN}. @item Qbtrace:off The remote stub understands the @samp{Qbtrace:off} packet. @item Qbtrace:bts The remote stub understands the @samp{Qbtrace:bts} packet. @end table @item qSymbol:: @cindex symbol lookup, remote request @cindex @samp{qSymbol} packet Notify the target that @value{GDBN} is prepared to serve symbol lookup requests. Accept requests from the target for the values of symbols. Reply: @table @samp @item OK The target does not need to look up any (more) symbols. @item qSymbol:@var{sym_name} The target requests the value of symbol @var{sym_name} (hex encoded). @value{GDBN} may provide the value by using the @samp{qSymbol:@var{sym_value}:@var{sym_name}} message, described below. @end table @item qSymbol:@var{sym_value}:@var{sym_name} Set the value of @var{sym_name} to @var{sym_value}. @var{sym_name} (hex encoded) is the name of a symbol whose value the target has previously requested. @var{sym_value} (hex) is the value for symbol @var{sym_name}. If @value{GDBN} cannot supply a value for @var{sym_name}, then this field will be empty. Reply: @table @samp @item OK The target does not need to look up any (more) symbols. @item qSymbol:@var{sym_name} The target requests the value of a new symbol @var{sym_name} (hex encoded). @value{GDBN} will continue to supply the values of symbols (if available), until the target ceases to request them. @end table @item qTBuffer @itemx QTBuffer @itemx QTDisconnected @itemx QTDP @itemx QTDPsrc @itemx QTDV @itemx qTfP @itemx qTfV @itemx QTFrame @itemx qTMinFTPILen @xref{Tracepoint Packets}. @item qThreadExtraInfo,@var{thread-id} @cindex thread attributes info, remote request @cindex @samp{qThreadExtraInfo} packet Obtain a printable string description of a thread's attributes from the target OS. @var{thread-id} is a thread ID; see @ref{thread-id syntax}. This string may contain anything that the target OS thinks is interesting for @value{GDBN} to tell the user about the thread. The string is displayed in @value{GDBN}'s @code{info threads} display. Some examples of possible thread extra info strings are @samp{Runnable}, or @samp{Blocked on Mutex}. Reply: @table @samp @item @var{XX}@dots{} Where @samp{@var{XX}@dots{}} is a hex encoding of @sc{ascii} data, comprising the printable string containing the extra information about the thread's attributes. @end table (Note that the @code{qThreadExtraInfo} packet's name is separated from the command by a @samp{,}, not a @samp{:}, contrary to the naming conventions above. Please don't use this packet as a model for new packets.) @item QTNotes @itemx qTP @itemx QTSave @itemx qTsP @itemx qTsV @itemx QTStart @itemx QTStop @itemx QTEnable @itemx QTDisable @itemx QTinit @itemx QTro @itemx qTStatus @itemx qTV @itemx qTfSTM @itemx qTsSTM @itemx qTSTMat @xref{Tracepoint Packets}. @item qXfer:@var{object}:read:@var{annex}:@var{offset},@var{length} @cindex read special object, remote request @cindex @samp{qXfer} packet @anchor{qXfer read} Read uninterpreted bytes from the target's special data area identified by the keyword @var{object}. Request @var{length} bytes starting at @var{offset} bytes into the data. The content and encoding of @var{annex} is specific to @var{object}; it can supply additional details about what data to access. Here are the specific requests of this form defined so far. All @samp{qXfer:@var{object}:read:@dots{}} requests use the same reply formats, listed below. @table @samp @item qXfer:auxv:read::@var{offset},@var{length} @anchor{qXfer auxiliary vector read} Access the target's @dfn{auxiliary vector}. @xref{OS Information, auxiliary vector}. Note @var{annex} must be empty. This packet is not probed by default; the remote stub must request it, by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). @item qXfer:btrace:read:@var{annex}:@var{offset},@var{length} @anchor{qXfer btrace read} Return a description of the current branch trace. @xref{Branch Trace Format}. The annex part of the generic @samp{qXfer} packet may have one of the following values: @table @code @item all Returns all available branch trace. @item new Returns all available branch trace if the branch trace changed since the last read request. @end table This packet is not probed by default; the remote stub must request it by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). @item qXfer:features:read:@var{annex}:@var{offset},@var{length} @anchor{qXfer target description read} Access the @dfn{target description}. @xref{Target Descriptions}. The annex specifies which XML document to access. The main description is always loaded from the @samp{target.xml} annex. This packet is not probed by default; the remote stub must request it, by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). @item qXfer:libraries:read:@var{annex}:@var{offset},@var{length} @anchor{qXfer library list read} Access the target's list of loaded libraries. @xref{Library List Format}. The annex part of the generic @samp{qXfer} packet must be empty (@pxref{qXfer read}). Targets which maintain a list of libraries in the program's memory do not need to implement this packet; it is designed for platforms where the operating system manages the list of loaded libraries. This packet is not probed by default; the remote stub must request it, by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). @item qXfer:libraries-svr4:read:@var{annex}:@var{offset},@var{length} @anchor{qXfer svr4 library list read} Access the target's list of loaded libraries when the target is an SVR4 platform. @xref{Library List Format for SVR4 Targets}. The annex part of the generic @samp{qXfer} packet must be empty (@pxref{qXfer read}). This packet is optional for better performance on SVR4 targets. @value{GDBN} uses memory read packets to read the SVR4 library list otherwise. This packet is not probed by default; the remote stub must request it, by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). @item qXfer:memory-map:read::@var{offset},@var{length} @anchor{qXfer memory map read} Access the target's @dfn{memory-map}. @xref{Memory Map Format}. The annex part of the generic @samp{qXfer} packet must be empty (@pxref{qXfer read}). This packet is not probed by default; the remote stub must request it, by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). @item qXfer:sdata:read::@var{offset},@var{length} @anchor{qXfer sdata read} Read contents of the extra collected static tracepoint marker information. The annex part of the generic @samp{qXfer} packet must be empty (@pxref{qXfer read}). @xref{Tracepoint Actions,,Tracepoint Action Lists}. This packet is not probed by default; the remote stub must request it, by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). @item qXfer:siginfo:read::@var{offset},@var{length} @anchor{qXfer siginfo read} Read contents of the extra signal information on the target system. The annex part of the generic @samp{qXfer} packet must be empty (@pxref{qXfer read}). This packet is not probed by default; the remote stub must request it, by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). @item qXfer:spu:read:@var{annex}:@var{offset},@var{length} @anchor{qXfer spu read} Read contents of an @code{spufs} file on the target system. The annex specifies which file to read; it must be of the form @file{@var{id}/@var{name}}, where @var{id} specifies an SPU context ID in the target process, and @var{name} identifes the @code{spufs} file in that context to be accessed. This packet is not probed by default; the remote stub must request it, by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). @item qXfer:threads:read::@var{offset},@var{length} @anchor{qXfer threads read} Access the list of threads on target. @xref{Thread List Format}. The annex part of the generic @samp{qXfer} packet must be empty (@pxref{qXfer read}). This packet is not probed by default; the remote stub must request it, by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). @item qXfer:traceframe-info:read::@var{offset},@var{length} @anchor{qXfer traceframe info read} Return a description of the current traceframe's contents. @xref{Traceframe Info Format}. The annex part of the generic @samp{qXfer} packet must be empty (@pxref{qXfer read}). This packet is not probed by default; the remote stub must request it, by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). @item qXfer:uib:read:@var{pc}:@var{offset},@var{length} @anchor{qXfer unwind info block} Return the unwind information block for @var{pc}. This packet is used on OpenVMS/ia64 to ask the kernel unwind information. This packet is not probed by default. @item qXfer:fdpic:read:@var{annex}:@var{offset},@var{length} @anchor{qXfer fdpic loadmap read} Read contents of @code{loadmap}s on the target system. The annex, either @samp{exec} or @samp{interp}, specifies which @code{loadmap}, executable @code{loadmap} or interpreter @code{loadmap} to read. This packet is not probed by default; the remote stub must request it, by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). @item qXfer:osdata:read::@var{offset},@var{length} @anchor{qXfer osdata read} Access the target's @dfn{operating system information}. @xref{Operating System Information}. @end table Reply: @table @samp @item m @var{data} Data @var{data} (@pxref{Binary Data}) has been read from the target. There may be more data at a higher address (although it is permitted to return @samp{m} even for the last valid block of data, as long as at least one byte of data was read). @var{data} may have fewer bytes than the @var{length} in the request. @item l @var{data} Data @var{data} (@pxref{Binary Data}) has been read from the target. There is no more data to be read. @var{data} may have fewer bytes than the @var{length} in the request. @item l The @var{offset} in the request is at the end of the data. There is no more data to be read. @item E00 The request was malformed, or @var{annex} was invalid. @item E @var{nn} The offset was invalid, or there was an error encountered reading the data. @var{nn} is a hex-encoded @code{errno} value. @item @w{} An empty reply indicates the @var{object} string was not recognized by the stub, or that the object does not support reading. @end table @item qXfer:@var{object}:write:@var{annex}:@var{offset}:@var{data}@dots{} @cindex write data into object, remote request @anchor{qXfer write} Write uninterpreted bytes into the target's special data area identified by the keyword @var{object}, starting at @var{offset} bytes into the data. @var{data}@dots{} is the binary-encoded data (@pxref{Binary Data}) to be written. The content and encoding of @var{annex} is specific to @var{object}; it can supply additional details about what data to access. Here are the specific requests of this form defined so far. All @samp{qXfer:@var{object}:write:@dots{}} requests use the same reply formats, listed below. @table @samp @item qXfer:siginfo:write::@var{offset}:@var{data}@dots{} @anchor{qXfer siginfo write} Write @var{data} to the extra signal information on the target system. The annex part of the generic @samp{qXfer} packet must be empty (@pxref{qXfer write}). This packet is not probed by default; the remote stub must request it, by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). @item qXfer:spu:write:@var{annex}:@var{offset}:@var{data}@dots{} @anchor{qXfer spu write} Write @var{data} to an @code{spufs} file on the target system. The annex specifies which file to write; it must be of the form @file{@var{id}/@var{name}}, where @var{id} specifies an SPU context ID in the target process, and @var{name} identifes the @code{spufs} file in that context to be accessed. This packet is not probed by default; the remote stub must request it, by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}). @end table Reply: @table @samp @item @var{nn} @var{nn} (hex encoded) is the number of bytes written. This may be fewer bytes than supplied in the request. @item E00 The request was malformed, or @var{annex} was invalid. @item E @var{nn} The offset was invalid, or there was an error encountered writing the data. @var{nn} is a hex-encoded @code{errno} value. @item @w{} An empty reply indicates the @var{object} string was not recognized by the stub, or that the object does not support writing. @end table @item qXfer:@var{object}:@var{operation}:@dots{} Requests of this form may be added in the future. When a stub does not recognize the @var{object} keyword, or its support for @var{object} does not recognize the @var{operation} keyword, the stub must respond with an empty packet. @item qAttached:@var{pid} @cindex query attached, remote request @cindex @samp{qAttached} packet Return an indication of whether the remote server attached to an existing process or created a new process. When the multiprocess protocol extensions are supported (@pxref{multiprocess extensions}), @var{pid} is an integer in hexadecimal format identifying the target process. Otherwise, @value{GDBN} will omit the @var{pid} field and the query packet will be simplified as @samp{qAttached}. This query is used, for example, to know whether the remote process should be detached or killed when a @value{GDBN} session is ended with the @code{quit} command. Reply: @table @samp @item 1 The remote server attached to an existing process. @item 0 The remote server created a new process. @item E @var{NN} A badly formed request or an error was encountered. @end table @item Qbtrace:bts Enable branch tracing for the current thread using bts tracing. Reply: @table @samp @item OK Branch tracing has been enabled. @item E.errtext A badly formed request or an error was encountered. @end table @item Qbtrace:off Disable branch tracing for the current thread. Reply: @table @samp @item OK Branch tracing has been disabled. @item E.errtext A badly formed request or an error was encountered. @end table @end table @node Architecture-Specific Protocol Details @section Architecture-Specific Protocol Details This section describes how the remote protocol is applied to specific target architectures. Also see @ref{Standard Target Features}, for details of XML target descriptions for each architecture. @menu * ARM-Specific Protocol Details:: * MIPS-Specific Protocol Details:: @end menu @node ARM-Specific Protocol Details @subsection @acronym{ARM}-specific Protocol Details @menu * ARM Breakpoint Kinds:: @end menu @node ARM Breakpoint Kinds @subsubsection @acronym{ARM} Breakpoint Kinds @cindex breakpoint kinds, @acronym{ARM} These breakpoint kinds are defined for the @samp{Z0} and @samp{Z1} packets. @table @r @item 2 16-bit Thumb mode breakpoint. @item 3 32-bit Thumb mode (Thumb-2) breakpoint. @item 4 32-bit @acronym{ARM} mode breakpoint. @end table @node MIPS-Specific Protocol Details @subsection @acronym{MIPS}-specific Protocol Details @menu * MIPS Register packet Format:: * MIPS Breakpoint Kinds:: @end menu @node MIPS Register packet Format @subsubsection @acronym{MIPS} Register Packet Format @cindex register packet format, @acronym{MIPS} The following @code{g}/@code{G} packets have previously been defined. In the below, some thirty-two bit registers are transferred as sixty-four bits. Those registers should be zero/sign extended (which?) to fill the space allocated. Register bytes are transferred in target byte order. The two nibbles within a register byte are transferred most-significant -- least-significant. @table @r @item MIPS32 All registers are transferred as thirty-two bit quantities in the order: 32 general-purpose; sr; lo; hi; bad; cause; pc; 32 floating-point registers; fsr; fir; fp. @item MIPS64 All registers are transferred as sixty-four bit quantities (including thirty-two bit registers such as @code{sr}). The ordering is the same as @code{MIPS32}. @end table @node MIPS Breakpoint Kinds @subsubsection @acronym{MIPS} Breakpoint Kinds @cindex breakpoint kinds, @acronym{MIPS} These breakpoint kinds are defined for the @samp{Z0} and @samp{Z1} packets. @table @r @item 2 16-bit @acronym{MIPS16} mode breakpoint. @item 3 16-bit @acronym{microMIPS} mode breakpoint. @item 4 32-bit standard @acronym{MIPS} mode breakpoint. @item 5 32-bit @acronym{microMIPS} mode breakpoint. @end table @node Tracepoint Packets @section Tracepoint Packets @cindex tracepoint packets @cindex packets, tracepoint Here we describe the packets @value{GDBN} uses to implement tracepoints (@pxref{Tracepoints}). @table @samp @item QTDP:@var{n}:@var{addr}:@var{ena}:@var{step}:@var{pass}[:F@var{flen}][:X@var{len},@var{bytes}]@r{[}-@r{]} @cindex @samp{QTDP} packet Create a new tracepoint, number @var{n}, at @var{addr}. If @var{ena} is @samp{E}, then the tracepoint is enabled; if it is @samp{D}, then the tracepoint is disabled. @var{step} is the tracepoint's step count, and @var{pass} is its pass count. If an @samp{F} is present, then the tracepoint is to be a fast tracepoint, and the @var{flen} is the number of bytes that the target should copy elsewhere to make room for the tracepoint. If an @samp{X} is present, it introduces a tracepoint condition, which consists of a hexadecimal length, followed by a comma and hex-encoded bytes, in a manner similar to action encodings as described below. If the trailing @samp{-} is present, further @samp{QTDP} packets will follow to specify this tracepoint's actions. Replies: @table @samp @item OK The packet was understood and carried out. @item qRelocInsn @xref{Tracepoint Packets,,Relocate instruction reply packet}. @item @w{} The packet was not recognized. @end table @item QTDP:-@var{n}:@var{addr}:@r{[}S@r{]}@var{action}@dots{}@r{[}-@r{]} Define actions to be taken when a tracepoint is hit. @var{n} and @var{addr} must be the same as in the initial @samp{QTDP} packet for this tracepoint. This packet may only be sent immediately after another @samp{QTDP} packet that ended with a @samp{-}. If the trailing @samp{-} is present, further @samp{QTDP} packets will follow, specifying more actions for this tracepoint. In the series of action packets for a given tracepoint, at most one can have an @samp{S} before its first @var{action}. If such a packet is sent, it and the following packets define ``while-stepping'' actions. Any prior packets define ordinary actions --- that is, those taken when the tracepoint is first hit. If no action packet has an @samp{S}, then all the packets in the series specify ordinary tracepoint actions. The @samp{@var{action}@dots{}} portion of the packet is a series of actions, concatenated without separators. Each action has one of the following forms: @table @samp @item R @var{mask} Collect the registers whose bits are set in @var{mask}. @var{mask} is a hexadecimal number whose @var{i}'th bit is set if register number @var{i} should be collected. (The least significant bit is numbered zero.) Note that @var{mask} may be any number of digits long; it may not fit in a 32-bit word. @item M @var{basereg},@var{offset},@var{len} Collect @var{len} bytes of memory starting at the address in register number @var{basereg}, plus @var{offset}. If @var{basereg} is @samp{-1}, then the range has a fixed address: @var{offset} is the address of the lowest byte to collect. The @var{basereg}, @var{offset}, and @var{len} parameters are all unsigned hexadecimal values (the @samp{-1} value for @var{basereg} is a special case). @item X @var{len},@var{expr} Evaluate @var{expr}, whose length is @var{len}, and collect memory as it directs. @var{expr} is an agent expression, as described in @ref{Agent Expressions}. Each byte of the expression is encoded as a two-digit hex number in the packet; @var{len} is the number of bytes in the expression (and thus one-half the number of hex digits in the packet). @end table Any number of actions may be packed together in a single @samp{QTDP} packet, as long as the packet does not exceed the maximum packet length (400 bytes, for many stubs). There may be only one @samp{R} action per tracepoint, and it must precede any @samp{M} or @samp{X} actions. Any registers referred to by @samp{M} and @samp{X} actions must be collected by a preceding @samp{R} action. (The ``while-stepping'' actions are treated as if they were attached to a separate tracepoint, as far as these restrictions are concerned.) Replies: @table @samp @item OK The packet was understood and carried out. @item qRelocInsn @xref{Tracepoint Packets,,Relocate instruction reply packet}. @item @w{} The packet was not recognized. @end table @item QTDPsrc:@var{n}:@var{addr}:@var{type}:@var{start}:@var{slen}:@var{bytes} @cindex @samp{QTDPsrc} packet Specify a source string of tracepoint @var{n} at address @var{addr}. This is useful to get accurate reproduction of the tracepoints originally downloaded at the beginning of the trace run. @var{type} is the name of the tracepoint part, such as @samp{cond} for the tracepoint's conditional expression (see below for a list of types), while @var{bytes} is the string, encoded in hexadecimal. @var{start} is the offset of the @var{bytes} within the overall source string, while @var{slen} is the total length of the source string. This is intended for handling source strings that are longer than will fit in a single packet. @c Add detailed example when this info is moved into a dedicated @c tracepoint descriptions section. The available string types are @samp{at} for the location, @samp{cond} for the conditional, and @samp{cmd} for an action command. @value{GDBN} sends a separate packet for each command in the action list, in the same order in which the commands are stored in the list. The target does not need to do anything with source strings except report them back as part of the replies to the @samp{qTfP}/@samp{qTsP} query packets. Although this packet is optional, and @value{GDBN} will only send it if the target replies with @samp{TracepointSource} @xref{General Query Packets}, it makes both disconnected tracing and trace files much easier to use. Otherwise the user must be careful that the tracepoints in effect while looking at trace frames are identical to the ones in effect during the trace run; even a small discrepancy could cause @samp{tdump} not to work, or a particular trace frame not be found. @item QTDV:@var{n}:@var{value} @cindex define trace state variable, remote request @cindex @samp{QTDV} packet Create a new trace state variable, number @var{n}, with an initial value of @var{value}, which is a 64-bit signed integer. Both @var{n} and @var{value} are encoded as hexadecimal values. @value{GDBN} has the option of not using this packet for initial values of zero; the target should simply create the trace state variables as they are mentioned in expressions. @item QTFrame:@var{n} @cindex @samp{QTFrame} packet Select the @var{n}'th tracepoint frame from the buffer, and use the register and memory contents recorded there to answer subsequent request packets from @value{GDBN}. A successful reply from the stub indicates that the stub has found the requested frame. The response is a series of parts, concatenated without separators, describing the frame we selected. Each part has one of the following forms: @table @samp @item F @var{f} The selected frame is number @var{n} in the trace frame buffer; @var{f} is a hexadecimal number. If @var{f} is @samp{-1}, then there was no frame matching the criteria in the request packet. @item T @var{t} The selected trace frame records a hit of tracepoint number @var{t}; @var{t} is a hexadecimal number. @end table @item QTFrame:pc:@var{addr} Like @samp{QTFrame:@var{n}}, but select the first tracepoint frame after the currently selected frame whose PC is @var{addr}; @var{addr} is a hexadecimal number. @item QTFrame:tdp:@var{t} Like @samp{QTFrame:@var{n}}, but select the first tracepoint frame after the currently selected frame that is a hit of tracepoint @var{t}; @var{t} is a hexadecimal number. @item QTFrame:range:@var{start}:@var{end} Like @samp{QTFrame:@var{n}}, but select the first tracepoint frame after the currently selected frame whose PC is between @var{start} (inclusive) and @var{end} (inclusive); @var{start} and @var{end} are hexadecimal numbers. @item QTFrame:outside:@var{start}:@var{end} Like @samp{QTFrame:range:@var{start}:@var{end}}, but select the first frame @emph{outside} the given range of addresses (exclusive). @item qTMinFTPILen @cindex @samp{qTMinFTPILen} packet This packet requests the minimum length of instruction at which a fast tracepoint (@pxref{Set Tracepoints}) may be placed. For instance, on the 32-bit x86 architecture, it is possible to use a 4-byte jump, but it depends on the target system being able to create trampolines in the first 64K of memory, which might or might not be possible for that system. So the reply to this packet will be 4 if it is able to arrange for that. Replies: @table @samp @item 0 The minimum instruction length is currently unknown. @item @var{length} The minimum instruction length is @var{length}, where @var{length} is greater or equal to 1. @var{length} is a hexadecimal number. A reply of 1 means that a fast tracepoint may be placed on any instruction regardless of size. @item E An error has occurred. @item @w{} An empty reply indicates that the request is not supported by the stub. @end table @item QTStart @cindex @samp{QTStart} packet Begin the tracepoint experiment. Begin collecting data from tracepoint hits in the trace frame buffer. This packet supports the @samp{qRelocInsn} reply (@pxref{Tracepoint Packets,,Relocate instruction reply packet}). @item QTStop @cindex @samp{QTStop} packet End the tracepoint experiment. Stop collecting trace frames. @item QTEnable:@var{n}:@var{addr} @anchor{QTEnable} @cindex @samp{QTEnable} packet Enable tracepoint @var{n} at address @var{addr} in a started tracepoint experiment. If the tracepoint was previously disabled, then collection of data from it will resume. @item QTDisable:@var{n}:@var{addr} @anchor{QTDisable} @cindex @samp{QTDisable} packet Disable tracepoint @var{n} at address @var{addr} in a started tracepoint experiment. No more data will be collected from the tracepoint unless @samp{QTEnable:@var{n}:@var{addr}} is subsequently issued. @item QTinit @cindex @samp{QTinit} packet Clear the table of tracepoints, and empty the trace frame buffer. @item QTro:@var{start1},@var{end1}:@var{start2},@var{end2}:@dots{} @cindex @samp{QTro} packet Establish the given ranges of memory as ``transparent''. The stub will answer requests for these ranges from memory's current contents, if they were not collected as part of the tracepoint hit. @value{GDBN} uses this to mark read-only regions of memory, like those containing program code. Since these areas never change, they should still have the same contents they did when the tracepoint was hit, so there's no reason for the stub to refuse to provide their contents. @item QTDisconnected:@var{value} @cindex @samp{QTDisconnected} packet Set the choice to what to do with the tracing run when @value{GDBN} disconnects from the target. A @var{value} of 1 directs the target to continue the tracing run, while 0 tells the target to stop tracing if @value{GDBN} is no longer in the picture. @item qTStatus @cindex @samp{qTStatus} packet Ask the stub if there is a trace experiment running right now. The reply has the form: @table @samp @item T@var{running}@r{[};@var{field}@r{]}@dots{} @var{running} is a single digit @code{1} if the trace is presently running, or @code{0} if not. It is followed by semicolon-separated optional fields that an agent may use to report additional status. @end table If the trace is not running, the agent may report any of several explanations as one of the optional fields: @table @samp @item tnotrun:0 No trace has been run yet. @item tstop[:@var{text}]:0 The trace was stopped by a user-originated stop command. The optional @var{text} field is a user-supplied string supplied as part of the stop command (for instance, an explanation of why the trace was stopped manually). It is hex-encoded. @item tfull:0 The trace stopped because the trace buffer filled up. @item tdisconnected:0 The trace stopped because @value{GDBN} disconnected from the target. @item tpasscount:@var{tpnum} The trace stopped because tracepoint @var{tpnum} exceeded its pass count. @item terror:@var{text}:@var{tpnum} The trace stopped because tracepoint @var{tpnum} had an error. The string @var{text} is available to describe the nature of the error (for instance, a divide by zero in the condition expression). @var{text} is hex encoded. @item tunknown:0 The trace stopped for some other reason. @end table Additional optional fields supply statistical and other information. Although not required, they are extremely useful for users monitoring the progress of a trace run. If a trace has stopped, and these numbers are reported, they must reflect the state of the just-stopped trace. @table @samp @item tframes:@var{n} The number of trace frames in the buffer. @item tcreated:@var{n} The total number of trace frames created during the run. This may be larger than the trace frame count, if the buffer is circular. @item tsize:@var{n} The total size of the trace buffer, in bytes. @item tfree:@var{n} The number of bytes still unused in the buffer. @item circular:@var{n} The value of the circular trace buffer flag. @code{1} means that the trace buffer is circular and old trace frames will be discarded if necessary to make room, @code{0} means that the trace buffer is linear and may fill up. @item disconn:@var{n} The value of the disconnected tracing flag. @code{1} means that tracing will continue after @value{GDBN} disconnects, @code{0} means that the trace run will stop. @end table @item qTP:@var{tp}:@var{addr} @cindex tracepoint status, remote request @cindex @samp{qTP} packet Ask the stub for the current state of tracepoint number @var{tp} at address @var{addr}. Replies: @table @samp @item V@var{hits}:@var{usage} The tracepoint has been hit @var{hits} times so far during the trace run, and accounts for @var{usage} in the trace buffer. Note that @code{while-stepping} steps are not counted as separate hits, but the steps' space consumption is added into the usage number. @end table @item qTV:@var{var} @cindex trace state variable value, remote request @cindex @samp{qTV} packet Ask the stub for the value of the trace state variable number @var{var}. Replies: @table @samp @item V@var{value} The value of the variable is @var{value}. This will be the current value of the variable if the user is examining a running target, or a saved value if the variable was collected in the trace frame that the user is looking at. Note that multiple requests may result in different reply values, such as when requesting values while the program is running. @item U The value of the variable is unknown. This would occur, for example, if the user is examining a trace frame in which the requested variable was not collected. @end table @item qTfP @cindex @samp{qTfP} packet @itemx qTsP @cindex @samp{qTsP} packet These packets request data about tracepoints that are being used by the target. @value{GDBN} sends @code{qTfP} to get the first piece of data, and multiple @code{qTsP} to get additional pieces. Replies to these packets generally take the form of the @code{QTDP} packets that define tracepoints. (FIXME add detailed syntax) @item qTfV @cindex @samp{qTfV} packet @itemx qTsV @cindex @samp{qTsV} packet These packets request data about trace state variables that are on the target. @value{GDBN} sends @code{qTfV} to get the first vari of data, and multiple @code{qTsV} to get additional variables. Replies to these packets follow the syntax of the @code{QTDV} packets that define trace state variables. @item qTfSTM @itemx qTsSTM @anchor{qTfSTM} @anchor{qTsSTM} @cindex @samp{qTfSTM} packet @cindex @samp{qTsSTM} packet These packets request data about static tracepoint markers that exist in the target program. @value{GDBN} sends @code{qTfSTM} to get the first piece of data, and multiple @code{qTsSTM} to get additional pieces. Replies to these packets take the following form: Reply: @table @samp @item m @var{address}:@var{id}:@var{extra} A single marker @item m @var{address}:@var{id}:@var{extra},@var{address}:@var{id}:@var{extra}@dots{} a comma-separated list of markers @item l (lower case letter @samp{L}) denotes end of list. @item E @var{nn} An error occurred. @var{nn} are hex digits. @item @w{} An empty reply indicates that the request is not supported by the stub. @end table @var{address} is encoded in hex. @var{id} and @var{extra} are strings encoded in hex. In response to each query, the target will reply with a list of one or more markers, separated by commas. @value{GDBN} will respond to each reply with a request for more markers (using the @samp{qs} form of the query), until the target responds with @samp{l} (lower-case ell, for @dfn{last}). @item qTSTMat:@var{address} @anchor{qTSTMat} @cindex @samp{qTSTMat} packet This packets requests data about static tracepoint markers in the target program at @var{address}. Replies to this packet follow the syntax of the @samp{qTfSTM} and @code{qTsSTM} packets that list static tracepoint markers. @item QTSave:@var{filename} @cindex @samp{QTSave} packet This packet directs the target to save trace data to the file name @var{filename} in the target's filesystem. @var{filename} is encoded as a hex string; the interpretation of the file name (relative vs absolute, wild cards, etc) is up to the target. @item qTBuffer:@var{offset},@var{len} @cindex @samp{qTBuffer} packet Return up to @var{len} bytes of the current contents of trace buffer, starting at @var{offset}. The trace buffer is treated as if it were a contiguous collection of traceframes, as per the trace file format. The reply consists as many hex-encoded bytes as the target can deliver in a packet; it is not an error to return fewer than were asked for. A reply consisting of just @code{l} indicates that no bytes are available. @item QTBuffer:circular:@var{value} This packet directs the target to use a circular trace buffer if @var{value} is 1, or a linear buffer if the value is 0. @item QTBuffer:size:@var{size} @anchor{QTBuffer-size} @cindex @samp{QTBuffer size} packet This packet directs the target to make the trace buffer be of size @var{size} if possible. A value of @code{-1} tells the target to use whatever size it prefers. @item QTNotes:@r{[}@var{type}:@var{text}@r{]}@r{[};@var{type}:@var{text}@r{]}@dots{} @cindex @samp{QTNotes} packet This packet adds optional textual notes to the trace run. Allowable types include @code{user}, @code{notes}, and @code{tstop}, the @var{text} fields are arbitrary strings, hex-encoded. @end table @subsection Relocate instruction reply packet When installing fast tracepoints in memory, the target may need to relocate the instruction currently at the tracepoint address to a different address in memory. For most instructions, a simple copy is enough, but, for example, call instructions that implicitly push the return address on the stack, and relative branches or other PC-relative instructions require offset adjustment, so that the effect of executing the instruction at a different address is the same as if it had executed in the original location. In response to several of the tracepoint packets, the target may also respond with a number of intermediate @samp{qRelocInsn} request packets before the final result packet, to have @value{GDBN} handle this relocation operation. If a packet supports this mechanism, its documentation will explicitly say so. See for example the above descriptions for the @samp{QTStart} and @samp{QTDP} packets. The format of the request is: @table @samp @item qRelocInsn:@var{from};@var{to} This requests @value{GDBN} to copy instruction at address @var{from} to address @var{to}, possibly adjusted so that executing the instruction at @var{to} has the same effect as executing it at @var{from}. @value{GDBN} writes the adjusted instruction to target memory starting at @var{to}. @end table Replies: @table @samp @item qRelocInsn:@var{adjusted_size} Informs the stub the relocation is complete. @var{adjusted_size} is the length in bytes of resulting relocated instruction sequence. @item E @var{NN} A badly formed request was detected, or an error was encountered while relocating the instruction. @end table @node Host I/O Packets @section Host I/O Packets @cindex Host I/O, remote protocol @cindex file transfer, remote protocol The @dfn{Host I/O} packets allow @value{GDBN} to perform I/O operations on the far side of a remote link. For example, Host I/O is used to upload and download files to a remote target with its own filesystem. Host I/O uses the same constant values and data structure layout as the target-initiated File-I/O protocol. However, the Host I/O packets are structured differently. The target-initiated protocol relies on target memory to store parameters and buffers. Host I/O requests are initiated by @value{GDBN}, and the target's memory is not involved. @xref{File-I/O Remote Protocol Extension}, for more details on the target-initiated protocol. The Host I/O request packets all encode a single operation along with its arguments. They have this format: @table @samp @item vFile:@var{operation}: @var{parameter}@dots{} @var{operation} is the name of the particular request; the target should compare the entire packet name up to the second colon when checking for a supported operation. The format of @var{parameter} depends on the operation. Numbers are always passed in hexadecimal. Negative numbers have an explicit minus sign (i.e.@: two's complement is not used). Strings (e.g.@: filenames) are encoded as a series of hexadecimal bytes. The last argument to a system call may be a buffer of escaped binary data (@pxref{Binary Data}). @end table The valid responses to Host I/O packets are: @table @samp @item F @var{result} [, @var{errno}] [; @var{attachment}] @var{result} is the integer value returned by this operation, usually non-negative for success and -1 for errors. If an error has occured, @var{errno} will be included in the result. @var{errno} will have a value defined by the File-I/O protocol (@pxref{Errno Values}). For operations which return data, @var{attachment} supplies the data as a binary buffer. Binary buffers in response packets are escaped in the normal way (@pxref{Binary Data}). See the individual packet documentation for the interpretation of @var{result} and @var{attachment}. @item @w{} An empty response indicates that this operation is not recognized. @end table These are the supported Host I/O operations: @table @samp @item vFile:open: @var{pathname}, @var{flags}, @var{mode} Open a file at @var{pathname} and return a file descriptor for it, or return -1 if an error occurs. @var{pathname} is a string, @var{flags} is an integer indicating a mask of open flags (@pxref{Open Flags}), and @var{mode} is an integer indicating a mask of mode bits to use if the file is created (@pxref{mode_t Values}). @xref{open}, for details of the open flags and mode values. @item vFile:close: @var{fd} Close the open file corresponding to @var{fd} and return 0, or -1 if an error occurs. @item vFile:pread: @var{fd}, @var{count}, @var{offset} Read data from the open file corresponding to @var{fd}. Up to @var{count} bytes will be read from the file, starting at @var{offset} relative to the start of the file. The target may read fewer bytes; common reasons include packet size limits and an end-of-file condition. The number of bytes read is returned. Zero should only be returned for a successful read at the end of the file, or if @var{count} was zero. The data read should be returned as a binary attachment on success. If zero bytes were read, the response should include an empty binary attachment (i.e.@: a trailing semicolon). The return value is the number of target bytes read; the binary attachment may be longer if some characters were escaped. @item vFile:pwrite: @var{fd}, @var{offset}, @var{data} Write @var{data} (a binary buffer) to the open file corresponding to @var{fd}. Start the write at @var{offset} from the start of the file. Unlike many @code{write} system calls, there is no separate @var{count} argument; the length of @var{data} in the packet is used. @samp{vFile:write} returns the number of bytes written, which may be shorter than the length of @var{data}, or -1 if an error occurred. @item vFile:unlink: @var{pathname} Delete the file at @var{pathname} on the target. Return 0, or -1 if an error occurs. @var{pathname} is a string. @item vFile:readlink: @var{filename} Read value of symbolic link @var{filename} on the target. Return the number of bytes read, or -1 if an error occurs. The data read should be returned as a binary attachment on success. If zero bytes were read, the response should include an empty binary attachment (i.e.@: a trailing semicolon). The return value is the number of target bytes read; the binary attachment may be longer if some characters were escaped. @end table @node Interrupts @section Interrupts @cindex interrupts (remote protocol) When a program on the remote target is running, @value{GDBN} may attempt to interrupt it by sending a @samp{Ctrl-C}, @code{BREAK} or a @code{BREAK} followed by @code{g}, control of which is specified via @value{GDBN}'s @samp{interrupt-sequence}. The precise meaning of @code{BREAK} is defined by the transport mechanism and may, in fact, be undefined. @value{GDBN} does not currently define a @code{BREAK} mechanism for any of the network interfaces except for TCP, in which case @value{GDBN} sends the @code{telnet} BREAK sequence. @samp{Ctrl-C}, on the other hand, is defined and implemented for all transport mechanisms. It is represented by sending the single byte @code{0x03} without any of the usual packet overhead described in the Overview section (@pxref{Overview}). When a @code{0x03} byte is transmitted as part of a packet, it is considered to be packet data and does @emph{not} represent an interrupt. E.g., an @samp{X} packet (@pxref{X packet}), used for binary downloads, may include an unescaped @code{0x03} as part of its packet. @code{BREAK} followed by @code{g} is also known as Magic SysRq g. When Linux kernel receives this sequence from serial port, it stops execution and connects to gdb. Stubs are not required to recognize these interrupt mechanisms and the precise meaning associated with receipt of the interrupt is implementation defined. If the target supports debugging of multiple threads and/or processes, it should attempt to interrupt all currently-executing threads and processes. If the stub is successful at interrupting the running program, it should send one of the stop reply packets (@pxref{Stop Reply Packets}) to @value{GDBN} as a result of successfully stopping the program in all-stop mode, and a stop reply for each stopped thread in non-stop mode. Interrupts received while the program is stopped are discarded. @node Notification Packets @section Notification Packets @cindex notification packets @cindex packets, notification The @value{GDBN} remote serial protocol includes @dfn{notifications}, packets that require no acknowledgment. Both the GDB and the stub may send notifications (although the only notifications defined at present are sent by the stub). Notifications carry information without incurring the round-trip latency of an acknowledgment, and so are useful for low-impact communications where occasional packet loss is not a problem. A notification packet has the form @samp{% @var{data} # @var{checksum}}, where @var{data} is the content of the notification, and @var{checksum} is a checksum of @var{data}, computed and formatted as for ordinary @value{GDBN} packets. A notification's @var{data} never contains @samp{$}, @samp{%} or @samp{#} characters. Upon receiving a notification, the recipient sends no @samp{+} or @samp{-} to acknowledge the notification's receipt or to report its corruption. Every notification's @var{data} begins with a name, which contains no colon characters, followed by a colon character. Recipients should silently ignore corrupted notifications and notifications they do not understand. Recipients should restart timeout periods on receipt of a well-formed notification, whether or not they understand it. Senders should only send the notifications described here when this protocol description specifies that they are permitted. In the future, we may extend the protocol to permit existing notifications in new contexts; this rule helps older senders avoid confusing newer recipients. (Older versions of @value{GDBN} ignore bytes received until they see the @samp{$} byte that begins an ordinary packet, so new stubs may transmit notifications without fear of confusing older clients. There are no notifications defined for @value{GDBN} to send at the moment, but we assume that most older stubs would ignore them, as well.) Each notification is comprised of three parts: @table @samp @item @var{name}:@var{event} The notification packet is sent by the side that initiates the exchange (currently, only the stub does that), with @var{event} carrying the specific information about the notification. @var{name} is the name of the notification. @item @var{ack} The acknowledge sent by the other side, usually @value{GDBN}, to acknowledge the exchange and request the event. @end table The purpose of an asynchronous notification mechanism is to report to @value{GDBN} that something interesting happened in the remote stub. The remote stub may send notification @var{name}:@var{event} at any time, but @value{GDBN} acknowledges the notification when appropriate. The notification event is pending before @value{GDBN} acknowledges. Only one notification at a time may be pending; if additional events occur before @value{GDBN} has acknowledged the previous notification, they must be queued by the stub for later synchronous transmission in response to @var{ack} packets from @value{GDBN}. Because the notification mechanism is unreliable, the stub is permitted to resend a notification if it believes @value{GDBN} may not have received it. Specifically, notifications may appear when @value{GDBN} is not otherwise reading input from the stub, or when @value{GDBN} is expecting to read a normal synchronous response or a @samp{+}/@samp{-} acknowledgment to a packet it has sent. Notification packets are distinct from any other communication from the stub so there is no ambiguity. After receiving a notification, @value{GDBN} shall acknowledge it by sending a @var{ack} packet as a regular, synchronous request to the stub. Such acknowledgment is not required to happen immediately, as @value{GDBN} is permitted to send other, unrelated packets to the stub first, which the stub should process normally. Upon receiving a @var{ack} packet, if the stub has other queued events to report to @value{GDBN}, it shall respond by sending a normal @var{event}. @value{GDBN} shall then send another @var{ack} packet to solicit further responses; again, it is permitted to send other, unrelated packets as well which the stub should process normally. If the stub receives a @var{ack} packet and there are no additional @var{event} to report, the stub shall return an @samp{OK} response. At this point, @value{GDBN} has finished processing a notification and the stub has completed sending any queued events. @value{GDBN} won't accept any new notifications until the final @samp{OK} is received . If further notification events occur, the stub shall send a new notification, @value{GDBN} shall accept the notification, and the process shall be repeated. The process of asynchronous notification can be illustrated by the following example: @smallexample <- @code{%%Stop:T0505:98e7ffbf;04:4ce6ffbf;08:b1b6e54c;thread:p7526.7526;core:0;} @code{...} -> @code{vStopped} <- @code{T0505:68f37db7;04:40f37db7;08:63850408;thread:p7526.7528;core:0;} -> @code{vStopped} <- @code{T0505:68e3fdb6;04:40e3fdb6;08:63850408;thread:p7526.7529;core:0;} -> @code{vStopped} <- @code{OK} @end smallexample The following notifications are defined: @multitable @columnfractions 0.12 0.12 0.38 0.38 @item Notification @tab Ack @tab Event @tab Description @item Stop @tab vStopped @tab @var{reply}. The @var{reply} has the form of a stop reply, as described in @ref{Stop Reply Packets}. Refer to @ref{Remote Non-Stop}, for information on how these notifications are acknowledged by @value{GDBN}. @tab Report an asynchronous stop event in non-stop mode. @end multitable @node Remote Non-Stop @section Remote Protocol Support for Non-Stop Mode @value{GDBN}'s remote protocol supports non-stop debugging of multi-threaded programs, as described in @ref{Non-Stop Mode}. If the stub supports non-stop mode, it should report that to @value{GDBN} by including @samp{QNonStop+} in its @samp{qSupported} response (@pxref{qSupported}). @value{GDBN} typically sends a @samp{QNonStop} packet only when establishing a new connection with the stub. Entering non-stop mode does not alter the state of any currently-running threads, but targets must stop all threads in any already-attached processes when entering all-stop mode. @value{GDBN} uses the @samp{?} packet as necessary to probe the target state after a mode change. In non-stop mode, when an attached process encounters an event that would otherwise be reported with a stop reply, it uses the asynchronous notification mechanism (@pxref{Notification Packets}) to inform @value{GDBN}. In contrast to all-stop mode, where all threads in all processes are stopped when a stop reply is sent, in non-stop mode only the thread reporting the stop event is stopped. That is, when reporting a @samp{S} or @samp{T} response to indicate completion of a step operation, hitting a breakpoint, or a fault, only the affected thread is stopped; any other still-running threads continue to run. When reporting a @samp{W} or @samp{X} response, all running threads belonging to other attached processes continue to run. In non-stop mode, the target shall respond to the @samp{?} packet as follows. First, any incomplete stop reply notification/@samp{vStopped} sequence in progress is abandoned. The target must begin a new sequence reporting stop events for all stopped threads, whether or not it has previously reported those events to @value{GDBN}. The first stop reply is sent as a synchronous reply to the @samp{?} packet, and subsequent stop replies are sent as responses to @samp{vStopped} packets using the mechanism described above. The target must not send asynchronous stop reply notifications until the sequence is complete. If all threads are running when the target receives the @samp{?} packet, or if the target is not attached to any process, it shall respond @samp{OK}. @node Packet Acknowledgment @section Packet Acknowledgment @cindex acknowledgment, for @value{GDBN} remote @cindex packet acknowledgment, for @value{GDBN} remote By default, when either the host or the target machine receives a packet, the first response expected is an acknowledgment: either @samp{+} (to indicate the package was received correctly) or @samp{-} (to request retransmission). This mechanism allows the @value{GDBN} remote protocol to operate over unreliable transport mechanisms, such as a serial line. In cases where the transport mechanism is itself reliable (such as a pipe or TCP connection), the @samp{+}/@samp{-} acknowledgments are redundant. It may be desirable to disable them in that case to reduce communication overhead, or for other reasons. This can be accomplished by means of the @samp{QStartNoAckMode} packet; @pxref{QStartNoAckMode}. When in no-acknowledgment mode, neither the stub nor @value{GDBN} shall send or expect @samp{+}/@samp{-} protocol acknowledgments. The packet and response format still includes the normal checksum, as described in @ref{Overview}, but the checksum may be ignored by the receiver. If the stub supports @samp{QStartNoAckMode} and prefers to operate in no-acknowledgment mode, it should report that to @value{GDBN} by including @samp{QStartNoAckMode+} in its response to @samp{qSupported}; @pxref{qSupported}. If @value{GDBN} also supports @samp{QStartNoAckMode} and it has not been disabled via the @code{set remote noack-packet off} command (@pxref{Remote Configuration}), @value{GDBN} may then send a @samp{QStartNoAckMode} packet to the stub. Only then may the stub actually turn off packet acknowledgments. @value{GDBN} sends a final @samp{+} acknowledgment of the stub's @samp{OK} response, which can be safely ignored by the stub. Note that @code{set remote noack-packet} command only affects negotiation between @value{GDBN} and the stub when subsequent connections are made; it does not affect the protocol acknowledgment state for any current connection. Since @samp{+}/@samp{-} acknowledgments are enabled by default when a new connection is established, there is also no protocol request to re-enable the acknowledgments for the current connection, once disabled. @node Examples @section Examples Example sequence of a target being re-started. Notice how the restart does not get any direct output: @smallexample -> @code{R00} <- @code{+} @emph{target restarts} -> @code{?} <- @code{+} <- @code{T001:1234123412341234} -> @code{+} @end smallexample Example sequence of a target being stepped by a single instruction: @smallexample -> @code{G1445@dots{}} <- @code{+} -> @code{s} <- @code{+} @emph{time passes} <- @code{T001:1234123412341234} -> @code{+} -> @code{g} <- @code{+} <- @code{1455@dots{}} -> @code{+} @end smallexample @node File-I/O Remote Protocol Extension @section File-I/O Remote Protocol Extension @cindex File-I/O remote protocol extension @menu * File-I/O Overview:: * Protocol Basics:: * The F Request Packet:: * The F Reply Packet:: * The Ctrl-C Message:: * Console I/O:: * List of Supported Calls:: * Protocol-specific Representation of Datatypes:: * Constants:: * File-I/O Examples:: @end menu @node File-I/O Overview @subsection File-I/O Overview @cindex file-i/o overview The @dfn{File I/O remote protocol extension} (short: File-I/O) allows the target to use the host's file system and console I/O to perform various system calls. System calls on the target system are translated into a remote protocol packet to the host system, which then performs the needed actions and returns a response packet to the target system. This simulates file system operations even on targets that lack file systems. The protocol is defined to be independent of both the host and target systems. It uses its own internal representation of datatypes and values. Both @value{GDBN} and the target's @value{GDBN} stub are responsible for translating the system-dependent value representations into the internal protocol representations when data is transmitted. The communication is synchronous. A system call is possible only when @value{GDBN} is waiting for a response from the @samp{C}, @samp{c}, @samp{S} or @samp{s} packets. While @value{GDBN} handles the request for a system call, the target is stopped to allow deterministic access to the target's memory. Therefore File-I/O is not interruptible by target signals. On the other hand, it is possible to interrupt File-I/O by a user interrupt (@samp{Ctrl-C}) within @value{GDBN}. The target's request to perform a host system call does not finish the latest @samp{C}, @samp{c}, @samp{S} or @samp{s} action. That means, after finishing the system call, the target returns to continuing the previous activity (continue, step). No additional continue or step request from @value{GDBN} is required. @smallexample (@value{GDBP}) continue <- target requests 'system call X' target is stopped, @value{GDBN} executes system call -> @value{GDBN} returns result ... target continues, @value{GDBN} returns to wait for the target <- target hits breakpoint and sends a Txx packet @end smallexample The protocol only supports I/O on the console and to regular files on the host file system. Character or block special devices, pipes, named pipes, sockets or any other communication method on the host system are not supported by this protocol. File I/O is not supported in non-stop mode. @node Protocol Basics @subsection Protocol Basics @cindex protocol basics, file-i/o The File-I/O protocol uses the @code{F} packet as the request as well as reply packet. Since a File-I/O system call can only occur when @value{GDBN} is waiting for a response from the continuing or stepping target, the File-I/O request is a reply that @value{GDBN} has to expect as a result of a previous @samp{C}, @samp{c}, @samp{S} or @samp{s} packet. This @code{F} packet contains all information needed to allow @value{GDBN} to call the appropriate host system call: @itemize @bullet @item A unique identifier for the requested system call. @item All parameters to the system call. Pointers are given as addresses in the target memory address space. Pointers to strings are given as pointer/length pair. Numerical values are given as they are. Numerical control flags are given in a protocol-specific representation. @end itemize At this point, @value{GDBN} has to perform the following actions. @itemize @bullet @item If the parameters include pointer values to data needed as input to a system call, @value{GDBN} requests this data from the target with a standard @code{m} packet request. This additional communication has to be expected by the target implementation and is handled as any other @code{m} packet. @item @value{GDBN} translates all value from protocol representation to host representation as needed. Datatypes are coerced into the host types. @item @value{GDBN} calls the system call. @item It then coerces datatypes back to protocol representation. @item If the system call is expected to return data in buffer space specified by pointer parameters to the call, the data is transmitted to the target using a @code{M} or @code{X} packet. This packet has to be expected by the target implementation and is handled as any other @code{M} or @code{X} packet. @end itemize Eventually @value{GDBN} replies with another @code{F} packet which contains all necessary information for the target to continue. This at least contains @itemize @bullet @item Return value. @item @code{errno}, if has been changed by the system call. @item ``Ctrl-C'' flag. @end itemize After having done the needed type and value coercion, the target continues the latest continue or step action. @node The F Request Packet @subsection The @code{F} Request Packet @cindex file-i/o request packet @cindex @code{F} request packet The @code{F} request packet has the following format: @table @samp @item F@var{call-id},@var{parameter@dots{}} @var{call-id} is the identifier to indicate the host system call to be called. This is just the name of the function. @var{parameter@dots{}} are the parameters to the system call. Parameters are hexadecimal integer values, either the actual values in case of scalar datatypes, pointers to target buffer space in case of compound datatypes and unspecified memory areas, or pointer/length pairs in case of string parameters. These are appended to the @var{call-id} as a comma-delimited list. All values are transmitted in ASCII string representation, pointer/length pairs separated by a slash. @end table @node The F Reply Packet @subsection The @code{F} Reply Packet @cindex file-i/o reply packet @cindex @code{F} reply packet The @code{F} reply packet has the following format: @table @samp @item F@var{retcode},@var{errno},@var{Ctrl-C flag};@var{call-specific attachment} @var{retcode} is the return code of the system call as hexadecimal value. @var{errno} is the @code{errno} set by the call, in protocol-specific representation. This parameter can be omitted if the call was successful. @var{Ctrl-C flag} is only sent if the user requested a break. In this case, @var{errno} must be sent as well, even if the call was successful. The @var{Ctrl-C flag} itself consists of the character @samp{C}: @smallexample F0,0,C @end smallexample @noindent or, if the call was interrupted before the host call has been performed: @smallexample F-1,4,C @end smallexample @noindent assuming 4 is the protocol-specific representation of @code{EINTR}. @end table @node The Ctrl-C Message @subsection The @samp{Ctrl-C} Message @cindex ctrl-c message, in file-i/o protocol If the @samp{Ctrl-C} flag is set in the @value{GDBN} reply packet (@pxref{The F Reply Packet}), the target should behave as if it had gotten a break message. The meaning for the target is ``system call interrupted by @code{SIGINT}''. Consequentially, the target should actually stop (as with a break message) and return to @value{GDBN} with a @code{T02} packet. It's important for the target to know in which state the system call was interrupted. There are two possible cases: @itemize @bullet @item The system call hasn't been performed on the host yet. @item The system call on the host has been finished. @end itemize These two states can be distinguished by the target by the value of the returned @code{errno}. If it's the protocol representation of @code{EINTR}, the system call hasn't been performed. This is equivalent to the @code{EINTR} handling on POSIX systems. In any other case, the target may presume that the system call has been finished --- successfully or not --- and should behave as if the break message arrived right after the system call. @value{GDBN} must behave reliably. If the system call has not been called yet, @value{GDBN} may send the @code{F} reply immediately, setting @code{EINTR} as @code{errno} in the packet. If the system call on the host has been finished before the user requests a break, the full action must be finished by @value{GDBN}. This requires sending @code{M} or @code{X} packets as necessary. The @code{F} packet may only be sent when either nothing has happened or the full action has been completed. @node Console I/O @subsection Console I/O @cindex console i/o as part of file-i/o By default and if not explicitly closed by the target system, the file descriptors 0, 1 and 2 are connected to the @value{GDBN} console. Output on the @value{GDBN} console is handled as any other file output operation (@code{write(1, @dots{})} or @code{write(2, @dots{})}). Console input is handled by @value{GDBN} so that after the target read request from file descriptor 0 all following typing is buffered until either one of the following conditions is met: @itemize @bullet @item The user types @kbd{Ctrl-c}. The behaviour is as explained above, and the @code{read} system call is treated as finished. @item The user presses @key{RET}. This is treated as end of input with a trailing newline. @item The user types @kbd{Ctrl-d}. This is treated as end of input. No trailing character (neither newline nor @samp{Ctrl-D}) is appended to the input. @end itemize If the user has typed more characters than fit in the buffer given to the @code{read} call, the trailing characters are buffered in @value{GDBN} until either another @code{read(0, @dots{})} is requested by the target, or debugging is stopped at the user's request. @node List of Supported Calls @subsection List of Supported Calls @cindex list of supported file-i/o calls @menu * open:: * close:: * read:: * write:: * lseek:: * rename:: * unlink:: * stat/fstat:: * gettimeofday:: * isatty:: * system:: @end menu @node open @unnumberedsubsubsec open @cindex open, file-i/o system call @table @asis @item Synopsis: @smallexample int open(const char *pathname, int flags); int open(const char *pathname, int flags, mode_t mode); @end smallexample @item Request: @samp{Fopen,@var{pathptr}/@var{len},@var{flags},@var{mode}} @noindent @var{flags} is the bitwise @code{OR} of the following values: @table @code @item O_CREAT If the file does not exist it will be created. The host rules apply as far as file ownership and time stamps are concerned. @item O_EXCL When used with @code{O_CREAT}, if the file already exists it is an error and open() fails. @item O_TRUNC If the file already exists and the open mode allows writing (@code{O_RDWR} or @code{O_WRONLY} is given) it will be truncated to zero length. @item O_APPEND The file is opened in append mode. @item O_RDONLY The file is opened for reading only. @item O_WRONLY The file is opened for writing only. @item O_RDWR The file is opened for reading and writing. @end table @noindent Other bits are silently ignored. @noindent @var{mode} is the bitwise @code{OR} of the following values: @table @code @item S_IRUSR User has read permission. @item S_IWUSR User has write permission. @item S_IRGRP Group has read permission. @item S_IWGRP Group has write permission. @item S_IROTH Others have read permission. @item S_IWOTH Others have write permission. @end table @noindent Other bits are silently ignored. @item Return value: @code{open} returns the new file descriptor or -1 if an error occurred. @item Errors: @table @code @item EEXIST @var{pathname} already exists and @code{O_CREAT} and @code{O_EXCL} were used. @item EISDIR @var{pathname} refers to a directory. @item EACCES The requested access is not allowed. @item ENAMETOOLONG @var{pathname} was too long. @item ENOENT A directory component in @var{pathname} does not exist. @item ENODEV @var{pathname} refers to a device, pipe, named pipe or socket. @item EROFS @var{pathname} refers to a file on a read-only filesystem and write access was requested. @item EFAULT @var{pathname} is an invalid pointer value. @item ENOSPC No space on device to create the file. @item EMFILE The process already has the maximum number of files open. @item ENFILE The limit on the total number of files open on the system has been reached. @item EINTR The call was interrupted by the user. @end table @end table @node close @unnumberedsubsubsec close @cindex close, file-i/o system call @table @asis @item Synopsis: @smallexample int close(int fd); @end smallexample @item Request: @samp{Fclose,@var{fd}} @item Return value: @code{close} returns zero on success, or -1 if an error occurred. @item Errors: @table @code @item EBADF @var{fd} isn't a valid open file descriptor. @item EINTR The call was interrupted by the user. @end table @end table @node read @unnumberedsubsubsec read @cindex read, file-i/o system call @table @asis @item Synopsis: @smallexample int read(int fd, void *buf, unsigned int count); @end smallexample @item Request: @samp{Fread,@var{fd},@var{bufptr},@var{count}} @item Return value: On success, the number of bytes read is returned. Zero indicates end of file. If count is zero, read returns zero as well. On error, -1 is returned. @item Errors: @table @code @item EBADF @var{fd} is not a valid file descriptor or is not open for reading. @item EFAULT @var{bufptr} is an invalid pointer value. @item EINTR The call was interrupted by the user. @end table @end table @node write @unnumberedsubsubsec write @cindex write, file-i/o system call @table @asis @item Synopsis: @smallexample int write(int fd, const void *buf, unsigned int count); @end smallexample @item Request: @samp{Fwrite,@var{fd},@var{bufptr},@var{count}} @item Return value: On success, the number of bytes written are returned. Zero indicates nothing was written. On error, -1 is returned. @item Errors: @table @code @item EBADF @var{fd} is not a valid file descriptor or is not open for writing. @item EFAULT @var{bufptr} is an invalid pointer value. @item EFBIG An attempt was made to write a file that exceeds the host-specific maximum file size allowed. @item ENOSPC No space on device to write the data. @item EINTR The call was interrupted by the user. @end table @end table @node lseek @unnumberedsubsubsec lseek @cindex lseek, file-i/o system call @table @asis @item Synopsis: @smallexample long lseek (int fd, long offset, int flag); @end smallexample @item Request: @samp{Flseek,@var{fd},@var{offset},@var{flag}} @var{flag} is one of: @table @code @item SEEK_SET The offset is set to @var{offset} bytes. @item SEEK_CUR The offset is set to its current location plus @var{offset} bytes. @item SEEK_END The offset is set to the size of the file plus @var{offset} bytes. @end table @item Return value: On success, the resulting unsigned offset in bytes from the beginning of the file is returned. Otherwise, a value of -1 is returned. @item Errors: @table @code @item EBADF @var{fd} is not a valid open file descriptor. @item ESPIPE @var{fd} is associated with the @value{GDBN} console. @item EINVAL @var{flag} is not a proper value. @item EINTR The call was interrupted by the user. @end table @end table @node rename @unnumberedsubsubsec rename @cindex rename, file-i/o system call @table @asis @item Synopsis: @smallexample int rename(const char *oldpath, const char *newpath); @end smallexample @item Request: @samp{Frename,@var{oldpathptr}/@var{len},@var{newpathptr}/@var{len}} @item Return value: On success, zero is returned. On error, -1 is returned. @item Errors: @table @code @item EISDIR @var{newpath} is an existing directory, but @var{oldpath} is not a directory. @item EEXIST @var{newpath} is a non-empty directory. @item EBUSY @var{oldpath} or @var{newpath} is a directory that is in use by some process. @item EINVAL An attempt was made to make a directory a subdirectory of itself. @item ENOTDIR A component used as a directory in @var{oldpath} or new path is not a directory. Or @var{oldpath} is a directory and @var{newpath} exists but is not a directory. @item EFAULT @var{oldpathptr} or @var{newpathptr} are invalid pointer values. @item EACCES No access to the file or the path of the file. @item ENAMETOOLONG @var{oldpath} or @var{newpath} was too long. @item ENOENT A directory component in @var{oldpath} or @var{newpath} does not exist. @item EROFS The file is on a read-only filesystem. @item ENOSPC The device containing the file has no room for the new directory entry. @item EINTR The call was interrupted by the user. @end table @end table @node unlink @unnumberedsubsubsec unlink @cindex unlink, file-i/o system call @table @asis @item Synopsis: @smallexample int unlink(const char *pathname); @end smallexample @item Request: @samp{Funlink,@var{pathnameptr}/@var{len}} @item Return value: On success, zero is returned. On error, -1 is returned. @item Errors: @table @code @item EACCES No access to the file or the path of the file. @item EPERM The system does not allow unlinking of directories. @item EBUSY The file @var{pathname} cannot be unlinked because it's being used by another process. @item EFAULT @var{pathnameptr} is an invalid pointer value. @item ENAMETOOLONG @var{pathname} was too long. @item ENOENT A directory component in @var{pathname} does not exist. @item ENOTDIR A component of the path is not a directory. @item EROFS The file is on a read-only filesystem. @item EINTR The call was interrupted by the user. @end table @end table @node stat/fstat @unnumberedsubsubsec stat/fstat @cindex fstat, file-i/o system call @cindex stat, file-i/o system call @table @asis @item Synopsis: @smallexample int stat(const char *pathname, struct stat *buf); int fstat(int fd, struct stat *buf); @end smallexample @item Request: @samp{Fstat,@var{pathnameptr}/@var{len},@var{bufptr}}@* @samp{Ffstat,@var{fd},@var{bufptr}} @item Return value: On success, zero is returned. On error, -1 is returned. @item Errors: @table @code @item EBADF @var{fd} is not a valid open file. @item ENOENT A directory component in @var{pathname} does not exist or the path is an empty string. @item ENOTDIR A component of the path is not a directory. @item EFAULT @var{pathnameptr} is an invalid pointer value. @item EACCES No access to the file or the path of the file. @item ENAMETOOLONG @var{pathname} was too long. @item EINTR The call was interrupted by the user. @end table @end table @node gettimeofday @unnumberedsubsubsec gettimeofday @cindex gettimeofday, file-i/o system call @table @asis @item Synopsis: @smallexample int gettimeofday(struct timeval *tv, void *tz); @end smallexample @item Request: @samp{Fgettimeofday,@var{tvptr},@var{tzptr}} @item Return value: On success, 0 is returned, -1 otherwise. @item Errors: @table @code @item EINVAL @var{tz} is a non-NULL pointer. @item EFAULT @var{tvptr} and/or @var{tzptr} is an invalid pointer value. @end table @end table @node isatty @unnumberedsubsubsec isatty @cindex isatty, file-i/o system call @table @asis @item Synopsis: @smallexample int isatty(int fd); @end smallexample @item Request: @samp{Fisatty,@var{fd}} @item Return value: Returns 1 if @var{fd} refers to the @value{GDBN} console, 0 otherwise. @item Errors: @table @code @item EINTR The call was interrupted by the user. @end table @end table Note that the @code{isatty} call is treated as a special case: it returns 1 to the target if the file descriptor is attached to the @value{GDBN} console, 0 otherwise. Implementing through system calls would require implementing @code{ioctl} and would be more complex than needed. @node system @unnumberedsubsubsec system @cindex system, file-i/o system call @table @asis @item Synopsis: @smallexample int system(const char *command); @end smallexample @item Request: @samp{Fsystem,@var{commandptr}/@var{len}} @item Return value: If @var{len} is zero, the return value indicates whether a shell is available. A zero return value indicates a shell is not available. For non-zero @var{len}, the value returned is -1 on error and the return status of the command otherwise. Only the exit status of the command is returned, which is extracted from the host's @code{system} return value by calling @code{WEXITSTATUS(retval)}. In case @file{/bin/sh} could not be executed, 127 is returned. @item Errors: @table @code @item EINTR The call was interrupted by the user. @end table @end table @value{GDBN} takes over the full task of calling the necessary host calls to perform the @code{system} call. The return value of @code{system} on the host is simplified before it's returned to the target. Any termination signal information from the child process is discarded, and the return value consists entirely of the exit status of the called command. Due to security concerns, the @code{system} call is by default refused by @value{GDBN}. The user has to allow this call explicitly with the @code{set remote system-call-allowed 1} command. @table @code @item set remote system-call-allowed @kindex set remote system-call-allowed Control whether to allow the @code{system} calls in the File I/O protocol for the remote target. The default is zero (disabled). @item show remote system-call-allowed @kindex show remote system-call-allowed Show whether the @code{system} calls are allowed in the File I/O protocol. @end table @node Protocol-specific Representation of Datatypes @subsection Protocol-specific Representation of Datatypes @cindex protocol-specific representation of datatypes, in file-i/o protocol @menu * Integral Datatypes:: * Pointer Values:: * Memory Transfer:: * struct stat:: * struct timeval:: @end menu @node Integral Datatypes @unnumberedsubsubsec Integral Datatypes @cindex integral datatypes, in file-i/o protocol The integral datatypes used in the system calls are @code{int}, @code{unsigned int}, @code{long}, @code{unsigned long}, @code{mode_t}, and @code{time_t}. @code{int}, @code{unsigned int}, @code{mode_t} and @code{time_t} are implemented as 32 bit values in this protocol. @code{long} and @code{unsigned long} are implemented as 64 bit types. @xref{Limits}, for corresponding MIN and MAX values (similar to those in @file{limits.h}) to allow range checking on host and target. @code{time_t} datatypes are defined as seconds since the Epoch. All integral datatypes transferred as part of a memory read or write of a structured datatype e.g.@: a @code{struct stat} have to be given in big endian byte order. @node Pointer Values @unnumberedsubsubsec Pointer Values @cindex pointer values, in file-i/o protocol Pointers to target data are transmitted as they are. An exception is made for pointers to buffers for which the length isn't transmitted as part of the function call, namely strings. Strings are transmitted as a pointer/length pair, both as hex values, e.g.@: @smallexample @code{1aaf/12} @end smallexample @noindent which is a pointer to data of length 18 bytes at position 0x1aaf. The length is defined as the full string length in bytes, including the trailing null byte. For example, the string @code{"hello world"} at address 0x123456 is transmitted as @smallexample @code{123456/d} @end smallexample @node Memory Transfer @unnumberedsubsubsec Memory Transfer @cindex memory transfer, in file-i/o protocol Structured data which is transferred using a memory read or write (for example, a @code{struct stat}) is expected to be in a protocol-specific format with all scalar multibyte datatypes being big endian. Translation to this representation needs to be done both by the target before the @code{F} packet is sent, and by @value{GDBN} before it transfers memory to the target. Transferred pointers to structured data should point to the already-coerced data at any time. @node struct stat @unnumberedsubsubsec struct stat @cindex struct stat, in file-i/o protocol The buffer of type @code{struct stat} used by the target and @value{GDBN} is defined as follows: @smallexample struct stat @{ unsigned int st_dev; /* device */ unsigned int st_ino; /* inode */ mode_t st_mode; /* protection */ unsigned int st_nlink; /* number of hard links */ unsigned int st_uid; /* user ID of owner */ unsigned int st_gid; /* group ID of owner */ unsigned int st_rdev; /* device type (if inode device) */ unsigned long st_size; /* total size, in bytes */ unsigned long st_blksize; /* blocksize for filesystem I/O */ unsigned long st_blocks; /* number of blocks allocated */ time_t st_atime; /* time of last access */ time_t st_mtime; /* time of last modification */ time_t st_ctime; /* time of last change */ @}; @end smallexample The integral datatypes conform to the definitions given in the appropriate section (see @ref{Integral Datatypes}, for details) so this structure is of size 64 bytes. The values of several fields have a restricted meaning and/or range of values. @table @code @item st_dev A value of 0 represents a file, 1 the console. @item st_ino No valid meaning for the target. Transmitted unchanged. @item st_mode Valid mode bits are described in @ref{Constants}. Any other bits have currently no meaning for the target. @item st_uid @itemx st_gid @itemx st_rdev No valid meaning for the target. Transmitted unchanged. @item st_atime @itemx st_mtime @itemx st_ctime These values have a host and file system dependent accuracy. Especially on Windows hosts, the file system may not support exact timing values. @end table The target gets a @code{struct stat} of the above representation and is responsible for coercing it to the target representation before continuing. Note that due to size differences between the host, target, and protocol representations of @code{struct stat} members, these members could eventually get truncated on the target. @node struct timeval @unnumberedsubsubsec struct timeval @cindex struct timeval, in file-i/o protocol The buffer of type @code{struct timeval} used by the File-I/O protocol is defined as follows: @smallexample struct timeval @{ time_t tv_sec; /* second */ long tv_usec; /* microsecond */ @}; @end smallexample The integral datatypes conform to the definitions given in the appropriate section (see @ref{Integral Datatypes}, for details) so this structure is of size 8 bytes. @node Constants @subsection Constants @cindex constants, in file-i/o protocol The following values are used for the constants inside of the protocol. @value{GDBN} and target are responsible for translating these values before and after the call as needed. @menu * Open Flags:: * mode_t Values:: * Errno Values:: * Lseek Flags:: * Limits:: @end menu @node Open Flags @unnumberedsubsubsec Open Flags @cindex open flags, in file-i/o protocol All values are given in hexadecimal representation. @smallexample O_RDONLY 0x0 O_WRONLY 0x1 O_RDWR 0x2 O_APPEND 0x8 O_CREAT 0x200 O_TRUNC 0x400 O_EXCL 0x800 @end smallexample @node mode_t Values @unnumberedsubsubsec mode_t Values @cindex mode_t values, in file-i/o protocol All values are given in octal representation. @smallexample S_IFREG 0100000 S_IFDIR 040000 S_IRUSR 0400 S_IWUSR 0200 S_IXUSR 0100 S_IRGRP 040 S_IWGRP 020 S_IXGRP 010 S_IROTH 04 S_IWOTH 02 S_IXOTH 01 @end smallexample @node Errno Values @unnumberedsubsubsec Errno Values @cindex errno values, in file-i/o protocol All values are given in decimal representation. @smallexample EPERM 1 ENOENT 2 EINTR 4 EBADF 9 EACCES 13 EFAULT 14 EBUSY 16 EEXIST 17 ENODEV 19 ENOTDIR 20 EISDIR 21 EINVAL 22 ENFILE 23 EMFILE 24 EFBIG 27 ENOSPC 28 ESPIPE 29 EROFS 30 ENAMETOOLONG 91 EUNKNOWN 9999 @end smallexample @code{EUNKNOWN} is used as a fallback error value if a host system returns any error value not in the list of supported error numbers. @node Lseek Flags @unnumberedsubsubsec Lseek Flags @cindex lseek flags, in file-i/o protocol @smallexample SEEK_SET 0 SEEK_CUR 1 SEEK_END 2 @end smallexample @node Limits @unnumberedsubsubsec Limits @cindex limits, in file-i/o protocol All values are given in decimal representation. @smallexample INT_MIN -2147483648 INT_MAX 2147483647 UINT_MAX 4294967295 LONG_MIN -9223372036854775808 LONG_MAX 9223372036854775807 ULONG_MAX 18446744073709551615 @end smallexample @node File-I/O Examples @subsection File-I/O Examples @cindex file-i/o examples Example sequence of a write call, file descriptor 3, buffer is at target address 0x1234, 6 bytes should be written: @smallexample <- @code{Fwrite,3,1234,6} @emph{request memory read from target} -> @code{m1234,6} <- XXXXXX @emph{return "6 bytes written"} -> @code{F6} @end smallexample Example sequence of a read call, file descriptor 3, buffer is at target address 0x1234, 6 bytes should be read: @smallexample <- @code{Fread,3,1234,6} @emph{request memory write to target} -> @code{X1234,6:XXXXXX} @emph{return "6 bytes read"} -> @code{F6} @end smallexample Example sequence of a read call, call fails on the host due to invalid file descriptor (@code{EBADF}): @smallexample <- @code{Fread,3,1234,6} -> @code{F-1,9} @end smallexample Example sequence of a read call, user presses @kbd{Ctrl-c} before syscall on host is called: @smallexample <- @code{Fread,3,1234,6} -> @code{F-1,4,C} <- @code{T02} @end smallexample Example sequence of a read call, user presses @kbd{Ctrl-c} after syscall on host is called: @smallexample <- @code{Fread,3,1234,6} -> @code{X1234,6:XXXXXX} <- @code{T02} @end smallexample @node Library List Format @section Library List Format @cindex library list format, remote protocol On some platforms, a dynamic loader (e.g.@: @file{ld.so}) runs in the same process as your application to manage libraries. In this case, @value{GDBN} can use the loader's symbol table and normal memory operations to maintain a list of shared libraries. On other platforms, the operating system manages loaded libraries. @value{GDBN} can not retrieve the list of currently loaded libraries through memory operations, so it uses the @samp{qXfer:libraries:read} packet (@pxref{qXfer library list read}) instead. The remote stub queries the target's operating system and reports which libraries are loaded. The @samp{qXfer:libraries:read} packet returns an XML document which lists loaded libraries and their offsets. Each library has an associated name and one or more segment or section base addresses, which report where the library was loaded in memory. For the common case of libraries that are fully linked binaries, the library should have a list of segments. If the target supports dynamic linking of a relocatable object file, its library XML element should instead include a list of allocated sections. The segment or section bases are start addresses, not relocation offsets; they do not depend on the library's link-time base addresses. @value{GDBN} must be linked with the Expat library to support XML library lists. @xref{Expat}. A simple memory map, with one loaded library relocated by a single offset, looks like this: @smallexample @end smallexample Another simple memory map, with one loaded library with three allocated sections (.text, .data, .bss), looks like this: @smallexample
@end smallexample The format of a library list is described by this DTD: @smallexample @end smallexample In addition, segments and section descriptors cannot be mixed within a single library element, and you must supply at least one segment or section for each library. @node Library List Format for SVR4 Targets @section Library List Format for SVR4 Targets @cindex library list format, remote protocol On SVR4 platforms @value{GDBN} can use the symbol table of a dynamic loader (e.g.@: @file{ld.so}) and normal memory operations to maintain a list of shared libraries. Still a special library list provided by this packet is more efficient for the @value{GDBN} remote protocol. The @samp{qXfer:libraries-svr4:read} packet returns an XML document which lists loaded libraries and their SVR4 linker parameters. For each library on SVR4 target, the following parameters are reported: @itemize @minus @item @code{name}, the absolute file name from the @code{l_name} field of @code{struct link_map}. @item @code{lm} with address of @code{struct link_map} used for TLS (Thread Local Storage) access. @item @code{l_addr}, the displacement as read from the field @code{l_addr} of @code{struct link_map}. For prelinked libraries this is not an absolute memory address. It is a displacement of absolute memory address against address the file was prelinked to during the library load. @item @code{l_ld}, which is memory address of the @code{PT_DYNAMIC} segment @end itemize Additionally the single @code{main-lm} attribute specifies address of @code{struct link_map} used for the main executable. This parameter is used for TLS access and its presence is optional. @value{GDBN} must be linked with the Expat library to support XML SVR4 library lists. @xref{Expat}. A simple memory map, with two loaded libraries (which do not use prelink), looks like this: @smallexample @end smallexample The format of an SVR4 library list is described by this DTD: @smallexample @end smallexample @node Memory Map Format @section Memory Map Format @cindex memory map format To be able to write into flash memory, @value{GDBN} needs to obtain a memory map from the target. This section describes the format of the memory map. The memory map is obtained using the @samp{qXfer:memory-map:read} (@pxref{qXfer memory map read}) packet and is an XML document that lists memory regions. @value{GDBN} must be linked with the Expat library to support XML memory maps. @xref{Expat}. The top-level structure of the document is shown below: @smallexample region... @end smallexample Each region can be either: @itemize @item A region of RAM starting at @var{addr} and extending for @var{length} bytes from there: @smallexample @end smallexample @item A region of read-only memory: @smallexample @end smallexample @item A region of flash memory, with erasure blocks @var{blocksize} bytes in length: @smallexample @var{blocksize} @end smallexample @end itemize Regions must not overlap. @value{GDBN} assumes that areas of memory not covered by the memory map are RAM, and uses the ordinary @samp{M} and @samp{X} packets to write to addresses in such ranges. The formal DTD for memory map format is given below: @smallexample @end smallexample @node Thread List Format @section Thread List Format @cindex thread list format To efficiently update the list of threads and their attributes, @value{GDBN} issues the @samp{qXfer:threads:read} packet (@pxref{qXfer threads read}) and obtains the XML document with the following structure: @smallexample ... description ... @end smallexample Each @samp{thread} element must have the @samp{id} attribute that identifies the thread (@pxref{thread-id syntax}). The @samp{core} attribute, if present, specifies which processor core the thread was last executing on. The content of the of @samp{thread} element is interpreted as human-readable auxilliary information. @node Traceframe Info Format @section Traceframe Info Format @cindex traceframe info format To be able to know which objects in the inferior can be examined when inspecting a tracepoint hit, @value{GDBN} needs to obtain the list of memory ranges, registers and trace state variables that have been collected in a traceframe. This list is obtained using the @samp{qXfer:traceframe-info:read} (@pxref{qXfer traceframe info read}) packet and is an XML document. @value{GDBN} must be linked with the Expat library to support XML traceframe info discovery. @xref{Expat}. The top-level structure of the document is shown below: @smallexample block... @end smallexample Each traceframe block can be either: @itemize @item A region of collected memory starting at @var{addr} and extending for @var{length} bytes from there: @smallexample @end smallexample @end itemize The formal DTD for the traceframe info format is given below: @smallexample @end smallexample @node Branch Trace Format @section Branch Trace Format @cindex branch trace format In order to display the branch trace of an inferior thread, @value{GDBN} needs to obtain the list of branches. This list is represented as list of sequential code blocks that are connected via branches. The code in each block has been executed sequentially. This list is obtained using the @samp{qXfer:btrace:read} (@pxref{qXfer btrace read}) packet and is an XML document. @value{GDBN} must be linked with the Expat library to support XML traceframe info discovery. @xref{Expat}. The top-level structure of the document is shown below: @smallexample block... @end smallexample @itemize @item A block of sequentially executed instructions starting at @var{begin} and ending at @var{end}: @smallexample @end smallexample @end itemize The formal DTD for the branch trace format is given below: @smallexample @end smallexample @include agentexpr.texi @node Target Descriptions @appendix Target Descriptions @cindex target descriptions One of the challenges of using @value{GDBN} to debug embedded systems is that there are so many minor variants of each processor architecture in use. It is common practice for vendors to start with a standard processor core --- ARM, PowerPC, or @acronym{MIPS}, for example --- and then make changes to adapt it to a particular market niche. Some architectures have hundreds of variants, available from dozens of vendors. This leads to a number of problems: @itemize @bullet @item With so many different customized processors, it is difficult for the @value{GDBN} maintainers to keep up with the changes. @item Since individual variants may have short lifetimes or limited audiences, it may not be worthwhile to carry information about every variant in the @value{GDBN} source tree. @item When @value{GDBN} does support the architecture of the embedded system at hand, the task of finding the correct architecture name to give the @command{set architecture} command can be error-prone. @end itemize To address these problems, the @value{GDBN} remote protocol allows a target system to not only identify itself to @value{GDBN}, but to actually describe its own features. This lets @value{GDBN} support processor variants it has never seen before --- to the extent that the descriptions are accurate, and that @value{GDBN} understands them. @value{GDBN} must be linked with the Expat library to support XML target descriptions. @xref{Expat}. @menu * Retrieving Descriptions:: How descriptions are fetched from a target. * Target Description Format:: The contents of a target description. * Predefined Target Types:: Standard types available for target descriptions. * Standard Target Features:: Features @value{GDBN} knows about. @end menu @node Retrieving Descriptions @section Retrieving Descriptions Target descriptions can be read from the target automatically, or specified by the user manually. The default behavior is to read the description from the target. @value{GDBN} retrieves it via the remote protocol using @samp{qXfer} requests (@pxref{General Query Packets, qXfer}). The @var{annex} in the @samp{qXfer} packet will be @samp{target.xml}. The contents of the @samp{target.xml} annex are an XML document, of the form described in @ref{Target Description Format}. Alternatively, you can specify a file to read for the target description. If a file is set, the target will not be queried. The commands to specify a file are: @table @code @cindex set tdesc filename @item set tdesc filename @var{path} Read the target description from @var{path}. @cindex unset tdesc filename @item unset tdesc filename Do not read the XML target description from a file. @value{GDBN} will use the description supplied by the current target. @cindex show tdesc filename @item show tdesc filename Show the filename to read for a target description, if any. @end table @node Target Description Format @section Target Description Format @cindex target descriptions, XML format A target description annex is an @uref{http://www.w3.org/XML/, XML} document which complies with the Document Type Definition provided in the @value{GDBN} sources in @file{gdb/features/gdb-target.dtd}. This means you can use generally available tools like @command{xmllint} to check that your feature descriptions are well-formed and valid. However, to help people unfamiliar with XML write descriptions for their targets, we also describe the grammar here. Target descriptions can identify the architecture of the remote target and (for some architectures) provide information about custom register sets. They can also identify the OS ABI of the remote target. @value{GDBN} can use this information to autoconfigure for your target, or to warn you if you connect to an unsupported target. Here is a simple target description: @smallexample i386:x86-64 @end smallexample @noindent This minimal description only says that the target uses the x86-64 architecture. A target description has the following overall form, with [ ] marking optional elements and @dots{} marking repeatable elements. The elements are explained further below. @smallexample @r{[}@var{architecture}@r{]} @r{[}@var{osabi}@r{]} @r{[}@var{compatible}@r{]} @r{[}@var{feature}@dots{}@r{]} @end smallexample @noindent The description is generally insensitive to whitespace and line breaks, under the usual common-sense rules. The XML version declaration and document type declaration can generally be omitted (@value{GDBN} does not require them), but specifying them may be useful for XML validation tools. The @samp{version} attribute for @samp{} may also be omitted, but we recommend including it; if future versions of @value{GDBN} use an incompatible revision of @file{gdb-target.dtd}, they will detect and report the version mismatch. @subsection Inclusion @cindex target descriptions, inclusion @cindex XInclude @ifnotinfo @cindex @end ifnotinfo It can sometimes be valuable to split a target description up into several different annexes, either for organizational purposes, or to share files between different possible target descriptions. You can divide a description into multiple files by replacing any element of the target description with an inclusion directive of the form: @smallexample @end smallexample @noindent When @value{GDBN} encounters an element of this form, it will retrieve the named XML @var{document}, and replace the inclusion directive with the contents of that document. If the current description was read using @samp{qXfer}, then so will be the included document; @var{document} will be interpreted as the name of an annex. If the current description was read from a file, @value{GDBN} will look for @var{document} as a file in the same directory where it found the original description. @subsection Architecture @cindex An @samp{} element has this form: @smallexample @var{arch} @end smallexample @var{arch} is one of the architectures from the set accepted by @code{set architecture} (@pxref{Targets, ,Specifying a Debugging Target}). @subsection OS ABI @cindex @code{} This optional field was introduced in @value{GDBN} version 7.0. Previous versions of @value{GDBN} ignore it. An @samp{} element has this form: @smallexample @var{abi-name} @end smallexample @var{abi-name} is an OS ABI name from the same selection accepted by @w{@code{set osabi}} (@pxref{ABI, ,Configuring the Current ABI}). @subsection Compatible Architecture @cindex @code{} This optional field was introduced in @value{GDBN} version 7.0. Previous versions of @value{GDBN} ignore it. A @samp{} element has this form: @smallexample @var{arch} @end smallexample @var{arch} is one of the architectures from the set accepted by @code{set architecture} (@pxref{Targets, ,Specifying a Debugging Target}). A @samp{} element is used to specify that the target is able to run binaries in some other than the main target architecture given by the @samp{} element. For example, on the Cell Broadband Engine, the main architecture is @code{powerpc:common} or @code{powerpc:common64}, but the system is able to run binaries in the @code{spu} architecture as well. The way to describe this capability with @samp{} is as follows: @smallexample powerpc:common spu @end smallexample @subsection Features @cindex Each @samp{} describes some logical portion of the target system. Features are currently used to describe available CPU registers and the types of their contents. A @samp{} element has this form: @smallexample @r{[}@var{type}@dots{}@r{]} @var{reg}@dots{} @end smallexample @noindent Each feature's name should be unique within the description. The name of a feature does not matter unless @value{GDBN} has some special knowledge of the contents of that feature; if it does, the feature should have its standard name. @xref{Standard Target Features}. @subsection Types Any register's value is a collection of bits which @value{GDBN} must interpret. The default interpretation is a two's complement integer, but other types can be requested by name in the register description. Some predefined types are provided by @value{GDBN} (@pxref{Predefined Target Types}), and the description can define additional composite types. Each type element must have an @samp{id} attribute, which gives a unique (within the containing @samp{}) name to the type. Types must be defined before they are used. @cindex Some targets offer vector registers, which can be treated as arrays of scalar elements. These types are written as @samp{} elements, specifying the array element type, @var{type}, and the number of elements, @var{count}: @smallexample @end smallexample @cindex If a register's value is usefully viewed in multiple ways, define it with a union type containing the useful representations. The @samp{} element contains one or more @samp{} elements, each of which has a @var{name} and a @var{type}: @smallexample @dots{} @end smallexample @cindex If a register's value is composed from several separate values, define it with a structure type. There are two forms of the @samp{} element; a @samp{} element must either contain only bitfields or contain no bitfields. If the structure contains only bitfields, its total size in bytes must be specified, each bitfield must have an explicit start and end, and bitfields are automatically assigned an integer type. The field's @var{start} should be less than or equal to its @var{end}, and zero represents the least significant bit. @smallexample @dots{} @end smallexample If the structure contains no bitfields, then each field has an explicit type, and no implicit padding is added. @smallexample @dots{} @end smallexample @cindex If a register's value is a series of single-bit flags, define it with a flags type. The @samp{} element has an explicit @var{size} and contains one or more @samp{} elements. Each field has a @var{name}, a @var{start}, and an @var{end}. Only single-bit flags are supported. @smallexample @dots{} @end smallexample @subsection Registers @cindex Each register is represented as an element with this form: @smallexample @end smallexample @noindent The components are as follows: @table @var @item name The register's name; it must be unique within the target description. @item bitsize The register's size, in bits. @item regnum The register's number. If omitted, a register's number is one greater than that of the previous register (either in the current feature or in a preceding feature); the first register in the target description defaults to zero. This register number is used to read or write the register; e.g.@: it is used in the remote @code{p} and @code{P} packets, and registers appear in the @code{g} and @code{G} packets in order of increasing register number. @item save-restore Whether the register should be preserved across inferior function calls; this must be either @code{yes} or @code{no}. The default is @code{yes}, which is appropriate for most registers except for some system control registers; this is not related to the target's ABI. @item type The type of the register. @var{type} may be a predefined type, a type defined in the current feature, or one of the special types @code{int} and @code{float}. @code{int} is an integer type of the correct size for @var{bitsize}, and @code{float} is a floating point type (in the architecture's normal floating point format) of the correct size for @var{bitsize}. The default is @code{int}. @item group The register group to which this register belongs. @var{group} must be either @code{general}, @code{float}, or @code{vector}. If no @var{group} is specified, @value{GDBN} will not display the register in @code{info registers}. @end table @node Predefined Target Types @section Predefined Target Types @cindex target descriptions, predefined types Type definitions in the self-description can build up composite types from basic building blocks, but can not define fundamental types. Instead, standard identifiers are provided by @value{GDBN} for the fundamental types. The currently supported types are: @table @code @item int8 @itemx int16 @itemx int32 @itemx int64 @itemx int128 Signed integer types holding the specified number of bits. @item uint8 @itemx uint16 @itemx uint32 @itemx uint64 @itemx uint128 Unsigned integer types holding the specified number of bits. @item code_ptr @itemx data_ptr Pointers to unspecified code and data. The program counter and any dedicated return address register may be marked as code pointers; printing a code pointer converts it into a symbolic address. The stack pointer and any dedicated address registers may be marked as data pointers. @item ieee_single Single precision IEEE floating point. @item ieee_double Double precision IEEE floating point. @item arm_fpa_ext The 12-byte extended precision format used by ARM FPA registers. @item i387_ext The 10-byte extended precision format used by x87 registers. @item i386_eflags 32bit @sc{eflags} register used by x86. @item i386_mxcsr 32bit @sc{mxcsr} register used by x86. @end table @node Standard Target Features @section Standard Target Features @cindex target descriptions, standard features A target description must contain either no registers or all the target's registers. If the description contains no registers, then @value{GDBN} will assume a default register layout, selected based on the architecture. If the description contains any registers, the default layout will not be used; the standard registers must be described in the target description, in such a way that @value{GDBN} can recognize them. This is accomplished by giving specific names to feature elements which contain standard registers. @value{GDBN} will look for features with those names and verify that they contain the expected registers; if any known feature is missing required registers, or if any required feature is missing, @value{GDBN} will reject the target description. You can add additional registers to any of the standard features --- @value{GDBN} will display them just as if they were added to an unrecognized feature. This section lists the known features and their expected contents. Sample XML documents for these features are included in the @value{GDBN} source tree, in the directory @file{gdb/features}. Names recognized by @value{GDBN} should include the name of the company or organization which selected the name, and the overall architecture to which the feature applies; so e.g.@: the feature containing ARM core registers is named @samp{org.gnu.gdb.arm.core}. The names of registers are not case sensitive for the purpose of recognizing standard features, but @value{GDBN} will only display registers using the capitalization used in the description. @menu * AArch64 Features:: * ARM Features:: * i386 Features:: * MIPS Features:: * M68K Features:: * PowerPC Features:: * TIC6x Features:: @end menu @node AArch64 Features @subsection AArch64 Features @cindex target descriptions, AArch64 features The @samp{org.gnu.gdb.aarch64.core} feature is required for AArch64 targets. It should contain registers @samp{x0} through @samp{x30}, @samp{sp}, @samp{pc}, and @samp{cpsr}. The @samp{org.gnu.gdb.aarch64.fpu} feature is optional. If present, it should contain registers @samp{v0} through @samp{v31}, @samp{fpsr}, and @samp{fpcr}. @node ARM Features @subsection ARM Features @cindex target descriptions, ARM features The @samp{org.gnu.gdb.arm.core} feature is required for non-M-profile ARM targets. It should contain registers @samp{r0} through @samp{r13}, @samp{sp}, @samp{lr}, @samp{pc}, and @samp{cpsr}. For M-profile targets (e.g. Cortex-M3), the @samp{org.gnu.gdb.arm.core} feature is replaced by @samp{org.gnu.gdb.arm.m-profile}. It should contain registers @samp{r0} through @samp{r13}, @samp{sp}, @samp{lr}, @samp{pc}, and @samp{xpsr}. The @samp{org.gnu.gdb.arm.fpa} feature is optional. If present, it should contain registers @samp{f0} through @samp{f7} and @samp{fps}. The @samp{org.gnu.gdb.xscale.iwmmxt} feature is optional. If present, it should contain at least registers @samp{wR0} through @samp{wR15} and @samp{wCGR0} through @samp{wCGR3}. The @samp{wCID}, @samp{wCon}, @samp{wCSSF}, and @samp{wCASF} registers are optional. The @samp{org.gnu.gdb.arm.vfp} feature is optional. If present, it should contain at least registers @samp{d0} through @samp{d15}. If they are present, @samp{d16} through @samp{d31} should also be included. @value{GDBN} will synthesize the single-precision registers from halves of the double-precision registers. The @samp{org.gnu.gdb.arm.neon} feature is optional. It does not need to contain registers; it instructs @value{GDBN} to display the VFP double-precision registers as vectors and to synthesize the quad-precision registers from pairs of double-precision registers. If this feature is present, @samp{org.gnu.gdb.arm.vfp} must also be present and include 32 double-precision registers. @node i386 Features @subsection i386 Features @cindex target descriptions, i386 features The @samp{org.gnu.gdb.i386.core} feature is required for i386/amd64 targets. It should describe the following registers: @itemize @minus @item @samp{eax} through @samp{edi} plus @samp{eip} for i386 @item @samp{rax} through @samp{r15} plus @samp{rip} for amd64 @item @samp{eflags}, @samp{cs}, @samp{ss}, @samp{ds}, @samp{es}, @samp{fs}, @samp{gs} @item @samp{st0} through @samp{st7} @item @samp{fctrl}, @samp{fstat}, @samp{ftag}, @samp{fiseg}, @samp{fioff}, @samp{foseg}, @samp{fooff} and @samp{fop} @end itemize The register sets may be different, depending on the target. The @samp{org.gnu.gdb.i386.sse} feature is optional. It should describe registers: @itemize @minus @item @samp{xmm0} through @samp{xmm7} for i386 @item @samp{xmm0} through @samp{xmm15} for amd64 @item @samp{mxcsr} @end itemize The @samp{org.gnu.gdb.i386.avx} feature is optional and requires the @samp{org.gnu.gdb.i386.sse} feature. It should describe the upper 128 bits of @sc{ymm} registers: @itemize @minus @item @samp{ymm0h} through @samp{ymm7h} for i386 @item @samp{ymm0h} through @samp{ymm15h} for amd64 @end itemize The @samp{org.gnu.gdb.i386.linux} feature is optional. It should describe a single register, @samp{orig_eax}. @node MIPS Features @subsection @acronym{MIPS} Features @cindex target descriptions, @acronym{MIPS} features The @samp{org.gnu.gdb.mips.cpu} feature is required for @acronym{MIPS} targets. It should contain registers @samp{r0} through @samp{r31}, @samp{lo}, @samp{hi}, and @samp{pc}. They may be 32-bit or 64-bit depending on the target. The @samp{org.gnu.gdb.mips.cp0} feature is also required. It should contain at least the @samp{status}, @samp{badvaddr}, and @samp{cause} registers. They may be 32-bit or 64-bit depending on the target. The @samp{org.gnu.gdb.mips.fpu} feature is currently required, though it may be optional in a future version of @value{GDBN}. It should contain registers @samp{f0} through @samp{f31}, @samp{fcsr}, and @samp{fir}. They may be 32-bit or 64-bit depending on the target. The @samp{org.gnu.gdb.mips.dsp} feature is optional. It should contain registers @samp{hi1} through @samp{hi3}, @samp{lo1} through @samp{lo3}, and @samp{dspctl}. The @samp{dspctl} register should be 32-bit and the rest may be 32-bit or 64-bit depending on the target. The @samp{org.gnu.gdb.mips.linux} feature is optional. It should contain a single register, @samp{restart}, which is used by the Linux kernel to control restartable syscalls. @node M68K Features @subsection M68K Features @cindex target descriptions, M68K features @table @code @item @samp{org.gnu.gdb.m68k.core} @itemx @samp{org.gnu.gdb.coldfire.core} @itemx @samp{org.gnu.gdb.fido.core} One of those features must be always present. The feature that is present determines which flavor of m68k is used. The feature that is present should contain registers @samp{d0} through @samp{d7}, @samp{a0} through @samp{a5}, @samp{fp}, @samp{sp}, @samp{ps} and @samp{pc}. @item @samp{org.gnu.gdb.coldfire.fp} This feature is optional. If present, it should contain registers @samp{fp0} through @samp{fp7}, @samp{fpcontrol}, @samp{fpstatus} and @samp{fpiaddr}. @end table @node PowerPC Features @subsection PowerPC Features @cindex target descriptions, PowerPC features The @samp{org.gnu.gdb.power.core} feature is required for PowerPC targets. It should contain registers @samp{r0} through @samp{r31}, @samp{pc}, @samp{msr}, @samp{cr}, @samp{lr}, @samp{ctr}, and @samp{xer}. They may be 32-bit or 64-bit depending on the target. The @samp{org.gnu.gdb.power.fpu} feature is optional. It should contain registers @samp{f0} through @samp{f31} and @samp{fpscr}. The @samp{org.gnu.gdb.power.altivec} feature is optional. It should contain registers @samp{vr0} through @samp{vr31}, @samp{vscr}, and @samp{vrsave}. The @samp{org.gnu.gdb.power.vsx} feature is optional. It should contain registers @samp{vs0h} through @samp{vs31h}. @value{GDBN} will combine these registers with the floating point registers (@samp{f0} through @samp{f31}) and the altivec registers (@samp{vr0} through @samp{vr31}) to present the 128-bit wide registers @samp{vs0} through @samp{vs63}, the set of vector registers for POWER7. The @samp{org.gnu.gdb.power.spe} feature is optional. It should contain registers @samp{ev0h} through @samp{ev31h}, @samp{acc}, and @samp{spefscr}. SPE targets should provide 32-bit registers in @samp{org.gnu.gdb.power.core} and provide the upper halves in @samp{ev0h} through @samp{ev31h}. @value{GDBN} will combine these to present registers @samp{ev0} through @samp{ev31} to the user. @node TIC6x Features @subsection TMS320C6x Features @cindex target descriptions, TIC6x features @cindex target descriptions, TMS320C6x features The @samp{org.gnu.gdb.tic6x.core} feature is required for TMS320C6x targets. It should contain registers @samp{A0} through @samp{A15}, registers @samp{B0} through @samp{B15}, @samp{CSR} and @samp{PC}. The @samp{org.gnu.gdb.tic6x.gp} feature is optional. It should contain registers @samp{A16} through @samp{A31} and @samp{B16} through @samp{B31}. The @samp{org.gnu.gdb.tic6x.c6xp} feature is optional. It should contain registers @samp{TSR}, @samp{ILC} and @samp{RILC}. @node Operating System Information @appendix Operating System Information @cindex operating system information @menu * Process list:: @end menu Users of @value{GDBN} often wish to obtain information about the state of the operating system running on the target---for example the list of processes, or the list of open files. This section describes the mechanism that makes it possible. This mechanism is similar to the target features mechanism (@pxref{Target Descriptions}), but focuses on a different aspect of target. Operating system information is retrived from the target via the remote protocol, using @samp{qXfer} requests (@pxref{qXfer osdata read}). The object name in the request should be @samp{osdata}, and the @var{annex} identifies the data to be fetched. @node Process list @appendixsection Process list @cindex operating system information, process list When requesting the process list, the @var{annex} field in the @samp{qXfer} request should be @samp{processes}. The returned data is an XML document. The formal syntax of this document is defined in @file{gdb/features/osdata.dtd}. An example document is: @smallexample 1 root /sbin/init 1,2,3 @end smallexample Each item should include a column whose name is @samp{pid}. The value of that column should identify the process on the target. The @samp{user} and @samp{command} columns are optional, and will be displayed by @value{GDBN}. The @samp{cores} column, if present, should contain a comma-separated list of cores that this process is running on. Target may provide additional columns, which @value{GDBN} currently ignores. @node Trace File Format @appendix Trace File Format @cindex trace file format The trace file comes in three parts: a header, a textual description section, and a trace frame section with binary data. The header has the form @code{\x7fTRACE0\n}. The first byte is @code{0x7f} so as to indicate that the file contains binary data, while the @code{0} is a version number that may have different values in the future. The description section consists of multiple lines of @sc{ascii} text separated by newline characters (@code{0xa}). The lines may include a variety of optional descriptive or context-setting information, such as tracepoint definitions or register set size. @value{GDBN} will ignore any line that it does not recognize. An empty line marks the end of this section. @c FIXME add some specific types of data The trace frame section consists of a number of consecutive frames. Each frame begins with a two-byte tracepoint number, followed by a four-byte size giving the amount of data in the frame. The data in the frame consists of a number of blocks, each introduced by a character indicating its type (at least register, memory, and trace state variable). The data in this section is raw binary, not a hexadecimal or other encoding; its endianness matches the target's endianness. @c FIXME bi-arch may require endianness/arch info in description section @table @code @item R @var{bytes} Register block. The number and ordering of bytes matches that of a @code{g} packet in the remote protocol. Note that these are the actual bytes, in target order and @value{GDBN} register order, not a hexadecimal encoding. @item M @var{address} @var{length} @var{bytes}... Memory block. This is a contiguous block of memory, at the 8-byte address @var{address}, with a 2-byte length @var{length}, followed by @var{length} bytes. @item V @var{number} @var{value} Trace state variable block. This records the 8-byte signed value @var{value} of trace state variable numbered @var{number}. @end table Future enhancements of the trace file format may include additional types of blocks. @node Index Section Format @appendix @code{.gdb_index} section format @cindex .gdb_index section format @cindex index section format This section documents the index section that is created by @code{save gdb-index} (@pxref{Index Files}). The index section is DWARF-specific; some knowledge of DWARF is assumed in this description. The mapped index file format is designed to be directly @code{mmap}able on any architecture. In most cases, a datum is represented using a little-endian 32-bit integer value, called an @code{offset_type}. Big endian machines must byte-swap the values before using them. Exceptions to this rule are noted. The data is laid out such that alignment is always respected. A mapped index consists of several areas, laid out in order. @enumerate @item The file header. This is a sequence of values, of @code{offset_type} unless otherwise noted: @enumerate @item The version number, currently 8. Versions 1, 2 and 3 are obsolete. Version 4 uses a different hashing function from versions 5 and 6. Version 6 includes symbols for inlined functions, whereas versions 4 and 5 do not. Version 7 adds attributes to the CU indices in the symbol table. Version 8 specifies that symbols from DWARF type units (@samp{DW_TAG_type_unit}) refer to the type unit's symbol table and not the compilation unit (@samp{DW_TAG_comp_unit}) using the type. @value{GDBN} will only read version 4, 5, or 6 indices by specifying @code{set use-deprecated-index-sections on}. GDB has a workaround for potentially broken version 7 indices so it is currently not flagged as deprecated. @item The offset, from the start of the file, of the CU list. @item The offset, from the start of the file, of the types CU list. Note that this area can be empty, in which case this offset will be equal to the next offset. @item The offset, from the start of the file, of the address area. @item The offset, from the start of the file, of the symbol table. @item The offset, from the start of the file, of the constant pool. @end enumerate @item The CU list. This is a sequence of pairs of 64-bit little-endian values, sorted by the CU offset. The first element in each pair is the offset of a CU in the @code{.debug_info} section. The second element in each pair is the length of that CU. References to a CU elsewhere in the map are done using a CU index, which is just the 0-based index into this table. Note that if there are type CUs, then conceptually CUs and type CUs form a single list for the purposes of CU indices. @item The types CU list. This is a sequence of triplets of 64-bit little-endian values. In a triplet, the first value is the CU offset, the second value is the type offset in the CU, and the third value is the type signature. The types CU list is not sorted. @item The address area. The address area consists of a sequence of address entries. Each address entry has three elements: @enumerate @item The low address. This is a 64-bit little-endian value. @item The high address. This is a 64-bit little-endian value. Like @code{DW_AT_high_pc}, the value is one byte beyond the end. @item The CU index. This is an @code{offset_type} value. @end enumerate @item The symbol table. This is an open-addressed hash table. The size of the hash table is always a power of 2. Each slot in the hash table consists of a pair of @code{offset_type} values. The first value is the offset of the symbol's name in the constant pool. The second value is the offset of the CU vector in the constant pool. If both values are 0, then this slot in the hash table is empty. This is ok because while 0 is a valid constant pool index, it cannot be a valid index for both a string and a CU vector. The hash value for a table entry is computed by applying an iterative hash function to the symbol's name. Starting with an initial value of @code{r = 0}, each (unsigned) character @samp{c} in the string is incorporated into the hash using the formula depending on the index version: @table @asis @item Version 4 The formula is @code{r = r * 67 + c - 113}. @item Versions 5 to 7 The formula is @code{r = r * 67 + tolower (c) - 113}. @end table The terminating @samp{\0} is not incorporated into the hash. The step size used in the hash table is computed via @code{((hash * 17) & (size - 1)) | 1}, where @samp{hash} is the hash value, and @samp{size} is the size of the hash table. The step size is used to find the next candidate slot when handling a hash collision. The names of C@t{++} symbols in the hash table are canonicalized. We don't currently have a simple description of the canonicalization algorithm; if you intend to create new index sections, you must read the code. @item The constant pool. This is simply a bunch of bytes. It is organized so that alignment is correct: CU vectors are stored first, followed by strings. A CU vector in the constant pool is a sequence of @code{offset_type} values. The first value is the number of CU indices in the vector. Each subsequent value is the index and symbol attributes of a CU in the CU list. This element in the hash table is used to indicate which CUs define the symbol and how the symbol is used. See below for the format of each CU index+attributes entry. A string in the constant pool is zero-terminated. @end enumerate Attributes were added to CU index values in @code{.gdb_index} version 7. If a symbol has multiple uses within a CU then there is one CU index+attributes value for each use. The format of each CU index+attributes entry is as follows (bit 0 = LSB): @table @asis @item Bits 0-23 This is the index of the CU in the CU list. @item Bits 24-27 These bits are reserved for future purposes and must be zero. @item Bits 28-30 The kind of the symbol in the CU. @table @asis @item 0 This value is reserved and should not be used. By reserving zero the full @code{offset_type} value is backwards compatible with previous versions of the index. @item 1 The symbol is a type. @item 2 The symbol is a variable or an enum value. @item 3 The symbol is a function. @item 4 Any other kind of symbol. @item 5,6,7 These values are reserved. @end table @item Bit 31 This bit is zero if the value is global and one if it is static. The determination of whether a symbol is global or static is complicated. The authorative reference is the file @file{dwarf2read.c} in @value{GDBN} sources. @end table This pseudo-code describes the computation of a symbol's kind and global/static attributes in the index. @smallexample is_external = get_attribute (die, DW_AT_external); language = get_attribute (cu_die, DW_AT_language); switch (die->tag) @{ case DW_TAG_typedef: case DW_TAG_base_type: case DW_TAG_subrange_type: kind = TYPE; is_static = 1; break; case DW_TAG_enumerator: kind = VARIABLE; is_static = (language != CPLUS && language != JAVA); break; case DW_TAG_subprogram: kind = FUNCTION; is_static = ! (is_external || language == ADA); break; case DW_TAG_constant: kind = VARIABLE; is_static = ! is_external; break; case DW_TAG_variable: kind = VARIABLE; is_static = ! is_external; break; case DW_TAG_namespace: kind = TYPE; is_static = 0; break; case DW_TAG_class_type: case DW_TAG_interface_type: case DW_TAG_structure_type: case DW_TAG_union_type: case DW_TAG_enumeration_type: kind = TYPE; is_static = (language != CPLUS && language != JAVA); break; default: assert (0); @} @end smallexample @include gpl.texi @node GNU Free Documentation License @appendix GNU Free Documentation License @include fdl.texi @node Concept Index @unnumbered Concept Index @printindex cp @node Command and Variable Index @unnumbered Command, Variable, and Function Index @printindex fn @tex % I think something like @@colophon should be in texinfo. In the % meantime: \long\def\colophon{\hbox to0pt{}\vfill \centerline{The body of this manual is set in} \centerline{\fontname\tenrm,} \centerline{with headings in {\bf\fontname\tenbf}} \centerline{and examples in {\tt\fontname\tentt}.} \centerline{{\it\fontname\tenit\/},} \centerline{{\bf\fontname\tenbf}, and} \centerline{{\sl\fontname\tensl\/}} \centerline{are used for emphasis.}\vfill} \page\colophon % Blame: doc@@cygnus.com, 1991. @end tex @bye gdb-doc-7.6.2/gdb/doc/LRS0000644000175000017500000001556512250773211013763 0ustar zumbizumbiWhat's LRS? =========== LRS, or Live Range Splitting is an optimization technique which allows a user variable to reside in different locations during different parts of a function. For example, a variable might reside in the stack for part of a function and in a register during a loop and in a different register during another loop. Clearly, if a variable may reside in different locations, then the compiler must describe to the debugger where the variable resides for any given part of the function. This document describes the debug format for encoding these extensions in stabs. Since these extensions are gcc specific, these additional symbols and stabs can be disabled by the gcc command option -gstabs. GNU extensions for LRS under stabs: =================================== range symbols: ------------- A range symbol will be used to mark the beginning or end of a live range (the range which describes where a symbol is active, or live). These symbols will later be referenced in the stabs for debug purposes. For simplicity, we'll use the terms "range_start" and "range_end" to identify the range symbols which mark the beginning and end of a live range respectively. Any text symbol which would normally appear in the symbol table (eg. a function name) can be used as range symbol. If an address is needed to delimit a live range and does not match any of the values of symbols which would normally appear in the symbol table, a new symbol will be added to the table whose value is that address. The three new symbol types described below have been added for this purpose. For efficiency, the compiler should use existing symbols as range symbols whenever possible; this reduces the number of additional symbols which need to be added to the symbol table. New debug symbol type for defining ranges: ------------------------------------------ range_off - contains PC function offset for start/end of a live range. Its location is relative to the function start and therefore eliminates the need for additional relocation. This symbol has a values in the text section, and does not have a name. NOTE: the following may not be needed but are included here just in case. range - contains PC value of beginning or end of a live range (relocs required). NOTE: the following will be required if we desire LRS debugging to work with old style a.out stabs. range_abs - contains absolute PC value of start/end of a live range. The range_abs debug symbol is provided for completeness, in case there is a need to describe addresses in ROM, etc. Live range: ----------- The compiler and debugger view a variable with multiple homes as a primary symbol and aliases for that symbol. The primary symbol describes the default home of the variable while aliases describe alternate homes for the variable. A live range defines the interval of instructions beginning with range_start and ending at range_end-1, and is used to specify a range of instructions where an alias is active or "live". So, the actual end of the range will be one less than the value of the range_end symbol. Ranges do not have to be nested. Eg. Two ranges may intersect while each range contains subranges which are not in the other range. There does not have to be a 1-1 mapping from range_start to range_end symbols. Eg. Two range_starts can share the same range_end, while one symbol's range_start can be another symbol's range_end. When a variable's storage class changes (eg. from stack to register, or from one register to another), a new symbol entry will be added to the symbol table with stabs describing the new type, and appropriate live ranges refering to the variable's initial symbol index. For variables which are defined in the source but optimized away, a symbol should be emitted with the live range l(0,0). Live ranges for aliases of a particular variable should always be disjoint. Overlapping ranges for aliases of the same variable will be treated as an error by the debugger, and the overlapping range will be ignored. If no live range information is given, the live range will be assumed to span the symbol's entire lexical scope. New stabs string identifiers: ----------------------------- "id" in "#id" in the following section refers to a numeric value. New stab syntax for live range: l(,) - "#id" where #id identifies the text symbol (range symbol) to use as the start of live range (range_start). The value for the referenced text symbol is the starting address of the live range. - "#id" where #id identifies the text symbol (range symbol) to use as the end of live range (range_end). The value for the referenced text symbol is ONE BYTE PAST the ending address of the live range. New stab syntax for identifying symbols. - "#id=" Uses: :... When used in front of a symbol name, "#id=" defines a unique reference number for this symbol. The reference number can be used later when defining aliases for this symbol. When used as the entire stab string, "#id=" identifies this nameless symbol as being the symbol for which "#id" refers to. - "#id" where "#id" refers to the symbol for which the string "#id=" identifies. Uses: :;;... Defines an alias for the symbol identified by the reference number ID. l(,) When used within a live range, "#id" refers to the text symbol identified by "#id=" to use as the range symbol. - "l(,)" - specifies a live range for a symbol. Multiple "l" specifiers can be combined to represent mutiple live ranges, separated by semicolons. Example: ======== Consider a program of the form: void foo(){ int a = ...; ... while (b--) c += a; .. d = a; .. } Assume that "a" lives in the stack at offset -8, except for inside the loop where "a" resides in register "r5". The way to describe this is to create a stab for the variable "a" which describes "a" as living in the stack and an alias for the variable "a" which describes it as living in register "r5" in the loop. Let's assume that "#1" and "#2" are symbols which bound the area where "a" lives in a register. The stabs to describe "a" and its alias would look like this: .stabs "#3=a:1",128,0,8,-8 .stabs "#3:r1;l(#1,#2)",64,0,0,5 This design implies that the debugger will keep a chain of aliases for any given variable with aliases and that chain will be searched first to find out if an alias is active. If no alias is active, then the debugger will assume that the main variable is active. gdb-doc-7.6.2/gdb/doc/lpsrc.sed0000644000175000017500000000101612250770607015210 0ustar zumbizumbi/font defs: ---/,/end font defs ---/c\ %-------------------- PostScript (long names) font defs: -----------------\ \\font\\bbf=Times-Bold at 10pt\ \\font\\vbbf=Times-Bold at 12pt\ \\font\\smrm=Times-Roman at 6pt\ \\font\\brm=Times-Roman at 10pt\ \\font\\rm=Times-Roman at 8pt\ \\font\\it=Times-Italic at 8pt\ \\font\\tt=Courier at 8pt\ % Used only for \copyright, replacing plain TeX macro.\ \\font\\sym=Symbol at 7pt\ \\def\\copyright{{\\sym\\char'323}}\ %-------------------- end font defs --------------------------------- gdb-doc-7.6.2/gdb/doc/gdb.info-50000644000175000017500000103461112250773371015154 0ustar zumbizumbiThis is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo. INFO-DIR-SECTION Software development START-INFO-DIR-ENTRY * Gdb: (gdb). The GNU debugger. END-INFO-DIR-ENTRY Copyright (C) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom." This file documents the GNU debugger GDB. This is the Tenth Edition, of `Debugging with GDB: the GNU Source-Level Debugger' for GDB (GDB) Version 7.6.2. Copyright (C) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom."  File: gdb.info, Node: Commands For Text, Next: Commands For Killing, Prev: Commands For History, Up: Bindable Readline Commands 32.4.3 Commands For Changing Text --------------------------------- `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 `delete-char', then return EOF. `backward-delete-char (Rubout)' Delete the character behind the cursor. A numeric argument means to kill the characters instead of deleting them. `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. `quoted-insert (C-q or C-v)' Add the next character typed to the line verbatim. This is how to insert key sequences like `C-q', for example. `tab-insert (M-)' Insert a tab character. `self-insert (a, b, A, 1, !, ...)' Insert yourself. `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. `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. `upcase-word (M-u)' Uppercase the current (or following) word. With a negative argument, uppercase the previous word, but do not move the cursor. `downcase-word (M-l)' Lowercase the current (or following) word. With a negative argument, lowercase the previous word, but do not move the cursor. `capitalize-word (M-c)' Capitalize the current (or following) word. With a negative argument, capitalize the previous word, but do not move the cursor. `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 `emacs' mode; `vi' mode does overwrite differently. Each call to `readline()' starts in insert mode. In overwrite mode, characters bound to `self-insert' replace the text at point rather than pushing the text to the right. Characters bound to `backward-delete-char' replace the character before point with a space. By default, this command is unbound.  File: gdb.info, Node: Commands For Killing, Next: Numeric Arguments, Prev: Commands For Text, Up: Bindable Readline Commands 32.4.4 Killing And Yanking -------------------------- `kill-line (C-k)' Kill the text from point to the end of the line. `backward-kill-line (C-x Rubout)' Kill backward to the beginning of the line. `unix-line-discard (C-u)' Kill backward from the cursor to the beginning of the current line. `kill-whole-line ()' Kill all characters on the current line, no matter where point is. By default, this is unbound. `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 `forward-word'. `backward-kill-word (M-)' Kill the word behind point. Word boundaries are the same as `backward-word'. `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. `unix-filename-rubout ()' Kill the word behind point, using white space and the slash character as the word boundaries. The killed text is saved on the kill-ring. `delete-horizontal-space ()' Delete all spaces and tabs around point. By default, this is unbound. `kill-region ()' Kill the text in the current region. By default, this command is unbound. `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. `copy-backward-word ()' Copy the word before point to the kill buffer. The word boundaries are the same as `backward-word'. By default, this command is unbound. `copy-forward-word ()' Copy the word following point to the kill buffer. The word boundaries are the same as `forward-word'. By default, this command is unbound. `yank (C-y)' Yank the top of the kill ring into the buffer at point. `yank-pop (M-y)' Rotate the kill-ring, and yank the new top. You can only do this if the prior command is `yank' or `yank-pop'.  File: gdb.info, Node: Numeric Arguments, Next: Commands For Completion, Prev: Commands For Killing, Up: Bindable Readline Commands 32.4.5 Specifying Numeric Arguments ----------------------------------- `digit-argument (M-0, M-1, ... M--)' Add this digit to the argument already accumulating, or start a new argument. `M--' starts a negative argument. `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 `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.  File: gdb.info, Node: Commands For Completion, Next: Keyboard Macros, Prev: Numeric Arguments, Up: Bindable Readline Commands 32.4.6 Letting Readline Type For You ------------------------------------ `complete ()' Attempt to perform completion on the text before point. The actual completion performed is application-specific. The default is filename completion. `possible-completions (M-?)' List the possible completions of the text before point. When displaying completions, Readline sets the number of columns used for display to the value of `completion-display-width', the value of the environment variable `COLUMNS', or the screen width, in that order. `insert-completions (M-*)' Insert all completions of the text before point that would have been generated by `possible-completions'. `menu-complete ()' Similar to `complete', but replaces the word to be completed with a single match from the list of possible completions. Repeated execution of `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 `bell-style') and the original text is restored. An argument of N moves 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 , but is unbound by default. `menu-complete-backward ()' Identical to `menu-complete', but moves backward through the list of possible completions, as if `menu-complete' had been given a negative argument. `delete-char-or-list ()' Deletes the character under the cursor if not at the beginning or end of the line (like `delete-char'). If at the end of the line, behaves identically to `possible-completions'. This command is unbound by default.  File: gdb.info, Node: Keyboard Macros, Next: Miscellaneous Commands, Prev: Commands For Completion, Up: Bindable Readline Commands 32.4.7 Keyboard Macros ---------------------- `start-kbd-macro (C-x ()' Begin saving the characters typed into the current keyboard macro. `end-kbd-macro (C-x ))' Stop saving the characters typed into the current keyboard macro and save the definition. `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.  File: gdb.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up: Bindable Readline Commands 32.4.8 Some Miscellaneous Commands ---------------------------------- `re-read-init-file (C-x C-r)' Read in the contents of the INPUTRC file, and incorporate any bindings or variable assignments found there. `abort (C-g)' Abort the current editing command and ring the terminal's bell (subject to the setting of `bell-style'). `do-uppercase-version (M-a, M-b, M-X, ...)' If the metafied character X is lowercase, run the command that is bound to the corresponding uppercase character. `prefix-meta ()' Metafy the next character typed. This is for keyboards without a meta key. Typing ` f' is equivalent to typing `M-f'. `undo (C-_ or C-x C-u)' Incremental undo, separately remembered for each line. `revert-line (M-r)' Undo all changes made to this line. This is like executing the `undo' command enough times to get back to the beginning. `tilde-expand (M-~)' Perform tilde expansion on the current word. `set-mark (C-@)' Set the mark to the point. If a numeric argument is supplied, the mark is set to that position. `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. `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. `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. `skip-csi-sequence ()' Read enough characters to consume a multi-key sequence such as those defined for keys like Home and End. Such sequences begin with a Control Sequence Indicator (CSI), usually ESC-[. If this sequence is bound to "\e[", keys producing such sequences will have no effect unless explicitly bound to a readline command, instead of inserting stray characters into the editing buffer. This is unbound by default, but usually bound to ESC-[. `insert-comment (M-#)' Without a numeric argument, the value of the `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 `comment-begin', the value is inserted, otherwise the characters in `comment-begin' are deleted from the beginning of the line. In either case, the line is accepted as if a newline had been typed. `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 INPUTRC file. This command is unbound by default. `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 INPUTRC file. This command is unbound by default. `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 INPUTRC file. This command is unbound by default. `emacs-editing-mode (C-e)' When in `vi' command mode, this causes a switch to `emacs' editing mode. `vi-editing-mode (M-C-j)' When in `emacs' editing mode, this causes a switch to `vi' editing mode.  File: gdb.info, Node: Readline vi Mode, Prev: Bindable Readline Commands, Up: Command Line Editing 32.5 Readline vi Mode ===================== While the Readline library does not have a full set of `vi' editing functions, it does contain enough to allow simple editing of the line. The Readline `vi' mode behaves as specified in the POSIX standard. In order to switch interactively between `emacs' and `vi' editing modes, use the command `M-C-j' (bound to emacs-editing-mode when in `vi' mode and to vi-editing-mode in `emacs' mode). The Readline default is `emacs' mode. When you enter a line in `vi' mode, you are already placed in `insertion' mode, as if you had typed an `i'. Pressing switches you into `command' mode, where you can edit the text of the line with the standard `vi' movement keys, move to previous history lines with `k' and subsequent lines with `j', and so forth.  File: gdb.info, Node: Using History Interactively, Next: In Memoriam, Prev: Command Line Editing, Up: Top 33 Using History Interactively ****************************** This chapter describes how to use the GNU History Library interactively, from a user's standpoint. It should be considered a user's guide. For information on using the GNU History Library in your own programs, *note Programming with GNU History: (history)Programming with GNU History. * Menu: * History Interaction:: What it feels like using History as a user.  File: gdb.info, Node: History Interaction, Up: Using History Interactively 33.1 History Expansion ====================== The History library provides a history expansion feature that is similar to the history expansion provided by `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 "event", and the portions of that line that are acted upon are called "words". Various "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 `!' by default. * 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.  File: gdb.info, Node: Event Designators, Next: Word Designators, Up: History Interaction 33.1.1 Event Designators ------------------------ An event designator is a reference to a command line entry in the history list. Unless the reference is absolute, events are relative to the current position in the history list. `!' Start a history substitution, except when followed by a space, tab, the end of the line, or `='. `!N' Refer to command line N. `!-N' Refer to the command N lines back. `!!' Refer to the previous command. This is a synonym for `!-1'. `!STRING' Refer to the most recent command preceding the current position in the history list starting with STRING. `!?STRING[?]' Refer to the most recent command preceding the current position in the history list containing STRING. The trailing `?' may be omitted if the STRING is followed immediately by a newline. `^STRING1^STRING2^' Quick Substitution. Repeat the last command, replacing STRING1 with STRING2. Equivalent to `!!:s/STRING1/STRING2/'. `!#' The entire command line typed so far.  File: gdb.info, Node: Word Designators, Next: Modifiers, Prev: Event Designators, Up: History Interaction 33.1.2 Word Designators ----------------------- Word designators are used to select desired words from the event. A `:' separates the event specification from the word designator. It may be omitted if the word designator begins with a `^', `$', `*', `-', or `%'. 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. For example, `!!' designates the preceding command. When you type this, the preceding command is repeated in toto. `!!:$' designates the last argument of the preceding command. This may be shortened to `!$'. `!fi:2' designates the second argument of the most recent command starting with the letters `fi'. Here are the word designators: `0 (zero)' The `0'th word. For many applications, this is the command word. `N' The Nth word. `^' The first argument; that is, word 1. `$' The last argument. `%' The word matched by the most recent `?STRING?' search. `X-Y' A range of words; `-Y' abbreviates `0-Y'. `*' All of the words, except the `0'th. This is a synonym for `1-$'. It is not an error to use `*' if there is just one word in the event; the empty string is returned in that case. `X*' Abbreviates `X-$' `X-' Abbreviates `X-$' like `X*', but omits the last word. If a word designator is supplied without an event specification, the previous command is used as the event.  File: gdb.info, Node: Modifiers, Prev: Word Designators, Up: History Interaction 33.1.3 Modifiers ---------------- After the optional word designator, you can add a sequence of one or more of the following modifiers, each preceded by a `:'. `h' Remove a trailing pathname component, leaving only the head. `t' Remove all leading pathname components, leaving the tail. `r' Remove a trailing suffix of the form `.SUFFIX', leaving the basename. `e' Remove all but the trailing suffix. `p' Print the new command but do not execute it. `s/OLD/NEW/' Substitute NEW for the first occurrence of OLD in the event line. Any delimiter may be used in place of `/'. The delimiter may be quoted in OLD and NEW with a single backslash. If `&' appears in NEW, it is replaced by OLD. A single backslash will quote the `&'. The final delimiter is optional if it is the last character on the input line. `&' Repeat the previous substitution. `g' `a' Cause changes to be applied over the entire event line. Used in conjunction with `s', as in `gs/OLD/NEW/', or with `&'. `G' Apply the following `s' modifier once to each word in the event.  File: gdb.info, Node: In Memoriam, Next: Formatting Documentation, Prev: Using History Interactively, Up: Top Appendix A In Memoriam ********************** The GDB project mourns the loss of the following long-time contributors: `Fred Fish' Fred was a long-standing contributor to GDB (1991-2006), and to Free Software in general. Outside of GDB, he was known in the Amiga world for his series of Fish Disks, and the GeekGadget project. `Michael Snyder' Michael was one of the Global Maintainers of the GDB project, with contributions recorded as early as 1996, until 2011. In addition to his day to day participation, he was a large driving force behind adding Reverse Debugging to GDB. Beyond their technical contributions to the project, they were also enjoyable members of the Free Software Community. We will miss them.  File: gdb.info, Node: Formatting Documentation, Next: Installing GDB, Prev: In Memoriam, Up: Top Appendix B Formatting Documentation *********************************** The GDB 4 release includes an already-formatted reference card, ready for printing with PostScript or Ghostscript, in the `gdb' subdirectory of the main source directory(1). If you can use PostScript or Ghostscript with your printer, you can print the reference card immediately with `refcard.ps'. The release also includes the source for the reference card. You can format it, using TeX, by typing: make refcard.dvi The GDB reference card is designed to print in "landscape" mode on US "letter" size paper; that is, on a sheet 11 inches wide by 8.5 inches high. You will need to specify this form of printing as an option to your DVI output program. All the documentation for GDB comes as part of the machine-readable distribution. The documentation is written in Texinfo format, which is a documentation system that uses a single source file to produce both on-line information and a printed manual. You can use one of the Info formatting commands to create the on-line version of the documentation and TeX (or `texi2roff') to typeset the printed version. GDB includes an already formatted copy of the on-line Info version of this manual in the `gdb' subdirectory. The main Info file is `gdb-7.6.2/gdb/gdb.info', and it refers to subordinate files matching `gdb.info*' in the same directory. If necessary, you can print out these files, or read them with any editor; but they are easier to read using the `info' subsystem in GNU Emacs or the standalone `info' program, available as part of the GNU Texinfo distribution. If you want to format these Info files yourself, you need one of the Info formatting programs, such as `texinfo-format-buffer' or `makeinfo'. If you have `makeinfo' installed, and are in the top level GDB source directory (`gdb-7.6.2', in the case of version 7.6.2), you can make the Info file by typing: cd gdb make gdb.info If you want to typeset and print copies of this manual, you need TeX, a program to print its DVI output files, and `texinfo.tex', the Texinfo definitions file. TeX is a typesetting program; it does not print files directly, but produces output files called DVI files. To print a typeset document, you need a program to print DVI files. If your system has TeX installed, chances are it has such a program. The precise command to use depends on your system; `lpr -d' is common; another (for PostScript devices) is `dvips'. The DVI print command may require a file name without any extension or a `.dvi' extension. TeX also requires a macro definitions file called `texinfo.tex'. This file tells TeX how to typeset a document written in Texinfo format. On its own, TeX cannot either read or typeset a Texinfo file. `texinfo.tex' is distributed with GDB and is located in the `gdb-VERSION-NUMBER/texinfo' directory. If you have TeX and a DVI printer program installed, you can typeset and print this manual. First switch to the `gdb' subdirectory of the main source directory (for example, to `gdb-7.6.2/gdb') and type: make gdb.dvi Then give `gdb.dvi' to your DVI printing program. ---------- Footnotes ---------- (1) In `gdb-7.6.2/gdb/refcard.ps' of the version 7.6.2 release.  File: gdb.info, Node: Installing GDB, Next: Maintenance Commands, Prev: Formatting Documentation, Up: Top Appendix C Installing GDB ************************* * Menu: * Requirements:: Requirements for building GDB * Running Configure:: Invoking the GDB `configure' script * Separate Objdir:: Compiling GDB in another directory * Config Names:: Specifying names for hosts and targets * Configure Options:: Summary of options for configure * System-wide configuration:: Having a system-wide init file  File: gdb.info, Node: Requirements, Next: Running Configure, Up: Installing GDB C.1 Requirements for Building GDB ================================= Building GDB requires various tools and packages to be available. Other packages will be used only if they are found. Tools/Packages Necessary for Building GDB ========================================= ISO C90 compiler GDB is written in ISO C90. It should be buildable with any working C90 compiler, e.g. GCC. Tools/Packages Optional for Building GDB ======================================== Expat GDB can use the Expat XML parsing library. This library may be included with your operating system distribution; if it is not, you can get the latest version from `http://expat.sourceforge.net'. The `configure' script will search for this library in several standard locations; if it is installed in an unusual path, you can use the `--with-libexpat-prefix' option to specify its location. Expat is used for: * Remote protocol memory maps (*note Memory Map Format::) * Target descriptions (*note Target Descriptions::) * Remote shared library lists (*Note Library List Format::, or alternatively *note Library List Format for SVR4 Targets::) * MS-Windows shared libraries (*note Shared Libraries::) * Traceframe info (*note Traceframe Info Format::) * Branch trace (*note Branch Trace Format::) zlib GDB will use the `zlib' library, if available, to read compressed debug sections. Some linkers, such as GNU gold, are capable of producing binaries with compressed debug sections. If GDB is compiled with `zlib', it will be able to read the debug information in such binaries. The `zlib' library is likely included with your operating system distribution; if it is not, you can get the latest version from `http://zlib.net'. iconv GDB's features related to character sets (*note Character Sets::) require a functioning `iconv' implementation. If you are on a GNU system, then this is provided by the GNU C Library. Some other systems also provide a working `iconv'. If GDB is using the `iconv' program which is installed in a non-standard place, you will need to tell GDB where to find it. This is done with `--with-iconv-bin' which specifies the directory that contains the `iconv' program. On systems without `iconv', you can install GNU Libiconv. If you have previously installed Libiconv, you can use the `--with-libiconv-prefix' option to configure. GDB's top-level `configure' and `Makefile' will arrange to build Libiconv if a directory named `libiconv' appears in the top-most source directory. If Libiconv is built this way, and if the operating system does not provide a suitable `iconv' implementation, then the just-built library will automatically be used by GDB. One easy way to set this up is to download GNU Libiconv, unpack it, and then rename the directory holding the Libiconv source code to `libiconv'.  File: gdb.info, Node: Running Configure, Next: Separate Objdir, Prev: Requirements, Up: Installing GDB C.2 Invoking the GDB `configure' Script ======================================= GDB comes with a `configure' script that automates the process of preparing GDB for installation; you can then use `make' to build the `gdb' program. The GDB distribution includes all the source code you need for GDB in a single directory, whose name is usually composed by appending the version number to `gdb'. For example, the GDB version 7.6.2 distribution is in the `gdb-7.6.2' directory. That directory contains: `gdb-7.6.2/configure (and supporting files)' script for configuring GDB and all its supporting libraries `gdb-7.6.2/gdb' the source specific to GDB itself `gdb-7.6.2/bfd' source for the Binary File Descriptor library `gdb-7.6.2/include' GNU include files `gdb-7.6.2/libiberty' source for the `-liberty' free software library `gdb-7.6.2/opcodes' source for the library of opcode tables and disassemblers `gdb-7.6.2/readline' source for the GNU command-line interface `gdb-7.6.2/glob' source for the GNU filename pattern-matching subroutine `gdb-7.6.2/mmalloc' source for the GNU memory-mapped malloc package The simplest way to configure and build GDB is to run `configure' from the `gdb-VERSION-NUMBER' source directory, which in this example is the `gdb-7.6.2' directory. First switch to the `gdb-VERSION-NUMBER' source directory if you are not already in it; then run `configure'. Pass the identifier for the platform on which GDB will run as an argument. For example: cd gdb-7.6.2 ./configure HOST make where HOST is an identifier such as `sun4' or `decstation', that identifies the platform where GDB will run. (You can often leave off HOST; `configure' tries to guess the correct value by examining your system.) Running `configure HOST' and then running `make' builds the `bfd', `readline', `mmalloc', and `libiberty' libraries, then `gdb' itself. The configured source files, and the binaries, are left in the corresponding source directories. `configure' is a Bourne-shell (`/bin/sh') script; if your system does not recognize this automatically when you run a different shell, you may need to run `sh' on it explicitly: sh configure HOST If you run `configure' from a directory that contains source directories for multiple libraries or programs, such as the `gdb-7.6.2' source directory for version 7.6.2, `configure' creates configuration files for every directory level underneath (unless you tell it not to, with the `--norecursion' option). You should run the `configure' script from the top directory in the source tree, the `gdb-VERSION-NUMBER' directory. If you run `configure' from one of the subdirectories, you will configure only that subdirectory. That is usually not what you want. In particular, if you run the first `configure' from the `gdb' subdirectory of the `gdb-VERSION-NUMBER' directory, you will omit the configuration of `bfd', `readline', and other sibling directories of the `gdb' subdirectory. This leads to build errors about missing include files such as `bfd/bfd.h'. You can install `gdb' anywhere; it has no hardwired paths. However, you should make sure that the shell on your path (named by the `SHELL' environment variable) is publicly readable. Remember that GDB uses the shell to start your program--some systems refuse to let GDB debug child processes whose programs are not readable.  File: gdb.info, Node: Separate Objdir, Next: Config Names, Prev: Running Configure, Up: Installing GDB C.3 Compiling GDB in Another Directory ====================================== If you want to run GDB versions for several host or target machines, you need a different `gdb' compiled for each combination of host and target. `configure' is designed to make this easy by allowing you to generate each configuration in a separate subdirectory, rather than in the source directory. If your `make' program handles the `VPATH' feature (GNU `make' does), running `make' in each of these directories builds the `gdb' program specified there. To build `gdb' in a separate directory, run `configure' with the `--srcdir' option to specify where to find the source. (You also need to specify a path to find `configure' itself from your working directory. If the path to `configure' would be the same as the argument to `--srcdir', you can leave out the `--srcdir' option; it is assumed.) For example, with version 7.6.2, you can build GDB in a separate directory for a Sun 4 like this: cd gdb-7.6.2 mkdir ../gdb-sun4 cd ../gdb-sun4 ../gdb-7.6.2/configure sun4 make When `configure' builds a configuration using a remote source directory, it creates a tree for the binaries with the same structure (and using the same names) as the tree under the source directory. In the example, you'd find the Sun 4 library `libiberty.a' in the directory `gdb-sun4/libiberty', and GDB itself in `gdb-sun4/gdb'. Make sure that your path to the `configure' script has just one instance of `gdb' in it. If your path to `configure' looks like `../gdb-7.6.2/gdb/configure', you are configuring only one subdirectory of GDB, not the whole package. This leads to build errors about missing include files such as `bfd/bfd.h'. One popular reason to build several GDB configurations in separate directories is to configure GDB for cross-compiling (where GDB runs on one machine--the "host"--while debugging programs that run on another machine--the "target"). You specify a cross-debugging target by giving the `--target=TARGET' option to `configure'. When you run `make' to build a program or library, you must run it in a configured directory--whatever directory you were in when you called `configure' (or one of its subdirectories). The `Makefile' that `configure' generates in each source directory also runs recursively. If you type `make' in a source directory such as `gdb-7.6.2' (or in a separate configured directory configured with `--srcdir=DIRNAME/gdb-7.6.2'), you will build all the required libraries, and then build GDB. When you have multiple hosts or targets configured in separate directories, you can run `make' on them in parallel (for example, if they are NFS-mounted on each of the hosts); they will not interfere with each other.  File: gdb.info, Node: Config Names, Next: Configure Options, Prev: Separate Objdir, Up: Installing GDB C.4 Specifying Names for Hosts and Targets ========================================== The specifications used for hosts and targets in the `configure' script are based on a three-part naming scheme, but some short predefined aliases are also supported. The full naming scheme encodes three pieces of information in the following pattern: ARCHITECTURE-VENDOR-OS For example, you can use the alias `sun4' as a HOST argument, or as the value for TARGET in a `--target=TARGET' option. The equivalent full name is `sparc-sun-sunos4'. The `configure' script accompanying GDB does not provide any query facility to list all supported host and target names or aliases. `configure' calls the Bourne shell script `config.sub' to map abbreviations to full names; you can read the script, if you wish, or you can use it to test your guesses on abbreviations--for example: % sh config.sub i386-linux i386-pc-linux-gnu % sh config.sub alpha-linux alpha-unknown-linux-gnu % sh config.sub hp9k700 hppa1.1-hp-hpux % sh config.sub sun4 sparc-sun-sunos4.1.1 % sh config.sub sun3 m68k-sun-sunos4.1.1 % sh config.sub i986v Invalid configuration `i986v': machine `i986v' not recognized `config.sub' is also distributed in the GDB source directory (`gdb-7.6.2', for version 7.6.2).  File: gdb.info, Node: Configure Options, Next: System-wide configuration, Prev: Config Names, Up: Installing GDB C.5 `configure' Options ======================= Here is a summary of the `configure' options and arguments that are most often useful for building GDB. `configure' also has several other options not listed here. *note (configure.info)What Configure Does::, for a full explanation of `configure'. configure [--help] [--prefix=DIR] [--exec-prefix=DIR] [--srcdir=DIRNAME] [--norecursion] [--rm] [--target=TARGET] HOST You may introduce options with a single `-' rather than `--' if you prefer; but you may abbreviate option names if you use `--'. `--help' Display a quick summary of how to invoke `configure'. `--prefix=DIR' Configure the source to install programs and files under directory `DIR'. `--exec-prefix=DIR' Configure the source to install programs under directory `DIR'. `--srcdir=DIRNAME' *Warning: using this option requires GNU `make', or another `make' that implements the `VPATH' feature.* Use this option to make configurations in directories separate from the GDB source directories. Among other things, you can use this to build (or maintain) several configurations simultaneously, in separate directories. `configure' writes configuration-specific files in the current directory, but arranges for them to use the source in the directory DIRNAME. `configure' creates directories under the working directory in parallel to the source directories below DIRNAME. `--norecursion' Configure only the directory level where `configure' is executed; do not propagate configuration to subdirectories. `--target=TARGET' Configure GDB for cross-debugging programs running on the specified TARGET. Without this option, GDB is configured to debug programs that run on the same machine (HOST) as GDB itself. There is no convenient way to generate a list of all available targets. `HOST ...' Configure GDB to run on the specified HOST. There is no convenient way to generate a list of all available hosts. There are many other options available as well, but they are generally needed for special purposes only.  File: gdb.info, Node: System-wide configuration, Prev: Configure Options, Up: Installing GDB C.6 System-wide configuration and settings ========================================== GDB can be configured to have a system-wide init file; this file will be read and executed at startup (*note What GDB does during startup: Startup.). Here is the corresponding configure option: `--with-system-gdbinit=FILE' Specify that the default location of the system-wide init file is FILE. If GDB has been configured with the option `--prefix=$prefix', it may be subject to relocation. Two possible cases: * If the default location of this init file contains `$prefix', it will be subject to relocation. Suppose that the configure options are `--prefix=$prefix --with-system-gdbinit=$prefix/etc/gdbinit'; if GDB is moved from `$prefix' to `$install', the system init file is looked for as `$install/etc/gdbinit' instead of `$prefix/etc/gdbinit'. * By contrast, if the default location does not contain the prefix, it will not be relocated. E.g. if GDB has been configured with `--prefix=/usr/local --with-system-gdbinit=/usr/share/gdb/gdbinit', then GDB will always look for `/usr/share/gdb/gdbinit', wherever GDB is installed. If the configured location of the system-wide init file (as given by the `--with-system-gdbinit' option at configure time) is in the data-directory (as specified by `--with-gdb-datadir' at configure time) or in one of its subdirectories, then GDB will look for the system-wide init file in the directory specified by the `--data-directory' command-line option. Note that the system-wide init file is only read once, during GDB initialization. If the data-directory is changed after GDB has started with the `set data-directory' command, the file will not be reread.  File: gdb.info, Node: Maintenance Commands, Next: Remote Protocol, Prev: Installing GDB, Up: Top Appendix D Maintenance Commands ******************************* In addition to commands intended for GDB users, GDB includes a number of commands intended for GDB developers, that are not documented elsewhere in this manual. These commands are provided here for reference. (For commands that turn on debugging messages, see *note Debugging Output::.) `maint agent [-at LOCATION,] EXPRESSION' `maint agent-eval [-at LOCATION,] EXPRESSION' Translate the given EXPRESSION into remote agent bytecodes. This command is useful for debugging the Agent Expression mechanism (*note Agent Expressions::). The `agent' version produces an expression useful for data collection, such as by tracepoints, while `maint agent-eval' produces an expression that evaluates directly to a result. For instance, a collection expression for `globa + globb' will include bytecodes to record four bytes of memory at each of the addresses of `globa' and `globb', while discarding the result of the addition, while an evaluation expression will do the addition and return the sum. If `-at' is given, generate remote agent bytecode for LOCATION. If not, generate remote agent bytecode for current frame PC address. `maint agent-printf FORMAT,EXPR,...' Translate the given format string and list of argument expressions into remote agent bytecodes and display them as a disassembled list. This command is useful for debugging the agent version of dynamic printf (*note Dynamic Printf::. `maint info breakpoints' Using the same format as `info breakpoints', display both the breakpoints you've set explicitly, and those GDB is using for internal purposes. Internal breakpoints are shown with negative breakpoint numbers. The type column identifies what kind of breakpoint is shown: `breakpoint' Normal, explicitly set breakpoint. `watchpoint' Normal, explicitly set watchpoint. `longjmp' Internal breakpoint, used to handle correctly stepping through `longjmp' calls. `longjmp resume' Internal breakpoint at the target of a `longjmp'. `until' Temporary internal breakpoint used by the GDB `until' command. `finish' Temporary internal breakpoint used by the GDB `finish' command. `shlib events' Shared library events. `maint info bfds' This prints information about each `bfd' object that is known to GDB. *Note BFD: (bfd)Top. `set displaced-stepping' `show displaced-stepping' Control whether or not GDB will do "displaced stepping" if the target supports it. Displaced stepping is a way to single-step over breakpoints without removing them from the inferior, by executing an out-of-line copy of the instruction that was originally at the breakpoint location. It is also known as out-of-line single-stepping. `set displaced-stepping on' If the target architecture supports it, GDB will use displaced stepping to step over breakpoints. `set displaced-stepping off' GDB will not use displaced stepping to step over breakpoints, even if such is supported by the target architecture. `set displaced-stepping auto' This is the default mode. GDB will use displaced stepping only if non-stop mode is active (*note Non-Stop Mode::) and the target architecture supports displaced stepping. `maint check-symtabs' Check the consistency of psymtabs and symtabs. `maint cplus first_component NAME' Print the first C++ class/namespace component of NAME. `maint cplus namespace' Print the list of possible C++ namespaces. `maint demangle NAME' Demangle a C++ or Objective-C mangled NAME. `maint deprecate COMMAND [REPLACEMENT]' `maint undeprecate COMMAND' Deprecate or undeprecate the named COMMAND. Deprecated commands cause GDB to issue a warning when you use them. The optional argument REPLACEMENT says which newer command should be used in favor of the deprecated one; if it is given, GDB will mention the replacement as part of the warning. `maint dump-me' Cause a fatal signal in the debugger and force it to dump its core. This is supported only on systems which support aborting a program with the `SIGQUIT' signal. `maint internal-error [MESSAGE-TEXT]' `maint internal-warning [MESSAGE-TEXT]' Cause GDB to call the internal function `internal_error' or `internal_warning' and hence behave as though an internal error or internal warning has been detected. In addition to reporting the internal problem, these functions give the user the opportunity to either quit GDB or create a core file of the current GDB session. These commands take an optional parameter MESSAGE-TEXT that is used as the text of the error or warning message. Here's an example of using `internal-error': (gdb) maint internal-error testing, 1, 2 .../maint.c:121: internal-error: testing, 1, 2 A problem internal to GDB has been detected. Further debugging may prove unreliable. Quit this debugging session? (y or n) n Create a core file? (y or n) n (gdb) `maint set internal-error ACTION [ask|yes|no]' `maint show internal-error ACTION' `maint set internal-warning ACTION [ask|yes|no]' `maint show internal-warning ACTION' When GDB reports an internal problem (error or warning) it gives the user the opportunity to both quit GDB and create a core file of the current GDB session. These commands let you override the default behaviour for each particular ACTION, described in the table below. `quit' You can specify that GDB should always (yes) or never (no) quit. The default is to ask the user what to do. `corefile' You can specify that GDB should always (yes) or never (no) create a core file. The default is to ask the user what to do. `maint packet TEXT' If GDB is talking to an inferior via the serial protocol, then this command sends the string TEXT to the inferior, and displays the response packet. GDB supplies the initial `$' character, the terminating `#' character, and the checksum. `maint print architecture [FILE]' Print the entire architecture configuration. The optional argument FILE names the file where the output goes. `maint print c-tdesc' Print the current target description (*note Target Descriptions::) as a C source file. The created source file can be used in GDB when an XML parser is not available to parse the description. `maint print dummy-frames' Prints the contents of GDB's internal dummy-frame stack. (gdb) b add ... (gdb) print add(2,3) Breakpoint 2, add (a=2, b=3) at ... 58 return (a + b); The program being debugged stopped while in a function called from GDB. ... (gdb) maint print dummy-frames 0x1a57c80: pc=0x01014068 fp=0x0200bddc sp=0x0200bdd6 top=0x0200bdd4 id={stack=0x200bddc,code=0x101405c} call_lo=0x01014000 call_hi=0x01014001 (gdb) Takes an optional file parameter. `maint print registers [FILE]' `maint print raw-registers [FILE]' `maint print cooked-registers [FILE]' `maint print register-groups [FILE]' `maint print remote-registers [FILE]' Print GDB's internal register data structures. The command `maint print raw-registers' includes the contents of the raw register cache; the command `maint print cooked-registers' includes the (cooked) value of all registers, including registers which aren't available on the target nor visible to user; the command `maint print register-groups' includes the groups that each register is a member of; and the command `maint print remote-registers' includes the remote target's register numbers and offsets in the `G' packets. *Note Registers: (gdbint)Registers. These commands take an optional parameter, a file name to which to write the information. `maint print reggroups [FILE]' Print GDB's internal register group data structures. The optional argument FILE tells to what file to write the information. The register groups info looks like this: (gdb) maint print reggroups Group Type general user float user all user vector user system user save internal restore internal `flushregs' This command forces GDB to flush its internal register cache. `maint print objfiles' Print a dump of all known object files. For each object file, this command prints its name, address in memory, and all of its psymtabs and symtabs. `maint print section-scripts [REGEXP]' Print a dump of scripts specified in the `.debug_gdb_section' section. If REGEXP is specified, only print scripts loaded by object files matching REGEXP. For each script, this command prints its name as specified in the objfile, and the full path if known. *Note dotdebug_gdb_scripts section::. `maint print statistics' This command prints, for each object file in the program, various data about that object file followed by the byte cache ("bcache") statistics for the object file. The objfile data includes the number of minimal, partial, full, and stabs symbols, the number of types defined by the objfile, the number of as yet unexpanded psym tables, the number of line tables and string tables, and the amount of memory used by the various tables. The bcache statistics include the counts, sizes, and counts of duplicates of all and unique objects, max, average, and median entry size, total memory used and its overhead and savings, and various measures of the hash table size and chain lengths. `maint print target-stack' A "target" is an interface between the debugger and a particular kind of file or process. Targets can be stacked in "strata", so that more than one target can potentially respond to a request. In particular, memory accesses will walk down the stack of targets until they find a target that is interested in handling that particular address. This command prints a short description of each layer that was pushed on the "target stack", starting from the top layer down to the bottom one. `maint print type EXPR' Print the type chain for a type specified by EXPR. The argument can be either a type name or a symbol. If it is a symbol, the type of that symbol is described. The type chain produced by this command is a recursive definition of the data type as stored in GDB's data structures, including its flags and contained types. `maint set dwarf2 always-disassemble' `maint show dwarf2 always-disassemble' Control the behavior of `info address' when using DWARF debugging information. The default is `off', which means that GDB should try to describe a variable's location in an easily readable format. When `on', GDB will instead display the DWARF location expression in an assembly-like format. Note that some locations are too complex for GDB to describe simply; in this case you will always see the disassembly form. Here is an example of the resulting disassembly: (gdb) info addr argc Symbol "argc" is a complex DWARF expression: 1: DW_OP_fbreg 0 For more information on these expressions, see the DWARF standard (http://www.dwarfstd.org/). `maint set dwarf2 max-cache-age' `maint show dwarf2 max-cache-age' Control the DWARF 2 compilation unit cache. In object files with inter-compilation-unit references, such as those produced by the GCC option `-feliminate-dwarf2-dups', the DWARF 2 reader needs to frequently refer to previously read compilation units. This setting controls how long a compilation unit will remain in the cache if it is not referenced. A higher limit means that cached compilation units will be stored in memory longer, and more total memory will be used. Setting it to zero disables caching, which will slow down GDB startup, but reduce memory consumption. `maint set profile' `maint show profile' Control profiling of GDB. Profiling will be disabled until you use the `maint set profile' command to enable it. When you enable profiling, the system will begin collecting timing and execution count data; when you disable profiling or exit GDB, the results will be written to a log file. Remember that if you use profiling, GDB will overwrite the profiling log file (often called `gmon.out'). If you have a record of important profiling data in a `gmon.out' file, be sure to move it to a safe location. Configuring with `--enable-profiling' arranges for GDB to be compiled with the `-pg' compiler option. `maint set show-debug-regs' `maint show show-debug-regs' Control whether to show variables that mirror the hardware debug registers. Use `ON' to enable, `OFF' to disable. If enabled, the debug registers values are shown when GDB inserts or removes a hardware breakpoint or watchpoint, and when the inferior triggers a hardware-assisted breakpoint or watchpoint. `maint set show-all-tib' `maint show show-all-tib' Control whether to show all non zero areas within a 1k block starting at thread local base, when using the `info w32 thread-information-block' command. `maint space' Control whether to display memory usage for each command. If set to a nonzero value, GDB will display how much memory each command took, following the command's own output. This can also be requested by invoking GDB with the `--statistics' command-line switch (*note Mode Options::). `maint time' Control whether to display the execution time of GDB for each command. If set to a nonzero value, GDB will display how much time it took to execute each command, following the command's own output. Both CPU time and wallclock time are printed. Printing both is useful when trying to determine whether the cost is CPU or, e.g., disk/network, latency. Note that the CPU time printed is for GDB only, it does not include the execution time of the inferior because there's no mechanism currently to compute how much time was spent by GDB and how much time was spent by the program been debugged. This can also be requested by invoking GDB with the `--statistics' command-line switch (*note Mode Options::). `maint translate-address [SECTION] ADDR' Find the symbol stored at the location specified by the address ADDR and an optional section name SECTION. If found, GDB prints the name of the closest symbol and an offset from the symbol's location to the specified address. This is similar to the `info address' command (*note Symbols::), except that this command also allows to find symbols in other sections. If section was not specified, the section in which the symbol was found is also printed. For dynamically linked executables, the name of executable or shared library containing the symbol is printed as well. The following command is useful for non-interactive invocations of GDB, such as in the test suite. `set watchdog NSEC' Set the maximum number of seconds GDB will wait for the target operation to finish. If this time expires, GDB reports and error and the command is aborted. `show watchdog' Show the current setting of the target wait timeout.  File: gdb.info, Node: Remote Protocol, Next: Agent Expressions, Prev: Maintenance Commands, Up: Top Appendix E GDB Remote Serial Protocol ************************************* * Menu: * Overview:: * Packets:: * Stop Reply Packets:: * General Query Packets:: * Architecture-Specific Protocol Details:: * Tracepoint Packets:: * Host I/O Packets:: * Interrupts:: * Notification Packets:: * Remote Non-Stop:: * Packet Acknowledgment:: * Examples:: * File-I/O Remote Protocol Extension:: * Library List Format:: * Library List Format for SVR4 Targets:: * Memory Map Format:: * Thread List Format:: * Traceframe Info Format:: * Branch Trace Format::  File: gdb.info, Node: Overview, Next: Packets, Up: Remote Protocol E.1 Overview ============ There may be occasions when you need to know something about the protocol--for example, if there is only one serial port to your target machine, you might want your program to do something special if it recognizes a packet meant for GDB. In the examples below, `->' and `<-' are used to indicate transmitted and received data, respectively. All GDB commands and responses (other than acknowledgments and notifications, see *note Notification Packets::) are sent as a PACKET. A PACKET is introduced with the character `$', the actual PACKET-DATA, and the terminating character `#' followed by a two-digit CHECKSUM: `$'PACKET-DATA`#'CHECKSUM The two-digit CHECKSUM is computed as the modulo 256 sum of all characters between the leading `$' and the trailing `#' (an eight bit unsigned checksum). Implementors should note that prior to GDB 5.0 the protocol specification also included an optional two-digit SEQUENCE-ID: `$'SEQUENCE-ID`:'PACKET-DATA`#'CHECKSUM That SEQUENCE-ID was appended to the acknowledgment. GDB has never output SEQUENCE-IDs. Stubs that handle packets added since GDB 5.0 must not accept SEQUENCE-ID. When either the host or the target machine receives a packet, the first response expected is an acknowledgment: either `+' (to indicate the package was received correctly) or `-' (to request retransmission): -> `$'PACKET-DATA`#'CHECKSUM <- `+' The `+'/`-' acknowledgments can be disabled once a connection is established. *Note Packet Acknowledgment::, for details. The host (GDB) sends COMMANDs, and the target (the debugging stub incorporated in your program) sends a RESPONSE. In the case of step and continue COMMANDs, the response is only sent when the operation has completed, and the target has again stopped all threads in all attached processes. This is the default all-stop mode behavior, but the remote protocol also supports GDB's non-stop execution mode; see *note Remote Non-Stop::, for details. PACKET-DATA consists of a sequence of characters with the exception of `#' and `$' (see `X' packet for additional exceptions). Fields within the packet should be separated using `,' `;' or `:'. Except where otherwise noted all numbers are represented in HEX with leading zeros suppressed. Implementors should note that prior to GDB 5.0, the character `:' could not appear as the third character in a packet (as it would potentially conflict with the SEQUENCE-ID). Binary data in most packets is encoded either as two hexadecimal digits per byte of binary data. This allowed the traditional remote protocol to work over connections which were only seven-bit clean. Some packets designed more recently assume an eight-bit clean connection, and use a more efficient encoding to send and receive binary data. The binary data representation uses `7d' (ASCII `}') as an escape character. Any escaped byte is transmitted as the escape character followed by the original character XORed with `0x20'. For example, the byte `0x7d' would be transmitted as the two bytes `0x7d 0x5d'. The bytes `0x23' (ASCII `#'), `0x24' (ASCII `$'), and `0x7d' (ASCII `}') must always be escaped. Responses sent by the stub must also escape `0x2a' (ASCII `*'), so that it is not interpreted as the start of a run-length encoded sequence (described next). Response DATA can be run-length encoded to save space. Run-length encoding replaces runs of identical characters with one instance of the repeated character, followed by a `*' and a repeat count. The repeat count is itself sent encoded, to avoid binary characters in DATA: a value of N is sent as `N+29'. For a repeat count greater or equal to 3, this produces a printable ASCII character, e.g. a space (ASCII code 32) for a repeat count of 3. (This is because run-length encoding starts to win for counts 3 or more.) Thus, for example, `0* ' is a run-length encoding of "0000": the space character after `*' means repeat the leading `0' `32 - 29 = 3' more times. The printable characters `#' and `$' or with a numeric value greater than 126 must not be used. Runs of six repeats (`#') or seven repeats (`$') can be expanded using a repeat count of only five (`"'). For example, `00000000' can be encoded as `0*"00'. The error response returned for some packets includes a two character error number. That number is not well defined. For any COMMAND not supported by the stub, an empty response (`$#00') should be returned. That way it is possible to extend the protocol. A newer GDB can tell if a packet is supported based on that response. At a minimum, a stub is required to support the `g' and `G' commands for register access, and the `m' and `M' commands for memory access. Stubs that only control single-threaded targets can implement run control with the `c' (continue), and `s' (step) commands. Stubs that support multi-threading targets should support the `vCont' command. All other commands are optional.  File: gdb.info, Node: Packets, Next: Stop Reply Packets, Prev: Overview, Up: Remote Protocol E.2 Packets =========== The following table provides a complete list of all currently defined COMMANDs and their corresponding response DATA. *Note File-I/O Remote Protocol Extension::, for details about the File I/O extension of the remote protocol. Each packet's description has a template showing the packet's overall syntax, followed by an explanation of the packet's meaning. We include spaces in some of the templates for clarity; these are not part of the packet's syntax. No GDB packet uses spaces to separate its components. For example, a template like `foo BAR BAZ' describes a packet beginning with the three ASCII bytes `foo', followed by a BAR, followed directly by a BAZ. GDB does not transmit a space character between the `foo' and the BAR, or between the BAR and the BAZ. Several packets and replies include a THREAD-ID field to identify a thread. Normally these are positive numbers with a target-specific interpretation, formatted as big-endian hex strings. A THREAD-ID can also be a literal `-1' to indicate all threads, or `0' to pick any thread. In addition, the remote protocol supports a multiprocess feature in which the THREAD-ID syntax is extended to optionally include both process and thread ID fields, as `pPID.TID'. The PID (process) and TID (thread) components each have the format described above: a positive number with target-specific interpretation formatted as a big-endian hex string, literal `-1' to indicate all processes or threads (respectively), or `0' to indicate an arbitrary process or thread. Specifying just a process, as `pPID', is equivalent to `pPID.-1'. It is an error to specify all processes but a specific thread, such as `p-1.TID'. Note that the `p' prefix is _not_ used for those packets and replies explicitly documented to include a process ID, rather than a THREAD-ID. The multiprocess THREAD-ID syntax extensions are only used if both GDB and the stub report support for the `multiprocess' feature using `qSupported'. *Note multiprocess extensions::, for more information. Note that all packet forms beginning with an upper- or lower-case letter, other than those described here, are reserved for future use. Here are the packet descriptions. `!' Enable extended mode. In extended mode, the remote server is made persistent. The `R' packet is used to restart the program being debugged. Reply: `OK' The remote target both supports and has enabled extended mode. `?' Indicate the reason the target halted. The reply is the same as for step and continue. This packet has a special interpretation when the target is in non-stop mode; see *note Remote Non-Stop::. Reply: *Note Stop Reply Packets::, for the reply specifications. `A ARGLEN,ARGNUM,ARG,...' Initialized `argv[]' array passed into program. ARGLEN specifies the number of bytes in the hex encoded byte stream ARG. See `gdbserver' for more details. Reply: `OK' The arguments were set. `E NN' An error occurred. `b BAUD' (Don't use this packet; its behavior is not well-defined.) Change the serial line speed to BAUD. JTC: _When does the transport layer state change? When it's received, or after the ACK is transmitted. In either case, there are problems if the command or the acknowledgment packet is dropped._ Stan: _If people really wanted to add something like this, and get it working for the first time, they ought to modify ser-unix.c to send some kind of out-of-band message to a specially-setup stub and have the switch happen "in between" packets, so that from remote protocol's point of view, nothing actually happened._ `B ADDR,MODE' Set (MODE is `S') or clear (MODE is `C') a breakpoint at ADDR. Don't use this packet. Use the `Z' and `z' packets instead (*note insert breakpoint or watchpoint packet::). `bc' Backward continue. Execute the target system in reverse. No parameter. *Note Reverse Execution::, for more information. Reply: *Note Stop Reply Packets::, for the reply specifications. `bs' Backward single step. Execute one instruction in reverse. No parameter. *Note Reverse Execution::, for more information. Reply: *Note Stop Reply Packets::, for the reply specifications. `c [ADDR]' Continue. ADDR is address to resume. If ADDR is omitted, resume at current address. This packet is deprecated for multi-threading support. *Note vCont packet::. Reply: *Note Stop Reply Packets::, for the reply specifications. `C SIG[;ADDR]' Continue with signal SIG (hex signal number). If `;ADDR' is omitted, resume at same address. This packet is deprecated for multi-threading support. *Note vCont packet::. Reply: *Note Stop Reply Packets::, for the reply specifications. `d' Toggle debug flag. Don't use this packet; instead, define a general set packet (*note General Query Packets::). `D' `D;PID' The first form of the packet is used to detach GDB from the remote system. It is sent to the remote target before GDB disconnects via the `detach' command. The second form, including a process ID, is used when multiprocess protocol extensions are enabled (*note multiprocess extensions::), to detach only a specific process. The PID is specified as a big-endian hex string. Reply: `OK' for success `E NN' for an error `F RC,EE,CF;XX' A reply from GDB to an `F' packet sent by the target. This is part of the File-I/O protocol extension. *Note File-I/O Remote Protocol Extension::, for the specification. `g' Read general registers. Reply: `XX...' Each byte of register data is described by two hex digits. The bytes with the register are transmitted in target byte order. The size of each register and their position within the `g' packet are determined by the GDB internal gdbarch functions `DEPRECATED_REGISTER_RAW_SIZE' and `gdbarch_register_name'. The specification of several standard `g' packets is specified below. When reading registers from a trace frame (*note Using the Collected Data: Analyze Collected Data.), the stub may also return a string of literal `x''s in place of the register data digits, to indicate that the corresponding register has not been collected, thus its value is unavailable. For example, for an architecture with 4 registers of 4 bytes each, the following reply indicates to GDB that registers 0 and 2 have not been collected, while registers 1 and 3 have been collected, and both have zero value: -> `g' <- `xxxxxxxx00000000xxxxxxxx00000000' `E NN' for an error. `G XX...' Write general registers. *Note read registers packet::, for a description of the XX... data. Reply: `OK' for success `E NN' for an error `H OP THREAD-ID' Set thread for subsequent operations (`m', `M', `g', `G', et.al.). OP depends on the operation to be performed: it should be `c' for step and continue operations (note that this is deprecated, supporting the `vCont' command is a better option), `g' for other operations. The thread designator THREAD-ID has the format and interpretation described in *note thread-id syntax::. Reply: `OK' for success `E NN' for an error `i [ADDR[,NNN]]' Step the remote target by a single clock cycle. If `,NNN' is present, cycle step NNN cycles. If ADDR is present, cycle step starting at that address. `I' Signal, then cycle step. *Note step with signal packet::. *Note cycle step packet::. `k' Kill request. FIXME: _There is no description of how to operate when a specific thread context has been selected (i.e. does 'k' kill only that thread?)_. `m ADDR,LENGTH' Read LENGTH bytes of memory starting at address ADDR. Note that ADDR may not be aligned to any particular boundary. The stub need not use any particular size or alignment when gathering data from memory for the response; even if ADDR is word-aligned and LENGTH is a multiple of the word size, the stub is free to use byte accesses, or not. For this reason, this packet may not be suitable for accessing memory-mapped I/O devices. Reply: `XX...' Memory contents; each byte is transmitted as a two-digit hexadecimal number. The reply may contain fewer bytes than requested if the server was able to read only part of the region of memory. `E NN' NN is errno `M ADDR,LENGTH:XX...' Write LENGTH bytes of memory starting at address ADDR. XX... is the data; each byte is transmitted as a two-digit hexadecimal number. Reply: `OK' for success `E NN' for an error (this includes the case where only part of the data was written). `p N' Read the value of register N; N is in hex. *Note read registers packet::, for a description of how the returned register value is encoded. Reply: `XX...' the register's value `E NN' for an error `' Indicating an unrecognized QUERY. `P N...=R...' Write register N... with value R.... The register number N is in hexadecimal, and R... contains two hex digits for each byte in the register (target byte order). Reply: `OK' for success `E NN' for an error `q NAME PARAMS...' `Q NAME PARAMS...' General query (`q') and set (`Q'). These packets are described fully in *note General Query Packets::. `r' Reset the entire system. Don't use this packet; use the `R' packet instead. `R XX' Restart the program being debugged. XX, while needed, is ignored. This packet is only available in extended mode (*note extended mode::). The `R' packet has no reply. `s [ADDR]' Single step. ADDR is the address at which to resume. If ADDR is omitted, resume at same address. This packet is deprecated for multi-threading support. *Note vCont packet::. Reply: *Note Stop Reply Packets::, for the reply specifications. `S SIG[;ADDR]' Step with signal. This is analogous to the `C' packet, but requests a single-step, rather than a normal resumption of execution. This packet is deprecated for multi-threading support. *Note vCont packet::. Reply: *Note Stop Reply Packets::, for the reply specifications. `t ADDR:PP,MM' Search backwards starting at address ADDR for a match with pattern PP and mask MM. PP and MM are 4 bytes. ADDR must be at least 3 digits. `T THREAD-ID' Find out if the thread THREAD-ID is alive. *Note thread-id syntax::. Reply: `OK' thread is still alive `E NN' thread is dead `v' Packets starting with `v' are identified by a multi-letter name, up to the first `;' or `?' (or the end of the packet). `vAttach;PID' Attach to a new process with the specified process ID PID. The process ID is a hexadecimal integer identifying the process. In all-stop mode, all threads in the attached process are stopped; in non-stop mode, it may be attached without being stopped if that is supported by the target. This packet is only available in extended mode (*note extended mode::). Reply: `E NN' for an error `Any stop packet' for success in all-stop mode (*note Stop Reply Packets::) `OK' for success in non-stop mode (*note Remote Non-Stop::) `vCont[;ACTION[:THREAD-ID]]...' Resume the inferior, specifying different actions for each thread. If an action is specified with no THREAD-ID, then it is applied to any threads that don't have a specific action specified; if no default action is specified then other threads should remain stopped in all-stop mode and in their current state in non-stop mode. Specifying multiple default actions is an error; specifying no actions is also an error. Thread IDs are specified using the syntax described in *note thread-id syntax::. Currently supported actions are: `c' Continue. `C SIG' Continue with signal SIG. The signal SIG should be two hex digits. `s' Step. `S SIG' Step with signal SIG. The signal SIG should be two hex digits. `t' Stop. The optional argument ADDR normally associated with the `c', `C', `s', and `S' packets is not supported in `vCont'. The `t' action is only relevant in non-stop mode (*note Remote Non-Stop::) and may be ignored by the stub otherwise. A stop reply should be generated for any affected thread not already stopped. When a thread is stopped by means of a `t' action, the corresponding stop reply should indicate that the thread has stopped with signal `0', regardless of whether the target uses some other signal as an implementation detail. The stub must support `vCont' if it reports support for multiprocess extensions (*note multiprocess extensions::). Note that in this case `vCont' actions can be specified to apply to all threads in a process by using the `pPID.-1' form of the THREAD-ID. Reply: *Note Stop Reply Packets::, for the reply specifications. `vCont?' Request a list of actions supported by the `vCont' packet. Reply: `vCont[;ACTION...]' The `vCont' packet is supported. Each ACTION is a supported command in the `vCont' packet. `' The `vCont' packet is not supported. `vFile:OPERATION:PARAMETER...' Perform a file operation on the target system. For details, see *note Host I/O Packets::. `vFlashErase:ADDR,LENGTH' Direct the stub to erase LENGTH bytes of flash starting at ADDR. The region may enclose any number of flash blocks, but its start and end must fall on block boundaries, as indicated by the flash block size appearing in the memory map (*note Memory Map Format::). GDB groups flash memory programming operations together, and sends a `vFlashDone' request after each group; the stub is allowed to delay erase operation until the `vFlashDone' packet is received. Reply: `OK' for success `E NN' for an error `vFlashWrite:ADDR:XX...' Direct the stub to write data to flash address ADDR. The data is passed in binary form using the same encoding as for the `X' packet (*note Binary Data::). The memory ranges specified by `vFlashWrite' packets preceding a `vFlashDone' packet must not overlap, and must appear in order of increasing addresses (although `vFlashErase' packets for higher addresses may already have been received; the ordering is guaranteed only between `vFlashWrite' packets). If a packet writes to an address that was neither erased by a preceding `vFlashErase' packet nor by some other target-specific method, the results are unpredictable. Reply: `OK' for success `E.memtype' for vFlashWrite addressing non-flash memory `E NN' for an error `vFlashDone' Indicate to the stub that flash programming operation is finished. The stub is permitted to delay or batch the effects of a group of `vFlashErase' and `vFlashWrite' packets until a `vFlashDone' packet is received. The contents of the affected regions of flash memory are unpredictable until the `vFlashDone' request is completed. `vKill;PID' Kill the process with the specified process ID. PID is a hexadecimal integer identifying the process. This packet is used in preference to `k' when multiprocess protocol extensions are supported; see *note multiprocess extensions::. Reply: `E NN' for an error `OK' for success `vRun;FILENAME[;ARGUMENT]...' Run the program FILENAME, passing it each ARGUMENT on its command line. The file and arguments are hex-encoded strings. If FILENAME is an empty string, the stub may use a default program (e.g. the last program run). The program is created in the stopped state. This packet is only available in extended mode (*note extended mode::). Reply: `E NN' for an error `Any stop packet' for success (*note Stop Reply Packets::) `vStopped' *Note Notification Packets::. `X ADDR,LENGTH:XX...' Write data to memory, where the data is transmitted in binary. ADDR is address, LENGTH is number of bytes, `XX...' is binary data (*note Binary Data::). Reply: `OK' for success `E NN' for an error `z TYPE,ADDR,KIND' `Z TYPE,ADDR,KIND' Insert (`Z') or remove (`z') a TYPE breakpoint or watchpoint starting at address ADDRESS of kind KIND. Each breakpoint and watchpoint packet TYPE is documented separately. _Implementation notes: A remote target shall return an empty string for an unrecognized breakpoint or watchpoint packet TYPE. A remote target shall support either both or neither of a given `ZTYPE...' and `zTYPE...' packet pair. To avoid potential problems with duplicate packets, the operations should be implemented in an idempotent way._ `z0,ADDR,KIND' `Z0,ADDR,KIND[;COND_LIST...][;cmds:PERSIST,CMD_LIST...]' Insert (`Z0') or remove (`z0') a memory breakpoint at address ADDR of type KIND. A memory breakpoint is implemented by replacing the instruction at ADDR with a software breakpoint or trap instruction. The KIND is target-specific and typically indicates the size of the breakpoint in bytes that should be inserted. E.g., the ARM and MIPS can insert either a 2 or 4 byte breakpoint. Some architectures have additional meanings for KIND; COND_LIST is an optional list of conditional expressions in bytecode form that should be evaluated on the target's side. These are the conditions that should be taken into consideration when deciding if the breakpoint trigger should be reported back to GDBN. The COND_LIST parameter is comprised of a series of expressions, concatenated without separators. Each expression has the following form: `X LEN,EXPR' LEN is the length of the bytecode expression and EXPR is the actual conditional expression in bytecode form. The optional CMD_LIST parameter introduces commands that may be run on the target, rather than being reported back to GDB. The parameter starts with a numeric flag PERSIST; if the flag is nonzero, then the breakpoint may remain active and the commands continue to be run even when GDB disconnects from the target. Following this flag is a series of expressions concatenated with no separators. Each expression has the following form: `X LEN,EXPR' LEN is the length of the bytecode expression and EXPR is the actual conditional expression in bytecode form. see *note Architecture-Specific Protocol Details::. _Implementation note: It is possible for a target to copy or move code that contains memory breakpoints (e.g., when implementing overlays). The behavior of this packet, in the presence of such a target, is not defined._ Reply: `OK' success `' not supported `E NN' for an error `z1,ADDR,KIND' `Z1,ADDR,KIND[;COND_LIST...]' Insert (`Z1') or remove (`z1') a hardware breakpoint at address ADDR. A hardware breakpoint is implemented using a mechanism that is not dependant on being able to modify the target's memory. KIND and COND_LIST have the same meaning as in `Z0' packets. _Implementation note: A hardware breakpoint is not affected by code movement._ Reply: `OK' success `' not supported `E NN' for an error `z2,ADDR,KIND' `Z2,ADDR,KIND' Insert (`Z2') or remove (`z2') a write watchpoint at ADDR. KIND is interpreted as the number of bytes to watch. Reply: `OK' success `' not supported `E NN' for an error `z3,ADDR,KIND' `Z3,ADDR,KIND' Insert (`Z3') or remove (`z3') a read watchpoint at ADDR. KIND is interpreted as the number of bytes to watch. Reply: `OK' success `' not supported `E NN' for an error `z4,ADDR,KIND' `Z4,ADDR,KIND' Insert (`Z4') or remove (`z4') an access watchpoint at ADDR. KIND is interpreted as the number of bytes to watch. Reply: `OK' success `' not supported `E NN' for an error  File: gdb.info, Node: Stop Reply Packets, Next: General Query Packets, Prev: Packets, Up: Remote Protocol E.3 Stop Reply Packets ====================== The `C', `c', `S', `s', `vCont', `vAttach', `vRun', `vStopped', and `?' packets can receive any of the below as a reply. Except for `?' and `vStopped', that reply is only returned when the target halts. In the below the exact meaning of "signal number" is defined by the header `include/gdb/signals.h' in the GDB source code. As in the description of request packets, we include spaces in the reply templates for clarity; these are not part of the reply packet's syntax. No GDB stop reply packet uses spaces to separate its components. `S AA' The program received signal number AA (a two-digit hexadecimal number). This is equivalent to a `T' response with no N:R pairs. `T AA N1:R1;N2:R2;...' The program received signal number AA (a two-digit hexadecimal number). This is equivalent to an `S' response, except that the `N:R' pairs can carry values of important registers and other information directly in the stop reply packet, reducing round-trip latency. Single-step and breakpoint traps are reported this way. Each `N:R' pair is interpreted as follows: * If N is a hexadecimal number, it is a register number, and the corresponding R gives that register's value. R is a series of bytes in target byte order, with each byte given by a two-digit hex number. * If N is `thread', then R is the THREAD-ID of the stopped thread, as specified in *note thread-id syntax::. * If N is `core', then R is the hexadecimal number of the core on which the stop event was detected. * If N is a recognized "stop reason", it describes a more specific event that stopped the target. The currently defined stop reasons are listed below. AA should be `05', the trap signal. At most one stop reason should be present. * Otherwise, GDB should ignore this `N:R' pair and go on to the next; this allows us to extend the protocol in the future. The currently defined stop reasons are: `watch' `rwatch' `awatch' The packet indicates a watchpoint hit, and R is the data address, in hex. `library' The packet indicates that the loaded libraries have changed. GDB should use `qXfer:libraries:read' to fetch a new list of loaded libraries. R is ignored. `replaylog' The packet indicates that the target cannot continue replaying logged execution events, because it has reached the end (or the beginning when executing backward) of the log. The value of R will be either `begin' or `end'. *Note Reverse Execution::, for more information. `W AA' `W AA ; process:PID' The process exited, and AA is the exit status. This is only applicable to certain targets. The second form of the response, including the process ID of the exited process, can be used only when GDB has reported support for multiprocess protocol extensions; see *note multiprocess extensions::. The PID is formatted as a big-endian hex string. `X AA' `X AA ; process:PID' The process terminated with signal AA. The second form of the response, including the process ID of the terminated process, can be used only when GDB has reported support for multiprocess protocol extensions; see *note multiprocess extensions::. The PID is formatted as a big-endian hex string. `O XX...' `XX...' is hex encoding of ASCII data, to be written as the program's console output. This can happen at any time while the program is running and the debugger should continue to wait for `W', `T', etc. This reply is not permitted in non-stop mode. `F CALL-ID,PARAMETER...' CALL-ID is the identifier which says which host system call should be called. This is just the name of the function. Translation into the correct system call is only applicable as it's defined in GDB. *Note File-I/O Remote Protocol Extension::, for a list of implemented system calls. `PARAMETER...' is a list of parameters as defined for this very system call. The target replies with this packet when it expects GDB to call a host system call on behalf of the target. GDB replies with an appropriate `F' packet and keeps up waiting for the next reply packet from the target. The latest `C', `c', `S' or `s' action is expected to be continued. *Note File-I/O Remote Protocol Extension::, for more details.  File: gdb.info, Node: General Query Packets, Next: Architecture-Specific Protocol Details, Prev: Stop Reply Packets, Up: Remote Protocol E.4 General Query Packets ========================= Packets starting with `q' are "general query packets"; packets starting with `Q' are "general set packets". General query and set packets are a semi-unified form for retrieving and sending information to and from the stub. The initial letter of a query or set packet is followed by a name indicating what sort of thing the packet applies to. For example, GDB may use a `qSymbol' packet to exchange symbol definitions with the stub. These packet names follow some conventions: * The name must not contain commas, colons or semicolons. * Most GDB query and set packets have a leading upper case letter. * The names of custom vendor packets should use a company prefix, in lower case, followed by a period. For example, packets designed at the Acme Corporation might begin with `qacme.foo' (for querying foos) or `Qacme.bar' (for setting bars). The name of a query or set packet should be separated from any parameters by a `:'; the parameters themselves should be separated by `,' or `;'. Stubs must be careful to match the full packet name, and check for a separator or the end of the packet, in case two packet names share a common prefix. New packets should not begin with `qC', `qP', or `qL'(1). Like the descriptions of the other packets, each description here has a template showing the packet's overall syntax, followed by an explanation of the packet's meaning. We include spaces in some of the templates for clarity; these are not part of the packet's syntax. No GDB packet uses spaces to separate its components. Here are the currently defined query and set packets: `QAgent:1' `QAgent:0' Turn on or off the agent as a helper to perform some debugging operations delegated from GDB (*note Control Agent::). `QAllow:OP:VAL...' Specify which operations GDB expects to request of the target, as a semicolon-separated list of operation name and value pairs. Possible values for OP include `WriteReg', `WriteMem', `InsertBreak', `InsertTrace', `InsertFastTrace', and `Stop'. VAL is either 0, indicating that GDB will not request the operation, or 1, indicating that it may. (The target can then use this to set up its own internals optimally, for instance if the debugger never expects to insert breakpoints, it may not need to install its own trap handler.) `qC' Return the current thread ID. Reply: `QC THREAD-ID' Where THREAD-ID is a thread ID as documented in *note thread-id syntax::. `(anything else)' Any other reply implies the old thread ID. `qCRC:ADDR,LENGTH' Compute the CRC checksum of a block of memory using CRC-32 defined in IEEE 802.3. The CRC is computed byte at a time, taking the most significant bit of each byte first. The initial pattern code `0xffffffff' is used to ensure leading zeros affect the CRC. _Note:_ This is the same CRC used in validating separate debug files (*note Debugging Information in Separate Files: Separate Debug Files.). However the algorithm is slightly different. When validating separate debug files, the CRC is computed taking the _least_ significant bit of each byte first, and the final result is inverted to detect trailing zeros. Reply: `E NN' An error (such as memory fault) `C CRC32' The specified memory region's checksum is CRC32. `QDisableRandomization:VALUE' Some target operating systems will randomize the virtual address space of the inferior process as a security feature, but provide a feature to disable such randomization, e.g. to allow for a more deterministic debugging experience. On such systems, this packet with a VALUE of 1 directs the target to disable address space randomization for processes subsequently started via `vRun' packets, while a packet with a VALUE of 0 tells the target to enable address space randomization. This packet is only available in extended mode (*note extended mode::). Reply: `OK' The request succeeded. `E NN' An error occurred. NN are hex digits. `' An empty reply indicates that `QDisableRandomization' is not supported by the stub. This packet is not probed by default; the remote stub must request it, by supplying an appropriate `qSupported' response (*note qSupported::). This should only be done on targets that actually support disabling address space randomization. `qfThreadInfo' `qsThreadInfo' Obtain a list of all active thread IDs from the target (OS). Since there may be too many active threads to fit into one reply packet, this query works iteratively: it may require more than one query/reply sequence to obtain the entire list of threads. The first query of the sequence will be the `qfThreadInfo' query; subsequent queries in the sequence will be the `qsThreadInfo' query. NOTE: This packet replaces the `qL' query (see below). Reply: `m THREAD-ID' A single thread ID `m THREAD-ID,THREAD-ID...' a comma-separated list of thread IDs `l' (lower case letter `L') denotes end of list. In response to each query, the target will reply with a list of one or more thread IDs, separated by commas. GDB will respond to each reply with a request for more thread ids (using the `qs' form of the query), until the target responds with `l' (lower-case ell, for "last"). Refer to *note thread-id syntax::, for the format of the THREAD-ID fields. `qGetTLSAddr:THREAD-ID,OFFSET,LM' Fetch the address associated with thread local storage specified by THREAD-ID, OFFSET, and LM. THREAD-ID is the thread ID associated with the thread for which to fetch the TLS address. *Note thread-id syntax::. OFFSET is the (big endian, hex encoded) offset associated with the thread local variable. (This offset is obtained from the debug information associated with the variable.) LM is the (big endian, hex encoded) OS/ABI-specific encoding of the load module associated with the thread local storage. For example, a GNU/Linux system will pass the link map address of the shared object associated with the thread local storage under consideration. Other operating environments may choose to represent the load module differently, so the precise meaning of this parameter will vary. Reply: `XX...' Hex encoded (big endian) bytes representing the address of the thread local storage requested. `E NN' An error occurred. NN are hex digits. `' An empty reply indicates that `qGetTLSAddr' is not supported by the stub. `qGetTIBAddr:THREAD-ID' Fetch address of the Windows OS specific Thread Information Block. THREAD-ID is the thread ID associated with the thread. Reply: `XX...' Hex encoded (big endian) bytes representing the linear address of the thread information block. `E NN' An error occured. This means that either the thread was not found, or the address could not be retrieved. `' An empty reply indicates that `qGetTIBAddr' is not supported by the stub. `qL STARTFLAG THREADCOUNT NEXTTHREAD' Obtain thread information from RTOS. Where: STARTFLAG (one hex digit) is one to indicate the first query and zero to indicate a subsequent query; THREADCOUNT (two hex digits) is the maximum number of threads the response packet can contain; and NEXTTHREAD (eight hex digits), for subsequent queries (STARTFLAG is zero), is returned in the response as ARGTHREAD. Don't use this packet; use the `qfThreadInfo' query instead (see above). Reply: `qM COUNT DONE ARGTHREAD THREAD...' Where: COUNT (two hex digits) is the number of threads being returned; DONE (one hex digit) is zero to indicate more threads and one indicates no further threads; ARGTHREADID (eight hex digits) is NEXTTHREAD from the request packet; THREAD... is a sequence of thread IDs from the target. THREADID (eight hex digits). See `remote.c:parse_threadlist_response()'. `qOffsets' Get section offsets that the target used when relocating the downloaded image. Reply: `Text=XXX;Data=YYY[;Bss=ZZZ]' Relocate the `Text' section by XXX from its original address. Relocate the `Data' section by YYY from its original address. If the object file format provides segment information (e.g. ELF `PT_LOAD' program headers), GDB will relocate entire segments by the supplied offsets. _Note: while a `Bss' offset may be included in the response, GDB ignores this and instead applies the `Data' offset to the `Bss' section._ `TextSeg=XXX[;DataSeg=YYY]' Relocate the first segment of the object file, which conventionally contains program code, to a starting address of XXX. If `DataSeg' is specified, relocate the second segment, which conventionally contains modifiable data, to a starting address of YYY. GDB will report an error if the object file does not contain segment information, or does not contain at least as many segments as mentioned in the reply. Extra segments are kept at fixed offsets relative to the last relocated segment. `qP MODE THREAD-ID' Returns information on THREAD-ID. Where: MODE is a hex encoded 32 bit mode; THREAD-ID is a thread ID (*note thread-id syntax::). Don't use this packet; use the `qThreadExtraInfo' query instead (see below). Reply: see `remote.c:remote_unpack_thread_info_response()'. `QNonStop:1' `QNonStop:0' Enter non-stop (`QNonStop:1') or all-stop (`QNonStop:0') mode. *Note Remote Non-Stop::, for more information. Reply: `OK' The request succeeded. `E NN' An error occurred. NN are hex digits. `' An empty reply indicates that `QNonStop' is not supported by the stub. This packet is not probed by default; the remote stub must request it, by supplying an appropriate `qSupported' response (*note qSupported::). Use of this packet is controlled by the `set non-stop' command; *note Non-Stop Mode::. `QPassSignals: SIGNAL [;SIGNAL]...' Each listed SIGNAL should be passed directly to the inferior process. Signals are numbered identically to continue packets and stop replies (*note Stop Reply Packets::). Each SIGNAL list item should be strictly greater than the previous item. These signals do not need to stop the inferior, or be reported to GDB. All other signals should be reported to GDB. Multiple `QPassSignals' packets do not combine; any earlier `QPassSignals' list is completely replaced by the new list. This packet improves performance when using `handle SIGNAL nostop noprint pass'. Reply: `OK' The request succeeded. `E NN' An error occurred. NN are hex digits. `' An empty reply indicates that `QPassSignals' is not supported by the stub. Use of this packet is controlled by the `set remote pass-signals' command (*note set remote pass-signals: Remote Configuration.). This packet is not probed by default; the remote stub must request it, by supplying an appropriate `qSupported' response (*note qSupported::). `QProgramSignals: SIGNAL [;SIGNAL]...' Each listed SIGNAL may be delivered to the inferior process. Others should be silently discarded. In some cases, the remote stub may need to decide whether to deliver a signal to the program or not without GDB involvement. One example of that is while detaching -- the program's threads may have stopped for signals that haven't yet had a chance of being reported to GDB, and so the remote stub can use the signal list specified by this packet to know whether to deliver or ignore those pending signals. This does not influence whether to deliver a signal as requested by a resumption packet (*note vCont packet::). Signals are numbered identically to continue packets and stop replies (*note Stop Reply Packets::). Each SIGNAL list item should be strictly greater than the previous item. Multiple `QProgramSignals' packets do not combine; any earlier `QProgramSignals' list is completely replaced by the new list. Reply: `OK' The request succeeded. `E NN' An error occurred. NN are hex digits. `' An empty reply indicates that `QProgramSignals' is not supported by the stub. Use of this packet is controlled by the `set remote program-signals' command (*note set remote program-signals: Remote Configuration.). This packet is not probed by default; the remote stub must request it, by supplying an appropriate `qSupported' response (*note qSupported::). `qRcmd,COMMAND' COMMAND (hex encoded) is passed to the local interpreter for execution. Invalid commands should be reported using the output string. Before the final result packet, the target may also respond with a number of intermediate `OOUTPUT' console output packets. _Implementors should note that providing access to a stubs's interpreter may have security implications_. Reply: `OK' A command response with no output. `OUTPUT' A command response with the hex encoded output string OUTPUT. `E NN' Indicate a badly formed request. `' An empty reply indicates that `qRcmd' is not recognized. (Note that the `qRcmd' packet's name is separated from the command by a `,', not a `:', contrary to the naming conventions above. Please don't use this packet as a model for new packets.) `qSearch:memory:ADDRESS;LENGTH;SEARCH-PATTERN' Search LENGTH bytes at ADDRESS for SEARCH-PATTERN. ADDRESS and LENGTH are encoded in hex. SEARCH-PATTERN is a sequence of bytes, hex encoded. Reply: `0' The pattern was not found. `1,address' The pattern was found at ADDRESS. `E NN' A badly formed request or an error was encountered while searching memory. `' An empty reply indicates that `qSearch:memory' is not recognized. `QStartNoAckMode' Request that the remote stub disable the normal `+'/`-' protocol acknowledgments (*note Packet Acknowledgment::). Reply: `OK' The stub has switched to no-acknowledgment mode. GDB acknowledges this reponse, but neither the stub nor GDB shall send or expect further `+'/`-' acknowledgments in the current connection. `' An empty reply indicates that the stub does not support no-acknowledgment mode. `qSupported [:GDBFEATURE [;GDBFEATURE]... ]' Tell the remote stub about features supported by GDB, and query the stub for features it supports. This packet allows GDB and the remote stub to take advantage of each others' features. `qSupported' also consolidates multiple feature probes at startup, to improve GDB performance--a single larger packet performs better than multiple smaller probe packets on high-latency links. Some features may enable behavior which must not be on by default, e.g. because it would confuse older clients or stubs. Other features may describe packets which could be automatically probed for, but are not. These features must be reported before GDB will use them. This "default unsupported" behavior is not appropriate for all packets, but it helps to keep the initial connection time under control with new versions of GDB which support increasing numbers of packets. Reply: `STUBFEATURE [;STUBFEATURE]...' The stub supports or does not support each returned STUBFEATURE, depending on the form of each STUBFEATURE (see below for the possible forms). `' An empty reply indicates that `qSupported' is not recognized, or that no features needed to be reported to GDB. The allowed forms for each feature (either a GDBFEATURE in the `qSupported' packet, or a STUBFEATURE in the response) are: `NAME=VALUE' The remote protocol feature NAME is supported, and associated with the specified VALUE. The format of VALUE depends on the feature, but it must not include a semicolon. `NAME+' The remote protocol feature NAME is supported, and does not need an associated value. `NAME-' The remote protocol feature NAME is not supported. `NAME?' The remote protocol feature NAME may be supported, and GDB should auto-detect support in some other way when it is needed. This form will not be used for GDBFEATURE notifications, but may be used for STUBFEATURE responses. Whenever the stub receives a `qSupported' request, the supplied set of GDB features should override any previous request. This allows GDB to put the stub in a known state, even if the stub had previously been communicating with a different version of GDB. The following values of GDBFEATURE (for the packet sent by GDB) are defined: `multiprocess' This feature indicates whether GDB supports multiprocess extensions to the remote protocol. GDB does not use such extensions unless the stub also reports that it supports them by including `multiprocess+' in its `qSupported' reply. *Note multiprocess extensions::, for details. `xmlRegisters' This feature indicates that GDB supports the XML target description. If the stub sees `xmlRegisters=' with target specific strings separated by a comma, it will report register description. `qRelocInsn' This feature indicates whether GDB supports the `qRelocInsn' packet (*note Relocate instruction reply packet: Tracepoint Packets.). Stubs should ignore any unknown values for GDBFEATURE. Any GDB which sends a `qSupported' packet supports receiving packets of unlimited length (earlier versions of GDB may reject overly long responses). Additional values for GDBFEATURE may be defined in the future to let the stub take advantage of new features in GDB, e.g. incompatible improvements in the remote protocol--the `multiprocess' feature is an example of such a feature. The stub's reply should be independent of the GDBFEATURE entries sent by GDB; first GDB describes all the features it supports, and then the stub replies with all the features it supports. Similarly, GDB will silently ignore unrecognized stub feature responses, as long as each response uses one of the standard forms. Some features are flags. A stub which supports a flag feature should respond with a `+' form response. Other features require values, and the stub should respond with an `=' form response. Each feature has a default value, which GDB will use if `qSupported' is not available or if the feature is not mentioned in the `qSupported' response. The default values are fixed; a stub is free to omit any feature responses that match the defaults. Not all features can be probed, but for those which can, the probing mechanism is useful: in some cases, a stub's internal architecture may not allow the protocol layer to know some information about the underlying target in advance. This is especially common in stubs which may be configured for multiple targets. These are the currently defined stub features and their properties: Feature Name Value Default Probe Allowed Required `PacketSize' Yes `-' No `qXfer:auxv:read' No `-' Yes `qXfer:btrace:read' No `-' Yes `qXfer:features:read' No `-' Yes `qXfer:libraries:read' No `-' Yes `qXfer:memory-map:read' No `-' Yes `qXfer:sdata:read' No `-' Yes `qXfer:spu:read' No `-' Yes `qXfer:spu:write' No `-' Yes `qXfer:siginfo:read' No `-' Yes `qXfer:siginfo:write' No `-' Yes `qXfer:threads:read' No `-' Yes `qXfer:traceframe-info:read'No `-' Yes `qXfer:uib:read' No `-' Yes `qXfer:fdpic:read' No `-' Yes `Qbtrace:off' Yes `-' Yes `Qbtrace:bts' Yes `-' Yes `QNonStop' No `-' Yes `QPassSignals' No `-' Yes `QStartNoAckMode' No `-' Yes `multiprocess' No `-' No `ConditionalBreakpoints'No `-' No `ConditionalTracepoints'No `-' No `ReverseContinue' No `-' No `ReverseStep' No `-' No `TracepointSource' No `-' No `QAgent' No `-' No `QAllow' No `-' No `QDisableRandomization' No `-' No `EnableDisableTracepoints'No `-' No `QTBuffer:size' No `-' No `tracenz' No `-' No `BreakpointCommands' No `-' No These are the currently defined stub features, in more detail: `PacketSize=BYTES' The remote stub can accept packets up to at least BYTES in length. GDB will send packets up to this size for bulk transfers, and will never send larger packets. This is a limit on the data characters in the packet, including the frame and checksum. There is no trailing NUL byte in a remote protocol packet; if the stub stores packets in a NUL-terminated format, it should allow an extra byte in its buffer for the NUL. If this stub feature is not supported, GDB guesses based on the size of the `g' packet response. `qXfer:auxv:read' The remote stub understands the `qXfer:auxv:read' packet (*note qXfer auxiliary vector read::). `qXfer:btrace:read' The remote stub understands the `qXfer:btrace:read' packet (*note qXfer btrace read::). `qXfer:features:read' The remote stub understands the `qXfer:features:read' packet (*note qXfer target description read::). `qXfer:libraries:read' The remote stub understands the `qXfer:libraries:read' packet (*note qXfer library list read::). `qXfer:libraries-svr4:read' The remote stub understands the `qXfer:libraries-svr4:read' packet (*note qXfer svr4 library list read::). `qXfer:memory-map:read' The remote stub understands the `qXfer:memory-map:read' packet (*note qXfer memory map read::). `qXfer:sdata:read' The remote stub understands the `qXfer:sdata:read' packet (*note qXfer sdata read::). `qXfer:spu:read' The remote stub understands the `qXfer:spu:read' packet (*note qXfer spu read::). `qXfer:spu:write' The remote stub understands the `qXfer:spu:write' packet (*note qXfer spu write::). `qXfer:siginfo:read' The remote stub understands the `qXfer:siginfo:read' packet (*note qXfer siginfo read::). `qXfer:siginfo:write' The remote stub understands the `qXfer:siginfo:write' packet (*note qXfer siginfo write::). `qXfer:threads:read' The remote stub understands the `qXfer:threads:read' packet (*note qXfer threads read::). `qXfer:traceframe-info:read' The remote stub understands the `qXfer:traceframe-info:read' packet (*note qXfer traceframe info read::). `qXfer:uib:read' The remote stub understands the `qXfer:uib:read' packet (*note qXfer unwind info block::). `qXfer:fdpic:read' The remote stub understands the `qXfer:fdpic:read' packet (*note qXfer fdpic loadmap read::). `QNonStop' The remote stub understands the `QNonStop' packet (*note QNonStop::). `QPassSignals' The remote stub understands the `QPassSignals' packet (*note QPassSignals::). `QStartNoAckMode' The remote stub understands the `QStartNoAckMode' packet and prefers to operate in no-acknowledgment mode. *Note Packet Acknowledgment::. `multiprocess' The remote stub understands the multiprocess extensions to the remote protocol syntax. The multiprocess extensions affect the syntax of thread IDs in both packets and replies (*note thread-id syntax::), and add process IDs to the `D' packet and `W' and `X' replies. Note that reporting this feature indicates support for the syntactic extensions only, not that the stub necessarily supports debugging of more than one process at a time. The stub must not use multiprocess extensions in packet replies unless GDB has also indicated it supports them in its `qSupported' request. `qXfer:osdata:read' The remote stub understands the `qXfer:osdata:read' packet ((*note qXfer osdata read::). `ConditionalBreakpoints' The target accepts and implements evaluation of conditional expressions defined for breakpoints. The target will only report breakpoint triggers when such conditions are true (*note Break Conditions: Conditions.). `ConditionalTracepoints' The remote stub accepts and implements conditional expressions defined for tracepoints (*note Tracepoint Conditions::). `ReverseContinue' The remote stub accepts and implements the reverse continue packet (*note bc::). `ReverseStep' The remote stub accepts and implements the reverse step packet (*note bs::). `TracepointSource' The remote stub understands the `QTDPsrc' packet that supplies the source form of tracepoint definitions. `QAgent' The remote stub understands the `QAgent' packet. `QAllow' The remote stub understands the `QAllow' packet. `QDisableRandomization' The remote stub understands the `QDisableRandomization' packet. `StaticTracepoint' The remote stub supports static tracepoints. `InstallInTrace' The remote stub supports installing tracepoint in tracing. `EnableDisableTracepoints' The remote stub supports the `QTEnable' (*note QTEnable::) and `QTDisable' (*note QTDisable::) packets that allow tracepoints to be enabled and disabled while a trace experiment is running. `QTBuffer:size' The remote stub supports the `QTBuffer:size' (*note QTBuffer-size::) packet that allows to change the size of the trace buffer. `tracenz' The remote stub supports the `tracenz' bytecode for collecting strings. See *note Bytecode Descriptions:: for details about the bytecode. `BreakpointCommands' The remote stub supports running a breakpoint's command list itself, rather than reporting the hit to GDB. `Qbtrace:off' The remote stub understands the `Qbtrace:off' packet. `Qbtrace:bts' The remote stub understands the `Qbtrace:bts' packet. `qSymbol::' Notify the target that GDB is prepared to serve symbol lookup requests. Accept requests from the target for the values of symbols. Reply: `OK' The target does not need to look up any (more) symbols. `qSymbol:SYM_NAME' The target requests the value of symbol SYM_NAME (hex encoded). GDB may provide the value by using the `qSymbol:SYM_VALUE:SYM_NAME' message, described below. `qSymbol:SYM_VALUE:SYM_NAME' Set the value of SYM_NAME to SYM_VALUE. SYM_NAME (hex encoded) is the name of a symbol whose value the target has previously requested. SYM_VALUE (hex) is the value for symbol SYM_NAME. If GDB cannot supply a value for SYM_NAME, then this field will be empty. Reply: `OK' The target does not need to look up any (more) symbols. `qSymbol:SYM_NAME' The target requests the value of a new symbol SYM_NAME (hex encoded). GDB will continue to supply the values of symbols (if available), until the target ceases to request them. `qTBuffer' `QTBuffer' `QTDisconnected' `QTDP' `QTDPsrc' `QTDV' `qTfP' `qTfV' `QTFrame' `qTMinFTPILen' *Note Tracepoint Packets::. `qThreadExtraInfo,THREAD-ID' Obtain a printable string description of a thread's attributes from the target OS. THREAD-ID is a thread ID; see *note thread-id syntax::. This string may contain anything that the target OS thinks is interesting for GDB to tell the user about the thread. The string is displayed in GDB's `info threads' display. Some examples of possible thread extra info strings are `Runnable', or `Blocked on Mutex'. Reply: `XX...' Where `XX...' is a hex encoding of ASCII data, comprising the printable string containing the extra information about the thread's attributes. (Note that the `qThreadExtraInfo' packet's name is separated from the command by a `,', not a `:', contrary to the naming conventions above. Please don't use this packet as a model for new packets.) `QTNotes' `qTP' `QTSave' `qTsP' `qTsV' `QTStart' `QTStop' `QTEnable' `QTDisable' `QTinit' `QTro' `qTStatus' `qTV' `qTfSTM' `qTsSTM' `qTSTMat' *Note Tracepoint Packets::. `qXfer:OBJECT:read:ANNEX:OFFSET,LENGTH' Read uninterpreted bytes from the target's special data area identified by the keyword OBJECT. Request LENGTH bytes starting at OFFSET bytes into the data. The content and encoding of ANNEX is specific to OBJECT; it can supply additional details about what data to access. Here are the specific requests of this form defined so far. All `qXfer:OBJECT:read:...' requests use the same reply formats, listed below. `qXfer:auxv:read::OFFSET,LENGTH' Access the target's "auxiliary vector". *Note auxiliary vector: OS Information. Note ANNEX must be empty. This packet is not probed by default; the remote stub must request it, by supplying an appropriate `qSupported' response (*note qSupported::). `qXfer:btrace:read:ANNEX:OFFSET,LENGTH' Return a description of the current branch trace. *Note Branch Trace Format::. The annex part of the generic `qXfer' packet may have one of the following values: `all' Returns all available branch trace. `new' Returns all available branch trace if the branch trace changed since the last read request. This packet is not probed by default; the remote stub must request it by supplying an appropriate `qSupported' response (*note qSupported::). `qXfer:features:read:ANNEX:OFFSET,LENGTH' Access the "target description". *Note Target Descriptions::. The annex specifies which XML document to access. The main description is always loaded from the `target.xml' annex. This packet is not probed by default; the remote stub must request it, by supplying an appropriate `qSupported' response (*note qSupported::). `qXfer:libraries:read:ANNEX:OFFSET,LENGTH' Access the target's list of loaded libraries. *Note Library List Format::. The annex part of the generic `qXfer' packet must be empty (*note qXfer read::). Targets which maintain a list of libraries in the program's memory do not need to implement this packet; it is designed for platforms where the operating system manages the list of loaded libraries. This packet is not probed by default; the remote stub must request it, by supplying an appropriate `qSupported' response (*note qSupported::). `qXfer:libraries-svr4:read:ANNEX:OFFSET,LENGTH' Access the target's list of loaded libraries when the target is an SVR4 platform. *Note Library List Format for SVR4 Targets::. The annex part of the generic `qXfer' packet must be empty (*note qXfer read::). This packet is optional for better performance on SVR4 targets. GDB uses memory read packets to read the SVR4 library list otherwise. This packet is not probed by default; the remote stub must request it, by supplying an appropriate `qSupported' response (*note qSupported::). `qXfer:memory-map:read::OFFSET,LENGTH' Access the target's "memory-map". *Note Memory Map Format::. The annex part of the generic `qXfer' packet must be empty (*note qXfer read::). This packet is not probed by default; the remote stub must request it, by supplying an appropriate `qSupported' response (*note qSupported::). `qXfer:sdata:read::OFFSET,LENGTH' Read contents of the extra collected static tracepoint marker information. The annex part of the generic `qXfer' packet must be empty (*note qXfer read::). *Note Tracepoint Action Lists: Tracepoint Actions. This packet is not probed by default; the remote stub must request it, by supplying an appropriate `qSupported' response (*note qSupported::). `qXfer:siginfo:read::OFFSET,LENGTH' Read contents of the extra signal information on the target system. The annex part of the generic `qXfer' packet must be empty (*note qXfer read::). This packet is not probed by default; the remote stub must request it, by supplying an appropriate `qSupported' response (*note qSupported::). `qXfer:spu:read:ANNEX:OFFSET,LENGTH' Read contents of an `spufs' file on the target system. The annex specifies which file to read; it must be of the form `ID/NAME', where ID specifies an SPU context ID in the target process, and NAME identifes the `spufs' file in that context to be accessed. This packet is not probed by default; the remote stub must request it, by supplying an appropriate `qSupported' response (*note qSupported::). `qXfer:threads:read::OFFSET,LENGTH' Access the list of threads on target. *Note Thread List Format::. The annex part of the generic `qXfer' packet must be empty (*note qXfer read::). This packet is not probed by default; the remote stub must request it, by supplying an appropriate `qSupported' response (*note qSupported::). `qXfer:traceframe-info:read::OFFSET,LENGTH' Return a description of the current traceframe's contents. *Note Traceframe Info Format::. The annex part of the generic `qXfer' packet must be empty (*note qXfer read::). This packet is not probed by default; the remote stub must request it, by supplying an appropriate `qSupported' response (*note qSupported::). `qXfer:uib:read:PC:OFFSET,LENGTH' Return the unwind information block for PC. This packet is used on OpenVMS/ia64 to ask the kernel unwind information. This packet is not probed by default. `qXfer:fdpic:read:ANNEX:OFFSET,LENGTH' Read contents of `loadmap's on the target system. The annex, either `exec' or `interp', specifies which `loadmap', executable `loadmap' or interpreter `loadmap' to read. This packet is not probed by default; the remote stub must request it, by supplying an appropriate `qSupported' response (*note qSupported::). `qXfer:osdata:read::OFFSET,LENGTH' Access the target's "operating system information". *Note Operating System Information::. Reply: `m DATA' Data DATA (*note Binary Data::) has been read from the target. There may be more data at a higher address (although it is permitted to return `m' even for the last valid block of data, as long as at least one byte of data was read). DATA may have fewer bytes than the LENGTH in the request. `l DATA' Data DATA (*note Binary Data::) has been read from the target. There is no more data to be read. DATA may have fewer bytes than the LENGTH in the request. `l' The OFFSET in the request is at the end of the data. There is no more data to be read. `E00' The request was malformed, or ANNEX was invalid. `E NN' The offset was invalid, or there was an error encountered reading the data. NN is a hex-encoded `errno' value. `' An empty reply indicates the OBJECT string was not recognized by the stub, or that the object does not support reading. `qXfer:OBJECT:write:ANNEX:OFFSET:DATA...' Write uninterpreted bytes into the target's special data area identified by the keyword OBJECT, starting at OFFSET bytes into the data. DATA... is the binary-encoded data (*note Binary Data::) to be written. The content and encoding of ANNEX is specific to OBJECT; it can supply additional details about what data to access. Here are the specific requests of this form defined so far. All `qXfer:OBJECT:write:...' requests use the same reply formats, listed below. `qXfer:siginfo:write::OFFSET:DATA...' Write DATA to the extra signal information on the target system. The annex part of the generic `qXfer' packet must be empty (*note qXfer write::). This packet is not probed by default; the remote stub must request it, by supplying an appropriate `qSupported' response (*note qSupported::). `qXfer:spu:write:ANNEX:OFFSET:DATA...' Write DATA to an `spufs' file on the target system. The annex specifies which file to write; it must be of the form `ID/NAME', where ID specifies an SPU context ID in the target process, and NAME identifes the `spufs' file in that context to be accessed. This packet is not probed by default; the remote stub must request it, by supplying an appropriate `qSupported' response (*note qSupported::). Reply: `NN' NN (hex encoded) is the number of bytes written. This may be fewer bytes than supplied in the request. `E00' The request was malformed, or ANNEX was invalid. `E NN' The offset was invalid, or there was an error encountered writing the data. NN is a hex-encoded `errno' value. `' An empty reply indicates the OBJECT string was not recognized by the stub, or that the object does not support writing. `qXfer:OBJECT:OPERATION:...' Requests of this form may be added in the future. When a stub does not recognize the OBJECT keyword, or its support for OBJECT does not recognize the OPERATION keyword, the stub must respond with an empty packet. `qAttached:PID' Return an indication of whether the remote server attached to an existing process or created a new process. When the multiprocess protocol extensions are supported (*note multiprocess extensions::), PID is an integer in hexadecimal format identifying the target process. Otherwise, GDB will omit the PID field and the query packet will be simplified as `qAttached'. This query is used, for example, to know whether the remote process should be detached or killed when a GDB session is ended with the `quit' command. Reply: `1' The remote server attached to an existing process. `0' The remote server created a new process. `E NN' A badly formed request or an error was encountered. `Qbtrace:bts' Enable branch tracing for the current thread using bts tracing. Reply: `OK' Branch tracing has been enabled. `E.errtext' A badly formed request or an error was encountered. `Qbtrace:off' Disable branch tracing for the current thread. Reply: `OK' Branch tracing has been disabled. `E.errtext' A badly formed request or an error was encountered. ---------- Footnotes ---------- (1) The `qP' and `qL' packets predate these conventions, and have arguments without any terminator for the packet name; we suspect they are in widespread use in places that are difficult to upgrade. The `qC' packet has no arguments, but some existing stubs (e.g. RedBoot) are known to not check for the end of the packet.  File: gdb.info, Node: Architecture-Specific Protocol Details, Next: Tracepoint Packets, Prev: General Query Packets, Up: Remote Protocol E.5 Architecture-Specific Protocol Details ========================================== This section describes how the remote protocol is applied to specific target architectures. Also see *note Standard Target Features::, for details of XML target descriptions for each architecture. * Menu: * ARM-Specific Protocol Details:: * MIPS-Specific Protocol Details::  File: gdb.info, Node: ARM-Specific Protocol Details, Next: MIPS-Specific Protocol Details, Up: Architecture-Specific Protocol Details E.5.1 ARM-specific Protocol Details ----------------------------------- * Menu: * ARM Breakpoint Kinds::  File: gdb.info, Node: ARM Breakpoint Kinds, Up: ARM-Specific Protocol Details E.5.1.1 ARM Breakpoint Kinds ............................ These breakpoint kinds are defined for the `Z0' and `Z1' packets. 2 16-bit Thumb mode breakpoint. 3 32-bit Thumb mode (Thumb-2) breakpoint. 4 32-bit ARM mode breakpoint.  File: gdb.info, Node: MIPS-Specific Protocol Details, Prev: ARM-Specific Protocol Details, Up: Architecture-Specific Protocol Details E.5.2 MIPS-specific Protocol Details ------------------------------------ * Menu: * MIPS Register packet Format:: * MIPS Breakpoint Kinds::  File: gdb.info, Node: MIPS Register packet Format, Next: MIPS Breakpoint Kinds, Up: MIPS-Specific Protocol Details E.5.2.1 MIPS Register Packet Format ................................... The following `g'/`G' packets have previously been defined. In the below, some thirty-two bit registers are transferred as sixty-four bits. Those registers should be zero/sign extended (which?) to fill the space allocated. Register bytes are transferred in target byte order. The two nibbles within a register byte are transferred most-significant - least-significant. MIPS32 All registers are transferred as thirty-two bit quantities in the order: 32 general-purpose; sr; lo; hi; bad; cause; pc; 32 floating-point registers; fsr; fir; fp. MIPS64 All registers are transferred as sixty-four bit quantities (including thirty-two bit registers such as `sr'). The ordering is the same as `MIPS32'.  File: gdb.info, Node: MIPS Breakpoint Kinds, Prev: MIPS Register packet Format, Up: MIPS-Specific Protocol Details E.5.2.2 MIPS Breakpoint Kinds ............................. These breakpoint kinds are defined for the `Z0' and `Z1' packets. 2 16-bit MIPS16 mode breakpoint. 3 16-bit microMIPS mode breakpoint. 4 32-bit standard MIPS mode breakpoint. 5 32-bit microMIPS mode breakpoint.  File: gdb.info, Node: Tracepoint Packets, Next: Host I/O Packets, Prev: Architecture-Specific Protocol Details, Up: Remote Protocol E.6 Tracepoint Packets ====================== Here we describe the packets GDB uses to implement tracepoints (*note Tracepoints::). `QTDP:N:ADDR:ENA:STEP:PASS[:FFLEN][:XLEN,BYTES][-]' Create a new tracepoint, number N, at ADDR. If ENA is `E', then the tracepoint is enabled; if it is `D', then the tracepoint is disabled. STEP is the tracepoint's step count, and PASS is its pass count. If an `F' is present, then the tracepoint is to be a fast tracepoint, and the FLEN is the number of bytes that the target should copy elsewhere to make room for the tracepoint. If an `X' is present, it introduces a tracepoint condition, which consists of a hexadecimal length, followed by a comma and hex-encoded bytes, in a manner similar to action encodings as described below. If the trailing `-' is present, further `QTDP' packets will follow to specify this tracepoint's actions. Replies: `OK' The packet was understood and carried out. `qRelocInsn' *Note Relocate instruction reply packet: Tracepoint Packets. `' The packet was not recognized. `QTDP:-N:ADDR:[S]ACTION...[-]' Define actions to be taken when a tracepoint is hit. N and ADDR must be the same as in the initial `QTDP' packet for this tracepoint. This packet may only be sent immediately after another `QTDP' packet that ended with a `-'. If the trailing `-' is present, further `QTDP' packets will follow, specifying more actions for this tracepoint. In the series of action packets for a given tracepoint, at most one can have an `S' before its first ACTION. If such a packet is sent, it and the following packets define "while-stepping" actions. Any prior packets define ordinary actions -- that is, those taken when the tracepoint is first hit. If no action packet has an `S', then all the packets in the series specify ordinary tracepoint actions. The `ACTION...' portion of the packet is a series of actions, concatenated without separators. Each action has one of the following forms: `R MASK' Collect the registers whose bits are set in MASK. MASK is a hexadecimal number whose I'th bit is set if register number I should be collected. (The least significant bit is numbered zero.) Note that MASK may be any number of digits long; it may not fit in a 32-bit word. `M BASEREG,OFFSET,LEN' Collect LEN bytes of memory starting at the address in register number BASEREG, plus OFFSET. If BASEREG is `-1', then the range has a fixed address: OFFSET is the address of the lowest byte to collect. The BASEREG, OFFSET, and LEN parameters are all unsigned hexadecimal values (the `-1' value for BASEREG is a special case). `X LEN,EXPR' Evaluate EXPR, whose length is LEN, and collect memory as it directs. EXPR is an agent expression, as described in *note Agent Expressions::. Each byte of the expression is encoded as a two-digit hex number in the packet; LEN is the number of bytes in the expression (and thus one-half the number of hex digits in the packet). Any number of actions may be packed together in a single `QTDP' packet, as long as the packet does not exceed the maximum packet length (400 bytes, for many stubs). There may be only one `R' action per tracepoint, and it must precede any `M' or `X' actions. Any registers referred to by `M' and `X' actions must be collected by a preceding `R' action. (The "while-stepping" actions are treated as if they were attached to a separate tracepoint, as far as these restrictions are concerned.) Replies: `OK' The packet was understood and carried out. `qRelocInsn' *Note Relocate instruction reply packet: Tracepoint Packets. `' The packet was not recognized. `QTDPsrc:N:ADDR:TYPE:START:SLEN:BYTES' Specify a source string of tracepoint N at address ADDR. This is useful to get accurate reproduction of the tracepoints originally downloaded at the beginning of the trace run. TYPE is the name of the tracepoint part, such as `cond' for the tracepoint's conditional expression (see below for a list of types), while BYTES is the string, encoded in hexadecimal. START is the offset of the BYTES within the overall source string, while SLEN is the total length of the source string. This is intended for handling source strings that are longer than will fit in a single packet. The available string types are `at' for the location, `cond' for the conditional, and `cmd' for an action command. GDB sends a separate packet for each command in the action list, in the same order in which the commands are stored in the list. The target does not need to do anything with source strings except report them back as part of the replies to the `qTfP'/`qTsP' query packets. Although this packet is optional, and GDB will only send it if the target replies with `TracepointSource' *Note General Query Packets::, it makes both disconnected tracing and trace files much easier to use. Otherwise the user must be careful that the tracepoints in effect while looking at trace frames are identical to the ones in effect during the trace run; even a small discrepancy could cause `tdump' not to work, or a particular trace frame not be found. `QTDV:N:VALUE' Create a new trace state variable, number N, with an initial value of VALUE, which is a 64-bit signed integer. Both N and VALUE are encoded as hexadecimal values. GDB has the option of not using this packet for initial values of zero; the target should simply create the trace state variables as they are mentioned in expressions. `QTFrame:N' Select the N'th tracepoint frame from the buffer, and use the register and memory contents recorded there to answer subsequent request packets from GDB. A successful reply from the stub indicates that the stub has found the requested frame. The response is a series of parts, concatenated without separators, describing the frame we selected. Each part has one of the following forms: `F F' The selected frame is number N in the trace frame buffer; F is a hexadecimal number. If F is `-1', then there was no frame matching the criteria in the request packet. `T T' The selected trace frame records a hit of tracepoint number T; T is a hexadecimal number. `QTFrame:pc:ADDR' Like `QTFrame:N', but select the first tracepoint frame after the currently selected frame whose PC is ADDR; ADDR is a hexadecimal number. `QTFrame:tdp:T' Like `QTFrame:N', but select the first tracepoint frame after the currently selected frame that is a hit of tracepoint T; T is a hexadecimal number. `QTFrame:range:START:END' Like `QTFrame:N', but select the first tracepoint frame after the currently selected frame whose PC is between START (inclusive) and END (inclusive); START and END are hexadecimal numbers. `QTFrame:outside:START:END' Like `QTFrame:range:START:END', but select the first frame _outside_ the given range of addresses (exclusive). `qTMinFTPILen' This packet requests the minimum length of instruction at which a fast tracepoint (*note Set Tracepoints::) may be placed. For instance, on the 32-bit x86 architecture, it is possible to use a 4-byte jump, but it depends on the target system being able to create trampolines in the first 64K of memory, which might or might not be possible for that system. So the reply to this packet will be 4 if it is able to arrange for that. Replies: `0' The minimum instruction length is currently unknown. `LENGTH' The minimum instruction length is LENGTH, where LENGTH is greater or equal to 1. LENGTH is a hexadecimal number. A reply of 1 means that a fast tracepoint may be placed on any instruction regardless of size. `E' An error has occurred. `' An empty reply indicates that the request is not supported by the stub. `QTStart' Begin the tracepoint experiment. Begin collecting data from tracepoint hits in the trace frame buffer. This packet supports the `qRelocInsn' reply (*note Relocate instruction reply packet: Tracepoint Packets.). `QTStop' End the tracepoint experiment. Stop collecting trace frames. `QTEnable:N:ADDR' Enable tracepoint N at address ADDR in a started tracepoint experiment. If the tracepoint was previously disabled, then collection of data from it will resume. `QTDisable:N:ADDR' Disable tracepoint N at address ADDR in a started tracepoint experiment. No more data will be collected from the tracepoint unless `QTEnable:N:ADDR' is subsequently issued. `QTinit' Clear the table of tracepoints, and empty the trace frame buffer. `QTro:START1,END1:START2,END2:...' Establish the given ranges of memory as "transparent". The stub will answer requests for these ranges from memory's current contents, if they were not collected as part of the tracepoint hit. GDB uses this to mark read-only regions of memory, like those containing program code. Since these areas never change, they should still have the same contents they did when the tracepoint was hit, so there's no reason for the stub to refuse to provide their contents. `QTDisconnected:VALUE' Set the choice to what to do with the tracing run when GDB disconnects from the target. A VALUE of 1 directs the target to continue the tracing run, while 0 tells the target to stop tracing if GDB is no longer in the picture. `qTStatus' Ask the stub if there is a trace experiment running right now. The reply has the form: `TRUNNING[;FIELD]...' RUNNING is a single digit `1' if the trace is presently running, or `0' if not. It is followed by semicolon-separated optional fields that an agent may use to report additional status. If the trace is not running, the agent may report any of several explanations as one of the optional fields: `tnotrun:0' No trace has been run yet. `tstop[:TEXT]:0' The trace was stopped by a user-originated stop command. The optional TEXT field is a user-supplied string supplied as part of the stop command (for instance, an explanation of why the trace was stopped manually). It is hex-encoded. `tfull:0' The trace stopped because the trace buffer filled up. `tdisconnected:0' The trace stopped because GDB disconnected from the target. `tpasscount:TPNUM' The trace stopped because tracepoint TPNUM exceeded its pass count. `terror:TEXT:TPNUM' The trace stopped because tracepoint TPNUM had an error. The string TEXT is available to describe the nature of the error (for instance, a divide by zero in the condition expression). TEXT is hex encoded. `tunknown:0' The trace stopped for some other reason. Additional optional fields supply statistical and other information. Although not required, they are extremely useful for users monitoring the progress of a trace run. If a trace has stopped, and these numbers are reported, they must reflect the state of the just-stopped trace. `tframes:N' The number of trace frames in the buffer. `tcreated:N' The total number of trace frames created during the run. This may be larger than the trace frame count, if the buffer is circular. `tsize:N' The total size of the trace buffer, in bytes. `tfree:N' The number of bytes still unused in the buffer. `circular:N' The value of the circular trace buffer flag. `1' means that the trace buffer is circular and old trace frames will be discarded if necessary to make room, `0' means that the trace buffer is linear and may fill up. `disconn:N' The value of the disconnected tracing flag. `1' means that tracing will continue after GDB disconnects, `0' means that the trace run will stop. `qTP:TP:ADDR' Ask the stub for the current state of tracepoint number TP at address ADDR. Replies: `VHITS:USAGE' The tracepoint has been hit HITS times so far during the trace run, and accounts for USAGE in the trace buffer. Note that `while-stepping' steps are not counted as separate hits, but the steps' space consumption is added into the usage number. `qTV:VAR' Ask the stub for the value of the trace state variable number VAR. Replies: `VVALUE' The value of the variable is VALUE. This will be the current value of the variable if the user is examining a running target, or a saved value if the variable was collected in the trace frame that the user is looking at. Note that multiple requests may result in different reply values, such as when requesting values while the program is running. `U' The value of the variable is unknown. This would occur, for example, if the user is examining a trace frame in which the requested variable was not collected. `qTfP' `qTsP' These packets request data about tracepoints that are being used by the target. GDB sends `qTfP' to get the first piece of data, and multiple `qTsP' to get additional pieces. Replies to these packets generally take the form of the `QTDP' packets that define tracepoints. (FIXME add detailed syntax) `qTfV' `qTsV' These packets request data about trace state variables that are on the target. GDB sends `qTfV' to get the first vari of data, and multiple `qTsV' to get additional variables. Replies to these packets follow the syntax of the `QTDV' packets that define trace state variables. `qTfSTM' `qTsSTM' These packets request data about static tracepoint markers that exist in the target program. GDB sends `qTfSTM' to get the first piece of data, and multiple `qTsSTM' to get additional pieces. Replies to these packets take the following form: Reply: `m ADDRESS:ID:EXTRA' A single marker `m ADDRESS:ID:EXTRA,ADDRESS:ID:EXTRA...' a comma-separated list of markers `l' (lower case letter `L') denotes end of list. `E NN' An error occurred. NN are hex digits. `' An empty reply indicates that the request is not supported by the stub. ADDRESS is encoded in hex. ID and EXTRA are strings encoded in hex. In response to each query, the target will reply with a list of one or more markers, separated by commas. GDB will respond to each reply with a request for more markers (using the `qs' form of the query), until the target responds with `l' (lower-case ell, for "last"). `qTSTMat:ADDRESS' This packets requests data about static tracepoint markers in the target program at ADDRESS. Replies to this packet follow the syntax of the `qTfSTM' and `qTsSTM' packets that list static tracepoint markers. `QTSave:FILENAME' This packet directs the target to save trace data to the file name FILENAME in the target's filesystem. FILENAME is encoded as a hex string; the interpretation of the file name (relative vs absolute, wild cards, etc) is up to the target. `qTBuffer:OFFSET,LEN' Return up to LEN bytes of the current contents of trace buffer, starting at OFFSET. The trace buffer is treated as if it were a contiguous collection of traceframes, as per the trace file format. The reply consists as many hex-encoded bytes as the target can deliver in a packet; it is not an error to return fewer than were asked for. A reply consisting of just `l' indicates that no bytes are available. `QTBuffer:circular:VALUE' This packet directs the target to use a circular trace buffer if VALUE is 1, or a linear buffer if the value is 0. `QTBuffer:size:SIZE' This packet directs the target to make the trace buffer be of size SIZE if possible. A value of `-1' tells the target to use whatever size it prefers. `QTNotes:[TYPE:TEXT][;TYPE:TEXT]...' This packet adds optional textual notes to the trace run. Allowable types include `user', `notes', and `tstop', the TEXT fields are arbitrary strings, hex-encoded. E.6.1 Relocate instruction reply packet --------------------------------------- When installing fast tracepoints in memory, the target may need to relocate the instruction currently at the tracepoint address to a different address in memory. For most instructions, a simple copy is enough, but, for example, call instructions that implicitly push the return address on the stack, and relative branches or other PC-relative instructions require offset adjustment, so that the effect of executing the instruction at a different address is the same as if it had executed in the original location. In response to several of the tracepoint packets, the target may also respond with a number of intermediate `qRelocInsn' request packets before the final result packet, to have GDB handle this relocation operation. If a packet supports this mechanism, its documentation will explicitly say so. See for example the above descriptions for the `QTStart' and `QTDP' packets. The format of the request is: `qRelocInsn:FROM;TO' This requests GDB to copy instruction at address FROM to address TO, possibly adjusted so that executing the instruction at TO has the same effect as executing it at FROM. GDB writes the adjusted instruction to target memory starting at TO. Replies: `qRelocInsn:ADJUSTED_SIZE' Informs the stub the relocation is complete. ADJUSTED_SIZE is the length in bytes of resulting relocated instruction sequence. `E NN' A badly formed request was detected, or an error was encountered while relocating the instruction.  File: gdb.info, Node: Host I/O Packets, Next: Interrupts, Prev: Tracepoint Packets, Up: Remote Protocol E.7 Host I/O Packets ==================== The "Host I/O" packets allow GDB to perform I/O operations on the far side of a remote link. For example, Host I/O is used to upload and download files to a remote target with its own filesystem. Host I/O uses the same constant values and data structure layout as the target-initiated File-I/O protocol. However, the Host I/O packets are structured differently. The target-initiated protocol relies on target memory to store parameters and buffers. Host I/O requests are initiated by GDB, and the target's memory is not involved. *Note File-I/O Remote Protocol Extension::, for more details on the target-initiated protocol. The Host I/O request packets all encode a single operation along with its arguments. They have this format: `vFile:OPERATION: PARAMETER...' OPERATION is the name of the particular request; the target should compare the entire packet name up to the second colon when checking for a supported operation. The format of PARAMETER depends on the operation. Numbers are always passed in hexadecimal. Negative numbers have an explicit minus sign (i.e. two's complement is not used). Strings (e.g. filenames) are encoded as a series of hexadecimal bytes. The last argument to a system call may be a buffer of escaped binary data (*note Binary Data::). The valid responses to Host I/O packets are: `F RESULT [, ERRNO] [; ATTACHMENT]' RESULT is the integer value returned by this operation, usually non-negative for success and -1 for errors. If an error has occured, ERRNO will be included in the result. ERRNO will have a value defined by the File-I/O protocol (*note Errno Values::). For operations which return data, ATTACHMENT supplies the data as a binary buffer. Binary buffers in response packets are escaped in the normal way (*note Binary Data::). See the individual packet documentation for the interpretation of RESULT and ATTACHMENT. `' An empty response indicates that this operation is not recognized. These are the supported Host I/O operations: `vFile:open: PATHNAME, FLAGS, MODE' Open a file at PATHNAME and return a file descriptor for it, or return -1 if an error occurs. PATHNAME is a string, FLAGS is an integer indicating a mask of open flags (*note Open Flags::), and MODE is an integer indicating a mask of mode bits to use if the file is created (*note mode_t Values::). *Note open::, for details of the open flags and mode values. `vFile:close: FD' Close the open file corresponding to FD and return 0, or -1 if an error occurs. `vFile:pread: FD, COUNT, OFFSET' Read data from the open file corresponding to FD. Up to COUNT bytes will be read from the file, starting at OFFSET relative to the start of the file. The target may read fewer bytes; common reasons include packet size limits and an end-of-file condition. The number of bytes read is returned. Zero should only be returned for a successful read at the end of the file, or if COUNT was zero. The data read should be returned as a binary attachment on success. If zero bytes were read, the response should include an empty binary attachment (i.e. a trailing semicolon). The return value is the number of target bytes read; the binary attachment may be longer if some characters were escaped. `vFile:pwrite: FD, OFFSET, DATA' Write DATA (a binary buffer) to the open file corresponding to FD. Start the write at OFFSET from the start of the file. Unlike many `write' system calls, there is no separate COUNT argument; the length of DATA in the packet is used. `vFile:write' returns the number of bytes written, which may be shorter than the length of DATA, or -1 if an error occurred. `vFile:unlink: PATHNAME' Delete the file at PATHNAME on the target. Return 0, or -1 if an error occurs. PATHNAME is a string. `vFile:readlink: FILENAME' Read value of symbolic link FILENAME on the target. Return the number of bytes read, or -1 if an error occurs. The data read should be returned as a binary attachment on success. If zero bytes were read, the response should include an empty binary attachment (i.e. a trailing semicolon). The return value is the number of target bytes read; the binary attachment may be longer if some characters were escaped.  File: gdb.info, Node: Interrupts, Next: Notification Packets, Prev: Host I/O Packets, Up: Remote Protocol E.8 Interrupts ============== When a program on the remote target is running, GDB may attempt to interrupt it by sending a `Ctrl-C', `BREAK' or a `BREAK' followed by `g', control of which is specified via GDB's `interrupt-sequence'. The precise meaning of `BREAK' is defined by the transport mechanism and may, in fact, be undefined. GDB does not currently define a `BREAK' mechanism for any of the network interfaces except for TCP, in which case GDB sends the `telnet' BREAK sequence. `Ctrl-C', on the other hand, is defined and implemented for all transport mechanisms. It is represented by sending the single byte `0x03' without any of the usual packet overhead described in the Overview section (*note Overview::). When a `0x03' byte is transmitted as part of a packet, it is considered to be packet data and does _not_ represent an interrupt. E.g., an `X' packet (*note X packet::), used for binary downloads, may include an unescaped `0x03' as part of its packet. `BREAK' followed by `g' is also known as Magic SysRq g. When Linux kernel receives this sequence from serial port, it stops execution and connects to gdb. Stubs are not required to recognize these interrupt mechanisms and the precise meaning associated with receipt of the interrupt is implementation defined. If the target supports debugging of multiple threads and/or processes, it should attempt to interrupt all currently-executing threads and processes. If the stub is successful at interrupting the running program, it should send one of the stop reply packets (*note Stop Reply Packets::) to GDB as a result of successfully stopping the program in all-stop mode, and a stop reply for each stopped thread in non-stop mode. Interrupts received while the program is stopped are discarded.  File: gdb.info, Node: Notification Packets, Next: Remote Non-Stop, Prev: Interrupts, Up: Remote Protocol E.9 Notification Packets ======================== The GDB remote serial protocol includes "notifications", packets that require no acknowledgment. Both the GDB and the stub may send notifications (although the only notifications defined at present are sent by the stub). Notifications carry information without incurring the round-trip latency of an acknowledgment, and so are useful for low-impact communications where occasional packet loss is not a problem. A notification packet has the form `% DATA # CHECKSUM', where DATA is the content of the notification, and CHECKSUM is a checksum of DATA, computed and formatted as for ordinary GDB packets. A notification's DATA never contains `$', `%' or `#' characters. Upon receiving a notification, the recipient sends no `+' or `-' to acknowledge the notification's receipt or to report its corruption. Every notification's DATA begins with a name, which contains no colon characters, followed by a colon character. Recipients should silently ignore corrupted notifications and notifications they do not understand. Recipients should restart timeout periods on receipt of a well-formed notification, whether or not they understand it. Senders should only send the notifications described here when this protocol description specifies that they are permitted. In the future, we may extend the protocol to permit existing notifications in new contexts; this rule helps older senders avoid confusing newer recipients. (Older versions of GDB ignore bytes received until they see the `$' byte that begins an ordinary packet, so new stubs may transmit notifications without fear of confusing older clients. There are no notifications defined for GDB to send at the moment, but we assume that most older stubs would ignore them, as well.) Each notification is comprised of three parts: `NAME:EVENT' The notification packet is sent by the side that initiates the exchange (currently, only the stub does that), with EVENT carrying the specific information about the notification. NAME is the name of the notification. `ACK' The acknowledge sent by the other side, usually GDB, to acknowledge the exchange and request the event. The purpose of an asynchronous notification mechanism is to report to GDB that something interesting happened in the remote stub. The remote stub may send notification NAME:EVENT at any time, but GDB acknowledges the notification when appropriate. The notification event is pending before GDB acknowledges. Only one notification at a time may be pending; if additional events occur before GDB has acknowledged the previous notification, they must be queued by the stub for later synchronous transmission in response to ACK packets from GDB. Because the notification mechanism is unreliable, the stub is permitted to resend a notification if it believes GDB may not have received it. Specifically, notifications may appear when GDB is not otherwise reading input from the stub, or when GDB is expecting to read a normal synchronous response or a `+'/`-' acknowledgment to a packet it has sent. Notification packets are distinct from any other communication from the stub so there is no ambiguity. After receiving a notification, GDB shall acknowledge it by sending a ACK packet as a regular, synchronous request to the stub. Such acknowledgment is not required to happen immediately, as GDB is permitted to send other, unrelated packets to the stub first, which the stub should process normally. Upon receiving a ACK packet, if the stub has other queued events to report to GDB, it shall respond by sending a normal EVENT. GDB shall then send another ACK packet to solicit further responses; again, it is permitted to send other, unrelated packets as well which the stub should process normally. If the stub receives a ACK packet and there are no additional EVENT to report, the stub shall return an `OK' response. At this point, GDB has finished processing a notification and the stub has completed sending any queued events. GDB won't accept any new notifications until the final `OK' is received . If further notification events occur, the stub shall send a new notification, GDB shall accept the notification, and the process shall be repeated. The process of asynchronous notification can be illustrated by the following example: <- `%%Stop:T0505:98e7ffbf;04:4ce6ffbf;08:b1b6e54c;thread:p7526.7526;core:0;' `...' -> `vStopped' <- `T0505:68f37db7;04:40f37db7;08:63850408;thread:p7526.7528;core:0;' -> `vStopped' <- `T0505:68e3fdb6;04:40e3fdb6;08:63850408;thread:p7526.7529;core:0;' -> `vStopped' <- `OK' The following notifications are defined: NotificationAck Event Description Stop vStopped REPLY. The REPLY has the Report an asynchronous form of a stop reply, as stop event in non-stop described in *note Stop mode. Reply Packets::. Refer to *note Remote Non-Stop::, for information on how these notifications are acknowledged by GDB.  File: gdb.info, Node: Remote Non-Stop, Next: Packet Acknowledgment, Prev: Notification Packets, Up: Remote Protocol E.10 Remote Protocol Support for Non-Stop Mode ============================================== GDB's remote protocol supports non-stop debugging of multi-threaded programs, as described in *note Non-Stop Mode::. If the stub supports non-stop mode, it should report that to GDB by including `QNonStop+' in its `qSupported' response (*note qSupported::). GDB typically sends a `QNonStop' packet only when establishing a new connection with the stub. Entering non-stop mode does not alter the state of any currently-running threads, but targets must stop all threads in any already-attached processes when entering all-stop mode. GDB uses the `?' packet as necessary to probe the target state after a mode change. In non-stop mode, when an attached process encounters an event that would otherwise be reported with a stop reply, it uses the asynchronous notification mechanism (*note Notification Packets::) to inform GDB. In contrast to all-stop mode, where all threads in all processes are stopped when a stop reply is sent, in non-stop mode only the thread reporting the stop event is stopped. That is, when reporting a `S' or `T' response to indicate completion of a step operation, hitting a breakpoint, or a fault, only the affected thread is stopped; any other still-running threads continue to run. When reporting a `W' or `X' response, all running threads belonging to other attached processes continue to run. In non-stop mode, the target shall respond to the `?' packet as follows. First, any incomplete stop reply notification/`vStopped' sequence in progress is abandoned. The target must begin a new sequence reporting stop events for all stopped threads, whether or not it has previously reported those events to GDB. The first stop reply is sent as a synchronous reply to the `?' packet, and subsequent stop replies are sent as responses to `vStopped' packets using the mechanism described above. The target must not send asynchronous stop reply notifications until the sequence is complete. If all threads are running when the target receives the `?' packet, or if the target is not attached to any process, it shall respond `OK'.  File: gdb.info, Node: Packet Acknowledgment, Next: Examples, Prev: Remote Non-Stop, Up: Remote Protocol E.11 Packet Acknowledgment ========================== By default, when either the host or the target machine receives a packet, the first response expected is an acknowledgment: either `+' (to indicate the package was received correctly) or `-' (to request retransmission). This mechanism allows the GDB remote protocol to operate over unreliable transport mechanisms, such as a serial line. In cases where the transport mechanism is itself reliable (such as a pipe or TCP connection), the `+'/`-' acknowledgments are redundant. It may be desirable to disable them in that case to reduce communication overhead, or for other reasons. This can be accomplished by means of the `QStartNoAckMode' packet; *note QStartNoAckMode::. When in no-acknowledgment mode, neither the stub nor GDB shall send or expect `+'/`-' protocol acknowledgments. The packet and response format still includes the normal checksum, as described in *note Overview::, but the checksum may be ignored by the receiver. If the stub supports `QStartNoAckMode' and prefers to operate in no-acknowledgment mode, it should report that to GDB by including `QStartNoAckMode+' in its response to `qSupported'; *note qSupported::. If GDB also supports `QStartNoAckMode' and it has not been disabled via the `set remote noack-packet off' command (*note Remote Configuration::), GDB may then send a `QStartNoAckMode' packet to the stub. Only then may the stub actually turn off packet acknowledgments. GDB sends a final `+' acknowledgment of the stub's `OK' response, which can be safely ignored by the stub. Note that `set remote noack-packet' command only affects negotiation between GDB and the stub when subsequent connections are made; it does not affect the protocol acknowledgment state for any current connection. Since `+'/`-' acknowledgments are enabled by default when a new connection is established, there is also no protocol request to re-enable the acknowledgments for the current connection, once disabled.  File: gdb.info, Node: Examples, Next: File-I/O Remote Protocol Extension, Prev: Packet Acknowledgment, Up: Remote Protocol E.12 Examples ============= Example sequence of a target being re-started. Notice how the restart does not get any direct output: -> `R00' <- `+' _target restarts_ -> `?' <- `+' <- `T001:1234123412341234' -> `+' Example sequence of a target being stepped by a single instruction: -> `G1445...' <- `+' -> `s' <- `+' _time passes_ <- `T001:1234123412341234' -> `+' -> `g' <- `+' <- `1455...' -> `+'  File: gdb.info, Node: File-I/O Remote Protocol Extension, Next: Library List Format, Prev: Examples, Up: Remote Protocol E.13 File-I/O Remote Protocol Extension ======================================= * Menu: * File-I/O Overview:: * Protocol Basics:: * The F Request Packet:: * The F Reply Packet:: * The Ctrl-C Message:: * Console I/O:: * List of Supported Calls:: * Protocol-specific Representation of Datatypes:: * Constants:: * File-I/O Examples::  File: gdb.info, Node: File-I/O Overview, Next: Protocol Basics, Up: File-I/O Remote Protocol Extension E.13.1 File-I/O Overview ------------------------ The "File I/O remote protocol extension" (short: File-I/O) allows the target to use the host's file system and console I/O to perform various system calls. System calls on the target system are translated into a remote protocol packet to the host system, which then performs the needed actions and returns a response packet to the target system. This simulates file system operations even on targets that lack file systems. The protocol is defined to be independent of both the host and target systems. It uses its own internal representation of datatypes and values. Both GDB and the target's GDB stub are responsible for translating the system-dependent value representations into the internal protocol representations when data is transmitted. The communication is synchronous. A system call is possible only when GDB is waiting for a response from the `C', `c', `S' or `s' packets. While GDB handles the request for a system call, the target is stopped to allow deterministic access to the target's memory. Therefore File-I/O is not interruptible by target signals. On the other hand, it is possible to interrupt File-I/O by a user interrupt (`Ctrl-C') within GDB. The target's request to perform a host system call does not finish the latest `C', `c', `S' or `s' action. That means, after finishing the system call, the target returns to continuing the previous activity (continue, step). No additional continue or step request from GDB is required. (gdb) continue <- target requests 'system call X' target is stopped, GDB executes system call -> GDB returns result ... target continues, GDB returns to wait for the target <- target hits breakpoint and sends a Txx packet The protocol only supports I/O on the console and to regular files on the host file system. Character or block special devices, pipes, named pipes, sockets or any other communication method on the host system are not supported by this protocol. File I/O is not supported in non-stop mode.  File: gdb.info, Node: Protocol Basics, Next: The F Request Packet, Prev: File-I/O Overview, Up: File-I/O Remote Protocol Extension E.13.2 Protocol Basics ---------------------- The File-I/O protocol uses the `F' packet as the request as well as reply packet. Since a File-I/O system call can only occur when GDB is waiting for a response from the continuing or stepping target, the File-I/O request is a reply that GDB has to expect as a result of a previous `C', `c', `S' or `s' packet. This `F' packet contains all information needed to allow GDB to call the appropriate host system call: * A unique identifier for the requested system call. * All parameters to the system call. Pointers are given as addresses in the target memory address space. Pointers to strings are given as pointer/length pair. Numerical values are given as they are. Numerical control flags are given in a protocol-specific representation. At this point, GDB has to perform the following actions. * If the parameters include pointer values to data needed as input to a system call, GDB requests this data from the target with a standard `m' packet request. This additional communication has to be expected by the target implementation and is handled as any other `m' packet. * GDB translates all value from protocol representation to host representation as needed. Datatypes are coerced into the host types. * GDB calls the system call. * It then coerces datatypes back to protocol representation. * If the system call is expected to return data in buffer space specified by pointer parameters to the call, the data is transmitted to the target using a `M' or `X' packet. This packet has to be expected by the target implementation and is handled as any other `M' or `X' packet. Eventually GDB replies with another `F' packet which contains all necessary information for the target to continue. This at least contains * Return value. * `errno', if has been changed by the system call. * "Ctrl-C" flag. After having done the needed type and value coercion, the target continues the latest continue or step action.  File: gdb.info, Node: The F Request Packet, Next: The F Reply Packet, Prev: Protocol Basics, Up: File-I/O Remote Protocol Extension E.13.3 The `F' Request Packet ----------------------------- The `F' request packet has the following format: `FCALL-ID,PARAMETER...' CALL-ID is the identifier to indicate the host system call to be called. This is just the name of the function. PARAMETER... are the parameters to the system call. Parameters are hexadecimal integer values, either the actual values in case of scalar datatypes, pointers to target buffer space in case of compound datatypes and unspecified memory areas, or pointer/length pairs in case of string parameters. These are appended to the CALL-ID as a comma-delimited list. All values are transmitted in ASCII string representation, pointer/length pairs separated by a slash.  File: gdb.info, Node: The F Reply Packet, Next: The Ctrl-C Message, Prev: The F Request Packet, Up: File-I/O Remote Protocol Extension E.13.4 The `F' Reply Packet --------------------------- The `F' reply packet has the following format: `FRETCODE,ERRNO,CTRL-C FLAG;CALL-SPECIFIC ATTACHMENT' RETCODE is the return code of the system call as hexadecimal value. ERRNO is the `errno' set by the call, in protocol-specific representation. This parameter can be omitted if the call was successful. CTRL-C FLAG is only sent if the user requested a break. In this case, ERRNO must be sent as well, even if the call was successful. The CTRL-C FLAG itself consists of the character `C': F0,0,C or, if the call was interrupted before the host call has been performed: F-1,4,C assuming 4 is the protocol-specific representation of `EINTR'.  File: gdb.info, Node: The Ctrl-C Message, Next: Console I/O, Prev: The F Reply Packet, Up: File-I/O Remote Protocol Extension E.13.5 The `Ctrl-C' Message --------------------------- If the `Ctrl-C' flag is set in the GDB reply packet (*note The F Reply Packet::), the target should behave as if it had gotten a break message. The meaning for the target is "system call interrupted by `SIGINT'". Consequentially, the target should actually stop (as with a break message) and return to GDB with a `T02' packet. It's important for the target to know in which state the system call was interrupted. There are two possible cases: * The system call hasn't been performed on the host yet. * The system call on the host has been finished. These two states can be distinguished by the target by the value of the returned `errno'. If it's the protocol representation of `EINTR', the system call hasn't been performed. This is equivalent to the `EINTR' handling on POSIX systems. In any other case, the target may presume that the system call has been finished -- successfully or not -- and should behave as if the break message arrived right after the system call. GDB must behave reliably. If the system call has not been called yet, GDB may send the `F' reply immediately, setting `EINTR' as `errno' in the packet. If the system call on the host has been finished before the user requests a break, the full action must be finished by GDB. This requires sending `M' or `X' packets as necessary. The `F' packet may only be sent when either nothing has happened or the full action has been completed.  File: gdb.info, Node: Console I/O, Next: List of Supported Calls, Prev: The Ctrl-C Message, Up: File-I/O Remote Protocol Extension E.13.6 Console I/O ------------------ By default and if not explicitly closed by the target system, the file descriptors 0, 1 and 2 are connected to the GDB console. Output on the GDB console is handled as any other file output operation (`write(1, ...)' or `write(2, ...)'). Console input is handled by GDB so that after the target read request from file descriptor 0 all following typing is buffered until either one of the following conditions is met: * The user types `Ctrl-c'. The behaviour is as explained above, and the `read' system call is treated as finished. * The user presses . This is treated as end of input with a trailing newline. * The user types `Ctrl-d'. This is treated as end of input. No trailing character (neither newline nor `Ctrl-D') is appended to the input. If the user has typed more characters than fit in the buffer given to the `read' call, the trailing characters are buffered in GDB until either another `read(0, ...)' is requested by the target, or debugging is stopped at the user's request.  File: gdb.info, Node: List of Supported Calls, Next: Protocol-specific Representation of Datatypes, Prev: Console I/O, Up: File-I/O Remote Protocol Extension E.13.7 List of Supported Calls ------------------------------ * Menu: * open:: * close:: * read:: * write:: * lseek:: * rename:: * unlink:: * stat/fstat:: * gettimeofday:: * isatty:: * system::  File: gdb.info, Node: open, Next: close, Up: List of Supported Calls open .... Synopsis: int open(const char *pathname, int flags); int open(const char *pathname, int flags, mode_t mode); Request: `Fopen,PATHPTR/LEN,FLAGS,MODE' FLAGS is the bitwise `OR' of the following values: `O_CREAT' If the file does not exist it will be created. The host rules apply as far as file ownership and time stamps are concerned. `O_EXCL' When used with `O_CREAT', if the file already exists it is an error and open() fails. `O_TRUNC' If the file already exists and the open mode allows writing (`O_RDWR' or `O_WRONLY' is given) it will be truncated to zero length. `O_APPEND' The file is opened in append mode. `O_RDONLY' The file is opened for reading only. `O_WRONLY' The file is opened for writing only. `O_RDWR' The file is opened for reading and writing. Other bits are silently ignored. MODE is the bitwise `OR' of the following values: `S_IRUSR' User has read permission. `S_IWUSR' User has write permission. `S_IRGRP' Group has read permission. `S_IWGRP' Group has write permission. `S_IROTH' Others have read permission. `S_IWOTH' Others have write permission. Other bits are silently ignored. Return value: `open' returns the new file descriptor or -1 if an error occurred. Errors: `EEXIST' PATHNAME already exists and `O_CREAT' and `O_EXCL' were used. `EISDIR' PATHNAME refers to a directory. `EACCES' The requested access is not allowed. `ENAMETOOLONG' PATHNAME was too long. `ENOENT' A directory component in PATHNAME does not exist. `ENODEV' PATHNAME refers to a device, pipe, named pipe or socket. `EROFS' PATHNAME refers to a file on a read-only filesystem and write access was requested. `EFAULT' PATHNAME is an invalid pointer value. `ENOSPC' No space on device to create the file. `EMFILE' The process already has the maximum number of files open. `ENFILE' The limit on the total number of files open on the system has been reached. `EINTR' The call was interrupted by the user.  File: gdb.info, Node: close, Next: read, Prev: open, Up: List of Supported Calls close ..... Synopsis: int close(int fd); Request: `Fclose,FD' Return value: `close' returns zero on success, or -1 if an error occurred. Errors: `EBADF' FD isn't a valid open file descriptor. `EINTR' The call was interrupted by the user.  File: gdb.info, Node: read, Next: write, Prev: close, Up: List of Supported Calls read .... Synopsis: int read(int fd, void *buf, unsigned int count); Request: `Fread,FD,BUFPTR,COUNT' Return value: On success, the number of bytes read is returned. Zero indicates end of file. If count is zero, read returns zero as well. On error, -1 is returned. Errors: `EBADF' FD is not a valid file descriptor or is not open for reading. `EFAULT' BUFPTR is an invalid pointer value. `EINTR' The call was interrupted by the user.  File: gdb.info, Node: write, Next: lseek, Prev: read, Up: List of Supported Calls write ..... Synopsis: int write(int fd, const void *buf, unsigned int count); Request: `Fwrite,FD,BUFPTR,COUNT' Return value: On success, the number of bytes written are returned. Zero indicates nothing was written. On error, -1 is returned. Errors: `EBADF' FD is not a valid file descriptor or is not open for writing. `EFAULT' BUFPTR is an invalid pointer value. `EFBIG' An attempt was made to write a file that exceeds the host-specific maximum file size allowed. `ENOSPC' No space on device to write the data. `EINTR' The call was interrupted by the user.  File: gdb.info, Node: lseek, Next: rename, Prev: write, Up: List of Supported Calls lseek ..... Synopsis: long lseek (int fd, long offset, int flag); Request: `Flseek,FD,OFFSET,FLAG' FLAG is one of: `SEEK_SET' The offset is set to OFFSET bytes. `SEEK_CUR' The offset is set to its current location plus OFFSET bytes. `SEEK_END' The offset is set to the size of the file plus OFFSET bytes. Return value: On success, the resulting unsigned offset in bytes from the beginning of the file is returned. Otherwise, a value of -1 is returned. Errors: `EBADF' FD is not a valid open file descriptor. `ESPIPE' FD is associated with the GDB console. `EINVAL' FLAG is not a proper value. `EINTR' The call was interrupted by the user.  File: gdb.info, Node: rename, Next: unlink, Prev: lseek, Up: List of Supported Calls rename ...... Synopsis: int rename(const char *oldpath, const char *newpath); Request: `Frename,OLDPATHPTR/LEN,NEWPATHPTR/LEN' Return value: On success, zero is returned. On error, -1 is returned. Errors: `EISDIR' NEWPATH is an existing directory, but OLDPATH is not a directory. `EEXIST' NEWPATH is a non-empty directory. `EBUSY' OLDPATH or NEWPATH is a directory that is in use by some process. `EINVAL' An attempt was made to make a directory a subdirectory of itself. `ENOTDIR' A component used as a directory in OLDPATH or new path is not a directory. Or OLDPATH is a directory and NEWPATH exists but is not a directory. `EFAULT' OLDPATHPTR or NEWPATHPTR are invalid pointer values. `EACCES' No access to the file or the path of the file. `ENAMETOOLONG' OLDPATH or NEWPATH was too long. `ENOENT' A directory component in OLDPATH or NEWPATH does not exist. `EROFS' The file is on a read-only filesystem. `ENOSPC' The device containing the file has no room for the new directory entry. `EINTR' The call was interrupted by the user.  File: gdb.info, Node: unlink, Next: stat/fstat, Prev: rename, Up: List of Supported Calls unlink ...... Synopsis: int unlink(const char *pathname); Request: `Funlink,PATHNAMEPTR/LEN' Return value: On success, zero is returned. On error, -1 is returned. Errors: `EACCES' No access to the file or the path of the file. `EPERM' The system does not allow unlinking of directories. `EBUSY' The file PATHNAME cannot be unlinked because it's being used by another process. `EFAULT' PATHNAMEPTR is an invalid pointer value. `ENAMETOOLONG' PATHNAME was too long. `ENOENT' A directory component in PATHNAME does not exist. `ENOTDIR' A component of the path is not a directory. `EROFS' The file is on a read-only filesystem. `EINTR' The call was interrupted by the user.  File: gdb.info, Node: stat/fstat, Next: gettimeofday, Prev: unlink, Up: List of Supported Calls stat/fstat .......... Synopsis: int stat(const char *pathname, struct stat *buf); int fstat(int fd, struct stat *buf); Request: `Fstat,PATHNAMEPTR/LEN,BUFPTR' `Ffstat,FD,BUFPTR' Return value: On success, zero is returned. On error, -1 is returned. Errors: `EBADF' FD is not a valid open file. `ENOENT' A directory component in PATHNAME does not exist or the path is an empty string. `ENOTDIR' A component of the path is not a directory. `EFAULT' PATHNAMEPTR is an invalid pointer value. `EACCES' No access to the file or the path of the file. `ENAMETOOLONG' PATHNAME was too long. `EINTR' The call was interrupted by the user.  File: gdb.info, Node: gettimeofday, Next: isatty, Prev: stat/fstat, Up: List of Supported Calls gettimeofday ............ Synopsis: int gettimeofday(struct timeval *tv, void *tz); Request: `Fgettimeofday,TVPTR,TZPTR' Return value: On success, 0 is returned, -1 otherwise. Errors: `EINVAL' TZ is a non-NULL pointer. `EFAULT' TVPTR and/or TZPTR is an invalid pointer value.  File: gdb.info, Node: isatty, Next: system, Prev: gettimeofday, Up: List of Supported Calls isatty ...... Synopsis: int isatty(int fd); Request: `Fisatty,FD' Return value: Returns 1 if FD refers to the GDB console, 0 otherwise. Errors: `EINTR' The call was interrupted by the user. Note that the `isatty' call is treated as a special case: it returns 1 to the target if the file descriptor is attached to the GDB console, 0 otherwise. Implementing through system calls would require implementing `ioctl' and would be more complex than needed.  File: gdb.info, Node: system, Prev: isatty, Up: List of Supported Calls system ...... Synopsis: int system(const char *command); Request: `Fsystem,COMMANDPTR/LEN' Return value: If LEN is zero, the return value indicates whether a shell is available. A zero return value indicates a shell is not available. For non-zero LEN, the value returned is -1 on error and the return status of the command otherwise. Only the exit status of the command is returned, which is extracted from the host's `system' return value by calling `WEXITSTATUS(retval)'. In case `/bin/sh' could not be executed, 127 is returned. Errors: `EINTR' The call was interrupted by the user. GDB takes over the full task of calling the necessary host calls to perform the `system' call. The return value of `system' on the host is simplified before it's returned to the target. Any termination signal information from the child process is discarded, and the return value consists entirely of the exit status of the called command. Due to security concerns, the `system' call is by default refused by GDB. The user has to allow this call explicitly with the `set remote system-call-allowed 1' command. `set remote system-call-allowed' Control whether to allow the `system' calls in the File I/O protocol for the remote target. The default is zero (disabled). `show remote system-call-allowed' Show whether the `system' calls are allowed in the File I/O protocol.  File: gdb.info, Node: Protocol-specific Representation of Datatypes, Next: Constants, Prev: List of Supported Calls, Up: File-I/O Remote Protocol Extension E.13.8 Protocol-specific Representation of Datatypes ---------------------------------------------------- * Menu: * Integral Datatypes:: * Pointer Values:: * Memory Transfer:: * struct stat:: * struct timeval::  File: gdb.info, Node: Integral Datatypes, Next: Pointer Values, Up: Protocol-specific Representation of Datatypes Integral Datatypes .................. The integral datatypes used in the system calls are `int', `unsigned int', `long', `unsigned long', `mode_t', and `time_t'. `int', `unsigned int', `mode_t' and `time_t' are implemented as 32 bit values in this protocol. `long' and `unsigned long' are implemented as 64 bit types. *Note Limits::, for corresponding MIN and MAX values (similar to those in `limits.h') to allow range checking on host and target. `time_t' datatypes are defined as seconds since the Epoch. All integral datatypes transferred as part of a memory read or write of a structured datatype e.g. a `struct stat' have to be given in big endian byte order.  File: gdb.info, Node: Pointer Values, Next: Memory Transfer, Prev: Integral Datatypes, Up: Protocol-specific Representation of Datatypes Pointer Values .............. Pointers to target data are transmitted as they are. An exception is made for pointers to buffers for which the length isn't transmitted as part of the function call, namely strings. Strings are transmitted as a pointer/length pair, both as hex values, e.g. `1aaf/12' which is a pointer to data of length 18 bytes at position 0x1aaf. The length is defined as the full string length in bytes, including the trailing null byte. For example, the string `"hello world"' at address 0x123456 is transmitted as `123456/d'  File: gdb.info, Node: Memory Transfer, Next: struct stat, Prev: Pointer Values, Up: Protocol-specific Representation of Datatypes Memory Transfer ............... Structured data which is transferred using a memory read or write (for example, a `struct stat') is expected to be in a protocol-specific format with all scalar multibyte datatypes being big endian. Translation to this representation needs to be done both by the target before the `F' packet is sent, and by GDB before it transfers memory to the target. Transferred pointers to structured data should point to the already-coerced data at any time.  File: gdb.info, Node: struct stat, Next: struct timeval, Prev: Memory Transfer, Up: Protocol-specific Representation of Datatypes struct stat ........... The buffer of type `struct stat' used by the target and GDB is defined as follows: struct stat { unsigned int st_dev; /* device */ unsigned int st_ino; /* inode */ mode_t st_mode; /* protection */ unsigned int st_nlink; /* number of hard links */ unsigned int st_uid; /* user ID of owner */ unsigned int st_gid; /* group ID of owner */ unsigned int st_rdev; /* device type (if inode device) */ unsigned long st_size; /* total size, in bytes */ unsigned long st_blksize; /* blocksize for filesystem I/O */ unsigned long st_blocks; /* number of blocks allocated */ time_t st_atime; /* time of last access */ time_t st_mtime; /* time of last modification */ time_t st_ctime; /* time of last change */ }; The integral datatypes conform to the definitions given in the appropriate section (see *note Integral Datatypes::, for details) so this structure is of size 64 bytes. The values of several fields have a restricted meaning and/or range of values. `st_dev' A value of 0 represents a file, 1 the console. `st_ino' No valid meaning for the target. Transmitted unchanged. `st_mode' Valid mode bits are described in *note Constants::. Any other bits have currently no meaning for the target. `st_uid' `st_gid' `st_rdev' No valid meaning for the target. Transmitted unchanged. `st_atime' `st_mtime' `st_ctime' These values have a host and file system dependent accuracy. Especially on Windows hosts, the file system may not support exact timing values. The target gets a `struct stat' of the above representation and is responsible for coercing it to the target representation before continuing. Note that due to size differences between the host, target, and protocol representations of `struct stat' members, these members could eventually get truncated on the target.  File: gdb.info, Node: struct timeval, Prev: struct stat, Up: Protocol-specific Representation of Datatypes struct timeval .............. The buffer of type `struct timeval' used by the File-I/O protocol is defined as follows: struct timeval { time_t tv_sec; /* second */ long tv_usec; /* microsecond */ }; The integral datatypes conform to the definitions given in the appropriate section (see *note Integral Datatypes::, for details) so this structure is of size 8 bytes.  File: gdb.info, Node: Constants, Next: File-I/O Examples, Prev: Protocol-specific Representation of Datatypes, Up: File-I/O Remote Protocol Extension E.13.9 Constants ---------------- The following values are used for the constants inside of the protocol. GDB and target are responsible for translating these values before and after the call as needed. * Menu: * Open Flags:: * mode_t Values:: * Errno Values:: * Lseek Flags:: * Limits::  File: gdb.info, Node: Open Flags, Next: mode_t Values, Up: Constants Open Flags .......... All values are given in hexadecimal representation. O_RDONLY 0x0 O_WRONLY 0x1 O_RDWR 0x2 O_APPEND 0x8 O_CREAT 0x200 O_TRUNC 0x400 O_EXCL 0x800  File: gdb.info, Node: mode_t Values, Next: Errno Values, Prev: Open Flags, Up: Constants mode_t Values ............. All values are given in octal representation. S_IFREG 0100000 S_IFDIR 040000 S_IRUSR 0400 S_IWUSR 0200 S_IXUSR 0100 S_IRGRP 040 S_IWGRP 020 S_IXGRP 010 S_IROTH 04 S_IWOTH 02 S_IXOTH 01  File: gdb.info, Node: Errno Values, Next: Lseek Flags, Prev: mode_t Values, Up: Constants Errno Values ............ All values are given in decimal representation. EPERM 1 ENOENT 2 EINTR 4 EBADF 9 EACCES 13 EFAULT 14 EBUSY 16 EEXIST 17 ENODEV 19 ENOTDIR 20 EISDIR 21 EINVAL 22 ENFILE 23 EMFILE 24 EFBIG 27 ENOSPC 28 ESPIPE 29 EROFS 30 ENAMETOOLONG 91 EUNKNOWN 9999 `EUNKNOWN' is used as a fallback error value if a host system returns any error value not in the list of supported error numbers.  File: gdb.info, Node: Lseek Flags, Next: Limits, Prev: Errno Values, Up: Constants Lseek Flags ........... SEEK_SET 0 SEEK_CUR 1 SEEK_END 2  File: gdb.info, Node: Limits, Prev: Lseek Flags, Up: Constants Limits ...... All values are given in decimal representation. INT_MIN -2147483648 INT_MAX 2147483647 UINT_MAX 4294967295 LONG_MIN -9223372036854775808 LONG_MAX 9223372036854775807 ULONG_MAX 18446744073709551615  File: gdb.info, Node: File-I/O Examples, Prev: Constants, Up: File-I/O Remote Protocol Extension E.13.10 File-I/O Examples ------------------------- Example sequence of a write call, file descriptor 3, buffer is at target address 0x1234, 6 bytes should be written: <- `Fwrite,3,1234,6' _request memory read from target_ -> `m1234,6' <- XXXXXX _return "6 bytes written"_ -> `F6' Example sequence of a read call, file descriptor 3, buffer is at target address 0x1234, 6 bytes should be read: <- `Fread,3,1234,6' _request memory write to target_ -> `X1234,6:XXXXXX' _return "6 bytes read"_ -> `F6' Example sequence of a read call, call fails on the host due to invalid file descriptor (`EBADF'): <- `Fread,3,1234,6' -> `F-1,9' Example sequence of a read call, user presses `Ctrl-c' before syscall on host is called: <- `Fread,3,1234,6' -> `F-1,4,C' <- `T02' Example sequence of a read call, user presses `Ctrl-c' after syscall on host is called: <- `Fread,3,1234,6' -> `X1234,6:XXXXXX' <- `T02'  File: gdb.info, Node: Library List Format, Next: Library List Format for SVR4 Targets, Prev: File-I/O Remote Protocol Extension, Up: Remote Protocol E.14 Library List Format ======================== On some platforms, a dynamic loader (e.g. `ld.so') runs in the same process as your application to manage libraries. In this case, GDB can use the loader's symbol table and normal memory operations to maintain a list of shared libraries. On other platforms, the operating system manages loaded libraries. GDB can not retrieve the list of currently loaded libraries through memory operations, so it uses the `qXfer:libraries:read' packet (*note qXfer library list read::) instead. The remote stub queries the target's operating system and reports which libraries are loaded. The `qXfer:libraries:read' packet returns an XML document which lists loaded libraries and their offsets. Each library has an associated name and one or more segment or section base addresses, which report where the library was loaded in memory. For the common case of libraries that are fully linked binaries, the library should have a list of segments. If the target supports dynamic linking of a relocatable object file, its library XML element should instead include a list of allocated sections. The segment or section bases are start addresses, not relocation offsets; they do not depend on the library's link-time base addresses. GDB must be linked with the Expat library to support XML library lists. *Note Expat::. A simple memory map, with one loaded library relocated by a single offset, looks like this: Another simple memory map, with one loaded library with three allocated sections (.text, .data, .bss), looks like this:
The format of a library list is described by this DTD: In addition, segments and section descriptors cannot be mixed within a single library element, and you must supply at least one segment or section for each library.  File: gdb.info, Node: Library List Format for SVR4 Targets, Next: Memory Map Format, Prev: Library List Format, Up: Remote Protocol E.15 Library List Format for SVR4 Targets ========================================= On SVR4 platforms GDB can use the symbol table of a dynamic loader (e.g. `ld.so') and normal memory operations to maintain a list of shared libraries. Still a special library list provided by this packet is more efficient for the GDB remote protocol. The `qXfer:libraries-svr4:read' packet returns an XML document which lists loaded libraries and their SVR4 linker parameters. For each library on SVR4 target, the following parameters are reported: - `name', the absolute file name from the `l_name' field of `struct link_map'. - `lm' with address of `struct link_map' used for TLS (Thread Local Storage) access. - `l_addr', the displacement as read from the field `l_addr' of `struct link_map'. For prelinked libraries this is not an absolute memory address. It is a displacement of absolute memory address against address the file was prelinked to during the library load. - `l_ld', which is memory address of the `PT_DYNAMIC' segment Additionally the single `main-lm' attribute specifies address of `struct link_map' used for the main executable. This parameter is used for TLS access and its presence is optional. GDB must be linked with the Expat library to support XML SVR4 library lists. *Note Expat::. A simple memory map, with two loaded libraries (which do not use prelink), looks like this: The format of an SVR4 library list is described by this DTD:  File: gdb.info, Node: Memory Map Format, Next: Thread List Format, Prev: Library List Format for SVR4 Targets, Up: Remote Protocol E.16 Memory Map Format ====================== To be able to write into flash memory, GDB needs to obtain a memory map from the target. This section describes the format of the memory map. The memory map is obtained using the `qXfer:memory-map:read' (*note qXfer memory map read::) packet and is an XML document that lists memory regions. GDB must be linked with the Expat library to support XML memory maps. *Note Expat::. The top-level structure of the document is shown below: region... Each region can be either: * A region of RAM starting at ADDR and extending for LENGTH bytes from there: * A region of read-only memory: * A region of flash memory, with erasure blocks BLOCKSIZE bytes in length: BLOCKSIZE Regions must not overlap. GDB assumes that areas of memory not covered by the memory map are RAM, and uses the ordinary `M' and `X' packets to write to addresses in such ranges. The formal DTD for memory map format is given below:  File: gdb.info, Node: Thread List Format, Next: Traceframe Info Format, Prev: Memory Map Format, Up: Remote Protocol E.17 Thread List Format ======================= To efficiently update the list of threads and their attributes, GDB issues the `qXfer:threads:read' packet (*note qXfer threads read::) and obtains the XML document with the following structure: ... description ... Each `thread' element must have the `id' attribute that identifies the thread (*note thread-id syntax::). The `core' attribute, if present, specifies which processor core the thread was last executing on. The content of the of `thread' element is interpreted as human-readable auxilliary information.  File: gdb.info, Node: Traceframe Info Format, Next: Branch Trace Format, Prev: Thread List Format, Up: Remote Protocol E.18 Traceframe Info Format =========================== To be able to know which objects in the inferior can be examined when inspecting a tracepoint hit, GDB needs to obtain the list of memory ranges, registers and trace state variables that have been collected in a traceframe. This list is obtained using the `qXfer:traceframe-info:read' (*note qXfer traceframe info read::) packet and is an XML document. GDB must be linked with the Expat library to support XML traceframe info discovery. *Note Expat::. The top-level structure of the document is shown below: block... Each traceframe block can be either: * A region of collected memory starting at ADDR and extending for LENGTH bytes from there: The formal DTD for the traceframe info format is given below:  File: gdb.info, Node: Branch Trace Format, Prev: Traceframe Info Format, Up: Remote Protocol E.19 Branch Trace Format ======================== In order to display the branch trace of an inferior thread, GDB needs to obtain the list of branches. This list is represented as list of sequential code blocks that are connected via branches. The code in each block has been executed sequentially. This list is obtained using the `qXfer:btrace:read' (*note qXfer btrace read::) packet and is an XML document. GDB must be linked with the Expat library to support XML traceframe info discovery. *Note Expat::. The top-level structure of the document is shown below: block... * A block of sequentially executed instructions starting at BEGIN and ending at END: The formal DTD for the branch trace format is given below:  File: gdb.info, Node: Agent Expressions, Next: Target Descriptions, Prev: Remote Protocol, Up: Top Appendix F The GDB Agent Expression Mechanism ********************************************* In some applications, it is not feasible for the debugger to interrupt the program's execution long enough for the developer to learn anything helpful about its behavior. If the program's correctness depends on its real-time behavior, delays introduced by a debugger might cause the program to fail, even when the code itself is correct. It is useful to be able to observe the program's behavior without interrupting it. Using GDB's `trace' and `collect' commands, the user can specify locations in the program, and arbitrary expressions to evaluate when those locations are reached. Later, using the `tfind' command, she can examine the values those expressions had when the program hit the trace points. The expressions may also denote objects in memory -- structures or arrays, for example -- whose values GDB should record; while visiting a particular tracepoint, the user may inspect those objects as if they were in memory at that moment. However, because GDB records these values without interacting with the user, it can do so quickly and unobtrusively, hopefully not disturbing the program's behavior. When GDB is debugging a remote target, the GDB "agent" code running on the target computes the values of the expressions itself. To avoid having a full symbolic expression evaluator on the agent, GDB translates expressions in the source language into a simpler bytecode language, and then sends the bytecode to the agent; the agent then executes the bytecode, and records the values for GDB to retrieve later. The bytecode language is simple; there are forty-odd opcodes, the bulk of which are the usual vocabulary of C operands (addition, subtraction, shifts, and so on) and various sizes of literals and memory reference operations. The bytecode interpreter operates strictly on machine-level values -- various sizes of integers and floating point numbers -- and requires no information about types or symbols; thus, the interpreter's internal data structures are simple, and each bytecode requires only a few native machine instructions to implement it. The interpreter is small, and strict limits on the memory and time required to evaluate an expression are easy to determine, making it suitable for use by the debugging agent in real-time applications. * Menu: * General Bytecode Design:: Overview of the interpreter. * Bytecode Descriptions:: What each one does. * Using Agent Expressions:: How agent expressions fit into the big picture. * Varying Target Capabilities:: How to discover what the target can do. * Rationale:: Why we did it this way.  File: gdb.info, Node: General Bytecode Design, Next: Bytecode Descriptions, Up: Agent Expressions F.1 General Bytecode Design =========================== The agent represents bytecode expressions as an array of bytes. Each instruction is one byte long (thus the term "bytecode"). Some instructions are followed by operand bytes; for example, the `goto' instruction is followed by a destination for the jump. The bytecode interpreter is a stack-based machine; most instructions pop their operands off the stack, perform some operation, and push the result back on the stack for the next instruction to consume. Each element of the stack may contain either a integer or a floating point value; these values are as many bits wide as the largest integer that can be directly manipulated in the source language. Stack elements carry no record of their type; bytecode could push a value as an integer, then pop it as a floating point value. However, GDB will not generate code which does this. In C, one might define the type of a stack element as follows: union agent_val { LONGEST l; DOUBLEST d; }; where `LONGEST' and `DOUBLEST' are `typedef' names for the largest integer and floating point types on the machine. By the time the bytecode interpreter reaches the end of the expression, the value of the expression should be the only value left on the stack. For tracing applications, `trace' bytecodes in the expression will have recorded the necessary data, and the value on the stack may be discarded. For other applications, like conditional breakpoints, the value may be useful. Separate from the stack, the interpreter has two registers: `pc' The address of the next bytecode to execute. `start' The address of the start of the bytecode expression, necessary for interpreting the `goto' and `if_goto' instructions. Neither of these registers is directly visible to the bytecode language itself, but they are useful for defining the meanings of the bytecode operations. There are no instructions to perform side effects on the running program, or call the program's functions; we assume that these expressions are only used for unobtrusive debugging, not for patching the running code. Most bytecode instructions do not distinguish between the various sizes of values, and operate on full-width values; the upper bits of the values are simply ignored, since they do not usually make a difference to the value computed. The exceptions to this rule are: memory reference instructions (`ref'N) There are distinct instructions to fetch different word sizes from memory. Once on the stack, however, the values are treated as full-size integers. They may need to be sign-extended; the `ext' instruction exists for this purpose. the sign-extension instruction (`ext' N) These clearly need to know which portion of their operand is to be extended to occupy the full length of the word. If the interpreter is unable to evaluate an expression completely for some reason (a memory location is inaccessible, or a divisor is zero, for example), we say that interpretation "terminates with an error". This means that the problem is reported back to the interpreter's caller in some helpful way. In general, code using agent expressions should assume that they may attempt to divide by zero, fetch arbitrary memory locations, and misbehave in other ways. Even complicated C expressions compile to a few bytecode instructions; for example, the expression `x + y * z' would typically produce code like the following, assuming that `x' and `y' live in registers, and `z' is a global variable holding a 32-bit `int': reg 1 reg 2 const32 address of z ref32 ext 32 mul add end In detail, these mean: `reg 1' Push the value of register 1 (presumably holding `x') onto the stack. `reg 2' Push the value of register 2 (holding `y'). `const32 address of z' Push the address of `z' onto the stack. `ref32' Fetch a 32-bit word from the address at the top of the stack; replace the address on the stack with the value. Thus, we replace the address of `z' with `z''s value. `ext 32' Sign-extend the value on the top of the stack from 32 bits to full length. This is necessary because `z' is a signed integer. `mul' Pop the top two numbers on the stack, multiply them, and push their product. Now the top of the stack contains the value of the expression `y * z'. `add' Pop the top two numbers, add them, and push the sum. Now the top of the stack contains the value of `x + y * z'. `end' Stop executing; the value left on the stack top is the value to be recorded.  File: gdb.info, Node: Bytecode Descriptions, Next: Using Agent Expressions, Prev: General Bytecode Design, Up: Agent Expressions F.2 Bytecode Descriptions ========================= Each bytecode description has the following form: `add' (0x02): A B => A+B Pop the top two stack items, A and B, as integers; push their sum, as an integer. In this example, `add' is the name of the bytecode, and `(0x02)' is the one-byte value used to encode the bytecode, in hexadecimal. The phrase "A B => A+B" shows the stack before and after the bytecode executes. Beforehand, the stack must contain at least two values, A and B; since the top of the stack is to the right, B is on the top of the stack, and A is underneath it. After execution, the bytecode will have popped A and B from the stack, and replaced them with a single value, A+B. There may be other values on the stack below those shown, but the bytecode affects only those shown. Here is another example: `const8' (0x22) N: => N Push the 8-bit integer constant N on the stack, without sign extension. In this example, the bytecode `const8' takes an operand N directly from the bytecode stream; the operand follows the `const8' bytecode itself. We write any such operands immediately after the name of the bytecode, before the colon, and describe the exact encoding of the operand in the bytecode stream in the body of the bytecode description. For the `const8' bytecode, there are no stack items given before the =>; this simply means that the bytecode consumes no values from the stack. If a bytecode consumes no values, or produces no values, the list on either side of the => may be empty. If a value is written as A, B, or N, then the bytecode treats it as an integer. If a value is written is ADDR, then the bytecode treats it as an address. We do not fully describe the floating point operations here; although this design can be extended in a clean way to handle floating point values, they are not of immediate interest to the customer, so we avoid describing them, to save time. `float' (0x01): => Prefix for floating-point bytecodes. Not implemented yet. `add' (0x02): A B => A+B Pop two integers from the stack, and push their sum, as an integer. `sub' (0x03): A B => A-B Pop two integers from the stack, subtract the top value from the next-to-top value, and push the difference. `mul' (0x04): A B => A*B Pop two integers from the stack, multiply them, and push the product on the stack. Note that, when one multiplies two N-bit numbers yielding another N-bit number, it is irrelevant whether the numbers are signed or not; the results are the same. `div_signed' (0x05): A B => A/B Pop two signed integers from the stack; divide the next-to-top value by the top value, and push the quotient. If the divisor is zero, terminate with an error. `div_unsigned' (0x06): A B => A/B Pop two unsigned integers from the stack; divide the next-to-top value by the top value, and push the quotient. If the divisor is zero, terminate with an error. `rem_signed' (0x07): A B => A MODULO B Pop two signed integers from the stack; divide the next-to-top value by the top value, and push the remainder. If the divisor is zero, terminate with an error. `rem_unsigned' (0x08): A B => A MODULO B Pop two unsigned integers from the stack; divide the next-to-top value by the top value, and push the remainder. If the divisor is zero, terminate with an error. `lsh' (0x09): A B => A< `(signed)'A>>B Pop two integers from the stack; let A be the next-to-top value, and B be the top value. Shift A right by B bits, inserting copies of the top bit at the high end, and push the result. `rsh_unsigned' (0x0b): A B => A>>B Pop two integers from the stack; let A be the next-to-top value, and B be the top value. Shift A right by B bits, inserting zero bits at the high end, and push the result. `log_not' (0x0e): A => !A Pop an integer from the stack; if it is zero, push the value one; otherwise, push the value zero. `bit_and' (0x0f): A B => A&B Pop two integers from the stack, and push their bitwise `and'. `bit_or' (0x10): A B => A|B Pop two integers from the stack, and push their bitwise `or'. `bit_xor' (0x11): A B => A^B Pop two integers from the stack, and push their bitwise exclusive-`or'. `bit_not' (0x12): A => ~A Pop an integer from the stack, and push its bitwise complement. `equal' (0x13): A B => A=B Pop two integers from the stack; if they are equal, push the value one; otherwise, push the value zero. `less_signed' (0x14): A B => A A A, sign-extended from N bits Pop an unsigned value from the stack; treating it as an N-bit twos-complement value, extend it to full length. This means that all bits to the left of bit N-1 (where the least significant bit is bit 0) are set to the value of bit N-1. Note that N may be larger than or equal to the width of the stack elements of the bytecode engine; in this case, the bytecode should have no effect. The number of source bits to preserve, N, is encoded as a single byte unsigned integer following the `ext' bytecode. `zero_ext' (0x2a) N: A => A, zero-extended from N bits Pop an unsigned value from the stack; zero all but the bottom N bits. This means that all bits to the left of bit N-1 (where the least significant bit is bit 0) are set to the value of bit N-1. The number of source bits to preserve, N, is encoded as a single byte unsigned integer following the `zero_ext' bytecode. `ref8' (0x17): ADDR => A `ref16' (0x18): ADDR => A `ref32' (0x19): ADDR => A `ref64' (0x1a): ADDR => A Pop an address ADDR from the stack. For bytecode `ref'N, fetch an N-bit value from ADDR, using the natural target endianness. Push the fetched value as an unsigned integer. Note that ADDR may not be aligned in any particular way; the `refN' bytecodes should operate correctly for any address. If attempting to access memory at ADDR would cause a processor exception of some sort, terminate with an error. `ref_float' (0x1b): ADDR => D `ref_double' (0x1c): ADDR => D `ref_long_double' (0x1d): ADDR => D `l_to_d' (0x1e): A => D `d_to_l' (0x1f): D => A Not implemented yet. `dup' (0x28): A => A A Push another copy of the stack's top element. `swap' (0x2b): A B => B A Exchange the top two items on the stack. `pop' (0x29): A => Discard the top value on the stack. `pick' (0x32) N: A ... B => A ... B A Duplicate an item from the stack and push it on the top of the stack. N, a single byte, indicates the stack item to copy. If N is zero, this is the same as `dup'; if N is one, it copies the item under the top item, etc. If N exceeds the number of items on the stack, terminate with an error. `rot' (0x33): A B C => C B A Rotate the top three items on the stack. `if_goto' (0x20) OFFSET: A => Pop an integer off the stack; if it is non-zero, branch to the given offset in the bytecode string. Otherwise, continue to the next instruction in the bytecode stream. In other words, if A is non-zero, set the `pc' register to `start' + OFFSET. Thus, an offset of zero denotes the beginning of the expression. The OFFSET is stored as a sixteen-bit unsigned value, stored immediately following the `if_goto' bytecode. It is always stored most significant byte first, regardless of the target's normal endianness. The offset is not guaranteed to fall at any particular alignment within the bytecode stream; thus, on machines where fetching a 16-bit on an unaligned address raises an exception, you should fetch the offset one byte at a time. `goto' (0x21) OFFSET: => Branch unconditionally to OFFSET; in other words, set the `pc' register to `start' + OFFSET. The offset is stored in the same way as for the `if_goto' bytecode. `const8' (0x22) N: => N `const16' (0x23) N: => N `const32' (0x24) N: => N `const64' (0x25) N: => N Push the integer constant N on the stack, without sign extension. To produce a small negative value, push a small twos-complement value, and then sign-extend it using the `ext' bytecode. The constant N is stored in the appropriate number of bytes following the `const'B bytecode. The constant N is always stored most significant byte first, regardless of the target's normal endianness. The constant is not guaranteed to fall at any particular alignment within the bytecode stream; thus, on machines where fetching a 16-bit on an unaligned address raises an exception, you should fetch N one byte at a time. `reg' (0x26) N: => A Push the value of register number N, without sign extension. The registers are numbered following GDB's conventions. The register number N is encoded as a 16-bit unsigned integer immediately following the `reg' bytecode. It is always stored most significant byte first, regardless of the target's normal endianness. The register number is not guaranteed to fall at any particular alignment within the bytecode stream; thus, on machines where fetching a 16-bit on an unaligned address raises an exception, you should fetch the register number one byte at a time. `getv' (0x2c) N: => V Push the value of trace state variable number N, without sign extension. The variable number N is encoded as a 16-bit unsigned integer immediately following the `getv' bytecode. It is always stored most significant byte first, regardless of the target's normal endianness. The variable number is not guaranteed to fall at any particular alignment within the bytecode stream; thus, on machines where fetching a 16-bit on an unaligned address raises an exception, you should fetch the register number one byte at a time. `setv' (0x2d) N: => V Set trace state variable number N to the value found on the top of the stack. The stack is unchanged, so that the value is readily available if the assignment is part of a larger expression. The handling of N is as described for `getv'. `trace' (0x0c): ADDR SIZE => Record the contents of the SIZE bytes at ADDR in a trace buffer, for later retrieval by GDB. `trace_quick' (0x0d) SIZE: ADDR => ADDR Record the contents of the SIZE bytes at ADDR in a trace buffer, for later retrieval by GDB. SIZE is a single byte unsigned integer following the `trace' opcode. This bytecode is equivalent to the sequence `dup const8 SIZE trace', but we provide it anyway to save space in bytecode strings. `trace16' (0x30) SIZE: ADDR => ADDR Identical to trace_quick, except that SIZE is a 16-bit big-endian unsigned integer, not a single byte. This should probably have been named `trace_quick16', for consistency. `tracev' (0x2e) N: => A Record the value of trace state variable number N in the trace buffer. The handling of N is as described for `getv'. `tracenz' (0x2f) ADDR SIZE => Record the bytes at ADDR in a trace buffer, for later retrieval by GDB. Stop at either the first zero byte, or when SIZE bytes have been recorded, whichever occurs first. `printf' (0x34) NUMARGS STRING => Do a formatted print, in the style of the C function `printf'). The value of NUMARGS is the number of arguments to expect on the stack, while STRING is the format string, prefixed with a two-byte length. The last byte of the string must be zero, and is included in the length. The format string includes escaped sequences just as it appears in C source, so for instance the format string `"\t%d\n"' is six characters long, and the output will consist of a tab character, a decimal number, and a newline. At the top of the stack, above the values to be printed, this bytecode will pop a "function" and "channel". If the function is nonzero, then the target may treat it as a function and call it, passing the channel as a first argument, as with the C function `fprintf'. If the function is zero, then the target may simply call a standard formatted print function of its choice. In all, this bytecode pops 2 + NUMARGS stack elements, and pushes nothing. `end' (0x27): => Stop executing bytecode; the result should be the top element of the stack. If the purpose of the expression was to compute an lvalue or a range of memory, then the next-to-top of the stack is the lvalue's address, and the top of the stack is the lvalue's size, in bytes.  File: gdb.info, Node: Using Agent Expressions, Next: Varying Target Capabilities, Prev: Bytecode Descriptions, Up: Agent Expressions F.3 Using Agent Expressions =========================== Agent expressions can be used in several different ways by GDB, and the debugger can generate different bytecode sequences as appropriate. One possibility is to do expression evaluation on the target rather than the host, such as for the conditional of a conditional tracepoint. In such a case, GDB compiles the source expression into a bytecode sequence that simply gets values from registers or memory, does arithmetic, and returns a result. Another way to use agent expressions is for tracepoint data collection. GDB generates a different bytecode sequence for collection; in addition to bytecodes that do the calculation, GDB adds `trace' bytecodes to save the pieces of memory that were used. * The user selects trace points in the program's code at which GDB should collect data. * The user specifies expressions to evaluate at each trace point. These expressions may denote objects in memory, in which case those objects' contents are recorded as the program runs, or computed values, in which case the values themselves are recorded. * GDB transmits the tracepoints and their associated expressions to the GDB agent, running on the debugging target. * The agent arranges to be notified when a trace point is hit. * When execution on the target reaches a trace point, the agent evaluates the expressions associated with that trace point, and records the resulting values and memory ranges. * Later, when the user selects a given trace event and inspects the objects and expression values recorded, GDB talks to the agent to retrieve recorded data as necessary to meet the user's requests. If the user asks to see an object whose contents have not been recorded, GDB reports an error.  File: gdb.info, Node: Varying Target Capabilities, Next: Rationale, Prev: Using Agent Expressions, Up: Agent Expressions F.4 Varying Target Capabilities =============================== Some targets don't support floating-point, and some would rather not have to deal with `long long' operations. Also, different targets will have different stack sizes, and different bytecode buffer lengths. Thus, GDB needs a way to ask the target about itself. We haven't worked out the details yet, but in general, GDB should be able to send the target a packet asking it to describe itself. The reply should be a packet whose length is explicit, so we can add new information to the packet in future revisions of the agent, without confusing old versions of GDB, and it should contain a version number. It should contain at least the following information: * whether floating point is supported * whether `long long' is supported * maximum acceptable size of bytecode stack * maximum acceptable length of bytecode expressions * which registers are actually available for collection * whether the target supports disabled tracepoints  File: gdb.info, Node: Rationale, Prev: Varying Target Capabilities, Up: Agent Expressions F.5 Rationale ============= Some of the design decisions apparent above are arguable. What about stack overflow/underflow? GDB should be able to query the target to discover its stack size. Given that information, GDB can determine at translation time whether a given expression will overflow the stack. But this spec isn't about what kinds of error-checking GDB ought to do. Why are you doing everything in LONGEST? Speed isn't important, but agent code size is; using LONGEST brings in a bunch of support code to do things like division, etc. So this is a serious concern. First, note that you don't need different bytecodes for different operand sizes. You can generate code without _knowing_ how big the stack elements actually are on the target. If the target only supports 32-bit ints, and you don't send any 64-bit bytecodes, everything just works. The observation here is that the MIPS and the Alpha have only fixed-size registers, and you can still get C's semantics even though most instructions only operate on full-sized words. You just need to make sure everything is properly sign-extended at the right times. So there is no need for 32- and 64-bit variants of the bytecodes. Just implement everything using the largest size you support. GDB should certainly check to see what sizes the target supports, so the user can get an error earlier, rather than later. But this information is not necessary for correctness. Why don't you have `>' or `<=' operators? I want to keep the interpreter small, and we don't need them. We can combine the `less_' opcodes with `log_not', and swap the order of the operands, yielding all four asymmetrical comparison operators. For example, `(x <= y)' is `! (x > y)', which is `! (y < x)'. Why do you have `log_not'? Why do you have `ext'? Why do you have `zero_ext'? These are all easily synthesized from other instructions, but I expect them to be used frequently, and they're simple, so I include them to keep bytecode strings short. `log_not' is equivalent to `const8 0 equal'; it's used in half the relational operators. `ext N' is equivalent to `const8 S-N lsh const8 S-N rsh_signed', where S is the size of the stack elements; it follows `refM' and REG bytecodes when the value should be signed. See the next bulleted item. `zero_ext N' is equivalent to `constM MASK log_and'; it's used whenever we push the value of a register, because we can't assume the upper bits of the register aren't garbage. Why not have sign-extending variants of the `ref' operators? Because that would double the number of `ref' operators, and we need the `ext' bytecode anyway for accessing bitfields. Why not have constant-address variants of the `ref' operators? Because that would double the number of `ref' operators again, and `const32 ADDRESS ref32' is only one byte longer. Why do the `refN' operators have to support unaligned fetches? GDB will generate bytecode that fetches multi-byte values at unaligned addresses whenever the executable's debugging information tells it to. Furthermore, GDB does not know the value the pointer will have when GDB generates the bytecode, so it cannot determine whether a particular fetch will be aligned or not. In particular, structure bitfields may be several bytes long, but follow no alignment rules; members of packed structures are not necessarily aligned either. In general, there are many cases where unaligned references occur in correct C code, either at the programmer's explicit request, or at the compiler's discretion. Thus, it is simpler to make the GDB agent bytecodes work correctly in all circumstances than to make GDB guess in each case whether the compiler did the usual thing. Why are there no side-effecting operators? Because our current client doesn't want them? That's a cheap answer. I think the real answer is that I'm afraid of implementing function calls. We should re-visit this issue after the present contract is delivered. Why aren't the `goto' ops PC-relative? The interpreter has the base address around anyway for PC bounds checking, and it seemed simpler. Why is there only one offset size for the `goto' ops? Offsets are currently sixteen bits. I'm not happy with this situation either: Suppose we have multiple branch ops with different offset sizes. As I generate code left-to-right, all my jumps are forward jumps (there are no loops in expressions), so I never know the target when I emit the jump opcode. Thus, I have to either always assume the largest offset size, or do jump relaxation on the code after I generate it, which seems like a big waste of time. I can imagine a reasonable expression being longer than 256 bytes. I can't imagine one being longer than 64k. Thus, we need 16-bit offsets. This kind of reasoning is so bogus, but relaxation is pathetic. The other approach would be to generate code right-to-left. Then I'd always know my offset size. That might be fun. Where is the function call bytecode? When we add side-effects, we should add this. Why does the `reg' bytecode take a 16-bit register number? Intel's IA-64 architecture has 128 general-purpose registers, and 128 floating-point registers, and I'm sure it has some random control registers. Why do we need `trace' and `trace_quick'? Because GDB needs to record all the memory contents and registers an expression touches. If the user wants to evaluate an expression `x->y->z', the agent must record the values of `x' and `x->y' as well as the value of `x->y->z'. Don't the `trace' bytecodes make the interpreter less general? They do mean that the interpreter contains special-purpose code, but that doesn't mean the interpreter can only be used for that purpose. If an expression doesn't use the `trace' bytecodes, they don't get in its way. Why doesn't `trace_quick' consume its arguments the way everything else does? In general, you do want your operators to consume their arguments; it's consistent, and generally reduces the amount of stack rearrangement necessary. However, `trace_quick' is a kludge to save space; it only exists so we needn't write `dup const8 SIZE trace' before every memory reference. Therefore, it's okay for it not to consume its arguments; it's meant for a specific context in which we know exactly what it should do with the stack. If we're going to have a kludge, it should be an effective kludge. Why does `trace16' exist? That opcode was added by the customer that contracted Cygnus for the data tracing work. I personally think it is unnecessary; objects that large will be quite rare, so it is okay to use `dup const16 SIZE trace' in those cases. Whatever we decide to do with `trace16', we should at least leave opcode 0x30 reserved, to remain compatible with the customer who added it.  File: gdb.info, Node: Target Descriptions, Next: Operating System Information, Prev: Agent Expressions, Up: Top Appendix G Target Descriptions ****************************** One of the challenges of using GDB to debug embedded systems is that there are so many minor variants of each processor architecture in use. It is common practice for vendors to start with a standard processor core -- ARM, PowerPC, or MIPS, for example -- and then make changes to adapt it to a particular market niche. Some architectures have hundreds of variants, available from dozens of vendors. This leads to a number of problems: * With so many different customized processors, it is difficult for the GDB maintainers to keep up with the changes. * Since individual variants may have short lifetimes or limited audiences, it may not be worthwhile to carry information about every variant in the GDB source tree. * When GDB does support the architecture of the embedded system at hand, the task of finding the correct architecture name to give the `set architecture' command can be error-prone. To address these problems, the GDB remote protocol allows a target system to not only identify itself to GDB, but to actually describe its own features. This lets GDB support processor variants it has never seen before -- to the extent that the descriptions are accurate, and that GDB understands them. GDB must be linked with the Expat library to support XML target descriptions. *Note Expat::. * Menu: * Retrieving Descriptions:: How descriptions are fetched from a target. * Target Description Format:: The contents of a target description. * Predefined Target Types:: Standard types available for target descriptions. * Standard Target Features:: Features GDB knows about.  File: gdb.info, Node: Retrieving Descriptions, Next: Target Description Format, Up: Target Descriptions G.1 Retrieving Descriptions =========================== Target descriptions can be read from the target automatically, or specified by the user manually. The default behavior is to read the description from the target. GDB retrieves it via the remote protocol using `qXfer' requests (*note qXfer: General Query Packets.). The ANNEX in the `qXfer' packet will be `target.xml'. The contents of the `target.xml' annex are an XML document, of the form described in *note Target Description Format::. Alternatively, you can specify a file to read for the target description. If a file is set, the target will not be queried. The commands to specify a file are: `set tdesc filename PATH' Read the target description from PATH. `unset tdesc filename' Do not read the XML target description from a file. GDB will use the description supplied by the current target. `show tdesc filename' Show the filename to read for a target description, if any.  File: gdb.info, Node: Target Description Format, Next: Predefined Target Types, Prev: Retrieving Descriptions, Up: Target Descriptions G.2 Target Description Format ============================= A target description annex is an XML (http://www.w3.org/XML/) document which complies with the Document Type Definition provided in the GDB sources in `gdb/features/gdb-target.dtd'. This means you can use generally available tools like `xmllint' to check that your feature descriptions are well-formed and valid. However, to help people unfamiliar with XML write descriptions for their targets, we also describe the grammar here. Target descriptions can identify the architecture of the remote target and (for some architectures) provide information about custom register sets. They can also identify the OS ABI of the remote target. GDB can use this information to autoconfigure for your target, or to warn you if you connect to an unsupported target. Here is a simple target description: i386:x86-64 This minimal description only says that the target uses the x86-64 architecture. A target description has the following overall form, with [ ] marking optional elements and ... marking repeatable elements. The elements are explained further below. [ARCHITECTURE] [OSABI] [COMPATIBLE] [FEATURE...] The description is generally insensitive to whitespace and line breaks, under the usual common-sense rules. The XML version declaration and document type declaration can generally be omitted (GDB does not require them), but specifying them may be useful for XML validation tools. The `version' attribute for `' may also be omitted, but we recommend including it; if future versions of GDB use an incompatible revision of `gdb-target.dtd', they will detect and report the version mismatch. G.2.1 Inclusion --------------- It can sometimes be valuable to split a target description up into several different annexes, either for organizational purposes, or to share files between different possible target descriptions. You can divide a description into multiple files by replacing any element of the target description with an inclusion directive of the form: When GDB encounters an element of this form, it will retrieve the named XML DOCUMENT, and replace the inclusion directive with the contents of that document. If the current description was read using `qXfer', then so will be the included document; DOCUMENT will be interpreted as the name of an annex. If the current description was read from a file, GDB will look for DOCUMENT as a file in the same directory where it found the original description. G.2.2 Architecture ------------------ An `' element has this form: ARCH ARCH is one of the architectures from the set accepted by `set architecture' (*note Specifying a Debugging Target: Targets.). G.2.3 OS ABI ------------ This optional field was introduced in GDB version 7.0. Previous versions of GDB ignore it. An `' element has this form: ABI-NAME ABI-NAME is an OS ABI name from the same selection accepted by `set osabi' (*note Configuring the Current ABI: ABI.). G.2.4 Compatible Architecture ----------------------------- This optional field was introduced in GDB version 7.0. Previous versions of GDB ignore it. A `' element has this form: ARCH ARCH is one of the architectures from the set accepted by `set architecture' (*note Specifying a Debugging Target: Targets.). A `' element is used to specify that the target is able to run binaries in some other than the main target architecture given by the `' element. For example, on the Cell Broadband Engine, the main architecture is `powerpc:common' or `powerpc:common64', but the system is able to run binaries in the `spu' architecture as well. The way to describe this capability with `' is as follows: powerpc:common spu G.2.5 Features -------------- Each `' describes some logical portion of the target system. Features are currently used to describe available CPU registers and the types of their contents. A `' element has this form: [TYPE...] REG... Each feature's name should be unique within the description. The name of a feature does not matter unless GDB has some special knowledge of the contents of that feature; if it does, the feature should have its standard name. *Note Standard Target Features::. G.2.6 Types ----------- Any register's value is a collection of bits which GDB must interpret. The default interpretation is a two's complement integer, but other types can be requested by name in the register description. Some predefined types are provided by GDB (*note Predefined Target Types::), and the description can define additional composite types. Each type element must have an `id' attribute, which gives a unique (within the containing `') name to the type. Types must be defined before they are used. Some targets offer vector registers, which can be treated as arrays of scalar elements. These types are written as `' elements, specifying the array element type, TYPE, and the number of elements, COUNT: If a register's value is usefully viewed in multiple ways, define it with a union type containing the useful representations. The `' element contains one or more `' elements, each of which has a NAME and a TYPE: ... If a register's value is composed from several separate values, define it with a structure type. There are two forms of the `' element; a `' element must either contain only bitfields or contain no bitfields. If the structure contains only bitfields, its total size in bytes must be specified, each bitfield must have an explicit start and end, and bitfields are automatically assigned an integer type. The field's START should be less than or equal to its END, and zero represents the least significant bit. ... If the structure contains no bitfields, then each field has an explicit type, and no implicit padding is added. ... If a register's value is a series of single-bit flags, define it with a flags type. The `' element has an explicit SIZE and contains one or more `' elements. Each field has a NAME, a START, and an END. Only single-bit flags are supported. ... G.2.7 Registers --------------- Each register is represented as an element with this form: The components are as follows: NAME The register's name; it must be unique within the target description. BITSIZE The register's size, in bits. REGNUM The register's number. If omitted, a register's number is one greater than that of the previous register (either in the current feature or in a preceding feature); the first register in the target description defaults to zero. This register number is used to read or write the register; e.g. it is used in the remote `p' and `P' packets, and registers appear in the `g' and `G' packets in order of increasing register number. SAVE-RESTORE Whether the register should be preserved across inferior function calls; this must be either `yes' or `no'. The default is `yes', which is appropriate for most registers except for some system control registers; this is not related to the target's ABI. TYPE The type of the register. TYPE may be a predefined type, a type defined in the current feature, or one of the special types `int' and `float'. `int' is an integer type of the correct size for BITSIZE, and `float' is a floating point type (in the architecture's normal floating point format) of the correct size for BITSIZE. The default is `int'. GROUP The register group to which this register belongs. GROUP must be either `general', `float', or `vector'. If no GROUP is specified, GDB will not display the register in `info registers'.  File: gdb.info, Node: Predefined Target Types, Next: Standard Target Features, Prev: Target Description Format, Up: Target Descriptions G.3 Predefined Target Types =========================== Type definitions in the self-description can build up composite types from basic building blocks, but can not define fundamental types. Instead, standard identifiers are provided by GDB for the fundamental types. The currently supported types are: `int8' `int16' `int32' `int64' `int128' Signed integer types holding the specified number of bits. `uint8' `uint16' `uint32' `uint64' `uint128' Unsigned integer types holding the specified number of bits. `code_ptr' `data_ptr' Pointers to unspecified code and data. The program counter and any dedicated return address register may be marked as code pointers; printing a code pointer converts it into a symbolic address. The stack pointer and any dedicated address registers may be marked as data pointers. `ieee_single' Single precision IEEE floating point. `ieee_double' Double precision IEEE floating point. `arm_fpa_ext' The 12-byte extended precision format used by ARM FPA registers. `i387_ext' The 10-byte extended precision format used by x87 registers. `i386_eflags' 32bit EFLAGS register used by x86. `i386_mxcsr' 32bit MXCSR register used by x86.  File: gdb.info, Node: Standard Target Features, Prev: Predefined Target Types, Up: Target Descriptions G.4 Standard Target Features ============================ A target description must contain either no registers or all the target's registers. If the description contains no registers, then GDB will assume a default register layout, selected based on the architecture. If the description contains any registers, the default layout will not be used; the standard registers must be described in the target description, in such a way that GDB can recognize them. This is accomplished by giving specific names to feature elements which contain standard registers. GDB will look for features with those names and verify that they contain the expected registers; if any known feature is missing required registers, or if any required feature is missing, GDB will reject the target description. You can add additional registers to any of the standard features -- GDB will display them just as if they were added to an unrecognized feature. This section lists the known features and their expected contents. Sample XML documents for these features are included in the GDB source tree, in the directory `gdb/features'. Names recognized by GDB should include the name of the company or organization which selected the name, and the overall architecture to which the feature applies; so e.g. the feature containing ARM core registers is named `org.gnu.gdb.arm.core'. The names of registers are not case sensitive for the purpose of recognizing standard features, but GDB will only display registers using the capitalization used in the description. * Menu: * AArch64 Features:: * ARM Features:: * i386 Features:: * MIPS Features:: * M68K Features:: * PowerPC Features:: * TIC6x Features::  File: gdb.info, Node: AArch64 Features, Next: ARM Features, Up: Standard Target Features G.4.1 AArch64 Features ---------------------- The `org.gnu.gdb.aarch64.core' feature is required for AArch64 targets. It should contain registers `x0' through `x30', `sp', `pc', and `cpsr'. The `org.gnu.gdb.aarch64.fpu' feature is optional. If present, it should contain registers `v0' through `v31', `fpsr', and `fpcr'.  File: gdb.info, Node: ARM Features, Next: i386 Features, Prev: AArch64 Features, Up: Standard Target Features G.4.2 ARM Features ------------------ The `org.gnu.gdb.arm.core' feature is required for non-M-profile ARM targets. It should contain registers `r0' through `r13', `sp', `lr', `pc', and `cpsr'. For M-profile targets (e.g. Cortex-M3), the `org.gnu.gdb.arm.core' feature is replaced by `org.gnu.gdb.arm.m-profile'. It should contain registers `r0' through `r13', `sp', `lr', `pc', and `xpsr'. The `org.gnu.gdb.arm.fpa' feature is optional. If present, it should contain registers `f0' through `f7' and `fps'. The `org.gnu.gdb.xscale.iwmmxt' feature is optional. If present, it should contain at least registers `wR0' through `wR15' and `wCGR0' through `wCGR3'. The `wCID', `wCon', `wCSSF', and `wCASF' registers are optional. The `org.gnu.gdb.arm.vfp' feature is optional. If present, it should contain at least registers `d0' through `d15'. If they are present, `d16' through `d31' should also be included. GDB will synthesize the single-precision registers from halves of the double-precision registers. The `org.gnu.gdb.arm.neon' feature is optional. It does not need to contain registers; it instructs GDB to display the VFP double-precision registers as vectors and to synthesize the quad-precision registers from pairs of double-precision registers. If this feature is present, `org.gnu.gdb.arm.vfp' must also be present and include 32 double-precision registers.  File: gdb.info, Node: i386 Features, Next: MIPS Features, Prev: ARM Features, Up: Standard Target Features G.4.3 i386 Features ------------------- The `org.gnu.gdb.i386.core' feature is required for i386/amd64 targets. It should describe the following registers: - `eax' through `edi' plus `eip' for i386 - `rax' through `r15' plus `rip' for amd64 - `eflags', `cs', `ss', `ds', `es', `fs', `gs' - `st0' through `st7' - `fctrl', `fstat', `ftag', `fiseg', `fioff', `foseg', `fooff' and `fop' The register sets may be different, depending on the target. The `org.gnu.gdb.i386.sse' feature is optional. It should describe registers: - `xmm0' through `xmm7' for i386 - `xmm0' through `xmm15' for amd64 - `mxcsr' The `org.gnu.gdb.i386.avx' feature is optional and requires the `org.gnu.gdb.i386.sse' feature. It should describe the upper 128 bits of YMM registers: - `ymm0h' through `ymm7h' for i386 - `ymm0h' through `ymm15h' for amd64 The `org.gnu.gdb.i386.linux' feature is optional. It should describe a single register, `orig_eax'.  File: gdb.info, Node: MIPS Features, Next: M68K Features, Prev: i386 Features, Up: Standard Target Features G.4.4 MIPS Features ------------------- The `org.gnu.gdb.mips.cpu' feature is required for MIPS targets. It should contain registers `r0' through `r31', `lo', `hi', and `pc'. They may be 32-bit or 64-bit depending on the target. The `org.gnu.gdb.mips.cp0' feature is also required. It should contain at least the `status', `badvaddr', and `cause' registers. They may be 32-bit or 64-bit depending on the target. The `org.gnu.gdb.mips.fpu' feature is currently required, though it may be optional in a future version of GDB. It should contain registers `f0' through `f31', `fcsr', and `fir'. They may be 32-bit or 64-bit depending on the target. The `org.gnu.gdb.mips.dsp' feature is optional. It should contain registers `hi1' through `hi3', `lo1' through `lo3', and `dspctl'. The `dspctl' register should be 32-bit and the rest may be 32-bit or 64-bit depending on the target. The `org.gnu.gdb.mips.linux' feature is optional. It should contain a single register, `restart', which is used by the Linux kernel to control restartable syscalls.  File: gdb.info, Node: M68K Features, Next: PowerPC Features, Prev: MIPS Features, Up: Standard Target Features G.4.5 M68K Features ------------------- ``org.gnu.gdb.m68k.core'' ``org.gnu.gdb.coldfire.core'' ``org.gnu.gdb.fido.core'' One of those features must be always present. The feature that is present determines which flavor of m68k is used. The feature that is present should contain registers `d0' through `d7', `a0' through `a5', `fp', `sp', `ps' and `pc'. ``org.gnu.gdb.coldfire.fp'' This feature is optional. If present, it should contain registers `fp0' through `fp7', `fpcontrol', `fpstatus' and `fpiaddr'.  File: gdb.info, Node: PowerPC Features, Next: TIC6x Features, Prev: M68K Features, Up: Standard Target Features G.4.6 PowerPC Features ---------------------- The `org.gnu.gdb.power.core' feature is required for PowerPC targets. It should contain registers `r0' through `r31', `pc', `msr', `cr', `lr', `ctr', and `xer'. They may be 32-bit or 64-bit depending on the target. The `org.gnu.gdb.power.fpu' feature is optional. It should contain registers `f0' through `f31' and `fpscr'. The `org.gnu.gdb.power.altivec' feature is optional. It should contain registers `vr0' through `vr31', `vscr', and `vrsave'. The `org.gnu.gdb.power.vsx' feature is optional. It should contain registers `vs0h' through `vs31h'. GDB will combine these registers with the floating point registers (`f0' through `f31') and the altivec registers (`vr0' through `vr31') to present the 128-bit wide registers `vs0' through `vs63', the set of vector registers for POWER7. The `org.gnu.gdb.power.spe' feature is optional. It should contain registers `ev0h' through `ev31h', `acc', and `spefscr'. SPE targets should provide 32-bit registers in `org.gnu.gdb.power.core' and provide the upper halves in `ev0h' through `ev31h'. GDB will combine these to present registers `ev0' through `ev31' to the user.  File: gdb.info, Node: TIC6x Features, Prev: PowerPC Features, Up: Standard Target Features G.4.7 TMS320C6x Features ------------------------ The `org.gnu.gdb.tic6x.core' feature is required for TMS320C6x targets. It should contain registers `A0' through `A15', registers `B0' through `B15', `CSR' and `PC'. The `org.gnu.gdb.tic6x.gp' feature is optional. It should contain registers `A16' through `A31' and `B16' through `B31'. The `org.gnu.gdb.tic6x.c6xp' feature is optional. It should contain registers `TSR', `ILC' and `RILC'.  File: gdb.info, Node: Operating System Information, Next: Trace File Format, Prev: Target Descriptions, Up: Top Appendix H Operating System Information *************************************** * Menu: * Process list:: Users of GDB often wish to obtain information about the state of the operating system running on the target--for example the list of processes, or the list of open files. This section describes the mechanism that makes it possible. This mechanism is similar to the target features mechanism (*note Target Descriptions::), but focuses on a different aspect of target. Operating system information is retrived from the target via the remote protocol, using `qXfer' requests (*note qXfer osdata read::). The object name in the request should be `osdata', and the ANNEX identifies the data to be fetched.  File: gdb.info, Node: Process list, Up: Operating System Information H.1 Process list ================ When requesting the process list, the ANNEX field in the `qXfer' request should be `processes'. The returned data is an XML document. The formal syntax of this document is defined in `gdb/features/osdata.dtd'. An example document is: 1 root /sbin/init 1,2,3 Each item should include a column whose name is `pid'. The value of that column should identify the process on the target. The `user' and `command' columns are optional, and will be displayed by GDB. The `cores' column, if present, should contain a comma-separated list of cores that this process is running on. Target may provide additional columns, which GDB currently ignores.  File: gdb.info, Node: Trace File Format, Next: Index Section Format, Prev: Operating System Information, Up: Top Appendix I Trace File Format **************************** The trace file comes in three parts: a header, a textual description section, and a trace frame section with binary data. The header has the form `\x7fTRACE0\n'. The first byte is `0x7f' so as to indicate that the file contains binary data, while the `0' is a version number that may have different values in the future. The description section consists of multiple lines of ASCII text separated by newline characters (`0xa'). The lines may include a variety of optional descriptive or context-setting information, such as tracepoint definitions or register set size. GDB will ignore any line that it does not recognize. An empty line marks the end of this section. The trace frame section consists of a number of consecutive frames. Each frame begins with a two-byte tracepoint number, followed by a four-byte size giving the amount of data in the frame. The data in the frame consists of a number of blocks, each introduced by a character indicating its type (at least register, memory, and trace state variable). The data in this section is raw binary, not a hexadecimal or other encoding; its endianness matches the target's endianness. `R BYTES' Register block. The number and ordering of bytes matches that of a `g' packet in the remote protocol. Note that these are the actual bytes, in target order and GDB register order, not a hexadecimal encoding. `M ADDRESS LENGTH BYTES...' Memory block. This is a contiguous block of memory, at the 8-byte address ADDRESS, with a 2-byte length LENGTH, followed by LENGTH bytes. `V NUMBER VALUE' Trace state variable block. This records the 8-byte signed value VALUE of trace state variable numbered NUMBER. Future enhancements of the trace file format may include additional types of blocks.  File: gdb.info, Node: Index Section Format, Next: Copying, Prev: Trace File Format, Up: Top Appendix J `.gdb_index' section format ************************************** This section documents the index section that is created by `save gdb-index' (*note Index Files::). The index section is DWARF-specific; some knowledge of DWARF is assumed in this description. The mapped index file format is designed to be directly `mmap'able on any architecture. In most cases, a datum is represented using a little-endian 32-bit integer value, called an `offset_type'. Big endian machines must byte-swap the values before using them. Exceptions to this rule are noted. The data is laid out such that alignment is always respected. A mapped index consists of several areas, laid out in order. 1. The file header. This is a sequence of values, of `offset_type' unless otherwise noted: 1. The version number, currently 8. Versions 1, 2 and 3 are obsolete. Version 4 uses a different hashing function from versions 5 and 6. Version 6 includes symbols for inlined functions, whereas versions 4 and 5 do not. Version 7 adds attributes to the CU indices in the symbol table. Version 8 specifies that symbols from DWARF type units (`DW_TAG_type_unit') refer to the type unit's symbol table and not the compilation unit (`DW_TAG_comp_unit') using the type. GDB will only read version 4, 5, or 6 indices by specifying `set use-deprecated-index-sections on'. GDB has a workaround for potentially broken version 7 indices so it is currently not flagged as deprecated. 2. The offset, from the start of the file, of the CU list. 3. The offset, from the start of the file, of the types CU list. Note that this area can be empty, in which case this offset will be equal to the next offset. 4. The offset, from the start of the file, of the address area. 5. The offset, from the start of the file, of the symbol table. 6. The offset, from the start of the file, of the constant pool. 2. The CU list. This is a sequence of pairs of 64-bit little-endian values, sorted by the CU offset. The first element in each pair is the offset of a CU in the `.debug_info' section. The second element in each pair is the length of that CU. References to a CU elsewhere in the map are done using a CU index, which is just the 0-based index into this table. Note that if there are type CUs, then conceptually CUs and type CUs form a single list for the purposes of CU indices. 3. The types CU list. This is a sequence of triplets of 64-bit little-endian values. In a triplet, the first value is the CU offset, the second value is the type offset in the CU, and the third value is the type signature. The types CU list is not sorted. 4. The address area. The address area consists of a sequence of address entries. Each address entry has three elements: 1. The low address. This is a 64-bit little-endian value. 2. The high address. This is a 64-bit little-endian value. Like `DW_AT_high_pc', the value is one byte beyond the end. 3. The CU index. This is an `offset_type' value. 5. The symbol table. This is an open-addressed hash table. The size of the hash table is always a power of 2. Each slot in the hash table consists of a pair of `offset_type' values. The first value is the offset of the symbol's name in the constant pool. The second value is the offset of the CU vector in the constant pool. If both values are 0, then this slot in the hash table is empty. This is ok because while 0 is a valid constant pool index, it cannot be a valid index for both a string and a CU vector. The hash value for a table entry is computed by applying an iterative hash function to the symbol's name. Starting with an initial value of `r = 0', each (unsigned) character `c' in the string is incorporated into the hash using the formula depending on the index version: Version 4 The formula is `r = r * 67 + c - 113'. Versions 5 to 7 The formula is `r = r * 67 + tolower (c) - 113'. The terminating `\0' is not incorporated into the hash. The step size used in the hash table is computed via `((hash * 17) & (size - 1)) | 1', where `hash' is the hash value, and `size' is the size of the hash table. The step size is used to find the next candidate slot when handling a hash collision. The names of C++ symbols in the hash table are canonicalized. We don't currently have a simple description of the canonicalization algorithm; if you intend to create new index sections, you must read the code. 6. The constant pool. This is simply a bunch of bytes. It is organized so that alignment is correct: CU vectors are stored first, followed by strings. A CU vector in the constant pool is a sequence of `offset_type' values. The first value is the number of CU indices in the vector. Each subsequent value is the index and symbol attributes of a CU in the CU list. This element in the hash table is used to indicate which CUs define the symbol and how the symbol is used. See below for the format of each CU index+attributes entry. A string in the constant pool is zero-terminated. Attributes were added to CU index values in `.gdb_index' version 7. If a symbol has multiple uses within a CU then there is one CU index+attributes value for each use. The format of each CU index+attributes entry is as follows (bit 0 = LSB): Bits 0-23 This is the index of the CU in the CU list. Bits 24-27 These bits are reserved for future purposes and must be zero. Bits 28-30 The kind of the symbol in the CU. 0 This value is reserved and should not be used. By reserving zero the full `offset_type' value is backwards compatible with previous versions of the index. 1 The symbol is a type. 2 The symbol is a variable or an enum value. 3 The symbol is a function. 4 Any other kind of symbol. 5,6,7 These values are reserved. Bit 31 This bit is zero if the value is global and one if it is static. The determination of whether a symbol is global or static is complicated. The authorative reference is the file `dwarf2read.c' in GDB sources. This pseudo-code describes the computation of a symbol's kind and global/static attributes in the index. is_external = get_attribute (die, DW_AT_external); language = get_attribute (cu_die, DW_AT_language); switch (die->tag) { case DW_TAG_typedef: case DW_TAG_base_type: case DW_TAG_subrange_type: kind = TYPE; is_static = 1; break; case DW_TAG_enumerator: kind = VARIABLE; is_static = (language != CPLUS && language != JAVA); break; case DW_TAG_subprogram: kind = FUNCTION; is_static = ! (is_external || language == ADA); break; case DW_TAG_constant: kind = VARIABLE; is_static = ! is_external; break; case DW_TAG_variable: kind = VARIABLE; is_static = ! is_external; break; case DW_TAG_namespace: kind = TYPE; is_static = 0; break; case DW_TAG_class_type: case DW_TAG_interface_type: case DW_TAG_structure_type: case DW_TAG_union_type: case DW_TAG_enumeration_type: kind = TYPE; is_static = (language != CPLUS && language != JAVA); break; default: assert (0); } gdb-doc-7.6.2/gdb/doc/gdbint.info0000644000175000017500000001022412250773371015516 0ustar zumbizumbiThis is gdbint.info, produced by makeinfo version 4.13 from ./gdbint.texinfo. INFO-DIR-SECTION Software development START-INFO-DIR-ENTRY * Gdb-Internals: (gdbint). The GNU debugger's internals. END-INFO-DIR-ENTRY Copyright (C) 1990-2013 Free Software Foundation, Inc. Contributed by Cygnus Solutions. Written by John Gilmore. Second Edition by Stan Shebs. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This file documents the internals of the GNU debugger GDB. Copyright (C) 1990-2013 Free Software Foundation, Inc. Contributed by Cygnus Solutions. Written by John Gilmore. Second Edition by Stan Shebs. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".  Indirect: gdbint.info-1: 1344 gdbint.info-2: 298220  Tag Table: (Indirect) Node: Top1344 Node: Summary2295 Node: Requirements2445 Node: Contributors3924 Node: Overall Structure5517 Node: Algorithms10540 Node: User Interface41982 Ref: UI-Independent Output43837 Ref: User Interface-Footnote-165827 Ref: User Interface-Footnote-265876 Node: libgdb66111 Node: Values70062 Node: Stack Frames72906 Node: Symbol Handling77888 Node: Language Support94693 Node: Host Definition99419 Node: Target Architecture Definition103356 Node: OS ABI Variant Handling104176 Node: Initialize New Architecture109021 Node: How an Architecture is Represented109372 Node: Looking Up an Existing Architecture111329 Node: Creating a New Architecture114248 Node: Registers and Memory116286 Node: Pointers and Addresses117078 Ref: Pointers and Addresses-Footnote-1123079 Node: Address Classes123322 Node: Register Representation126567 Node: Raw and Cooked Registers126941 Node: Register Architecture Functions & Variables128125 Node: Register Information Functions131734 Ref: Register Information Functions-Footnote-1137636 Node: Register and Memory Data138055 Node: Register Caching141204 Node: Frame Interpretation142740 Node: All About Stack Frames143146 Ref: All About Stack Frames-Footnote-1148497 Node: Frame Handling Terminology148729 Node: Prologue Caches151256 Node: Functions and Variable to Analyze Frames152937 Ref: frame_align155035 Node: Functions to Access Frame Data156549 Node: Analyzing Stacks---Frame Sniffers158840 Ref: Analyzing Stacks---Frame Sniffers-Footnote-1163490 Node: Inferior Call Setup163987 Node: About Dummy Frames164270 Node: Functions Creating Dummy Frames164896 Node: Adding support for debugging core files168953 Node: Defining Other Architecture Features169497 Ref: gdbarch_breakpoint_from_pc174344 Ref: gdbarch_stabs_argument_has_addr186978 Ref: gdbarch_push_dummy_call187225 Ref: gdbarch_push_dummy_code187821 Ref: gdbarch_return_value188887 Ref: gdbarch_dummy_id194524 Node: Adding a New Target195212 Node: Target Descriptions197679 Node: Target Descriptions Implementation198618 Node: Adding Target Described Register Support199992 Node: Target Vector Definition202938 Node: Managing Execution State203470 Node: Existing Targets205283 Node: Native Debugging207798 Node: Support Libraries211626 Node: Coding Standards223151 Node: Misc Guidelines231785 Node: Porting GDB250148 Node: Versions and Branches252026 Ref: Tags257982 Ref: experimental branch tags258313 Node: Start of New Year Procedure259045 Node: Releasing GDB260506 Node: Testsuite278738 Ref: Testsuite-Footnote-1293615 Node: Hints293733 Node: Getting Started294055 Node: Debugging GDB298220 Node: GDB Observers303348 Node: GNU Free Documentation License312727 Node: Concept Index337902 Node: Function and Variable Index361464  End Tag Table gdb-doc-7.6.2/gdb/doc/gdb.info-70000644000175000017500000043542412250773371015164 0ustar zumbizumbiThis is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo. INFO-DIR-SECTION Software development START-INFO-DIR-ENTRY * Gdb: (gdb). The GNU debugger. END-INFO-DIR-ENTRY Copyright (C) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom." This file documents the GNU debugger GDB. This is the Tenth Edition, of `Debugging with GDB: the GNU Source-Level Debugger' for GDB (GDB) Version 7.6.2. Copyright (C) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom."  File: gdb.info, Node: Command and Variable Index, Prev: Concept Index, Up: Top Command, Variable, and Function Index ************************************* [index] * Menu: * !: Shell Commands. (line 10) * # (a comment): Command Syntax. (line 38) * $_, convenience variable: Convenience Vars. (line 65) * $__, convenience variable: Convenience Vars. (line 74) * $_exitcode, convenience variable: Convenience Vars. (line 80) * $_memeq, convenience function: Convenience Funs. (line 14) * $_probe_arg, convenience variable: Static Probe Points. (line 46) * $_regex, convenience function: Convenience Funs. (line 18) * $_sdata, collect: Tracepoint Actions. (line 78) * $_sdata, inspect, convenience variable: Convenience Vars. (line 88) * $_siginfo, convenience variable: Convenience Vars. (line 94) * $_streq, convenience function: Convenience Funs. (line 24) * $_strlen, convenience function: Convenience Funs. (line 28) * $_thread, convenience variable: Threads. (line 116) * $_tlb, convenience variable: Convenience Vars. (line 100) * $bpnum, convenience variable: Set Breaks. (line 6) * $cdir, convenience variable: Source Path. (line 108) * $cwd, convenience variable: Source Path. (line 108) * $tpnum: Create and Delete Tracepoints. (line 123) * $trace_file: Tracepoint Variables. (line 16) * $trace_frame: Tracepoint Variables. (line 6) * $trace_func: Tracepoint Variables. (line 19) * $trace_line: Tracepoint Variables. (line 13) * $tracepoint: Tracepoint Variables. (line 10) * -ada-task-info: GDB/MI Ada Tasking Commands. (line 9) * -add-inferior: GDB/MI Miscellaneous Commands. (line 366) * -break-after: GDB/MI Breakpoint Commands. (line 11) * -break-commands: GDB/MI Breakpoint Commands. (line 56) * -break-condition: GDB/MI Breakpoint Commands. (line 90) * -break-delete: GDB/MI Breakpoint Commands. (line 127) * -break-disable: GDB/MI Breakpoint Commands. (line 161) * -break-enable: GDB/MI Breakpoint Commands. (line 197) * -break-info: GDB/MI Breakpoint Commands. (line 232) * -break-insert: GDB/MI Breakpoint Commands. (line 256) * -break-list: GDB/MI Breakpoint Commands. (line 352) * -break-passcount: GDB/MI Breakpoint Commands. (line 431) * -break-watch: GDB/MI Breakpoint Commands. (line 443) * -catch-load: GDB/MI Catchpoint Commands. (line 11) * -catch-unload: GDB/MI Catchpoint Commands. (line 38) * -data-disassemble: GDB/MI Data Manipulation. (line 12) * -data-evaluate-expression: GDB/MI Data Manipulation. (line 181) * -data-list-changed-registers: GDB/MI Data Manipulation. (line 219) * -data-list-register-names: GDB/MI Data Manipulation. (line 255) * -data-list-register-values: GDB/MI Data Manipulation. (line 295) * -data-read-memory: GDB/MI Data Manipulation. (line 385) * -data-read-memory-bytes: GDB/MI Data Manipulation. (line 492) * -data-write-memory-bytes: GDB/MI Data Manipulation. (line 567) * -enable-pretty-printing: GDB/MI Variable Objects. (line 116) * -enable-timings: GDB/MI Miscellaneous Commands. (line 462) * -environment-cd: GDB/MI Program Context. (line 33) * -environment-directory: GDB/MI Program Context. (line 56) * -environment-path: GDB/MI Program Context. (line 100) * -environment-pwd: GDB/MI Program Context. (line 141) * -exec-arguments: GDB/MI Program Context. (line 9) * -exec-continue: GDB/MI Program Execution. (line 13) * -exec-finish: GDB/MI Program Execution. (line 56) * -exec-interrupt: GDB/MI Program Execution. (line 99) * -exec-jump: GDB/MI Program Execution. (line 149) * -exec-next: GDB/MI Program Execution. (line 173) * -exec-next-instruction: GDB/MI Program Execution. (line 204) * -exec-return: GDB/MI Program Execution. (line 240) * -exec-run: GDB/MI Program Execution. (line 283) * -exec-step: GDB/MI Program Execution. (line 348) * -exec-step-instruction: GDB/MI Program Execution. (line 390) * -exec-until: GDB/MI Program Execution. (line 431) * -file-exec-and-symbols: GDB/MI File Commands. (line 12) * -file-exec-file: GDB/MI File Commands. (line 40) * -file-list-exec-source-file: GDB/MI File Commands. (line 67) * -file-list-exec-source-files: GDB/MI File Commands. (line 93) * -file-symbol-file: GDB/MI File Commands. (line 123) * -gdb-exit: GDB/MI Miscellaneous Commands. (line 9) * -gdb-set: GDB/MI Miscellaneous Commands. (line 31) * -gdb-show: GDB/MI Miscellaneous Commands. (line 54) * -gdb-version: GDB/MI Miscellaneous Commands. (line 77) * -inferior-tty-set: GDB/MI Miscellaneous Commands. (line 413) * -inferior-tty-show: GDB/MI Miscellaneous Commands. (line 436) * -info-os: GDB/MI Miscellaneous Commands. (line 294) * -interpreter-exec: GDB/MI Miscellaneous Commands. (line 388) * -list-features: GDB/MI Miscellaneous Commands. (line 111) * -list-target-features: GDB/MI Miscellaneous Commands. (line 160) * -list-thread-groups: GDB/MI Miscellaneous Commands. (line 186) * -stack-info-depth: GDB/MI Stack Manipulation. (line 35) * -stack-info-frame: GDB/MI Stack Manipulation. (line 9) * -stack-list-arguments: GDB/MI Stack Manipulation. (line 73) * -stack-list-frames: GDB/MI Stack Manipulation. (line 162) * -stack-list-locals: GDB/MI Stack Manipulation. (line 265) * -stack-list-variables: GDB/MI Stack Manipulation. (line 305) * -stack-select-frame: GDB/MI Stack Manipulation. (line 328) * -symbol-list-lines: GDB/MI Symbol Query. (line 9) * -target-attach: GDB/MI Target Manipulation. (line 9) * -target-detach: GDB/MI Target Manipulation. (line 36) * -target-disconnect: GDB/MI Target Manipulation. (line 61) * -target-download: GDB/MI Target Manipulation. (line 85) * -target-file-delete: GDB/MI File Transfer Commands. (line 57) * -target-file-get: GDB/MI File Transfer Commands. (line 33) * -target-file-put: GDB/MI File Transfer Commands. (line 9) * -target-select: GDB/MI Target Manipulation. (line 198) * -thread-info: GDB/MI Thread Commands. (line 9) * -thread-list-ids: GDB/MI Thread Commands. (line 90) * -thread-select: GDB/MI Thread Commands. (line 118) * -trace-define-variable: GDB/MI Tracepoint Commands. (line 83) * -trace-find: GDB/MI Tracepoint Commands. (line 12) * -trace-list-variables: GDB/MI Tracepoint Commands. (line 100) * -trace-save: GDB/MI Tracepoint Commands. (line 143) * -trace-start: GDB/MI Tracepoint Commands. (line 160) * -trace-status: GDB/MI Tracepoint Commands. (line 176) * -trace-stop: GDB/MI Tracepoint Commands. (line 248) * -var-assign: GDB/MI Variable Objects. (line 479) * -var-create: GDB/MI Variable Objects. (line 134) * -var-delete: GDB/MI Variable Objects. (line 223) * -var-evaluate-expression: GDB/MI Variable Objects. (line 458) * -var-info-expression: GDB/MI Variable Objects. (line 396) * -var-info-num-children: GDB/MI Variable Objects. (line 272) * -var-info-path-expression: GDB/MI Variable Objects. (line 420) * -var-info-type: GDB/MI Variable Objects. (line 383) * -var-list-children: GDB/MI Variable Objects. (line 288) * -var-set-format: GDB/MI Variable Objects. (line 236) * -var-set-frozen: GDB/MI Variable Objects. (line 623) * -var-set-update-range: GDB/MI Variable Objects. (line 649) * -var-set-visualizer: GDB/MI Variable Objects. (line 672) * -var-show-attributes: GDB/MI Variable Objects. (line 444) * -var-show-format: GDB/MI Variable Objects. (line 259) * -var-update: GDB/MI Variable Objects. (line 503) * @, referencing memory as an array: Arrays. (line 6) * ^connected: GDB/MI Result Records. (line 22) * ^done: GDB/MI Result Records. (line 9) * ^error: GDB/MI Result Records. (line 25) * ^exit: GDB/MI Result Records. (line 29) * ^running: GDB/MI Result Records. (line 14) * __init__ on TypePrinter: gdb.types. (line 84) * abort (C-g): Miscellaneous Commands. (line 10) * accept-line (Newline or Return): Commands For History. (line 6) * actions: Tracepoint Actions. (line 6) * add-auto-load-safe-path: Auto-loading safe path. (line 50) * add-inferior: Inferiors and Programs. (line 60) * add-shared-symbol-files: Files. (line 172) * add-symbol-file: Files. (line 113) * add-symbol-file-from-memory: Files. (line 162) * advance LOCATION: Continuing and Stepping. (line 181) * alias: Aliases. (line 21) * append: Dump/Restore Files. (line 35) * apropos: Help. (line 62) * Architecture.disassemble: Architectures In Python. (line 16) * Architecture.name: Architectures In Python. (line 13) * assf: Files. (line 172) * attach: Attach. (line 6) * attach&: Background Execution. (line 38) * awatch: Set Watchpoints. (line 83) * b (break): Set Breaks. (line 6) * backtrace: Backtrace. (line 11) * backward-char (C-b): Commands For Moving. (line 15) * backward-delete-char (Rubout): Commands For Text. (line 11) * backward-kill-line (C-x Rubout): Commands For Killing. (line 9) * backward-kill-word (M-): Commands For Killing. (line 24) * backward-word (M-b): Commands For Moving. (line 22) * beginning-of-history (M-<): Commands For History. (line 19) * beginning-of-line (C-a): Commands For Moving. (line 6) * bell-style: Readline Init File Syntax. (line 35) * bind-tty-special-chars: Readline Init File Syntax. (line 42) * Block.end: Blocks In Python. (line 43) * Block.function: Blocks In Python. (line 46) * Block.global_block: Blocks In Python. (line 56) * Block.is_global: Blocks In Python. (line 64) * Block.is_static: Blocks In Python. (line 68) * Block.is_valid: Blocks In Python. (line 30) * Block.start: Blocks In Python. (line 40) * Block.static_block: Blocks In Python. (line 60) * Block.superblock: Blocks In Python. (line 51) * BP_ACCESS_WATCHPOINT: Breakpoints In Python. (line 139) * BP_BREAKPOINT: Breakpoints In Python. (line 127) * BP_HARDWARE_WATCHPOINT: Breakpoints In Python. (line 133) * BP_READ_WATCHPOINT: Breakpoints In Python. (line 136) * BP_WATCHPOINT: Breakpoints In Python. (line 130) * break: Set Breaks. (line 6) * break ... task TASKNO (Ada): Ada Tasks. (line 135) * break ... thread THREADNO: Thread-Specific Breakpoints. (line 10) * break, and Objective-C: Method Names in Commands. (line 9) * break-range: PowerPC Embedded. (line 41) * breakpoint annotation: Annotations for Running. (line 47) * Breakpoint.__init__: Breakpoints In Python. (line 10) * Breakpoint.commands: Breakpoints In Python. (line 165) * Breakpoint.condition: Breakpoints In Python. (line 160) * Breakpoint.delete: Breakpoints In Python. (line 78) * Breakpoint.enabled: Breakpoints In Python. (line 83) * Breakpoint.expression: Breakpoints In Python. (line 154) * Breakpoint.hit_count: Breakpoints In Python. (line 143) * Breakpoint.ignore_count: Breakpoints In Python. (line 106) * Breakpoint.is_valid: Breakpoints In Python. (line 70) * Breakpoint.location: Breakpoints In Python. (line 148) * Breakpoint.number: Breakpoints In Python. (line 110) * Breakpoint.silent: Breakpoints In Python. (line 87) * Breakpoint.stop: Breakpoints In Python. (line 27) * Breakpoint.task: Breakpoints In Python. (line 100) * Breakpoint.thread: Breakpoints In Python. (line 95) * Breakpoint.type: Breakpoints In Python. (line 115) * Breakpoint.visible: Breakpoints In Python. (line 120) * BreakpointEvent.breakpoint: Events In Python. (line 110) * BreakpointEvent.breakpoints: Events In Python. (line 105) * breakpoints-invalid annotation: Invalidation. (line 13) * bt (backtrace): Backtrace. (line 11) * c (continue): Continuing and Stepping. (line 15) * c (SingleKey TUI key): TUI Single Key Mode. (line 10) * C-L: TUI Keys. (line 65) * C-x 1: TUI Keys. (line 19) * C-x 2: TUI Keys. (line 26) * C-x A: TUI Keys. (line 12) * C-x a: TUI Keys. (line 11) * C-x C-a: TUI Keys. (line 10) * C-x o: TUI Keys. (line 34) * C-x s: TUI Keys. (line 41) * call: Calling. (line 10) * call-last-kbd-macro (C-x e): Keyboard Macros. (line 13) * capitalize-word (M-c): Commands For Text. (line 49) * catch: Set Catchpoints. (line 10) * cd: Working Directory. (line 16) * cdir: Source Path. (line 108) * character-search (C-]): Miscellaneous Commands. (line 41) * character-search-backward (M-C-]): Miscellaneous Commands. (line 46) * checkpoint: Checkpoint/Restart. (line 26) * clear: Delete Breaks. (line 21) * clear, and Objective-C: Method Names in Commands. (line 9) * clear-screen (C-l): Commands For Moving. (line 26) * clone-inferior: Inferiors and Programs. (line 67) * collect (tracepoints): Tracepoint Actions. (line 49) * colon-colon, in Modula-2: M2 Scope. (line 6) * Command.__init__: Commands In Python. (line 12) * Command.complete: Commands In Python. (line 73) * Command.dont_repeat: Commands In Python. (line 44) * Command.invoke: Commands In Python. (line 50) * COMMAND_BREAKPOINTS: Commands In Python. (line 145) * COMMAND_DATA: Commands In Python. (line 115) * COMMAND_FILES: Commands In Python. (line 126) * COMMAND_MAINTENANCE: Commands In Python. (line 169) * COMMAND_NONE: Commands In Python. (line 105) * COMMAND_OBSCURE: Commands In Python. (line 163) * COMMAND_RUNNING: Commands In Python. (line 109) * COMMAND_STACK: Commands In Python. (line 120) * COMMAND_STATUS: Commands In Python. (line 139) * COMMAND_SUPPORT: Commands In Python. (line 132) * COMMAND_TRACEPOINTS: Commands In Python. (line 151) * COMMAND_USER: Commands In Python. (line 157) * commands: Break Commands. (line 11) * commands annotation: Prompting. (line 27) * comment-begin: Readline Init File Syntax. (line 47) * compare-sections: Memory. (line 129) * complete: Help. (line 77) * complete (): Commands For Completion. (line 6) * COMPLETE_COMMAND: Commands In Python. (line 190) * COMPLETE_FILENAME: Commands In Python. (line 183) * COMPLETE_LOCATION: Commands In Python. (line 186) * COMPLETE_NONE: Commands In Python. (line 180) * COMPLETE_SYMBOL: Commands In Python. (line 194) * completion-display-width: Readline Init File Syntax. (line 52) * completion-ignore-case: Readline Init File Syntax. (line 59) * completion-map-case: Readline Init File Syntax. (line 64) * completion-prefix-display-length: Readline Init File Syntax. (line 70) * completion-query-items: Readline Init File Syntax. (line 77) * condition: Conditions. (line 58) * continue: Continuing and Stepping. (line 15) * continue&: Background Execution. (line 53) * convert-meta: Readline Init File Syntax. (line 87) * copy-backward-word (): Commands For Killing. (line 49) * copy-forward-word (): Commands For Killing. (line 54) * copy-region-as-kill (): Commands For Killing. (line 45) * core-file: Files. (line 97) * Ctrl-o (operate-and-get-next): Command Syntax. (line 42) * cwd: Source Path. (line 108) * d (delete): Delete Breaks. (line 41) * d (SingleKey TUI key): TUI Single Key Mode. (line 13) * debug_chaos: M32R/D. (line 50) * define: Define. (line 37) * delete: Delete Breaks. (line 41) * delete checkpoint CHECKPOINT-ID: Checkpoint/Restart. (line 56) * delete display: Auto Display. (line 45) * delete mem: Memory Region Attributes. (line 34) * delete tracepoint: Create and Delete Tracepoints. (line 126) * delete tvariable: Trace State Variables. (line 42) * delete-char (C-d): Commands For Text. (line 6) * delete-char-or-list (): Commands For Completion. (line 39) * delete-horizontal-space (): Commands For Killing. (line 37) * detach: Attach. (line 36) * detach (remote): Connecting. (line 91) * detach inferiors INFNO...: Inferiors and Programs. (line 97) * digit-argument (M-0, M-1, ... M--): Numeric Arguments. (line 6) * dir: Source Path. (line 39) * directory: Source Path. (line 39) * dis (disable): Disabling. (line 41) * disable: Disabling. (line 41) * disable display: Auto Display. (line 56) * disable mem: Memory Region Attributes. (line 38) * disable pretty-printer: Pretty-Printer Commands. (line 20) * disable tracepoint: Enable and Disable Tracepoints. (line 9) * disable type-printer: Symbols. (line 246) * disable-completion: Readline Init File Syntax. (line 93) * disassemble: Machine Code. (line 36) * disconnect: Connecting. (line 98) * display: Auto Display. (line 23) * dll-symbols: Cygwin Native. (line 38) * do (down): Selection. (line 40) * do-uppercase-version (M-a, M-b, M-X, ...): Miscellaneous Commands. (line 14) * document: Define. (line 49) * dont-repeat: Define. (line 61) * Down: TUI Keys. (line 56) * down: Selection. (line 40) * down-silently: Selection. (line 64) * downcase-word (M-l): Commands For Text. (line 45) * dprintf: Dynamic Printf. (line 26) * dprintf-style agent: Dynamic Printf. (line 46) * dprintf-style call: Dynamic Printf. (line 42) * dprintf-style gdb: Dynamic Printf. (line 39) * dump: Dump/Restore Files. (line 13) * dump-functions (): Miscellaneous Commands. (line 70) * dump-macros (): Miscellaneous Commands. (line 82) * dump-variables (): Miscellaneous Commands. (line 76) * e (edit): Edit. (line 6) * echo: Output. (line 12) * edit: Edit. (line 6) * editing-mode: Readline Init File Syntax. (line 98) * else: Command Files. (line 75) * enable: Disabling. (line 48) * enable display: Auto Display. (line 65) * enable mem: Memory Region Attributes. (line 42) * enable pretty-printer: Pretty-Printer Commands. (line 25) * enable tracepoint: Enable and Disable Tracepoints. (line 19) * enable type-printer: Symbols. (line 246) * enable-keypad: Readline Init File Syntax. (line 109) * enabled: Type Printing API. (line 14) * end (breakpoint commands): Break Commands. (line 11) * end (if/else/while commands): Command Files. (line 104) * end (user-defined commands): Define. (line 49) * end-kbd-macro (C-x )): Keyboard Macros. (line 9) * end-of-history (M->): Commands For History. (line 22) * end-of-line (C-e): Commands For Moving. (line 9) * error annotation: Errors. (line 10) * error-begin annotation: Errors. (line 22) * eval: Output. (line 117) * EventRegistry.connect: Events In Python. (line 20) * EventRegistry.disconnect: Events In Python. (line 24) * exceptionHandler: Bootstrapping. (line 38) * exchange-point-and-mark (C-x C-x): Miscellaneous Commands. (line 36) * exec-file: Files. (line 39) * exited annotation: Annotations for Running. (line 18) * ExitedEvent: Events In Python. (line 76) * ExitedEvent.exit_code: Events In Python. (line 70) * expand-tilde: Readline Init File Syntax. (line 120) * explore: Data. (line 36) * f (frame): Selection. (line 11) * f (SingleKey TUI key): TUI Single Key Mode. (line 16) * fg (resume foreground execution): Continuing and Stepping. (line 15) * file: Files. (line 16) * fin (finish): Continuing and Stepping. (line 110) * find: Searching Memory. (line 9) * finish: Continuing and Stepping. (line 110) * finish&: Background Execution. (line 56) * FinishBreakpoint.__init__: Finish Breakpoints in Python. (line 15) * FinishBreakpoint.out_of_scope: Finish Breakpoints in Python. (line 22) * FinishBreakpoint.return_value: Finish Breakpoints in Python. (line 39) * flush_i_cache: Bootstrapping. (line 60) * flushregs: Maintenance Commands. (line 224) * fo (forward-search): Search. (line 9) * focus: TUI Commands. (line 40) * forward-backward-delete-char (): Commands For Text. (line 15) * forward-char (C-f): Commands For Moving. (line 12) * forward-search: Search. (line 9) * forward-search-history (C-s): Commands For History. (line 30) * forward-word (M-f): Commands For Moving. (line 18) * frame, command: Frames. (line 45) * frame, selecting: Selection. (line 11) * Frame.architecture: Frames In Python. (line 47) * Frame.block: Frames In Python. (line 128) * Frame.find_sal: Frames In Python. (line 141) * Frame.function: Frames In Python. (line 131) * Frame.is_valid: Frames In Python. (line 37) * Frame.name: Frames In Python. (line 43) * Frame.newer: Frames In Python. (line 138) * Frame.older: Frames In Python. (line 135) * Frame.pc: Frames In Python. (line 125) * Frame.read_var: Frames In Python. (line 145) * Frame.select: Frames In Python. (line 153) * Frame.type: Frames In Python. (line 51) * Frame.unwind_stop_reason: Frames In Python. (line 78) * frames-invalid annotation: Invalidation. (line 9) * ftrace: Create and Delete Tracepoints. (line 51) * Function: Functions In Python. (line 6) * Function.__init__: Functions In Python. (line 11) * Function.invoke: Functions In Python. (line 21) * gcore: Core File Generation. (line 18) * gdb.Block: Blocks In Python. (line 6) * gdb.block_for_pc: Blocks In Python. (line 22) * gdb.BP_ACCESS_WATCHPOINT: Breakpoints In Python. (line 139) * gdb.BP_BREAKPOINT: Breakpoints In Python. (line 127) * gdb.BP_HARDWARE_WATCHPOINT: Breakpoints In Python. (line 133) * gdb.BP_READ_WATCHPOINT: Breakpoints In Python. (line 136) * gdb.BP_WATCHPOINT: Breakpoints In Python. (line 130) * gdb.Breakpoint: Breakpoints In Python. (line 6) * gdb.breakpoints: Basic Python. (line 31) * gdb.COMMAND_BREAKPOINTS: Commands In Python. (line 145) * gdb.COMMAND_DATA: Commands In Python. (line 115) * gdb.COMMAND_FILES: Commands In Python. (line 126) * gdb.COMMAND_MAINTENANCE: Commands In Python. (line 169) * gdb.COMMAND_NONE: Commands In Python. (line 105) * gdb.COMMAND_OBSCURE: Commands In Python. (line 163) * gdb.COMMAND_RUNNING: Commands In Python. (line 109) * gdb.COMMAND_STACK: Commands In Python. (line 120) * gdb.COMMAND_STATUS: Commands In Python. (line 139) * gdb.COMMAND_SUPPORT: Commands In Python. (line 132) * gdb.COMMAND_TRACEPOINTS: Commands In Python. (line 151) * gdb.COMMAND_USER: Commands In Python. (line 157) * gdb.COMPLETE_COMMAND: Commands In Python. (line 190) * gdb.COMPLETE_FILENAME: Commands In Python. (line 183) * gdb.COMPLETE_LOCATION: Commands In Python. (line 186) * gdb.COMPLETE_NONE: Commands In Python. (line 180) * gdb.COMPLETE_SYMBOL: Commands In Python. (line 194) * gdb.current_objfile: Objfiles In Python. (line 15) * gdb.current_progspace: Progspaces In Python. (line 14) * gdb.decode_line: Basic Python. (line 164) * gdb.default_visualizer: Pretty Printing API. (line 85) * gdb.error: Exception Handling. (line 22) * gdb.execute: Basic Python. (line 14) * gdb.find_pc_line: Basic Python. (line 69) * gdb.FinishBreakpoint: Finish Breakpoints in Python. (line 6) * gdb.flush: Basic Python. (line 128) * gdb.frame_stop_reason_string: Frames In Python. (line 30) * gdb.Function: Functions In Python. (line 6) * gdb.GdbError: Exception Handling. (line 42) * gdb.history: Basic Python. (line 46) * gdb.Inferior: Inferiors In Python. (line 6) * gdb.inferiors: Inferiors In Python. (line 15) * gdb.InferiorThread: Threads In Python. (line 6) * gdb.LazyString: Lazy Strings In Python. (line 6) * gdb.lookup_global_symbol: Symbols In Python. (line 33) * gdb.lookup_symbol: Symbols In Python. (line 13) * gdb.lookup_type: Types In Python. (line 11) * gdb.MemoryError: Exception Handling. (line 30) * gdb.newest_frame: Frames In Python. (line 26) * gdb.Objfile: Objfiles In Python. (line 6) * gdb.objfiles: Objfiles In Python. (line 21) * gdb.PARAM_AUTO_BOOLEAN: Parameters In Python. (line 93) * gdb.PARAM_BOOLEAN: Parameters In Python. (line 89) * gdb.PARAM_ENUM: Parameters In Python. (line 127) * gdb.PARAM_FILENAME: Parameters In Python. (line 119) * gdb.PARAM_INTEGER: Parameters In Python. (line 102) * gdb.PARAM_OPTIONAL_FILENAME: Parameters In Python. (line 116) * gdb.PARAM_STRING: Parameters In Python. (line 106) * gdb.PARAM_STRING_NOESCAPE: Parameters In Python. (line 112) * gdb.PARAM_UINTEGER: Parameters In Python. (line 98) * gdb.PARAM_ZINTEGER: Parameters In Python. (line 123) * gdb.Parameter: Parameters In Python. (line 6) * gdb.parameter: Basic Python. (line 35) * gdb.parse_and_eval: Basic Python. (line 58) * gdb.post_event: Basic Python. (line 76) * gdb.Progspace: Progspaces In Python. (line 6) * gdb.progspaces: Progspaces In Python. (line 18) * gdb.prompt_hook: Basic Python. (line 177) * gdb.PYTHONDIR: Basic Python. (line 11) * gdb.search_memory: Inferiors In Python. (line 61) * gdb.selected_frame: Frames In Python. (line 22) * gdb.selected_inferior: Inferiors In Python. (line 18) * gdb.selected_thread: Threads In Python. (line 13) * gdb.solib_name: Basic Python. (line 160) * gdb.STDERR: Basic Python. (line 118) * gdb.STDLOG: Basic Python. (line 121) * gdb.STDOUT: Basic Python. (line 115) * gdb.string_to_argv: Commands In Python. (line 62) * gdb.Symbol: Symbols In Python. (line 6) * gdb.SYMBOL_FUNCTIONS_DOMAIN: Symbols In Python. (line 132) * gdb.SYMBOL_LABEL_DOMAIN: Symbols In Python. (line 125) * gdb.SYMBOL_LOC_ARG: Symbols In Python. (line 154) * gdb.SYMBOL_LOC_BLOCK: Symbols In Python. (line 175) * gdb.SYMBOL_LOC_COMPUTED: Symbols In Python. (line 189) * gdb.SYMBOL_LOC_CONST: Symbols In Python. (line 145) * gdb.SYMBOL_LOC_CONST_BYTES: Symbols In Python. (line 178) * gdb.SYMBOL_LOC_LOCAL: Symbols In Python. (line 168) * gdb.SYMBOL_LOC_OPTIMIZED_OUT: Symbols In Python. (line 186) * gdb.SYMBOL_LOC_REF_ARG: Symbols In Python. (line 158) * gdb.SYMBOL_LOC_REGISTER: Symbols In Python. (line 151) * gdb.SYMBOL_LOC_REGPARM_ADDR: Symbols In Python. (line 163) * gdb.SYMBOL_LOC_STATIC: Symbols In Python. (line 148) * gdb.SYMBOL_LOC_TYPEDEF: Symbols In Python. (line 171) * gdb.SYMBOL_LOC_UNDEF: Symbols In Python. (line 143) * gdb.SYMBOL_LOC_UNRESOLVED: Symbols In Python. (line 181) * gdb.SYMBOL_STRUCT_DOMAIN: Symbols In Python. (line 122) * gdb.SYMBOL_TYPES_DOMAIN: Symbols In Python. (line 135) * gdb.SYMBOL_UNDEF_DOMAIN: Symbols In Python. (line 115) * gdb.SYMBOL_VAR_DOMAIN: Symbols In Python. (line 118) * gdb.SYMBOL_VARIABLES_DOMAIN: Symbols In Python. (line 128) * gdb.Symtab: Symbol Tables In Python. (line 6) * gdb.Symtab_and_line: Symbol Tables In Python. (line 6) * gdb.target_charset: Basic Python. (line 149) * gdb.target_wide_charset: Basic Python. (line 154) * gdb.Type: Types In Python. (line 6) * gdb.TYPE_CODE_ARRAY: Types In Python. (line 176) * gdb.TYPE_CODE_BITSTRING: Types In Python. (line 214) * gdb.TYPE_CODE_BOOL: Types In Python. (line 235) * gdb.TYPE_CODE_CHAR: Types In Python. (line 232) * gdb.TYPE_CODE_COMPLEX: Types In Python. (line 238) * gdb.TYPE_CODE_DECFLOAT: Types In Python. (line 247) * gdb.TYPE_CODE_ENUM: Types In Python. (line 185) * gdb.TYPE_CODE_ERROR: Types In Python. (line 217) * gdb.TYPE_CODE_FLAGS: Types In Python. (line 188) * gdb.TYPE_CODE_FLT: Types In Python. (line 197) * gdb.TYPE_CODE_FUNC: Types In Python. (line 191) * gdb.TYPE_CODE_INT: Types In Python. (line 194) * gdb.TYPE_CODE_INTERNAL_FUNCTION: Types In Python. (line 250) * gdb.TYPE_CODE_MEMBERPTR: Types In Python. (line 226) * gdb.TYPE_CODE_METHOD: Types In Python. (line 220) * gdb.TYPE_CODE_METHODPTR: Types In Python. (line 223) * gdb.TYPE_CODE_NAMESPACE: Types In Python. (line 244) * gdb.TYPE_CODE_PTR: Types In Python. (line 173) * gdb.TYPE_CODE_RANGE: Types In Python. (line 206) * gdb.TYPE_CODE_REF: Types In Python. (line 229) * gdb.TYPE_CODE_SET: Types In Python. (line 203) * gdb.TYPE_CODE_STRING: Types In Python. (line 209) * gdb.TYPE_CODE_STRUCT: Types In Python. (line 179) * gdb.TYPE_CODE_TYPEDEF: Types In Python. (line 241) * gdb.TYPE_CODE_UNION: Types In Python. (line 182) * gdb.TYPE_CODE_VOID: Types In Python. (line 200) * gdb.WP_ACCESS: Breakpoints In Python. (line 66) * gdb.WP_READ: Breakpoints In Python. (line 60) * gdb.WP_WRITE: Breakpoints In Python. (line 63) * gdb.write: Basic Python. (line 110) * gdb_init_reader: Writing JIT Debug Info Readers. (line 20) * gdbserver: Server. (line 6) * generate-core-file: Core File Generation. (line 18) * getDebugChar: Bootstrapping. (line 14) * gnu_debuglink_crc32: Separate Debug Files. (line 166) * h (help): Help. (line 9) * handle: Signals. (line 49) * handle_exception: Stub Contents. (line 15) * hbreak: Set Breaks. (line 62) * help: Help. (line 6) * help function: Convenience Funs. (line 35) * help target: Target Commands. (line 19) * help user-defined: Define. (line 66) * history-preserve-point: Readline Init File Syntax. (line 124) * history-search-backward (): Commands For History. (line 50) * history-search-forward (): Commands For History. (line 45) * history-size: Readline Init File Syntax. (line 130) * hook: Hooks. (line 6) * hookpost: Hooks. (line 11) * horizontal-scroll-mode: Readline Init File Syntax. (line 135) * htrace: OpenRISC 1000. (line 69) * hwatch: OpenRISC 1000. (line 59) * i (info): Help. (line 100) * if: Command Files. (line 75) * ignore: Conditions. (line 90) * INCLUDE_RDB: VxWorks. (line 33) * inferior INFNO: Inferiors and Programs. (line 49) * Inferior.is_valid: Inferiors In Python. (line 36) * Inferior.num: Inferiors In Python. (line 23) * Inferior.pid: Inferiors In Python. (line 26) * Inferior.read_memory: Inferiors In Python. (line 47) * Inferior.search_memory: Inferiors In Python. (line 62) * Inferior.threads: Inferiors In Python. (line 43) * Inferior.was_attached: Inferiors In Python. (line 30) * Inferior.write_memory: Inferiors In Python. (line 54) * InferiorThread.is_exited: Threads In Python. (line 60) * InferiorThread.is_running: Threads In Python. (line 57) * InferiorThread.is_stopped: Threads In Python. (line 54) * InferiorThread.is_valid: Threads In Python. (line 43) * InferiorThread.name: Threads In Python. (line 20) * InferiorThread.num: Threads In Python. (line 30) * InferiorThread.ptid: Threads In Python. (line 33) * InferiorThread.switch: Threads In Python. (line 50) * info: Help. (line 100) * info address: Symbols. (line 74) * info all-registers: Registers. (line 15) * info args: Frame Info. (line 51) * info auto-load: Auto-loading. (line 48) * info auto-load gdb-scripts: objfile-gdb.gdb file. (line 24) * info auto-load libthread-db: libthread_db.so.1 file. (line 30) * info auto-load local-gdbinit: Init File in the Current Directory. (line 22) * info auto-load python-scripts: Python Auto-loading. (line 24) * info auxv: OS Information. (line 21) * info breakpoints: Set Breaks. (line 128) * info checkpoints: Checkpoint/Restart. (line 31) * info classes: Symbols. (line 318) * info common: Special Fortran Commands. (line 9) * info copying: Help. (line 137) * info dcache: Caching Remote Data. (line 34) * info display: Auto Display. (line 78) * info dll: Cygwin Native. (line 35) * info dos: DJGPP Native. (line 15) * info extensions: Show. (line 34) * info f (info frame): Frame Info. (line 17) * info files: Files. (line 191) * info float: Floating Point Hardware. (line 9) * info frame: Frame Info. (line 17) * info frame, show the source language: Show. (line 15) * info functions: Symbols. (line 297) * info handle: Signals. (line 33) * info inferiors: Inferiors and Programs. (line 25) * info io_registers, AVR: AVR. (line 10) * info line: Machine Code. (line 14) * info line, and Objective-C: Method Names in Commands. (line 9) * info locals: Frame Info. (line 55) * info macro: Macros. (line 47) * info macros: Macros. (line 54) * info mem: Memory Region Attributes. (line 45) * info meminfo: SVR4 Process Information. (line 93) * info or1k spr: OpenRISC 1000. (line 20) * info os: OS Information. (line 38) * info os files: OS Information. (line 69) * info os modules: OS Information. (line 111) * info os msg: OS Information. (line 100) * info os processes: OS Information. (line 43) * info os procgroups: OS Information. (line 52) * info os semaphores: OS Information. (line 92) * info os shm: OS Information. (line 82) * info os sockets: OS Information. (line 75) * info os threads: OS Information. (line 62) * info pidlist: SVR4 Process Information. (line 89) * info pretty-printer: Pretty-Printer Commands. (line 6) * info probes: Static Probe Points. (line 30) * info proc: SVR4 Process Information. (line 19) * info program: Stopping. (line 18) * info record: Process Record and Replay. (line 157) * info registers: Registers. (line 11) * info scope: Symbols. (line 251) * info selectors: Symbols. (line 324) * info serial: DJGPP Native. (line 142) * info set: Help. (line 120) * info share: Files. (line 326) * info sharedlibrary: Files. (line 326) * info signals: Signals. (line 33) * info skip: Skipping Over Functions and Files. (line 56) * info source: Symbols. (line 272) * info source, show the source language: Show. (line 21) * info sources: Symbols. (line 291) * info spu: SPU. (line 10) * info stack: Backtrace. (line 34) * info static-tracepoint-markers: Listing Static Tracepoint Markers. (line 6) * info symbol: Symbols. (line 84) * info target: Files. (line 191) * info task TASKNO: Ada Tasks. (line 89) * info tasks: Ada Tasks. (line 9) * info terminal: Input/Output. (line 12) * info threads: Threads. (line 66) * info tp [N...]: Listing Tracepoints. (line 6) * info tracepoints [N...]: Listing Tracepoints. (line 6) * info tvariables: Trace State Variables. (line 37) * info type-printers: Symbols. (line 238) * info types: Symbols. (line 224) * info variables: Symbols. (line 309) * info vector: Vector Unit. (line 9) * info w32: Cygwin Native. (line 19) * info warranty: Help. (line 141) * info watchpoints [N...]: Set Watchpoints. (line 87) * info win: TUI Commands. (line 18) * init-if-undefined: Convenience Vars. (line 42) * input-meta: Readline Init File Syntax. (line 142) * insert-comment (M-#): Miscellaneous Commands. (line 60) * insert-completions (M-*): Commands For Completion. (line 18) * inspect: Data. (line 6) * instantiate on type_printer: Type Printing API. (line 24) * interpreter-exec: Interpreters. (line 43) * interrupt: Background Execution. (line 73) * isearch-terminators: Readline Init File Syntax. (line 149) * j (jump): Jumping. (line 10) * jit-reader-load: Using JIT Debug Info Readers. (line 6) * jit-reader-unload: Using JIT Debug Info Readers. (line 6) * jump: Jumping. (line 10) * jump, and Objective-C: Method Names in Commands. (line 9) * KeyboardInterrupt: Exception Handling. (line 34) * keymap: Readline Init File Syntax. (line 156) * kill: Kill Process. (line 6) * kill inferiors INFNO...: Inferiors and Programs. (line 103) * kill-line (C-k): Commands For Killing. (line 6) * kill-region (): Commands For Killing. (line 41) * kill-whole-line (): Commands For Killing. (line 15) * kill-word (M-d): Commands For Killing. (line 19) * kvm: BSD libkvm Interface. (line 24) * l (list): List. (line 6) * layout: TUI Commands. (line 21) * LazyString.address: Lazy Strings In Python. (line 27) * LazyString.encoding: Lazy Strings In Python. (line 37) * LazyString.length: Lazy Strings In Python. (line 31) * LazyString.type: Lazy Strings In Python. (line 44) * LazyString.value: Lazy Strings In Python. (line 21) * Left: TUI Keys. (line 59) * list: List. (line 6) * list, and Objective-C: Method Names in Commands. (line 9) * load FILENAME: Target Commands. (line 115) * loop_break: Command Files. (line 94) * loop_continue: Command Files. (line 98) * macro define: Macros. (line 59) * macro exp1: Macros. (line 36) * macro expand: Macros. (line 29) * macro list: Macros. (line 80) * macro undef: Macros. (line 74) * maint agent: Maintenance Commands. (line 12) * maint agent-eval: Maintenance Commands. (line 12) * maint agent-printf: Maintenance Commands. (line 27) * maint check-symtabs: Maintenance Commands. (line 90) * maint cplus first_component: Maintenance Commands. (line 93) * maint cplus namespace: Maintenance Commands. (line 96) * maint demangle: Maintenance Commands. (line 99) * maint deprecate: Maintenance Commands. (line 102) * maint dump-me: Maintenance Commands. (line 110) * maint info bfds: Maintenance Commands. (line 64) * maint info breakpoints: Maintenance Commands. (line 33) * maint info program-spaces: Inferiors and Programs. (line 138) * maint info psymtabs: Symbols. (line 367) * maint info sections: Files. (line 200) * maint info sol-threads: Threads. (line 98) * maint info symtabs: Symbols. (line 367) * maint internal-error: Maintenance Commands. (line 115) * maint internal-warning: Maintenance Commands. (line 115) * maint packet: Maintenance Commands. (line 155) * maint print architecture: Maintenance Commands. (line 161) * maint print c-tdesc: Maintenance Commands. (line 165) * maint print cooked-registers: Maintenance Commands. (line 188) * maint print dummy-frames: Maintenance Commands. (line 170) * maint print objfiles: Maintenance Commands. (line 227) * maint print psymbols: Symbols. (line 348) * maint print raw-registers: Maintenance Commands. (line 188) * maint print reggroups: Maintenance Commands. (line 208) * maint print register-groups: Maintenance Commands. (line 188) * maint print registers: Maintenance Commands. (line 188) * maint print remote-registers: Maintenance Commands. (line 188) * maint print section-scripts: Maintenance Commands. (line 232) * maint print statistics: Maintenance Commands. (line 239) * maint print symbols: Symbols. (line 348) * maint print target-stack: Maintenance Commands. (line 252) * maint print type: Maintenance Commands. (line 264) * maint print unwind, HPPA: HPPA. (line 17) * maint set dwarf2 always-disassemble: Maintenance Commands. (line 271) * maint set dwarf2 max-cache-age: Maintenance Commands. (line 293) * maint set internal-error: Maintenance Commands. (line 136) * maint set internal-warning: Maintenance Commands. (line 136) * maint set profile: Maintenance Commands. (line 307) * maint set show-all-tib: Maintenance Commands. (line 331) * maint set show-debug-regs: Maintenance Commands. (line 323) * maint show dwarf2 always-disassemble: Maintenance Commands. (line 271) * maint show dwarf2 max-cache-age: Maintenance Commands. (line 293) * maint show internal-error: Maintenance Commands. (line 136) * maint show internal-warning: Maintenance Commands. (line 136) * maint show profile: Maintenance Commands. (line 307) * maint show show-all-tib: Maintenance Commands. (line 331) * maint show show-debug-regs: Maintenance Commands. (line 323) * maint space: Maintenance Commands. (line 337) * maint time: Maintenance Commands. (line 344) * maint translate-address: Maintenance Commands. (line 357) * maint undeprecate: Maintenance Commands. (line 102) * make: Shell Commands. (line 21) * mark-modified-lines: Readline Init File Syntax. (line 169) * mark-symlinked-directories: Readline Init File Syntax. (line 174) * match-hidden-files: Readline Init File Syntax. (line 179) * may-insert-breakpoints: Observer Mode. (line 50) * may-insert-fast-tracepoints: Observer Mode. (line 69) * may-insert-tracepoints: Observer Mode. (line 59) * may-interrupt: Observer Mode. (line 79) * may-write-memory: Observer Mode. (line 41) * may-write-registers: Observer Mode. (line 32) * mem: Memory Region Attributes. (line 22) * memset: Bootstrapping. (line 70) * menu-complete (): Commands For Completion. (line 22) * menu-complete-backward (): Commands For Completion. (line 34) * menu-complete-display-prefix: Readline Init File Syntax. (line 186) * meta-flag: Readline Init File Syntax. (line 142) * monitor: Connecting. (line 105) * n (next): Continuing and Stepping. (line 78) * n (SingleKey TUI key): TUI Single Key Mode. (line 19) * name: Type Printing API. (line 19) * NewObjFileEvent.new_objfile: Events In Python. (line 120) * next: Continuing and Stepping. (line 78) * next&: Background Execution. (line 47) * next-history (C-n): Commands For History. (line 16) * nexti: Continuing and Stepping. (line 203) * nexti&: Background Execution. (line 50) * ni (nexti): Continuing and Stepping. (line 203) * non-incremental-forward-search-history (M-n): Commands For History. (line 40) * non-incremental-reverse-search-history (M-p): Commands For History. (line 35) * nosharedlibrary: Files. (line 341) * Objfile: Objfiles In Python. (line 6) * Objfile.filename: Objfiles In Python. (line 29) * Objfile.is_valid: Objfiles In Python. (line 46) * Objfile.pretty_printers: Objfiles In Python. (line 32) * Objfile.type_printers: Objfiles In Python. (line 40) * observer: Observer Mode. (line 22) * or1ksim: OpenRISC 1000. (line 16) * output: Output. (line 35) * output-meta: Readline Init File Syntax. (line 191) * overlay: Overlay Commands. (line 17) * overload-choice annotation: Prompting. (line 32) * overwrite-mode (): Commands For Text. (line 53) * page-completions: Readline Init File Syntax. (line 196) * PARAM_AUTO_BOOLEAN: Parameters In Python. (line 93) * PARAM_BOOLEAN: Parameters In Python. (line 89) * PARAM_ENUM: Parameters In Python. (line 127) * PARAM_FILENAME: Parameters In Python. (line 119) * PARAM_INTEGER: Parameters In Python. (line 102) * PARAM_OPTIONAL_FILENAME: Parameters In Python. (line 116) * PARAM_STRING: Parameters In Python. (line 106) * PARAM_STRING_NOESCAPE: Parameters In Python. (line 112) * PARAM_UINTEGER: Parameters In Python. (line 98) * PARAM_ZINTEGER: Parameters In Python. (line 123) * Parameter: Parameters In Python. (line 6) * Parameter.__init__: Parameters In Python. (line 20) * Parameter.get_set_string: Parameters In Python. (line 74) * Parameter.get_show_string: Parameters In Python. (line 80) * Parameter.set_doc: Parameters In Python. (line 54) * Parameter.show_doc: Parameters In Python. (line 60) * Parameter.value: Parameters In Python. (line 66) * passcount: Tracepoint Passcounts. (line 6) * path: Environment. (line 14) * PgDn: TUI Keys. (line 50) * PgUp: TUI Keys. (line 47) * pi: Python Commands. (line 9) * pmon, MIPS remote: MIPS Embedded. (line 132) * po (print-object): The Print Command with Objective-C. (line 6) * possible-completions (M-?): Commands For Completion. (line 11) * post-commands annotation: Prompting. (line 27) * post-overload-choice annotation: Prompting. (line 32) * post-prompt annotation: Prompting. (line 24) * post-prompt-for-continue annotation: Prompting. (line 40) * post-query annotation: Prompting. (line 36) * pre-commands annotation: Prompting. (line 27) * pre-overload-choice annotation: Prompting. (line 32) * pre-prompt annotation: Prompting. (line 24) * pre-prompt-for-continue annotation: Prompting. (line 40) * pre-query annotation: Prompting. (line 36) * prefix-meta (): Miscellaneous Commands. (line 18) * pretty_printer.children: Pretty Printing API. (line 12) * pretty_printer.display_hint: Pretty Printing API. (line 25) * pretty_printer.to_string: Pretty Printing API. (line 54) * previous-history (C-p): Commands For History. (line 12) * print: Data. (line 6) * print-object: The Print Command with Objective-C. (line 6) * printf: Output. (line 46) * proc-trace-entry: SVR4 Process Information. (line 85) * proc-trace-exit: SVR4 Process Information. (line 85) * proc-untrace-entry: SVR4 Process Information. (line 85) * proc-untrace-exit: SVR4 Process Information. (line 85) * Progspace: Progspaces In Python. (line 6) * Progspace.filename: Progspaces In Python. (line 25) * Progspace.pretty_printers: Progspaces In Python. (line 28) * Progspace.type_printers: Progspaces In Python. (line 36) * prompt annotation: Prompting. (line 24) * prompt-for-continue annotation: Prompting. (line 40) * ptype: Symbols. (line 159) * putDebugChar: Bootstrapping. (line 20) * pwd: Working Directory. (line 20) * py: Python Commands. (line 23) * python: Python Commands. (line 23) * python-interactive: Python Commands. (line 9) * q (quit): Quitting GDB. (line 6) * q (SingleKey TUI key): TUI Single Key Mode. (line 22) * query annotation: Prompting. (line 36) * quit [EXPRESSION]: Quitting GDB. (line 6) * quit annotation: Errors. (line 6) * quoted-insert (C-q or C-v): Commands For Text. (line 20) * r (run): Starting. (line 6) * r (SingleKey TUI key): TUI Single Key Mode. (line 25) * rbreak: Set Breaks. (line 92) * rc (reverse-continue): Reverse Execution. (line 30) * rdilogenable: ARM. (line 95) * rdilogfile: ARM. (line 89) * re-read-init-file (C-x C-r): Miscellaneous Commands. (line 6) * readnow: Files. (line 90) * rec: Process Record and Replay. (line 38) * rec btrace: Process Record and Replay. (line 38) * rec del: Process Record and Replay. (line 187) * rec full: Process Record and Replay. (line 38) * rec function-call-history: Process Record and Replay. (line 233) * rec instruction-history: Process Record and Replay. (line 194) * rec s: Process Record and Replay. (line 73) * recognize on type_recognizer: Type Printing API. (line 44) * record: Process Record and Replay. (line 38) * record btrace: Process Record and Replay. (line 38) * record delete: Process Record and Replay. (line 187) * record full: Process Record and Replay. (line 38) * record function-call-history: Process Record and Replay. (line 233) * record instruction-history: Process Record and Replay. (line 194) * record restore: Process Record and Replay. (line 103) * record save: Process Record and Replay. (line 96) * record stop: Process Record and Replay. (line 73) * redraw-current-line (): Commands For Moving. (line 30) * refresh: TUI Commands. (line 58) * remote delete: File Transfer. (line 23) * remote get: File Transfer. (line 19) * remote put: File Transfer. (line 15) * remotetimeout: Sparclet. (line 12) * remove-inferiors: Inferiors and Programs. (line 86) * restart CHECKPOINT-ID: Checkpoint/Restart. (line 44) * restore: Dump/Restore Files. (line 41) * RET (repeat last command): Command Syntax. (line 21) * return: Returning. (line 6) * reverse-continue: Reverse Execution. (line 30) * reverse-finish: Reverse Execution. (line 77) * reverse-next: Reverse Execution. (line 60) * reverse-nexti: Reverse Execution. (line 69) * reverse-search: Search. (line 16) * reverse-search-history (C-r): Commands For History. (line 26) * reverse-step: Reverse Execution. (line 37) * reverse-stepi: Reverse Execution. (line 52) * revert-all-at-newline: Readline Init File Syntax. (line 206) * revert-line (M-r): Miscellaneous Commands. (line 25) * Right: TUI Keys. (line 62) * rn (reverse-next): Reverse Execution. (line 60) * rni (reverse-nexti): Reverse Execution. (line 69) * rs (step): Reverse Execution. (line 37) * rsi (reverse-stepi): Reverse Execution. (line 52) * run: Starting. (line 6) * run&: Background Execution. (line 34) * rwatch: Set Watchpoints. (line 79) * s (SingleKey TUI key): TUI Single Key Mode. (line 28) * s (step): Continuing and Stepping. (line 46) * save breakpoints: Save Breakpoints. (line 9) * save gdb-index: Index Files. (line 19) * save tracepoints: save tracepoints. (line 6) * save-tracepoints: save tracepoints. (line 6) * sdireset: M32R/D. (line 44) * sdistatus: M32R/D. (line 47) * sds, a command: PowerPC Embedded. (line 94) * search: Search. (line 9) * section: Files. (line 182) * select-frame: Frames. (line 51) * self-insert (a, b, A, 1, !, ...): Commands For Text. (line 27) * set: Help. (line 108) * set ada trust-PAD-over-XVS: Ada Glitches. (line 43) * set agent off: In-Process Agent. (line 47) * set agent on: In-Process Agent. (line 38) * set annotate: Annotations Overview. (line 29) * set architecture: Targets. (line 21) * set args: Arguments. (line 21) * set arm: ARM. (line 18) * set auto-load gdb-scripts: objfile-gdb.gdb file. (line 16) * set auto-load libthread-db: libthread_db.so.1 file. (line 22) * set auto-load local-gdbinit: Init File in the Current Directory. (line 14) * set auto-load off: Auto-loading. (line 20) * set auto-load python-scripts: Python Auto-loading. (line 18) * set auto-load safe-path: Auto-loading safe path. (line 32) * set auto-load scripts-directory: objfile-gdb.py file. (line 26) * set auto-solib-add: Files. (line 303) * set backtrace: Backtrace. (line 104) * set basenames-may-differ: Files. (line 522) * set board-address: M32R/D. (line 21) * set breakpoint always-inserted: Set Breaks. (line 327) * set breakpoint auto-hw: Set Breaks. (line 307) * set breakpoint condition-evaluation: Set Breaks. (line 355) * set breakpoint pending: Set Breaks. (line 276) * set can-use-hw-watchpoints: Set Watchpoints. (line 116) * set case-sensitive: Symbols. (line 27) * set charset: Character Sets. (line 46) * set check range: Range Checking. (line 34) * set check type: Type Checking. (line 35) * set circular-trace-buffer: Starting and Stopping Trace Experiments. (line 94) * set coerce-float-to-double: ABI. (line 46) * set com1base: DJGPP Native. (line 125) * set com1irq: DJGPP Native. (line 125) * set com2base: DJGPP Native. (line 125) * set com2irq: DJGPP Native. (line 125) * set com3base: DJGPP Native. (line 125) * set com3irq: DJGPP Native. (line 125) * set com4base: DJGPP Native. (line 125) * set com4irq: DJGPP Native. (line 125) * set complaints: Messages/Warnings. (line 29) * set confirm: Messages/Warnings. (line 50) * set cp-abi: ABI. (line 58) * set cygwin-exceptions: Cygwin Native. (line 42) * set data-directory: Data Files. (line 12) * set dcache line-size: Caching Remote Data. (line 48) * set dcache size: Caching Remote Data. (line 45) * set debug: Debugging Output. (line 18) * set debug aarch64: AArch64. (line 10) * set debug auto-load: Auto-loading verbose mode. (line 27) * set debug darwin: Darwin. (line 9) * set debug entry-values: Tail Call Frames. (line 48) * set debug hppa: HPPA. (line 10) * set debug libthread-db: Threads. (line 216) * set debug mach-o: Darwin. (line 16) * set debug mips: MIPS. (line 106) * set debug monitor: Target Commands. (line 108) * set debug-file-directory: Separate Debug Files. (line 70) * set debugevents: Cygwin Native. (line 71) * set debugexceptions: Cygwin Native. (line 82) * set debugexec: Cygwin Native. (line 78) * set debugmemory: Cygwin Native. (line 86) * set default-collect: Tracepoint Actions. (line 135) * set demangle-style: Print Settings. (line 413) * set detach-on-fork: Forks. (line 55) * set directories: Source Path. (line 120) * set disable-randomization: Starting. (line 136) * set disassemble-next-line: Machine Code. (line 144) * set disassembly-flavor: Machine Code. (line 132) * set disconnected-dprintf: Dynamic Printf. (line 83) * set disconnected-tracing: Starting and Stopping Trace Experiments. (line 55) * set displaced-stepping: Maintenance Commands. (line 68) * set download-path: M32R/D. (line 15) * set editing: Editing. (line 15) * set endian: Byte Order. (line 13) * set environment: Environment. (line 39) * set exceptions, Hurd command: Hurd Native. (line 40) * set exec-direction: Reverse Execution. (line 83) * set exec-done-display: Debugging Output. (line 11) * set exec-wrapper: Starting. (line 111) * set extended-prompt: Prompt. (line 25) * set extension-language: Show. (line 30) * set follow-exec-mode: Forks. (line 101) * set follow-fork-mode: Forks. (line 35) * set gnutarget: Target Commands. (line 28) * set hash, for remote monitors: Target Commands. (line 99) * set height: Screen Size. (line 21) * set history expansion: Command History. (line 65) * set history filename: Command History. (line 26) * set history save: Command History. (line 36) * set history size: Command History. (line 45) * set host-charset: Character Sets. (line 33) * set inferior-tty: Input/Output. (line 49) * set input-radix: Numbers. (line 14) * set interactive-mode: Other Misc Settings. (line 6) * set language: Manually. (line 9) * set libthread-db-search-path: Threads. (line 177) * set listsize: List. (line 33) * set logging: Logging Output. (line 9) * set mach-exceptions: Darwin. (line 27) * set max-user-call-depth: Define. (line 78) * set mem inaccessible-by-default: Memory Region Attributes. (line 130) * set mips abi: MIPS. (line 32) * set mips compression: MIPS. (line 55) * set mips mask-address: MIPS. (line 86) * set mipsfpu: MIPS Embedded. (line 60) * set monitor-prompt, MIPS remote: MIPS Embedded. (line 107) * set monitor-warnings, MIPS remote: MIPS Embedded. (line 123) * set multiple-symbols: Ambiguous Expressions. (line 50) * set new-console: Cygwin Native. (line 54) * set new-group: Cygwin Native. (line 63) * set non-stop: Non-Stop Mode. (line 38) * set opaque-type-resolution: Symbols. (line 330) * set osabi: ABI. (line 11) * set output-radix: Numbers. (line 31) * set overload-resolution: Debugging C Plus Plus. (line 54) * set pagination: Screen Size. (line 38) * set powerpc: PowerPC Embedded. (line 51) * set print: Print Settings. (line 11) * set print entry-values: Print Settings. (line 192) * set print frame-arguments: Print Settings. (line 151) * set print inferior-events: Inferiors and Programs. (line 117) * set print thread-events: Threads. (line 156) * set print type methods: Symbols. (line 44) * set print type typedefs: Symbols. (line 58) * set processor: Targets. (line 31) * set procfs-file: SVR4 Process Information. (line 74) * set procfs-trace: SVR4 Process Information. (line 68) * set prompt: Prompt. (line 16) * set python print-stack: Python Commands. (line 46) * set radix: Numbers. (line 44) * set ravenscar task-switching off: Ravenscar Profile. (line 14) * set ravenscar task-switching on: Ravenscar Profile. (line 10) * set rdiheartbeat: ARM. (line 112) * set rdiromatzero: ARM. (line 102) * set record: Process Record and Replay. (line 225) * set record full: Process Record and Replay. (line 107) * set remote: Remote Configuration. (line 6) * set remote system-call-allowed: system. (line 38) * set remote-mips64-transfers-32bit-regs: MIPS. (line 96) * set remotecache: Caching Remote Data. (line 18) * set remoteflow: Remote Configuration. (line 41) * set retransmit-timeout: MIPS Embedded. (line 83) * set schedule-multiple: All-Stop Mode. (line 66) * set script-extension: Extending GDB. (line 20) * set sdstimeout: PowerPC Embedded. (line 87) * set server-address: M32R/D. (line 27) * set sh calling-convention: Super-H. (line 9) * set shell: Cygwin Native. (line 90) * set signal-thread: Hurd Native. (line 21) * set signals, Hurd command: Hurd Native. (line 11) * set sigs, Hurd command: Hurd Native. (line 11) * set sigthread: Hurd Native. (line 21) * set solib-absolute-prefix: Files. (line 379) * set solib-search-path: Files. (line 448) * set spu: SPU. (line 39) * set stack-cache: Caching Remote Data. (line 26) * set step-mode: Continuing and Stepping. (line 92) * set stop-on-solib-events: Files. (line 356) * set stopped, Hurd command: Hurd Native. (line 32) * set struct-convention: i386. (line 7) * set substitute-path: Source Path. (line 127) * set syn-garbage-limit, MIPS remote: MIPS Embedded. (line 98) * set sysroot: Files. (line 379) * set target-async: Background Execution. (line 17) * set target-charset: Character Sets. (line 28) * set target-file-system-kind (unix|dos-based|auto): Files. (line 462) * set target-wide-charset: Character Sets. (line 61) * set task, Hurd commands: Hurd Native. (line 49) * set tcp: Remote Configuration. (line 116) * set thread, Hurd command: Hurd Native. (line 91) * set timeout: MIPS Embedded. (line 83) * set trace-buffer-size: Starting and Stopping Trace Experiments. (line 109) * set trace-commands: Messages/Warnings. (line 67) * set trace-notes: Starting and Stopping Trace Experiments. (line 128) * set trace-stop-notes: Starting and Stopping Trace Experiments. (line 134) * set trace-user: Starting and Stopping Trace Experiments. (line 124) * set trust-readonly-sections: Files. (line 258) * set tui active-border-mode: TUI Configuration. (line 24) * set tui border-kind: TUI Configuration. (line 9) * set tui border-mode: TUI Configuration. (line 23) * set unwind-on-terminating-exception: Calling. (line 46) * set unwindonsignal: Calling. (line 35) * set variable: Assignment. (line 16) * set verbose: Messages/Warnings. (line 15) * set watchdog: Maintenance Commands. (line 375) * set width: Screen Size. (line 21) * set write: Patching. (line 15) * set-mark (C-@): Miscellaneous Commands. (line 32) * set_debug_traps: Stub Contents. (line 10) * share: Files. (line 332) * sharedlibrary: Files. (line 332) * shell: Shell Commands. (line 10) * show: Help. (line 113) * show ada trust-PAD-over-XVS: Ada Glitches. (line 43) * show agent: In-Process Agent. (line 51) * show annotate: Annotations Overview. (line 34) * show architecture: Targets. (line 21) * show args: Arguments. (line 28) * show arm: ARM. (line 22) * show auto-load: Auto-loading. (line 33) * show auto-load gdb-scripts: objfile-gdb.gdb file. (line 20) * show auto-load libthread-db: libthread_db.so.1 file. (line 26) * show auto-load local-gdbinit: Init File in the Current Directory. (line 18) * show auto-load python-scripts: Python Auto-loading. (line 21) * show auto-load safe-path: Auto-loading safe path. (line 46) * show auto-load scripts-directory: objfile-gdb.py file. (line 50) * show auto-solib-add: Files. (line 320) * show backtrace: Backtrace. (line 111) * show basenames-may-differ: Files. (line 525) * show board-address: M32R/D. (line 24) * show breakpoint always-inserted: Set Breaks. (line 327) * show breakpoint auto-hw: Set Breaks. (line 307) * show breakpoint condition-evaluation: Set Breaks. (line 355) * show breakpoint pending: Set Breaks. (line 276) * show can-use-hw-watchpoints: Set Watchpoints. (line 119) * show case-sensitive: Symbols. (line 40) * show charset: Character Sets. (line 52) * show check range: Range Checking. (line 34) * show check type: Type Checking. (line 35) * show circular-trace-buffer: Starting and Stopping Trace Experiments. (line 101) * show coerce-float-to-double: ABI. (line 55) * show com1base: DJGPP Native. (line 137) * show com1irq: DJGPP Native. (line 137) * show com2base: DJGPP Native. (line 137) * show com2irq: DJGPP Native. (line 137) * show com3base: DJGPP Native. (line 137) * show com3irq: DJGPP Native. (line 137) * show com4base: DJGPP Native. (line 137) * show com4irq: DJGPP Native. (line 137) * show commands: Command History. (line 78) * show complaints: Messages/Warnings. (line 35) * show confirm: Messages/Warnings. (line 58) * show convenience: Convenience Vars. (line 37) * show copying: Help. (line 137) * show cp-abi: ABI. (line 58) * show cygwin-exceptions: Cygwin Native. (line 50) * show data-directory: Data Files. (line 16) * show dcache line-size: Caching Remote Data. (line 56) * show dcache size: Caching Remote Data. (line 52) * show debug: Debugging Output. (line 22) * show debug auto-load: Auto-loading verbose mode. (line 30) * show debug darwin: Darwin. (line 13) * show debug entry-values: Tail Call Frames. (line 56) * show debug libthread-db: Threads. (line 216) * show debug mach-o: Darwin. (line 23) * show debug mips: MIPS. (line 110) * show debug monitor: Target Commands. (line 112) * show debug-file-directory: Separate Debug Files. (line 75) * show default-collect: Tracepoint Actions. (line 144) * show detach-on-fork: Forks. (line 71) * show directories: Source Path. (line 124) * show disassemble-next-line: Machine Code. (line 144) * show disassembly-flavor: Machine Code. (line 141) * show disconnected-dprintf: Dynamic Printf. (line 88) * show disconnected-tracing: Starting and Stopping Trace Experiments. (line 62) * show displaced-stepping: Maintenance Commands. (line 68) * show download-path: M32R/D. (line 18) * show editing: Editing. (line 22) * show environment: Environment. (line 33) * show exceptions, Hurd command: Hurd Native. (line 46) * show exec-done-display: Debugging Output. (line 14) * show extended-prompt: Prompt. (line 39) * show follow-fork-mode: Forks. (line 49) * show gnutarget: Target Commands. (line 40) * show hash, for remote monitors: Target Commands. (line 105) * show height: Screen Size. (line 21) * show history: Command History. (line 70) * show host-charset: Character Sets. (line 55) * show inferior-tty: Input/Output. (line 52) * show input-radix: Numbers. (line 36) * show interactive-mode: Other Misc Settings. (line 21) * show language: Show. (line 10) * show libthread-db-search-path: Threads. (line 213) * show listsize: List. (line 38) * show logging: Logging Output. (line 26) * show mach-exceptions: Darwin. (line 34) * show max-user-call-depth: Define. (line 78) * show mem inaccessible-by-default: Memory Region Attributes. (line 136) * show mips abi: MIPS. (line 52) * show mips compression: MIPS. (line 78) * show mips mask-address: MIPS. (line 92) * show mipsfpu: MIPS Embedded. (line 60) * show monitor-prompt, MIPS remote: MIPS Embedded. (line 119) * show monitor-warnings, MIPS remote: MIPS Embedded. (line 129) * show multiple-symbols: Ambiguous Expressions. (line 70) * show new-console: Cygwin Native. (line 59) * show new-group: Cygwin Native. (line 68) * show non-stop: Non-Stop Mode. (line 42) * show opaque-type-resolution: Symbols. (line 345) * show osabi: ABI. (line 11) * show output-radix: Numbers. (line 39) * show overload-resolution: Debugging C Plus Plus. (line 71) * show pagination: Screen Size. (line 44) * show paths: Environment. (line 29) * show print: Print Settings. (line 39) * show print inferior-events: Inferiors and Programs. (line 125) * show print thread-events: Threads. (line 166) * show print type methods: Symbols. (line 54) * show print type typedefs: Symbols. (line 70) * show processor: Targets. (line 31) * show procfs-file: SVR4 Process Information. (line 79) * show procfs-trace: SVR4 Process Information. (line 71) * show prompt: Prompt. (line 19) * show radix: Numbers. (line 44) * show ravenscar task-switching: Ravenscar Profile. (line 22) * show rdiheartbeat: ARM. (line 117) * show rdiromatzero: ARM. (line 109) * show record: Process Record and Replay. (line 229) * show record full: Process Record and Replay. (line 124) * show remote: Remote Configuration. (line 6) * show remote system-call-allowed: system. (line 42) * show remote-mips64-transfers-32bit-regs: MIPS. (line 102) * show remotecache: Caching Remote Data. (line 23) * show remoteflow: Remote Configuration. (line 45) * show retransmit-timeout: MIPS Embedded. (line 83) * show script-extension: Extending GDB. (line 20) * show sdstimeout: PowerPC Embedded. (line 91) * show server-address: M32R/D. (line 31) * show sh calling-convention: Super-H. (line 22) * show shell: Cygwin Native. (line 94) * show signal-thread: Hurd Native. (line 28) * show signals, Hurd command: Hurd Native. (line 17) * show sigs, Hurd command: Hurd Native. (line 17) * show sigthread: Hurd Native. (line 28) * show solib-search-path: Files. (line 459) * show spu: SPU. (line 44) * show stack-cache: Caching Remote Data. (line 31) * show stop-on-solib-events: Files. (line 362) * show stopped, Hurd command: Hurd Native. (line 37) * show struct-convention: i386. (line 15) * show substitute-path: Source Path. (line 164) * show syn-garbage-limit, MIPS remote: MIPS Embedded. (line 103) * show sysroot: Files. (line 445) * show target-async: Background Execution. (line 21) * show target-charset: Character Sets. (line 58) * show target-file-system-kind: Files. (line 462) * show target-wide-charset: Character Sets. (line 67) * show task, Hurd commands: Hurd Native. (line 57) * show tcp: Remote Configuration. (line 116) * show thread, Hurd command: Hurd Native. (line 101) * show timeout: MIPS Embedded. (line 83) * show trace-buffer-size: Starting and Stopping Trace Experiments. (line 116) * show trace-notes: Starting and Stopping Trace Experiments. (line 131) * show trace-stop-notes: Starting and Stopping Trace Experiments. (line 139) * show trace-user: Starting and Stopping Trace Experiments. (line 126) * show unwind-on-terminating-exception: Calling. (line 54) * show unwindonsignal: Calling. (line 42) * show user: Define. (line 71) * show values: Value History. (line 47) * show verbose: Messages/Warnings. (line 21) * show version: Help. (line 127) * show warranty: Help. (line 141) * show width: Screen Size. (line 21) * show write: Patching. (line 26) * show-all-if-ambiguous: Readline Init File Syntax. (line 212) * show-all-if-unmodified: Readline Init File Syntax. (line 218) * si (stepi): Continuing and Stepping. (line 190) * signal: Signaling. (line 6) * signal annotation: Annotations for Running. (line 42) * signal-name annotation: Annotations for Running. (line 22) * signal-name-end annotation: Annotations for Running. (line 22) * signal-string annotation: Annotations for Running. (line 22) * signal-string-end annotation: Annotations for Running. (line 22) * SignalEvent.stop_signal: Events In Python. (line 95) * signalled annotation: Annotations for Running. (line 22) * silent: Break Commands. (line 43) * sim: Z8000. (line 15) * sim, a command: Embedded Processors. (line 13) * skip delete: Skipping Over Functions and Files. (line 86) * skip disable: Skipping Over Functions and Files. (line 94) * skip enable: Skipping Over Functions and Files. (line 90) * skip file: Skipping Over Functions and Files. (line 46) * skip function: Skipping Over Functions and Files. (line 34) * skip-completed-text: Readline Init File Syntax. (line 227) * skip-csi-sequence (): Miscellaneous Commands. (line 51) * source: Command Files. (line 17) * source annotation: Source Annotations. (line 6) * spr: OpenRISC 1000. (line 33) * start: Starting. (line 78) * start-kbd-macro (C-x (): Keyboard Macros. (line 6) * starting annotation: Annotations for Running. (line 6) * STDERR: Basic Python. (line 118) * STDLOG: Basic Python. (line 121) * STDOUT: Basic Python. (line 115) * step: Continuing and Stepping. (line 46) * step&: Background Execution. (line 41) * stepi: Continuing and Stepping. (line 190) * stepi&: Background Execution. (line 44) * stop, a pseudo-command: Hooks. (line 21) * stopping annotation: Annotations for Running. (line 6) * strace: Create and Delete Tracepoints. (line 76) * symbol-file: Files. (line 45) * Symbol.addr_class: Symbols In Python. (line 75) * Symbol.is_argument: Symbols In Python. (line 85) * Symbol.is_constant: Symbols In Python. (line 88) * Symbol.is_function: Symbols In Python. (line 91) * Symbol.is_valid: Symbols In Python. (line 99) * Symbol.is_variable: Symbols In Python. (line 94) * Symbol.line: Symbols In Python. (line 58) * Symbol.linkage_name: Symbols In Python. (line 66) * Symbol.name: Symbols In Python. (line 62) * Symbol.needs_frame: Symbols In Python. (line 80) * Symbol.print_name: Symbols In Python. (line 70) * Symbol.symtab: Symbols In Python. (line 53) * Symbol.type: Symbols In Python. (line 48) * Symbol.value: Symbols In Python. (line 106) * SYMBOL_FUNCTIONS_DOMAIN: Symbols In Python. (line 132) * SYMBOL_LABEL_DOMAIN: Symbols In Python. (line 125) * SYMBOL_LOC_ARG: Symbols In Python. (line 154) * SYMBOL_LOC_BLOCK: Symbols In Python. (line 175) * SYMBOL_LOC_COMPUTED: Symbols In Python. (line 189) * SYMBOL_LOC_CONST: Symbols In Python. (line 145) * SYMBOL_LOC_CONST_BYTES: Symbols In Python. (line 178) * SYMBOL_LOC_LOCAL: Symbols In Python. (line 168) * SYMBOL_LOC_OPTIMIZED_OUT: Symbols In Python. (line 186) * SYMBOL_LOC_REF_ARG: Symbols In Python. (line 158) * SYMBOL_LOC_REGISTER: Symbols In Python. (line 151) * SYMBOL_LOC_REGPARM_ADDR: Symbols In Python. (line 163) * SYMBOL_LOC_STATIC: Symbols In Python. (line 148) * SYMBOL_LOC_TYPEDEF: Symbols In Python. (line 171) * SYMBOL_LOC_UNDEF: Symbols In Python. (line 143) * SYMBOL_LOC_UNRESOLVED: Symbols In Python. (line 181) * SYMBOL_STRUCT_DOMAIN: Symbols In Python. (line 122) * SYMBOL_TYPES_DOMAIN: Symbols In Python. (line 135) * SYMBOL_UNDEF_DOMAIN: Symbols In Python. (line 115) * SYMBOL_VAR_DOMAIN: Symbols In Python. (line 118) * SYMBOL_VARIABLES_DOMAIN: Symbols In Python. (line 128) * Symtab.filename: Symbol Tables In Python. (line 45) * Symtab.fullname: Symbol Tables In Python. (line 62) * Symtab.global_block: Symbol Tables In Python. (line 65) * Symtab.is_valid: Symbol Tables In Python. (line 55) * Symtab.objfile: Symbol Tables In Python. (line 49) * Symtab.static_block: Symbol Tables In Python. (line 69) * Symtab_and_line.is_valid: Symbol Tables In Python. (line 35) * Symtab_and_line.last: Symbol Tables In Python. (line 25) * Symtab_and_line.line: Symbol Tables In Python. (line 29) * Symtab_and_line.pc: Symbol Tables In Python. (line 21) * Symtab_and_line.symtab: Symbol Tables In Python. (line 17) * sysinfo: DJGPP Native. (line 19) * tabset: TUI Commands. (line 84) * target: Target Commands. (line 49) * target array: MIPS Embedded. (line 49) * target dbug: M68K. (line 9) * target ddb PORT: MIPS Embedded. (line 41) * target dink32: PowerPC Embedded. (line 72) * target jtag: OpenRISC 1000. (line 9) * target lsi PORT: MIPS Embedded. (line 44) * target m32r: M32R/D. (line 6) * target m32rsdi: M32R/D. (line 9) * target mips PORT: MIPS Embedded. (line 14) * target op50n: PA. (line 6) * target pmon PORT: MIPS Embedded. (line 38) * target ppcbug: PowerPC Embedded. (line 75) * target ppcbug1: PowerPC Embedded. (line 76) * target r3900: MIPS Embedded. (line 46) * target rdi: ARM. (line 6) * target rdp: ARM. (line 11) * target record: Process Record and Replay. (line 38) * target record-btrace: Process Record and Replay. (line 38) * target record-full: Process Record and Replay. (line 38) * target sds: PowerPC Embedded. (line 80) * target sim, with Z8000: Z8000. (line 15) * target sparclite: Sparclite. (line 6) * target tfile: Trace Files. (line 22) * target vxworks: VxWorks. (line 6) * target w89k: PA. (line 9) * task (Ada): Ada Tasks. (line 105) * tbreak: Set Breaks. (line 55) * tdump: tdump. (line 6) * teval (tracepoints): Tracepoint Actions. (line 110) * tfile: Trace Files. (line 22) * tfind: tfind. (line 6) * thbreak: Set Breaks. (line 82) * this, inside C++ member functions: C Plus Plus Expressions. (line 20) * thread apply: Threads. (line 122) * thread find: Threads. (line 142) * thread name: Threads. (line 131) * thread THREADNO: Threads. (line 100) * ThreadEvent.inferior_thread: Events In Python. (line 56) * tload, M32R: M32R/D. (line 39) * trace: Create and Delete Tracepoints. (line 6) * transpose-chars (C-t): Commands For Text. (line 30) * transpose-words (M-t): Commands For Text. (line 36) * tsave: Trace Files. (line 12) * tstart [ NOTES ]: Starting and Stopping Trace Experiments. (line 6) * tstatus: Starting and Stopping Trace Experiments. (line 27) * tstop [ NOTES ]: Starting and Stopping Trace Experiments. (line 16) * tty: Input/Output. (line 23) * tui reg: TUI Commands. (line 61) * tvariable: Trace State Variables. (line 26) * Type.array: Types In Python. (line 93) * Type.code: Types In Python. (line 34) * Type.const: Types In Python. (line 114) * Type.fields: Types In Python. (line 51) * Type.pointer: Types In Python. (line 137) * Type.range: Types In Python. (line 127) * Type.reference: Types In Python. (line 133) * Type.sizeof: Types In Python. (line 38) * Type.strip_typedefs: Types In Python. (line 141) * Type.tag: Types In Python. (line 43) * Type.target: Types In Python. (line 145) * Type.template_argument: Types In Python. (line 159) * Type.unqualified: Types In Python. (line 122) * Type.vector: Types In Python. (line 101) * Type.volatile: Types In Python. (line 118) * TYPE_CODE_ARRAY: Types In Python. (line 176) * TYPE_CODE_BITSTRING: Types In Python. (line 214) * TYPE_CODE_BOOL: Types In Python. (line 235) * TYPE_CODE_CHAR: Types In Python. (line 232) * TYPE_CODE_COMPLEX: Types In Python. (line 238) * TYPE_CODE_DECFLOAT: Types In Python. (line 247) * TYPE_CODE_ENUM: Types In Python. (line 185) * TYPE_CODE_ERROR: Types In Python. (line 217) * TYPE_CODE_FLAGS: Types In Python. (line 188) * TYPE_CODE_FLT: Types In Python. (line 197) * TYPE_CODE_FUNC: Types In Python. (line 191) * TYPE_CODE_INT: Types In Python. (line 194) * TYPE_CODE_INTERNAL_FUNCTION: Types In Python. (line 250) * TYPE_CODE_MEMBERPTR: Types In Python. (line 226) * TYPE_CODE_METHOD: Types In Python. (line 220) * TYPE_CODE_METHODPTR: Types In Python. (line 223) * TYPE_CODE_NAMESPACE: Types In Python. (line 244) * TYPE_CODE_PTR: Types In Python. (line 173) * TYPE_CODE_RANGE: Types In Python. (line 206) * TYPE_CODE_REF: Types In Python. (line 229) * TYPE_CODE_SET: Types In Python. (line 203) * TYPE_CODE_STRING: Types In Python. (line 209) * TYPE_CODE_STRUCT: Types In Python. (line 179) * TYPE_CODE_TYPEDEF: Types In Python. (line 241) * TYPE_CODE_UNION: Types In Python. (line 182) * TYPE_CODE_VOID: Types In Python. (line 200) * u (SingleKey TUI key): TUI Single Key Mode. (line 31) * u (until): Continuing and Stepping. (line 118) * undisplay: Auto Display. (line 45) * undo (C-_ or C-x C-u): Miscellaneous Commands. (line 22) * universal-argument (): Numeric Arguments. (line 10) * unix-filename-rubout (): Commands For Killing. (line 32) * unix-line-discard (C-u): Commands For Killing. (line 12) * unix-word-rubout (C-w): Commands For Killing. (line 28) * unset environment: Environment. (line 55) * unset substitute-path: Source Path. (line 156) * until: Continuing and Stepping. (line 118) * until&: Background Execution. (line 59) * Up: TUI Keys. (line 53) * up: Selection. (line 35) * up-silently: Selection. (line 64) * upcase-word (M-u): Commands For Text. (line 41) * update: TUI Commands. (line 76) * upload, M32R: M32R/D. (line 34) * use_dbt_break: M32R/D. (line 64) * use_debug_dma: M32R/D. (line 53) * use_ib_break: M32R/D. (line 61) * use_mon_code: M32R/D. (line 57) * v (SingleKey TUI key): TUI Single Key Mode. (line 34) * Value.__init__: Values From Inferior. (line 87) * Value.address: Values From Inferior. (line 45) * Value.cast: Values From Inferior. (line 119) * Value.dereference: Values From Inferior. (line 125) * Value.dynamic_cast: Values From Inferior. (line 203) * Value.dynamic_type: Values From Inferior. (line 59) * Value.fetch_lazy: Values From Inferior. (line 265) * Value.is_lazy: Values From Inferior. (line 74) * Value.is_optimized_out: Values From Inferior. (line 50) * Value.lazy_string: Values From Inferior. (line 243) * Value.referenced_value: Values From Inferior. (line 178) * Value.reinterpret_cast: Values From Inferior. (line 207) * Value.string: Values From Inferior. (line 211) * Value.type: Values From Inferior. (line 55) * visible-stats: Readline Init File Syntax. (line 240) * vxworks-timeout: VxWorks. (line 23) * w (SingleKey TUI key): TUI Single Key Mode. (line 37) * watch: Set Watchpoints. (line 42) * watchpoint annotation: Annotations for Running. (line 50) * whatis: Symbols. (line 104) * where: Backtrace. (line 34) * while: Command Files. (line 86) * while-stepping (tracepoints): Tracepoint Actions. (line 118) * winheight: TUI Commands. (line 80) * WP_ACCESS: Breakpoints In Python. (line 66) * WP_READ: Breakpoints In Python. (line 60) * WP_WRITE: Breakpoints In Python. (line 63) * x (examine memory): Memory. (line 9) * x(examine), and info line: Machine Code. (line 30) * yank (C-y): Commands For Killing. (line 59) * yank-last-arg (M-. or M-_): Commands For History. (line 64) * yank-nth-arg (M-C-y): Commands For History. (line 55) * yank-pop (M-y): Commands For Killing. (line 62) gdb-doc-7.6.2/gdb/doc/stabs.texinfo0000644000175000017500000044647512250770607016130 0ustar zumbizumbi\input texinfo @setfilename stabs.info @setchapternewpage odd @settitle STABS @c @finalout @c This is a dir.info fragment to support semi-automated addition of @c manuals to an info tree. @dircategory Software development @direntry * Stabs: (stabs). The "stabs" debugging information format. @end direntry @copying Copyright @copyright{} 1992-2013 Free Software Foundation, Inc. Contributed by Cygnus Support. Written by Julia Menapace, Jim Kingdon, and David MacKenzie. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end copying @ifnottex This document describes the stabs debugging symbol tables. @insertcopying @end ifnottex @titlepage @title The ``stabs'' debug format @author Julia Menapace, Jim Kingdon, David MacKenzie @author Cygnus Support @page @tex \def\$#1${{#1}} % Kluge: collect RCS revision info without $...$ \xdef\manvers{\$Revision$} % For use in headers, footers too {\parskip=0pt \hfill Cygnus Support\par \hfill \manvers\par \hfill \TeX{}info \texinfoversion\par } @end tex @vskip 0pt plus 1filll @insertcopying @end titlepage @ifnottex @node Top @top The "stabs" representation of debugging information This document describes the stabs debugging format. @menu * Overview:: Overview of stabs * Program Structure:: Encoding of the structure of the program * Constants:: Constants * Variables:: * Types:: Type definitions * Macro define and undefine:: Representation of #define and #undef * Symbol Tables:: Symbol information in symbol tables * Cplusplus:: Stabs specific to C++ * Stab Types:: Symbol types in a.out files * Symbol Descriptors:: Table of symbol descriptors * Type Descriptors:: Table of type descriptors * Expanded Reference:: Reference information by stab type * Questions:: Questions and anomalies * Stab Sections:: In some object file formats, stabs are in sections. * GNU Free Documentation License:: The license for this documentation * Symbol Types Index:: Index of symbolic stab symbol type names. @end menu @end ifnottex @contents @node Overview @chapter Overview of Stabs @dfn{Stabs} refers to a format for information that describes a program to a debugger. This format was apparently invented by Peter Kessler at the University of California at Berkeley, for the @code{pdx} Pascal debugger; the format has spread widely since then. This document is one of the few published sources of documentation on stabs. It is believed to be comprehensive for stabs used by C. The lists of symbol descriptors (@pxref{Symbol Descriptors}) and type descriptors (@pxref{Type Descriptors}) are believed to be completely comprehensive. Stabs for COBOL-specific features and for variant records (used by Pascal and Modula-2) are poorly documented here. @c FIXME: Need to document all OS9000 stuff in GDB; see all references @c to os9k_stabs in stabsread.c. Other sources of information on stabs are @cite{Dbx and Dbxtool Interfaces}, 2nd edition, by Sun, 1988, and @cite{AIX Version 3.2 Files Reference}, Fourth Edition, September 1992, "dbx Stabstring Grammar" in the a.out section, page 2-31. This document is believed to incorporate the information from those two sources except where it explicitly directs you to them for more information. @menu * Flow:: Overview of debugging information flow * Stabs Format:: Overview of stab format * String Field:: The string field * C Example:: A simple example in C source * Assembly Code:: The simple example at the assembly level @end menu @node Flow @section Overview of Debugging Information Flow The GNU C compiler compiles C source in a @file{.c} file into assembly language in a @file{.s} file, which the assembler translates into a @file{.o} file, which the linker combines with other @file{.o} files and libraries to produce an executable file. With the @samp{-g} option, GCC puts in the @file{.s} file additional debugging information, which is slightly transformed by the assembler and linker, and carried through into the final executable. This debugging information describes features of the source file like line numbers, the types and scopes of variables, and function names, parameters, and scopes. For some object file formats, the debugging information is encapsulated in assembler directives known collectively as @dfn{stab} (symbol table) directives, which are interspersed with the generated code. Stabs are the native format for debugging information in the a.out and XCOFF object file formats. The GNU tools can also emit stabs in the COFF and ECOFF object file formats. The assembler adds the information from stabs to the symbol information it places by default in the symbol table and the string table of the @file{.o} file it is building. The linker consolidates the @file{.o} files into one executable file, with one symbol table and one string table. Debuggers use the symbol and string tables in the executable as a source of debugging information about the program. @node Stabs Format @section Overview of Stab Format There are three overall formats for stab assembler directives, differentiated by the first word of the stab. The name of the directive describes which combination of four possible data fields follows. It is either @code{.stabs} (string), @code{.stabn} (number), or @code{.stabd} (dot). IBM's XCOFF assembler uses @code{.stabx} (and some other directives such as @code{.file} and @code{.bi}) instead of @code{.stabs}, @code{.stabn} or @code{.stabd}. The overall format of each class of stab is: @example .stabs "@var{string}",@var{type},@var{other},@var{desc},@var{value} .stabn @var{type},@var{other},@var{desc},@var{value} .stabd @var{type},@var{other},@var{desc} .stabx "@var{string}",@var{value},@var{type},@var{sdb-type} @end example @c what is the correct term for "current file location"? My AIX @c assembler manual calls it "the value of the current location counter". For @code{.stabn} and @code{.stabd}, there is no @var{string} (the @code{n_strx} field is zero; see @ref{Symbol Tables}). For @code{.stabd}, the @var{value} field is implicit and has the value of the current file location. For @code{.stabx}, the @var{sdb-type} field is unused for stabs and can always be set to zero. The @var{other} field is almost always unused and can be set to zero. The number in the @var{type} field gives some basic information about which type of stab this is (or whether it @emph{is} a stab, as opposed to an ordinary symbol). Each valid type number defines a different stab type; further, the stab type defines the exact interpretation of, and possible values for, any remaining @var{string}, @var{desc}, or @var{value} fields present in the stab. @xref{Stab Types}, for a list in numeric order of the valid @var{type} field values for stab directives. @node String Field @section The String Field For most stabs the string field holds the meat of the debugging information. The flexible nature of this field is what makes stabs extensible. For some stab types the string field contains only a name. For other stab types the contents can be a great deal more complex. The overall format of the string field for most stab types is: @example "@var{name}:@var{symbol-descriptor} @var{type-information}" @end example @var{name} is the name of the symbol represented by the stab; it can contain a pair of colons (@pxref{Nested Symbols}). @var{name} can be omitted, which means the stab represents an unnamed object. For example, @samp{:t10=*2} defines type 10 as a pointer to type 2, but does not give the type a name. Omitting the @var{name} field is supported by AIX dbx and GDB after about version 4.8, but not other debuggers. GCC sometimes uses a single space as the name instead of omitting the name altogether; apparently that is supported by most debuggers. The @var{symbol-descriptor} following the @samp{:} is an alphabetic character that tells more specifically what kind of symbol the stab represents. If the @var{symbol-descriptor} is omitted, but type information follows, then the stab represents a local variable. For a list of symbol descriptors, see @ref{Symbol Descriptors}. The @samp{c} symbol descriptor is an exception in that it is not followed by type information. @xref{Constants}. @var{type-information} is either a @var{type-number}, or @samp{@var{type-number}=}. A @var{type-number} alone is a type reference, referring directly to a type that has already been defined. The @samp{@var{type-number}=} form is a type definition, where the number represents a new type which is about to be defined. The type definition may refer to other types by number, and those type numbers may be followed by @samp{=} and nested definitions. Also, the Lucid compiler will repeat @samp{@var{type-number}=} more than once if it wants to define several type numbers at once. In a type definition, if the character that follows the equals sign is non-numeric then it is a @var{type-descriptor}, and tells what kind of type is about to be defined. Any other values following the @var{type-descriptor} vary, depending on the @var{type-descriptor}. @xref{Type Descriptors}, for a list of @var{type-descriptor} values. If a number follows the @samp{=} then the number is a @var{type-reference}. For a full description of types, @ref{Types}. A @var{type-number} is often a single number. The GNU and Sun tools additionally permit a @var{type-number} to be a pair (@var{file-number},@var{filetype-number}) (the parentheses appear in the string, and serve to distinguish the two cases). The @var{file-number} is 0 for the base source file, 1 for the first included file, 2 for the next, and so on. The @var{filetype-number} is a number starting with 1 which is incremented for each new type defined in the file. (Separating the file number and the type number permits the @code{N_BINCL} optimization to succeed more often; see @ref{Include Files}). There is an AIX extension for type attributes. Following the @samp{=} are any number of type attributes. Each one starts with @samp{@@} and ends with @samp{;}. Debuggers, including AIX's dbx and GDB 4.10, skip any type attributes they do not recognize. GDB 4.9 and other versions of dbx may not do this. Because of a conflict with C@t{++} (@pxref{Cplusplus}), new attributes should not be defined which begin with a digit, @samp{(}, or @samp{-}; GDB may be unable to distinguish those from the C@t{++} type descriptor @samp{@@}. The attributes are: @table @code @item a@var{boundary} @var{boundary} is an integer specifying the alignment. I assume it applies to all variables of this type. @item p@var{integer} Pointer class (for checking). Not sure what this means, or how @var{integer} is interpreted. @item P Indicate this is a packed type, meaning that structure fields or array elements are placed more closely in memory, to save memory at the expense of speed. @item s@var{size} Size in bits of a variable of this type. This is fully supported by GDB 4.11 and later. @item S Indicate that this type is a string instead of an array of characters, or a bitstring instead of a set. It doesn't change the layout of the data being represented, but does enable the debugger to know which type it is. @item V Indicate that this type is a vector instead of an array. The only major difference between vectors and arrays is that vectors are passed by value instead of by reference (vector coprocessor extension). @end table All of this can make the string field quite long. All versions of GDB, and some versions of dbx, can handle arbitrarily long strings. But many versions of dbx (or assemblers or linkers, I'm not sure which) cretinously limit the strings to about 80 characters, so compilers which must work with such systems need to split the @code{.stabs} directive into several @code{.stabs} directives. Each stab duplicates every field except the string field. The string field of every stab except the last is marked as continued with a backslash at the end (in the assembly code this may be written as a double backslash, depending on the assembler). Removing the backslashes and concatenating the string fields of each stab produces the original, long string. Just to be incompatible (or so they don't have to worry about what the assembler does with backslashes), AIX can use @samp{?} instead of backslash. @node C Example @section A Simple Example in C Source To get the flavor of how stabs describe source information for a C program, let's look at the simple program: @example main() @{ printf("Hello world"); @} @end example When compiled with @samp{-g}, the program above yields the following @file{.s} file. Line numbers have been added to make it easier to refer to parts of the @file{.s} file in the description of the stabs that follows. @node Assembly Code @section The Simple Example at the Assembly Level This simple ``hello world'' example demonstrates several of the stab types used to describe C language source files. @example 1 gcc2_compiled.: 2 .stabs "/cygint/s1/users/jcm/play/",100,0,0,Ltext0 3 .stabs "hello.c",100,0,0,Ltext0 4 .text 5 Ltext0: 6 .stabs "int:t1=r1;-2147483648;2147483647;",128,0,0,0 7 .stabs "char:t2=r2;0;127;",128,0,0,0 8 .stabs "long int:t3=r1;-2147483648;2147483647;",128,0,0,0 9 .stabs "unsigned int:t4=r1;0;-1;",128,0,0,0 10 .stabs "long unsigned int:t5=r1;0;-1;",128,0,0,0 11 .stabs "short int:t6=r1;-32768;32767;",128,0,0,0 12 .stabs "long long int:t7=r1;0;-1;",128,0,0,0 13 .stabs "short unsigned int:t8=r1;0;65535;",128,0,0,0 14 .stabs "long long unsigned int:t9=r1;0;-1;",128,0,0,0 15 .stabs "signed char:t10=r1;-128;127;",128,0,0,0 16 .stabs "unsigned char:t11=r1;0;255;",128,0,0,0 17 .stabs "float:t12=r1;4;0;",128,0,0,0 18 .stabs "double:t13=r1;8;0;",128,0,0,0 19 .stabs "long double:t14=r1;8;0;",128,0,0,0 20 .stabs "void:t15=15",128,0,0,0 21 .align 4 22 LC0: 23 .ascii "Hello, world!\12\0" 24 .align 4 25 .global _main 26 .proc 1 27 _main: 28 .stabn 68,0,4,LM1 29 LM1: 30 !#PROLOGUE# 0 31 save %sp,-136,%sp 32 !#PROLOGUE# 1 33 call ___main,0 34 nop 35 .stabn 68,0,5,LM2 36 LM2: 37 LBB2: 38 sethi %hi(LC0),%o1 39 or %o1,%lo(LC0),%o0 40 call _printf,0 41 nop 42 .stabn 68,0,6,LM3 43 LM3: 44 LBE2: 45 .stabn 68,0,6,LM4 46 LM4: 47 L1: 48 ret 49 restore 50 .stabs "main:F1",36,0,0,_main 51 .stabn 192,0,0,LBB2 52 .stabn 224,0,0,LBE2 @end example @node Program Structure @chapter Encoding the Structure of the Program The elements of the program structure that stabs encode include the name of the main function, the names of the source and include files, the line numbers, procedure names and types, and the beginnings and ends of blocks of code. @menu * Main Program:: Indicate what the main program is * Source Files:: The path and name of the source file * Include Files:: Names of include files * Line Numbers:: * Procedures:: * Nested Procedures:: * Block Structure:: * Alternate Entry Points:: Entering procedures except at the beginning. @end menu @node Main Program @section Main Program @findex N_MAIN Most languages allow the main program to have any name. The @code{N_MAIN} stab type tells the debugger the name that is used in this program. Only the string field is significant; it is the name of a function which is the main program. Most C compilers do not use this stab (they expect the debugger to assume that the name is @code{main}), but some C compilers emit an @code{N_MAIN} stab for the @code{main} function. I'm not sure how XCOFF handles this. @node Source Files @section Paths and Names of the Source Files @findex N_SO Before any other stabs occur, there must be a stab specifying the source file. This information is contained in a symbol of stab type @code{N_SO}; the string field contains the name of the file. The value of the symbol is the start address of the portion of the text section corresponding to that file. Some compilers use the desc field to indicate the language of the source file. Sun's compilers started this usage, and the first constants are derived from their documentation. Languages added by gcc/gdb start at 0x32 to avoid conflict with languages Sun may add in the future. A desc field with a value 0 indicates that no language has been specified via this mechanism. @table @asis @item @code{N_SO_AS} (0x1) Assembly language @item @code{N_SO_C} (0x2) K&R traditional C @item @code{N_SO_ANSI_C} (0x3) ANSI C @item @code{N_SO_CC} (0x4) C++ @item @code{N_SO_FORTRAN} (0x5) Fortran @item @code{N_SO_PASCAL} (0x6) Pascal @item @code{N_SO_FORTRAN90} (0x7) Fortran90 @item @code{N_SO_OBJC} (0x32) Objective-C @item @code{N_SO_OBJCPLUS} (0x33) Objective-C++ @end table Some compilers (for example, GCC2 and SunOS4 @file{/bin/cc}) also include the directory in which the source was compiled, in a second @code{N_SO} symbol preceding the one containing the file name. This symbol can be distinguished by the fact that it ends in a slash. Code from the @code{cfront} C@t{++} compiler can have additional @code{N_SO} symbols for nonexistent source files after the @code{N_SO} for the real source file; these are believed to contain no useful information. For example: @example .stabs "/cygint/s1/users/jcm/play/",100,0,0,Ltext0 # @r{100 is N_SO} .stabs "hello.c",100,0,0,Ltext0 .text Ltext0: @end example @findex C_FILE Instead of @code{N_SO} symbols, XCOFF uses a @code{.file} assembler directive which assembles to a @code{C_FILE} symbol; explaining this in detail is outside the scope of this document. @c FIXME: Exactly when should the empty N_SO be used? Why? If it is useful to indicate the end of a source file, this is done with an @code{N_SO} symbol with an empty string for the name. The value is the address of the end of the text section for the file. For some systems, there is no indication of the end of a source file, and you just need to figure it ended when you see an @code{N_SO} for a different source file, or a symbol ending in @code{.o} (which at least some linkers insert to mark the start of a new @code{.o} file). @node Include Files @section Names of Include Files There are several schemes for dealing with include files: the traditional @code{N_SOL} approach, Sun's @code{N_BINCL} approach, and the XCOFF @code{C_BINCL} approach (which despite the similar name has little in common with @code{N_BINCL}). @findex N_SOL An @code{N_SOL} symbol specifies which include file subsequent symbols refer to. The string field is the name of the file and the value is the text address corresponding to the end of the previous include file and the start of this one. To specify the main source file again, use an @code{N_SOL} symbol with the name of the main source file. @findex N_BINCL @findex N_EINCL @findex N_EXCL The @code{N_BINCL} approach works as follows. An @code{N_BINCL} symbol specifies the start of an include file. In an object file, only the string is significant; the linker puts data into some of the other fields. The end of the include file is marked by an @code{N_EINCL} symbol (which has no string field). In an object file, there is no significant data in the @code{N_EINCL} symbol. @code{N_BINCL} and @code{N_EINCL} can be nested. If the linker detects that two source files have identical stabs between an @code{N_BINCL} and @code{N_EINCL} pair (as will generally be the case for a header file), then it only puts out the stabs once. Each additional occurrence is replaced by an @code{N_EXCL} symbol. I believe the GNU linker and the Sun (both SunOS4 and Solaris) linker are the only ones which supports this feature. A linker which supports this feature will set the value of a @code{N_BINCL} symbol to the total of all the characters in the stabs strings included in the header file, omitting any file numbers. The value of an @code{N_EXCL} symbol is the same as the value of the @code{N_BINCL} symbol it replaces. This information can be used to match up @code{N_EXCL} and @code{N_BINCL} symbols which have the same filename. The @code{N_EINCL} value, and the values of the other and description fields for all three, appear to always be zero. @findex C_BINCL @findex C_EINCL For the start of an include file in XCOFF, use the @file{.bi} assembler directive, which generates a @code{C_BINCL} symbol. A @file{.ei} directive, which generates a @code{C_EINCL} symbol, denotes the end of the include file. Both directives are followed by the name of the source file in quotes, which becomes the string for the symbol. The value of each symbol, produced automatically by the assembler and linker, is the offset into the executable of the beginning (inclusive, as you'd expect) or end (inclusive, as you would not expect) of the portion of the COFF line table that corresponds to this include file. @code{C_BINCL} and @code{C_EINCL} do not nest. @node Line Numbers @section Line Numbers @findex N_SLINE An @code{N_SLINE} symbol represents the start of a source line. The desc field contains the line number and the value contains the code address for the start of that source line. On most machines the address is absolute; for stabs in sections (@pxref{Stab Sections}), it is relative to the function in which the @code{N_SLINE} symbol occurs. @findex N_DSLINE @findex N_BSLINE GNU documents @code{N_DSLINE} and @code{N_BSLINE} symbols for line numbers in the data or bss segments, respectively. They are identical to @code{N_SLINE} but are relocated differently by the linker. They were intended to be used to describe the source location of a variable declaration, but I believe that GCC2 actually puts the line number in the desc field of the stab for the variable itself. GDB has been ignoring these symbols (unless they contain a string field) since at least GDB 3.5. For single source lines that generate discontiguous code, such as flow of control statements, there may be more than one line number entry for the same source line. In this case there is a line number entry at the start of each code range, each with the same line number. XCOFF does not use stabs for line numbers. Instead, it uses COFF line numbers (which are outside the scope of this document). Standard COFF line numbers cannot deal with include files, but in XCOFF this is fixed with the @code{C_BINCL} method of marking include files (@pxref{Include Files}). @node Procedures @section Procedures @findex N_FUN, for functions @findex N_FNAME @findex N_STSYM, for functions (Sun acc) @findex N_GSYM, for functions (Sun acc) All of the following stabs normally use the @code{N_FUN} symbol type. However, Sun's @code{acc} compiler on SunOS4 uses @code{N_GSYM} and @code{N_STSYM}, which means that the value of the stab for the function is useless and the debugger must get the address of the function from the non-stab symbols instead. On systems where non-stab symbols have leading underscores, the stabs will lack underscores and the debugger needs to know about the leading underscore to match up the stab and the non-stab symbol. BSD Fortran is said to use @code{N_FNAME} with the same restriction; the value of the symbol is not useful (I'm not sure it really does use this, because GDB doesn't handle this and no one has complained). @findex C_FUN A function is represented by an @samp{F} symbol descriptor for a global (extern) function, and @samp{f} for a static (local) function. For a.out, the value of the symbol is the address of the start of the function; it is already relocated. For stabs in ELF, the SunPRO compiler version 2.0.1 and GCC put out an address which gets relocated by the linker. In a future release SunPRO is planning to put out zero, in which case the address can be found from the ELF (non-stab) symbol. Because looking things up in the ELF symbols would probably be slow, I'm not sure how to find which symbol of that name is the right one, and this doesn't provide any way to deal with nested functions, it would probably be better to make the value of the stab an address relative to the start of the file, or just absolute. See @ref{ELF Linker Relocation} for more information on linker relocation of stabs in ELF files. For XCOFF, the stab uses the @code{C_FUN} storage class and the value of the stab is meaningless; the address of the function can be found from the csect symbol (XTY_LD/XMC_PR). The type information of the stab represents the return type of the function; thus @samp{foo:f5} means that foo is a function returning type 5. There is no need to try to get the line number of the start of the function from the stab for the function; it is in the next @code{N_SLINE} symbol. @c FIXME: verify whether the "I suspect" below is true or not. Some compilers (such as Sun's Solaris compiler) support an extension for specifying the types of the arguments. I suspect this extension is not used for old (non-prototyped) function definitions in C. If the extension is in use, the type information of the stab for the function is followed by type information for each argument, with each argument preceded by @samp{;}. An argument type of 0 means that additional arguments are being passed, whose types and number may vary (@samp{...} in ANSI C). GDB has tolerated this extension (parsed the syntax, if not necessarily used the information) since at least version 4.8; I don't know whether all versions of dbx tolerate it. The argument types given here are not redundant with the symbols for the formal parameters (@pxref{Parameters}); they are the types of the arguments as they are passed, before any conversions might take place. For example, if a C function which is declared without a prototype takes a @code{float} argument, the value is passed as a @code{double} but then converted to a @code{float}. Debuggers need to use the types given in the arguments when printing values, but when calling the function they need to use the types given in the symbol defining the function. If the return type and types of arguments of a function which is defined in another source file are specified (i.e., a function prototype in ANSI C), traditionally compilers emit no stab; the only way for the debugger to find the information is if the source file where the function is defined was also compiled with debugging symbols. As an extension the Solaris compiler uses symbol descriptor @samp{P} followed by the return type of the function, followed by the arguments, each preceded by @samp{;}, as in a stab with symbol descriptor @samp{f} or @samp{F}. This use of symbol descriptor @samp{P} can be distinguished from its use for register parameters (@pxref{Register Parameters}) by the fact that it has symbol type @code{N_FUN}. The AIX documentation also defines symbol descriptor @samp{J} as an internal function. I assume this means a function nested within another function. It also says symbol descriptor @samp{m} is a module in Modula-2 or extended Pascal. Procedures (functions which do not return values) are represented as functions returning the @code{void} type in C. I don't see why this couldn't be used for all languages (inventing a @code{void} type for this purpose if necessary), but the AIX documentation defines @samp{I}, @samp{P}, and @samp{Q} for internal, global, and static procedures, respectively. These symbol descriptors are unusual in that they are not followed by type information. The following example shows a stab for a function @code{main} which returns type number @code{1}. The @code{_main} specified for the value is a reference to an assembler label which is used to fill in the start address of the function. @example .stabs "main:F1",36,0,0,_main # @r{36 is N_FUN} @end example The stab representing a procedure is located immediately following the code of the procedure. This stab is in turn directly followed by a group of other stabs describing elements of the procedure. These other stabs describe the procedure's parameters, its block local variables, and its block structure. If functions can appear in different sections, then the debugger may not be able to find the end of a function. Recent versions of GCC will mark the end of a function with an @code{N_FUN} symbol with an empty string for the name. The value is the address of the end of the current function. Without such a symbol, there is no indication of the address of the end of a function, and you must assume that it ended at the starting address of the next function or at the end of the text section for the program. @node Nested Procedures @section Nested Procedures For any of the symbol descriptors representing procedures, after the symbol descriptor and the type information is optionally a scope specifier. This consists of a comma, the name of the procedure, another comma, and the name of the enclosing procedure. The first name is local to the scope specified, and seems to be redundant with the name of the symbol (before the @samp{:}). This feature is used by GCC, and presumably Pascal, Modula-2, etc., compilers, for nested functions. If procedures are nested more than one level deep, only the immediately containing scope is specified. For example, this code: @example int foo (int x) @{ int bar (int y) @{ int baz (int z) @{ return x + y + z; @} return baz (x + 2 * y); @} return x + bar (3 * x); @} @end example @noindent produces the stabs: @example .stabs "baz:f1,baz,bar",36,0,0,_baz.15 # @r{36 is N_FUN} .stabs "bar:f1,bar,foo",36,0,0,_bar.12 .stabs "foo:F1",36,0,0,_foo @end example @node Block Structure @section Block Structure @findex N_LBRAC @findex N_RBRAC @c For GCC 2.5.8 or so stabs-in-coff, these are absolute instead of @c function relative (as documented below). But GDB has never been able @c to deal with that (it had wanted them to be relative to the file, but @c I just fixed that (between GDB 4.12 and 4.13)), so it is function @c relative just like ELF and SOM and the below documentation. The program's block structure is represented by the @code{N_LBRAC} (left brace) and the @code{N_RBRAC} (right brace) stab types. The variables defined inside a block precede the @code{N_LBRAC} symbol for most compilers, including GCC. Other compilers, such as the Convex, Acorn RISC machine, and Sun @code{acc} compilers, put the variables after the @code{N_LBRAC} symbol. The values of the @code{N_LBRAC} and @code{N_RBRAC} symbols are the start and end addresses of the code of the block, respectively. For most machines, they are relative to the starting address of this source file. For the Gould NP1, they are absolute. For stabs in sections (@pxref{Stab Sections}), they are relative to the function in which they occur. The @code{N_LBRAC} and @code{N_RBRAC} stabs that describe the block scope of a procedure are located after the @code{N_FUN} stab that represents the procedure itself. Sun documents the desc field of @code{N_LBRAC} and @code{N_RBRAC} symbols as containing the nesting level of the block. However, dbx seems to not care, and GCC always sets desc to zero. @findex .bb @findex .be @findex C_BLOCK For XCOFF, block scope is indicated with @code{C_BLOCK} symbols. If the name of the symbol is @samp{.bb}, then it is the beginning of the block; if the name of the symbol is @samp{.be}; it is the end of the block. @node Alternate Entry Points @section Alternate Entry Points @findex N_ENTRY @findex C_ENTRY Some languages, like Fortran, have the ability to enter procedures at some place other than the beginning. One can declare an alternate entry point. The @code{N_ENTRY} stab is for this; however, the Sun FORTRAN compiler doesn't use it. According to AIX documentation, only the name of a @code{C_ENTRY} stab is significant; the address of the alternate entry point comes from the corresponding external symbol. A previous revision of this document said that the value of an @code{N_ENTRY} stab was the address of the alternate entry point, but I don't know the source for that information. @node Constants @chapter Constants The @samp{c} symbol descriptor indicates that this stab represents a constant. This symbol descriptor is an exception to the general rule that symbol descriptors are followed by type information. Instead, it is followed by @samp{=} and one of the following: @table @code @item b @var{value} Boolean constant. @var{value} is a numeric value; I assume it is 0 for false or 1 for true. @item c @var{value} Character constant. @var{value} is the numeric value of the constant. @item e @var{type-information} , @var{value} Constant whose value can be represented as integral. @var{type-information} is the type of the constant, as it would appear after a symbol descriptor (@pxref{String Field}). @var{value} is the numeric value of the constant. GDB 4.9 does not actually get the right value if @var{value} does not fit in a host @code{int}, but it does not do anything violent, and future debuggers could be extended to accept integers of any size (whether unsigned or not). This constant type is usually documented as being only for enumeration constants, but GDB has never imposed that restriction; I don't know about other debuggers. @item i @var{value} Integer constant. @var{value} is the numeric value. The type is some sort of generic integer type (for GDB, a host @code{int}); to specify the type explicitly, use @samp{e} instead. @item r @var{value} Real constant. @var{value} is the real value, which can be @samp{INF} (optionally preceded by a sign) for infinity, @samp{QNAN} for a quiet NaN (not-a-number), or @samp{SNAN} for a signalling NaN. If it is a normal number the format is that accepted by the C library function @code{atof}. @item s @var{string} String constant. @var{string} is a string enclosed in either @samp{'} (in which case @samp{'} characters within the string are represented as @samp{\'} or @samp{"} (in which case @samp{"} characters within the string are represented as @samp{\"}). @item S @var{type-information} , @var{elements} , @var{bits} , @var{pattern} Set constant. @var{type-information} is the type of the constant, as it would appear after a symbol descriptor (@pxref{String Field}). @var{elements} is the number of elements in the set (does this means how many bits of @var{pattern} are actually used, which would be redundant with the type, or perhaps the number of bits set in @var{pattern}? I don't get it), @var{bits} is the number of bits in the constant (meaning it specifies the length of @var{pattern}, I think), and @var{pattern} is a hexadecimal representation of the set. AIX documentation refers to a limit of 32 bytes, but I see no reason why this limit should exist. This form could probably be used for arbitrary constants, not just sets; the only catch is that @var{pattern} should be understood to be target, not host, byte order and format. @end table The boolean, character, string, and set constants are not supported by GDB 4.9, but it ignores them. GDB 4.8 and earlier gave an error message and refused to read symbols from the file containing the constants. The above information is followed by @samp{;}. @node Variables @chapter Variables Different types of stabs describe the various ways that variables can be allocated: on the stack, globally, in registers, in common blocks, statically, or as arguments to a function. @menu * Stack Variables:: Variables allocated on the stack. * Global Variables:: Variables used by more than one source file. * Register Variables:: Variables in registers. * Common Blocks:: Variables statically allocated together. * Statics:: Variables local to one source file. * Based Variables:: Fortran pointer based variables. * Parameters:: Variables for arguments to functions. @end menu @node Stack Variables @section Automatic Variables Allocated on the Stack If a variable's scope is local to a function and its lifetime is only as long as that function executes (C calls such variables @dfn{automatic}), it can be allocated in a register (@pxref{Register Variables}) or on the stack. @findex N_LSYM, for stack variables @findex C_LSYM Each variable allocated on the stack has a stab with the symbol descriptor omitted. Since type information should begin with a digit, @samp{-}, or @samp{(}, only those characters precluded from being used for symbol descriptors. However, the Acorn RISC machine (ARM) is said to get this wrong: it puts out a mere type definition here, without the preceding @samp{@var{type-number}=}. This is a bad idea; there is no guarantee that type descriptors are distinct from symbol descriptors. Stabs for stack variables use the @code{N_LSYM} stab type, or @code{C_LSYM} for XCOFF. The value of the stab is the offset of the variable within the local variables. On most machines this is an offset from the frame pointer and is negative. The location of the stab specifies which block it is defined in; see @ref{Block Structure}. For example, the following C code: @example int main () @{ int x; @} @end example produces the following stabs: @example .stabs "main:F1",36,0,0,_main # @r{36 is N_FUN} .stabs "x:1",128,0,0,-12 # @r{128 is N_LSYM} .stabn 192,0,0,LBB2 # @r{192 is N_LBRAC} .stabn 224,0,0,LBE2 # @r{224 is N_RBRAC} @end example See @ref{Procedures} for more information on the @code{N_FUN} stab, and @ref{Block Structure} for more information on the @code{N_LBRAC} and @code{N_RBRAC} stabs. @node Global Variables @section Global Variables @findex N_GSYM @findex C_GSYM @c FIXME: verify for sure that it really is C_GSYM on XCOFF A variable whose scope is not specific to just one source file is represented by the @samp{G} symbol descriptor. These stabs use the @code{N_GSYM} stab type (C_GSYM for XCOFF). The type information for the stab (@pxref{String Field}) gives the type of the variable. For example, the following source code: @example char g_foo = 'c'; @end example @noindent yields the following assembly code: @example .stabs "g_foo:G2",32,0,0,0 # @r{32 is N_GSYM} .global _g_foo .data _g_foo: .byte 99 @end example The address of the variable represented by the @code{N_GSYM} is not contained in the @code{N_GSYM} stab. The debugger gets this information from the external symbol for the global variable. In the example above, the @code{.global _g_foo} and @code{_g_foo:} lines tell the assembler to produce an external symbol. Some compilers, like GCC, output @code{N_GSYM} stabs only once, where the variable is defined. Other compilers, like SunOS4 /bin/cc, output a @code{N_GSYM} stab for each compilation unit which references the variable. @node Register Variables @section Register Variables @findex N_RSYM @findex C_RSYM @c According to an old version of this manual, AIX uses C_RPSYM instead @c of C_RSYM. I am skeptical; this should be verified. Register variables have their own stab type, @code{N_RSYM} (@code{C_RSYM} for XCOFF), and their own symbol descriptor, @samp{r}. The stab's value is the number of the register where the variable data will be stored. @c .stabs "name:type",N_RSYM,0,RegSize,RegNumber (Sun doc) AIX defines a separate symbol descriptor @samp{d} for floating point registers. This seems unnecessary; why not just just give floating point registers different register numbers? I have not verified whether the compiler actually uses @samp{d}. If the register is explicitly allocated to a global variable, but not initialized, as in: @example register int g_bar asm ("%g5"); @end example @noindent then the stab may be emitted at the end of the object file, with the other bss symbols. @node Common Blocks @section Common Blocks A common block is a statically allocated section of memory which can be referred to by several source files. It may contain several variables. I believe Fortran is the only language with this feature. @findex N_BCOMM @findex N_ECOMM @findex C_BCOMM @findex C_ECOMM A @code{N_BCOMM} stab begins a common block and an @code{N_ECOMM} stab ends it. The only field that is significant in these two stabs is the string, which names a normal (non-debugging) symbol that gives the address of the common block. According to IBM documentation, only the @code{N_BCOMM} has the name of the common block (even though their compiler actually puts it both places). @findex N_ECOML @findex C_ECOML The stabs for the members of the common block are between the @code{N_BCOMM} and the @code{N_ECOMM}; the value of each stab is the offset within the common block of that variable. IBM uses the @code{C_ECOML} stab type, and there is a corresponding @code{N_ECOML} stab type, but Sun's Fortran compiler uses @code{N_GSYM} instead. The variables within a common block use the @samp{V} symbol descriptor (I believe this is true of all Fortran variables). Other stabs (at least type declarations using @code{C_DECL}) can also be between the @code{N_BCOMM} and the @code{N_ECOMM}. @node Statics @section Static Variables Initialized static variables are represented by the @samp{S} and @samp{V} symbol descriptors. @samp{S} means file scope static, and @samp{V} means procedure scope static. One exception: in XCOFF, IBM's xlc compiler always uses @samp{V}, and whether it is file scope or not is distinguished by whether the stab is located within a function. @c This is probably not worth mentioning; it is only true on the sparc @c for `double' variables which although declared const are actually in @c the data segment (the text segment can't guarantee 8 byte alignment). @c (although GCC @c 2.4.5 has a bug in that it uses @code{N_FUN}, so neither dbx nor GDB can @c find the variables) @findex N_STSYM @findex N_LCSYM @findex N_FUN, for variables @findex N_ROSYM In a.out files, @code{N_STSYM} means the data section, @code{N_FUN} means the text section, and @code{N_LCSYM} means the bss section. For those systems with a read-only data section separate from the text section (Solaris), @code{N_ROSYM} means the read-only data section. For example, the source lines: @example static const int var_const = 5; static int var_init = 2; static int var_noinit; @end example @noindent yield the following stabs: @example .stabs "var_const:S1",36,0,0,_var_const # @r{36 is N_FUN} @dots{} .stabs "var_init:S1",38,0,0,_var_init # @r{38 is N_STSYM} @dots{} .stabs "var_noinit:S1",40,0,0,_var_noinit # @r{40 is N_LCSYM} @end example @findex C_STSYM @findex C_BSTAT @findex C_ESTAT In XCOFF files, the stab type need not indicate the section; @code{C_STSYM} can be used for all statics. Also, each static variable is enclosed in a static block. A @code{C_BSTAT} (emitted with a @samp{.bs} assembler directive) symbol begins the static block; its value is the symbol number of the csect symbol whose value is the address of the static block, its section is the section of the variables in that static block, and its name is @samp{.bs}. A @code{C_ESTAT} (emitted with a @samp{.es} assembler directive) symbol ends the static block; its name is @samp{.es} and its value and section are ignored. In ECOFF files, the storage class is used to specify the section, so the stab type need not indicate the section. In ELF files, for the SunPRO compiler version 2.0.1, symbol descriptor @samp{S} means that the address is absolute (the linker relocates it) and symbol descriptor @samp{V} means that the address is relative to the start of the relevant section for that compilation unit. SunPRO has plans to have the linker stop relocating stabs; I suspect that their the debugger gets the address from the corresponding ELF (not stab) symbol. I'm not sure how to find which symbol of that name is the right one. The clean way to do all this would be to have the value of a symbol descriptor @samp{S} symbol be an offset relative to the start of the file, just like everything else, but that introduces obvious compatibility problems. For more information on linker stab relocation, @xref{ELF Linker Relocation}. @node Based Variables @section Fortran Based Variables Fortran (at least, the Sun and SGI dialects of FORTRAN-77) has a feature which allows allocating arrays with @code{malloc}, but which avoids blurring the line between arrays and pointers the way that C does. In stabs such a variable uses the @samp{b} symbol descriptor. For example, the Fortran declarations @example real foo, foo10(10), foo10_5(10,5) pointer (foop, foo) pointer (foo10p, foo10) pointer (foo105p, foo10_5) @end example produce the stabs @example foo:b6 foo10:bar3;1;10;6 foo10_5:bar3;1;5;ar3;1;10;6 @end example In this example, @code{real} is type 6 and type 3 is an integral type which is the type of the subscripts of the array (probably @code{integer}). The @samp{b} symbol descriptor is like @samp{V} in that it denotes a statically allocated symbol whose scope is local to a function; see @xref{Statics}. The value of the symbol, instead of being the address of the variable itself, is the address of a pointer to that variable. So in the above example, the value of the @code{foo} stab is the address of a pointer to a real, the value of the @code{foo10} stab is the address of a pointer to a 10-element array of reals, and the value of the @code{foo10_5} stab is the address of a pointer to a 5-element array of 10-element arrays of reals. @node Parameters @section Parameters Formal parameters to a function are represented by a stab (or sometimes two; see below) for each parameter. The stabs are in the order in which the debugger should print the parameters (i.e., the order in which the parameters are declared in the source file). The exact form of the stab depends on how the parameter is being passed. @findex N_PSYM @findex C_PSYM Parameters passed on the stack use the symbol descriptor @samp{p} and the @code{N_PSYM} symbol type (or @code{C_PSYM} for XCOFF). The value of the symbol is an offset used to locate the parameter on the stack; its exact meaning is machine-dependent, but on most machines it is an offset from the frame pointer. As a simple example, the code: @example main (argc, argv) int argc; char **argv; @end example produces the stabs: @example .stabs "main:F1",36,0,0,_main # @r{36 is N_FUN} .stabs "argc:p1",160,0,0,68 # @r{160 is N_PSYM} .stabs "argv:p20=*21=*2",160,0,0,72 @end example The type definition of @code{argv} is interesting because it contains several type definitions. Type 21 is pointer to type 2 (char) and @code{argv} (type 20) is pointer to type 21. @c FIXME: figure out what these mean and describe them coherently. The following symbol descriptors are also said to go with @code{N_PSYM}. The value of the symbol is said to be an offset from the argument pointer (I'm not sure whether this is true or not). @example pP (<>) pF Fortran function parameter X (function result variable) @end example @menu * Register Parameters:: * Local Variable Parameters:: * Reference Parameters:: * Conformant Arrays:: @end menu @node Register Parameters @subsection Passing Parameters in Registers If the parameter is passed in a register, then traditionally there are two symbols for each argument: @example .stabs "arg:p1" . . . ; N_PSYM .stabs "arg:r1" . . . ; N_RSYM @end example Debuggers use the second one to find the value, and the first one to know that it is an argument. @findex C_RPSYM @findex N_RSYM, for parameters Because that approach is kind of ugly, some compilers use symbol descriptor @samp{P} or @samp{R} to indicate an argument which is in a register. Symbol type @code{C_RPSYM} is used in XCOFF and @code{N_RSYM} is used otherwise. The symbol's value is the register number. @samp{P} and @samp{R} mean the same thing; the difference is that @samp{P} is a GNU invention and @samp{R} is an IBM (XCOFF) invention. As of version 4.9, GDB should handle either one. There is at least one case where GCC uses a @samp{p} and @samp{r} pair rather than @samp{P}; this is where the argument is passed in the argument list and then loaded into a register. According to the AIX documentation, symbol descriptor @samp{D} is for a parameter passed in a floating point register. This seems unnecessary---why not just use @samp{R} with a register number which indicates that it's a floating point register? I haven't verified whether the system actually does what the documentation indicates. @c FIXME: On the hppa this is for any type > 8 bytes, I think, and not @c for small structures (investigate). On the sparc and hppa, for a @samp{P} symbol whose type is a structure or union, the register contains the address of the structure. On the sparc, this is also true of a @samp{p} and @samp{r} pair (using Sun @code{cc}) or a @samp{p} symbol. However, if a (small) structure is really in a register, @samp{r} is used. And, to top it all off, on the hppa it might be a structure which was passed on the stack and loaded into a register and for which there is a @samp{p} and @samp{r} pair! I believe that symbol descriptor @samp{i} is supposed to deal with this case (it is said to mean "value parameter by reference, indirect access"; I don't know the source for this information), but I don't know details or what compilers or debuggers use it, if any (not GDB or GCC). It is not clear to me whether this case needs to be dealt with differently than parameters passed by reference (@pxref{Reference Parameters}). @node Local Variable Parameters @subsection Storing Parameters as Local Variables There is a case similar to an argument in a register, which is an argument that is actually stored as a local variable. Sometimes this happens when the argument was passed in a register and then the compiler stores it as a local variable. If possible, the compiler should claim that it's in a register, but this isn't always done. If a parameter is passed as one type and converted to a smaller type by the prologue (for example, the parameter is declared as a @code{float}, but the calling conventions specify that it is passed as a @code{double}), then GCC2 (sometimes) uses a pair of symbols. The first symbol uses symbol descriptor @samp{p} and the type which is passed. The second symbol has the type and location which the parameter actually has after the prologue. For example, suppose the following C code appears with no prototypes involved: @example void subr (f) float f; @{ @end example if @code{f} is passed as a double at stack offset 8, and the prologue converts it to a float in register number 0, then the stabs look like: @example .stabs "f:p13",160,0,3,8 # @r{160 is @code{N_PSYM}, here 13 is @code{double}} .stabs "f:r12",64,0,3,0 # @r{64 is @code{N_RSYM}, here 12 is @code{float}} @end example In both stabs 3 is the line number where @code{f} is declared (@pxref{Line Numbers}). @findex N_LSYM, for parameter GCC, at least on the 960, has another solution to the same problem. It uses a single @samp{p} symbol descriptor for an argument which is stored as a local variable but uses @code{N_LSYM} instead of @code{N_PSYM}. In this case, the value of the symbol is an offset relative to the local variables for that function, not relative to the arguments; on some machines those are the same thing, but not on all. @c This is mostly just background info; the part that logically belongs @c here is the last sentence. On the VAX or on other machines in which the calling convention includes the number of words of arguments actually passed, the debugger (GDB at least) uses the parameter symbols to keep track of whether it needs to print nameless arguments in addition to the formal parameters which it has printed because each one has a stab. For example, in @example extern int fprintf (FILE *stream, char *format, @dots{}); @dots{} fprintf (stdout, "%d\n", x); @end example there are stabs for @code{stream} and @code{format}. On most machines, the debugger can only print those two arguments (because it has no way of knowing that additional arguments were passed), but on the VAX or other machines with a calling convention which indicates the number of words of arguments, the debugger can print all three arguments. To do so, the parameter symbol (symbol descriptor @samp{p}) (not necessarily @samp{r} or symbol descriptor omitted symbols) needs to contain the actual type as passed (for example, @code{double} not @code{float} if it is passed as a double and converted to a float). @node Reference Parameters @subsection Passing Parameters by Reference If the parameter is passed by reference (e.g., Pascal @code{VAR} parameters), then the symbol descriptor is @samp{v} if it is in the argument list, or @samp{a} if it in a register. Other than the fact that these contain the address of the parameter rather than the parameter itself, they are identical to @samp{p} and @samp{R}, respectively. I believe @samp{a} is an AIX invention; @samp{v} is supported by all stabs-using systems as far as I know. @node Conformant Arrays @subsection Passing Conformant Array Parameters @c Is this paragraph correct? It is based on piecing together patchy @c information and some guesswork Conformant arrays are a feature of Modula-2, and perhaps other languages, in which the size of an array parameter is not known to the called function until run-time. Such parameters have two stabs: a @samp{x} for the array itself, and a @samp{C}, which represents the size of the array. The value of the @samp{x} stab is the offset in the argument list where the address of the array is stored (it this right? it is a guess); the value of the @samp{C} stab is the offset in the argument list where the size of the array (in elements? in bytes?) is stored. @node Types @chapter Defining Types The examples so far have described types as references to previously defined types, or defined in terms of subranges of or pointers to previously defined types. This chapter describes the other type descriptors that may follow the @samp{=} in a type definition. @menu * Builtin Types:: Integers, floating point, void, etc. * Miscellaneous Types:: Pointers, sets, files, etc. * Cross-References:: Referring to a type not yet defined. * Subranges:: A type with a specific range. * Arrays:: An aggregate type of same-typed elements. * Strings:: Like an array but also has a length. * Enumerations:: Like an integer but the values have names. * Structures:: An aggregate type of different-typed elements. * Typedefs:: Giving a type a name. * Unions:: Different types sharing storage. * Function Types:: @end menu @node Builtin Types @section Builtin Types Certain types are built in (@code{int}, @code{short}, @code{void}, @code{float}, etc.); the debugger recognizes these types and knows how to handle them. Thus, don't be surprised if some of the following ways of specifying builtin types do not specify everything that a debugger would need to know about the type---in some cases they merely specify enough information to distinguish the type from other types. The traditional way to define builtin types is convoluted, so new ways have been invented to describe them. Sun's @code{acc} uses special builtin type descriptors (@samp{b} and @samp{R}), and IBM uses negative type numbers. GDB accepts all three ways, as of version 4.8; dbx just accepts the traditional builtin types and perhaps one of the other two formats. The following sections describe each of these formats. @menu * Traditional Builtin Types:: Put on your seat belts and prepare for kludgery * Builtin Type Descriptors:: Builtin types with special type descriptors * Negative Type Numbers:: Builtin types using negative type numbers @end menu @node Traditional Builtin Types @subsection Traditional Builtin Types This is the traditional, convoluted method for defining builtin types. There are several classes of such type definitions: integer, floating point, and @code{void}. @menu * Traditional Integer Types:: * Traditional Other Types:: @end menu @node Traditional Integer Types @subsubsection Traditional Integer Types Often types are defined as subranges of themselves. If the bounding values fit within an @code{int}, then they are given normally. For example: @example .stabs "int:t1=r1;-2147483648;2147483647;",128,0,0,0 # @r{128 is N_LSYM} .stabs "char:t2=r2;0;127;",128,0,0,0 @end example Builtin types can also be described as subranges of @code{int}: @example .stabs "unsigned short:t6=r1;0;65535;",128,0,0,0 @end example If the lower bound of a subrange is 0 and the upper bound is -1, the type is an unsigned integral type whose bounds are too big to describe in an @code{int}. Traditionally this is only used for @code{unsigned int} and @code{unsigned long}: @example .stabs "unsigned int:t4=r1;0;-1;",128,0,0,0 @end example For larger types, GCC 2.4.5 puts out bounds in octal, with one or more leading zeroes. In this case a negative bound consists of a number which is a 1 bit (for the sign bit) followed by a 0 bit for each bit in the number (except the sign bit), and a positive bound is one which is a 1 bit for each bit in the number (except possibly the sign bit). All known versions of dbx and GDB version 4 accept this (at least in the sense of not refusing to process the file), but GDB 3.5 refuses to read the whole file containing such symbols. So GCC 2.3.3 did not output the proper size for these types. As an example of octal bounds, the string fields of the stabs for 64 bit integer types look like: @c .stabs directives, etc., omitted to make it fit on the page. @example long int:t3=r1;001000000000000000000000;000777777777777777777777; long unsigned int:t5=r1;000000000000000000000000;001777777777777777777777; @end example If the lower bound of a subrange is 0 and the upper bound is negative, the type is an unsigned integral type whose size in bytes is the absolute value of the upper bound. I believe this is a Convex convention for @code{unsigned long long}. If the lower bound of a subrange is negative and the upper bound is 0, the type is a signed integral type whose size in bytes is the absolute value of the lower bound. I believe this is a Convex convention for @code{long long}. To distinguish this from a legitimate subrange, the type should be a subrange of itself. I'm not sure whether this is the case for Convex. @node Traditional Other Types @subsubsection Traditional Other Types If the upper bound of a subrange is 0 and the lower bound is positive, the type is a floating point type, and the lower bound of the subrange indicates the number of bytes in the type: @example .stabs "float:t12=r1;4;0;",128,0,0,0 .stabs "double:t13=r1;8;0;",128,0,0,0 @end example However, GCC writes @code{long double} the same way it writes @code{double}, so there is no way to distinguish. @example .stabs "long double:t14=r1;8;0;",128,0,0,0 @end example Complex types are defined the same way as floating-point types; there is no way to distinguish a single-precision complex from a double-precision floating-point type. The C @code{void} type is defined as itself: @example .stabs "void:t15=15",128,0,0,0 @end example I'm not sure how a boolean type is represented. @node Builtin Type Descriptors @subsection Defining Builtin Types Using Builtin Type Descriptors This is the method used by Sun's @code{acc} for defining builtin types. These are the type descriptors to define builtin types: @table @code @c FIXME: clean up description of width and offset, once we figure out @c what they mean @item b @var{signed} @var{char-flag} @var{width} ; @var{offset} ; @var{nbits} ; Define an integral type. @var{signed} is @samp{u} for unsigned or @samp{s} for signed. @var{char-flag} is @samp{c} which indicates this is a character type, or is omitted. I assume this is to distinguish an integral type from a character type of the same size, for example it might make sense to set it for the C type @code{wchar_t} so the debugger can print such variables differently (Solaris does not do this). Sun sets it on the C types @code{signed char} and @code{unsigned char} which arguably is wrong. @var{width} and @var{offset} appear to be for small objects stored in larger ones, for example a @code{short} in an @code{int} register. @var{width} is normally the number of bytes in the type. @var{offset} seems to always be zero. @var{nbits} is the number of bits in the type. Note that type descriptor @samp{b} used for builtin types conflicts with its use for Pascal space types (@pxref{Miscellaneous Types}); they can be distinguished because the character following the type descriptor will be a digit, @samp{(}, or @samp{-} for a Pascal space type, or @samp{u} or @samp{s} for a builtin type. @item w Documented by AIX to define a wide character type, but their compiler actually uses negative type numbers (@pxref{Negative Type Numbers}). @item R @var{fp-type} ; @var{bytes} ; Define a floating point type. @var{fp-type} has one of the following values: @table @code @item 1 (NF_SINGLE) IEEE 32-bit (single precision) floating point format. @item 2 (NF_DOUBLE) IEEE 64-bit (double precision) floating point format. @item 3 (NF_COMPLEX) @item 4 (NF_COMPLEX16) @item 5 (NF_COMPLEX32) @c "GDB source" really means @file{include/aout/stab_gnu.h}, but trying @c to put that here got an overfull hbox. These are for complex numbers. A comment in the GDB source describes them as Fortran @code{complex}, @code{double complex}, and @code{complex*16}, respectively, but what does that mean? (i.e., Single precision? Double precision?). @item 6 (NF_LDOUBLE) Long double. This should probably only be used for Sun format @code{long double}, and new codes should be used for other floating point formats (@code{NF_DOUBLE} can be used if a @code{long double} is really just an IEEE double, of course). @end table @var{bytes} is the number of bytes occupied by the type. This allows a debugger to perform some operations with the type even if it doesn't understand @var{fp-type}. @item g @var{type-information} ; @var{nbits} Documented by AIX to define a floating type, but their compiler actually uses negative type numbers (@pxref{Negative Type Numbers}). @item c @var{type-information} ; @var{nbits} Documented by AIX to define a complex type, but their compiler actually uses negative type numbers (@pxref{Negative Type Numbers}). @end table The C @code{void} type is defined as a signed integral type 0 bits long: @example .stabs "void:t19=bs0;0;0",128,0,0,0 @end example The Solaris compiler seems to omit the trailing semicolon in this case. Getting sloppy in this way is not a swift move because if a type is embedded in a more complex expression it is necessary to be able to tell where it ends. I'm not sure how a boolean type is represented. @node Negative Type Numbers @subsection Negative Type Numbers This is the method used in XCOFF for defining builtin types. Since the debugger knows about the builtin types anyway, the idea of negative type numbers is simply to give a special type number which indicates the builtin type. There is no stab defining these types. There are several subtle issues with negative type numbers. One is the size of the type. A builtin type (for example the C types @code{int} or @code{long}) might have different sizes depending on compiler options, the target architecture, the ABI, etc. This issue doesn't come up for IBM tools since (so far) they just target the RS/6000; the sizes indicated below for each size are what the IBM RS/6000 tools use. To deal with differing sizes, either define separate negative type numbers for each size (which works but requires changing the debugger, and, unless you get both AIX dbx and GDB to accept the change, introduces an incompatibility), or use a type attribute (@pxref{String Field}) to define a new type with the appropriate size (which merely requires a debugger which understands type attributes, like AIX dbx or GDB). For example, @example .stabs "boolean:t10=@@s8;-16",128,0,0,0 @end example defines an 8-bit boolean type, and @example .stabs "boolean:t10=@@s64;-16",128,0,0,0 @end example defines a 64-bit boolean type. A similar issue is the format of the type. This comes up most often for floating-point types, which could have various formats (particularly extended doubles, which vary quite a bit even among IEEE systems). Again, it is best to define a new negative type number for each different format; changing the format based on the target system has various problems. One such problem is that the Alpha has both VAX and IEEE floating types. One can easily imagine one library using the VAX types and another library in the same executable using the IEEE types. Another example is that the interpretation of whether a boolean is true or false can be based on the least significant bit, most significant bit, whether it is zero, etc., and different compilers (or different options to the same compiler) might provide different kinds of boolean. The last major issue is the names of the types. The name of a given type depends @emph{only} on the negative type number given; these do not vary depending on the language, the target system, or anything else. One can always define separate type numbers---in the following list you will see for example separate @code{int} and @code{integer*4} types which are identical except for the name. But compatibility can be maintained by not inventing new negative type numbers and instead just defining a new type with a new name. For example: @example .stabs "CARDINAL:t10=-8",128,0,0,0 @end example Here is the list of negative type numbers. The phrase @dfn{integral type} is used to mean twos-complement (I strongly suspect that all machines which use stabs use twos-complement; most machines use twos-complement these days). @table @code @item -1 @code{int}, 32 bit signed integral type. @item -2 @code{char}, 8 bit type holding a character. Both GDB and dbx on AIX treat this as signed. GCC uses this type whether @code{char} is signed or not, which seems like a bad idea. The AIX compiler (@code{xlc}) seems to avoid this type; it uses -5 instead for @code{char}. @item -3 @code{short}, 16 bit signed integral type. @item -4 @code{long}, 32 bit signed integral type. @item -5 @code{unsigned char}, 8 bit unsigned integral type. @item -6 @code{signed char}, 8 bit signed integral type. @item -7 @code{unsigned short}, 16 bit unsigned integral type. @item -8 @code{unsigned int}, 32 bit unsigned integral type. @item -9 @code{unsigned}, 32 bit unsigned integral type. @item -10 @code{unsigned long}, 32 bit unsigned integral type. @item -11 @code{void}, type indicating the lack of a value. @item -12 @code{float}, IEEE single precision. @item -13 @code{double}, IEEE double precision. @item -14 @code{long double}, IEEE double precision. The compiler claims the size will increase in a future release, and for binary compatibility you have to avoid using @code{long double}. I hope when they increase it they use a new negative type number. @item -15 @code{integer}. 32 bit signed integral type. @item -16 @code{boolean}. 32 bit type. GDB and GCC assume that zero is false, one is true, and other values have unspecified meaning. I hope this agrees with how the IBM tools use the type. @item -17 @code{short real}. IEEE single precision. @item -18 @code{real}. IEEE double precision. @item -19 @code{stringptr}. @xref{Strings}. @item -20 @code{character}, 8 bit unsigned character type. @item -21 @code{logical*1}, 8 bit type. This Fortran type has a split personality in that it is used for boolean variables, but can also be used for unsigned integers. 0 is false, 1 is true, and other values are non-boolean. @item -22 @code{logical*2}, 16 bit type. This Fortran type has a split personality in that it is used for boolean variables, but can also be used for unsigned integers. 0 is false, 1 is true, and other values are non-boolean. @item -23 @code{logical*4}, 32 bit type. This Fortran type has a split personality in that it is used for boolean variables, but can also be used for unsigned integers. 0 is false, 1 is true, and other values are non-boolean. @item -24 @code{logical}, 32 bit type. This Fortran type has a split personality in that it is used for boolean variables, but can also be used for unsigned integers. 0 is false, 1 is true, and other values are non-boolean. @item -25 @code{complex}. A complex type consisting of two IEEE single-precision floating point values. @item -26 @code{complex}. A complex type consisting of two IEEE double-precision floating point values. @item -27 @code{integer*1}, 8 bit signed integral type. @item -28 @code{integer*2}, 16 bit signed integral type. @item -29 @code{integer*4}, 32 bit signed integral type. @item -30 @code{wchar}. Wide character, 16 bits wide, unsigned (what format? Unicode?). @item -31 @code{long long}, 64 bit signed integral type. @item -32 @code{unsigned long long}, 64 bit unsigned integral type. @item -33 @code{logical*8}, 64 bit unsigned integral type. @item -34 @code{integer*8}, 64 bit signed integral type. @end table @node Miscellaneous Types @section Miscellaneous Types @table @code @item b @var{type-information} ; @var{bytes} Pascal space type. This is documented by IBM; what does it mean? This use of the @samp{b} type descriptor can be distinguished from its use for builtin integral types (@pxref{Builtin Type Descriptors}) because the character following the type descriptor is always a digit, @samp{(}, or @samp{-}. @item B @var{type-information} A volatile-qualified version of @var{type-information}. This is a Sun extension. References and stores to a variable with a volatile-qualified type must not be optimized or cached; they must occur as the user specifies them. @item d @var{type-information} File of type @var{type-information}. As far as I know this is only used by Pascal. @item k @var{type-information} A const-qualified version of @var{type-information}. This is a Sun extension. A variable with a const-qualified type cannot be modified. @item M @var{type-information} ; @var{length} Multiple instance type. The type seems to composed of @var{length} repetitions of @var{type-information}, for example @code{character*3} is represented by @samp{M-2;3}, where @samp{-2} is a reference to a character type (@pxref{Negative Type Numbers}). I'm not sure how this differs from an array. This appears to be a Fortran feature. @var{length} is a bound, like those in range types; see @ref{Subranges}. @item S @var{type-information} Pascal set type. @var{type-information} must be a small type such as an enumeration or a subrange, and the type is a bitmask whose length is specified by the number of elements in @var{type-information}. In CHILL, if it is a bitstring instead of a set, also use the @samp{S} type attribute (@pxref{String Field}). @item * @var{type-information} Pointer to @var{type-information}. @end table @node Cross-References @section Cross-References to Other Types A type can be used before it is defined; one common way to deal with that situation is just to use a type reference to a type which has not yet been defined. Another way is with the @samp{x} type descriptor, which is followed by @samp{s} for a structure tag, @samp{u} for a union tag, or @samp{e} for a enumerator tag, followed by the name of the tag, followed by @samp{:}. If the name contains @samp{::} between a @samp{<} and @samp{>} pair (for C@t{++} templates), such a @samp{::} does not end the name---only a single @samp{:} ends the name; see @ref{Nested Symbols}. For example, the following C declarations: @example struct foo; struct foo *bar; @end example @noindent produce: @example .stabs "bar:G16=*17=xsfoo:",32,0,0,0 @end example Not all debuggers support the @samp{x} type descriptor, so on some machines GCC does not use it. I believe that for the above example it would just emit a reference to type 17 and never define it, but I haven't verified that. Modula-2 imported types, at least on AIX, use the @samp{i} type descriptor, which is followed by the name of the module from which the type is imported, followed by @samp{:}, followed by the name of the type. There is then optionally a comma followed by type information for the type. This differs from merely naming the type (@pxref{Typedefs}) in that it identifies the module; I don't understand whether the name of the type given here is always just the same as the name we are giving it, or whether this type descriptor is used with a nameless stab (@pxref{String Field}), or what. The symbol ends with @samp{;}. @node Subranges @section Subrange Types The @samp{r} type descriptor defines a type as a subrange of another type. It is followed by type information for the type of which it is a subrange, a semicolon, an integral lower bound, a semicolon, an integral upper bound, and a semicolon. The AIX documentation does not specify the trailing semicolon, in an effort to specify array indexes more cleanly, but a subrange which is not an array index has always included a trailing semicolon (@pxref{Arrays}). Instead of an integer, either bound can be one of the following: @table @code @item A @var{offset} The bound is passed by reference on the stack at offset @var{offset} from the argument list. @xref{Parameters}, for more information on such offsets. @item T @var{offset} The bound is passed by value on the stack at offset @var{offset} from the argument list. @item a @var{register-number} The bound is passed by reference in register number @var{register-number}. @item t @var{register-number} The bound is passed by value in register number @var{register-number}. @item J There is no bound. @end table Subranges are also used for builtin types; see @ref{Traditional Builtin Types}. @node Arrays @section Array Types Arrays use the @samp{a} type descriptor. Following the type descriptor is the type of the index and the type of the array elements. If the index type is a range type, it ends in a semicolon; otherwise (for example, if it is a type reference), there does not appear to be any way to tell where the types are separated. In an effort to clean up this mess, IBM documents the two types as being separated by a semicolon, and a range type as not ending in a semicolon (but this is not right for range types which are not array indexes, @pxref{Subranges}). I think probably the best solution is to specify that a semicolon ends a range type, and that the index type and element type of an array are separated by a semicolon, but that if the index type is a range type, the extra semicolon can be omitted. GDB (at least through version 4.9) doesn't support any kind of index type other than a range anyway; I'm not sure about dbx. It is well established, and widely used, that the type of the index, unlike most types found in the stabs, is merely a type definition, not type information (@pxref{String Field}) (that is, it need not start with @samp{@var{type-number}=} if it is defining a new type). According to a comment in GDB, this is also true of the type of the array elements; it gives @samp{ar1;1;10;ar1;1;10;4} as a legitimate way to express a two dimensional array. According to AIX documentation, the element type must be type information. GDB accepts either. The type of the index is often a range type, expressed as the type descriptor @samp{r} and some parameters. It defines the size of the array. In the example below, the range @samp{r1;0;2;} defines an index type which is a subrange of type 1 (integer), with a lower bound of 0 and an upper bound of 2. This defines the valid range of subscripts of a three-element C array. For example, the definition: @example char char_vec[3] = @{'a','b','c'@}; @end example @noindent produces the output: @example .stabs "char_vec:G19=ar1;0;2;2",32,0,0,0 .global _char_vec .align 4 _char_vec: .byte 97 .byte 98 .byte 99 @end example If an array is @dfn{packed}, the elements are spaced more closely than normal, saving memory at the expense of speed. For example, an array of 3-byte objects might, if unpacked, have each element aligned on a 4-byte boundary, but if packed, have no padding. One way to specify that something is packed is with type attributes (@pxref{String Field}). In the case of arrays, another is to use the @samp{P} type descriptor instead of @samp{a}. Other than specifying a packed array, @samp{P} is identical to @samp{a}. @c FIXME-what is it? A pointer? An open array is represented by the @samp{A} type descriptor followed by type information specifying the type of the array elements. @c FIXME: what is the format of this type? A pointer to a vector of pointers? An N-dimensional dynamic array is represented by @example D @var{dimensions} ; @var{type-information} @end example @c Does dimensions really have this meaning? The AIX documentation @c doesn't say. @var{dimensions} is the number of dimensions; @var{type-information} specifies the type of the array elements. @c FIXME: what is the format of this type? A pointer to some offsets in @c another array? A subarray of an N-dimensional array is represented by @example E @var{dimensions} ; @var{type-information} @end example @c Does dimensions really have this meaning? The AIX documentation @c doesn't say. @var{dimensions} is the number of dimensions; @var{type-information} specifies the type of the array elements. @node Strings @section Strings Some languages, like C or the original Pascal, do not have string types, they just have related things like arrays of characters. But most Pascals and various other languages have string types, which are indicated as follows: @table @code @item n @var{type-information} ; @var{bytes} @var{bytes} is the maximum length. I'm not sure what @var{type-information} is; I suspect that it means that this is a string of @var{type-information} (thus allowing a string of integers, a string of wide characters, etc., as well as a string of characters). Not sure what the format of this type is. This is an AIX feature. @item z @var{type-information} ; @var{bytes} Just like @samp{n} except that this is a gstring, not an ordinary string. I don't know the difference. @item N Pascal Stringptr. What is this? This is an AIX feature. @end table Languages, such as CHILL which have a string type which is basically just an array of characters use the @samp{S} type attribute (@pxref{String Field}). @node Enumerations @section Enumerations Enumerations are defined with the @samp{e} type descriptor. @c FIXME: Where does this information properly go? Perhaps it is @c redundant with something we already explain. The source line below declares an enumeration type at file scope. The type definition is located after the @code{N_RBRAC} that marks the end of the previous procedure's block scope, and before the @code{N_FUN} that marks the beginning of the next procedure's block scope. Therefore it does not describe a block local symbol, but a file local one. The source line: @example enum e_places @{first,second=3,last@}; @end example @noindent generates the following stab: @example .stabs "e_places:T22=efirst:0,second:3,last:4,;",128,0,0,0 @end example The symbol descriptor (@samp{T}) says that the stab describes a structure, enumeration, or union tag. The type descriptor @samp{e}, following the @samp{22=} of the type definition narrows it down to an enumeration type. Following the @samp{e} is a list of the elements of the enumeration. The format is @samp{@var{name}:@var{value},}. The list of elements ends with @samp{;}. The fact that @var{value} is specified as an integer can cause problems if the value is large. GCC 2.5.2 tries to output it in octal in that case with a leading zero, which is probably a good thing, although GDB 4.11 supports octal only in cases where decimal is perfectly good. Negative decimal values are supported by both GDB and dbx. There is no standard way to specify the size of an enumeration type; it is determined by the architecture (normally all enumerations types are 32 bits). Type attributes can be used to specify an enumeration type of another size for debuggers which support them; see @ref{String Field}. Enumeration types are unusual in that they define symbols for the enumeration values (@code{first}, @code{second}, and @code{third} in the above example), and even though these symbols are visible in the file as a whole (rather than being in a more local namespace like structure member names), they are defined in the type definition for the enumeration type rather than each having their own symbol. In order to be fast, GDB will only get symbols from such types (in its initial scan of the stabs) if the type is the first thing defined after a @samp{T} or @samp{t} symbol descriptor (the above example fulfills this requirement). If the type does not have a name, the compiler should emit it in a nameless stab (@pxref{String Field}); GCC does this. @node Structures @section Structures The encoding of structures in stabs can be shown with an example. The following source code declares a structure tag and defines an instance of the structure in global scope. Then a @code{typedef} equates the structure tag with a new type. Separate stabs are generated for the structure tag, the structure @code{typedef}, and the structure instance. The stabs for the tag and the @code{typedef} are emitted when the definitions are encountered. Since the structure elements are not initialized, the stab and code for the structure variable itself is located at the end of the program in the bss section. @example struct s_tag @{ int s_int; float s_float; char s_char_vec[8]; struct s_tag* s_next; @} g_an_s; typedef struct s_tag s_typedef; @end example The structure tag has an @code{N_LSYM} stab type because, like the enumeration, the symbol has file scope. Like the enumeration, the symbol descriptor is @samp{T}, for enumeration, structure, or tag type. The type descriptor @samp{s} following the @samp{16=} of the type definition narrows the symbol type to structure. Following the @samp{s} type descriptor is the number of bytes the structure occupies, followed by a description of each structure element. The structure element descriptions are of the form @samp{@var{name}:@var{type}, @var{bit offset from the start of the struct}, @var{number of bits in the element}}. @c FIXME: phony line break. Can probably be fixed by using an example @c with fewer fields. @example # @r{128 is N_LSYM} .stabs "s_tag:T16=s20s_int:1,0,32;s_float:12,32,32; s_char_vec:17=ar1;0;7;2,64,64;s_next:18=*16,128,32;;",128,0,0,0 @end example In this example, the first two structure elements are previously defined types. For these, the type following the @samp{@var{name}:} part of the element description is a simple type reference. The other two structure elements are new types. In this case there is a type definition embedded after the @samp{@var{name}:}. The type definition for the array element looks just like a type definition for a stand-alone array. The @code{s_next} field is a pointer to the same kind of structure that the field is an element of. So the definition of structure type 16 contains a type definition for an element which is a pointer to type 16. If a field is a static member (this is a C@t{++} feature in which a single variable appears to be a field of every structure of a given type) it still starts out with the field name, a colon, and the type, but then instead of a comma, bit position, comma, and bit size, there is a colon followed by the name of the variable which each such field refers to. If the structure has methods (a C@t{++} feature), they follow the non-method fields; see @ref{Cplusplus}. @node Typedefs @section Giving a Type a Name @findex N_LSYM, for types @findex C_DECL, for types To give a type a name, use the @samp{t} symbol descriptor. The type is specified by the type information (@pxref{String Field}) for the stab. For example, @example .stabs "s_typedef:t16",128,0,0,0 # @r{128 is N_LSYM} @end example specifies that @code{s_typedef} refers to type number 16. Such stabs have symbol type @code{N_LSYM} (or @code{C_DECL} for XCOFF). (The Sun documentation mentions using @code{N_GSYM} in some cases). If you are specifying the tag name for a structure, union, or enumeration, use the @samp{T} symbol descriptor instead. I believe C is the only language with this feature. If the type is an opaque type (I believe this is a Modula-2 feature), AIX provides a type descriptor to specify it. The type descriptor is @samp{o} and is followed by a name. I don't know what the name means---is it always the same as the name of the type, or is this type descriptor used with a nameless stab (@pxref{String Field})? There optionally follows a comma followed by type information which defines the type of this type. If omitted, a semicolon is used in place of the comma and the type information, and the type is much like a generic pointer type---it has a known size but little else about it is specified. @node Unions @section Unions @example union u_tag @{ int u_int; float u_float; char* u_char; @} an_u; @end example This code generates a stab for a union tag and a stab for a union variable. Both use the @code{N_LSYM} stab type. If a union variable is scoped locally to the procedure in which it is defined, its stab is located immediately preceding the @code{N_LBRAC} for the procedure's block start. The stab for the union tag, however, is located preceding the code for the procedure in which it is defined. The stab type is @code{N_LSYM}. This would seem to imply that the union type is file scope, like the struct type @code{s_tag}. This is not true. The contents and position of the stab for @code{u_type} do not convey any information about its procedure local scope. @c FIXME: phony line break. Can probably be fixed by using an example @c with fewer fields. @smallexample # @r{128 is N_LSYM} .stabs "u_tag:T23=u4u_int:1,0,32;u_float:12,0,32;u_char:21,0,32;;", 128,0,0,0 @end smallexample The symbol descriptor @samp{T}, following the @samp{name:} means that the stab describes an enumeration, structure, or union tag. The type descriptor @samp{u}, following the @samp{23=} of the type definition, narrows it down to a union type definition. Following the @samp{u} is the number of bytes in the union. After that is a list of union element descriptions. Their format is @samp{@var{name}:@var{type}, @var{bit offset into the union}, @var{number of bytes for the element};}. The stab for the union variable is: @example .stabs "an_u:23",128,0,0,-20 # @r{128 is N_LSYM} @end example @samp{-20} specifies where the variable is stored (@pxref{Stack Variables}). @node Function Types @section Function Types Various types can be defined for function variables. These types are not used in defining functions (@pxref{Procedures}); they are used for things like pointers to functions. The simple, traditional, type is type descriptor @samp{f} is followed by type information for the return type of the function, followed by a semicolon. This does not deal with functions for which the number and types of the parameters are part of the type, as in Modula-2 or ANSI C. AIX provides extensions to specify these, using the @samp{f}, @samp{F}, @samp{p}, and @samp{R} type descriptors. First comes the type descriptor. If it is @samp{f} or @samp{F}, this type involves a function rather than a procedure, and the type information for the return type of the function follows, followed by a comma. Then comes the number of parameters to the function and a semicolon. Then, for each parameter, there is the name of the parameter followed by a colon (this is only present for type descriptors @samp{R} and @samp{F} which represent Pascal function or procedure parameters), type information for the parameter, a comma, 0 if passed by reference or 1 if passed by value, and a semicolon. The type definition ends with a semicolon. For example, this variable definition: @example int (*g_pf)(); @end example @noindent generates the following code: @example .stabs "g_pf:G24=*25=f1",32,0,0,0 .common _g_pf,4,"bss" @end example The variable defines a new type, 24, which is a pointer to another new type, 25, which is a function returning @code{int}. @node Macro define and undefine @chapter Representation of #define and #undef This section describes the stabs support for macro define and undefine information, supported on some systems. (e.g., with @option{-g3} @option{-gstabs} when using GCC). A @code{#define @var{macro-name} @var{macro-body}} is represented with an @code{N_MAC_DEFINE} stab with a string field of @code{@var{macro-name} @var{macro-body}}. @findex N_MAC_DEFINE An @code{#undef @var{macro-name}} is represented with an @code{N_MAC_UNDEF} stabs with a string field of simply @code{@var{macro-name}}. @findex N_MAC_UNDEF For both @code{N_MAC_DEFINE} and @code{N_MAC_UNDEF}, the desc field is the line number within the file where the corresponding @code{#define} or @code{#undef} occurred. For example, the following C code: @example #define NONE 42 #define TWO(a, b) (a + (a) + 2 * b) #define ONE(c) (c + 19) main(int argc, char *argv[]) @{ func(NONE, TWO(10, 11)); func(NONE, ONE(23)); #undef ONE #define ONE(c) (c + 23) func(NONE, ONE(-23)); return (0); @} int global; func(int arg1, int arg2) @{ global = arg1 + arg2; @} @end example @noindent produces the following stabs (as well as many others): @example .stabs "NONE 42",54,0,1,0 .stabs "TWO(a,b) (a + (a) + 2 * b)",54,0,2,0 .stabs "ONE(c) (c + 19)",54,0,3,0 .stabs "ONE",58,0,10,0 .stabs "ONE(c) (c + 23)",54,0,11,0 @end example @noindent NOTE: In the above example, @code{54} is @code{N_MAC_DEFINE} and @code{58} is @code{N_MAC_UNDEF}. @node Symbol Tables @chapter Symbol Information in Symbol Tables This chapter describes the format of symbol table entries and how stab assembler directives map to them. It also describes the transformations that the assembler and linker make on data from stabs. @menu * Symbol Table Format:: * Transformations On Symbol Tables:: @end menu @node Symbol Table Format @section Symbol Table Format Each time the assembler encounters a stab directive, it puts each field of the stab into a corresponding field in a symbol table entry of its output file. If the stab contains a string field, the symbol table entry for that stab points to a string table entry containing the string data from the stab. Assembler labels become relocatable addresses. Symbol table entries in a.out have the format: @c FIXME: should refer to external, not internal. @example struct internal_nlist @{ unsigned long n_strx; /* index into string table of name */ unsigned char n_type; /* type of symbol */ unsigned char n_other; /* misc info (usually empty) */ unsigned short n_desc; /* description field */ bfd_vma n_value; /* value of symbol */ @}; @end example If the stab has a string, the @code{n_strx} field holds the offset in bytes of the string within the string table. The string is terminated by a NUL character. If the stab lacks a string (for example, it was produced by a @code{.stabn} or @code{.stabd} directive), the @code{n_strx} field is zero. Symbol table entries with @code{n_type} field values greater than 0x1f originated as stabs generated by the compiler (with one random exception). The other entries were placed in the symbol table of the executable by the assembler or the linker. @node Transformations On Symbol Tables @section Transformations on Symbol Tables The linker concatenates object files and does fixups of externally defined symbols. You can see the transformations made on stab data by the assembler and linker by examining the symbol table after each pass of the build. To do this, use @samp{nm -ap}, which dumps the symbol table, including debugging information, unsorted. For stab entries the columns are: @var{value}, @var{other}, @var{desc}, @var{type}, @var{string}. For assembler and linker symbols, the columns are: @var{value}, @var{type}, @var{string}. The low 5 bits of the stab type tell the linker how to relocate the value of the stab. Thus for stab types like @code{N_RSYM} and @code{N_LSYM}, where the value is an offset or a register number, the low 5 bits are @code{N_ABS}, which tells the linker not to relocate the value. Where the value of a stab contains an assembly language label, it is transformed by each build step. The assembler turns it into a relocatable address and the linker turns it into an absolute address. @menu * Transformations On Static Variables:: * Transformations On Global Variables:: * Stab Section Transformations:: For some object file formats, things are a bit different. @end menu @node Transformations On Static Variables @subsection Transformations on Static Variables This source line defines a static variable at file scope: @example static int s_g_repeat @end example @noindent The following stab describes the symbol: @example .stabs "s_g_repeat:S1",38,0,0,_s_g_repeat @end example @noindent The assembler transforms the stab into this symbol table entry in the @file{.o} file. The location is expressed as a data segment offset. @example 00000084 - 00 0000 STSYM s_g_repeat:S1 @end example @noindent In the symbol table entry from the executable, the linker has made the relocatable address absolute. @example 0000e00c - 00 0000 STSYM s_g_repeat:S1 @end example @node Transformations On Global Variables @subsection Transformations on Global Variables Stabs for global variables do not contain location information. In this case, the debugger finds location information in the assembler or linker symbol table entry describing the variable. The source line: @example char g_foo = 'c'; @end example @noindent generates the stab: @example .stabs "g_foo:G2",32,0,0,0 @end example The variable is represented by two symbol table entries in the object file (see below). The first one originated as a stab. The second one is an external symbol. The upper case @samp{D} signifies that the @code{n_type} field of the symbol table contains 7, @code{N_DATA} with local linkage. The stab's value is zero since the value is not used for @code{N_GSYM} stabs. The value of the linker symbol is the relocatable address corresponding to the variable. @example 00000000 - 00 0000 GSYM g_foo:G2 00000080 D _g_foo @end example @noindent These entries as transformed by the linker. The linker symbol table entry now holds an absolute address: @example 00000000 - 00 0000 GSYM g_foo:G2 @dots{} 0000e008 D _g_foo @end example @node Stab Section Transformations @subsection Transformations of Stabs in separate sections For object file formats using stabs in separate sections (@pxref{Stab Sections}), use @code{objdump --stabs} instead of @code{nm} to show the stabs in an object or executable file. @code{objdump} is a GNU utility; Sun does not provide any equivalent. The following example is for a stab whose value is an address is relative to the compilation unit (@pxref{ELF Linker Relocation}). For example, if the source line @example static int ld = 5; @end example appears within a function, then the assembly language output from the compiler contains: @example .Ddata.data: @dots{} .stabs "ld:V(0,3)",0x26,0,4,.L18-Ddata.data # @r{0x26 is N_STSYM} @dots{} .L18: .align 4 .word 0x5 @end example Because the value is formed by subtracting one symbol from another, the value is absolute, not relocatable, and so the object file contains @example Symnum n_type n_othr n_desc n_value n_strx String 31 STSYM 0 4 00000004 680 ld:V(0,3) @end example without any relocations, and the executable file also contains @example Symnum n_type n_othr n_desc n_value n_strx String 31 STSYM 0 4 00000004 680 ld:V(0,3) @end example @node Cplusplus @chapter GNU C@t{++} Stabs @menu * Class Names:: C++ class names are both tags and typedefs. * Nested Symbols:: C++ symbol names can be within other types. * Basic Cplusplus Types:: * Simple Classes:: * Class Instance:: * Methods:: Method definition * Method Type Descriptor:: The @samp{#} type descriptor * Member Type Descriptor:: The @samp{@@} type descriptor * Protections:: * Method Modifiers:: * Virtual Methods:: * Inheritance:: * Virtual Base Classes:: * Static Members:: @end menu @node Class Names @section C@t{++} Class Names In C@t{++}, a class name which is declared with @code{class}, @code{struct}, or @code{union}, is not only a tag, as in C, but also a type name. Thus there should be stabs with both @samp{t} and @samp{T} symbol descriptors (@pxref{Typedefs}). To save space, there is a special abbreviation for this case. If the @samp{T} symbol descriptor is followed by @samp{t}, then the stab defines both a type name and a tag. For example, the C@t{++} code @example struct foo @{int x;@}; @end example can be represented as either @example .stabs "foo:T19=s4x:1,0,32;;",128,0,0,0 # @r{128 is N_LSYM} .stabs "foo:t19",128,0,0,0 @end example or @example .stabs "foo:Tt19=s4x:1,0,32;;",128,0,0,0 @end example @node Nested Symbols @section Defining a Symbol Within Another Type In C@t{++}, a symbol (such as a type name) can be defined within another type. @c FIXME: Needs example. In stabs, this is sometimes represented by making the name of a symbol which contains @samp{::}. Such a pair of colons does not end the name of the symbol, the way a single colon would (@pxref{String Field}). I'm not sure how consistently used or well thought out this mechanism is. So that a pair of colons in this position always has this meaning, @samp{:} cannot be used as a symbol descriptor. For example, if the string for a stab is @samp{foo::bar::baz:t5=*6}, then @code{foo::bar::baz} is the name of the symbol, @samp{t} is the symbol descriptor, and @samp{5=*6} is the type information. @node Basic Cplusplus Types @section Basic Types For C@t{++} << the examples that follow are based on a01.C >> C@t{++} adds two more builtin types to the set defined for C. These are the unknown type and the vtable record type. The unknown type, type 16, is defined in terms of itself like the void type. The vtable record type, type 17, is defined as a structure type and then as a structure tag. The structure has four fields: delta, index, pfn, and delta2. pfn is the function pointer. << In boilerplate $vtbl_ptr_type, what are the fields delta, index, and delta2 used for? >> This basic type is present in all C@t{++} programs even if there are no virtual methods defined. @display .stabs "struct_name:sym_desc(type)type_def(17)=type_desc(struct)struct_bytes(8) elem_name(delta):type_ref(short int),bit_offset(0),field_bits(16); elem_name(index):type_ref(short int),bit_offset(16),field_bits(16); elem_name(pfn):type_def(18)=type_desc(ptr to)type_ref(void), bit_offset(32),field_bits(32); elem_name(delta2):type_def(short int);bit_offset(32),field_bits(16);;" N_LSYM, NIL, NIL @end display @smallexample .stabs "$vtbl_ptr_type:t17=s8 delta:6,0,16;index:6,16,16;pfn:18=*15,32,32;delta2:6,32,16;;" ,128,0,0,0 @end smallexample @display .stabs "name:sym_dec(struct tag)type_ref($vtbl_ptr_type)",N_LSYM,NIL,NIL,NIL @end display @example .stabs "$vtbl_ptr_type:T17",128,0,0,0 @end example @node Simple Classes @section Simple Class Definition The stabs describing C@t{++} language features are an extension of the stabs describing C. Stabs representing C@t{++} class types elaborate extensively on the stab format used to describe structure types in C. Stabs representing class type variables look just like stabs representing C language variables. Consider the following very simple class definition. @example class baseA @{ public: int Adat; int Ameth(int in, char other); @}; @end example The class @code{baseA} is represented by two stabs. The first stab describes the class as a structure type. The second stab describes a structure tag of the class type. Both stabs are of stab type @code{N_LSYM}. Since the stab is not located between an @code{N_FUN} and an @code{N_LBRAC} stab this indicates that the class is defined at file scope. If it were, then the @code{N_LSYM} would signify a local variable. A stab describing a C@t{++} class type is similar in format to a stab describing a C struct, with each class member shown as a field in the structure. The part of the struct format describing fields is expanded to include extra information relevant to C@t{++} class members. In addition, if the class has multiple base classes or virtual functions the struct format outside of the field parts is also augmented. In this simple example the field part of the C@t{++} class stab representing member data looks just like the field part of a C struct stab. The section on protections describes how its format is sometimes extended for member data. The field part of a C@t{++} class stab representing a member function differs substantially from the field part of a C struct stab. It still begins with @samp{name:} but then goes on to define a new type number for the member function, describe its return type, its argument types, its protection level, any qualifiers applied to the method definition, and whether the method is virtual or not. If the method is virtual then the method description goes on to give the vtable index of the method, and the type number of the first base class defining the method. When the field name is a method name it is followed by two colons rather than one. This is followed by a new type definition for the method. This is a number followed by an equal sign and the type of the method. Normally this will be a type declared using the @samp{#} type descriptor; see @ref{Method Type Descriptor}; static member functions are declared using the @samp{f} type descriptor instead; see @ref{Function Types}. The format of an overloaded operator method name differs from that of other methods. It is @samp{op$::@var{operator-name}.} where @var{operator-name} is the operator name such as @samp{+} or @samp{+=}. The name ends with a period, and any characters except the period can occur in the @var{operator-name} string. The next part of the method description represents the arguments to the method, preceded by a colon and ending with a semi-colon. The types of the arguments are expressed in the same way argument types are expressed in C@t{++} name mangling. In this example an @code{int} and a @code{char} map to @samp{ic}. This is followed by a number, a letter, and an asterisk or period, followed by another semicolon. The number indicates the protections that apply to the member function. Here the 2 means public. The letter encodes any qualifier applied to the method definition. In this case, @samp{A} means that it is a normal function definition. The dot shows that the method is not virtual. The sections that follow elaborate further on these fields and describe the additional information present for virtual methods. @display .stabs "class_name:sym_desc(type)type_def(20)=type_desc(struct)struct_bytes(4) field_name(Adat):type(int),bit_offset(0),field_bits(32); method_name(Ameth)::type_def(21)=type_desc(method)return_type(int); :arg_types(int char); protection(public)qualifier(normal)virtual(no);;" N_LSYM,NIL,NIL,NIL @end display @smallexample .stabs "baseA:t20=s4Adat:1,0,32;Ameth::21=##1;:ic;2A.;;",128,0,0,0 .stabs "class_name:sym_desc(struct tag)",N_LSYM,NIL,NIL,NIL .stabs "baseA:T20",128,0,0,0 @end smallexample @node Class Instance @section Class Instance As shown above, describing even a simple C@t{++} class definition is accomplished by massively extending the stab format used in C to describe structure types. However, once the class is defined, C stabs with no modifications can be used to describe class instances. The following source: @example main () @{ baseA AbaseA; @} @end example @noindent yields the following stab describing the class instance. It looks no different from a standard C stab describing a local variable. @display .stabs "name:type_ref(baseA)", N_LSYM, NIL, NIL, frame_ptr_offset @end display @example .stabs "AbaseA:20",128,0,0,-20 @end example @node Methods @section Method Definition The class definition shown above declares Ameth. The C@t{++} source below defines Ameth: @example int baseA::Ameth(int in, char other) @{ return in; @}; @end example This method definition yields three stabs following the code of the method. One stab describes the method itself and following two describe its parameters. Although there is only one formal argument all methods have an implicit argument which is the @code{this} pointer. The @code{this} pointer is a pointer to the object on which the method was called. Note that the method name is mangled to encode the class name and argument types. Name mangling is described in the @sc{arm} (@cite{The Annotated C++ Reference Manual}, by Ellis and Stroustrup, @sc{isbn} 0-201-51459-1); @file{gpcompare.texi} in Cygnus GCC distributions describes the differences between GNU mangling and @sc{arm} mangling. @c FIXME: Use @xref, especially if this is generally installed in the @c info tree. @c FIXME: This information should be in a net release, either of GCC or @c GDB. But gpcompare.texi doesn't seem to be in the FSF GCC. @example .stabs "name:symbol_descriptor(global function)return_type(int)", N_FUN, NIL, NIL, code_addr_of_method_start .stabs "Ameth__5baseAic:F1",36,0,0,_Ameth__5baseAic @end example Here is the stab for the @code{this} pointer implicit argument. The name of the @code{this} pointer is always @code{this}. Type 19, the @code{this} pointer is defined as a pointer to type 20, @code{baseA}, but a stab defining @code{baseA} has not yet been emitted. Since the compiler knows it will be emitted shortly, here it just outputs a cross reference to the undefined symbol, by prefixing the symbol name with @samp{xs}. @example .stabs "name:sym_desc(register param)type_def(19)= type_desc(ptr to)type_ref(baseA)= type_desc(cross-reference to)baseA:",N_RSYM,NIL,NIL,register_number .stabs "this:P19=*20=xsbaseA:",64,0,0,8 @end example The stab for the explicit integer argument looks just like a parameter to a C function. The last field of the stab is the offset from the argument pointer, which in most systems is the same as the frame pointer. @example .stabs "name:sym_desc(value parameter)type_ref(int)", N_PSYM,NIL,NIL,offset_from_arg_ptr .stabs "in:p1",160,0,0,72 @end example << The examples that follow are based on A1.C >> @node Method Type Descriptor @section The @samp{#} Type Descriptor This is used to describe a class method. This is a function which takes an extra argument as its first argument, for the @code{this} pointer. If the @samp{#} is immediately followed by another @samp{#}, the second one will be followed by the return type and a semicolon. The class and argument types are not specified, and must be determined by demangling the name of the method if it is available. Otherwise, the single @samp{#} is followed by the class type, a comma, the return type, a comma, and zero or more parameter types separated by commas. The list of arguments is terminated by a semicolon. In the debugging output generated by gcc, a final argument type of @code{void} indicates a method which does not take a variable number of arguments. If the final argument type of @code{void} does not appear, the method was declared with an ellipsis. Note that although such a type will normally be used to describe fields in structures, unions, or classes, for at least some versions of the compiler it can also be used in other contexts. @node Member Type Descriptor @section The @samp{@@} Type Descriptor The @samp{@@} type descriptor is used for a pointer-to-non-static-member-data type. It is followed by type information for the class (or union), a comma, and type information for the member data. The following C@t{++} source: @smallexample typedef int A::*int_in_a; @end smallexample generates the following stab: @smallexample .stabs "int_in_a:t20=21=@@19,1",128,0,0,0 @end smallexample Note that there is a conflict between this and type attributes (@pxref{String Field}); both use type descriptor @samp{@@}. Fortunately, the @samp{@@} type descriptor used in this C@t{++} sense always will be followed by a digit, @samp{(}, or @samp{-}, and type attributes never start with those things. @node Protections @section Protections In the simple class definition shown above all member data and functions were publicly accessible. The example that follows contrasts public, protected and privately accessible fields and shows how these protections are encoded in C@t{++} stabs. If the character following the @samp{@var{field-name}:} part of the string is @samp{/}, then the next character is the visibility. @samp{0} means private, @samp{1} means protected, and @samp{2} means public. Debuggers should ignore visibility characters they do not recognize, and assume a reasonable default (such as public) (GDB 4.11 does not, but this should be fixed in the next GDB release). If no visibility is specified the field is public. The visibility @samp{9} means that the field has been optimized out and is public (there is no way to specify an optimized out field with a private or protected visibility). Visibility @samp{9} is not supported by GDB 4.11; this should be fixed in the next GDB release. The following C@t{++} source: @example class vis @{ private: int priv; protected: char prot; public: float pub; @}; @end example @noindent generates the following stab: @example # @r{128 is N_LSYM} .stabs "vis:T19=s12priv:/01,0,32;prot:/12,32,8;pub:12,64,32;;",128,0,0,0 @end example @samp{vis:T19=s12} indicates that type number 19 is a 12 byte structure named @code{vis} The @code{priv} field has public visibility (@samp{/0}), type int (@samp{1}), and offset and size @samp{,0,32;}. The @code{prot} field has protected visibility (@samp{/1}), type char (@samp{2}) and offset and size @samp{,32,8;}. The @code{pub} field has type float (@samp{12}), and offset and size @samp{,64,32;}. Protections for member functions are signified by one digit embedded in the field part of the stab describing the method. The digit is 0 if private, 1 if protected and 2 if public. Consider the C@t{++} class definition below: @example class all_methods @{ private: int priv_meth(int in)@{return in;@}; protected: char protMeth(char in)@{return in;@}; public: float pubMeth(float in)@{return in;@}; @}; @end example It generates the following stab. The digit in question is to the left of an @samp{A} in each case. Notice also that in this case two symbol descriptors apply to the class name struct tag and struct type. @display .stabs "class_name:sym_desc(struct tag&type)type_def(21)= sym_desc(struct)struct_bytes(1) meth_name::type_def(22)=sym_desc(method)returning(int); :args(int);protection(private)modifier(normal)virtual(no); meth_name::type_def(23)=sym_desc(method)returning(char); :args(char);protection(protected)modifier(normal)virtual(no); meth_name::type_def(24)=sym_desc(method)returning(float); :args(float);protection(public)modifier(normal)virtual(no);;", N_LSYM,NIL,NIL,NIL @end display @smallexample .stabs "all_methods:Tt21=s1priv_meth::22=##1;:i;0A.;protMeth::23=##2;:c;1A.; pubMeth::24=##12;:f;2A.;;",128,0,0,0 @end smallexample @node Method Modifiers @section Method Modifiers (@code{const}, @code{volatile}, @code{const volatile}) << based on a6.C >> In the class example described above all the methods have the normal modifier. This method modifier information is located just after the protection information for the method. This field has four possible character values. Normal methods use @samp{A}, const methods use @samp{B}, volatile methods use @samp{C}, and const volatile methods use @samp{D}. Consider the class definition below: @example class A @{ public: int ConstMeth (int arg) const @{ return arg; @}; char VolatileMeth (char arg) volatile @{ return arg; @}; float ConstVolMeth (float arg) const volatile @{return arg; @}; @}; @end example This class is described by the following stab: @display .stabs "class(A):sym_desc(struct)type_def(20)=type_desc(struct)struct_bytes(1) meth_name(ConstMeth)::type_def(21)sym_desc(method) returning(int);:arg(int);protection(public)modifier(const)virtual(no); meth_name(VolatileMeth)::type_def(22)=sym_desc(method) returning(char);:arg(char);protection(public)modifier(volatile)virt(no) meth_name(ConstVolMeth)::type_def(23)=sym_desc(method) returning(float);:arg(float);protection(public)modifier(const volatile) virtual(no);;", @dots{} @end display @example .stabs "A:T20=s1ConstMeth::21=##1;:i;2B.;VolatileMeth::22=##2;:c;2C.; ConstVolMeth::23=##12;:f;2D.;;",128,0,0,0 @end example @node Virtual Methods @section Virtual Methods << The following examples are based on a4.C >> The presence of virtual methods in a class definition adds additional data to the class description. The extra data is appended to the description of the virtual method and to the end of the class description. Consider the class definition below: @example class A @{ public: int Adat; virtual int A_virt (int arg) @{ return arg; @}; @}; @end example This results in the stab below describing class A. It defines a new type (20) which is an 8 byte structure. The first field of the class struct is @samp{Adat}, an integer, starting at structure offset 0 and occupying 32 bits. The second field in the class struct is not explicitly defined by the C@t{++} class definition but is implied by the fact that the class contains a virtual method. This field is the vtable pointer. The name of the vtable pointer field starts with @samp{$vf} and continues with a type reference to the class it is part of. In this example the type reference for class A is 20 so the name of its vtable pointer field is @samp{$vf20}, followed by the usual colon. Next there is a type definition for the vtable pointer type (21). This is in turn defined as a pointer to another new type (22). Type 22 is the vtable itself, which is defined as an array, indexed by a range of integers between 0 and 1, and whose elements are of type 17. Type 17 was the vtable record type defined by the boilerplate C@t{++} type definitions, as shown earlier. The bit offset of the vtable pointer field is 32. The number of bits in the field are not specified when the field is a vtable pointer. Next is the method definition for the virtual member function @code{A_virt}. Its description starts out using the same format as the non-virtual member functions described above, except instead of a dot after the @samp{A} there is an asterisk, indicating that the function is virtual. Since is is virtual some addition information is appended to the end of the method description. The first number represents the vtable index of the method. This is a 32 bit unsigned number with the high bit set, followed by a semi-colon. The second number is a type reference to the first base class in the inheritance hierarchy defining the virtual member function. In this case the class stab describes a base class so the virtual function is not overriding any other definition of the method. Therefore the reference is to the type number of the class that the stab is describing (20). This is followed by three semi-colons. One marks the end of the current sub-section, one marks the end of the method field, and the third marks the end of the struct definition. For classes containing virtual functions the very last section of the string part of the stab holds a type reference to the first base class. This is preceded by @samp{~%} and followed by a final semi-colon. @display .stabs "class_name(A):type_def(20)=sym_desc(struct)struct_bytes(8) field_name(Adat):type_ref(int),bit_offset(0),field_bits(32); field_name(A virt func ptr):type_def(21)=type_desc(ptr to)type_def(22)= sym_desc(array)index_type_ref(range of int from 0 to 1); elem_type_ref(vtbl elem type), bit_offset(32); meth_name(A_virt)::typedef(23)=sym_desc(method)returning(int); :arg_type(int),protection(public)normal(yes)virtual(yes) vtable_index(1);class_first_defining(A);;;~%first_base(A);", N_LSYM,NIL,NIL,NIL @end display @c FIXME: bogus line break. @example .stabs "A:t20=s8Adat:1,0,32;$vf20:21=*22=ar1;0;1;17,32; A_virt::23=##1;:i;2A*-2147483647;20;;;~%20;",128,0,0,0 @end example @node Inheritance @section Inheritance Stabs describing C@t{++} derived classes include additional sections that describe the inheritance hierarchy of the class. A derived class stab also encodes the number of base classes. For each base class it tells if the base class is virtual or not, and if the inheritance is private or public. It also gives the offset into the object of the portion of the object corresponding to each base class. This additional information is embedded in the class stab following the number of bytes in the struct. First the number of base classes appears bracketed by an exclamation point and a comma. Then for each base type there repeats a series: a virtual character, a visibility character, a number, a comma, another number, and a semi-colon. The virtual character is @samp{1} if the base class is virtual and @samp{0} if not. The visibility character is @samp{2} if the derivation is public, @samp{1} if it is protected, and @samp{0} if it is private. Debuggers should ignore virtual or visibility characters they do not recognize, and assume a reasonable default (such as public and non-virtual) (GDB 4.11 does not, but this should be fixed in the next GDB release). The number following the virtual and visibility characters is the offset from the start of the object to the part of the object pertaining to the base class. After the comma, the second number is a type_descriptor for the base type. Finally a semi-colon ends the series, which repeats for each base class. The source below defines three base classes @code{A}, @code{B}, and @code{C} and the derived class @code{D}. @example class A @{ public: int Adat; virtual int A_virt (int arg) @{ return arg; @}; @}; class B @{ public: int B_dat; virtual int B_virt (int arg) @{return arg; @}; @}; class C @{ public: int Cdat; virtual int C_virt (int arg) @{return arg; @}; @}; class D : A, virtual B, public C @{ public: int Ddat; virtual int A_virt (int arg ) @{ return arg+1; @}; virtual int B_virt (int arg) @{ return arg+2; @}; virtual int C_virt (int arg) @{ return arg+3; @}; virtual int D_virt (int arg) @{ return arg; @}; @}; @end example Class stabs similar to the ones described earlier are generated for each base class. @c FIXME!!! the linebreaks in the following example probably make the @c examples literally unusable, but I don't know any other way to get @c them on the page. @c One solution would be to put some of the type definitions into @c separate stabs, even if that's not exactly what the compiler actually @c emits. @smallexample .stabs "A:T20=s8Adat:1,0,32;$vf20:21=*22=ar1;0;1;17,32; A_virt::23=##1;:i;2A*-2147483647;20;;;~%20;",128,0,0,0 .stabs "B:Tt25=s8Bdat:1,0,32;$vf25:21,32;B_virt::26=##1; :i;2A*-2147483647;25;;;~%25;",128,0,0,0 .stabs "C:Tt28=s8Cdat:1,0,32;$vf28:21,32;C_virt::29=##1; :i;2A*-2147483647;28;;;~%28;",128,0,0,0 @end smallexample In the stab describing derived class @code{D} below, the information about the derivation of this class is encoded as follows. @display .stabs "derived_class_name:symbol_descriptors(struct tag&type)= type_descriptor(struct)struct_bytes(32)!num_bases(3), base_virtual(no)inheritance_public(no)base_offset(0), base_class_type_ref(A); base_virtual(yes)inheritance_public(no)base_offset(NIL), base_class_type_ref(B); base_virtual(no)inheritance_public(yes)base_offset(64), base_class_type_ref(C); @dots{} @end display @c FIXME! fake linebreaks. @smallexample .stabs "D:Tt31=s32!3,000,20;100,25;0264,28;$vb25:24,128;Ddat: 1,160,32;A_virt::32=##1;:i;2A*-2147483647;20;;B_virt: :32:i;2A*-2147483647;25;;C_virt::32:i;2A*-2147483647; 28;;D_virt::32:i;2A*-2147483646;31;;;~%20;",128,0,0,0 @end smallexample @node Virtual Base Classes @section Virtual Base Classes A derived class object consists of a concatenation in memory of the data areas defined by each base class, starting with the leftmost and ending with the rightmost in the list of base classes. The exception to this rule is for virtual inheritance. In the example above, class @code{D} inherits virtually from base class @code{B}. This means that an instance of a @code{D} object will not contain its own @code{B} part but merely a pointer to a @code{B} part, known as a virtual base pointer. In a derived class stab, the base offset part of the derivation information, described above, shows how the base class parts are ordered. The base offset for a virtual base class is always given as 0. Notice that the base offset for @code{B} is given as 0 even though @code{B} is not the first base class. The first base class @code{A} starts at offset 0. The field information part of the stab for class @code{D} describes the field which is the pointer to the virtual base class @code{B}. The vbase pointer name is @samp{$vb} followed by a type reference to the virtual base class. Since the type id for @code{B} in this example is 25, the vbase pointer name is @samp{$vb25}. @c FIXME!! fake linebreaks below @smallexample .stabs "D:Tt31=s32!3,000,20;100,25;0264,28;$vb25:24,128;Ddat:1, 160,32;A_virt::32=##1;:i;2A*-2147483647;20;;B_virt::32:i; 2A*-2147483647;25;;C_virt::32:i;2A*-2147483647;28;;D_virt: :32:i;2A*-2147483646;31;;;~%20;",128,0,0,0 @end smallexample Following the name and a semicolon is a type reference describing the type of the virtual base class pointer, in this case 24. Type 24 was defined earlier as the type of the @code{B} class @code{this} pointer. The @code{this} pointer for a class is a pointer to the class type. @example .stabs "this:P24=*25=xsB:",64,0,0,8 @end example Finally the field offset part of the vbase pointer field description shows that the vbase pointer is the first field in the @code{D} object, before any data fields defined by the class. The layout of a @code{D} class object is a follows, @code{Adat} at 0, the vtable pointer for @code{A} at 32, @code{Cdat} at 64, the vtable pointer for C at 96, the virtual base pointer for @code{B} at 128, and @code{Ddat} at 160. @node Static Members @section Static Members The data area for a class is a concatenation of the space used by the data members of the class. If the class has virtual methods, a vtable pointer follows the class data. The field offset part of each field description in the class stab shows this ordering. << How is this reflected in stabs? See Cygnus bug #677 for some info. >> @node Stab Types @appendix Table of Stab Types The following are all the possible values for the stab type field, for a.out files, in numeric order. This does not apply to XCOFF, but it does apply to stabs in sections (@pxref{Stab Sections}). Stabs in ECOFF use these values but add 0x8f300 to distinguish them from non-stab symbols. The symbolic names are defined in the file @file{include/aout/stabs.def}. @menu * Non-Stab Symbol Types:: Types from 0 to 0x1f * Stab Symbol Types:: Types from 0x20 to 0xff @end menu @node Non-Stab Symbol Types @appendixsec Non-Stab Symbol Types The following types are used by the linker and assembler, not by stab directives. Since this document does not attempt to describe aspects of object file format other than the debugging format, no details are given. @c Try to get most of these to fit on a single line. @iftex @tableindent=1.5in @end iftex @table @code @item 0x0 N_UNDF Undefined symbol @item 0x2 N_ABS File scope absolute symbol @item 0x3 N_ABS | N_EXT External absolute symbol @item 0x4 N_TEXT File scope text symbol @item 0x5 N_TEXT | N_EXT External text symbol @item 0x6 N_DATA File scope data symbol @item 0x7 N_DATA | N_EXT External data symbol @item 0x8 N_BSS File scope BSS symbol @item 0x9 N_BSS | N_EXT External BSS symbol @item 0x0c N_FN_SEQ Same as @code{N_FN}, for Sequent compilers @item 0x0a N_INDR Symbol is indirected to another symbol @item 0x12 N_COMM Common---visible after shared library dynamic link @item 0x14 N_SETA @itemx 0x15 N_SETA | N_EXT Absolute set element @item 0x16 N_SETT @itemx 0x17 N_SETT | N_EXT Text segment set element @item 0x18 N_SETD @itemx 0x19 N_SETD | N_EXT Data segment set element @item 0x1a N_SETB @itemx 0x1b N_SETB | N_EXT BSS segment set element @item 0x1c N_SETV @itemx 0x1d N_SETV | N_EXT Pointer to set vector @item 0x1e N_WARNING Print a warning message during linking @item 0x1f N_FN File name of a @file{.o} file @end table @node Stab Symbol Types @appendixsec Stab Symbol Types The following symbol types indicate that this is a stab. This is the full list of stab numbers, including stab types that are used in languages other than C. @table @code @item 0x20 N_GSYM Global symbol; see @ref{Global Variables}. @item 0x22 N_FNAME Function name (for BSD Fortran); see @ref{Procedures}. @item 0x24 N_FUN Function name (@pxref{Procedures}) or text segment variable (@pxref{Statics}). @item 0x26 N_STSYM Data segment file-scope variable; see @ref{Statics}. @item 0x28 N_LCSYM BSS segment file-scope variable; see @ref{Statics}. @item 0x2a N_MAIN Name of main routine; see @ref{Main Program}. @item 0x2c N_ROSYM Variable in @code{.rodata} section; see @ref{Statics}. @item 0x30 N_PC Global symbol (for Pascal); see @ref{N_PC}. @item 0x32 N_NSYMS Number of symbols (according to Ultrix V4.0); see @ref{N_NSYMS}. @item 0x34 N_NOMAP No DST map; see @ref{N_NOMAP}. @item 0x36 N_MAC_DEFINE Name and body of a @code{#define}d macro; see @ref{Macro define and undefine}. @c FIXME: describe this solaris feature in the body of the text (see @c comments in include/aout/stab.def). @item 0x38 N_OBJ Object file (Solaris2). @item 0x3a N_MAC_UNDEF Name of an @code{#undef}ed macro; see @ref{Macro define and undefine}. @c See include/aout/stab.def for (a little) more info. @item 0x3c N_OPT Debugger options (Solaris2). @item 0x40 N_RSYM Register variable; see @ref{Register Variables}. @item 0x42 N_M2C Modula-2 compilation unit; see @ref{N_M2C}. @item 0x44 N_SLINE Line number in text segment; see @ref{Line Numbers}. @item 0x46 N_DSLINE Line number in data segment; see @ref{Line Numbers}. @item 0x48 N_BSLINE Line number in bss segment; see @ref{Line Numbers}. @item 0x48 N_BROWS Sun source code browser, path to @file{.cb} file; see @ref{N_BROWS}. @item 0x4a N_DEFD GNU Modula2 definition module dependency; see @ref{N_DEFD}. @item 0x4c N_FLINE Function start/body/end line numbers (Solaris2). @item 0x50 N_EHDECL GNU C@t{++} exception variable; see @ref{N_EHDECL}. @item 0x50 N_MOD2 Modula2 info "for imc" (according to Ultrix V4.0); see @ref{N_MOD2}. @item 0x54 N_CATCH GNU C@t{++} @code{catch} clause; see @ref{N_CATCH}. @item 0x60 N_SSYM Structure of union element; see @ref{N_SSYM}. @item 0x62 N_ENDM Last stab for module (Solaris2). @item 0x64 N_SO Path and name of source file; see @ref{Source Files}. @item 0x80 N_LSYM Stack variable (@pxref{Stack Variables}) or type (@pxref{Typedefs}). @item 0x82 N_BINCL Beginning of an include file (Sun only); see @ref{Include Files}. @item 0x84 N_SOL Name of include file; see @ref{Include Files}. @item 0xa0 N_PSYM Parameter variable; see @ref{Parameters}. @item 0xa2 N_EINCL End of an include file; see @ref{Include Files}. @item 0xa4 N_ENTRY Alternate entry point; see @ref{Alternate Entry Points}. @item 0xc0 N_LBRAC Beginning of a lexical block; see @ref{Block Structure}. @item 0xc2 N_EXCL Place holder for a deleted include file; see @ref{Include Files}. @item 0xc4 N_SCOPE Modula2 scope information (Sun linker); see @ref{N_SCOPE}. @item 0xe0 N_RBRAC End of a lexical block; see @ref{Block Structure}. @item 0xe2 N_BCOMM Begin named common block; see @ref{Common Blocks}. @item 0xe4 N_ECOMM End named common block; see @ref{Common Blocks}. @item 0xe8 N_ECOML Member of a common block; see @ref{Common Blocks}. @c FIXME: How does this really work? Move it to main body of document. @item 0xea N_WITH Pascal @code{with} statement: type,,0,0,offset (Solaris2). @item 0xf0 N_NBTEXT Gould non-base registers; see @ref{Gould}. @item 0xf2 N_NBDATA Gould non-base registers; see @ref{Gould}. @item 0xf4 N_NBBSS Gould non-base registers; see @ref{Gould}. @item 0xf6 N_NBSTS Gould non-base registers; see @ref{Gould}. @item 0xf8 N_NBLCS Gould non-base registers; see @ref{Gould}. @end table @c Restore the default table indent @iftex @tableindent=.8in @end iftex @node Symbol Descriptors @appendix Table of Symbol Descriptors The symbol descriptor is the character which follows the colon in many stabs, and which tells what kind of stab it is. @xref{String Field}, for more information about their use. @c Please keep this alphabetical @table @code @c In TeX, this looks great, digit is in italics. But makeinfo insists @c on putting it in `', not realizing that @var should override @code. @c I don't know of any way to make makeinfo do the right thing. Seems @c like a makeinfo bug to me. @item @var{digit} @itemx ( @itemx - Variable on the stack; see @ref{Stack Variables}. @item : C@t{++} nested symbol; see @xref{Nested Symbols}. @item a Parameter passed by reference in register; see @ref{Reference Parameters}. @item b Based variable; see @ref{Based Variables}. @item c Constant; see @ref{Constants}. @item C Conformant array bound (Pascal, maybe other languages); @ref{Conformant Arrays}. Name of a caught exception (GNU C@t{++}). These can be distinguished because the latter uses @code{N_CATCH} and the former uses another symbol type. @item d Floating point register variable; see @ref{Register Variables}. @item D Parameter in floating point register; see @ref{Register Parameters}. @item f File scope function; see @ref{Procedures}. @item F Global function; see @ref{Procedures}. @item G Global variable; see @ref{Global Variables}. @item i @xref{Register Parameters}. @item I Internal (nested) procedure; see @ref{Nested Procedures}. @item J Internal (nested) function; see @ref{Nested Procedures}. @item L Label name (documented by AIX, no further information known). @item m Module; see @ref{Procedures}. @item p Argument list parameter; see @ref{Parameters}. @item pP @xref{Parameters}. @item pF Fortran Function parameter; see @ref{Parameters}. @item P Unfortunately, three separate meanings have been independently invented for this symbol descriptor. At least the GNU and Sun uses can be distinguished by the symbol type. Global Procedure (AIX) (symbol type used unknown); see @ref{Procedures}. Register parameter (GNU) (symbol type @code{N_PSYM}); see @ref{Parameters}. Prototype of function referenced by this file (Sun @code{acc}) (symbol type @code{N_FUN}). @item Q Static Procedure; see @ref{Procedures}. @item R Register parameter; see @ref{Register Parameters}. @item r Register variable; see @ref{Register Variables}. @item S File scope variable; see @ref{Statics}. @item s Local variable (OS9000). @item t Type name; see @ref{Typedefs}. @item T Enumeration, structure, or union tag; see @ref{Typedefs}. @item v Parameter passed by reference; see @ref{Reference Parameters}. @item V Procedure scope static variable; see @ref{Statics}. @item x Conformant array; see @ref{Conformant Arrays}. @item X Function return variable; see @ref{Parameters}. @end table @node Type Descriptors @appendix Table of Type Descriptors The type descriptor is the character which follows the type number and an equals sign. It specifies what kind of type is being defined. @xref{String Field}, for more information about their use. @table @code @item @var{digit} @itemx ( Type reference; see @ref{String Field}. @item - Reference to builtin type; see @ref{Negative Type Numbers}. @item # Method (C@t{++}); see @ref{Method Type Descriptor}. @item * Pointer; see @ref{Miscellaneous Types}. @item & Reference (C@t{++}). @item @@ Type Attributes (AIX); see @ref{String Field}. Member (class and variable) type (GNU C@t{++}); see @ref{Member Type Descriptor}. @item a Array; see @ref{Arrays}. @item A Open array; see @ref{Arrays}. @item b Pascal space type (AIX); see @ref{Miscellaneous Types}. Builtin integer type (Sun); see @ref{Builtin Type Descriptors}. Const and volatile qualified type (OS9000). @item B Volatile-qualified type; see @ref{Miscellaneous Types}. @item c Complex builtin type (AIX); see @ref{Builtin Type Descriptors}. Const-qualified type (OS9000). @item C COBOL Picture type. See AIX documentation for details. @item d File type; see @ref{Miscellaneous Types}. @item D N-dimensional dynamic array; see @ref{Arrays}. @item e Enumeration type; see @ref{Enumerations}. @item E N-dimensional subarray; see @ref{Arrays}. @item f Function type; see @ref{Function Types}. @item F Pascal function parameter; see @ref{Function Types} @item g Builtin floating point type; see @ref{Builtin Type Descriptors}. @item G COBOL Group. See AIX documentation for details. @item i Imported type (AIX); see @ref{Cross-References}. Volatile-qualified type (OS9000). @item k Const-qualified type; see @ref{Miscellaneous Types}. @item K COBOL File Descriptor. See AIX documentation for details. @item M Multiple instance type; see @ref{Miscellaneous Types}. @item n String type; see @ref{Strings}. @item N Stringptr; see @ref{Strings}. @item o Opaque type; see @ref{Typedefs}. @item p Procedure; see @ref{Function Types}. @item P Packed array; see @ref{Arrays}. @item r Range type; see @ref{Subranges}. @item R Builtin floating type; see @ref{Builtin Type Descriptors} (Sun). Pascal subroutine parameter; see @ref{Function Types} (AIX). Detecting this conflict is possible with careful parsing (hint: a Pascal subroutine parameter type will always contain a comma, and a builtin type descriptor never will). @item s Structure type; see @ref{Structures}. @item S Set type; see @ref{Miscellaneous Types}. @item u Union; see @ref{Unions}. @item v Variant record. This is a Pascal and Modula-2 feature which is like a union within a struct in C. See AIX documentation for details. @item w Wide character; see @ref{Builtin Type Descriptors}. @item x Cross-reference; see @ref{Cross-References}. @item Y Used by IBM's xlC C@t{++} compiler (for structures, I think). @item z gstring; see @ref{Strings}. @end table @node Expanded Reference @appendix Expanded Reference by Stab Type @c FIXME: This appendix should go away; see N_PSYM or N_SO for an example. For a full list of stab types, and cross-references to where they are described, see @ref{Stab Types}. This appendix just covers certain stabs which are not yet described in the main body of this document; eventually the information will all be in one place. Format of an entry: The first line is the symbol type (see @file{include/aout/stab.def}). The second line describes the language constructs the symbol type represents. The third line is the stab format with the significant stab fields named and the rest NIL. Subsequent lines expand upon the meaning and possible values for each significant stab field. Finally, any further information. @menu * N_PC:: Pascal global symbol * N_NSYMS:: Number of symbols * N_NOMAP:: No DST map * N_M2C:: Modula-2 compilation unit * N_BROWS:: Path to .cb file for Sun source code browser * N_DEFD:: GNU Modula2 definition module dependency * N_EHDECL:: GNU C++ exception variable * N_MOD2:: Modula2 information "for imc" * N_CATCH:: GNU C++ "catch" clause * N_SSYM:: Structure or union element * N_SCOPE:: Modula2 scope information (Sun only) * Gould:: non-base register symbols used on Gould systems * N_LENG:: Length of preceding entry @end menu @node N_PC @section N_PC @deffn @code{.stabs} N_PC @findex N_PC Global symbol (for Pascal). @example "name" -> "symbol_name" <> value -> supposedly the line number (stab.def is skeptical) @end example @display @file{stabdump.c} says: global pascal symbol: name,,0,subtype,line << subtype? >> @end display @end deffn @node N_NSYMS @section N_NSYMS @deffn @code{.stabn} N_NSYMS @findex N_NSYMS Number of symbols (according to Ultrix V4.0). @display 0, files,,funcs,lines (stab.def) @end display @end deffn @node N_NOMAP @section N_NOMAP @deffn @code{.stabs} N_NOMAP @findex N_NOMAP No DST map for symbol (according to Ultrix V4.0). I think this means a variable has been optimized out. @display name, ,0,type,ignored (stab.def) @end display @end deffn @node N_M2C @section N_M2C @deffn @code{.stabs} N_M2C @findex N_M2C Modula-2 compilation unit. @example "string" -> "unit_name,unit_time_stamp[,code_time_stamp]" desc -> unit_number value -> 0 (main unit) 1 (any other unit) @end example See @cite{Dbx and Dbxtool Interfaces}, 2nd edition, by Sun, 1988, for more information. @end deffn @node N_BROWS @section N_BROWS @deffn @code{.stabs} N_BROWS @findex N_BROWS Sun source code browser, path to @file{.cb} file <> "path to associated @file{.cb} file" Note: N_BROWS has the same value as N_BSLINE. @end deffn @node N_DEFD @section N_DEFD @deffn @code{.stabn} N_DEFD @findex N_DEFD GNU Modula2 definition module dependency. GNU Modula-2 definition module dependency. The value is the modification time of the definition file. The other field is non-zero if it is imported with the GNU M2 keyword @code{%INITIALIZE}. Perhaps @code{N_M2C} can be used if there are enough empty fields? @end deffn @node N_EHDECL @section N_EHDECL @deffn @code{.stabs} N_EHDECL @findex N_EHDECL GNU C@t{++} exception variable <>. "@var{string} is variable name" Note: conflicts with @code{N_MOD2}. @end deffn @node N_MOD2 @section N_MOD2 @deffn @code{.stab?} N_MOD2 @findex N_MOD2 Modula2 info "for imc" (according to Ultrix V4.0) Note: conflicts with @code{N_EHDECL} <> @end deffn @node N_CATCH @section N_CATCH @deffn @code{.stabn} N_CATCH @findex N_CATCH GNU C@t{++} @code{catch} clause GNU C@t{++} @code{catch} clause. The value is its address. The desc field is nonzero if this entry is immediately followed by a @code{CAUGHT} stab saying what exception was caught. Multiple @code{CAUGHT} stabs means that multiple exceptions can be caught here. If desc is 0, it means all exceptions are caught here. @end deffn @node N_SSYM @section N_SSYM @deffn @code{.stabn} N_SSYM @findex N_SSYM Structure or union element. The value is the offset in the structure. <> @end deffn @node N_SCOPE @section N_SCOPE @deffn @code{.stab?} N_SCOPE @findex N_SCOPE Modula2 scope information (Sun linker) <> @end deffn @node Gould @section Non-base registers on Gould systems @deffn @code{.stab?} N_NBTEXT @deffnx @code{.stab?} N_NBDATA @deffnx @code{.stab?} N_NBBSS @deffnx @code{.stab?} N_NBSTS @deffnx @code{.stab?} N_NBLCS @findex N_NBTEXT @findex N_NBDATA @findex N_NBBSS @findex N_NBSTS @findex N_NBLCS These are used on Gould systems for non-base registers syms. However, the following values are not the values used by Gould; they are the values which GNU has been documenting for these values for a long time, without actually checking what Gould uses. I include these values only because perhaps some someone actually did something with the GNU information (I hope not, why GNU knowingly assigned wrong values to these in the header file is a complete mystery to me). @example 240 0xf0 N_NBTEXT ?? 242 0xf2 N_NBDATA ?? 244 0xf4 N_NBBSS ?? 246 0xf6 N_NBSTS ?? 248 0xf8 N_NBLCS ?? @end example @end deffn @node N_LENG @section N_LENG @deffn @code{.stabn} N_LENG @findex N_LENG Second symbol entry containing a length-value for the preceding entry. The value is the length. @end deffn @node Questions @appendix Questions and Anomalies @itemize @bullet @item @c I think this is changed in GCC 2.4.5 to put the line number there. For GNU C stabs defining local and global variables (@code{N_LSYM} and @code{N_GSYM}), the desc field is supposed to contain the source line number on which the variable is defined. In reality the desc field is always 0. (This behavior is defined in @file{dbxout.c} and putting a line number in desc is controlled by @samp{#ifdef WINNING_GDB}, which defaults to false). GDB supposedly uses this information if you say @samp{list @var{var}}. In reality, @var{var} can be a variable defined in the program and GDB says @samp{function @var{var} not defined}. @item In GNU C stabs, there seems to be no way to differentiate tag types: structures, unions, and enums (symbol descriptor @samp{T}) and typedefs (symbol descriptor @samp{t}) defined at file scope from types defined locally to a procedure or other more local scope. They all use the @code{N_LSYM} stab type. Types defined at procedure scope are emitted after the @code{N_RBRAC} of the preceding function and before the code of the procedure in which they are defined. This is exactly the same as types defined in the source file between the two procedure bodies. GDB over-compensates by placing all types in block #1, the block for symbols of file scope. This is true for default, @samp{-ansi} and @samp{-traditional} compiler options. (Bugs gcc/1063, gdb/1066.) @item What ends the procedure scope? Is it the proc block's @code{N_RBRAC} or the next @code{N_FUN}? (I believe its the first.) @end itemize @node Stab Sections @appendix Using Stabs in Their Own Sections Many object file formats allow tools to create object files with custom sections containing any arbitrary data. For any such object file format, stabs can be embedded in special sections. This is how stabs are used with ELF and SOM, and aside from ECOFF and XCOFF, is how stabs are used with COFF. @menu * Stab Section Basics:: How to embed stabs in sections * ELF Linker Relocation:: Sun ELF hacks @end menu @node Stab Section Basics @appendixsec How to Embed Stabs in Sections The assembler creates two custom sections, a section named @code{.stab} which contains an array of fixed length structures, one struct per stab, and a section named @code{.stabstr} containing all the variable length strings that are referenced by stabs in the @code{.stab} section. The byte order of the stabs binary data depends on the object file format. For ELF, it matches the byte order of the ELF file itself, as determined from the @code{EI_DATA} field in the @code{e_ident} member of the ELF header. For SOM, it is always big-endian (is this true??? FIXME). For COFF, it matches the byte order of the COFF headers. The meaning of the fields is the same as for a.out (@pxref{Symbol Table Format}), except that the @code{n_strx} field is relative to the strings for the current compilation unit (which can be found using the synthetic N_UNDF stab described below), rather than the entire string table. The first stab in the @code{.stab} section for each compilation unit is synthetic, generated entirely by the assembler, with no corresponding @code{.stab} directive as input to the assembler. This stab contains the following fields: @table @code @item n_strx Offset in the @code{.stabstr} section to the source filename. @item n_type @code{N_UNDF}. @item n_other Unused field, always zero. This may eventually be used to hold overflows from the count in the @code{n_desc} field. @item n_desc Count of upcoming symbols, i.e., the number of remaining stabs for this source file. @item n_value Size of the string table fragment associated with this source file, in bytes. @end table The @code{.stabstr} section always starts with a null byte (so that string offsets of zero reference a null string), followed by random length strings, each of which is null byte terminated. The ELF section header for the @code{.stab} section has its @code{sh_link} member set to the section number of the @code{.stabstr} section, and the @code{.stabstr} section has its ELF section header @code{sh_type} member set to @code{SHT_STRTAB} to mark it as a string table. SOM and COFF have no way of linking the sections together or marking them as string tables. For COFF, the @code{.stab} and @code{.stabstr} sections may be simply concatenated by the linker. GDB then uses the @code{n_desc} fields to figure out the extent of the original sections. Similarly, the @code{n_value} fields of the header symbols are added together in order to get the actual position of the strings in a desired @code{.stabstr} section. Although this design obviates any need for the linker to relocate or otherwise manipulate @code{.stab} and @code{.stabstr} sections, it also requires some care to ensure that the offsets are calculated correctly. For instance, if the linker were to pad in between the @code{.stabstr} sections before concatenating, then the offsets to strings in the middle of the executable's @code{.stabstr} section would be wrong. The GNU linker is able to optimize stabs information by merging duplicate strings and removing duplicate header file information (@pxref{Include Files}). When some versions of the GNU linker optimize stabs in sections, they remove the leading @code{N_UNDF} symbol and arranges for all the @code{n_strx} fields to be relative to the start of the @code{.stabstr} section. @node ELF Linker Relocation @appendixsec Having the Linker Relocate Stabs in ELF This section describes some Sun hacks for Stabs in ELF; it does not apply to COFF or SOM. To keep linking fast, you don't want the linker to have to relocate very many stabs. Making sure this is done for @code{N_SLINE}, @code{N_RBRAC}, and @code{N_LBRAC} stabs is the most important thing (see the descriptions of those stabs for more information). But Sun's stabs in ELF has taken this further, to make all addresses in the @code{n_value} field (functions and static variables) relative to the source file. For the @code{N_SO} symbol itself, Sun simply omits the address. To find the address of each section corresponding to a given source file, the compiler puts out symbols giving the address of each section for a given source file. Since these are ELF (not stab) symbols, the linker relocates them correctly without having to touch the stabs section. They are named @code{Bbss.bss} for the bss section, @code{Ddata.data} for the data section, and @code{Drodata.rodata} for the rodata section. For the text section, there is no such symbol (but there should be, see below). For an example of how these symbols work, @xref{Stab Section Transformations}. GCC does not provide these symbols; it instead relies on the stabs getting relocated. Thus addresses which would normally be relative to @code{Bbss.bss}, etc., are already relocated. The Sun linker provided with Solaris 2.2 and earlier relocates stabs using normal ELF relocation information, as it would do for any section. Sun has been threatening to kludge their linker to not do this (to speed up linking), even though the correct way to avoid having the linker do these relocations is to have the compiler no longer output relocatable values. Last I heard they had been talked out of the linker kludge. See Sun point patch 101052-01 and Sun bug 1142109. With the Sun compiler this affects @samp{S} symbol descriptor stabs (@pxref{Statics}) and functions (@pxref{Procedures}). In the latter case, to adopt the clean solution (making the value of the stab relative to the start of the compilation unit), it would be necessary to invent a @code{Ttext.text} symbol, analogous to the @code{Bbss.bss}, etc., symbols. I recommend this rather than using a zero value and getting the address from the ELF symbols. Finding the correct @code{Bbss.bss}, etc., symbol is difficult, because the linker simply concatenates the @code{.stab} sections from each @file{.o} file without including any information about which part of a @code{.stab} section comes from which @file{.o} file. The way GDB does this is to look for an ELF @code{STT_FILE} symbol which has the same name as the last component of the file name from the @code{N_SO} symbol in the stabs (for example, if the file name is @file{../../gdb/main.c}, it looks for an ELF @code{STT_FILE} symbol named @code{main.c}). This loses if different files have the same name (they could be in different directories, a library could have been copied from one system to another, etc.). It would be much cleaner to have the @code{Bbss.bss} symbols in the stabs themselves. Having the linker relocate them there is no more work than having the linker relocate ELF symbols, and it solves the problem of having to associate the ELF and stab symbols. However, no one has yet designed or implemented such a scheme. @node GNU Free Documentation License @appendix GNU Free Documentation License @include fdl.texi @node Symbol Types Index @unnumbered Symbol Types Index @printindex fn @bye gdb-doc-7.6.2/gdb/doc/stack_frame.pdf0000644000175000017500000023022412250770607016347 0ustar zumbizumbi%PDF-1.4 %Çì¢ 5 0 obj <> stream xœ+T0Ð3T0A(œË¥d®^ÌU¨`nd–R0±°0P0Ô3762²€Ð&F• .ù\@/´endstream endobj 6 0 obj 61 endobj 4 0 obj <> /Contents 5 0 R >> endobj 3 0 obj << /Type /Pages /Kids [ 4 0 R ] /Count 1 >> endobj 1 0 obj <> endobj 7 0 obj <>endobj 9 0 obj <> endobj 10 0 obj <> endobj 8 0 obj <>/Length 75210>>stream xœìy\MéÿÀï´‘-D¨¨Ddo!á'Bb4¦ìk¶¬EIM…RÙC&"û^ÔôQ‘HQÚT£´OJ©¾¿Ïô|çþîäv»÷vÏ=§ú¼ÿ¸¯sÏòœÏ=÷9Ïó~ÎòaªRF]ÔAE¨€Š|ÅäóA„+(£S —sÈ4Ó.ê Œ"T@E¾bòy„ ”Q„Y0Sû˜ÒÜ¡(_effª¨¨œ?~áÂ…¢MA„ PFfÁLícfTHseA„…2Š0 fj3£Bš;(£‚ ,”Q„i0Sû˜ÒÜAEa¡Œ"Lƒ™ÚÇ̨æÊ(‚  eaÌÔ>fF…4wPFAX(£Ó`¦ö13*¤¹ƒ2Š ÂBE˜3µ™Q!Í”QAÊ(Â4˜©}ÌŒ iî Œ"‚°PF¦ÁLícfTHseA„…2Š0 fj3£Bš;(£‚ ,Þ2:räÈØØX+lÞ¼yß¾}Ô†´R˜©}ÌŒ iî Œ"‚°½2úâÅ ˜¸s玜œLÔÖÖ~þüùîÝ»þþþýúõ{÷î˜"EZÌÔ>fF…4wPFAXÊ(,•€ Ðnݺq.:qâÄÚµk“““AI©iM0Sû˜ÒÜAEañóÌè?üÀâ&£€¾¾þܹsmll¨Ši}0Sû˜ÒÜAEa5QFÏž=ûìÙ³#GŽPÒú`¦ö13*¤¹ƒ2Š ÂBFkjj¤¤¤ÈVðI–æääDGGŸ:uêÖ­[°æëׯíííß¼y³zõꃒtîÝ»+<}ú4??¿}ûöÆ [V{Gwî܉½ÿþ“'O ‘G;v dWRRÒØØØÛÛ[NNîСC—.]JJJêØ±ã‚ ¼¼¼dee9£ 5Ÿ?^QQÅñìÙ³aw¢|hhh¸uëÖ;v°S-¶µµ=vìØÚµk>60Sû˜ÒÜ¡(_}øðá(£‚4ø•ÑzðQh”÷îÝ›s>øâ€–-[æëëËž™ŸŸß½{w ‰šššïá|D•¬Yo§IIIššš°¬IæüôÓO·oßæúæÏŸáÂÞ?aÌÔ>fF…4w(ÊW¯_¿6lÊ(‚ ÍÁnÓÚÚÚž9s†‡Œr}Õ©   sçÎ’’’ÕÕÕÐjOMMMLL„¤Xßy­@2*//O`˜æºw¤ÁLícfTHseA„%Ä3£ÙÙÙÊÊÊ‚ÊhNNÎÉ“'ƒƒƒãââ:tè0xð`•³gϲD'£`ºµµµiiiªªª|ÿ|„q0Sû˜ÒÜAEa !£¤|d4""ÂÄÄ6qqq™={vß¾}Y (&×Dø”Q˜.,,|ôèÑøñã9³`¦ö13*¤¹ƒ2Š Âjb?£|®9hРÄÄÄ[·n’²gŠ\F!ñ;wî€ïîܹ“3Aت²²²mÛ¶¼ƒG3µ™Q!Í”QAV£2Z[[+)) yyyÄ…X³]»v>| ×DYu‚¸ÿ~òÌhMM q”ÕÀè£0­  @vÁ~› ì—SF=z4qâDØ Á|öÞ­­­Û·oïááÁßAh†™ÚÇ̨æÊ(‚ ‹·ŒÂ¢°°°É“'Ãôõë×gΜÉõÍzBTT”¾¾>«®Ûù©S§r.Z¹rå©S§ÌÌÌŽ;&##º{÷î®]»ÆÅÅåææ>xð€ì‚3‘àà`ccc2¦§OŸ¯^½‚–Ì,,¬°°¤ –U«V ‘Ž Q%$$L˜0!??? `É’%ü§Lã±9ñññzzz %§NZ¶lÝá ¢äïÛôPrAfuwwwttìҥ˻wï8Çó|ñâ…ŽŽNuu5×[™â±!h«ççÏŸCUñæÍ›+Vxyy …PF*@ŽèèèQ£FµiÓæëׯ‚nûøñcrØ…xD­¶¶vРAPEBm¨®®{·°°pqq4A£ñ…Z8==ÝÃÃÃÉÉI ”é:VqëÖ-SSS ‰ÐÐÐñãÇÓ"2þ–Q¨ªGŒQQQŸoß¾]ºt)4†Øk¥ £´…ˆ2ÚšUõ ÚWnnnjjj¾¾¾†††Lˆ A8AŽªªªY³fÁo9tÛ¦9°0ñìÙ30CeÑ}¬‚÷~ù¡¬¬ L”Êöõë×71„!üKFYÿ´À ëÇÅÅIKK³þ-£ìS‘ÀĬ¬,8ý¾Ÿܹs'66öþýûOž<ù=‚œÍJIIIhçy{{ËÉÉ:tèÒ¥KIII;v\°`——§=³âÕ«W·oßþðádehêíÞ½»K—.œ?&$$„“¼¢¢BEEeöìÙÎÎΰ2Y ¥dýS§Nݺu "òXðëV¯^}ðàAj/"0M¯ž333!k¥¤¤ìᨒ ‰ A¾eTPìì삃ƒËËËÓÒÒXÜKBBB^^ª))©ââb…ììl˜†¥C† Oö¶ƒ&[A-Ðè~yo Õœ‰‰ ì«k×®………yyy0sÑ¢EçÎcÕÝd=ztrr2ÄMeXy£Q9::B8mÚ´{÷î5‹cÅÞûå]]]¨Ó›ÂêË(XÚÀáäñôô„ÿ›ÅíÊèï¿ÿ•=ëßÒ é„††N™2¥Þü_ýN¼}ûöÁô˜1cÔÔÔ¶mÛÖ«W/8Á Y3tèÐ/_¾Ì˜1ÃÚÚ6OÅuëÖùøøüˆu2 ›@<ÐÔO=qâœfpz€Ô²]sgîîîæææ ¸ ¿+W®ìׯ诌Œ ¬m/h¶‚Ë’¨@[µµµa5X9??ŸêðI«g(: ¡€ƒ&gÉި„+(£ÂÑÐJRY€ðEFF‚ó 0€Uw!ƒÜ[ç½-ox_)„ªH*2gÁ‚AAA:tøë¯¿`ŽÍTTT º!—6ႺŸ_Œ92&&æàÁƒ7nä?àFS¦îXñ†Ÿý6 ’*))!ÝB#Íú2 œliiI椧§ƒ˜ÂÄÕ«WÍÌÌÈLò²”ªª*iqn›””Dr-Œ3 ÀÕÕÕÍÍ ¾>|ødëÖ­;vì`¯ºikk{ìØ±µk×ÖKmܸq7oÞ„V,üF›ÝìCh§)ÕsJJ 49 y…>´4‚4¥2 EÜO?ý$Ú”oÁ‚†¨‰‰ »>‚•ÇŽÛè¶MÙ/«î]ÉÓ§OƒT€æææB%È^ j´ŒŒ ¨Xy¼wÏ#e999¶©S§ 0”©>V ÁÏ~¥¨¨ˆôo7|øpQņÐ…9-ž>} yr ×gFzŽ“ÿùùùùä}Î\Æ©©© ë3™GšP|?^]]ü¾B™{ûöm®¿pþüù.\¨—Zff&çssºz†¢§§WVV& 9–!Q!(•Ñ;wîüøã¢M™!ð,8žãÆûþ+ïm›²_ÿåË—Ÿ ™#-- èÇÙƒhðŸ2 %%USSÃù"‡Hb¦úX5?ûm8žä1¨¨((öEB#\d”UwÍ\WWæÜ¸q„OÌ2*//Ïyßœkš%%%;w†‰ŠŠŠ¶mÛBR° ?/9áëP G¸ê¹¼¼ÜÐÐêàˆˆz³§4*á ʨpˆD°jkkí9»¡ý*++ggg¯Y³ÆÓÓ³K—....äÕu²Ô5|^ý>*¨ /]º4g΢å3ÕǪ!D"£Pƒ“‡"Þ¿ß¿‘†Ð wlmm½½½ûôéçÀرc™&£ß¾}#O‚‚•vêÔIRRΖ´´4UUÕF~0Ê(³¢z†,djj Uïµk×(º/‰2ŠPʨp4E°bccuuuYÿÜá…ªÿWgÚoÛ¶m+++ÉCº¯^½233KMMe¯6{öì«W¯r>3úöí[ò‚}>~üøåË>÷ÞØIJJ’zõê•Í^ b=z4ì´I]]vÍù6}£Qƒ:88À†ÉÉÉ]ž¤÷X5„HdtݺuÇŸ;w.gßUH³¦AeÕ½ZM:˜€s¬ÞR8©`C0ž={þ+9Êd´XII‰=óÚµk³fÍš4iÒü_MLL äuqqÙ¹s'ç~!qh°rö‹‹2Ê'ÅÅÅ~~~)))¥¥¥ìùP½Á¡¦n¿‚ÊhLL Ô»fffœOSÊ("r(’QâL-RFy¿ÕΧ脇‡oÞ¼*>)))¨qbccùÜ{C2š™™¹bÅ ØQ§NæÏŸõyÙˆ½ZBB¶mÛ=zTTTYß°ÙPTP[©¨¨TTT€x~ñ*‹îcÅ;ª¦È(ˆGÿþýA‹UX„Éü-£/^¼ÐÕÕ­­­ý~1”e÷îÝû^FÉëìÞs`s'''rš}œŠr}ËžýÌçÃ(‰‰‰ƒ â*£gΜ177gÏ c¿. 'ùĉ!qH6g¯fmmݾ}{öÈì~êEˆÔŠKÒ[^=%£eeeÚÚÚ9_¾|)''Ǩ„O(ÊW-XF['P…¹¸¸(**ÆÇÇsVp­333PùY³f]¹r…îX‘ñ÷oßvìØ±sçÎË—/›ššÖ€>--mðàÁUUUõdÔËËËÑÑQOO/00°gÏžà…îîî“'O&ÚwõêUHŠ­˜QQQúúú0L:(%ÓÓ§Ogý»ƒ±sçÎ-Y²DFFæýû÷Ðüoˆ?ü ®®Ÿ »Ð.,..†&æ©S§,,,|}}Ù!y{{oÙ²ÔÄÇÇgĈü.h†‚°¶k×®^$Bw“ÑJ g;ü¡ðGCšûbÛµ@Õ34Ù> +=š9Q!Ÿ Œ"üPSScddõ,ü­Py±k´Vˆ››ÛöíÛÕÔÔ¢££ÑË[õ/ã߃ø¥««k=­­­…ù'NœÈËËSRR±³¶¶8p ç}’ÔÈ‘#cccÙɆ††.]º¼“Ì”X´hQ@@ÀøñãÙ…2Ìœ2e œu¬:=yò$X,äÂ{÷®[·ÎÒÒ²Þmˆððp'0Î/_¾€Ë®Y³ÆÆÆ†ýÀµ––ˆ/;ˆ611Qø#×¢‘••ýúõkii©øûæ¿zŽ‹‹ƒÜoÏž=̉ Aø‡RÅ›˜- ('MšÕîêի釠×ÖÖîÙ³'Ôõø} ãö†´ˆåÓ’7 aS^^Þhõ Í!}}ýOŸ>%$$°€¦”Q„ PFþ)++ Z¹r%ÝÐɵk×tttØ7N‘Ê(ÂetÆŒ%%%VÏgΜY¾|9ÆC Qµµ··?|øð¦M›¼¼¼èŽ¥µ€2Š ÂBE¸Âp­¬¬0`€††Æýû÷ÅUkQÒW¢¬¬lyy9]1ܸqãĉqqqŸ?–’’êÝ»÷”)SúôéCWH”BQ¾Šˆˆ000@E¤¹€2Šp^-**ŠŒŒä±Î‘#G6nÜøüùsÒ!³h 2jkk{ôèQ+++1<ƒÛË–-ó÷÷¯7S^^>**ª_¿~´„D)å«»wïÂyÔ²e´¬¬lëÖ­W¯^ýóÏ?ÝÜÜèŽAáAE¸@¯ŒfffÆÇÇ7´BEE…ššÔâ—/_[T­AF™ÀÁƒ ‡ Ö­[7h“@«#44”U×ǵÝщ”Q¡177`Õ Åéèè¸~ýzº#BDxPF.Ð(£ ,HHHà!£Ç޳´´„u(¶¨Z°Œ®ZµÊÏÏssÊðQ2Ѐ±±qpp0ÝሔQ¡éܹsII‰³³³»»;ݱ ÒTPF.Ð(£‹-ŠŽŽ~ÿþ=×¥µµµ 6lØÕ«WÅÊ(o?~ÜТ¦øPJJ éÀeíÚµÐ:ÆB©ŒFEEééé‰6eæ@Ê(ÎWi¾ Œ"\ QF—.]úèÑ£ŒŒ ®K¯\¹2gΜ§OŸRÝË}=Z°Œ‚ð}úô &lllbbbXBýï<†Ì4µÂ·oß~ûö-))ÉÛÛÂëÔ©x•¦¦¦ Q1Je4>>~èС¢M™!°ÇÒƒVÐØ±céA¦‚2ŠpF]¿~=T¥ É(TÞ[DD„˜£jÁ2ÊfòäÉäMzeôƦ¦¦ì¯²²²þþþÐ4¤fEùŠ´ÙZªŒVUUXXXÀô‡úöíKwD‚4”Q„ ôÊè… ŠŠŠ¾_ôöíÛÁƒ_¼xqÞ¼ybŽ eTlÔ“Q¨Õ¹sçdddh ‰:(ÊW‹-j‘2JFƒ„‰Þ½{[[[oÞ¼™îˆ(£h”Q[[[??¿âââïAÅsöìÙììlñK Ê(oDþÌhmm-4HbbbÜÝÝIâžžžB$Åd(•Ñôôô–7PϾ}ûRSS¡°±±Á¤e€2ŠpF%W>¾ßuUU•’’Ò’%K¼½½ÅÊ(oDx›¾………òòò01}úô»wï6%)BQ¾ 077ÏÈÈh©ƒÍŸ?&ÒÒÒTUUéA¦‚2ŠpFÝ¿ÿæÍ›KJJ:uêÄ9Ÿ<—0hÐ ñG…2ÊêdôåË—ÚÚÚ¬º7۾CQ¾:vìØúõë[°Œ~ûö܉ŒŒ3f Ýá ÒTPF.Ð(£~~~«V­ÊÌÌìÝ»7çüÙ³g¿ÿžGÿ£”Ò‚e”}‡ý6=ûgŠ¿—J%%%999IIÉÒÒÒèèh˜óùógXtïÞ½iÓ¦‰9ª¡TFóòòºwï.Ú”™)£Zv_ªÒz@E¸@£Œ’+ oÞ¼´rÙ_¹–o?&Ê÷Kß½{7hÐ VÝ3£ ’üï×××wÍš5:u‚ć ›Ã. ½k×.GGGa~‰(€B¾}ûöOŸ>]»vmtt4Xò±cÇ&MšÄ eee`¢Ÿ?>zô¨×5I-A8ÒÊAE¸@¯Œž={véÒ¥)))½zõêÒ¥ËÖ­[i ŠËââb++«~ýúB)ó.\Ø¡C‡°°0ˆá"AmÚ´©sçÎ"—ÑéÓ§—––‚úˆ6ÙæŽ]pppyyyZZë»òmÈ!¬ºûéd){8â7oÞ ÒGÁ´iÓîÝ»'Ð~'Nœnkk»wï^ø jll3jÔ¨gÏž5ùg òòòòRRRP¾)((dggÃ4ÿ‰888ìÞ½[WWtV ½×ÖÖ’›]KÇŽ+XèHKeá½2:yòdh1C5a„‡Â'-‘°AÅEÍHF!»JKKCú¢M¶eÐеφÆÅe¯6räH0ȃnܸQ =‚ð^½zÕÌÌ ¬tñâÅà|0_NNJÞÛòŽªÑ˜M¹oß¾‘‘‘Ðt0`|}õêyJOÈÁ„¤JJJ:vìÈçVUUU¤'é>@ üïi© Œ"\ WFSSSÕÕÕÏž=›‘‘±cÇŽ¢¢¢víÚÑ ¼MPEù ´©GwîÜm²-7ây/wi ™:uª@{”’’ª©©ùã? ]íéé©££cnnnii ó¿}ûÆ{[r½ö{ÈõZÞKyC ù[·n™˜˜À•` ~ gÒ¿U\\ÜðáÃùÙÄÍÍmûöí¬ºq\­­­7oÞÌÿî Ê(Âze n°O;;»/^Ðx'‹ Ê(Bå«aÆijjr>‰°ZF‰S†‡‡´Gb±JJJ nк»{÷îÌ™3Aãhì~‹òì‘íê}å“êêjiii˜ˆŠŠÒÓÓãgŸ}ûö¥¦¦ÊÈÈØØØxyy =Òâ@E¸@¯ŒC‡…ÚJF(²?NWlPF* (_©ªªBÊgÏžm²-¡e”Üm¿téÒœ9sÚ#¹¿?xðà›7oª««³þyÔ’<ƒÄ{[ª¯Œ6QF?þ¬  ïß¿ïß¿?ÿBK‰t˜Ÿ––Ù•ÿ ‘– Ê(ÂÚeÔÌÌ J·„„„ÇÓÛÝ=e¡Šò•¢¢âÏ?ÿìãã#Úd[B˨ADD„½½=x¤@{twwߺu+¸lddä€ÀAøJJJ|}}És“< ú™Ñ&Ê背ŒŒ:tè?‡Üèç“oß¾ÉÈÈÀ“1cÆð¿!ÒRAE¸@»Œ:;;ïÝ»·ªª*44ÔÐЮ0Ø´}÷î§§gxxxNNޤ¤dïÞ½·mÛ¶xñbñGâæææááѹsgMMÍ©S§®ZµªYwΊòº+Vx{{‹6ÙæN£ï˳xÊ(8¨ƒƒƒººzrrrCÈ•¿þúKKKëÇRRR***ééé555ãÇ £±ûd‘ÈèºuëŽ?>wî\!ž nHKeáí2zéÒ¥yóæÁD^^^÷îÝé ƒM‹—ÑW¯^A•PVVÆ9ÓÕÕ•–1úد8:vìèëëÛ"GÁ¦(_⸸¸pC„ÅßuD2úùógPÉŠŠ /Ð/výéÓ'GGÇ{÷îõéÓgÁ‚ð•Þ÷2›.£þùgÿþý¿|ù"œPJHHÀAâ\¤E‚2ŠpvMNNÖÐÐèÔ©SII ]1pÒâetÆŒwïÞeÕu ¾lÙ2ii霜œÞ½{ÓROdff¦¦¦BýPUUv¥««+þ`(…Š|UZZ*''çíímcc#ÂdÀÃÃ,_QQ1>>^^^žîphÆÌÌìúõë³fͺr力÷èÑ#//oË–-{öìylH³eáí2Z[[+##£¤¤Äñµ[¼Œ’¡ù„¸I57oÞüùçŸabÅŠ~~~t‡#b¨ÈWéééjjj§OŸ†F…“EXu}………ÁB{—s4Bn_@N‹ŽŽÎË­¬¬Ž9ªëãÉÁÁǦoå Œ"\ ]Fiié^½zeffÒ›/£äŸ4iÒüAw,ÿ¢¢¢‚Tù?þøcËë8“Š|§¥¥uýúu"ñˆh)--…Ó$&&æÄ‰«W¯¦;zxõê•¶¶vÏž=ÃÃÃz‰ž“¯_¿ºººeee¹¸¸ÐòDÂPF.Ð.£Ÿ>}•••-++è%MŠh©2Ê1’ü@]]Ýýû÷³—òÿ‘'›òvBqqñÎ;É‹8NNNB'ÅL¨ÈW>444d¸e-(”@¡V®\Iw tríÚ5ºAZ(£h—QR¡²žŽ"ZªŒò¾#Ïà‘Žp¹hòäÉ¡¡¡ì¯JJJ/^¼ =¶$¨ÈWׯ_733ãDAÚAE¸@»Œž9sfùòå0qìØ±µk×Ò”Q¡Ói¢ŒöèÑÃÄÄdûö튊ŠB¤Ãp¨ÈW§OŸ^±bEFFFŸ>}D˜,‚ u Œ"\ ]FIO“***úúúLH¦¥Ê(¦=3Ê–Ñ–]@Q‘¯¼½½mmmKKK;vì(Âd‘&R\\ìïï~ýúuºcAÆ2Špv]¾|ùlj1á…z”QÞˆü™Q”Q¡Ù¶mÛ®]»ª««E˜&ÒtxüD 999{öìñõõ-//ÇÎçzAE¸@»Œ‚AmºaÆyóæ½}ûVSS“®H(£ülÎ,ax@E¾²´´ úüù³ÓDš£d4??-§Nª¬¬$sPFzAE¸@»Œª««;öÀ {÷îµ¶¶¦+Ê(?›sKP‘¯fÍš•’’òêÕ+¦‰°ê29°~ýú'Ož@ÑäååµhÑ"²4==ÝÉÉ)$$¤¢¢bÈ!...3gÎdoÈ5AÎñåyŒ„Äc¿0¿}ûöOŸ>]»vmtt´ªªê±cÇà,nô·*++wïÞâ$Tq•Q;;»#GŽXYYýúë¯/D\°3˜„„D×®]µµµ×¬YcffƹΥK— o¼|ù²¤¤¤]»vZZZ¤Q2mÚ4III(V®\ ­—ššÈ0ãǧ;ð2Ê/öööpZB ÃËËK »ƒö´¤.\xþüyö|¨˜µ´´RRRÀnß¾M‘¢Ñ+£Ož<;vìýû÷§L™?|øð«W¯Ö»é fPFÅ 4·Èˆ,Û·oÇ+£üUQÛ¶mwîÜéìì,ª49G®]»®>>>óæÍƒ¯ªªªPñ«¨¨@#ŠU÷/$''·iÓæëׯìÍ›(£\÷KݺuËÄÄ’%ãƒÀŽ üôw1ð™Ñ§OŸ®Zµ*++ <»W¯^999tGÄPêýƒP†CÕÉÎ~?ÿüóÍ›7—/_~êÔ)šå‰8dÎLp¦wïÞõë×2VïÞ½ÿüóOh¾7´>»ÉÏŸ?wëÖêðøDœ7,ŠŠŠ U Åüü°°°¡C‡r.Ý¿ÿæÍ›aš;wîÜ¡b€"zeôÊ•+sæÌIHH4h|…澎ŽN`` -ÁZ¼Œ"´ ò|•ššª®®°dÉQ¥‰xH›ŒŒÌ·oß¾_¿¶¶–ýµ‰2Êu¿nÛÄßEúúúðYXXHæHJJâhO„   ]]]Î9œÿ`EEÅÒ¥K¡=z4Ø<ÌÿôéÌ™5k=ó‡8d4%%ECC$ÎØÈÈÈÉ“'ƒÏ5ôL÷Û·oGEîÐ1JFmmm=jeeµgϪ÷5}úôàà`iiéððð1cÆ|¿‚ÝÞ½{abëÖ­äÑ:ÑB¯ŒÂq¶´´ÌÍÍ%#¸:t2C½ÇÄ Ê(B"ÏW=š0a´`'Nœ(ª4i“——m"W(Úœ-£`¨œÕ_½{¬¤”cˆŒFDD}>~üHnš˜˜Ü¹sÿPïÜ¿¿}ûö0_ 2ªªªJ&Èk.={ö$y†ó„žžÞóçÏé}›>%%êÓˆˆ|¿¥!xÿï£G~öìÙúõë=*öÐ@2 …ã‡@/`šŒ3~üøñïW;w•Õ‹/àd&·‰2 g~aa!y†wРAiiiPX°êwCÕãÚ•zÇŽ£££Ù>ʧŒ‚ï>|øó ¡Ý»wÛÛÛ ùõë×É›:Ð>n´sMhˆGEEòBÁÇã\5‡d¡YŸÀ)åâdÞ¼yçås8YYYÝ»w§%$”Q„ Dž¯ÌÍÍ!µÔÔTQ%ˆ°á]å¿|ùÒÕÕõñãÇ ›;w†ÊЬ3fp®¾yóæ7oÞHIIÁ ±±±¬:\¼x1”ä½{÷†AIÅ £¼{?%€˜BuÜ©S'øQ&H)‘‘‘½•Õªàý¿“—L¤¥¥Ïž= u+«îÎjXX˜‘‘‘¸å µ2Ê£+lÖ¿3ý»wïtuuýýý‰Š‰DF˜˜ö£¾ðW>}út³´´N3ggg¯¾}ûBc4''gçΉ‰‰°&81锋U×,ûôéLØØØ@j¬d”Uw·ÅÛÛ[RRÒ¬L®¡§x°téR2;´›•••y¯|ðàA"¬¿ýö´Ý×÷€O/X° 77wãÆxÓh-|ûöíÑ£Gì9ùùùJJJžžžäÍ-ñƒ2ŠPÈóÕÈ‘#{ôèqçÎQ%ˆ´fÈStݦGø„·ŒVUU‚ͳên§ÊÌ̬¨¨`Ú•fq\íׯßöíÛɈ***àyõž]øúõ«žžÞøñã>üß°D!£ƒ JHH Óýû÷ÿþ=ï¯ÌÍÍaÂØØøû^ÖÚ–¤/!!qïÞ½©S§²êêÐVhˆ'¯b! mteh‹kkkÃDÓ¯ÀƒpÛÙÙAÑ¿nÒ¤IwïÞ¥ñ6߈#ÔÕÕë={0wîÜ„:h e¡Ñæ+8y¡¥½aÃìi"P¡¸¹¹åççwêÔéÉ“'ìŽúÒèqP,ooï   äääêêjUUU¨å™Ö±8d´C‡·oßž8q"ì  ts…Õ«WÇÆÆBŽg Hd”tšÈ9]O(ÓÓÓ8óa‚<¾CàÚÛ"o0aÂÇy¯ÉäYã1cÆv oJKKåääXu‰]¿~]Ð} ÈãÇ;99ËÊÊnݺÕÖÖ–ºîôùAQQqÆŒ¾¾¾œ3%りñXiKII"õãÇBPéœ8q ¼Àäââ²eË_`"]44°^ii©ºº:mvËA< Œ"T Â|õÛo¿­^½:==½OŸ>MO­Eâãã­Ù´´4˜2dH|||£÷å”ËèŒ3ttt¶oßΪ{å ÃÖÖ¶ñ°¨—ÑêêjˆêÔ©Syyy}ûöµ°°°±±!ã³Ñ(£È((©¤¤äëׯ¹vËO8wîÜ’%KXu ù9¤¼ÉÍÍ%];Þ»w®®""" >|¹…ë „*66VKKKlQ¡Œ"T Â|eddTVVFºCxpíÚ5òHÒÛ·oy°‚ˆÊeÎö_~ù… ¶Möðó¢Le´YóìÙ3ðÑÚÚZø3ã|Ù‹ ™aÆ}úôI]]œUVVV$»fB§÷wïÞ…LLL ´a¸®PYY9`ÀÈWü<ï!*PF*U¾ÊÉÉÒõСCëׯE\-(ZI¡úøñcÔAµ2 §}»víBBB&L˜PUUÎ;bĈÆÃjÅ2Êâx•ÊÒÒ’=8’ÆÆÆ ŽÒÒÒð)Úò4>>~ôèѰ‹7oÞ 8P„)óI``à¢E‹H_` ­sæÌ™åË—ƒŒÂqOT(£ˆ*_9;;ƒ‰fffvéÒEqµpHýÂãö ‚ bFÞ#‚?oÞ¼+W®À´££ã®]»Ø‹*++çÌ™sûöm(Oûí·+Vˆ|ï...+W®„ôEžx£œ8qbíÚµÙÙÙ<^/¨©©9rdii)sÛ¶mÅÊ(B"ÉWýúõ[ºt)Cø6/z÷î••eccãååEï‚PFJUUÕÂ… oÞ¼öÉž_]]½hÑ¢«W¯;vŒ¢×f333UTTúôé“‘‘AEú¼Ù·oß–-[Š‹‹ÉàR ñüùs}}}0õzo¡QÊ(B"ÉWëׯ?}úôû÷ïÁ±DW çþýû¿üòK\\KØ'û-(£Ì¥¶¶666¶ÞЩ¬ºë‚døêvMncÑ’7¼¼¼@1+++½b±aÃ???¨QÄð8Ê(BMÏWàUÓ¦MsvvÞ±c‡èâjáœ?~ãÆÐâíß¿RRÝá ‚2ŠpƒFussÛ¾};?»†ºDSSSMM êr®¯y‰”Q„ š˜¯’““ÇŒ£¬¬üäÉQ½ÅØèÙ³gnnî‘#G AKw,‚ü Ê(ÂeÔÑÑÑÛÛ»²²’Ÿ•¯^½:{ölðWWWWJ£BE¨ )ùêíÛ·S¦Lùöí[TTTß¾}EZK†”oäø#B;(£h”Ñ-[¶üöÛoÅÅÅ|®¿jÕª3gÎ@u®¯¯O]T(£—¯àÄŠÒ€Pæ+æ°aÆG•——§¥¥±è(ýÌÍÍ`BYYÙÑÑqýúõbAheáBs—Q ::ÚØØXFF&88xĈML ¥¡ÌWLãñãÇäOé×¹sç’’gggwww1ïAheá½2š••×ô¤§M›VXXxýúõI“&5%)”„ 0_‰™ôôt''§ŠŠŠ!C†¸¸¸Ìœ9“s…†d´¼¼ÜÓÓóÒ¥K,RTT´±±Ù´iÿ)7 )u#""HÒª@E¸@¯Œ–””ˆªzÎÉÉMJJ:}útSúEi@¨ó•8Ò@[[;77·k×®;v$üݼyó§Ÿ~b¯ÓŒš˜˜Ü¹sGBB¢oß¾µµµÐ`^¾|ùñãÇùO™7¦¤¤$ `ìØ±¢ø¹Òœ@E¸Ðbd”U×Ù©©ixx¸‡‡‡”””‰ 4 T€ùJœXZZ=ztÅŠ'Nœ€rÀ××wÍš5zzzQQQìu’Ñ6mÚTUU?ž´i««« øO™r@@€……Løð|WT?Aš (£Z’Œß¾}³µµ=|ø0T3—.]êÙ³§ ) 4 T€ùJœ¨ªªfdd¨¨¨tèÐU§€ÉÉÉ`™ì1WY Ëè¤I“†nmm=mÚ´z£7ñ“rC¸¹¹mß¾&z÷î ‰oÞ¼Y¿Aš(£Z˜Œ._¾¼bÅ ¨-'Nœ(ж( `¾'222Ð.­7ʺÚÚZö׆d´¨¨ÈÙÙš²°Éرc½¼¼Ø÷ÓùI¹!|||öíÛ—šš ‰ØØØ@²Bü4iî Œ"\ QFŒŒ***(ªž“’’æÌ™“˜˜øË/¿lݺµmÛ¶|nˆÒ€Pæ+q"//_XXxëÖ-“†Öáý6=ÈeLḺcÇΜ9#++›‘‘ѽ{w>SæMPPÐüùóa"--MT½##H3eá2Juõ\^^nooÕ‰†††ŸŸß˜1c˜Ò:Á|%NfΜ ¾¨¯¯ŸÝºucÕÝO/--%Ó„†dþ£Ñ£GKKK³ê†yëß¿?L€˜êèèð™2o¾}û&##‘‘‘|JÒ’@E¸Ð‚e”UÎÊ•+¡R±´´ÜµkWûöíª¸¸ØÊʪ_¿~†††eee0áÂ…:t ƒ¤p.tѦM›:wîŒ2*âââÀó***@ûÔÔÔ*++³³³œœÈXGC† aÕ5VI§÷ƒ&[½yó†UW$ÂVJJJࣰ¸#¤˜˜Ø¦M›FSæRêBf7nœh8‚0”Q„ -^F¨9¶oß¾oß>EEE//¯ùóç“_ÝPT(£¸e´¹óòåKWWWh‹–””À‘×ÔÔtpp˜1cëŸBï{H1øã?¾~ý:77·¦¦JŒ©S§B:ÊÊÊü¤Ì'°¯ððpƒ¦ýJi~ Œ"\h 2J€*dóæÍPŒ=ÚÓÓs„ Lˆ i%`¾BØôèÑ#//oË–-{öì¡;7(£ZŒnݺåèèøöí[SSÓ]»v 8 Q!-ÌW++«#GްêúxrppÀ±é‘VÊ(Â…Ö&£¬º^¬}}}wîÜ™ŸŸ?{öl;;;mmmÚ£BZ6˜¯6_¿~uuu ÊÊÊrqqèySiî Œ"\ QF§NZ^^NWõüåË—“'O8p ##còäÉ ¤FFF,”„0_!‚°PF®´ÈNïù§ººúâÅ‹ûöí‹‹‹1bĺuëNŸ>-%%…Ò€ˆ”QAÊ(•V.£øù÷ïßß¿ÿƒXuýZ_¾|yüøñ<^ºG@Eñ“˜˜èäääçç×µkWºc¡ ¨¿¬­­õõõÉ` Ìeá½2ZTT)þ]7Dff&8hnnîׯ_ÕÕÕ—.]:sæÌáÇÓÒìAm=ûûû‡‡‡_¿~îXDF÷îÝ{õê/Ķöööaaa……… …žžž«V­jzHç„„„ &äçç,Y²¤é{d&ð§èééUVVž:ujÙ²et‡Ó8(£è•Q?áJ7ê Òàááqúôé+W®”••©ªªþôÓO&&&d\”ÑÖïF›Ïž=Û·oß‘#G&Ož¬¬¬|ôèQ++«ƒB[Ïjkk ôîÝ;IIIØ Úù...M÷qñÕÑÑIOO‡ÂÜÉÉ©é»£šœœœ={öøúú’W)áÖ­[¦¦¦¡¡¡ãǧ.H‘€2ŠpF]°`´\™)£D¾|ùòûï¿ß¾}ûîÝ»Ÿ?–““›6mÚÔ©S¡˜èׯÝ‘"Í ”ÑÖCK’Ñýû÷oÛ¶­MmÛ¶ÍÍÍ… ÑÅ‹ó™Âëׯ‡ ƪóÚQ£F‰06ÞÇyÙ²eþþþÆÆÆÁÁÁ"Ü)äççÃA>uêTee%™#Äè\öööà²}ûö…Zþ) Â(£h”ÑE‹EGG¿ÿ^ü»æWi¨©©yúô)XéÍ›7¡‰szõêkByÍСC‡B“”žp‘fÊh3â‡: R_¿~ý“'O¼¼¼ ¼"KÓÓÓœœBBB***† âââ2sæLö†\$l½Q@¿”Ç~a~ûöí¡Z»v-›ªªªÇŽ›4iŸ?Gèm?Θ1ƒ\5€l|ýúuyyy>·e5¬ŒìŽ;"""222jkk{÷îmjjêææÖ¡C²BAA¬pãÆœœ°+MMÍçÏŸ³×}±w¥ô AƒXuÏŒjhhðm•p*++wïÞòÒêÕ«YBÉhYY˜èçÏŸ=ú}ϵvvvGޱ²²úõ×_E·° Œ"\ QF—.]úèÑ#(‰Ä¿k4* ™™™P€B ŸIIIpè:w£J 5Ó°aÃÜ®];1†Œ4PF›¤TìÙ³'øavv¶´´44›AM@Œ´µµsss»víÚ±cGR|Aõ§Ÿ~bñ1ê=«1mh¿°Z¼``ÀRRRÅÅÅd˜æçç½-ûʨŒŒ a^^L:tˆ­æ<à}4îܹcbb‘À‘ƒ”YuW(Î;Ǫó³Ñ£G'''CäàX¥¥¥°»žâ2àèè?mÚ´{÷î5§¨ŽUS€l §§ùû\Á?»wïÖÕÕ®·þ»ÊÊJYYY8h¢‰¸  Œ"\ QF¡õv÷î]&Èhxx8{tP¤š¡‘‘‘`¥111¯_¿†’‹U7ð4”žÃ‡‡¦9Ô"*u@» qÊ~ ”””\¼xòϼyóäääè‡é ŒòÈ„²²2´îè ƒ”ŠŠŠŠ¡¡¡#GŽ|ñâʼn'V¯^miiyôèÑ+VÀW__ß5kÖ€FDEE±7oèZ Ÿ2Êu¿d,Pà€™ 0¾¾zõŠÜççç·-ü.ooïzÏŒ8p€Ÿç”x_¿ݬ®®Õ#s,XÔ¡C‡¿þú æØØØÀ^ ä¼ÿ>¹´ ,4ø9Óáq›”Éܸqc£q~³pÇJ$4EFÉ p†–ç";;»Ã‡ÃÑÀ+£C¡WF/\¸PTT$þ]×Ȩ««+|6E>~üøºŽøøx¨V“’’ªªªØ»èÕ«S%%¥nݺuå K—.äB‹(•À¿íïÔÔTV]Á U&ú(oPFùÁËËk÷îÝÖÖÖ›6m¢QII©xíÚ5SSS˜ðññ'4ºà+4/¡ý g1¹› 'xrr2´3¿~ýÊÞ¼‰2Êu¿dÑ­[·LLL Yò\ìhìØ±|þá¶e#ôÛô<”ñùóç§OŸÕÍÍÍ…¶={5rœOž<Éã½{)Cq*2uêT¢mâ±"—lÙ°¯Ô €p2 Å2éÁ*..ŽÉÀ Œ"\ QFmmmýüüÈÕD±¿”1½Ž´´´OŸ>UTTøûû“¥ £P‰Djjjrrr H…}ÁgfffF0Áõ^‰´´4©áà“¼¶ÏžO¥ú>‘@dgg'&&²¿úúúZXXÐói2 çBÑ?€]•••}ûö­²²²kmmmII ¬u|ø˜³³³––V£›@+ggg{yyÁ)ƨ¾ä{ …fdd§^HHHˈ„¼ ¬¦¦]ϼ= Kóóó¡~|òä‰ïC Ê(Âe411qРA/^œ7ožÐ‰@}lnncaañ믿6ýi3”Q„ D•¯ Zµµµ…l?}úô-[¶Lœ8Q Í ׬YsåʈΗѣGó³UDDì®k×®W¯^9r¤P#ˆ¸)--4iÔdàºÃ¡ŠW¯^ikk÷ìÙ3<<¼ÞKôÀÎ;ÁGá8¸ºº 42*u Œ"\ QFsrr”””šÒ+P``àÊ•+»téròäÉüQ$Q¡Œ"TÐô|U\\¼jÕ*ÐA---oooý/6ÄÓ§OçΛŸŸïéé¹iÓ&>_ìxþü¹‘‘œªaaaLèAø§¬¬,((ª º¡–k×®éè訨¨Ð_ Œ"\ QF«««Û´i³mÛ6h± º-¼uëÖ]»vA•|ùòe>„2ŠPAóUTTÔüùó?}úô믿ZZZröÛÂ'wîÜ™7ož²²2Ô[üߪËÊÊÒÖÖ–““ t§‚ õ@E¸@£Œ²êFa6119qâ„@[Å.Y²äâÅ‹«W¯>räH{“©Ê(BMÉWwïÞ%O…Bž5"…   8eFŒIñ~K‰“ššCCÃW¯^ÅÄÄð39‚ H£ Œ"\ WFGU#TüoòíÛ·… ^¹re÷îÝööö" e¡¡óÕåË—/^‡„„¡GL3kàÀÎÎÎBtâëîî¾k×®ÌÌÌnݺ ·wæmì_~ù%..ŽE_Ÿ!‚p‚2Špaذa¯_¿†JËÜÜ\IIIÌø‚Ãíìì þkhÿeË–ùøø¬[·N !¡Œ"TÀ¾ª¨¨PSS›|xõê×¥çÎ{ýúµØ€AE¨€ÿ|e`` ))&ô¾444<}úô²eËÄʨx€¿Õßß¿ÞLyyù¨¨(±=’!NøÌWdèΦ}j¾£.q¸hÑ"V]!Ó"3‚4GPF.Ð.£µµµ;w^³fÍž={8çäççÇÇÇûžRPFÅÃÁƒ ‡ Ö­[·¢¢¢#GŽ„††ÂüuëÖùøøÐèá'_Á Ü¿?¡Ð;8p ––Ö… „ØvæÌ™™™™/_¾zï ²Ð¾}ûRSSazäȑϟ?§;"Aþ Ê(ÂÚe”UWO·mÛöÁƒì9QQQúúúAAAsçÎ0¬–(£ä>|ø0ÈʶmÛbcc»víºråÊ;vHHHÐÝß/€“ŒƒƒƒéGô𓯠ÃÏŸ??11Qè÷èÉ}váNœššyyy ‹zÍÂæˆ›››»»»‚‚ÂÔÿcï¼£¢:þÿ½À®X°¢{WP4怊b±“`WÔ ØEP°aïƒ1F¢Ø[,ˆ *`A, 4éíü^gç›=ûƒeÙ½»wï ïçβ÷N¹³sgž¹efàÀ 64hÐ@èñŒ2Ð]¼x±··wRR’ÄŠF©yO*Û2jeeuóæÍÂÂBÉ÷7ntttT<ž;wî”´I•wD¢¢¢Ø ì³gÏÞ¿?çx´EêÕ‚ þüóÏ/_¾p^uiûöíK–,ùúõk­Zµ” ûôéÓN:ùûû5Š[êA¥B2JÈ@dôÔ©S°Ï°°0ô…ø÷Í›7­ZµÚ½{·½½½æ3S¶eT¯^}Û¶mºººvvv°ÒÖ­[+5¸OR¶aøñâÅ‹¼¼=&&¦¬¾CF„6@2JÈ@dôóçÏ 6Ü¿ÿìÙ³Eâ70<==ããã«T©¢ùÌ”mÕÑѹtéÒÀEâgéBBB*T¨››«l<2Q¶9sò$ù?·¯¯ïرc•Šä{¡Ôz…_¡fÍšŽŽŽîîîÜ’@ùׯ_߯Æ9Á1öððÓ§OÜR'‚P’QBÚ £ eË–={öüóÏ?óòòŒŒŒÆ·k×.ArR¶e´OŸ>7oÞdßôïߟ½3$Ô¯_DFÑ£G–×¥)µ^±»ä'Ož=z4·$^¼xѾ}{ÎOZcpÒ Aƒ .pK]í°ç>‘¥¬_¿ÞÐÐPè¡HF h‰ŒNŸ>ýúõë111þþþcÆŒ ïØ±£ 9)Û2jee…rfßp“Qµ?3ZXX˜œœó`‘{xx899qˆJ›)µ^8qùìÙ3%·$¼¼¼ìììbcc›4i¢lØüüüjÕª¡Ø9_—U;ûöíÛ²eË»wïDâiüÑ&p~”– íd”–Ȩdêû¥K—&$$8 ɨ"ñÈDÅZ”””d``€C† ¹xñ¢*Qi!¥Ö«5kÖ¬^½:##ƒóUa???œ>Âjít÷ìr‘øºo™|˜˜ Ê$£„ ´DF!"õë×Ggìæææáá±xñb¡rB2ªH<2Q±=yò¤[·nø0iÒ¤âóáï”Z¯~ûí·W¯^©’D‘)Ò‡=2!y‰P{(,,d3 ß¹s§wïÞBg‡ U!%d %2*¯=“‘‘ñüùóèèhßç%Õ ûöíkܸqÍš5¡iiiÁÁÁø&11›.]º4xð`Íg‰WJ­W0­jÕª]½z•[üøQ˜3gÎܲe ‡à®\¹2==:Ë-üÁªîÍ›7ûôé#t^‚P’QBÚ#£nnnkÖ¬éÞ½{PP€Ù Õd~Š1E5pqqÑ|~ø¦Ôz…Ø€¼½½¹ÅÏ&j=räÈĉ9G¨û÷ï#n©óŠ‘‘Q\\ÜÂ… 7lØPöÞl#ˆòÉ(!í‘ÑôìÙó·ß~û믿Ìɨf¨_¿>»ª§§W£F KKËéÓ§—Õçå׫üüüÊ•+¯\¹ÒÕÕ•[ü.\>|xHHˆ©©)‡à=zôhРÁùóç¹¥Î+W¯^]¶l›_¯|}}§L™ebbÂ-þ-ZôìÙóèÑ£Â^¼xqذaª¨0¯°6 EÇmU‚ ´ ’QBZ"£>>>Ó§Og+0999ÅÅÅÕ«WOœŒ| ¿^mß¾}Ñ¢Eiii5jÔà9ÎßÊ•+/]ºtíÚµ‚ïÛ·oΜ9 BtrÈÏϯP¡>ܽ{÷Ç:;A¨ É(!-‘Q›ððð/^|ùò¥qãÆè›É É(Áòë•‹‹Ë†  ^Ü"ÿüùsÆ ᔿÿþ;‡àÎÎÎ;vìÈÊÊâ–:¯;vÌÖÖ^¿~Ý¢E ¡³C„ªŒ2Ð5224hСC‡ðyܸqÏÅ’’Q‚ä׫… >|8%%…[ä?655åü°õÔ©Soß¾ýæÍn©óÜzëÖ­oß¾ÅçîÝ» ¸D0Aj„d”6ÈhBBBƒ $×u®]»fmm}ýúu+++Íg†d”àùõjöìÙ.\ˆ‹‹ã9›d488ØÌÌŒCpœnß¾}»ÿ>·ÔyÂÍÍmíÚµõë×8pà† ÐD#‚ ÔÉ(!mQö*qPP¹¹9ËL§N7n,È„£$£ȯW¶¶¶PIÎ ÓÒŠ£–æ;66ÖÒÒòÝ»w¿ýö›²½Qzz:D-**ÊÊÊêüùóUªTQ6uÁeôÀ¿ÿþ;t¼øÔ-999­[·nÛ¶íåË—5–’Q‚ä×+CCÃ_~ùeß¾}Ü"Gð¡C‡²iz•åÔ©S£GïØ±#·Ô ‚ GC2š›› %‚b¤#”9áÈ… víÚüíÛ·Æ£%uvvÆÎœÓ ûé§Ÿ gÒ_ºººº¹¹q޳$Œcbbàׯ_W1ªäädssóׯ_×­[7 @Òœ9sæàÁƒ¡¡¡‰‰‰zzz(™8995mÚ´H l!A||€ÃYZZªá¨þØá¨EF‡ ÓBn¥W^Æ!‘ÜÀÀ ((¨øšx(½-[¶àÃÊ•+Q¶Je@p1bÄû÷ïŸ(UFÿýwn6‰ñ¥J•ƒUÁ7mÚ´lÙ²¬¬,Íœ_A”s4$£ð³É“'cœ-/+ 7zùò¥ôìfxxx³fÍ$_zzzΚ5ËÜܲÅ-]´æ©©©&&&¯_¿.â¾jG]2 Ý„tâÃúõë¥7íܹ3))©S§NuëÖMNNÞ³gÏ7ð=z¬â÷òòóó{öìùèÑ#==½Ç+u»Mpmß¾}‡üüüJÚááǽzõBù¬]»Vù!%ø@~½ªZµêüùó¹É( SwïÞ=wî\ÁѼdffrK¡,’Q///Ÿ{÷îá3ÚÖ[·n™¯Ãw´ž°Oé/á‘°I‘ø!ÈjÕªqHWŽ fgg#WÈ<8!!{ZXXÀoZ·n-½gTTÔöíÛ¯^½P„Øá_é$JBÙâÍËËkÑ¢Åû÷ï!åðuù¯ÁGëÔ©ƒƒ ’ùå;wXo7jÔ(¥ÞcVF ñs/\¸:.g·9sæx{{‡††¶iÓ†ï,‘Œ| ¿^á4DÃÈMFцüðÇf#[e™1cÚFÎ+‘A(…†dÔÅÅåÍ›7ÿý·H¼à²Hü†Šô>]]]éË¢¢ÿd´R¥Jتxr0öµõfffÒÏ]ýôÓOø ÕkÛ¶mñ°5jÔ–øè‰'&Ožœ••Ud7I¹©WFOŸ>ÍæRA†,X g›nEºÿ~™ûôêÕ+((HGG'>>^ÁU?~ljjjbb‚ø•ʼº`ý(DsÚ´irvKIIÁ/ˆ:ƒ¾\©êÁ’Q‚J•QÏØ0ž={†1ó?ÿü3vìXÁûí7 ó¸ÍQJ¡,¼Ë¨*®Æ^©¶··WvI:EŽŽ^±b\­yóæÕªUûðáÚ5k"""°ÉÁÁa×®]ø€»víš““!ž?¾••b~õêÕ¥K—Ø£¨"ÅÄWq&Mšô矊ÄoÓ7iÒ¤øIIIè!òòò ÓÛ¶mƒ/êëëC7eеH|gŸI­‚óW'$$XXXDFF®[·nùòåJe^]°ien߾͊TþþþcÆŒqsssuuå5K$£”*£œúD›€Æ ÍÔ!C86lØçÏŸ1,ç– BY4te´E‹îîî¶¶¶"ñÊ:P½#F”´s~~~||üùóç—-[Õ8xð ²Ñs3à#GŽLž;;%}ÿþ=üþýûæ7U ì©Ù7oÞ`œPêÎ3fÌÀo„î]/Y"%ø@N½B3X¡BÎ2zãÆþýû#feÇà 6?· ó ‚ ”EC2Z½zuÈeß¾}‘çîݻݻw—¹'»*»Ý¤I“V­Z¥ˆ‘”„|AŒŽŽÞ±c6áCFF†ä{ÉþFFFqqqÈÄHÅ´D__ÿÛ·o?þø#ŠHæEd”=zô¨ÌLÓÒÒjÖ¬‰i(µÌ8“’’öíÛ·{÷î„„ükaaqòäÉzõêq> aoòfff*2C*~8ØvnnnXXJ§,‘Œ*HjjêñãÇq.Œ?žUʢſˆ­———ŸŸ~ìŒoð—MN¢?üðÀƒŠH¡üʨêo𣱆¼Âe_½zÅ92‘]õìѣǃØ7+W®d“VJö‡¤^»vM¤Ø3£ì¢fçÎCCC9d•üWªT î®È²ò’GB'MšT|>|pïÞ=¶¼»»»ûªU«Šl•È(ŽÔÉÉIKdå’Töyµßÿ2tôèQ¸¬Ú³D2ª‡š9s¦ä_’ÑRa2ŠÁgñ=1(}ûömݺu%Þ™““S|·””¥Úpf¥ø‹˜›4i‚ÈÐÐÐÈȨQ£Fø+ù½ ­“'OÞ¹s'Ç#‚PM\ݵk׉'XG¾fÍèQ‘I1£££×¯_oooߥK—"a?|ø€öZ††˜CÒrd q|||åÊ•wìØñÃ?ÀäŽ?Î6Iö—L´ÄÞ¦ïׯŸ®®nDDÄÕ«WÏŸ?_$B¶¨H¼””……º ìÉÖäTœ… "?ø îß¿‘­ûöíCi #A6`«ÐV|“˜˜ˆM—.]jÆ!i92*¹*aäÈ‘ìéýçÍ›‡v¹xÌÅËmݺuÅŸmU¶xÑy°õ?ûí·¿þúKæáâèææ&ó±Z¤ÞªU«¨¨(CCÃØØØ’V¨OJJB¯ƒÃüôé“HÜAúûû øS:uÐ2)W x9J}-|´C‡jÌɨ‚ ð1Š@E7n™h©¨QF‹°téÒƒB:KÝóëׯ?~DrpÓçÏŸ‡ŠaF‹¶ÚÒÒÒÚÚz̘12gš#‚P šÑaÆ™ššº»»‹Ä÷…!—‹/–ÞáåË—‹çææ†„„°›Î ŒõáOž<–q»÷*GFóóó‘%Ÿ„„„æÍ›ÛÙÙ-\¸POO¯øþçÏŸG³ i«T©vîÛ·oñX(É={ö ÂÈÈHKÆ Û·oÿï¿ÿ*›g2”ŠùôéÓ"³‡Ö¯_Ÿ]e‡™˜˜ «˜>}zI“Œ=ztâĉ"ñe’"e^œœœ___6µ~Ž   A¦vÊËË«X±"Æ +V¬àæ_?.:xn¯nÈ„d”àþd¡Îž= ¿ä–-í6sæL48hÁ?~ŒÆ MÍŒ30Æ`dy&""bùòåÞÞÞl<‘¸ñ_°`A¯^½lll„ÍA|§hBF¡JË–-c«Ò5mÚtÇŽìÞ·4/^œ0aBåÊ•wíÚÅn7C†œÑ®Y³F¨Ù×áÁƒðÑÂÂBü½}û6ç;æÐÖN:}úô Î ¯Udš$‘xÒ{ô:pÖAA¶ÑBëçÌ™Ã-dÞÂÂ&>ÞØØX-¹"%ø€?µµµ½wïÞ»wï8„-²Úׯ_ýýýÿúë/4Gø9†î߯’fddtíÚµ[·n’ç²”âùóç}úôùòåË‘#GØP„‡‡›››c<ïããÃmýU‚(çð.£ªªU«^¹r'pnn.”èÑ£GÅŸ Ÿ?Þ½{7¬ôõëר³Q£FPŠyóæ•4#iFòÁܹse>$P*(ÀAƒݼy³B… øËÞaRöR”P˲¹þüóO N8G‚¾¡oß¾µk×¾~ýºZ|”d”à^eCP'å(|«C‡pµñãÇKÿøñc´K§OŸÆV///µ?™­‚ƒƒ{ôèÁjvv¶²a“’’LMM£££‹/Pwîܹ‘#Gêèèܸq=—úòKå MzO( ÝÀÉ“'ñÙÙÙyýúõJÇ}ìØ±çÏŸÿßÿþ‡>Cþ ï2a7R70V133CË>|øpUâA—¯X±âåË—e~”‚d”àþdô—_~yûö-7eºváÂ…¡C‡ß0kÖ¬˜˜˜M›6±¥†¿/0P=zt§N8L7eÊ___É}EpttܼysóæÍaóÊ®Hå’Q--æo¿ývöìÙcÇŽÉYíS&ùùù¶¶¶þþþû÷ïWe~VAêº:+++E¦/•ˆˆˆÁƒ'%%>}qªÉ(ÁüÉè°aÃ>}úĦŽR–ÀÀÀ¾}ûÊ9ÓÒÒ¦OŸŽÑò²eË6lØÀ! ΠiªU«ÖÌ™3÷îÝëééyàÀ§OŸbàÍV=]½z5rWÆÞÈÈhäÈ‘nnnÕ«WÇVé9:Š´oˆ¹Zµj÷ïߟ={6tÜØØí§t»Ù®];‘¸aiÕªUñ¼¥§§ÃD‘7{{{žJ€ Ê$$£Ú ÓGq{J¡  €­/À-ie”M§Ö©S'Õcûðá|ôåË—‡VeþQ’Q‚x•ÑÔÔTn5öâŋޯGúuÒ" q˜3gtmãÆŽŽŽRáš&]]ÝÆ£|ªT©R¯^=|Ì=Âf_©_¿~:u0 eëcd~ôèQ‘x†Ë—/gff²Gi‹Ë¨ŽŽŽAVV–žž^JJ ≗<ëìì ó–¹”'''ˆ™™t–¿B ˆ²É(!eÖ8mÚ´èèhôÄj‰]òÈ‘#Ñ­[·ŽÛ‹$£ð'£ªÔX¶”hDDD›6mäì†öa„ ~~~ÿþû¯Šw‡5M ,`S¿-\¸pûöílñh~~>$’eï×_EöªW¯ÎæQfܹs‡Nq‰çǽ{÷nZZZëÖ­ñ¯ô¨cû;wΛ7¯¤ì±Èš¶AŠ@2JÈ@@Eƒ&99Yñ¥ K%//oñâÅ»wïF?ñÏ?ÿ4lØPÙHF >(UF80kÖ,n1W©RåêÕ«Âþõ×_°Ì˜˜˜¦M›Êß333³W¯^øûôéSÍ<%Éš&gggɇ޽{ÃÙ>Ä€ ýüù3› Oº)“/£ìiulb³2cgÉÛŸ5kÖ„¤^¹reàÀ%eÍŠ…¡¡¡;wVç‘D™†d”€2ºaÃô.ÙÙÙjŸåôĉÓ¦M«^½ú±cÇ”]ø”d”àƒRe”óË?þø#¬èÂ… Âîß¿ßÞÞ^ý7ݺu뜜œ8¤¥,òeÔ××wêÔ©Å.Åe¿{ü´È¿¢ÿ| ´´´,){ùùù*T‰§&üNg A %d  Œººº®^½š§¤_¾|9vìØˆˆˆeË–­\¹Rñk9$£ð'£:u‚Jª"£IIIµk×Vdÿ)S¦\¹råÝ»w Nf¬ òe”-òàUFÛµkÇm^÷mÛ¶-^¼8%%EÁ]1Ækß¾½——×Ô©S9$§òeÃËœœVhaaa£Fzûö­HM2jiiyûöm´7n,){×®]³¶¶®^½zjjjIË/Q’QBÊè¼yóŽ9Â–ÆætHÓ§OŠŠš;wîúõë«U«&ô^È’ƒƒC‹-úõë—žž~ìØ1|>O@@¢¢M´IÙMóçϯU«2Úºuk333ö޹²°Ge0lSüJgß¾}Ñ\rHN)äË(D:¨««kllüîÝ»FÅÇÇ‹þkÊ:tè GÙÛôhç³gÏD È(ÔÉÉÉÄÄäõë×lkq~ÿý÷Œ7Nz)‚ J…d”€2jooîܹ¸¸8¾ÊÊÊrwwߺu«¡¡!z_›’:É(múÞdaQiÙ”FÊ‚áÙŠ+”:ý:ÄfÂ722â¢âÈ—QÚ´iÓPžúúú8£‡Î^6bÇRÒ .½UŽŒ&&&¢TÑn@4¡›ÅãùøñcË–-322¤C¡$£„ ”щ'²9«5“Ü“'O-ZسgOtl}úô‘¹ݦ'ø€¿Ûô;tèÐ}ûöqË&ÔTêôÇèêåå5}út)~/¬[·ÎÅÅÃ×ððpƒ"[GuúôéÑ£G³Åó‚P’QBʨ­­mXX»q¦1Î;‡øÅ‹#GŽ\¿~}ñéIF >àOFëÕ«7vìXÎ2Š€©©©J…j×®]§N¸=¥ú½PPP`mm€îÊ•+U«V•lrssswwoÖ¬YpppqO%B>$£„ „•ѧOŸr[S[òóó===׬YóåË—1cÆ,]ºTzù’Q‚ø“ÑZµjMš4i×®]ÂΟ?ß××WÙç¶§NzóæÍèèh)~G¤¥¥YYY…„„}ªT¨¼¼¼*Uª¬Ã!QeIOO_¹r¥¿¿ÿÇW¬Xáææ¦D ‚à ’QBÂÊh\\\hh¨æ“–“†uëÖ>|øäÉ“èþùçáÇ[ZZ²Õ¨ BYx•Q¸ÚêÕ«9„ýå—_Þ¾}Ëa@Ø´iSkkk///‰*ËäÉ“9"/êììloo¯D ‚à ’QBÂÊhjjª¶=)- ÿþûïùóç/^¼˜˜˜X³fÍÁƒ8ð§Ÿ~jÑ¢…Ð9%¾'äÈ(»ë­ŠŒzxx899q‹sðóçÏÁÁÁÊÄáT®\™=ÖÂ7µjÕBC±bÅŠµk×j 9‚ x…d”ÉhdJCAAÁýû÷a¥gÏžŒŒÄ75ž°R ‹Ž;ÒâÔ„|äÈèÓ§O;uê$ˆŒ4ˆ-#¤l@›Ç¿zõŠC¢ÊÂÚ¨Û·o³2$⻆d”ÉhJÚéýû÷èïܹƒ¿/_¾DÑÕªUËÔÔJÚ¡CXEûöí¥§È&‘¶Ê(ç‰Ì¸Í ÅÂÂB]]]|À×»wo¾“#‚oHF (£C‡MKKÓ ”LR£T÷œ˜˜x÷î]XiHH”‚M®££Ó¼yóÎ;·k×ÎØØø1FFF•*Uâí‰ãÇ£þŒ?¾fÍšBgGÛáIFóóó+T¨ ŠŒâ·»pႲwìØ‘••Å!QÅÉÍÍ=räˆ>¿yó§¯É¡HF (£Ú3½< 2êêꊿªä*66ö©˜ðððgÏž½|ù½©$‰F11mܸqݺuëHQ»vmü­Q£†:ŠO’““ÍÌÌÞ¾}‹ÏP„Ç“ʇ'Å V­Zœe´k×®¨d)._¾<''§bÅŠÒU¶ê&>` ·`Á‚E‹ñ”Aš„d”Ay“Q)”1ZÌ»wï>}ú”••åëë˶BF¿~ý ¯RK® >|øƒ´ð÷ýû÷1bð!33³øþ*T¨^½:>à/{m_òžª§§§z–ÔE|||DD„ä_OOOvùŠ( í”Q¤Û´iS2ºwïÞ¹sçòºÓ¾}û¶nÝŠ|wáÂ…6là)!‚ 4 É(!ƒò £999·nÝ óàÁƒ¤¤$ö½®®®„]á©[F圜œô’ÏÈjZZšH|ûõÛ·oÒ´ ’QeÑZ5119}ú´²=:qâĨ¨(ç®âøùùÙØØˆÄsóšA€d”A–ÑÌÌÌ‹/¢£Å_^ÅŠ»víjnnÞ¹sgc1FFF캣ºnÓ—RRRLMMé6½âð*£7ntttä+¤Û±cG$­lÀsçÎ1¿;Î)é*N^^{àîÝ»?þø#¯i¡HF ”I}óæÍ¾}û¼½½ÑU·nÝzÔ¨QC‡533+é"Î/0•gP¶~~~¨?ãÆ#-^eµý÷ßç+Î2ŠÞ°aÃp8?ýô‡t•‚µQšI‹ ¾!%d  ŒöíÛ7??_½Ú´nݺK—.Õ®]{ÆŒ&LèСƒR1Œ| 2ÚªU«îÝ»sÑÛ·o[ZZjFuttÐ@aĈùN‹ ¾!%dPf把ZµjÕñãÇMLLœœœÐ¯W©R…C<$£h§ŒþððI2zçÎQ@@†”ÒUŠ $$$,Y²dóæÍ|§Eߌ2(2šŸŸ¿~ýúuëÖéëë/_¾|Μ9ªL7C2JðO2š’’R»vm¡dôÂ… C‡å®R888ìÙ³G$žã ãLZ›ž ¾kHF +£_¿~½ÿ¾*‘¼xñbòäÉ!!!vvv›6mªU«–й"%ø€'}ÿþ=„R8p §§§²Ÿ}zíÚµ:¤®N‘d”àƒReôï¿ÿfs)…ê2ŠÁ• Èò|öìYœÅÒ%¢ÜB2JÈ@@µµµe‹q‹ ¯\¹rýúõ}úô9q℺rE2JðA©2Êí*£°2Êíj.Aå’QBÂÊè;wbbb” ˜ŸŸ?qâÄãÇÏœ9sÏž=l®PuA2JðvÊh:ulllHF ‚Ð$£„ ”QtŸ—.]RVFóòòÐÿÐZõððprrâ–nyÑÂÂBõ>¤._Foß¾}íÚµ¹sç6hÐ@‰„ö@2JÈ@@MLL¬_¿þîÝ»Ñò–´ÝÑ£GÑ[·hÑB3¹"%ø€dTó¨"£=233‰ßïìܹs~~¾‚“~pΕH,¾5kÖLOOÿùçŸÏž=«–äBÛ %d  Œ‚jÕªÁD7nÜ(së“'OLMMÝÝÝW®\©±,‘Œ| §^…‡‡CwT‘Q Ølmm• ›™™‰°Lʨü7â‘Q„544LMM­R¥JÓ¦Mccc¥gá#W ssó‡ÒÛôD†d”°2Ú®]»Ž;JϽ'ÍàÁƒ#"""##+Uª¤±,‘ŒjŒ[·níܹE’’R·nݾ}û®X±Bï¨ ‚œzÅ.•©"£Ü¤¦U«V-UdôÀ³fÍR6¬?W¨"2 -ZSÔÓÓkÛ¶í£GxÍ#::ºY³fúúúøuTLŽ ´’QBÂÊè!C¾~ýúàÁƒâ›nÞ¼Ù¯_¿Ã‡O™2E“Y"Õ¨oÓ¦Mûã?Š|_­Z5”|×®]…È¿”IÕØk…å6áݦ'Ê0$£„ „•Q{{ûS§N}úô©ø&KKË/_¾„‡‡ëêêj2K$£šÁÕÕuõêÕo̘1£nݺ¾¾¾è†EâËá—.]:wê‡d”ÏÞ½{ÝÜÜÐèéëëß»w¯¬Þ" ’QBÂÊè¦M›–-[–™™Y¥JéïÙ¬O~~~ãÆÓp–ʪŒ²z÷îÝmÚ´YµjÕ£GêÔ©3}út!›gQàÊ={ö—_~aÿš˜˜DGG—Õ”$£„|Ö¬Yµ²²Â8­U«VBg‡ ø‚d”°2úÏ?ÿŒ?þÅ‹mÛ¶•þ~ôèÑááá‘‘‘š÷¤²-£èênÞ¼ ó“|¿qãFGGGÅã9•´©È#wÊ‚’Gä•+WÎÊÊR%í„d” BD2JÈDX}øð¡¹¹ù¥K—,ùòÍ›7­ZµÚ½{·½½½æ³T¶eT$^Ž|Û¶mºººvvv°ÒÖ­[¿|ù’C<ÅQ¥I^^îÑ£‡Ìgˆ¿wHF ‚ D$£„L„•Ñoß¾Õ¬YsË–-‹-’|‰®ÑÓÓ3>>¾È½{ÍP¶eTGGê?pà@|îÞ½{HHH… rss•G&ªÔ"ggç 6àÃþýûgÏžÍ9­…d” BD2JÈDXÍ›7GOìëëËþÍËË3227nÜ®]»ÉOÙ–Ñ>}úܼy“}Ó¿ÿ7nˆ´`YÂÓ§O=Ù077‡™©kvq­¢T-r@AHF ‚ø¾ %d ¸ŒŽ1Û“'OØ¿þþþcÆŒ ïØ±£ ù)Û2jeeuýúuö 7Uû3£Èðaò³³!7÷îÝ344ä‰öSªŒŸçRHF ‚ø¾ %d ¸Œºººnܸ1--­bÅŠø^’ððáC¡òC2ªH<2áP‹®]»†ÑHVVÌ&  yóæÊÆð½ §^]¾|yÈ!$£A”HF .£¬'~ðàA=’’’6lˆÞqñâÅBå‡dT‘xd¢l-ºråÊÈ‘#³³³[¶l‰œ)üûBN½ºxñ"Æ`!!!¦¦¦ÊFK2JÄ÷É(!ÁeZ·nÝíÛ·ÏŸ?ßÛÛÛÎÎ.::ºiÓ¦Bå‡dT3ÀÀF““£¯¯ïååÕ¨Q#é­*Î¥…È©WgΜ”s{4…d” ˆï ’QB‚Ë(hÓ¦M×®]ÿþûokkëôôô{÷î ˜’QÍP©R%9oñ—½ÆJN½:v옭­íÓ§O;tè l´BÉhBBBƒ HF ‚P’QBÚ £vvvW®\yùò¥ÁÊ•+W¬X!`fHF5™Ÿ’({U©2ÃᆀP2ÊÂ’Œ¡,$£„ ´AFýüülll80{öì‡vïÞ]ÀÌ”U%„EN½òôôœ5kÖ÷(£›6mZºt©²a ‚(ÏŒ2ÐýòåKƒ ,,,ÂÃÃY*]É(ÁrêÕþýûíííêÕ«§l´ªËè¶mÛ.\¨lØoß¾éëësY‚ Ê3$£„ ´AF™™Ù«W¯† rüøqasB2Jðœzµk×®ùó秤¤Ô¬YSÙhU—QηÚÑtŒ¡,$£„ ´DF-Z´}ûvmxd”à9õjÆ ÎÎÎPC}}}e£VFÝÝÝW­ZÅ!,Aå’QBZ"£«W¯vuu=xðàÌ™3…Í É(Á¥Ê(·sP@ÕÓÓ[ºt©‡‡‡°A”[HF h‰ŒÚØØœ>}z̘1èV…Í É(Árê•‹‹Ëºuë¾;EØiÓ¦mÛ¶CX‚ Ê-$£„ ´DFŒŒ Þ½{÷ùóçÊ•+ ˜’Q‚äÔ+ggç;vdeeqˆV@mҤɰaÃ8À!,Aå’QBÚ £lmWWWww÷cÇŽýúë¯f†d”à9õjîܹ~~~‰‰‰¢PF[µjÕ½{wÁoeñ}A2JÈ@d”-O´xñâªU«^½zUÀÌŒ| §^Mœ8ñþýûQQQ¢PF;wîܬY³3gÎpKD¹…d”6ÈèÚµkÝÝÝ¿}ûvìØ1;;»7oÞ •HCJJŠƒƒC‹-úõë—žžŽ\á{töÕ«W€4Ð&Ú¤ì¦ùóçÃüdÊèˆ#bcc?~Ì¡º (£8SªT©"ìБ ˆï’QBÚ ££Fzûömhh(ºpCCÃ9sæøŠ.É(mÒ°ŒöíÛ'``` ‡ê* Œ>üÓ§OÁÁÁ– """–/_îíí]§N¡óB²AÛ²`Á‚^½zÙØØ—ÿƒd”6È(zS+++|Æiãëë‹.\ÌÐmz‚äÔ+SSS###n÷»”ÑéÓ§_»v àVcÄÄÄ8::b0””eÄ(wÆŒj‰ùùóç}úôùòåË‘#G&Nœ¨xÀŒŒŒ®]»vëÖMð>4Cy;^ùh¾4ÂÃÃÍÍÍsrrÐÃN™2…[$]¯\¹ÒßßÿãÇ+V¬pssS%K$£„ —Q´æõêÕÛ³gÏœ9sDâÎÕÄÄdÛ¶m‚ä‡d”à9õªI“&ƒ òòòâ­€2ªÊ$š¡°°°]»v‘‘‘ºººhU²³³íìì\\\Tj‹!Dttôºuë–/_®TØààà=zTªT ùQ=' ’™™¹~ýzÆùòáǯY³¦AƒHZãýðáÃæÍ›===qà8é~úé'é­å­4Î;7räH7nXXXpˆaòäÉt‰ÄN|{{{UòC2ª½|úôiÓ¦Mµ£Ž*6..nçÎh+V¬È!iÁeôúõë ¸sçNïÞ½Ù7ãÇ ŠŠŠªP¡‚æóC2JðAIõ §Îz''§Õ«WsˆöÍ›7-Z´DF·oß¾hÑ"n Gi†§OŸvêÔ (©^%&&Ö¯__rg@Y˜o "£ÿý7E«‹ŽœCp €!.+öâí[BBìmæÇQhÉÝÝÝÛ¶m˶þO ºm{{û{÷îáÚ°aƒ­­-ÛŠCn×®Hų̈RÇncc©’ü«±V×ÓÓsÖ¬Y3 @:vìˆl£X¾~ýº~ýzgggEbXºt)ª¨ƒƒÃ¦M›OW-Ç[XXˆ¡DªuëÖ¡¡¡¥ŠTRRR“&MêÕ«çââÂÖó+"£Z^¬G.~5W‘­r€*ÀDÑÚ cåp]“¥{ûömvB©ˆ†dâ%ÂéŠñz\\Œg{Æ ‹ìöÏ?ÿ |òäIff¦‰‰ ~'˜{ÕªU9§†Ÿ%.ý¥«««Š7È„ §àׯ_W1ªäädssóׯ_×­[7 ç†dÓ­[·vî܉j—’’‚­}ûöŸ¤}ûöEb`×'ðaðàÁ.\ÐÑÑQ*‚Ëè’%K:„~QúËQ£F¡XªU«¦áüŒ|PR½ ïܹ³¿¿?ê<‡h”ÑîÝ»Ãç† Æ!8¯tèÐA$¾‹A>>HšÍgÏž‰Ä&Ú£G´á+Vüá‡ÐOeeeÁN>|ãý×*¢Û‚£ÀDããã+T¨ðêÕ+6Ë”nŠööÒ¥KJå sùòeI®4Öê¢ï \¼xñ–-[ð/jРAøùP%Uص^ù _(((@ouóæMSSSøÜ¹sñ}^^žâyà·ã½uëÖèÑ£¿~ý:dȈʜCÒ2ÕM;KCŽ´`Où[L:99™ÍAÚ¹sgE‚¸¹¹¡u‰O軫:’Qˆ¦Ï½{÷ð¿4ªNZéºuë†ñš0é/_¼x)©W¯^BB·tåbvv6r…l„……!~ì‰!¯……üÝ”‘¾zõjll,ê+,b'™ÕY¾ã*[¼¨÷-Z´xÿþ}³fÍ \Eº"Ʊà/¿üÂþ-,,„gGGGëëë¹£ÍTqŒöàpŠgCXÅqU«VmáÂ…Ðñ"›0žÁPxذaÿý·&³D2JðAIõ ‰d‘»â¨"£l" Ud§'ZÔ‡r Î7%uü*TÀ>00Prß Ÿûöí‹ïsssE¥]b6#\-¹âfÏ7†Ž¬^½VqñâÅ#F@M`{|§ÎáxÑ/À ‹èQνzõâ–´ÌßQ;KC2Øxþü9þ $O-b¼!«‚I£Î³w‚ƒ‚‚ÌÍÍ ‚ÆaëÖ­oß¾ÅnzÆ ¦% ɨ‹‹Ë›7o˜@Ìž=[$~CEzURRR‘×Ö`fÌÆ”}7?-ûÀ~`333ék«¬ ¢¡—<™.M5‚ƒƒ%>zâÄ ŒŠÏT")7õÊèéÓ§ÙSbÈ0·R÷Çâ`+W®\Ò\*8cQÉttt qÅÒ• zAŒ ¡¹Ü–"T61··÷´iÓŠoeÃr¾Á ’Q‚JªWMš4:tèÁƒ¹E«ŠŒ²³OźtéRø¨vÎú^RÇ_¿~ýÄÄDéùA>Œ&¨iÓ¦111¢Òd”ÝçýçŸÆŽ«Æ\ÉG•+£ì¹‚öíÛŸ={­½è¿ÇûôéáS$õÛ·o_»vmîܹæ?âv¼Àð»TªTéСCJÍä*Aæï¨å¥Áßmzö®$>¼zõªeË–Šôóócæ¿{÷N-‹#ò.£ ºŠãÇÒ÷èEÿbÈÉÉQjBEŽŽ^±b\­yóæÕªUCêkÖ¬‰ˆˆÀ&‡]»v‰ÄïEvíÚ©£êÏŸ?ßÊÊ 1ã7»té{U¤˜ø*ΤI“þüóO‘ømztHòwÎÌÌ444„©ËyÈzçÎLj½¼¼¦OŸ^jÐ…XXXDFFr˜*O]àäïׯ_Iïèa$‡†ãÛ·oáá᪼ܦ$£ȬWÏŸ?gϨŒ7Ž[´ÂÊ(»£¥Jþy¥¤ŽyòäI”ü7˜˜öíÛ¿ôb÷îÝ¢Òº|KKK4YŽŽŽ05æJ>ª<3ºvíÚ•+W¡ïÞ½Ûºukø+Ž ½‰§§'{P>………5kÖLOOÿùçŸ!pŠç™¡Ê•à­[·¢œ‘Å‹£´Ùk4Š#ówÔòÒàOF!ÐÖÖÖÕ«WÇÁ*õ¢³äZ!JLòf‹*hèÊh‹-ÜÝÝÙ,hé z#FŒ(5š4;w U*9nW+1&fO I&Š›:u*{aèôéÓ’›ãòUñ™ÑvíÚÁ€¡¡ÑRwfïoâÃþýûÙõæâÎ ´ã("ù{ÂGòÄ9€æµÈEe 8]ÙSÞi‘¹ORRúŒþÙ³¹81 `í¯ lÚ´iÙ²e8?åÌŠQ,Ʋh†Õ¨ɨ‚`x}üøqœ ãÇçözA¹¢x½ ïÙ³§ƒƒ· l ÁeƒdWWר¨(4¡œ#á 9W¡ž?Žlߺu+%%¥Q£Fh[V­Z%i åw½‰‰‰(·¬¬,e/ «ruSE>}úäìì|éÒ¥äää¦M›þúë¯øWñÛMè7!ë%½±Pê:ÞˆˆˆáÇ£Qp¢øRÓý®Kƒ?~lÙ²%䇛Pêèè ŸœŸ“.‚&dcÍ5j¼|ù²uëÖŸ?ƈ†Wêª Ë—/G»\ä{¥#ˆh’ $í $ûW¬X1//âV%-ÅaOÁ—šâ7† –æïÞ½{†††%í)y¬^½ÚÂÂ"33{*;ìÂ… ‘‘øòg‘YWÁÅ‹¡é999yyy™ø]æ8sPŒ×‹»&»MéÛ·o"­¹M® ]©‚ÏS£´q> ¶ çüe‰dTRRRP…è6½âðT¯´AFEâ{b8@´WüñÇÏ?ÿ¬blß éééh»™º„ äÔ©Sh®q² ‘ÿC2 KNN>räˆHü~zÕªUe¾Öœ@›¶oßîéé)݆öîÝ­*·‰¬äȨä:¨„‘#G²W|¤÷Ÿ7o›×£xn‹|Ã*u7ùÜ¿ŸÍ’€(þ.*œ˜M¿,“âiá ÔÐ%ÆÆÆ–tÅ%))éÀ8ÌOŸ>‰Ä¤¿¿¿€/0Õ©SgÒ¤ILÊKLj²Âh§ɨ‚¤¦¦¢'Æy7nÜ82ÑR)Û2*¿¹<~üøX[[cdŽ¿VÂ{öìY“&MjÕª¥z~‚ÐN4!£Ã† ƒ€³õ£úôé3|øðÅ‹Ù'##c„ oÞ¼AO&}O'!!-UÏ-i92šŸŸ,ùøø ‰æÍ›ÛÙÙ-\¸½)UdÿóçÏJrÏž=ˆ022ÊØ°aÃöíÛÿûï¿Êæ2 %ÕÕÕERäö–²==z”M ¼eË–âe^„œœ___6µS—.]‚‚‚™Ú‰Í^†q‚â Ðgfföë×ïÉ“'ø¥ÐÛñ‘+’Q‚ʼŒŠÄ-íßÿ½}ûvœ¡?ýô“¥¥e›6mJÓ¦M™¾jÆ 7n\°`ÁüùóII EˆˆˆX¾|¹···V^@Ï‹ÊÙ«W/6 <Á MÈ(ŒjÙ²el½u´>;vì`÷¾% ùûùçŸÃš5k&ý $òß­[·Û·oóIíáÁƒðÑÂÂBüÅs¾cž˜˜ˆéÓ§O&&&èœäL“$ Ô]ÅË—/•ÒA5ÂV:€ÖÏ™3GñP)))!¼zõêâÅ‹ð¨=W$£”•pëÖ­S§N¡M GûƾÔ×ׯV­Z'XfIƒm4bèðû«¤]»vE—$y¦KqÐFa´XÒ{üãèè””9óðð˜1cÆ÷›n©%ùüùsô_¾|‘^OK¸ý¾¨Ïæææ999>>>Ìsð.£htªV­zåÊTŽÜÜ\4:=êÒ¥‹ô>ì­®’b,€Q~ UmxÉÆÆFz~"m#ÌjժݿöìÙÁÁÁÆÆÆh{ÑŽI¶ÊŒS3 ¬P\Rº±±±«W¯F SXXhdd4räH777ÉÓÃ_¿~ÅgΜùðᬮmÛ¶>d›J-ÉÈÈÈvíÚ‰ÄÏŒ*5Ë’üßWÒÓÓa¢‰‰‰2׌\ºtéž={6mÚ¤lÌå’Qí'ê£GJ]7U&l}nI (£l:­°°06ªæ…qãÆaX,sjUnŒ|@2ú½™@“"YC¼¸Œêèèdeeéé饤¤Ô¯_?>>ž½+ÔêóÚ™î… †Žò©S§NRR[ƒÚÖÖöèÑ£"ñMöž={¾~ýå ·KKKÃ’Ò.õˆœ7lØ s¹AùÈÿ}ÄÉÉiãÆfffÙ«ÎÉÉQvåúrÉ(!eôðáÃÓ¦M‹ŽŽVeþ³üüü™3g"ª±cÇzyyéë뫘+’Q‚HF¿/JºÚÇLÈÓÝ»wáO­[·‰ç—Qkþ ¥*Wdù ÝDû eßüúë¯~~~Õ«WgO ³™¶Q¯^½Ê.m¢2wìØQ:9%Ù½{÷;wΛ7¯Ô|GÅ߈Ç᧦¦Jžxf@vwïÞ\ѕђ %d  Œ¢%B{”œœ¬ú]¹íÛ·/[¶ÌØØØßß¿Hs¦,$£ð*£gÏžå0ó.“QOOOnOø”mäË({Ò›ØŒÎØYúÍQm»].v ²8Š_U•“îÇ> Y‡€~þü911Q²[;æÐ¡CrÞ»—sÍš51¸råÊÀ̧‚1+º-6“ThhhçÎ9ÄPž!%d  ŒnذÁÙÙ9;;[-³œ;cñ½{÷ª2éÉ(Á¼Êè… 8¼ÆÇd”ÛUÕ2|ÅïÈ–Á+ò¯ü°BåY¨t}}}§N*s‰ü­P¡B~~þÍ›7åÌÐ'çˆØ¢Ü–––j̳‚ çÈ¿HÜ›sˆ¡ ý¾PEFÙ¤u¢ÿîáæçç³×›„ʳ|TŸ ¤tÙ«<¬‚………5êíÛ·’ÝÆŒãïï/ýÌè‹/Ø ò䔤¥¥%´ÏÑÑqãÆŠl©yV覵µuõêÕSSS¥߆4׬Y3==ýçŸ>{ö,‡˜Ë$£„ ”Ñyóæ9r$%%Eí1GGGÏœ9íÅàÁƒ÷ïß¯Ô Rh¡%‡-Zôë×ÍʱcÇð=ÚS4=QQQ´‰6)»‰-&¤v½wï^ïÞ½IFÕˆü÷¸‘Q„544„¦T©R¥iÓ¦±±±êr—„¶Ý¦‡®¡ÖÕÕ566Fa6jÔˆ-¯ÅvCyöìÙ%™311AqI¿MÏS’pP'''|ýúµR—ŸÕ2óÀï¿ÿ~àÀqãÆIÏÅ077øð!½M/’QBʨ½½ý¹sçâââøˆGäííÖêÛ·o0K_“"¥Mß‘Œ2 U#ò¯*"£ 00pÑ¢Eð==½¶mÛ>zôˆ÷|kŸŒ¢‚M›6 …£¯¯occ3|øpö²‘d·çÏŸ¯ZµêÖ­[ÉÉÉV_ö³¤’LLLDíÍÊÊ‚B Ï­êW‚?~üزeKhqñß]$¾Ò¬Y32Zñ\•+HF (£'Ndó!ó—´ríÚµ»wïFÓàîî>sæÌRï—Ñmz‚xªW$£D¹eݺu...†††ááápY¥;jÔ(HóèÑ£ÙÒ‰EÀ 5aºM/’QBʨ­­mXXßÓ2ƒ¨¨(GGG4mÚ´qvvþõ×_Ù‹2!%ø€d” ÔKAAµµu@@N+W®T­ZU‰º¹¹¹»»7kÖ,88¸ˆïÝ»[¿|ù¢¯¯ïÞ=ÉDHF +£OŸ>Å V3ÉÁÖ¯_6 ð’%K¦M›&³ñ"%ø€W•y»°THF‰ï´´4++«ƒΜ9“ïäºuëÖ°aÃÀÀÀ"/у5kÖÀG‘WWW¥V(-oŒ2PFmll^¼x¡1e<~üØÃÃãÔ©SuëÖupp˜1cF‘ HF > %>HOO÷óó›>}ºf’CßajjªÊªÉ(!etذaè5,£ŒW¯^mÚ´éØ±cùùùÈ”tРAl†’Q‚HF ‚ D$£„LʧŒ2RRRŽ=êééùôéÓ¦M›N›6mܸqì^É(¡^x’ÑÛ·o[ZZ’Œ"""–/_îííÍÖ«$ž€6,X° W¯^666J$%dPžeTƒ¼¼¼Ž?žžž^µjÕºuëž?¾S§NBç‹(;ð$£/^ÄyD2ªUdddtíÚµ[·nhR” ‹²¯¯o```ñIŽ111ŽŽŽIIIÐM錞?Þ§OŸ/_¾9rdâĉ &*™ Jô_E•ôaaa¥c¸nbb‚q;ÛzçÎ ~üñÇ[·nIOù~ýúõˆŠÍuUÒX<¡Jžû÷ïãÆ¿ÿþ[YÁbÈ)IÕQ¥^•Šüz%ôÝæææ999>>>J-ÁM2JÈ@X‹‹ Õ|Ò2‰¢kŸ;wnrrrAAA‹-FvªwïÞ•+W:wÄ÷ Éhù!88¸G•*UÊÎÎV6¬ü¹B Ûµk©«« ÓBüvvv...l+4ÂÔÔ4::zݺuË—/W>¾B… ¯^½‚š ë½|ù²dÝóâ2ª££c``••¥§§—’’‚³eá䯙^êŠêÐe8ñàÁƒ/]º¤ÆÒ€ã._¾üíÛ·]ºtR 0 råÊOŸ>eoGÅÆÆ¢õKHHÀ—¨KqqqlíxaeTÅ<ã_üîhðƒ‘‘‘tÌòAþ_¯T¡Ôz¥NNN7nD©BЋlB!çääT©RIH¾$%d  Œ:4--Md400°OŸ>ì³"Ò——‡s'^ˆ|Æ7øM:¤Ö­[CL[µjÕ¢E Ø*š3 ¦ù?(((À_znAx’Ñ“'OŽ;–›Œ¾|ù²mÛ¶$£E`M"ºÏ+W®XXXÌš5‹½sûömépjchŠÓÃÑÇKOº^Òu&CÖ»wï¢éCC!¿m#ý®¤ü°Å‘ì†l -Ú¹sç¼yóT/™ Y[[ãQ,øÀ¾œ1c†··7š;4¡Ðw5Þ¦W}yUò ùÛ²e‹££#«x®äÿ‚ü¡ÊõË’PK9³Œ!ªÔÔÔ5jHoBIîÞ½u’®Œ¥  ŒjÏŒž(Ȩ««+þrÈUvvvDDÄ+1èàÙ4U’ôõõ1Ô6Ó¸qãFÕüÿ©]»6þJ¿ã©ý¸»»oÞ¼Y$~fhÕªUBgGÛá©¶;vÌÖÖ–›Œ²ÅHF‹ÀšD'''|`o´àFG+½Ã©S§Fމûö탧Ž?žý+*M(Ï;‡±‰ïعwïÞ’}ä ‡œ­h@ÐæÀº¨†R(ÆŽ;.\èàà°k×.É—iÇÅÅÁí¦M›&Rë3£ìŠ]q”ºbÇ9Ïïß¿‡qâG•¾” È/È|ȨZbNNNfWCCC;wî\êþ$£„ Ê›ŒâHѾD‹y÷îݧOŸ²²²|}}ÙVÈèׯ_Ѭ«ž«?FEE¡QChûðo¼˜>äääÈ ‚1¥žžû+?†_½zu¶IÛT5))IòT¸qãF¿~ýÌö댢2sX†dT&¬I\³f {›øÖ­[hpJ²»"ÔJ¾ŒJÊŒ‡³Œ"‡–––\[.PÀîÝ»Àºþý÷ßÜÜ\”‰§§g³fÍòóó%‰jÉ LjÉó¸qãNœ8Qä9HE~AþÐZEy¢·Â^'%dPdò‡%H̃ Rì{]]]4U¾·oß²oÔ(£rH“’’’ZŒoß¾‰Ä?¶²333K’Wd¿zõJòïÖ­[-Z$`~´žjû‘#G&OžÓ´iSeÃ’ŒÊ¤ˆŒúøøLŸ>½qãÆRJïÀ·Œ¿…*GД¡eûçŸÆŽËñÈK×£G/^tèÐáÉ“'µk׉1$tåÊ4YçÏŸ6l¾}ZvIªá³Œ5…Šš;;;ñ¨j"£ô”°?Û;wʸtedïÈ_tÓÖÖVWW7//Oüt¨àl>üüùó¢õ(£‚”Ñääd__ßýû÷Ãoº¶£F:t(TñšššŒé«;€ Ž9B7{ÐÒÐóÚ R`UF3334hPÝ}QF¡«Dè»¶hÑ‚jýí·ß>xðÀÌÌL<£‚H›,‹ÊÀ¾ÆÆÆPqÕ©S:©©©ôXo)Ò?Æ… š››ƒ`Uerru£MïÞ½aaìØ±gΜ‰ŽŽÉ€êÔÍÍ­ÿþtáP322ŒŒŒÅ*Þ’’;Ú³ÙF!1LJ” ¦×Ô\F/_¾loo_ŸøSÈ_D–1ïò™¦†2êáá±{÷n8ÕâóOÑôèÑãþýû8šù2Ê(T ÐïWló¾víZøYBûñË/¿Lœ8±ªÛ=U2а«2š››«¯¯_Ý}QF¡«D8Ÿ`Ю[[[C•">s§‘~=OF•…š={6x†ššZÛ¶m£¢¢D›¤HCVVVóæÍ?|øBZ ßg—Ê”0úÅE m s·oßVWW9räöíÛá,y{{ÿñÇÙÙÙП#ƒ¯ü¡ÆŒ… >ˆæQTÌ„zŽžžßí yfÔÕÕÕßß¿ZÊ(ãub9ŽLS}ýúuË–-áÇÂxRRRàôJ„„2Š0 ˜yF“’’–/_hnn¾páBh_¡7&ÇqPF6`©\Ñ×ÃPFˆÄ3£µfˆÙØØ8..®~ýú\‡#Ö¯_¿xñâ_~ùeß¾} 9 üT‡ ò‚~òäI…“í#KgÔ¨QçΧ€8P½Lœ8oÓ#_F2 ý×uëÖAE Ý/¨8¦NZ“™çQF6`©\mذaÑ¢E………r\sBe¤öÊhyy¹­­mHH¶«W¯jkksQ­çÝ»w&&&©©©†††5Ÿ„á uêÔM„†oÁ‚5W[åY ±±±;w622ºyó¦Ä zBý‚ÀG¡4®X±Bâý´(£ÊèðáÃSRRâââä>B@@€««ë·ß~»oß¾¡C‡*$*”Q„ X*WPѯZµ eQXXxâÄ ¨¹>gÏžíÒ¥Ku'9FEàPF'L˜Í¡|2 /[¶lݺuýúõ;uê”BEØ€¥rE¿‘eAÚÊ(·2öòåËêîXVV6iÒ¤ÀÀ@ww÷;vTw‚_é Œ"lÀžŒúúúVwð, Ê(‚ Êea€Cõðð¸|ùrue´´´ÚÎÓ§Ooܸqþüù ea–Ê•§§ç‰'²³³åØWÀ2ºråÊ5kÖ4jÔhàÀëÖ­366æ:"Aþ Ê(‡2*G;Z^^îààpöìYooï™3g²Ê(Â,•«_~ùåúõërÜ^ ‚–Q__ßÍ›7Ó3„·oß>..NóÀ#RPF 5‚6iáÂ…ÎÎÎM›6U¤Ä"æÎ»wïÞüü|Ùwݵk×–-[f̘ÁRT(£°T®&L˜/Ǿ–QèµþôÓO„šs£mÛ¶\‡ƒ È¿ Œ" Nš4©¬¬¬ò¦¡C‡^¼x‘½¬W¯^½|ùòÒÒRñ—/KÁ××wêÔ©àÍëׯg/*”Q„ X*W#GŽ|þü¹|£iUà {øFEE…ªª*¡^0Ó»wo®ÃAä_PFfbbbüýýƒƒƒé1‹Ö³-£;vì˜>}zVV–,ó¢…„„ØÚÚBHþù'«wÜ@ŠŠŠêÕ«Ç^ÈWÈ»wï´µµ.£vvvùùù [rìKË(üÆ5-¡ëŠÐÐÐ~ýúq ‚ ÿ‚2Š0óðáÃýû÷ƒŒ¦§§ƒ‡‰Ö³-£ô‹Â+Ï—+Avv6´š ˆl¿Vea–dŠ«ºº:tÕäØ÷kQècÏš5kÆ 5y1‚ Šeaàøñã“&M*//¯¼‰m½råŠøe÷îÝ¥$ƒr;räÈëׯGFFŠ¿RŒ%ð6=Â,•«nݺ5jÔH¾ßé× £ÐÇ^°`ALL áh˜&‚  Œ" И–,YâääÔ¤Ie¾Î8<<ü‡~¸víš­­­”d‡rvvöõõõððPBT(£°T®à÷Û¶mÛ'Nȱï× £ÇŽûí·ßrss[¶l)ß0/A Ê(‡S;AÛíh`` ƒƒCUi²³³!M§NÀY•Ê(Â,•+SSS8ò‘#GäØ÷kQ##£7oÞìØ±cêÔ©\Ç‚ È¿ Œ" p(£YYY 6ܾ}û´iÓªJãæævôèQh5-,,”Ê(Â,•+ccã‘#Gúúúʱï× £tývûömúü#Â9(£Ê( ££&ºqãFÆ­>ìÒ¥‹——ײeË”Ê(Â,•+ooo9öýzdN{Ÿ>}¸ŽAAEàVFÛµkסC‡ªžx2dÈÓ§O455•ʨ’š7oý<Ÿ€ë(–Ê•ªªêÒ¥K¡Ã&Ǿ‚—Ѳ²2uuuX¸sçN¯^½¸AAEàVFíìì²³³#""*o µ¶¶>pà€³³³2CBU111sæÌŸ–HÀuå*??___ßÛÛ{Ö¬Yrì.x ˜0a,<{öLiÏù "”Q„neÔÓÓóìÙ³•7YYY½}û6..Ž~‡ŠÒ@UwîÜéÛ·oEE”@mmmúm ®£Ø(W)))-Z´»Ã&`õõõýã?ž?N¨Ù¯îß¿ÏuD‚ü”Q„netÓ¦M ,(**ªS§ŽøzzÖ'N^T(T¥¿èíÛ··iÓfùòåQQQõêÕsuu]µj•ŠŠŠòã)))166655ݹsç’%Kþúë/‚2ZMbbb:uêtîܹ‘#Gʱ»€etåÊ•kÖ¬iذá Aƒ6lØÐ¨Q#®#Bä¿ Œ" p+£'OžtppxòäIÛ¶mÅ×ÿôÓOqqq Ê÷$a˨MhhhEE…hýÆçÏŸ/ûq¤¼y²ºcD|xÒ¤Iò¡¶Èè±cÇ~ûí·ÜÜÜ–-[Vë ‚ð”Q„>ÈèÛ·o5jÔ·o߸¸¸¬¬,N^•.ea…—«[·nõë×/$$¤ÿþò¡¶È¨‘‘Ñ›7ovìØ1uêT®cA¤¦ Œ" ðAF®]»&&&ÚÙÙr Ê( /WÇŽ›8qâ³gÏ,,,ä;Bm‘QºŽº}û6}©Õ Œ" ðDFgÏžíãããëëëááÁm$(£(¼\­_¿~éÒ¥EEEšššò¡vÉ(œ:¹ßª€ @Eà‰Œ®ZµjÅŠ{öìqwwç6”Q„ ^®œœœàhÏŸ?—ûµBFËÊÊÔÕÕaáÎ;½zõâ:Aj Ê(ÂOdtܸqçÎ=zô±cǸea…—«nݺ5jÔH4W«Ð2zíÚ5[[[EE¥p&L˜ 5y Aþ€2Š0À511©_¿þ‹/Þ¼y£¥¥Åa$(£(¶\Á¶nݺS§Nݸq£Ü¡e”··¿}}}ÿøãúÒ/˜7‡¯FD Œ" ðAF3335j´bÅ //¯€€€ñãÇs Ê(Š-W mÚ´9~üø¸qãä>ÏetåÊ•kÖ¬iذá Aƒ6lØU×!¢PFø £ôëéÃÃÃçÌ™£­­Ìa0(£(¶\9rdòäÉIIIæææräúõë¶¶¶¼•QA Ê(ÂdtÍš5^^^nnnÉÉɦ¦¦\Ò››;}út kkëÂÂBˆ Ö;::êêꆄ„€à&ÜTÝM3fÌ000P”ŒN›6íäÉ“™™™59È¥K—ìííQFQ&(£|ÑQ£F=þ<&&špccã©S§®_¿ž«`PFqÿeÔÒÒ²uëÖ§NªÉAPFQ>(£|ÑæÍ›ÛØØøûûÃòÌ™3:”šš M8'Áàmz„ X®ÒÓÓ›6mºwï^77·š‡–чvìØ±æQ!‚ÈÊ(Âç2úöíÛ ˆÞõ÷÷ß›››{{{OŸ>“xPF6P`¹òóóswwOIIiÖ¬YMŽCËh\\\‡j‚ ˆ, Œò—ŒŒŒM›6­_¿^Ž—©¤¥¥mݺuíÚµrd͹ŒÞ¸qcàÀaaa½{÷¦×888„‡‡'%%Ñ“]+”Q„ X®lmm ïÞ½[Ãã\¼xqذa(£‚(áËhBBøÜÍ›7_½z¥ªªjbb²|ùò‰'²‘W E¿~ýj~¨ÔÔT++«/^8::VwÊwh“:uêÞfccT§NêæÎ¹ŒîÞ½ÛÃÃt\4uKttt×®]wîÜÉÉ«AQF6PT¹‚Ê­Y³fÛ¶móôô¬á¡èùäQFQ&J’Ñ’’P"ðB ‹´´40Âׯ_UNùèÑ£?þøãðáÙ™™†††5Ì766¶OŸ> gâ+W¬X±råʹ2¦¦¦/_¾ÿ»qãF •““Ó£GgÏžÁ ©Ü*\¼xqÞ¼yñññ¤ eôññ™={6, 2«¨¨T+ÎetîܹûöíËËË_9jÔ¨ððp8-:::JŽeaE•«%K–€‰þý÷ßß~ûm …2Š ˆòQ’Œ&%%µjÕª¸¸XCCãÎ; (**¢GÄš5k8 z«rVVVÍeÔÞÞþÒ¥K„z±¤³³³ººú«W¯@…­¬¬jxäÊÐG!2jggwåʈöæÍ›o^މ‰™3gªhMUß ØêæÍ›aaÙ²e«V­ªVœËèˆ# e}øð¡øÊ'OžXZZzyyAÓ«äxPF6PH¹ÊÎΆNþäÉ“·nÝZóh…ßZÛ¶mk~4AYP’Œ‚Ÿ999¥§§ª²7¢¯ê‰sýúu:ÁÏ?ÿL$£yyyæææÏž=“p_…£(=tèx3,¬[·nÑ¢Eâ›Àãûöí[QQyikk¿ÿžT­Œeee={öŒŠŠRSS‹ŽŽ®ÖuÎeô»ï¾kß¾ý‰'$Ö»¸¸œ9s OãÆ•Ê( )WžžžÐOLL„nvÍC¢eôåË—5… ";J’Q???úáúõë×ߺuëêÕ«UÆD™BdTŠ CTFlllff&¤466Õÿkݺµxʤ¤$ŸàààÔÔÔòòrˆ ÄNôB éŽ[ÝÓ[ZZjaañ÷ß·hÑ”KbøQII ijjºsçÎ%K–üõ×_Ò³ ßìG¨Üàp²‡Á­Œ‚mëèèÌš5 t\btWÚ´icooüøqe†„2аAÍËTDC† Ú ºw?ªeAå£$]ºtirr2-S¦L!Ô•*cª±Œ‚„Ñ t]ßµkW°IÑVz2gP=ÆûPuëÖŒŒùè©S§œœœ>|ø ‘LtÞ+£çÎq$ÔCŸ3gάœàÁƒ;wVQQ0`Àeøá‡ÂÃÃ!=hãCº•‰ŽŽîÒ¥‹¹¹9Xxµ‚WàâÍ›7ß¿¿‹‹Kå­ôã°Ð‹4hÒBBEØ †åêÙ³g½zõjÚ´)ôóå§Èˆ¿¿¿««+Ê(‚ Ê„u•ÃÕj.£²dš’’²dÉp5333W¯^­^½úéÓ§°iúôéÛ¶mƒø³S§N?~ÔÔÔœ1c† 911ñòåËô£¨D6ñ•É“'9r„P£é¡‘’RFݺu+-µ~~~ÐÆ|1€ÌÌ̾}û&$$¬]»vñâÅÕ ^Q„††Z[[ß¾}›>¥”••uëÖ­   ..N[[[9!¡Œ"lP“rõäÉ“–––Bo*1E…´k×.OOO”QA”‰’®ŒZXXxyyM˜0PoÖÕ1bD•1)EF+søða'''X,€LƒR3¦y÷ïöíÛ333áϾ}ûž>}ºAƒr~†³iÓ¦ I¹ó¸lÙ²5kÖüùçŸRz5 eTFòòòá·ààà@ìʨ|Ïn*GF髞ݻwˆˆ ×Ðw~ÅÓƒ¤^¿~ÈöÌ(}QÜ(&&Fî€!žÈÈHMMMh™¤ –Œ2z÷î]úõî^^^Ë—/—Ø*’Qø¤ .䉌Âù‡3)ËÕèS§N9888;;ûûû³ʨ,ìÛ·ÏÝÝ]ô'Êèɨhººº®®.ôÛëÔ© p-(š7oÎv‹fÆ ‹-BExôÊè±ÂZZZÕŒÔ ”qetÛ¶m tC¾zõjÐ#zxP•1)EF›6mšžž%{Ë–-PÑ:t(00Þ$J/šh‰Momm­ªªúôéÓààà   ‰Ò¯……U«VõíÛ·¨¨RÒïä”Y³fA<„zèfå/^¤–.] ¢Hìíí+§‡N;hHHHeפoÓïܹ³  €ðæ6=HŒ¥¥eåï³½bÅŠßÿ"g/$”QYƒ"„·ée‡‡å eá!ô|°Ð¬Y3ºE†2d4.''çðáÄŸ®­­-}X·rdTtTÄ?þHñOÿÛo¿mß¾½ò‘+Ÿ·µkׂ ~1™tîÝ»G¿ÿÓÑÑñرc•H¹Ø\9/XÓªU«¤¤$ccãÔÔÔªÞPÿîݻݻwÃÇÌÈÈ TyæÌ0Õ«WoòäÉ´”øŒp® ·söìÙádz¥ŸäååA/J騱cÑf¾Ë-£ôkÞ¸ŽAþ ʨàQ†ŒÚÛÛwéÒÅËË‹P÷…‡ 6gΜªC%H_–ËÌ̬¹I‘Ѳ²2Éßß2233sss›5k–ššZåôAAA{ö쉌ŒiÓÔÔ„Äýû÷¯üh8“;vì€&$$”””}÷Ýw×®]«nÌ £ ¤p=zTyZþjÉèÑ£G'Mš ›7o–rÎi>~üxèÐ!zj§Ž;†‡‡s2µSii©††ôd}QQ‘µµõÇᛲµµe#*J"xX®–/_¾zõj_Œ •A<ÊQ0ª Ðï[‡’´eËúÞ7#¢go+ DDD€‚”Ãÿ·oß–ûŽyVV–¥¥eFF†¹¹9x­Œ/h5·²²Š¯–*»aÆ õS§N•}¯ÜÜ\(-‰‰‰—.]‚£â¡4 €‡åjÑ¢EÞÞÞÐ5å:ù(£‚‡u©ÒÖÖ¾zõ*(BII (QTTTÇŽ+§=zôõë× è¾ù曺uëN˜0Á××—Õyˆè‚iÓ¦1>$ðEàT<844T]]þ§ý^Fèyò¹z(=÷‘#G&NœX­Áb­­­SRR®]»F?ê @x( ˆàa¹š?þÞ½{¡wÇu ò?PF’&½Gª¼ƒƒÃéÓ§ u¡bݺuÕÚýãÇcÆŒ ¡÷óóc|ûtè‡8)ÐWéÚµë… † VÝ}322¬¬¬ÒÓÓOœ8¡ØYy( ˆàa¹òôô @ExʨàAå)%%%ŽŽŽçÏŸ‡†̲Zû–••M˜0áÌ™3»vírss“#we4$$ÄÆÆ¦ªÓ‘ÌÌL{{û‡îÞ½ÛÕÕUQQñPÀÃr2zñâEhû¹AþʨàAå/QQQRÞ›*…òòrúýòeÍ¡ŒÒÓiÅÆÆZZZÊw„±cÇ^¹r…qjUùà¡4 €‡åÊÙÙ944Û{„W Œ ”Q„eôÀ...)))tÕ#eeeîîîp¨1cÆøùùéééÕ0*J"xX®&L˜™˜˜Èu ò?PFÊ(‡2ºeË–Y³fåääÔðP>>> ,055=sæL ß ÈCi@ËÕ¸qãžwî\®ca Z2*΄ Ž=Ê^`Û Œ ”Q„ne4//?Í3 HCEEżyóΜ9sáÂ…üü|0QðQkkk›®]»ªªªr#Rûà›Œfdd4nÜØ×××ÃÃëX ë%ø¹ùøøˆ¯oF!‘àãÇQQQ›6mÊÎΆ•§NÂ룵”QÁƒ2Š0€2*¸4”––FDDüõ×_7nÜ€øS__¿W¯^]?allÌu¼Hí€o2šœœlaaqìØ1GGG®ca€®— ûWÕÛJ+' ? ^­å Œ ”Q„”Q ª’†ÂÂBX b[\\ +AF»uëVÚ¾}û6mÚ˜™™ihhp4Â{$ÊUEEÅÉ“'ÇÇU=++ËÐн\ª HCQQQ½zõ¸ïÞ½ÓÖÖæ‰Œ†„„ØØØÜ¼yÓÊÊŠëXä3PFÊ(ÂÌÇ÷ïß2šžž&Z϶Œ;vlâĉ‰‰‰-[¶d/—ê‚2а¯dôøñãŽŽŽ ­Zµâ:ù ”QÁƒ2Š0ÍÒ¤I“ÊËË+ob[F¯\¹bggѽ{wör©.¼ºŠ^•+ŸÙ³gçååéééq ‚|ʨàAE 0-Y²ÄÉÉ©I“&ÚÚÚJË:<<ü‡~¸víš­­­Ò2ý"¼’D0ðª\ÍŸ?ÇŽâ·A„' Œ ”Q„§v¢GQ:88(?÷ªà•4 ‚WåÊÙÙ"INNæ:‘eTð Œ" p(£YYY 6ܾ}û´iÓ”Ÿ{UðJÁÀ«rekkûþýû;wîp‚H‚2*xPF8”Q@GGLtãÆœäί¤ ¼*WíÚµûþûï?Îu " ʨàAEàVF¡QìСÉ'8É^IƒàIOO_¿~ýåË—aAOONþ‚ zôèÁu\ЇWåJ[[{ÆŒpæ¹A$A<(£Üʨ]vvvDD'¹3Â+i6‘‘‘¶¶¶¹¹¹â+UUU>ìèèÈUT,ÁŸr•‘‘ѸqãÝ»wÿúë¯\Ç‚ ’ Œ ”Q„neÔÓÓóìÙ³Ð:r’;#ü‘aSTTÔ®];hlÀ>,XЯ_¿{÷î­]»¶¤¤¤N:Ïž=kÒ¤ ×1*þ”+z‹Ë—/2„ëXD”QÁƒ2Š0À­ŒnÚ´ D¼üƒ“*ÃiP,ô½}ûö6mÚ,_¾<**ª^½z®®®«V­RQQQ~<{öì™2e ,@0^^^ôÊ-[¶Ìš5 ` ¬W~TìÁŸr8~üø'Ož´mÛ–ëXD”QÁƒ2Š0À­ŒžtèWHÀiP,ôݯ_¿ÐÐPzÍ€þúë/ÂÑ·¯¦¦ÞÙ£G–-[=z›9sæºuëlmmá䃪~øðAùQ±Êtÿ\]]½½½¹A@<(£œËèˆ# öyøð!WHÀiP,¢gFoܸA¯‘OFǫ̃¡¡avv6½ljjzðàA+++XnݺubbbÓ¦MSSSe?ÿáI¹JKK311Ù»w¯››·‘ #(£‚ea€s]±bÅÆóóó544¸ŠAžHƒÂQ”Œ*ê6}¯^½îÝ» “'OÞ±cGݺuaùíÛ·5ª¨¨°³³Ø}dž”+øö=ŠÞ½{s ‚0‚2*xPF8—Ñ+W®€yDDDtïÞ«Äá‰4(¾ÉèªU«  ÞÞÞôtN„šæiõêÕ° ¼)ÙyR® ã·dÉ’ÜÜ\]]]n#AFPFÊ(Âç2úîÝ;CCCŸ3fpƒ8<‘…£(U¯_¿nÕªUaa¡¦¦æâÅ‹{õê ªT^^Г'Ottt”{ð¤\3&>>þÑ£G܆ U2*xPF8—Q M›6:u:~ü8‡1ˆà‰4(¾É(ßø¤I“À>ÅWwë֓؃'åÊÔÔÔÚÚÚßߟÛ0¤*PFÊ(ÂdÔÍÍíêÕ«<°ÂiP8<”QB½šrÆ aaaÆÆÆvvv‹/Ø‹@iøP®2335j´sçNOOOÃ@) Œ ”Q„>Èè‰'ÆÇ“÷0ñAáÁ‡ruþüù‘#GFGGwêÔ‰Ã0D (£‚ea€2J¡Þ²eËôéÓ9 ƒ†Ò€>”«3f;v,33SEE…Ã0D (£‚ea€2 tíÚÕØØøÂ… ܆Aø! ˆðàC¹jß¾}»víNž<Éa "”QÁƒ2Š0À]¹råï¿ÿž••¥­­Ím$|Dxp^®^¿~ ý=áÍ™… ”QÁƒ2Š0À}ôè‘¥¥å™3gFÅm$œK"H8/Wtqqyþü¹©©)W1 ÈA<(£<‘QB½²k׮ǎã6 Î¥$œ—+;;»ìì숈®@Y@<(£ü‘ÑÅ‹ïܹóÍ›7ZZZ†Á¹4 ‚„Ûrõöí[ccã7Š^v… üeTð Œ" ðGFÚ´i0~üxÃ@EØ€Ûrµwï^hæ9‡+"$PFÊ(ÂdèÓ§¶¶vpp0‡1 Œ"lÀm¹êܹsÆ ¯^½ÊIî";(£‚ea€W2êïïïææ–œœÌá †ÜÜÜéÓ§[XXX[[ÀzGGG]]ݤ¤$Ü„›ª»iÆŒœÈèÍ›7û÷ï&:hÐ åçŽ ÕeTð Œ" ðJF¡ 766ž:uêúõ빊e7 LFGŒ=~ü˜þ±#ŸA<(£¼’Q`æÌ™‡JMM…&œ“ð6=Â\•«;wî@Ö{öìqssSrÖ"(£‚ea€o2 5‘¹¹¹··7W¯EEØ€“r¿ëž={æææ>~üX]]]™Y#ˆ| Œ ”Qþ’‘‘±iÓ¦õë×kjjVwß´´´­[·®]»VCCCެù&£€ƒƒCxxxRR'Í'Ê(œ”+???77·óçÏ>\™ù"ˆÜ Œ áËhBBøÜÍ›7_½z¥ªªjbb²|ùò‰'²‘W E¿~ýj~¨ÔÔT++«/^8::VwÊ÷ÂÂÂN:·ÙØØÕ©S§º¹óPF£££»víºsçNåçŽ2аòËÔ‡ð;êÛ·ï¥K—”–)‚Ô”QÁ£ -))‚JÐÂÂ"-- tðõë×FFFâirss×­[wêÔ)HРAƒaÆ­\¹²qãÆ5Ì:66¶OŸ> gâ+W¬X¯á‘+cjj ?ð¿7nÔðP999=zôxö왡¡aHHH‡Ä·¦§§ƒ^_¾|ôôô =[°`¤Oããã3{ölX2dÈÅ‹UTTªe5jTxx8œ%g2а’ËÕ‡z÷î Ýò˜˜‰Aø ʨàQ†Œ&%%µjÕª¸¸XCCãÎ; (** •£••¬|ø ‘LtÞ+£çÎq$ÔCŸ3gΔØ:tèÐË—/«¨¨¼yóœ˜Pò:oÞ¼­[·ÒŸ«r«öÃ?„‡‡Ã. q2>%Ý¥Ksss°ðj¯èÇa•üæ”Q„ ”P®.^¼øë¯¿æççòáÇœœ`aðàÁW®\…ŸþùàÁƒ„º`9räHY2­á3£Ð`€ƒt‚ŒVÞª¥¥f ØíÛ·ÁY=== Û¶m[^^Ьªª ¢&± ˆ>è>,@â;wJÉÎ3œpPøÙƒ‚ß»wOŽùM•Ãýû÷{õêåææ¶k×.åäˆ2а媴´ô¯¿þòõõ ­_¿þºuë\\\ª[…"¯@<ÊQ]]Ý   þýûC^à7wîÜéÖ­›h«šš¸5ñ½`%l‚…üüüºuëÊ—µtALIIÙ²e l‚…÷ïߋ֋ÒCHiiifffÉÉÉ5ÌKFôôô À´à,UÞJŸ«=z´lÙòèÑ£ãÌ™3¡±±µµ…ö Tµòãpöôõõad”š1ÓwïÞAÓµ}ûöÌÌLø³oß¾§OŸnРܟB ,[¶lÍš5þù§xdž=PFe$///00J¦ƒƒ]ð)(ª\UTTÄÇÇGDD\¿~:ÒГoß¾ýŒ3&NœÕ‚""E.A<¬Ëhaa!¨$T”­[·~óæ‘‘èø oZ°2225j$¾cYYý®–d4,,lðàÁâ*B”^CC£´´ÔÊÊêæÍ›5ÉKvè³QUކ††ÙÙÙô²©©éÁƒé9ªàÜ&&&2^OÆ!C†\¾|YbkQQÑêÕ«wìØAOÅÚ¥K—¹sçŽ3FUUUî àsACþìÙ³ØØXñâÄ(£²““Óµk×çÏŸÃ2tᢣ£ÑG¥SÝr¿S¨²²²² .…:Z夤¤„„„ÿüç?Ð €­Zµ‚n'ôÐ$¦„CZ ʨàa]F¡®lÙ²%-”Ð8uëÖ­¤¤DÜuèÛôÉÉÉÐz‰ïHߦg¼õ,;RZͨ¨(H0kÖ,[[[¿þú‹ž _”žŽM™WFé;tèWy+40÷îÝ#Ô£¥`´£¿}û<¾¢¢ÂÎήò[UÞ½{W¿~}X?~|@@€ÄÖ~ýúÑ“€ªÎ›7¯ÿþrG®|^¼xѱcÇï¿ÿN¸|o=•”QYÍö@Ó¶m[%ôj5ôßPªgøñãGñ­Ð/…š*LÐ>K쮢¢bbb 5F=zöì MµÒ‚G¥2*xX”QÜìÒ¥ HêíÛ·éö^Ä£G,--åÀ$£ ÒW=»wïA¯¡ïüЧI½~ý:‘í™Qú¢&¸QLLŒÜC<‘‘‘šššÐU¬U«V­X±¼½½ééœ5ÍÓêÕ« 5GÁ¯¿þ*±ËÝ»w{÷îM˜&~"b2 ŸtáÂ…µKF 5׃ƒƒ³³³¿¿?«¡ŒÊ¾}ûÜÝÝE¢Œ~q•ê.uuu]]]--­:uê@‡ê===è|6lØþ‡†™·v#ˆA<¬_ݶmÝŠƒ3ÑcƒDxzz¦B>MížqàÀ¹s—"£ôÈt¨å·lÙ¥üСCô&QzÑDKôhzkkkUUÕ§OŸI~(¡”±oß¾EEE’~'§ì€bB<°<`À‰­¯_¿;/,,„x/^Ü«W¯ÐÐÐ7‚ÃOôÉ“'•ß“ çœvÐÊ®Iߦ߹sgAA©U·éEЂþûï¿Cäìå‚2* ¹¹¹P„ð6½ì`¹BY@<¬Ë(8\NNÎáÇ 58][[[bL÷íÛ·­¬¬†~þüyñõãÆ;qâÈV¿~ýäÎ]ŠŒŠ®ƒŠøñÇé!>âéûí·íÛ·W>råó¶víÚ¥K—~1™tîÝ»G?ìåèèxìØ±Ê Ž?>iÒ$°Oñ•àÇâÃÂD¹ƒ¼&%%§¦¦V5¢öÝ»w»w‘‘A¨òÌ™3<À$>#œ+èðœ={JK¹ 4ÈH^^üláw7vìX4Ñ/‚å AdeTð°.£ööö]ºt¡_Z9lذ9sæH¤ù»uëVddd§Nè5Ož<騱#¬—¸ŒZ]¤ÈhYYDåï™iffæææ6kÖ,zü¾Dú   ={ö@x mššš¸ÿþô<óâÀ™Ü±c0!!¡¤¤ÄÈÈè»ï¾»víZuc¦ UUU}ôèã´üááá6l +((Ë´³³[¼x1ãýУG‚¹ÂÂæÍ›+Ÿv >~üxèÐ!zj'8ùKm¹XTTdmmMÏVkkkËF( `¹BY@<¬Ë(èÔ‚ è—­C1Ú²e }ã[œ´´´Þ½{WTT€ ÁÂÝ»w!½¶¶öÍ›7%†Ø DDD€ÂÙ€ÿoß¾-÷ó¬¬,KKËŒŒ sssðÚ:uêȲ¨¹••U||üš5k–,Y"_ÖÊ'77z‰‰‰—.]ªÉ¥ôª@i@ØË‚ÈʨàaWFÁ¨À)¯^½ ~PRR>Õ±cÇÊ)ÁœV®\ùçŸÂBÓ¦MÇŽ»xñb===öbã3¢G¦M›ÆøÀ³=xðàÐÐPuuuøŸÃ$#ô<ù¼}hU@ɱ¶¶NII¹víšÂçµAi@ØË‚ÈʨàQƤ÷Hu‰wpp8}ú4,/Z´hݺuÕÚýãÇcÆŒ úæ›oüüü\\\ªýxC­+VVVééé'Nœ:t¨ŒÒ€°–+‘”QÁƒ2ÊSJJJÏŸ?fY­}ËÊÊ&L˜pæÌ™]»v¹¹¹É‘{-•QB=f`ooÿðáÃÝ»w»ºº*ê°( `¹BY@<(£ü¥¢¢"**ªòyY(//§_1 _ÖµWF õ–š±cÇ^¹r…qjUù@i@ØË‚ÈʨàAE¨Õ2J¨kÃîîî3fŒŸŸ_Í>Fi@ØË‚ÈʨàAE¨í2Jããã³`ÁSSÓ3gÎtèС&‡Bi@ØË‚ÈʨàAE†ŒjNÖ1cƼ{÷nçÎôübòÒ€°–+‘”QÁƒ2Š0 %Ô”O'N 9rä®]»ŒŒŒä8JÂX®DPFÊ(€d”PÄ××wáÂ…êêê[¶l™ZKA<(£(£ˆKCiiiDDÄ_ýuãÆ X€?õõõ{õêÕõÆÆÆ\Ç‹ÔPF«…®®.xg·nÝîß¿_Uºî‚."ü<é5!!!ð'Á‹£µ”QÁƒ2Š0€2*AUÒPXX+ALÃÂÂbcc‹‹‹a%È(´—`¥íÛ·oÓ¦™™™††A#¼G¢\UTTœ!Á„¸bAÈ­O×P ¥žàGj÷F„œ¥Æ0¥U‘…tÞÒ BfRY™}„xP’ [ÛO { ¦†:Íÿ”Æ:Â2jÙÿ´ŒÚå e¢·¨]~;¦,Ÿ‘ Œ"ˆ,êëëWTT888r¢xPFPF%¨u2ZAYàiê#Ød!FÔúPB¬)“[%¶¯7!sÙEÈêÏêÚdꆻèrãêâ"©¾ŒŽ¦ömK]ÚÔª´õ!=©k®Qb[ËéJH5æ©W¥Ï8‹RdÑ-ºHBºS#ô3?­‘å3ò”Q‘‘£GNš4éåË—Íš5ã:Dñ Œ"  ŒJP[dTðȦ„ØQê}Z9œª^j:ŽãÔÂxB©+©?‹m-út»Z2z„É„¨S·×»0%KÈ)BöâòùúCÔ%ÏQ”ÈŠ`¼ú›AHcj“htƒ,Ÿ‘' Œ"ˆŒ@{ôçŸþøã\‚°Ê(ÂʨµEFAÔêS6v±ŠÛâ ¨+¦Ò…Ò˜×ÔÄõo†–q“ˆTê}u…rYiQW4ŸR7èÅI¤.—6¤nÄKà-õ¡ˆØû²|Fž€2Š BPFFPF%¨E2 öŽNÔk“Q&ÅQ¥® ¾ Ä´êC©RNù¨QÕY|‘¨—?…P÷ÐïV]”õÉ é¼2Ä®ÝÒ¼¦œX•ºe/=€Ê2*Ëgä (£‚ eaeT‚Ú%£„º-Þ—Ò²Û”ЍO©ê-jkUÔ£æJ ^4*% él¥.ÍÖ!äá§aø"ò¨9žÀP¿£|÷ !ϨÑEâÄQó’6¢#O@E!(£#(£ð\Fÿù4º\\ÔþùôðhOBn¢I­¼EÍßiH¹`}±#̤Æ'­¥–ORjØ—ÚK4.*ØDdÑ2*Ç(ê6}p¥‘U')Ç]EÉ"¡ì÷¦ïÿ?±”©9ó©ë»¢Ëº¢Ï˜ùÉ>ɧx~J@dþŒ<eA„ Œ"Œ ŒJÀs½K)¡®8ÚŠYèáÑԵƦÔJojVÎ΄ø~r¾UÔ}ùó„hÚqõù_ ñ¢²•tÊk µ~uÿ½*VP4 ^¶DçXAM¹G ®?HýùœzI)ÍBQÃê×P·ïŸ²º4ëM飈ÇÔp(àõEÐ3ê“ÏG\ÉòùÊ(‚ AEA•€Ï2Ú”2E­©yãEÐÒÀD³lÞ¤0œza}sJ:g}þæúê÷ê&x;j/·Ïß5/¥d¨>ê¨2½¹óùpèmÔÛ’r©'V{Ss‚öKЇn:S(šu)EV¥Œ6åSšo¨Ë¨áŸþüâgä(£‚ eaeT>Ë(R{AE!(£#(£ Œ"l€2Š BPFFPF%@EØeA„ Œ"Œ ŒJ€2аÊ(‚ AEA•ea”QA‚2Š0‚2*Ê(Â(£‚ eaeT”Q„ PFAÊ(Âʨ(£ Œ"‚”Q„”Q PF6@E8ÁÌÌ,%%E¼†WSSÓÕÕmذaëÖ­‡ 6qâÄ:u$ß³6f̘·o߆††*7Xið0$FNŸ>½y󿨨X???8Õ\Å/PFPF%@EØeኘ˜˜N:ÁÂÕ«Wõõõa¡¤¤ õÂ… çÎ355=yòd—.]Äw=-...,,ÔÑÑQr´eeeuëÖýðáƒÄzC’Ý»w{xxìÛ·ÏÞÞÞÙÙùÚµkÛ¶m›>}:×qñ ”Q„”Q PF6@E¸ªw•_ñ›••ehh(¾)$$däȑРܻw¯]»v¢õ .ÌÉÉÙ³g²c%"éÕ«Wå&‰ÃdbnÔ¨œd0i--­ŠŠŠ¨¨¨Ž;ª««s¿@Eø:eÔßßÿñãǦ¦¦-Z´€ÿÍÌÌD½m”QþPLHŠ–Ö‹F^¤¨«§ý󾚚é?ÿ˜¾ošmš™Ù¨¢‚ëeeẞ¯,£@PPÐðáÿÿþûèèhÚY¹ÅÁÁáäÉ“µ±IW®W¯ùúÚÓê‚2Š0ðuÊhrrrLLÌóçÏS>QXXZÓW¯^‘ôôÅà:-‘|– a„¼ïÔ×O©_?¥N”o¾I).~]X¨¡­mjaaJÝ“¼¼<úûú÷»{ñ"óõk= u뚪ªš–•™æå¡š–”ÔçúUeá)2 <øÚµk €cÆŒQzhÿ*a//¯Í›7“ÚÙ$½}û¶Aƒ¤v¯LPF¾NeäÍ›7)â<{–’œüáý{#--Suõ]§°Ð,'ÇôŸš¢Éu´µ‘RBRA:UTRêÕ{®«›¢®žRZš^T¤®¥ÕÜÌLä´z6nܘ.œÒ)(( ¿®/^ˆ¾¸ì¬,}øÊêÔiñÍ7¦ÅŦ𭘢¯„Y(£‡H—ÑãÇ;::>üüùóïß¿¿ÿ¾¿¿@@T‰tzè¢GFFÂÊ .ÀA=z4þüÇ»»»oݺ•>ÈÕ«W½½½aß>4oÞ|ôèÑK–,‘x¾366\3$$$33S__¿wïÞ .üá‡è­ÚÚÚ•…¶‰1$šèèh8`hh(De``‡š={vÿþýE `Hsýúõ{÷îA¦ÌÇÇþ„OÔ°aCggç•+Wªªª~ñ~1£Ê•¶ªU2Š0€2úE^¿~ý‚‚¾"—ÿ2%¥´¸¸ HªŠÊ¿®“—gZZjJH3B4¸Ž–”’Ò ÿ44R ^hj¦üóOZqñ7êê&Íš™¶nmjfF? 4mÚ”›ƒŸ]CUMLLIJÊËÍ­¯¡a ÿÊËMß¿oAu-L ©«ðì+2Špˆt…ÊÍÌÌ 6A‚-/_¾Oocck’““ayÓ¦M ;w¡|ûö-¬\M±fÍ'''X ›\]]-,,nݺ¥¡ñßJlò×_ý¿ÿû?°ºöíÛ?xðà矆c8p`Ò¤ItÆ‹‹Œ!ûöíóððèׯøe›6mâããçÎ Yoܸ\™Nãçç—‘‘±lÙ2Xvss†eؤLƒ]~ÿýwégO–Œª © Ê(Âʨ|TTT@ßú¿äàßÓ§)‰‰§¥•—”4QWoñÏ?-Àu>|0%þ5%Dë€Ù ‚W”t¾€ÿutàßóo¾ù»¤ä55ccÓV­Z´k'ºØ Ò©¦ÆýiÈÎÎþßÅïädøâà,ÈÏo ®þï½þ’Óü|3ªk¡Ø‡4PF‘.£EEEô%ÌââbMMͪÒÓ+ûôésþüùzõê=yòŽï¾û.44ÔÚÚ$oÕªU¢Ä ¬sæÌÙµk×”)Sue±{÷îmÛ¶¥³`¹[·nõë×§–Hõ9‰`ßž={¶nÝ:**JKK‹NSVVÖµk׸¸¸°°°^½zIì;kÖ,ð`Q×722B‚ì233¥œ:Ù3B•e´¤¤¤N: ÐJKK311yýúµ‘‘‘ìGxôèÑüqøða(Œ¿„%PF TRðø¯ëÄÇ¿øÏÀxÒÞ¼ù¦¬ÌDEåß{ý ©ÔÕ8ø×„/ßâP8^ÓÆIßdïTWY^^ª¢Ò¤Q#S33SÎÖ­iélÖ¬™èZH-¹ÿ^ÿ†Ož¤$$¤¤¦~(*2¢‡LA¿âS×þiUÿø(£‡H—QhÁiAÌÍÍ¥ç~’"£ÿý74ñâ»><((ˆ1ßqãÆ?~œ|–äçççêê*ž1''çàÁƒôŸ²ËèØ±cO:µÿ~ñd‡rvv5jÔ™3g¤üŒŒ úY  ©ã eÏeTFX”Ѥ¤¤V­ZA§ ¡;wî 0zZ²<ï¬Y³æÀÏŸ?§ÿ¬êׂ°ʨr(--MMMý×P“’RbcÿõÔ—/S³²ÔÊËM iQ\lJ-˜RäÃ÷ÂQœohã¤ÿ©©¥hi¥|óM„T¿¾ióæfmÚ˜~ÿ½©¹9HgóæÍÿ{çU•ÇñËcyJ !ŠlŠ•Z>2ýd®-…¨L+ ñ“¦®%¾ÒUStÙÖW­qÝýhJš,-.‰ò~-ˆ È{E—vHF{—–––¢¢"yk 5#C>jª´´¼¦ÆnŠ—ây1ÿÖséVsÜmeï40êé5èêÚš›‹ííåc‰<<äÞ©KÔy–ÎO4ðy¥¦Ê=U*-®ª’wÒ@u¢¥…¯Zà5‚ãD$£D¯¢YFqŸ6mš··wRR’†ð]E¢§§‡_Daa!.]e@$µ··wûÈT{Õ×GE¾£¢¢²¨ I >YBršs®¥;jŸɨ–(£GŽ9vìX||<¶wìØ{éÒ¥GDó¯…‚††333SSÓúúúÞÎ ñ3š››å­qYYÒ›7¥ÙÙòQ8¸ÖÕ™Édògý[ãØkh×ñÔ('ÇêèHE¢ûººV¦¦b;;¹kº»KÆŽÅ_l÷å¥MžpÓBÕZ^µHM-Dí"/OZRRT]͵µÕÉdú––Ë—/çGnÙÛÛk3Œ— ~=šo¯AAAûöíÛ¶mÛúõë5„ï*++«{÷îá¾ÿüóÏw•xì-33ÓÝÝ]C>µ—QHmeee~~¾³³³r°ôôô1cÆ@q½Ôœs-ÝQû„HFµD@ݸqcAAëÂz+ùå— ÉèãgÕªU¡¡¡ ,ˆŒŒìí¼ZÑØØ(ÍÏ/üáyKêþ#-.–Þ½û߯F³övö¼ØšP]Ý=½!ÆÆbkk±ƒƒdÔ(±§§ØÇGìì̺… ÖI#''‡Ÿ>¬°°Ú upp€˜zxx|ôÑG½M¢ß¢áöZ]]íââ‚zj¼ÐJ ỊdΜ9.\€lÙ²Ey?”£¥¥… úyã7N:¥vmL\Óøj°ö2Ê:¡FDD`C9ØÁƒ‘„ÊMí×Ȩö ‘Œj‰ 2ª¹cè#¥H2ú8©««Û´iÓþýû “’’p/ìí=V4¬Àô„R_W'MJ«äÖ-‰Dìííäã3dÈÞÎׯBÞ<œ›[˜˜X˜’/)-571Ág&vw±¶Öƒ=zÖÖÖbT'¤Òúúú×^{­·³Cô[ºº½ÂA¡SÿøÇ?Tèt/“ÉXC~UUS.žØØØ)S¦ $ª[¼ÎÔ¯p]ݶm§hG?~¼]ZZš……w??¿ÔÔT33ùk¸1±ª2?®¿«,%&&úúúN˜0áßÿþ7ï!pßgžy&///!!ÁÇLJíäWCUÉ9¢²±±áºíÒ2BBÀ–QggçÍ›7/^¼ÛŽŽŽ¨ý¼úê« Éè㡨¨èÀ‡ÆÏ^$¡¶Ú»«nô V`Â÷p”£ã³pê.ùxø±ãlZš¼OBNŽü1wEEy}½A{»¼OÂÃq]#8îþÃþò¯::UzzƒŒ$ÖÖâ#äý\ÇŒ‘7ýŽ©|G$ˆ$Œõwäo¯mmm¸èݸq#,, :õù矯Y³†#ëý™’’åb;ádlvúK—.͘1C%‰½{÷"†±cÇ"Bfi!!!555çÎ366faNž<àááqðàAooïòòòãÇC‚ÃÃÕ§aBÒÈâñ÷÷ŠŠB$o¿ý¶Ú,!ÛŸ|òÉÂ… ·nÝêàà½nݺ+W® 3ÊÏ233YkËåË—§OŸÎï¿xñâìÙ³±Ñí°*-Bü3gÎäsû{zzjñÉ P”QSSÓo¾ùu#$Ú̵k×PzÔHHF…&##?ªÈÈHÖázòäÉ{öìÁ壷óÕW`PqlÎÍÅE¾>žÞ]]; ‹ÇôŒíI•HÈ@òçÇ)PHN¾žÎFk•ÖÔˆ::;:xï?Ê”õ|wX¾k¬HT­«knl,¶µ•·{»ºŠ½¼Pµprr¢þ Ä@cÑ¢EÐM\Ù”wân;xð`ggçI“&-[¶LYÅpøýïÏîzzz+W®„ryyyA°x…puuÍÉÉQIè_ÿúŽ…³666â ‰hƒ‚‚T¦NNNÞ¾}{lllmm-¬nîܹk×®e­‰ÊaV¬Xé„ Ìš5kýúõ§OŸîœ%fzýúuDhiiéë댓âcÃv||<Ë9ÎÚÌÌìÞ½{ˆD"‘ðe‚ý>>>ȹ†bì6!•§Ä£FÒ~÷@C(eƒ`Pî(}6CDII‰½½ý#çdTHvíÚ…Ÿ=§Õøú믯^½×—ÞÎT_ä¹çžãââ”Ç<³)6šeÓȨHG§MOÏÞÊJìà f³¹¸<¹Slö8?M¶š—'Ê“›+-**¹{W>Ùêÿþ'niËd’‡ÞùÇõüúK*m¨øøPµÐ׿¯£cef&>\>;•bä–ü¡¿XÌAB#”ŒÞºuËÅÅ¥®®tÔiÆßÚÚú F‰’Œ ªeeeØ •’3uEgUËÏÒÑ‘$50(–É: ©66''ÉèÑüúC}dñ¡çgËPeeáu»  ¸¢âmm#«I”&Šï#ËPU+O/ §‡Ÿ`½ŽÎP ù³þ‘#ÅžžNŠ ü©“ADÓó2ªåè¥ÎÁÔæ„dTPâââ–,Yià³l¬\¹òwÞ±´´ìí|õ9´”Ñ®øiYv¼ŒŒ a<%mmòeÙÙ³~ww¨ê“5¹~°ååårãT¬õ.÷Îüü¢’’¶–{}}±L&nj’·wj1÷{Ÿå¿|û7ªøÔ ¥tt쬭孧nnò×CøU ‚ ˆGB¨–ÑÐÐÐ3gΰɜ·lÙÿí·ßþ‚xHF…¦½½=""b×®]ø×ÄÄä³Ï> Ör­¬¯”Ñ®hã¸;ü²FæærO•Éî47ëÊá :ŠeXƒ[¤®§³ üÜC?.•›+-,ljjf` ÖÑqjmß¿Ïftwä¸Ðm¶\©j!55•7¦¶µµêè ³µEÕB¢Tµ NAÝ"”Œ®Zµª¦¦æøñãœb%ccã?þñ¿ ’ÑÇFttôîÝ»/_¾Œí>øàÀ½£>„@2Ú-WÄZã`¨ffòQSmmåÍ̓ÉõTÑ•gXÏÍdT]]­<™€¼sgAAC]­‘‘X$’%ª¯—{§b,=«Vá§N¨ZXXÈ=•㊛›å4ìí%®®|ÕŒ1B$õv– ‚ úBÉèìٳǷyófN1@{Μ9ÁÁÁ‰†9ÌˆŠŠZ°`ASSÓÙ³gçÍ›×ÛÙé+>Ë–-£˜ˆ~LFFFbbbdddttôÀyΙ——wýúõˆˆˆ‹/œ³þÅ"£2™ÌØØøÒ¥K“'Onmm4hÐÍ›7ù9iµaþüùW®\©¯¯Wž lñâÅaaa=ž[B…ŽŽ}}}ÜÙn×çe´+êut¤C‡âUbddÓØ(¾{× &ÚÛ¹"xžãäs²¾õ<´ñøÁÕ7Ù9êT§OŸæúi§;µ¥c)((øá‡¸~zÖ=‹€“ÞO.¬«.}7xžP%ú8je” ? 'NôšßG€h(½~|Ö= É(¡’QHF ! %ú¯¿þzdd$Éè/CCéõã³îYHF 5Œª@2JÉ(Ñë444lÞ¼y÷îÝœÀ×ü~©eÝ–^¿ýôSÄ•••]VV–””„|ž?Iddd|üñÇ™™™ï¾ûîþýûY ÉÉÉÈá÷ßÈÛêÕ«ÙØh•̬ZµjãÆÊ’°A(:777åRê¶ôø³Fù‡……EGG—––ÚÙÙ-[¶ 士+IJÇO$$£„HFU %„€d”8L ÖõÙgŸÁ&7mÚtòäÉÙ³góÍ7|ìgâÕùš¥ûÃþsÂ6660¿+VÄÇÇoذaëÖ­|0X Âà: Û=zô7 »_}õÕ›o¾ÉÂtn#LLL„z{{C—Ÿ}öY íBˆçÎëäätâĉ1cÆ\¿~ÑÂꬬ¬ÆŽ{ñâÅ_|±¨¨)"0bÛ»w/ö÷ÝwÐbœvBÇ—/_>yòä/¾øÂÕÕZ¹fÍعs'ÎQ&“EDD,^¼! Åb16nß¾ýüóÏ#•ÀÀÀC‡1qlnnž6mZmm-ŽesKbÒ¤Içγ´´ÌÎÎÆ¹»»#3ÝQ£Fݼy“_¶·½½œžž7qâDìAäÐÜk×®±Ì?gΜóçÏó© $CBB˜¹j(=å,C‘ùvД”¸2Ê¥¡ùÄ$£„HFU %„€d”‰D"•J§N ç{úé§9E7Gh\XX˜§§' £AF!pþþþ‡âw²À𪎎¶‡ ß9räH`` òáAAA555_ý5ûWYFÃÃÃß{ï½;w._¾¼ÛShll455ÅFKK ¯­eeeööö0Kå§ä, hëˆ#”cX¸pá™3gŽ=úÖ[o)ãìæÍ›wöìYüûç?ÿ¹B–øI$Qh+W®D¢0oH9öÀV§OŸ^^^ηãj#£*}F+++íììº:d`B2J¨dT’QBHF ¡áÕÃöĉ—,Yâççgnþ³5.4èTuuµ……ë1YPPpûö휜¶ž"ØÖÖ¶ªª*;;[¹?egØm!ax[¶lÙ¿?d`B2J¨dTÈhm\܇çÌqS9®ãÂûq*ì1w‹Þ¢·ý­UgA2JŒT*ݵkשS§ [œbÄÒ|°yófþµ7*++;|øð·ß~›ššjjjêîîîèèxâÄ åÀ"‘ª c­}]Án+3fÌ€™effÂq%‰6§€ð/¿ü²ÁñãÇÇ+]ºt)DùÂ… /½ô’JeT__¿£££¢¢Vª¼y>|¸ò /o¾ùæÉ“'Ïœ93þüôôtDŽ‘ô$ÅïT&“988DFFòÏñ5—^WY"í É(¡’Qä2Z[ûá‡:;;O:5ãðp¹W,Z´蘘˜[·nÑ[ôÖ£¾µjÕ*Ü’IF áÀ·Ž=ãnjj:{öìÑ£Gcccñï‚ U,LWntõêÕ9sæ`çÆ!gNNNjÃç`uðE¨ª†œ°ÛJ```XXÌø­·Þrss‹ÇO Û³(((€}"¡äääââbssóÉ“'#WcÆŒéœDg…%WVVæççã—¨¼º‰”û¿~ÿý÷ø©²N¢AAAººº»wïÆQ…  õï¼óN^^žr$$£=É(¡’Qäé9ޤèYè{EJBBÂK/½”’’2räH~ç×_Í‚§²Ž]¹ÑÓO?““-ƒœñ;;~ã7 —¡¡¡¨®«d ±±ÑÄÄ„m«hæ?eʔ˗/‹D" gꜷ·7,vÏž=šÏ·+e½Z#""°¡¼ÿàÁƒÈ³²—㤠žl=^///ˆ;ŒyÛ¶m_ü½sçÎSO=µaÃåHHF{’QB $£*4B@ß+BPd2™X,¶°°¸zõ*ßY__?xð`SSÓû÷ï³ñÝuuu¬iss3?ž{8iAAkå7…/¾ø‚õíèè`‡§§§?ÞÎÎ.--M¹™3))ÉÏÏ/55ÕÌÌ ²ÀUUUÌÃpø¬Y³¾ûK—òƒœÔ¾xñb++«÷ß„ îîî*ã“ø“ÕÓÓSN‚'11Ñ××Çâ·Æînœb8Ô3Ï<“——e÷ññáoÙ²eÓ¦M°d¸víö”––:::º¸¸ÔÔÔà¤TRïªô”³¤"£È!ë0@7Y’QB $£*4B@ß+BhBBB>ýôÓ‘#GîܹsÚ´i¦?þøØ±cP®7òÁà¬EEEaaaþþþQQQ°®·ß~;00!çÍ›÷§?ýÉÀÀàŸÿü'"±´´„_VVV^¹r…ï¯yòäÉ€€ƒz{{———?~üèÑ£ðHÖ½’M)Šèèè_|‘U[[ ±khhxï½÷öìÙ÷U{ ­­­kÖ¬ùꫯ’íLÃ#_~ùeä–ï¨Ê'qéÒ¥3f¨DòùçŸòÉ' .ܺu«ƒƒCvvöºuëp {÷îý裔CÞ¹s¥ĹóK¼òÊ+(œ/éœCµ¥Ç=ìÀòÆOJbbbX!tÛ·aà@2J¨dT’Bè{E kÕ;¥ß´@Lßÿýwß}—o#äs…®X±"%%ÅÚÚzÖ¬Yëׯ—H$°@ˆì‰' ž666“&M‚žNŸ>¾µråÊââbHß1lß¾=66Š Û›;wîÚµkqÞ‚8BËø Ç^¼xjȆùsŠ%Ž:¤2õÏýû÷‘´‘‘ÑèÑ£³²²àp999---&&&ûÛßfΜéåå•––Æ'áêêŠ*‘@RCCC¯_¿ŽB©}}}ƒƒƒqR“ƒË&$$@©ù>ÿûß÷»ßÁ¹ùéE•Q[zlÖRE i.++ö••l•eû}|| ªÝ}Œý’QB $£*4B@ß+‚è–¢¢"°‹‹Ëùóçùyã!Êqqq;vì€mggg÷n‰_É(¡’QH! ïAtË /¼põêÕääd///•·jkk‡ Öyux≃d”Pɨ $ „Ð÷Š ºÅÄĤ©©I­Œ&$$¬]»ªÚ+#z’QB $£*4B@ß+‚è– 6lß¾ÝÙÙyÛ¶m/¼ð‚••Õƒòóó£¢¢"¨¬«D<‰Œj˜={6þ^¸p¡·3ÒW¸qãþz{{÷vFˆ~}¯BNŸ>}äÈ‘ÔÔÔ{÷î‰D"ø¨»»;îSü#â‰æÿ¹63 endstream endobj 11 0 obj <>stream GIMP PostScript file plugin V 1.17 by Peter Kirchgessner stack_frame.eps endstream endobj 2 0 obj <>endobj xref 0 12 0000000000 65535 f 0000000378 00000 n 0000077364 00000 n 0000000319 00000 n 0000000164 00000 n 0000000015 00000 n 0000000146 00000 n 0000000443 00000 n 0000000543 00000 n 0000000484 00000 n 0000000513 00000 n 0000075955 00000 n trailer << /Size 12 /Root 1 0 R /Info 2 0 R /ID [<6684BB6D54425B54C854834C06FAB81C><6684BB6D54425B54C854834C06FAB81C>] >> startxref 77578 %%EOF gdb-doc-7.6.2/gdb/doc/gdb.info-10000644000175000017500000111155012250773371015146 0ustar zumbizumbiThis is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo. INFO-DIR-SECTION Software development START-INFO-DIR-ENTRY * Gdb: (gdb). The GNU debugger. END-INFO-DIR-ENTRY Copyright (C) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom." This file documents the GNU debugger GDB. This is the Tenth Edition, of `Debugging with GDB: the GNU Source-Level Debugger' for GDB (GDB) Version 7.6.2. Copyright (C) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom."  File: gdb.info, Node: Top, Next: Summary, Prev: (dir), Up: (dir) Debugging with GDB ****************** This file describes GDB, the GNU symbolic debugger. This is the Tenth Edition, for GDB (GDB) Version 7.6.2. Copyright (C) 1988-2013 Free Software Foundation, Inc. This edition of the GDB manual is dedicated to the memory of Fred Fish. Fred was a long-standing contributor to GDB and to Free software in general. We will miss him. * Menu: * Summary:: Summary of GDB * Sample Session:: A sample GDB session * Invocation:: Getting in and out of GDB * Commands:: GDB commands * Running:: Running programs under GDB * Stopping:: Stopping and continuing * Reverse Execution:: Running programs backward * Process Record and Replay:: Recording inferior's execution and replaying it * Stack:: Examining the stack * Source:: Examining source files * Data:: Examining data * Optimized Code:: Debugging optimized code * Macros:: Preprocessor Macros * Tracepoints:: Debugging remote targets non-intrusively * Overlays:: Debugging programs that use overlays * Languages:: Using GDB with different languages * Symbols:: Examining the symbol table * Altering:: Altering execution * GDB Files:: GDB files * Targets:: Specifying a debugging target * Remote Debugging:: Debugging remote programs * Configurations:: Configuration-specific information * Controlling GDB:: Controlling GDB * Extending GDB:: Extending GDB * Interpreters:: Command Interpreters * TUI:: GDB Text User Interface * Emacs:: Using GDB under GNU Emacs * GDB/MI:: GDB's Machine Interface. * Annotations:: GDB's annotation interface. * JIT Interface:: Using the JIT debugging interface. * In-Process Agent:: In-Process Agent * GDB Bugs:: Reporting bugs in GDB * Command Line Editing:: Command Line Editing * Using History Interactively:: Using History Interactively * In Memoriam:: In Memoriam * Formatting Documentation:: How to format and print GDB documentation * Installing GDB:: Installing GDB * Maintenance Commands:: Maintenance Commands * Remote Protocol:: GDB Remote Serial Protocol * Agent Expressions:: The GDB Agent Expression Mechanism * Target Descriptions:: How targets can describe themselves to GDB * Operating System Information:: Getting additional information from the operating system * Trace File Format:: GDB trace file format * Index Section Format:: .gdb_index section format * Copying:: GNU General Public License says how you can copy and share GDB * GNU Free Documentation License:: The license for this documentation * Concept Index:: Index of GDB concepts * Command and Variable Index:: Index of GDB commands, variables, functions, and Python data types  File: gdb.info, Node: Summary, Next: Sample Session, Prev: Top, Up: Top Summary of GDB ************** The purpose of a debugger such as GDB is to allow you to see what is going on "inside" another program while it executes--or what another program was doing at the moment it crashed. GDB can do four main kinds of things (plus other things in support of these) to help you catch bugs in the act: * Start your program, specifying anything that might affect its behavior. * Make your program stop on specified conditions. * Examine what has happened, when your program has stopped. * Change things in your program, so you can experiment with correcting the effects of one bug and go on to learn about another. You can use GDB to debug programs written in C and C++. For more information, see *note Supported Languages: Supported Languages. For more information, see *note C and C++: C. Support for D is partial. For information on D, see *note D: D. Support for Modula-2 is partial. For information on Modula-2, see *note Modula-2: Modula-2. Support for OpenCL C is partial. For information on OpenCL C, see *note OpenCL C: OpenCL C. Debugging Pascal programs which use sets, subranges, file variables, or nested functions does not currently work. GDB does not support entering expressions, printing values, or similar features using Pascal syntax. GDB can be used to debug programs written in Fortran, although it may be necessary to refer to some variables with a trailing underscore. GDB can be used to debug programs written in Objective-C, using either the Apple/NeXT or the GNU Objective-C runtime. * Menu: * Free Software:: Freely redistributable software * Free Documentation:: Free Software Needs Free Documentation * Contributors:: Contributors to GDB  File: gdb.info, Node: Free Software, Next: Free Documentation, Up: Summary Free Software ============= GDB is "free software", protected by the GNU General Public License (GPL). The GPL gives you the freedom to copy or adapt a licensed program--but every person getting a copy also gets with it the freedom to modify that copy (which means that they must get access to the source code), and the freedom to distribute further copies. Typical software companies use copyrights to limit your freedoms; the Free Software Foundation uses the GPL to preserve these freedoms. Fundamentally, the General Public License is a license which says that you have these freedoms and that you cannot take these freedoms away from anyone else.  File: gdb.info, Node: Free Documentation, Next: Contributors, Prev: Free Software, Up: Summary Free Software Needs Free Documentation ====================================== The biggest deficiency in the free software community today is not in the software--it is the lack of good free documentation that we can include with the free software. Many of our most important programs do not come with free reference manuals and free introductory texts. Documentation is an essential part of any software package; when an important free software package does not come with a free manual and a free tutorial, that is a major gap. We have many such gaps today. Consider Perl, for instance. The tutorial manuals that people normally use are non-free. How did this come about? Because the authors of those manuals published them with restrictive terms--no copying, no modification, source files not available--which exclude them from the free software world. That wasn't the first time this sort of thing happened, and it was far from the last. Many times we have heard a GNU user eagerly describe a manual that he is writing, his intended contribution to the community, only to learn that he had ruined everything by signing a publication contract to make it non-free. Free documentation, like free software, is a matter of freedom, not price. The problem with the non-free manual is not that publishers charge a price for printed copies--that in itself is fine. (The Free Software Foundation sells printed copies of manuals, too.) The problem is the restrictions on the use of the manual. Free manuals are available in source code form, and give you permission to copy and modify. Non-free manuals do not allow this. The criteria of freedom for a free manual are roughly the same as for free software. Redistribution (including the normal kinds of commercial redistribution) must be permitted, so that the manual can accompany every copy of the program, both on-line and on paper. Permission for modification of the technical content is crucial too. When people modify the software, adding or changing features, if they are conscientious they will change the manual too--so they can provide accurate and clear documentation for the modified program. A manual that leaves you no choice but to write a new manual to document a changed version of the program is not really available to our community. Some kinds of limits on the way modification is handled are acceptable. For example, requirements to preserve the original author's copyright notice, the distribution terms, or the list of authors, are ok. It is also no problem to require modified versions to include notice that they were modified. Even entire sections that may not be deleted or changed are acceptable, as long as they deal with nontechnical topics (like this one). These kinds of restrictions are acceptable because they don't obstruct the community's normal use of the manual. However, it must be possible to modify all the _technical_ content of the manual, and then distribute the result in all the usual media, through all the usual channels. Otherwise, the restrictions obstruct the use of the manual, it is not free, and we need another manual to replace it. Please spread the word about this issue. Our community continues to lose manuals to proprietary publishing. If we spread the word that free software needs free reference manuals and free tutorials, perhaps the next person who wants to contribute by writing documentation will realize, before it is too late, that only free manuals contribute to the free software community. If you are writing documentation, please insist on publishing it under the GNU Free Documentation License or another free documentation license. Remember that this decision requires your approval--you don't have to let the publisher decide. Some commercial publishers will use a free license if you insist, but they will not propose the option; it is up to you to raise the issue and say firmly that this is what you want. If the publisher you are dealing with refuses, please try other publishers. If you're not sure whether a proposed license is free, write to . You can encourage commercial publishers to sell more free, copylefted manuals and tutorials by buying them, and particularly by buying copies from the publishers that paid for their writing or for major improvements. Meanwhile, try to avoid buying non-free documentation at all. Check the distribution terms of a manual before you buy it, and insist that whoever seeks your business must respect your freedom. Check the history of the book, and try to reward the publishers that have paid or pay the authors to work on it. The Free Software Foundation maintains a list of free documentation published by other publishers, at `http://www.fsf.org/doc/other-free-books.html'.  File: gdb.info, Node: Contributors, Prev: Free Documentation, Up: Summary Contributors to GDB =================== Richard Stallman was the original author of GDB, and of many other GNU programs. Many others have contributed to its development. This section attempts to credit major contributors. One of the virtues of free software is that everyone is free to contribute to it; with regret, we cannot actually acknowledge everyone here. The file `ChangeLog' in the GDB distribution approximates a blow-by-blow account. Changes much prior to version 2.0 are lost in the mists of time. _Plea:_ Additions to this section are particularly welcome. If you or your friends (or enemies, to be evenhanded) have been unfairly omitted from this list, we would like to add your names! So that they may not regard their many labors as thankless, we particularly thank those who shepherded GDB through major releases: Andrew Cagney (releases 6.3, 6.2, 6.1, 6.0, 5.3, 5.2, 5.1 and 5.0); Jim Blandy (release 4.18); Jason Molenda (release 4.17); Stan Shebs (release 4.14); Fred Fish (releases 4.16, 4.15, 4.13, 4.12, 4.11, 4.10, and 4.9); Stu Grossman and John Gilmore (releases 4.8, 4.7, 4.6, 4.5, and 4.4); John Gilmore (releases 4.3, 4.2, 4.1, 4.0, and 3.9); Jim Kingdon (releases 3.5, 3.4, and 3.3); and Randy Smith (releases 3.2, 3.1, and 3.0). Richard Stallman, assisted at various times by Peter TerMaat, Chris Hanson, and Richard Mlynarik, handled releases through 2.8. Michael Tiemann is the author of most of the GNU C++ support in GDB, with significant additional contributions from Per Bothner and Daniel Berlin. James Clark wrote the GNU C++ demangler. Early work on C++ was by Peter TerMaat (who also did much general update work leading to release 3.0). GDB uses the BFD subroutine library to examine multiple object-file formats; BFD was a joint project of David V. Henkel-Wallace, Rich Pixley, Steve Chamberlain, and John Gilmore. David Johnson wrote the original COFF support; Pace Willison did the original support for encapsulated COFF. Brent Benson of Harris Computer Systems contributed DWARF 2 support. Adam de Boor and Bradley Davis contributed the ISI Optimum V support. Per Bothner, Noboyuki Hikichi, and Alessandro Forin contributed MIPS support. Jean-Daniel Fekete contributed Sun 386i support. Chris Hanson improved the HP9000 support. Noboyuki Hikichi and Tomoyuki Hasei contributed Sony/News OS 3 support. David Johnson contributed Encore Umax support. Jyrki Kuoppala contributed Altos 3068 support. Jeff Law contributed HP PA and SOM support. Keith Packard contributed NS32K support. Doug Rabson contributed Acorn Risc Machine support. Bob Rusk contributed Harris Nighthawk CX-UX support. Chris Smith contributed Convex support (and Fortran debugging). Jonathan Stone contributed Pyramid support. Michael Tiemann contributed SPARC support. Tim Tucker contributed support for the Gould NP1 and Gould Powernode. Pace Willison contributed Intel 386 support. Jay Vosburgh contributed Symmetry support. Marko Mlinar contributed OpenRISC 1000 support. Andreas Schwab contributed M68K GNU/Linux support. Rich Schaefer and Peter Schauer helped with support of SunOS shared libraries. Jay Fenlason and Roland McGrath ensured that GDB and GAS agree about several machine instruction sets. Patrick Duval, Ted Goldstein, Vikram Koka and Glenn Engel helped develop remote debugging. Intel Corporation, Wind River Systems, AMD, and ARM contributed remote debugging modules for the i960, VxWorks, A29K UDI, and RDI targets, respectively. Brian Fox is the author of the readline libraries providing command-line editing and command history. Andrew Beers of SUNY Buffalo wrote the language-switching code, the Modula-2 support, and contributed the Languages chapter of this manual. Fred Fish wrote most of the support for Unix System Vr4. He also enhanced the command-completion support to cover C++ overloaded symbols. Hitachi America (now Renesas America), Ltd. sponsored the support for H8/300, H8/500, and Super-H processors. NEC sponsored the support for the v850, Vr4xxx, and Vr5xxx processors. Mitsubishi (now Renesas) sponsored the support for D10V, D30V, and M32R/D processors. Toshiba sponsored the support for the TX39 Mips processor. Matsushita sponsored the support for the MN10200 and MN10300 processors. Fujitsu sponsored the support for SPARClite and FR30 processors. Kung Hsu, Jeff Law, and Rick Sladkey added support for hardware watchpoints. Michael Snyder added support for tracepoints. Stu Grossman wrote gdbserver. Jim Kingdon, Peter Schauer, Ian Taylor, and Stu Grossman made nearly innumerable bug fixes and cleanups throughout GDB. The following people at the Hewlett-Packard Company contributed support for the PA-RISC 2.0 architecture, HP-UX 10.20, 10.30, and 11.0 (narrow mode), HP's implementation of kernel threads, HP's aC++ compiler, and the Text User Interface (nee Terminal User Interface): Ben Krepp, Richard Title, John Bishop, Susan Macchia, Kathy Mann, Satish Pai, India Paul, Steve Rehrauer, and Elena Zannoni. Kim Haase provided HP-specific information in this manual. DJ Delorie ported GDB to MS-DOS, for the DJGPP project. Robert Hoehne made significant contributions to the DJGPP port. Cygnus Solutions has sponsored GDB maintenance and much of its development since 1991. Cygnus engineers who have worked on GDB fulltime include Mark Alexander, Jim Blandy, Per Bothner, Kevin Buettner, Edith Epstein, Chris Faylor, Fred Fish, Martin Hunt, Jim Ingham, John Gilmore, Stu Grossman, Kung Hsu, Jim Kingdon, John Metzler, Fernando Nasser, Geoffrey Noer, Dawn Perchik, Rich Pixley, Zdenek Radouch, Keith Seitz, Stan Shebs, David Taylor, and Elena Zannoni. In addition, Dave Brolley, Ian Carmichael, Steve Chamberlain, Nick Clifton, JT Conklin, Stan Cox, DJ Delorie, Ulrich Drepper, Frank Eigler, Doug Evans, Sean Fagan, David Henkel-Wallace, Richard Henderson, Jeff Holcomb, Jeff Law, Jim Lemke, Tom Lord, Bob Manson, Michael Meissner, Jason Merrill, Catherine Moore, Drew Moseley, Ken Raeburn, Gavin Romig-Koch, Rob Savoye, Jamie Smith, Mike Stump, Ian Taylor, Angela Thomas, Michael Tiemann, Tom Tromey, Ron Unrau, Jim Wilson, and David Zuhn have made contributions both large and small. Andrew Cagney, Fernando Nasser, and Elena Zannoni, while working for Cygnus Solutions, implemented the original GDB/MI interface. Jim Blandy added support for preprocessor macros, while working for Red Hat. Andrew Cagney designed GDB's architecture vector. Many people including Andrew Cagney, Stephane Carrez, Randolph Chung, Nick Duffek, Richard Henderson, Mark Kettenis, Grace Sainsbury, Kei Sakamoto, Yoshinori Sato, Michael Snyder, Andreas Schwab, Jason Thorpe, Corinna Vinschen, Ulrich Weigand, and Elena Zannoni, helped with the migration of old architectures to this new framework. Andrew Cagney completely re-designed and re-implemented GDB's unwinder framework, this consisting of a fresh new design featuring frame IDs, independent frame sniffers, and the sentinel frame. Mark Kettenis implemented the DWARF 2 unwinder, Jeff Johnston the libunwind unwinder, and Andrew Cagney the dummy, sentinel, tramp, and trad unwinders. The architecture-specific changes, each involving a complete rewrite of the architecture's frame code, were carried out by Jim Blandy, Joel Brobecker, Kevin Buettner, Andrew Cagney, Stephane Carrez, Randolph Chung, Orjan Friberg, Richard Henderson, Daniel Jacobowitz, Jeff Johnston, Mark Kettenis, Theodore A. Roth, Kei Sakamoto, Yoshinori Sato, Michael Snyder, Corinna Vinschen, and Ulrich Weigand. Christian Zankel, Ross Morley, Bob Wilson, and Maxim Grigoriev from Tensilica, Inc. contributed support for Xtensa processors. Others who have worked on the Xtensa port of GDB in the past include Steve Tjiang, John Newlin, and Scott Foehner. Michael Eager and staff of Xilinx, Inc., contributed support for the Xilinx MicroBlaze architecture.  File: gdb.info, Node: Sample Session, Next: Invocation, Prev: Summary, Up: Top 1 A Sample GDB Session ********************** You can use this manual at your leisure to read all about GDB. However, a handful of commands are enough to get started using the debugger. This chapter illustrates those commands. One of the preliminary versions of GNU `m4' (a generic macro processor) exhibits the following bug: sometimes, when we change its quote strings from the default, the commands used to capture one macro definition within another stop working. In the following short `m4' session, we define a macro `foo' which expands to `0000'; we then use the `m4' built-in `defn' to define `bar' as the same thing. However, when we change the open quote string to `' and the close quote string to `', the same procedure fails to define a new synonym `baz': $ cd gnu/m4 $ ./m4 define(foo,0000) foo 0000 define(bar,defn(`foo')) bar 0000 changequote(,) define(baz,defn(foo)) baz Ctrl-d m4: End of input: 0: fatal error: EOF in string Let us use GDB to try to see what is going on. $ gdb m4 GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. There is absolutely no warranty for GDB; type "show warranty" for details. GDB 7.6.2, Copyright 1999 Free Software Foundation, Inc... (gdb) GDB reads only enough symbol data to know where to find the rest when needed; as a result, the first prompt comes up very quickly. We now tell GDB to use a narrower display width than usual, so that examples fit in this manual. (gdb) set width 70 We need to see how the `m4' built-in `changequote' works. Having looked at the source, we know the relevant subroutine is `m4_changequote', so we set a breakpoint there with the GDB `break' command. (gdb) break m4_changequote Breakpoint 1 at 0x62f4: file builtin.c, line 879. Using the `run' command, we start `m4' running under GDB control; as long as control does not reach the `m4_changequote' subroutine, the program runs as usual: (gdb) run Starting program: /work/Editorial/gdb/gnu/m4/m4 define(foo,0000) foo 0000 To trigger the breakpoint, we call `changequote'. GDB suspends execution of `m4', displaying information about the context where it stops. changequote(,) Breakpoint 1, m4_changequote (argc=3, argv=0x33c70) at builtin.c:879 879 if (bad_argc(TOKEN_DATA_TEXT(argv[0]),argc,1,3)) Now we use the command `n' (`next') to advance execution to the next line of the current function. (gdb) n 882 set_quotes((argc >= 2) ? TOKEN_DATA_TEXT(argv[1])\ : nil, `set_quotes' looks like a promising subroutine. We can go into it by using the command `s' (`step') instead of `next'. `step' goes to the next line to be executed in _any_ subroutine, so it steps into `set_quotes'. (gdb) s set_quotes (lq=0x34c78 "", rq=0x34c88 "") at input.c:530 530 if (lquote != def_lquote) The display that shows the subroutine where `m4' is now suspended (and its arguments) is called a stack frame display. It shows a summary of the stack. We can use the `backtrace' command (which can also be spelled `bt'), to see where we are in the stack as a whole: the `backtrace' command displays a stack frame for each active subroutine. (gdb) bt #0 set_quotes (lq=0x34c78 "", rq=0x34c88 "") at input.c:530 #1 0x6344 in m4_changequote (argc=3, argv=0x33c70) at builtin.c:882 #2 0x8174 in expand_macro (sym=0x33320) at macro.c:242 #3 0x7a88 in expand_token (obs=0x0, t=209696, td=0xf7fffa30) at macro.c:71 #4 0x79dc in expand_input () at macro.c:40 #5 0x2930 in main (argc=0, argv=0xf7fffb20) at m4.c:195 We step through a few more lines to see what happens. The first two times, we can use `s'; the next two times we use `n' to avoid falling into the `xstrdup' subroutine. (gdb) s 0x3b5c 532 if (rquote != def_rquote) (gdb) s 0x3b80 535 lquote = (lq == nil || *lq == '\0') ? \ def_lquote : xstrdup(lq); (gdb) n 536 rquote = (rq == nil || *rq == '\0') ? def_rquote\ : xstrdup(rq); (gdb) n 538 len_lquote = strlen(rquote); The last line displayed looks a little odd; we can examine the variables `lquote' and `rquote' to see if they are in fact the new left and right quotes we specified. We use the command `p' (`print') to see their values. (gdb) p lquote $1 = 0x35d40 "" (gdb) p rquote $2 = 0x35d50 "" `lquote' and `rquote' are indeed the new left and right quotes. To look at some context, we can display ten lines of source surrounding the current line with the `l' (`list') command. (gdb) l 533 xfree(rquote); 534 535 lquote = (lq == nil || *lq == '\0') ? def_lquote\ : xstrdup (lq); 536 rquote = (rq == nil || *rq == '\0') ? def_rquote\ : xstrdup (rq); 537 538 len_lquote = strlen(rquote); 539 len_rquote = strlen(lquote); 540 } 541 542 void Let us step past the two lines that set `len_lquote' and `len_rquote', and then examine the values of those variables. (gdb) n 539 len_rquote = strlen(lquote); (gdb) n 540 } (gdb) p len_lquote $3 = 9 (gdb) p len_rquote $4 = 7 That certainly looks wrong, assuming `len_lquote' and `len_rquote' are meant to be the lengths of `lquote' and `rquote' respectively. We can set them to better values using the `p' command, since it can print the value of any expression--and that expression can include subroutine calls and assignments. (gdb) p len_lquote=strlen(lquote) $5 = 7 (gdb) p len_rquote=strlen(rquote) $6 = 9 Is that enough to fix the problem of using the new quotes with the `m4' built-in `defn'? We can allow `m4' to continue executing with the `c' (`continue') command, and then try the example that caused trouble initially: (gdb) c Continuing. define(baz,defn(foo)) baz 0000 Success! The new quotes now work just as well as the default ones. The problem seems to have been just the two typos defining the wrong lengths. We allow `m4' exit by giving it an EOF as input: Ctrl-d Program exited normally. The message `Program exited normally.' is from GDB; it indicates `m4' has finished executing. We can end our GDB session with the GDB `quit' command. (gdb) quit  File: gdb.info, Node: Invocation, Next: Commands, Prev: Sample Session, Up: Top 2 Getting In and Out of GDB *************************** This chapter discusses how to start GDB, and how to get out of it. The essentials are: * type `gdb' to start GDB. * type `quit' or `Ctrl-d' to exit. * Menu: * Invoking GDB:: How to start GDB * Quitting GDB:: How to quit GDB * Shell Commands:: How to use shell commands inside GDB * Logging Output:: How to log GDB's output to a file  File: gdb.info, Node: Invoking GDB, Next: Quitting GDB, Up: Invocation 2.1 Invoking GDB ================ Invoke GDB by running the program `gdb'. Once started, GDB reads commands from the terminal until you tell it to exit. You can also run `gdb' with a variety of arguments and options, to specify more of your debugging environment at the outset. The command-line options described here are designed to cover a variety of situations; in some environments, some of these options may effectively be unavailable. The most usual way to start GDB is with one argument, specifying an executable program: gdb PROGRAM You can also start with both an executable program and a core file specified: gdb PROGRAM CORE You can, instead, specify a process ID as a second argument, if you want to debug a running process: gdb PROGRAM 1234 would attach GDB to process `1234' (unless you also have a file named `1234'; GDB does check for a core file first). Taking advantage of the second command-line argument requires a fairly complete operating system; when you use GDB as a remote debugger attached to a bare board, there may not be any notion of "process", and there is often no way to get a core dump. GDB will warn you if it is unable to attach or to read core dumps. You can optionally have `gdb' pass any arguments after the executable file to the inferior using `--args'. This option stops option processing. gdb --args gcc -O2 -c foo.c This will cause `gdb' to debug `gcc', and to set `gcc''s command-line arguments (*note Arguments::) to `-O2 -c foo.c'. You can run `gdb' without printing the front material, which describes GDB's non-warranty, by specifying `-silent': gdb -silent You can further control how GDB starts up by using command-line options. GDB itself can remind you of the options available. Type gdb -help to display all available options and briefly describe their use (`gdb -h' is a shorter equivalent). All options and command line arguments you give are processed in sequential order. The order makes a difference when the `-x' option is used. * Menu: * File Options:: Choosing files * Mode Options:: Choosing modes * Startup:: What GDB does during startup  File: gdb.info, Node: File Options, Next: Mode Options, Up: Invoking GDB 2.1.1 Choosing Files -------------------- When GDB starts, it reads any arguments other than options as specifying an executable file and core file (or process ID). This is the same as if the arguments were specified by the `-se' and `-c' (or `-p') options respectively. (GDB reads the first argument that does not have an associated option flag as equivalent to the `-se' option followed by that argument; and the second argument that does not have an associated option flag, if any, as equivalent to the `-c'/`-p' option followed by that argument.) If the second argument begins with a decimal digit, GDB will first attempt to attach to it as a process, and if that fails, attempt to open it as a corefile. If you have a corefile whose name begins with a digit, you can prevent GDB from treating it as a pid by prefixing it with `./', e.g. `./12345'. If GDB has not been configured to included core file support, such as for most embedded targets, then it will complain about a second argument and ignore it. Many options have both long and short forms; both are shown in the following list. GDB also recognizes the long forms if you truncate them, so long as enough of the option is present to be unambiguous. (If you prefer, you can flag option arguments with `--' rather than `-', though we illustrate the more usual convention.) `-symbols FILE' `-s FILE' Read symbol table from file FILE. `-exec FILE' `-e FILE' Use file FILE as the executable file to execute when appropriate, and for examining pure data in conjunction with a core dump. `-se FILE' Read symbol table from file FILE and use it as the executable file. `-core FILE' `-c FILE' Use file FILE as a core dump to examine. `-pid NUMBER' `-p NUMBER' Connect to process ID NUMBER, as with the `attach' command. `-command FILE' `-x FILE' Execute commands from file FILE. The contents of this file is evaluated exactly as the `source' command would. *Note Command files: Command Files. `-eval-command COMMAND' `-ex COMMAND' Execute a single GDB command. This option may be used multiple times to call multiple commands. It may also be interleaved with `-command' as required. gdb -ex 'target sim' -ex 'load' \ -x setbreakpoints -ex 'run' a.out `-init-command FILE' `-ix FILE' Execute commands from file FILE before loading the inferior (but after loading gdbinit files). *Note Startup::. `-init-eval-command COMMAND' `-iex COMMAND' Execute a single GDB command before loading the inferior (but after loading gdbinit files). *Note Startup::. `-directory DIRECTORY' `-d DIRECTORY' Add DIRECTORY to the path to search for source and script files. `-r' `-readnow' Read each symbol file's entire symbol table immediately, rather than the default, which is to read it incrementally as it is needed. This makes startup slower, but makes future operations faster.  File: gdb.info, Node: Mode Options, Next: Startup, Prev: File Options, Up: Invoking GDB 2.1.2 Choosing Modes -------------------- You can run GDB in various alternative modes--for example, in batch mode or quiet mode. `-nx' `-n' Do not execute commands found in any initialization file. There are three init files, loaded in the following order: ``system.gdbinit'' This is the system-wide init file. Its location is specified with the `--with-system-gdbinit' configure option (*note System-wide configuration::). It is loaded first when GDB starts, before command line options have been processed. ``~/.gdbinit'' This is the init file in your home directory. It is loaded next, after `system.gdbinit', and before command options have been processed. ``./.gdbinit'' This is the init file in the current directory. It is loaded last, after command line options other than `-x' and `-ex' have been processed. Command line options `-x' and `-ex' are processed last, after `./.gdbinit' has been loaded. For further documentation on startup processing, *Note Startup::. For documentation on how to write command files, *Note Command Files: Command Files. `-nh' Do not execute commands found in `~/.gdbinit', the init file in your home directory. *Note Startup::. `-quiet' `-silent' `-q' "Quiet". Do not print the introductory and copyright messages. These messages are also suppressed in batch mode. `-batch' Run in batch mode. Exit with status `0' after processing all the command files specified with `-x' (and all commands from initialization files, if not inhibited with `-n'). Exit with nonzero status if an error occurs in executing the GDB commands in the command files. Batch mode also disables pagination, sets unlimited terminal width and height *note Screen Size::, and acts as if `set confirm off' were in effect (*note Messages/Warnings::). Batch mode may be useful for running GDB as a filter, for example to download and run a program on another computer; in order to make this more useful, the message Program exited normally. (which is ordinarily issued whenever a program running under GDB control terminates) is not issued when running in batch mode. `-batch-silent' Run in batch mode exactly like `-batch', but totally silently. All GDB output to `stdout' is prevented (`stderr' is unaffected). This is much quieter than `-silent' and would be useless for an interactive session. This is particularly useful when using targets that give `Loading section' messages, for example. Note that targets that give their output via GDB, as opposed to writing directly to `stdout', will also be made silent. `-return-child-result' The return code from GDB will be the return code from the child process (the process being debugged), with the following exceptions: * GDB exits abnormally. E.g., due to an incorrect argument or an internal error. In this case the exit code is the same as it would have been without `-return-child-result'. * The user quits with an explicit value. E.g., `quit 1'. * The child process never runs, or is not allowed to terminate, in which case the exit code will be -1. This option is useful in conjunction with `-batch' or `-batch-silent', when GDB is being used as a remote program loader or simulator interface. `-nowindows' `-nw' "No windows". If GDB comes with a graphical user interface (GUI) built in, then this option tells GDB to only use the command-line interface. If no GUI is available, this option has no effect. `-windows' `-w' If GDB includes a GUI, then this option requires it to be used if possible. `-cd DIRECTORY' Run GDB using DIRECTORY as its working directory, instead of the current directory. `-data-directory DIRECTORY' Run GDB using DIRECTORY as its data directory. The data directory is where GDB searches for its auxiliary files. *Note Data Files::. `-fullname' `-f' GNU Emacs sets this option when it runs GDB as a subprocess. It tells GDB to output the full file name and line number in a standard, recognizable fashion each time a stack frame is displayed (which includes each time your program stops). This recognizable format looks like two `\032' characters, followed by the file name, line number and character position separated by colons, and a newline. The Emacs-to-GDB interface program uses the two `\032' characters as a signal to display the source code for the frame. `-annotate LEVEL' This option sets the "annotation level" inside GDB. Its effect is identical to using `set annotate LEVEL' (*note Annotations::). The annotation LEVEL controls how much information GDB prints together with its prompt, values of expressions, source lines, and other types of output. Level 0 is the normal, level 1 is for use when GDB is run as a subprocess of GNU Emacs, level 3 is the maximum annotation suitable for programs that control GDB, and level 2 has been deprecated. The annotation mechanism has largely been superseded by GDB/MI (*note GDB/MI::). `--args' Change interpretation of command line so that arguments following the executable file are passed as command line arguments to the inferior. This option stops option processing. `-baud BPS' `-b BPS' Set the line speed (baud rate or bits per second) of any serial interface used by GDB for remote debugging. `-l TIMEOUT' Set the timeout (in seconds) of any communication used by GDB for remote debugging. `-tty DEVICE' `-t DEVICE' Run using DEVICE for your program's standard input and output. `-tui' Activate the "Text User Interface" when starting. The Text User Interface manages several text windows on the terminal, showing source, assembly, registers and GDB command outputs (*note GDB Text User Interface: TUI.). Do not use this option if you run GDB from Emacs (*note Using GDB under GNU Emacs: Emacs.). `-interpreter INTERP' Use the interpreter INTERP for interface with the controlling program or device. This option is meant to be set by programs which communicate with GDB using it as a back end. *Note Command Interpreters: Interpreters. `--interpreter=mi' (or `--interpreter=mi2') causes GDB to use the "GDB/MI interface" (*note The GDB/MI Interface: GDB/MI.) included since GDB version 6.0. The previous GDB/MI interface, included in GDB version 5.3 and selected with `--interpreter=mi1', is deprecated. Earlier GDB/MI interfaces are no longer supported. `-write' Open the executable and core files for both reading and writing. This is equivalent to the `set write on' command inside GDB (*note Patching::). `-statistics' This option causes GDB to print statistics about time and memory usage after it completes each command and returns to the prompt. `-version' This option causes GDB to print its version number and no-warranty blurb, and exit.  File: gdb.info, Node: Startup, Prev: Mode Options, Up: Invoking GDB 2.1.3 What GDB Does During Startup ---------------------------------- Here's the description of what GDB does during session startup: 1. Sets up the command interpreter as specified by the command line (*note interpreter: Mode Options.). 2. Reads the system-wide "init file" (if `--with-system-gdbinit' was used when building GDB; *note System-wide configuration and settings: System-wide configuration.) and executes all the commands in that file. 3. Reads the init file (if any) in your home directory(1) and executes all the commands in that file. 4. Executes commands and command files specified by the `-iex' and `-ix' options in their specified order. Usually you should use the `-ex' and `-x' options instead, but this way you can apply settings before GDB init files get executed and before inferior gets loaded. 5. Processes command line options and operands. 6. Reads and executes the commands from init file (if any) in the current working directory as long as `set auto-load local-gdbinit' is set to `on' (*note Init File in the Current Directory::). This is only done if the current directory is different from your home directory. Thus, you can have more than one init file, one generic in your home directory, and another, specific to the program you are debugging, in the directory where you invoke GDB. 7. If the command line specified a program to debug, or a process to attach to, or a core file, GDB loads any auto-loaded scripts provided for the program or for its loaded shared libraries. *Note Auto-loading::. If you wish to disable the auto-loading during startup, you must do something like the following: $ gdb -iex "set auto-load python-scripts off" myprogram Option `-ex' does not work because the auto-loading is then turned off too late. 8. Executes commands and command files specified by the `-ex' and `-x' options in their specified order. *Note Command Files::, for more details about GDB command files. 9. Reads the command history recorded in the "history file". *Note Command History::, for more details about the command history and the files where GDB records it. Init files use the same syntax as "command files" (*note Command Files::) and are processed by GDB in the same way. The init file in your home directory can set options (such as `set complaints') that affect subsequent processing of command line options and operands. Init files are not executed if you use the `-nx' option (*note Choosing Modes: Mode Options.). To display the list of init files loaded by gdb at startup, you can use `gdb --help'. The GDB init files are normally called `.gdbinit'. The DJGPP port of GDB uses the name `gdb.ini', due to the limitations of file names imposed by DOS filesystems. The Windows port of GDB uses the standard name, but if it finds a `gdb.ini' file in your home directory, it warns you about that and suggests to rename the file to the standard name. ---------- Footnotes ---------- (1) On DOS/Windows systems, the home directory is the one pointed to by the `HOME' environment variable.  File: gdb.info, Node: Quitting GDB, Next: Shell Commands, Prev: Invoking GDB, Up: Invocation 2.2 Quitting GDB ================ `quit [EXPRESSION]' `q' To exit GDB, use the `quit' command (abbreviated `q'), or type an end-of-file character (usually `Ctrl-d'). If you do not supply EXPRESSION, GDB will terminate normally; otherwise it will terminate using the result of EXPRESSION as the error code. An interrupt (often `Ctrl-c') does not exit from GDB, but rather terminates the action of any GDB command that is in progress and returns to GDB command level. It is safe to type the interrupt character at any time because GDB does not allow it to take effect until a time when it is safe. If you have been using GDB to control an attached process or device, you can release it with the `detach' command (*note Debugging an Already-running Process: Attach.).  File: gdb.info, Node: Shell Commands, Next: Logging Output, Prev: Quitting GDB, Up: Invocation 2.3 Shell Commands ================== If you need to execute occasional shell commands during your debugging session, there is no need to leave or suspend GDB; you can just use the `shell' command. `shell COMMAND-STRING' `!COMMAND-STRING' Invoke a standard shell to execute COMMAND-STRING. Note that no space is needed between `!' and COMMAND-STRING. If it exists, the environment variable `SHELL' determines which shell to run. Otherwise GDB uses the default shell (`/bin/sh' on Unix systems, `COMMAND.COM' on MS-DOS, etc.). The utility `make' is often needed in development environments. You do not have to use the `shell' command for this purpose in GDB: `make MAKE-ARGS' Execute the `make' program with the specified arguments. This is equivalent to `shell make MAKE-ARGS'.  File: gdb.info, Node: Logging Output, Prev: Shell Commands, Up: Invocation 2.4 Logging Output ================== You may want to save the output of GDB commands to a file. There are several commands to control GDB's logging. `set logging on' Enable logging. `set logging off' Disable logging. `set logging file FILE' Change the name of the current logfile. The default logfile is `gdb.txt'. `set logging overwrite [on|off]' By default, GDB will append to the logfile. Set `overwrite' if you want `set logging on' to overwrite the logfile instead. `set logging redirect [on|off]' By default, GDB output will go to both the terminal and the logfile. Set `redirect' if you want output to go only to the log file. `show logging' Show the current values of the logging settings.  File: gdb.info, Node: Commands, Next: Running, Prev: Invocation, Up: Top 3 GDB Commands ************** You can abbreviate a GDB command to the first few letters of the command name, if that abbreviation is unambiguous; and you can repeat certain GDB commands by typing just . You can also use the key to get GDB to fill out the rest of a word in a command (or to show you the alternatives available, if there is more than one possibility). * Menu: * Command Syntax:: How to give commands to GDB * Completion:: Command completion * Help:: How to ask GDB for help  File: gdb.info, Node: Command Syntax, Next: Completion, Up: Commands 3.1 Command Syntax ================== A GDB command is a single line of input. There is no limit on how long it can be. It starts with a command name, which is followed by arguments whose meaning depends on the command name. For example, the command `step' accepts an argument which is the number of times to step, as in `step 5'. You can also use the `step' command with no arguments. Some commands do not allow any arguments. GDB command names may always be truncated if that abbreviation is unambiguous. Other possible command abbreviations are listed in the documentation for individual commands. In some cases, even ambiguous abbreviations are allowed; for example, `s' is specially defined as equivalent to `step' even though there are other commands whose names start with `s'. You can test abbreviations by using them as arguments to the `help' command. A blank line as input to GDB (typing just ) means to repeat the previous command. Certain commands (for example, `run') will not repeat this way; these are commands whose unintentional repetition might cause trouble and which you are unlikely to want to repeat. User-defined commands can disable this feature; see *note dont-repeat: Define. The `list' and `x' commands, when you repeat them with , construct new arguments rather than repeating exactly as typed. This permits easy scanning of source or memory. GDB can also use in another way: to partition lengthy output, in a way similar to the common utility `more' (*note Screen Size: Screen Size.). Since it is easy to press one too many in this situation, GDB disables command repetition after any command that generates this sort of display. Any text from a `#' to the end of the line is a comment; it does nothing. This is useful mainly in command files (*note Command Files: Command Files.). The `Ctrl-o' binding is useful for repeating a complex sequence of commands. This command accepts the current line, like , and then fetches the next line relative to the current line from the history for editing.  File: gdb.info, Node: Completion, Next: Help, Prev: Command Syntax, Up: Commands 3.2 Command Completion ====================== GDB can fill in the rest of a word in a command for you, if there is only one possibility; it can also show you what the valid possibilities are for the next word in a command, at any time. This works for GDB commands, GDB subcommands, and the names of symbols in your program. Press the key whenever you want GDB to fill out the rest of a word. If there is only one possibility, GDB fills in the word, and waits for you to finish the command (or press to enter it). For example, if you type (gdb) info bre GDB fills in the rest of the word `breakpoints', since that is the only `info' subcommand beginning with `bre': (gdb) info breakpoints You can either press at this point, to run the `info breakpoints' command, or backspace and enter something else, if `breakpoints' does not look like the command you expected. (If you were sure you wanted `info breakpoints' in the first place, you might as well just type immediately after `info bre', to exploit command abbreviations rather than command completion). If there is more than one possibility for the next word when you press , GDB sounds a bell. You can either supply more characters and try again, or just press a second time; GDB displays all the possible completions for that word. For example, you might want to set a breakpoint on a subroutine whose name begins with `make_', but when you type `b make_' GDB just sounds the bell. Typing again displays all the function names in your program that begin with those characters, for example: (gdb) b make_ GDB sounds bell; press again, to see: make_a_section_from_file make_environ make_abs_section make_function_type make_blockvector make_pointer_type make_cleanup make_reference_type make_command make_symbol_completion_list (gdb) b make_ After displaying the available possibilities, GDB copies your partial input (`b make_' in the example) so you can finish the command. If you just want to see the list of alternatives in the first place, you can press `M-?' rather than pressing twice. `M-?' means ` ?'. You can type this either by holding down a key designated as the shift on your keyboard (if there is one) while typing `?', or as followed by `?'. Sometimes the string you need, while logically a "word", may contain parentheses or other characters that GDB normally excludes from its notion of a word. To permit word completion to work in this situation, you may enclose words in `'' (single quote marks) in GDB commands. The most likely situation where you might need this is in typing the name of a C++ function. This is because C++ allows function overloading (multiple definitions of the same function, distinguished by argument type). For example, when you want to set a breakpoint you may need to distinguish whether you mean the version of `name' that takes an `int' parameter, `name(int)', or the version that takes a `float' parameter, `name(float)'. To use the word-completion facilities in this situation, type a single quote `'' at the beginning of the function name. This alerts GDB that it may need to consider more information than usual when you press or `M-?' to request word completion: (gdb) b 'bubble( M-? bubble(double,double) bubble(int,int) (gdb) b 'bubble( In some cases, GDB can tell that completing a name requires using quotes. When this happens, GDB inserts the quote for you (while completing as much as it can) if you do not type the quote in the first place: (gdb) b bub GDB alters your input line to the following, and rings a bell: (gdb) b 'bubble( In general, GDB can tell that a quote is needed (and inserts it) if you have not yet started typing the argument list when you ask for completion on an overloaded symbol. For more information about overloaded functions, see *note C++ Expressions: C Plus Plus Expressions. You can use the command `set overload-resolution off' to disable overload resolution; see *note GDB Features for C++: Debugging C Plus Plus. When completing in an expression which looks up a field in a structure, GDB also tries(1) to limit completions to the field names available in the type of the left-hand-side: (gdb) p gdb_stdout.M-? magic to_fputs to_rewind to_data to_isatty to_write to_delete to_put to_write_async_safe to_flush to_read This is because the `gdb_stdout' is a variable of the type `struct ui_file' that is defined in GDB sources as follows: struct ui_file { int *magic; ui_file_flush_ftype *to_flush; ui_file_write_ftype *to_write; ui_file_write_async_safe_ftype *to_write_async_safe; ui_file_fputs_ftype *to_fputs; ui_file_read_ftype *to_read; ui_file_delete_ftype *to_delete; ui_file_isatty_ftype *to_isatty; ui_file_rewind_ftype *to_rewind; ui_file_put_ftype *to_put; void *to_data; } ---------- Footnotes ---------- (1) The completer can be confused by certain kinds of invalid expressions. Also, it only examines the static type of the expression, not the dynamic type.  File: gdb.info, Node: Help, Prev: Completion, Up: Commands 3.3 Getting Help ================ You can always ask GDB itself for information on its commands, using the command `help'. `help' `h' You can use `help' (abbreviated `h') with no arguments to display a short list of named classes of commands: (gdb) help List of classes of commands: aliases -- Aliases of other commands breakpoints -- Making program stop at certain points data -- Examining data files -- Specifying and examining files internals -- Maintenance commands obscure -- Obscure features running -- Running the program stack -- Examining the stack status -- Status inquiries support -- Support facilities tracepoints -- Tracing of program execution without stopping the program user-defined -- User-defined commands Type "help" followed by a class name for a list of commands in that class. Type "help" followed by command name for full documentation. Command name abbreviations are allowed if unambiguous. (gdb) `help CLASS' Using one of the general help classes as an argument, you can get a list of the individual commands in that class. For example, here is the help display for the class `status': (gdb) help status Status inquiries. List of commands: info -- Generic command for showing things about the program being debugged show -- Generic command for showing things about the debugger Type "help" followed by command name for full documentation. Command name abbreviations are allowed if unambiguous. (gdb) `help COMMAND' With a command name as `help' argument, GDB displays a short paragraph on how to use that command. `apropos ARGS' The `apropos' command searches through all of the GDB commands, and their documentation, for the regular expression specified in ARGS. It prints out all matches found. For example: apropos alias results in: alias -- Define a new command that is an alias of an existing command aliases -- Aliases of other commands d -- Delete some breakpoints or auto-display expressions del -- Delete some breakpoints or auto-display expressions delete -- Delete some breakpoints or auto-display expressions `complete ARGS' The `complete ARGS' command lists all the possible completions for the beginning of a command. Use ARGS to specify the beginning of the command you want completed. For example: complete i results in: if ignore info inspect This is intended for use by GNU Emacs. In addition to `help', you can use the GDB commands `info' and `show' to inquire about the state of your program, or the state of GDB itself. Each command supports many topics of inquiry; this manual introduces each of them in the appropriate context. The listings under `info' and under `show' in the Command, Variable, and Function Index point to all the sub-commands. *Note Command and Variable Index::. `info' This command (abbreviated `i') is for describing the state of your program. For example, you can show the arguments passed to a function with `info args', list the registers currently in use with `info registers', or list the breakpoints you have set with `info breakpoints'. You can get a complete list of the `info' sub-commands with `help info'. `set' You can assign the result of an expression to an environment variable with `set'. For example, you can set the GDB prompt to a $-sign with `set prompt $'. `show' In contrast to `info', `show' is for describing the state of GDB itself. You can change most of the things you can `show', by using the related command `set'; for example, you can control what number system is used for displays with `set radix', or simply inquire which is currently in use with `show radix'. To display all the settable parameters and their current values, you can use `show' with no arguments; you may also use `info set'. Both commands produce the same display. Here are three miscellaneous `show' subcommands, all of which are exceptional in lacking corresponding `set' commands: `show version' Show what version of GDB is running. You should include this information in GDB bug-reports. If multiple versions of GDB are in use at your site, you may need to determine which version of GDB you are running; as GDB evolves, new commands are introduced, and old ones may wither away. Also, many system vendors ship variant versions of GDB, and there are variant versions of GDB in GNU/Linux distributions as well. The version number is the same as the one announced when you start GDB. `show copying' `info copying' Display information about permission for copying GDB. `show warranty' `info warranty' Display the GNU "NO WARRANTY" statement, or a warranty, if your version of GDB comes with one.  File: gdb.info, Node: Running, Next: Stopping, Prev: Commands, Up: Top 4 Running Programs Under GDB **************************** When you run a program under GDB, you must first generate debugging information when you compile it. You may start GDB with its arguments, if any, in an environment of your choice. If you are doing native debugging, you may redirect your program's input and output, debug an already running process, or kill a child process. * Menu: * Compilation:: Compiling for debugging * Starting:: Starting your program * Arguments:: Your program's arguments * Environment:: Your program's environment * Working Directory:: Your program's working directory * Input/Output:: Your program's input and output * Attach:: Debugging an already-running process * Kill Process:: Killing the child process * Inferiors and Programs:: Debugging multiple inferiors and programs * Threads:: Debugging programs with multiple threads * Forks:: Debugging forks * Checkpoint/Restart:: Setting a _bookmark_ to return to later  File: gdb.info, Node: Compilation, Next: Starting, Up: Running 4.1 Compiling for Debugging =========================== In order to debug a program effectively, you need to generate debugging information when you compile it. This debugging information is stored in the object file; it describes the data type of each variable or function and the correspondence between source line numbers and addresses in the executable code. To request debugging information, specify the `-g' option when you run the compiler. Programs that are to be shipped to your customers are compiled with optimizations, using the `-O' compiler option. However, some compilers are unable to handle the `-g' and `-O' options together. Using those compilers, you cannot generate optimized executables containing debugging information. GCC, the GNU C/C++ compiler, supports `-g' with or without `-O', making it possible to debug optimized code. We recommend that you _always_ use `-g' whenever you compile a program. You may think your program is correct, but there is no sense in pushing your luck. For more information, see *note Optimized Code::. Older versions of the GNU C compiler permitted a variant option `-gg' for debugging information. GDB no longer supports this format; if your GNU C compiler has this option, do not use it. GDB knows about preprocessor macros and can show you their expansion (*note Macros::). Most compilers do not include information about preprocessor macros in the debugging information if you specify the `-g' flag alone. Version 3.1 and later of GCC, the GNU C compiler, provides macro information if you are using the DWARF debugging format, and specify the option `-g3'. *Note Options for Debugging Your Program or GCC: (gcc.info)Debugging Options, for more information on GCC options affecting debug information. You will have the best debugging experience if you use the latest version of the DWARF debugging format that your compiler supports. DWARF is currently the most expressive and best supported debugging format in GDB.  File: gdb.info, Node: Starting, Next: Arguments, Prev: Compilation, Up: Running 4.2 Starting your Program ========================= `run' `r' Use the `run' command to start your program under GDB. You must first specify the program name (except on VxWorks) with an argument to GDB (*note Getting In and Out of GDB: Invocation.), or by using the `file' or `exec-file' command (*note Commands to Specify Files: Files.). If you are running your program in an execution environment that supports processes, `run' creates an inferior process and makes that process run your program. In some environments without processes, `run' jumps to the start of your program. Other targets, like `remote', are always running. If you get an error message like this one: The "remote" target does not support "run". Try "help target" or "continue". then use `continue' to run your program. You may need `load' first (*note load::). The execution of a program is affected by certain information it receives from its superior. GDB provides ways to specify this information, which you must do _before_ starting your program. (You can change it after starting your program, but such changes only affect your program the next time you start it.) This information may be divided into four categories: The _arguments._ Specify the arguments to give your program as the arguments of the `run' command. If a shell is available on your target, the shell is used to pass the arguments, so that you may use normal conventions (such as wildcard expansion or variable substitution) in describing the arguments. In Unix systems, you can control which shell is used with the `SHELL' environment variable. *Note Your Program's Arguments: Arguments. The _environment._ Your program normally inherits its environment from GDB, but you can use the GDB commands `set environment' and `unset environment' to change parts of the environment that affect your program. *Note Your Program's Environment: Environment. The _working directory._ Your program inherits its working directory from GDB. You can set the GDB working directory with the `cd' command in GDB. *Note Your Program's Working Directory: Working Directory. The _standard input and output._ Your program normally uses the same device for standard input and standard output as GDB is using. You can redirect input and output in the `run' command line, or you can use the `tty' command to set a different device for your program. *Note Your Program's Input and Output: Input/Output. _Warning:_ While input and output redirection work, you cannot use pipes to pass the output of the program you are debugging to another program; if you attempt this, GDB is likely to wind up debugging the wrong program. When you issue the `run' command, your program begins to execute immediately. *Note Stopping and Continuing: Stopping, for discussion of how to arrange for your program to stop. Once your program has stopped, you may call functions in your program, using the `print' or `call' commands. *Note Examining Data: Data. If the modification time of your symbol file has changed since the last time GDB read its symbols, GDB discards its symbol table, and reads it again. When it does this, GDB tries to retain your current breakpoints. `start' The name of the main procedure can vary from language to language. With C or C++, the main procedure name is always `main', but other languages such as Ada do not require a specific name for their main procedure. The debugger provides a convenient way to start the execution of the program and to stop at the beginning of the main procedure, depending on the language used. The `start' command does the equivalent of setting a temporary breakpoint at the beginning of the main procedure and then invoking the `run' command. Some programs contain an "elaboration" phase where some startup code is executed before the main procedure is called. This depends on the languages used to write your program. In C++, for instance, constructors for static and global objects are executed before `main' is called. It is therefore possible that the debugger stops before reaching the main procedure. However, the temporary breakpoint will remain to halt execution. Specify the arguments to give to your program as arguments to the `start' command. These arguments will be given verbatim to the underlying `run' command. Note that the same arguments will be reused if no argument is provided during subsequent calls to `start' or `run'. It is sometimes necessary to debug the program during elaboration. In these cases, using the `start' command would stop the execution of your program too late, as the program would have already completed the elaboration phase. Under these circumstances, insert breakpoints in your elaboration code before running your program. `set exec-wrapper WRAPPER' `show exec-wrapper' `unset exec-wrapper' When `exec-wrapper' is set, the specified wrapper is used to launch programs for debugging. GDB starts your program with a shell command of the form `exec WRAPPER PROGRAM'. Quoting is added to PROGRAM and its arguments, but not to WRAPPER, so you should add quotes if appropriate for your shell. The wrapper runs until it executes your program, and then GDB takes control. You can use any program that eventually calls `execve' with its arguments as a wrapper. Several standard Unix utilities do this, e.g. `env' and `nohup'. Any Unix shell script ending with `exec "$@"' will also work. For example, you can use `env' to pass an environment variable to the debugged program, without setting the variable in your shell's environment: (gdb) set exec-wrapper env 'LD_PRELOAD=libtest.so' (gdb) run This command is available when debugging locally on most targets, excluding DJGPP, Cygwin, MS Windows, and QNX Neutrino. `set disable-randomization' `set disable-randomization on' This option (enabled by default in GDB) will turn off the native randomization of the virtual address space of the started program. This option is useful for multiple debugging sessions to make the execution better reproducible and memory addresses reusable across debugging sessions. This feature is implemented only on certain targets, including GNU/Linux. On GNU/Linux you can get the same behavior using (gdb) set exec-wrapper setarch `uname -m` -R `set disable-randomization off' Leave the behavior of the started executable unchanged. Some bugs rear their ugly heads only when the program is loaded at certain addresses. If your bug disappears when you run the program under GDB, that might be because GDB by default disables the address randomization on platforms, such as GNU/Linux, which do that for stand-alone programs. Use `set disable-randomization off' to try to reproduce such elusive bugs. On targets where it is available, virtual address space randomization protects the programs against certain kinds of security attacks. In these cases the attacker needs to know the exact location of a concrete executable code. Randomizing its location makes it impossible to inject jumps misusing a code at its expected addresses. Prelinking shared libraries provides a startup performance advantage but it makes addresses in these libraries predictable for privileged processes by having just unprivileged access at the target system. Reading the shared library binary gives enough information for assembling the malicious code misusing it. Still even a prelinked shared library can get loaded at a new random address just requiring the regular relocation process during the startup. Shared libraries not already prelinked are always loaded at a randomly chosen address. Position independent executables (PIE) contain position independent code similar to the shared libraries and therefore such executables get loaded at a randomly chosen address upon startup. PIE executables always load even already prelinked shared libraries at a random address. You can build such executable using `gcc -fPIE -pie'. Heap (malloc storage), stack and custom mmap areas are always placed randomly (as long as the randomization is enabled). `show disable-randomization' Show the current setting of the explicit disable of the native randomization of the virtual address space of the started program.  File: gdb.info, Node: Arguments, Next: Environment, Prev: Starting, Up: Running 4.3 Your Program's Arguments ============================ The arguments to your program can be specified by the arguments of the `run' command. They are passed to a shell, which expands wildcard characters and performs redirection of I/O, and thence to your program. Your `SHELL' environment variable (if it exists) specifies what shell GDB uses. If you do not define `SHELL', GDB uses the default shell (`/bin/sh' on Unix). On non-Unix systems, the program is usually invoked directly by GDB, which emulates I/O redirection via the appropriate system calls, and the wildcard characters are expanded by the startup code of the program, not by the shell. `run' with no arguments uses the same arguments used by the previous `run', or those set by the `set args' command. `set args' Specify the arguments to be used the next time your program is run. If `set args' has no arguments, `run' executes your program with no arguments. Once you have run your program with arguments, using `set args' before the next `run' is the only way to run it again without arguments. `show args' Show the arguments to give your program when it is started.  File: gdb.info, Node: Environment, Next: Working Directory, Prev: Arguments, Up: Running 4.4 Your Program's Environment ============================== The "environment" consists of a set of environment variables and their values. Environment variables conventionally record such things as your user name, your home directory, your terminal type, and your search path for programs to run. Usually you set up environment variables with the shell and they are inherited by all the other programs you run. When debugging, it can be useful to try running your program with a modified environment without having to start GDB over again. `path DIRECTORY' Add DIRECTORY to the front of the `PATH' environment variable (the search path for executables) that will be passed to your program. The value of `PATH' used by GDB does not change. You may specify several directory names, separated by whitespace or by a system-dependent separator character (`:' on Unix, `;' on MS-DOS and MS-Windows). If DIRECTORY is already in the path, it is moved to the front, so it is searched sooner. You can use the string `$cwd' to refer to whatever is the current working directory at the time GDB searches the path. If you use `.' instead, it refers to the directory where you executed the `path' command. GDB replaces `.' in the DIRECTORY argument (with the current path) before adding DIRECTORY to the search path. `show paths' Display the list of search paths for executables (the `PATH' environment variable). `show environment [VARNAME]' Print the value of environment variable VARNAME to be given to your program when it starts. If you do not supply VARNAME, print the names and values of all environment variables to be given to your program. You can abbreviate `environment' as `env'. `set environment VARNAME [=VALUE]' Set environment variable VARNAME to VALUE. The value changes for your program only, not for GDB itself. VALUE may be any string; the values of environment variables are just strings, and any interpretation is supplied by your program itself. The VALUE parameter is optional; if it is eliminated, the variable is set to a null value. For example, this command: set env USER = foo tells the debugged program, when subsequently run, that its user is named `foo'. (The spaces around `=' are used for clarity here; they are not actually required.) `unset environment VARNAME' Remove variable VARNAME from the environment to be passed to your program. This is different from `set env VARNAME ='; `unset environment' removes the variable from the environment, rather than assigning it an empty value. _Warning:_ On Unix systems, GDB runs your program using the shell indicated by your `SHELL' environment variable if it exists (or `/bin/sh' if not). If your `SHELL' variable names a shell that runs an initialization file--such as `.cshrc' for C-shell, or `.bashrc' for BASH--any variables you set in that file affect your program. You may wish to move setting of environment variables to files that are only run when you sign on, such as `.login' or `.profile'.  File: gdb.info, Node: Working Directory, Next: Input/Output, Prev: Environment, Up: Running 4.5 Your Program's Working Directory ==================================== Each time you start your program with `run', it inherits its working directory from the current working directory of GDB. The GDB working directory is initially whatever it inherited from its parent process (typically the shell), but you can specify a new working directory in GDB with the `cd' command. The GDB working directory also serves as a default for the commands that specify files for GDB to operate on. *Note Commands to Specify Files: Files. `cd [DIRECTORY]' Set the GDB working directory to DIRECTORY. If not given, DIRECTORY uses `'~''. `pwd' Print the GDB working directory. It is generally impossible to find the current working directory of the process being debugged (since a program can change its directory during its run). If you work on a system where GDB is configured with the `/proc' support, you can use the `info proc' command (*note SVR4 Process Information::) to find out the current working directory of the debuggee.  File: gdb.info, Node: Input/Output, Next: Attach, Prev: Working Directory, Up: Running 4.6 Your Program's Input and Output =================================== By default, the program you run under GDB does input and output to the same terminal that GDB uses. GDB switches the terminal to its own terminal modes to interact with you, but it records the terminal modes your program was using and switches back to them when you continue running your program. `info terminal' Displays information recorded by GDB about the terminal modes your program is using. You can redirect your program's input and/or output using shell redirection with the `run' command. For example, run > outfile starts your program, diverting its output to the file `outfile'. Another way to specify where your program should do input and output is with the `tty' command. This command accepts a file name as argument, and causes this file to be the default for future `run' commands. It also resets the controlling terminal for the child process, for future `run' commands. For example, tty /dev/ttyb directs that processes started with subsequent `run' commands default to do input and output on the terminal `/dev/ttyb' and have that as their controlling terminal. An explicit redirection in `run' overrides the `tty' command's effect on the input/output device, but not its effect on the controlling terminal. When you use the `tty' command or redirect input in the `run' command, only the input _for your program_ is affected. The input for GDB still comes from your terminal. `tty' is an alias for `set inferior-tty'. You can use the `show inferior-tty' command to tell GDB to display the name of the terminal that will be used for future runs of your program. `set inferior-tty /dev/ttyb' Set the tty for the program being debugged to /dev/ttyb. `show inferior-tty' Show the current tty for the program being debugged.  File: gdb.info, Node: Attach, Next: Kill Process, Prev: Input/Output, Up: Running 4.7 Debugging an Already-running Process ======================================== `attach PROCESS-ID' This command attaches to a running process--one that was started outside GDB. (`info files' shows your active targets.) The command takes as argument a process ID. The usual way to find out the PROCESS-ID of a Unix process is with the `ps' utility, or with the `jobs -l' shell command. `attach' does not repeat if you press a second time after executing the command. To use `attach', your program must be running in an environment which supports processes; for example, `attach' does not work for programs on bare-board targets that lack an operating system. You must also have permission to send the process a signal. When you use `attach', the debugger finds the program running in the process first by looking in the current working directory, then (if the program is not found) by using the source file search path (*note Specifying Source Directories: Source Path.). You can also use the `file' command to load the program. *Note Commands to Specify Files: Files. The first thing GDB does after arranging to debug the specified process is to stop it. You can examine and modify an attached process with all the GDB commands that are ordinarily available when you start processes with `run'. You can insert breakpoints; you can step and continue; you can modify storage. If you would rather the process continue running, you may use the `continue' command after attaching GDB to the process. `detach' When you have finished debugging the attached process, you can use the `detach' command to release it from GDB control. Detaching the process continues its execution. After the `detach' command, that process and GDB become completely independent once more, and you are ready to `attach' another process or start one with `run'. `detach' does not repeat if you press again after executing the command. If you exit GDB while you have an attached process, you detach that process. If you use the `run' command, you kill that process. By default, GDB asks for confirmation if you try to do either of these things; you can control whether or not you need to confirm by using the `set confirm' command (*note Optional Warnings and Messages: Messages/Warnings.).  File: gdb.info, Node: Kill Process, Next: Inferiors and Programs, Prev: Attach, Up: Running 4.8 Killing the Child Process ============================= `kill' Kill the child process in which your program is running under GDB. This command is useful if you wish to debug a core dump instead of a running process. GDB ignores any core dump file while your program is running. On some operating systems, a program cannot be executed outside GDB while you have breakpoints set on it inside GDB. You can use the `kill' command in this situation to permit running your program outside the debugger. The `kill' command is also useful if you wish to recompile and relink your program, since on many systems it is impossible to modify an executable file while it is running in a process. In this case, when you next type `run', GDB notices that the file has changed, and reads the symbol table again (while trying to preserve your current breakpoint settings).  File: gdb.info, Node: Inferiors and Programs, Next: Threads, Prev: Kill Process, Up: Running 4.9 Debugging Multiple Inferiors and Programs ============================================= GDB lets you run and debug multiple programs in a single session. In addition, GDB on some systems may let you run several programs simultaneously (otherwise you have to exit from one before starting another). In the most general case, you can have multiple threads of execution in each of multiple processes, launched from multiple executables. GDB represents the state of each program execution with an object called an "inferior". An inferior typically corresponds to a process, but is more general and applies also to targets that do not have processes. Inferiors may be created before a process runs, and may be retained after a process exits. Inferiors have unique identifiers that are different from process ids. Usually each inferior will also have its own distinct address space, although some embedded targets may have several inferiors running in different parts of a single address space. Each inferior may in turn have multiple threads running in it. To find out what inferiors exist at any moment, use `info inferiors': `info inferiors' Print a list of all inferiors currently being managed by GDB. GDB displays for each inferior (in this order): 1. the inferior number assigned by GDB 2. the target system's inferior identifier 3. the name of the executable the inferior is running. An asterisk `*' preceding the GDB inferior number indicates the current inferior. For example, (gdb) info inferiors Num Description Executable 2 process 2307 hello * 1 process 3401 goodbye To switch focus between inferiors, use the `inferior' command: `inferior INFNO' Make inferior number INFNO the current inferior. The argument INFNO is the inferior number assigned by GDB, as shown in the first field of the `info inferiors' display. You can get multiple executables into a debugging session via the `add-inferior' and `clone-inferior' commands. On some systems GDB can add inferiors to the debug session automatically by following calls to `fork' and `exec'. To remove inferiors from the debugging session use the `remove-inferiors' command. `add-inferior [ -copies N ] [ -exec EXECUTABLE ]' Adds N inferiors to be run using EXECUTABLE as the executable. N defaults to 1. If no executable is specified, the inferiors begins empty, with no program. You can still assign or change the program assigned to the inferior at any time by using the `file' command with the executable name as its argument. `clone-inferior [ -copies N ] [ INFNO ]' Adds N inferiors ready to execute the same program as inferior INFNO. N defaults to 1. INFNO defaults to the number of the current inferior. This is a convenient command when you want to run another instance of the inferior you are debugging. (gdb) info inferiors Num Description Executable * 1 process 29964 helloworld (gdb) clone-inferior Added inferior 2. 1 inferiors added. (gdb) info inferiors Num Description Executable 2 helloworld * 1 process 29964 helloworld You can now simply switch focus to inferior 2 and run it. `remove-inferiors INFNO...' Removes the inferior or inferiors INFNO.... It is not possible to remove an inferior that is running with this command. For those, use the `kill' or `detach' command first. To quit debugging one of the running inferiors that is not the current inferior, you can either detach from it by using the `detach inferior' command (allowing it to run independently), or kill it using the `kill inferiors' command: `detach inferior INFNO...' Detach from the inferior or inferiors identified by GDB inferior number(s) INFNO.... Note that the inferior's entry still stays on the list of inferiors shown by `info inferiors', but its Description will show `'. `kill inferiors INFNO...' Kill the inferior or inferiors identified by GDB inferior number(s) INFNO.... Note that the inferior's entry still stays on the list of inferiors shown by `info inferiors', but its Description will show `'. After the successful completion of a command such as `detach', `detach inferiors', `kill' or `kill inferiors', or after a normal process exit, the inferior is still valid and listed with `info inferiors', ready to be restarted. To be notified when inferiors are started or exit under GDB's control use `set print inferior-events': `set print inferior-events' `set print inferior-events on' `set print inferior-events off' The `set print inferior-events' command allows you to enable or disable printing of messages when GDB notices that new inferiors have started or that inferiors have exited or have been detached. By default, these messages will not be printed. `show print inferior-events' Show whether messages will be printed when GDB detects that inferiors have started, exited or have been detached. Many commands will work the same with multiple programs as with a single program: e.g., `print myglobal' will simply display the value of `myglobal' in the current inferior. Occasionaly, when debugging GDB itself, it may be useful to get more info about the relationship of inferiors, programs, address spaces in a debug session. You can do that with the `maint info program-spaces' command. `maint info program-spaces' Print a list of all program spaces currently being managed by GDB. GDB displays for each program space (in this order): 1. the program space number assigned by GDB 2. the name of the executable loaded into the program space, with e.g., the `file' command. An asterisk `*' preceding the GDB program space number indicates the current program space. In addition, below each program space line, GDB prints extra information that isn't suitable to display in tabular form. For example, the list of inferiors bound to the program space. (gdb) maint info program-spaces Id Executable 2 goodbye Bound inferiors: ID 1 (process 21561) * 1 hello Here we can see that no inferior is running the program `hello', while `process 21561' is running the program `goodbye'. On some targets, it is possible that multiple inferiors are bound to the same program space. The most common example is that of debugging both the parent and child processes of a `vfork' call. For example, (gdb) maint info program-spaces Id Executable * 1 vfork-test Bound inferiors: ID 2 (process 18050), ID 1 (process 18045) Here, both inferior 2 and inferior 1 are running in the same program space as a result of inferior 1 having executed a `vfork' call.  File: gdb.info, Node: Threads, Next: Forks, Prev: Inferiors and Programs, Up: Running 4.10 Debugging Programs with Multiple Threads ============================================= In some operating systems, such as HP-UX and Solaris, a single program may have more than one "thread" of execution. The precise semantics of threads differ from one operating system to another, but in general the threads of a single program are akin to multiple processes--except that they share one address space (that is, they can all examine and modify the same variables). On the other hand, each thread has its own registers and execution stack, and perhaps private memory. GDB provides these facilities for debugging multi-thread programs: * automatic notification of new threads * `thread THREADNO', a command to switch among threads * `info threads', a command to inquire about existing threads * `thread apply [THREADNO] [ALL] ARGS', a command to apply a command to a list of threads * thread-specific breakpoints * `set print thread-events', which controls printing of messages on thread start and exit. * `set libthread-db-search-path PATH', which lets the user specify which `libthread_db' to use if the default choice isn't compatible with the program. _Warning:_ These facilities are not yet available on every GDB configuration where the operating system supports threads. If your GDB does not support threads, these commands have no effect. For example, a system without thread support shows no output from `info threads', and always rejects the `thread' command, like this: (gdb) info threads (gdb) thread 1 Thread ID 1 not known. Use the "info threads" command to see the IDs of currently known threads. The GDB thread debugging facility allows you to observe all threads while your program runs--but whenever GDB takes control, one thread in particular is always the focus of debugging. This thread is called the "current thread". Debugging commands show program information from the perspective of the current thread. Whenever GDB detects a new thread in your program, it displays the target system's identification for the thread with a message in the form `[New SYSTAG]'. SYSTAG is a thread identifier whose form varies depending on the particular system. For example, on GNU/Linux, you might see [New Thread 0x41e02940 (LWP 25582)] when GDB notices a new thread. In contrast, on an SGI system, the SYSTAG is simply something like `process 368', with no further qualifier. For debugging purposes, GDB associates its own thread number--always a single integer--with each thread in your program. `info threads [ID...]' Display a summary of all threads currently in your program. Optional argument ID... is one or more thread ids separated by spaces, and means to print information only about the specified thread or threads. GDB displays for each thread (in this order): 1. the thread number assigned by GDB 2. the target system's thread identifier (SYSTAG) 3. the thread's name, if one is known. A thread can either be named by the user (see `thread name', below), or, in some cases, by the program itself. 4. the current stack frame summary for that thread An asterisk `*' to the left of the GDB thread number indicates the current thread. For example, (gdb) info threads Id Target Id Frame 3 process 35 thread 27 0x34e5 in sigpause () 2 process 35 thread 23 0x34e5 in sigpause () * 1 process 35 thread 13 main (argc=1, argv=0x7ffffff8) at threadtest.c:68 On Solaris, you can display more information about user threads with a Solaris-specific command: `maint info sol-threads' Display info on Solaris user threads. `thread THREADNO' Make thread number THREADNO the current thread. The command argument THREADNO is the internal GDB thread number, as shown in the first field of the `info threads' display. GDB responds by displaying the system identifier of the thread you selected, and its current stack frame summary: (gdb) thread 2 [Switching to thread 2 (Thread 0xb7fdab70 (LWP 12747))] #0 some_function (ignore=0x0) at example.c:8 8 printf ("hello\n"); As with the `[New ...]' message, the form of the text after `Switching to' depends on your system's conventions for identifying threads. The debugger convenience variable `$_thread' contains the number of the current thread. You may find this useful in writing breakpoint conditional expressions, command scripts, and so forth. See *Note Convenience Variables: Convenience Vars, for general information on convenience variables. `thread apply [THREADNO | all] COMMAND' The `thread apply' command allows you to apply the named COMMAND to one or more threads. Specify the numbers of the threads that you want affected with the command argument THREADNO. It can be a single thread number, one of the numbers shown in the first field of the `info threads' display; or it could be a range of thread numbers, as in `2-4'. To apply a command to all threads, type `thread apply all COMMAND'. `thread name [NAME]' This command assigns a name to the current thread. If no argument is given, any existing user-specified name is removed. The thread name appears in the `info threads' display. On some systems, such as GNU/Linux, GDB is able to determine the name of the thread as given by the OS. On these systems, a name specified with `thread name' will override the system-give name, and removing the user-specified name will cause GDB to once again display the system-specified name. `thread find [REGEXP]' Search for and display thread ids whose name or SYSTAG matches the supplied regular expression. As well as being the complement to the `thread name' command, this command also allows you to identify a thread by its target SYSTAG. For instance, on GNU/Linux, the target SYSTAG is the LWP id. (GDB) thread find 26688 Thread 4 has target id 'Thread 0x41e02940 (LWP 26688)' (GDB) info thread 4 Id Target Id Frame 4 Thread 0x41e02940 (LWP 26688) 0x00000031ca6cd372 in select () `set print thread-events' `set print thread-events on' `set print thread-events off' The `set print thread-events' command allows you to enable or disable printing of messages when GDB notices that new threads have started or that threads have exited. By default, these messages will be printed if detection of these events is supported by the target. Note that these messages cannot be disabled on all targets. `show print thread-events' Show whether messages will be printed when GDB detects that threads have started and exited. *Note Stopping and Starting Multi-thread Programs: Thread Stops, for more information about how GDB behaves when you stop and start programs with multiple threads. *Note Setting Watchpoints: Set Watchpoints, for information about watchpoints in programs with multiple threads. `set libthread-db-search-path [PATH]' If this variable is set, PATH is a colon-separated list of directories GDB will use to search for `libthread_db'. If you omit PATH, `libthread-db-search-path' will be reset to its default value (`$sdir:$pdir' on GNU/Linux and Solaris systems). Internally, the default value comes from the `LIBTHREAD_DB_SEARCH_PATH' macro. On GNU/Linux and Solaris systems, GDB uses a "helper" `libthread_db' library to obtain information about threads in the inferior process. GDB will use `libthread-db-search-path' to find `libthread_db'. GDB also consults first if inferior specific thread debugging library loading is enabled by `set auto-load libthread-db' (*note libthread_db.so.1 file::). A special entry `$sdir' for `libthread-db-search-path' refers to the default system directories that are normally searched for loading shared libraries. The `$sdir' entry is the only kind not needing to be enabled by `set auto-load libthread-db' (*note libthread_db.so.1 file::). A special entry `$pdir' for `libthread-db-search-path' refers to the directory from which `libpthread' was loaded in the inferior process. For any `libthread_db' library GDB finds in above directories, GDB attempts to initialize it with the current inferior process. If this initialization fails (which could happen because of a version mismatch between `libthread_db' and `libpthread'), GDB will unload `libthread_db', and continue with the next directory. If none of `libthread_db' libraries initialize successfully, GDB will issue a warning and thread debugging will be disabled. Setting `libthread-db-search-path' is currently implemented only on some platforms. `show libthread-db-search-path' Display current libthread_db search path. `set debug libthread-db' `show debug libthread-db' Turns on or off display of `libthread_db'-related events. Use `1' to enable, `0' to disable.  File: gdb.info, Node: Forks, Next: Checkpoint/Restart, Prev: Threads, Up: Running 4.11 Debugging Forks ==================== On most systems, GDB has no special support for debugging programs which create additional processes using the `fork' function. When a program forks, GDB will continue to debug the parent process and the child process will run unimpeded. If you have set a breakpoint in any code which the child then executes, the child will get a `SIGTRAP' signal which (unless it catches the signal) will cause it to terminate. However, if you want to debug the child process there is a workaround which isn't too painful. Put a call to `sleep' in the code which the child process executes after the fork. It may be useful to sleep only if a certain environment variable is set, or a certain file exists, so that the delay need not occur when you don't want to run GDB on the child. While the child is sleeping, use the `ps' program to get its process ID. Then tell GDB (a new invocation of GDB if you are also debugging the parent process) to attach to the child process (*note Attach::). From that point on you can debug the child process just like any other process which you attached to. On some systems, GDB provides support for debugging programs that create additional processes using the `fork' or `vfork' functions. Currently, the only platforms with this feature are HP-UX (11.x and later only?) and GNU/Linux (kernel version 2.5.60 and later). By default, when a program forks, GDB will continue to debug the parent process and the child process will run unimpeded. If you want to follow the child process instead of the parent process, use the command `set follow-fork-mode'. `set follow-fork-mode MODE' Set the debugger response to a program call of `fork' or `vfork'. A call to `fork' or `vfork' creates a new process. The MODE argument can be: `parent' The original process is debugged after a fork. The child process runs unimpeded. This is the default. `child' The new process is debugged after a fork. The parent process runs unimpeded. `show follow-fork-mode' Display the current debugger response to a `fork' or `vfork' call. On Linux, if you want to debug both the parent and child processes, use the command `set detach-on-fork'. `set detach-on-fork MODE' Tells gdb whether to detach one of the processes after a fork, or retain debugger control over them both. `on' The child process (or parent process, depending on the value of `follow-fork-mode') will be detached and allowed to run independently. This is the default. `off' Both processes will be held under the control of GDB. One process (child or parent, depending on the value of `follow-fork-mode') is debugged as usual, while the other is held suspended. `show detach-on-fork' Show whether detach-on-fork mode is on/off. If you choose to set `detach-on-fork' mode off, then GDB will retain control of all forked processes (including nested forks). You can list the forked processes under the control of GDB by using the `info inferiors' command, and switch from one fork to another by using the `inferior' command (*note Debugging Multiple Inferiors and Programs: Inferiors and Programs.). To quit debugging one of the forked processes, you can either detach from it by using the `detach inferiors' command (allowing it to run independently), or kill it using the `kill inferiors' command. *Note Debugging Multiple Inferiors and Programs: Inferiors and Programs. If you ask to debug a child process and a `vfork' is followed by an `exec', GDB executes the new target up to the first breakpoint in the new target. If you have a breakpoint set on `main' in your original program, the breakpoint will also be set on the child process's `main'. On some systems, when a child process is spawned by `vfork', you cannot debug the child or parent until an `exec' call completes. If you issue a `run' command to GDB after an `exec' call executes, the new target restarts. To restart the parent process, use the `file' command with the parent executable name as its argument. By default, after an `exec' call executes, GDB discards the symbols of the previous executable image. You can change this behaviour with the `set follow-exec-mode' command. `set follow-exec-mode MODE' Set debugger response to a program call of `exec'. An `exec' call replaces the program image of a process. `follow-exec-mode' can be: `new' GDB creates a new inferior and rebinds the process to this new inferior. The program the process was running before the `exec' call can be restarted afterwards by restarting the original inferior. For example: (gdb) info inferiors (gdb) info inferior Id Description Executable * 1 prog1 (gdb) run process 12020 is executing new program: prog2 Program exited normally. (gdb) info inferiors Id Description Executable * 2 prog2 1 prog1 `same' GDB keeps the process bound to the same inferior. The new executable image replaces the previous executable loaded in the inferior. Restarting the inferior after the `exec' call, with e.g., the `run' command, restarts the executable the process was running after the `exec' call. This is the default mode. For example: (gdb) info inferiors Id Description Executable * 1 prog1 (gdb) run process 12020 is executing new program: prog2 Program exited normally. (gdb) info inferiors Id Description Executable * 1 prog2 You can use the `catch' command to make GDB stop whenever a `fork', `vfork', or `exec' call is made. *Note Setting Catchpoints: Set Catchpoints.  File: gdb.info, Node: Checkpoint/Restart, Prev: Forks, Up: Running 4.12 Setting a _Bookmark_ to Return to Later ============================================ On certain operating systems(1), GDB is able to save a "snapshot" of a program's state, called a "checkpoint", and come back to it later. Returning to a checkpoint effectively undoes everything that has happened in the program since the `checkpoint' was saved. This includes changes in memory, registers, and even (within some limits) system state. Effectively, it is like going back in time to the moment when the checkpoint was saved. Thus, if you're stepping thru a program and you think you're getting close to the point where things go wrong, you can save a checkpoint. Then, if you accidentally go too far and miss the critical statement, instead of having to restart your program from the beginning, you can just go back to the checkpoint and start again from there. This can be especially useful if it takes a lot of time or steps to reach the point where you think the bug occurs. To use the `checkpoint'/`restart' method of debugging: `checkpoint' Save a snapshot of the debugged program's current execution state. The `checkpoint' command takes no arguments, but each checkpoint is assigned a small integer id, similar to a breakpoint id. `info checkpoints' List the checkpoints that have been saved in the current debugging session. For each checkpoint, the following information will be listed: `Checkpoint ID' `Process ID' `Code Address' `Source line, or label' `restart CHECKPOINT-ID' Restore the program state that was saved as checkpoint number CHECKPOINT-ID. All program variables, registers, stack frames etc. will be returned to the values that they had when the checkpoint was saved. In essence, gdb will "wind back the clock" to the point in time when the checkpoint was saved. Note that breakpoints, GDB variables, command history etc. are not affected by restoring a checkpoint. In general, a checkpoint only restores things that reside in the program being debugged, not in the debugger. `delete checkpoint CHECKPOINT-ID' Delete the previously-saved checkpoint identified by CHECKPOINT-ID. Returning to a previously saved checkpoint will restore the user state of the program being debugged, plus a significant subset of the system (OS) state, including file pointers. It won't "un-write" data from a file, but it will rewind the file pointer to the previous location, so that the previously written data can be overwritten. For files opened in read mode, the pointer will also be restored so that the previously read data can be read again. Of course, characters that have been sent to a printer (or other external device) cannot be "snatched back", and characters received from eg. a serial device can be removed from internal program buffers, but they cannot be "pushed back" into the serial pipeline, ready to be received again. Similarly, the actual contents of files that have been changed cannot be restored (at this time). However, within those constraints, you actually can "rewind" your program to a previously saved point in time, and begin debugging it again -- and you can change the course of events so as to debug a different execution path this time. Finally, there is one bit of internal program state that will be different when you return to a checkpoint -- the program's process id. Each checkpoint will have a unique process id (or PID), and each will be different from the program's original PID. If your program has saved a local copy of its process id, this could potentially pose a problem. 4.12.1 A Non-obvious Benefit of Using Checkpoints ------------------------------------------------- On some systems such as GNU/Linux, address space randomization is performed on new processes for security reasons. This makes it difficult or impossible to set a breakpoint, or watchpoint, on an absolute address if you have to restart the program, since the absolute location of a symbol will change from one execution to the next. A checkpoint, however, is an _identical_ copy of a process. Therefore if you create a checkpoint at (eg.) the start of main, and simply return to that checkpoint instead of restarting the process, you can avoid the effects of address randomization and your symbols will all stay in the same place. ---------- Footnotes ---------- (1) Currently, only GNU/Linux.  File: gdb.info, Node: Stopping, Next: Reverse Execution, Prev: Running, Up: Top 5 Stopping and Continuing ************************* The principal purposes of using a debugger are so that you can stop your program before it terminates; or so that, if your program runs into trouble, you can investigate and find out why. Inside GDB, your program may stop for any of several reasons, such as a signal, a breakpoint, or reaching a new line after a GDB command such as `step'. You may then examine and change variables, set new breakpoints or remove old ones, and then continue execution. Usually, the messages shown by GDB provide ample explanation of the status of your program--but you can also explicitly request this information at any time. `info program' Display information about the status of your program: whether it is running or not, what process it is, and why it stopped. * Menu: * Breakpoints:: Breakpoints, watchpoints, and catchpoints * Continuing and Stepping:: Resuming execution * Skipping Over Functions and Files:: Skipping over functions and files * Signals:: Signals * Thread Stops:: Stopping and starting multi-thread programs  File: gdb.info, Node: Breakpoints, Next: Continuing and Stepping, Up: Stopping 5.1 Breakpoints, Watchpoints, and Catchpoints ============================================= A "breakpoint" makes your program stop whenever a certain point in the program is reached. For each breakpoint, you can add conditions to control in finer detail whether your program stops. You can set breakpoints with the `break' command and its variants (*note Setting Breakpoints: Set Breaks.), to specify the place where your program should stop by line number, function name or exact address in the program. On some systems, you can set breakpoints in shared libraries before the executable is run. There is a minor limitation on HP-UX systems: you must wait until the executable is run in order to set breakpoints in shared library routines that are not called directly by the program (for example, routines that are arguments in a `pthread_create' call). A "watchpoint" is a special breakpoint that stops your program when the value of an expression changes. The expression may be a value of a variable, or it could involve values of one or more variables combined by operators, such as `a + b'. This is sometimes called "data breakpoints". You must use a different command to set watchpoints (*note Setting Watchpoints: Set Watchpoints.), but aside from that, you can manage a watchpoint like any other breakpoint: you enable, disable, and delete both breakpoints and watchpoints using the same commands. You can arrange to have values from your program displayed automatically whenever GDB stops at a breakpoint. *Note Automatic Display: Auto Display. A "catchpoint" is another special breakpoint that stops your program when a certain kind of event occurs, such as the throwing of a C++ exception or the loading of a library. As with watchpoints, you use a different command to set a catchpoint (*note Setting Catchpoints: Set Catchpoints.), but aside from that, you can manage a catchpoint like any other breakpoint. (To stop when your program receives a signal, use the `handle' command; see *note Signals: Signals.) GDB assigns a number to each breakpoint, watchpoint, or catchpoint when you create it; these numbers are successive integers starting with one. In many of the commands for controlling various features of breakpoints you use the breakpoint number to say which breakpoint you want to change. Each breakpoint may be "enabled" or "disabled"; if disabled, it has no effect on your program until you enable it again. Some GDB commands accept a range of breakpoints on which to operate. A breakpoint range is either a single breakpoint number, like `5', or two such numbers, in increasing order, separated by a hyphen, like `5-7'. When a breakpoint range is given to a command, all breakpoints in that range are operated on. * Menu: * Set Breaks:: Setting breakpoints * Set Watchpoints:: Setting watchpoints * Set Catchpoints:: Setting catchpoints * Delete Breaks:: Deleting breakpoints * Disabling:: Disabling breakpoints * Conditions:: Break conditions * Break Commands:: Breakpoint command lists * Dynamic Printf:: Dynamic printf * Save Breakpoints:: How to save breakpoints in a file * Static Probe Points:: Listing static probe points * Error in Breakpoints:: ``Cannot insert breakpoints'' * Breakpoint-related Warnings:: ``Breakpoint address adjusted...''  File: gdb.info, Node: Set Breaks, Next: Set Watchpoints, Up: Breakpoints 5.1.1 Setting Breakpoints ------------------------- Breakpoints are set with the `break' command (abbreviated `b'). The debugger convenience variable `$bpnum' records the number of the breakpoint you've set most recently; see *note Convenience Variables: Convenience Vars, for a discussion of what you can do with convenience variables. `break LOCATION' Set a breakpoint at the given LOCATION, which can specify a function name, a line number, or an address of an instruction. (*Note Specify Location::, for a list of all the possible ways to specify a LOCATION.) The breakpoint will stop your program just before it executes any of the code in the specified LOCATION. When using source languages that permit overloading of symbols, such as C++, a function name may refer to more than one possible place to break. *Note Ambiguous Expressions: Ambiguous Expressions, for a discussion of that situation. It is also possible to insert a breakpoint that will stop the program only if a specific thread (*note Thread-Specific Breakpoints::) or a specific task (*note Ada Tasks::) hits that breakpoint. `break' When called without any arguments, `break' sets a breakpoint at the next instruction to be executed in the selected stack frame (*note Examining the Stack: Stack.). In any selected frame but the innermost, this makes your program stop as soon as control returns to that frame. This is similar to the effect of a `finish' command in the frame inside the selected frame--except that `finish' does not leave an active breakpoint. If you use `break' without an argument in the innermost frame, GDB stops the next time it reaches the current location; this may be useful inside loops. GDB normally ignores breakpoints when it resumes execution, until at least one instruction has been executed. If it did not do this, you would be unable to proceed past a breakpoint without first disabling the breakpoint. This rule applies whether or not the breakpoint already existed when your program stopped. `break ... if COND' Set a breakpoint with condition COND; evaluate the expression COND each time the breakpoint is reached, and stop only if the value is nonzero--that is, if COND evaluates as true. `...' stands for one of the possible arguments described above (or no argument) specifying where to break. *Note Break Conditions: Conditions, for more information on breakpoint conditions. `tbreak ARGS' Set a breakpoint enabled only for one stop. ARGS are the same as for the `break' command, and the breakpoint is set in the same way, but the breakpoint is automatically deleted after the first time your program stops there. *Note Disabling Breakpoints: Disabling. `hbreak ARGS' Set a hardware-assisted breakpoint. ARGS are the same as for the `break' command and the breakpoint is set in the same way, but the breakpoint requires hardware support and some target hardware may not have this support. The main purpose of this is EPROM/ROM code debugging, so you can set a breakpoint at an instruction without changing the instruction. This can be used with the new trap-generation provided by SPARClite DSU and most x86-based targets. These targets will generate traps when a program accesses some data or instruction address that is assigned to the debug registers. However the hardware breakpoint registers can take a limited number of breakpoints. For example, on the DSU, only two data breakpoints can be set at a time, and GDB will reject this command if more than two are used. Delete or disable unused hardware breakpoints before setting new ones (*note Disabling Breakpoints: Disabling.). *Note Break Conditions: Conditions. For remote targets, you can restrict the number of hardware breakpoints GDB will use, see *note set remote hardware-breakpoint-limit::. `thbreak ARGS' Set a hardware-assisted breakpoint enabled only for one stop. ARGS are the same as for the `hbreak' command and the breakpoint is set in the same way. However, like the `tbreak' command, the breakpoint is automatically deleted after the first time your program stops there. Also, like the `hbreak' command, the breakpoint requires hardware support and some target hardware may not have this support. *Note Disabling Breakpoints: Disabling. See also *note Break Conditions: Conditions. `rbreak REGEX' Set breakpoints on all functions matching the regular expression REGEX. This command sets an unconditional breakpoint on all matches, printing a list of all breakpoints it set. Once these breakpoints are set, they are treated just like the breakpoints set with the `break' command. You can delete them, disable them, or make them conditional the same way as any other breakpoint. The syntax of the regular expression is the standard one used with tools like `grep'. Note that this is different from the syntax used by shells, so for instance `foo*' matches all functions that include an `fo' followed by zero or more `o's. There is an implicit `.*' leading and trailing the regular expression you supply, so to match only functions that begin with `foo', use `^foo'. When debugging C++ programs, `rbreak' is useful for setting breakpoints on overloaded functions that are not members of any special classes. The `rbreak' command can be used to set breakpoints in *all* the functions in a program, like this: (gdb) rbreak . `rbreak FILE:REGEX' If `rbreak' is called with a filename qualification, it limits the search for functions matching the given regular expression to the specified FILE. This can be used, for example, to set breakpoints on every function in a given file: (gdb) rbreak file.c:. The colon separating the filename qualifier from the regex may optionally be surrounded by spaces. `info breakpoints [N...]' `info break [N...]' Print a table of all breakpoints, watchpoints, and catchpoints set and not deleted. Optional argument N means print information only about the specified breakpoint(s) (or watchpoint(s) or catchpoint(s)). For each breakpoint, following columns are printed: _Breakpoint Numbers_ _Type_ Breakpoint, watchpoint, or catchpoint. _Disposition_ Whether the breakpoint is marked to be disabled or deleted when hit. _Enabled or Disabled_ Enabled breakpoints are marked with `y'. `n' marks breakpoints that are not enabled. _Address_ Where the breakpoint is in your program, as a memory address. For a pending breakpoint whose address is not yet known, this field will contain `'. Such breakpoint won't fire until a shared library that has the symbol or line referred by breakpoint is loaded. See below for details. A breakpoint with several locations will have `' in this field--see below for details. _What_ Where the breakpoint is in the source for your program, as a file and line number. For a pending breakpoint, the original string passed to the breakpoint command will be listed as it cannot be resolved until the appropriate shared library is loaded in the future. If a breakpoint is conditional, there are two evaluation modes: "host" and "target". If mode is "host", breakpoint condition evaluation is done by GDB on the host's side. If it is "target", then the condition is evaluated by the target. The `info break' command shows the condition on the line following the affected breakpoint, together with its condition evaluation mode in between parentheses. Breakpoint commands, if any, are listed after that. A pending breakpoint is allowed to have a condition specified for it. The condition is not parsed for validity until a shared library is loaded that allows the pending breakpoint to resolve to a valid location. `info break' with a breakpoint number N as argument lists only that breakpoint. The convenience variable `$_' and the default examining-address for the `x' command are set to the address of the last breakpoint listed (*note Examining Memory: Memory.). `info break' displays a count of the number of times the breakpoint has been hit. This is especially useful in conjunction with the `ignore' command. You can ignore a large number of breakpoint hits, look at the breakpoint info to see how many times the breakpoint was hit, and then run again, ignoring one less than that number. This will get you quickly to the last hit of that breakpoint. For a breakpoints with an enable count (xref) greater than 1, `info break' also displays that count. GDB allows you to set any number of breakpoints at the same place in your program. There is nothing silly or meaningless about this. When the breakpoints are conditional, this is even useful (*note Break Conditions: Conditions.). It is possible that a breakpoint corresponds to several locations in your program. Examples of this situation are: * Multiple functions in the program may have the same name. * For a C++ constructor, the GCC compiler generates several instances of the function body, used in different cases. * For a C++ template function, a given line in the function can correspond to any number of instantiations. * For an inlined function, a given source line can correspond to several places where that function is inlined. In all those cases, GDB will insert a breakpoint at all the relevant locations. A breakpoint with multiple locations is displayed in the breakpoint table using several rows--one header row, followed by one row for each breakpoint location. The header row has `' in the address column. The rows for individual locations contain the actual addresses for locations, and show the functions to which those locations belong. The number column for a location is of the form BREAKPOINT-NUMBER.LOCATION-NUMBER. For example: Num Type Disp Enb Address What 1 breakpoint keep y stop only if i==1 breakpoint already hit 1 time 1.1 y 0x080486a2 in void foo() at t.cc:8 1.2 y 0x080486ca in void foo() at t.cc:8 Each location can be individually enabled or disabled by passing BREAKPOINT-NUMBER.LOCATION-NUMBER as argument to the `enable' and `disable' commands. Note that you cannot delete the individual locations from the list, you can only delete the entire list of locations that belong to their parent breakpoint (with the `delete NUM' command, where NUM is the number of the parent breakpoint, 1 in the above example). Disabling or enabling the parent breakpoint (*note Disabling::) affects all of the locations that belong to that breakpoint. It's quite common to have a breakpoint inside a shared library. Shared libraries can be loaded and unloaded explicitly, and possibly repeatedly, as the program is executed. To support this use case, GDB updates breakpoint locations whenever any shared library is loaded or unloaded. Typically, you would set a breakpoint in a shared library at the beginning of your debugging session, when the library is not loaded, and when the symbols from the library are not available. When you try to set breakpoint, GDB will ask you if you want to set a so called "pending breakpoint"--breakpoint whose address is not yet resolved. After the program is run, whenever a new shared library is loaded, GDB reevaluates all the breakpoints. When a newly loaded shared library contains the symbol or line referred to by some pending breakpoint, that breakpoint is resolved and becomes an ordinary breakpoint. When a library is unloaded, all breakpoints that refer to its symbols or source lines become pending again. This logic works for breakpoints with multiple locations, too. For example, if you have a breakpoint in a C++ template function, and a newly loaded shared library has an instantiation of that template, a new location is added to the list of locations for the breakpoint. Except for having unresolved address, pending breakpoints do not differ from regular breakpoints. You can set conditions or commands, enable and disable them and perform other breakpoint operations. GDB provides some additional commands for controlling what happens when the `break' command cannot resolve breakpoint address specification to an address: `set breakpoint pending auto' This is the default behavior. When GDB cannot find the breakpoint location, it queries you whether a pending breakpoint should be created. `set breakpoint pending on' This indicates that an unrecognized breakpoint location should automatically result in a pending breakpoint being created. `set breakpoint pending off' This indicates that pending breakpoints are not to be created. Any unrecognized breakpoint location results in an error. This setting does not affect any pending breakpoints previously created. `show breakpoint pending' Show the current behavior setting for creating pending breakpoints. The settings above only affect the `break' command and its variants. Once breakpoint is set, it will be automatically updated as shared libraries are loaded and unloaded. For some targets, GDB can automatically decide if hardware or software breakpoints should be used, depending on whether the breakpoint address is read-only or read-write. This applies to breakpoints set with the `break' command as well as to internal breakpoints set by commands like `next' and `finish'. For breakpoints set with `hbreak', GDB will always use hardware breakpoints. You can control this automatic behaviour with the following commands:: `set breakpoint auto-hw on' This is the default behavior. When GDB sets a breakpoint, it will try to use the target memory map to decide if software or hardware breakpoint must be used. `set breakpoint auto-hw off' This indicates GDB should not automatically select breakpoint type. If the target provides a memory map, GDB will warn when trying to set software breakpoint at a read-only address. GDB normally implements breakpoints by replacing the program code at the breakpoint address with a special instruction, which, when executed, given control to the debugger. By default, the program code is so modified only when the program is resumed. As soon as the program stops, GDB restores the original instructions. This behaviour guards against leaving breakpoints inserted in the target should gdb abrubptly disconnect. However, with slow remote targets, inserting and removing breakpoint can reduce the performance. This behavior can be controlled with the following commands:: `set breakpoint always-inserted off' All breakpoints, including newly added by the user, are inserted in the target only when the target is resumed. All breakpoints are removed from the target when it stops. `set breakpoint always-inserted on' Causes all breakpoints to be inserted in the target at all times. If the user adds a new breakpoint, or changes an existing breakpoint, the breakpoints in the target are updated immediately. A breakpoint is removed from the target only when breakpoint itself is removed. `set breakpoint always-inserted auto' This is the default mode. If GDB is controlling the inferior in non-stop mode (*note Non-Stop Mode::), gdb behaves as if `breakpoint always-inserted' mode is on. If GDB is controlling the inferior in all-stop mode, GDB behaves as if `breakpoint always-inserted' mode is off. GDB handles conditional breakpoints by evaluating these conditions when a breakpoint breaks. If the condition is true, then the process being debugged stops, otherwise the process is resumed. If the target supports evaluating conditions on its end, GDB may download the breakpoint, together with its conditions, to it. This feature can be controlled via the following commands: `set breakpoint condition-evaluation host' This option commands GDB to evaluate the breakpoint conditions on the host's side. Unconditional breakpoints are sent to the target which in turn receives the triggers and reports them back to GDB for condition evaluation. This is the standard evaluation mode. `set breakpoint condition-evaluation target' This option commands GDB to download breakpoint conditions to the target at the moment of their insertion. The target is responsible for evaluating the conditional expression and reporting breakpoint stop events back to GDB whenever the condition is true. Due to limitations of target-side evaluation, some conditions cannot be evaluated there, e.g., conditions that depend on local data that is only known to the host. Examples include conditional expressions involving convenience variables, complex types that cannot be handled by the agent expression parser and expressions that are too long to be sent over to the target, specially when the target is a remote system. In these cases, the conditions will be evaluated by GDB. `set breakpoint condition-evaluation auto' This is the default mode. If the target supports evaluating breakpoint conditions on its end, GDB will download breakpoint conditions to the target (limitations mentioned previously apply). If the target does not support breakpoint condition evaluation, then GDB will fallback to evaluating all these conditions on the host's side. GDB itself sometimes sets breakpoints in your program for special purposes, such as proper handling of `longjmp' (in C programs). These internal breakpoints are assigned negative numbers, starting with `-1'; `info breakpoints' does not display them. You can see these breakpoints with the GDB maintenance command `maint info breakpoints' (*note maint info breakpoints::).  File: gdb.info, Node: Set Watchpoints, Next: Set Catchpoints, Prev: Set Breaks, Up: Breakpoints 5.1.2 Setting Watchpoints ------------------------- You can use a watchpoint to stop execution whenever the value of an expression changes, without having to predict a particular place where this may happen. (This is sometimes called a "data breakpoint".) The expression may be as simple as the value of a single variable, or as complex as many variables combined by operators. Examples include: * A reference to the value of a single variable. * An address cast to an appropriate data type. For example, `*(int *)0x12345678' will watch a 4-byte region at the specified address (assuming an `int' occupies 4 bytes). * An arbitrarily complex expression, such as `a*b + c/d'. The expression can use any operators valid in the program's native language (*note Languages::). You can set a watchpoint on an expression even if the expression can not be evaluated yet. For instance, you can set a watchpoint on `*global_ptr' before `global_ptr' is initialized. GDB will stop when your program sets `global_ptr' and the expression produces a valid value. If the expression becomes valid in some other way than changing a variable (e.g. if the memory pointed to by `*global_ptr' becomes readable as the result of a `malloc' call), GDB may not stop until the next time the expression changes. Depending on your system, watchpoints may be implemented in software or hardware. GDB does software watchpointing by single-stepping your program and testing the variable's value each time, which is hundreds of times slower than normal execution. (But this may still be worth it, to catch errors where you have no clue what part of your program is the culprit.) On some systems, such as HP-UX, PowerPC, GNU/Linux and most other x86-based targets, GDB includes support for hardware watchpoints, which do not slow down the running of your program. `watch [-l|-location] EXPR [thread THREADNUM] [mask MASKVALUE]' Set a watchpoint for an expression. GDB will break when the expression EXPR is written into by the program and its value changes. The simplest (and the most popular) use of this command is to watch the value of a single variable: (gdb) watch foo If the command includes a `[thread THREADNUM]' argument, GDB breaks only when the thread identified by THREADNUM changes the value of EXPR. If any other threads change the value of EXPR, GDB will not break. Note that watchpoints restricted to a single thread in this way only work with Hardware Watchpoints. Ordinarily a watchpoint respects the scope of variables in EXPR (see below). The `-location' argument tells GDB to instead watch the memory referred to by EXPR. In this case, GDB will evaluate EXPR, take the address of the result, and watch the memory at that address. The type of the result is used to determine the size of the watched memory. If the expression's result does not have an address, then GDB will print an error. The `[mask MASKVALUE]' argument allows creation of masked watchpoints, if the current architecture supports this feature (e.g., PowerPC Embedded architecture, see *note PowerPC Embedded::.) A "masked watchpoint" specifies a mask in addition to an address to watch. The mask specifies that some bits of an address (the bits which are reset in the mask) should be ignored when matching the address accessed by the inferior against the watchpoint address. Thus, a masked watchpoint watches many addresses simultaneously--those addresses whose unmasked bits are identical to the unmasked bits in the watchpoint address. The `mask' argument implies `-location'. Examples: (gdb) watch foo mask 0xffff00ff (gdb) watch *0xdeadbeef mask 0xffffff00 `rwatch [-l|-location] EXPR [thread THREADNUM] [mask MASKVALUE]' Set a watchpoint that will break when the value of EXPR is read by the program. `awatch [-l|-location] EXPR [thread THREADNUM] [mask MASKVALUE]' Set a watchpoint that will break when EXPR is either read from or written into by the program. `info watchpoints [N...]' This command prints a list of watchpoints, using the same format as `info break' (*note Set Breaks::). If you watch for a change in a numerically entered address you need to dereference it, as the address itself is just a constant number which will never change. GDB refuses to create a watchpoint that watches a never-changing value: (gdb) watch 0x600850 Cannot watch constant value 0x600850. (gdb) watch *(int *) 0x600850 Watchpoint 1: *(int *) 6293584 GDB sets a "hardware watchpoint" if possible. Hardware watchpoints execute very quickly, and the debugger reports a change in value at the exact instruction where the change occurs. If GDB cannot set a hardware watchpoint, it sets a software watchpoint, which executes more slowly and reports the change in value at the next _statement_, not the instruction, after the change occurs. You can force GDB to use only software watchpoints with the `set can-use-hw-watchpoints 0' command. With this variable set to zero, GDB will never try to use hardware watchpoints, even if the underlying system supports them. (Note that hardware-assisted watchpoints that were set _before_ setting `can-use-hw-watchpoints' to zero will still use the hardware mechanism of watching expression values.) `set can-use-hw-watchpoints' Set whether or not to use hardware watchpoints. `show can-use-hw-watchpoints' Show the current mode of using hardware watchpoints. For remote targets, you can restrict the number of hardware watchpoints GDB will use, see *note set remote hardware-breakpoint-limit::. When you issue the `watch' command, GDB reports Hardware watchpoint NUM: EXPR if it was able to set a hardware watchpoint. Currently, the `awatch' and `rwatch' commands can only set hardware watchpoints, because accesses to data that don't change the value of the watched expression cannot be detected without examining every instruction as it is being executed, and GDB does not do that currently. If GDB finds that it is unable to set a hardware breakpoint with the `awatch' or `rwatch' command, it will print a message like this: Expression cannot be implemented with read/access watchpoint. Sometimes, GDB cannot set a hardware watchpoint because the data type of the watched expression is wider than what a hardware watchpoint on the target machine can handle. For example, some systems can only watch regions that are up to 4 bytes wide; on such systems you cannot set hardware watchpoints for an expression that yields a double-precision floating-point number (which is typically 8 bytes wide). As a work-around, it might be possible to break the large region into a series of smaller ones and watch them with separate watchpoints. If you set too many hardware watchpoints, GDB might be unable to insert all of them when you resume the execution of your program. Since the precise number of active watchpoints is unknown until such time as the program is about to be resumed, GDB might not be able to warn you about this when you set the watchpoints, and the warning will be printed only when the program is resumed: Hardware watchpoint NUM: Could not insert watchpoint If this happens, delete or disable some of the watchpoints. Watching complex expressions that reference many variables can also exhaust the resources available for hardware-assisted watchpoints. That's because GDB needs to watch every variable in the expression with separately allocated resources. If you call a function interactively using `print' or `call', any watchpoints you have set will be inactive until GDB reaches another kind of breakpoint or the call completes. GDB automatically deletes watchpoints that watch local (automatic) variables, or expressions that involve such variables, when they go out of scope, that is, when the execution leaves the block in which these variables were defined. In particular, when the program being debugged terminates, _all_ local variables go out of scope, and so only watchpoints that watch global variables remain set. If you rerun the program, you will need to set all such watchpoints again. One way of doing that would be to set a code breakpoint at the entry to the `main' function and when it breaks, set all the watchpoints. In multi-threaded programs, watchpoints will detect changes to the watched expression from every thread. _Warning:_ In multi-threaded programs, software watchpoints have only limited usefulness. If GDB creates a software watchpoint, it can only watch the value of an expression _in a single thread_. If you are confident that the expression can only change due to the current thread's activity (and if you are also confident that no other thread can become current), then you can use software watchpoints as usual. However, GDB may not notice when a non-current thread's activity changes the expression. (Hardware watchpoints, in contrast, watch an expression in all threads.) *Note set remote hardware-watchpoint-limit::.  File: gdb.info, Node: Set Catchpoints, Next: Delete Breaks, Prev: Set Watchpoints, Up: Breakpoints 5.1.3 Setting Catchpoints ------------------------- You can use "catchpoints" to cause the debugger to stop for certain kinds of program events, such as C++ exceptions or the loading of a shared library. Use the `catch' command to set a catchpoint. `catch EVENT' Stop when EVENT occurs. EVENT can be any of the following: `throw' The throwing of a C++ exception. `catch' The catching of a C++ exception. `exception' An Ada exception being raised. If an exception name is specified at the end of the command (eg `catch exception Program_Error'), the debugger will stop only when this specific exception is raised. Otherwise, the debugger stops execution when any Ada exception is raised. When inserting an exception catchpoint on a user-defined exception whose name is identical to one of the exceptions defined by the language, the fully qualified name must be used as the exception name. Otherwise, GDB will assume that it should stop on the pre-defined exception rather than the user-defined one. For instance, assuming an exception called `Constraint_Error' is defined in package `Pck', then the command to use to catch such exceptions is `catch exception Pck.Constraint_Error'. `exception unhandled' An exception that was raised but is not handled by the program. `assert' A failed Ada assertion. `exec' A call to `exec'. This is currently only available for HP-UX and GNU/Linux. `syscall' `syscall [NAME | NUMBER] ...' A call to or return from a system call, a.k.a. "syscall". A syscall is a mechanism for application programs to request a service from the operating system (OS) or one of the OS system services. GDB can catch some or all of the syscalls issued by the debuggee, and show the related information for each syscall. If no argument is specified, calls to and returns from all system calls will be caught. NAME can be any system call name that is valid for the underlying OS. Just what syscalls are valid depends on the OS. On GNU and Unix systems, you can find the full list of valid syscall names on `/usr/include/asm/unistd.h'. Normally, GDB knows in advance which syscalls are valid for each OS, so you can use the GDB command-line completion facilities (*note command completion: Completion.) to list the available choices. You may also specify the system call numerically. A syscall's number is the value passed to the OS's syscall dispatcher to identify the requested service. When you specify the syscall by its name, GDB uses its database of syscalls to convert the name into the corresponding numeric code, but using the number directly may be useful if GDB's database does not have the complete list of syscalls on your system (e.g., because GDB lags behind the OS upgrades). The example below illustrates how this command works if you don't provide arguments to it: (gdb) catch syscall Catchpoint 1 (syscall) (gdb) r Starting program: /tmp/catch-syscall Catchpoint 1 (call to syscall 'close'), \ 0xffffe424 in __kernel_vsyscall () (gdb) c Continuing. Catchpoint 1 (returned from syscall 'close'), \ 0xffffe424 in __kernel_vsyscall () (gdb) Here is an example of catching a system call by name: (gdb) catch syscall chroot Catchpoint 1 (syscall 'chroot' [61]) (gdb) r Starting program: /tmp/catch-syscall Catchpoint 1 (call to syscall 'chroot'), \ 0xffffe424 in __kernel_vsyscall () (gdb) c Continuing. Catchpoint 1 (returned from syscall 'chroot'), \ 0xffffe424 in __kernel_vsyscall () (gdb) An example of specifying a system call numerically. In the case below, the syscall number has a corresponding entry in the XML file, so GDB finds its name and prints it: (gdb) catch syscall 252 Catchpoint 1 (syscall(s) 'exit_group') (gdb) r Starting program: /tmp/catch-syscall Catchpoint 1 (call to syscall 'exit_group'), \ 0xffffe424 in __kernel_vsyscall () (gdb) c Continuing. Program exited normally. (gdb) However, there can be situations when there is no corresponding name in XML file for that syscall number. In this case, GDB prints a warning message saying that it was not able to find the syscall name, but the catchpoint will be set anyway. See the example below: (gdb) catch syscall 764 warning: The number '764' does not represent a known syscall. Catchpoint 2 (syscall 764) (gdb) If you configure GDB using the `--without-expat' option, it will not be able to display syscall names. Also, if your architecture does not have an XML file describing its system calls, you will not be able to see the syscall names. It is important to notice that these two features are used for accessing the syscall name database. In either case, you will see a warning like this: (gdb) catch syscall warning: Could not open "syscalls/i386-linux.xml" warning: Could not load the syscall XML file 'syscalls/i386-linux.xml'. GDB will not be able to display syscall names. Catchpoint 1 (syscall) (gdb) Of course, the file name will change depending on your architecture and system. Still using the example above, you can also try to catch a syscall by its number. In this case, you would see something like: (gdb) catch syscall 252 Catchpoint 1 (syscall(s) 252) Again, in this case GDB would not be able to display syscall's names. `fork' A call to `fork'. This is currently only available for HP-UX and GNU/Linux. `vfork' A call to `vfork'. This is currently only available for HP-UX and GNU/Linux. `load [regexp]' `unload [regexp]' The loading or unloading of a shared library. If REGEXP is given, then the catchpoint will stop only if the regular expression matches one of the affected libraries. `signal [SIGNAL... | `all']' The delivery of a signal. With no arguments, this catchpoint will catch any signal that is not used internally by GDB, specifically, all signals except `SIGTRAP' and `SIGINT'. With the argument `all', all signals, including those used by GDB, will be caught. This argument cannot be used with other signal names. Otherwise, the arguments are a list of signal names as given to `handle' (*note Signals::). Only signals specified in this list will be caught. One reason that `catch signal' can be more useful than `handle' is that you can attach commands and conditions to the catchpoint. When a signal is caught by a catchpoint, the signal's `stop' and `print' settings, as specified by `handle', are ignored. However, whether the signal is still delivered to the inferior depends on the `pass' setting; this can be changed in the catchpoint's commands. `tcatch EVENT' Set a catchpoint that is enabled only for one stop. The catchpoint is automatically deleted after the first time the event is caught. Use the `info break' command to list the current catchpoints. There are currently some limitations to C++ exception handling (`catch throw' and `catch catch') in GDB: * If you call a function interactively, GDB normally returns control to you when the function has finished executing. If the call raises an exception, however, the call may bypass the mechanism that returns control to you and cause your program either to abort or to simply continue running until it hits a breakpoint, catches a signal that GDB is listening for, or exits. This is the case even if you set a catchpoint for the exception; catchpoints on exceptions are disabled within interactive calls. * You cannot raise an exception interactively. * You cannot install an exception handler interactively. Sometimes `catch' is not the best way to debug exception handling: if you need to know exactly where an exception is raised, it is better to stop _before_ the exception handler is called, since that way you can see the stack before any unwinding takes place. If you set a breakpoint in an exception handler instead, it may not be easy to find out where the exception was raised. To stop just before an exception handler is called, you need some knowledge of the implementation. In the case of GNU C++, exceptions are raised by calling a library function named `__raise_exception' which has the following ANSI C interface: /* ADDR is where the exception identifier is stored. ID is the exception identifier. */ void __raise_exception (void **addr, void *id); To make the debugger catch all exceptions before any stack unwinding takes place, set a breakpoint on `__raise_exception' (*note Breakpoints; Watchpoints; and Exceptions: Breakpoints.). With a conditional breakpoint (*note Break Conditions: Conditions.) that depends on the value of ID, you can stop your program when a specific exception is raised. You can use multiple conditional breakpoints to stop your program when any of a number of exceptions are raised.  File: gdb.info, Node: Delete Breaks, Next: Disabling, Prev: Set Catchpoints, Up: Breakpoints 5.1.4 Deleting Breakpoints -------------------------- It is often necessary to eliminate a breakpoint, watchpoint, or catchpoint once it has done its job and you no longer want your program to stop there. This is called "deleting" the breakpoint. A breakpoint that has been deleted no longer exists; it is forgotten. With the `clear' command you can delete breakpoints according to where they are in your program. With the `delete' command you can delete individual breakpoints, watchpoints, or catchpoints by specifying their breakpoint numbers. It is not necessary to delete a breakpoint to proceed past it. GDB automatically ignores breakpoints on the first instruction to be executed when you continue execution without changing the execution address. `clear' Delete any breakpoints at the next instruction to be executed in the selected stack frame (*note Selecting a Frame: Selection.). When the innermost frame is selected, this is a good way to delete a breakpoint where your program just stopped. `clear LOCATION' Delete any breakpoints set at the specified LOCATION. *Note Specify Location::, for the various forms of LOCATION; the most useful ones are listed below: `clear FUNCTION' `clear FILENAME:FUNCTION' Delete any breakpoints set at entry to the named FUNCTION. `clear LINENUM' `clear FILENAME:LINENUM' Delete any breakpoints set at or within the code of the specified LINENUM of the specified FILENAME. `delete [breakpoints] [RANGE...]' Delete the breakpoints, watchpoints, or catchpoints of the breakpoint ranges specified as arguments. If no argument is specified, delete all breakpoints (GDB asks confirmation, unless you have `set confirm off'). You can abbreviate this command as `d'.  File: gdb.info, Node: Disabling, Next: Conditions, Prev: Delete Breaks, Up: Breakpoints 5.1.5 Disabling Breakpoints --------------------------- Rather than deleting a breakpoint, watchpoint, or catchpoint, you might prefer to "disable" it. This makes the breakpoint inoperative as if it had been deleted, but remembers the information on the breakpoint so that you can "enable" it again later. You disable and enable breakpoints, watchpoints, and catchpoints with the `enable' and `disable' commands, optionally specifying one or more breakpoint numbers as arguments. Use `info break' to print a list of all breakpoints, watchpoints, and catchpoints if you do not know which numbers to use. Disabling and enabling a breakpoint that has multiple locations affects all of its locations. A breakpoint, watchpoint, or catchpoint can have any of several different states of enablement: * Enabled. The breakpoint stops your program. A breakpoint set with the `break' command starts out in this state. * Disabled. The breakpoint has no effect on your program. * Enabled once. The breakpoint stops your program, but then becomes disabled. * Enabled for a count. The breakpoint stops your program for the next N times, then becomes disabled. * Enabled for deletion. The breakpoint stops your program, but immediately after it does so it is deleted permanently. A breakpoint set with the `tbreak' command starts out in this state. You can use the following commands to enable or disable breakpoints, watchpoints, and catchpoints: `disable [breakpoints] [RANGE...]' Disable the specified breakpoints--or all breakpoints, if none are listed. A disabled breakpoint has no effect but is not forgotten. All options such as ignore-counts, conditions and commands are remembered in case the breakpoint is enabled again later. You may abbreviate `disable' as `dis'. `enable [breakpoints] [RANGE...]' Enable the specified breakpoints (or all defined breakpoints). They become effective once again in stopping your program. `enable [breakpoints] once RANGE...' Enable the specified breakpoints temporarily. GDB disables any of these breakpoints immediately after stopping your program. `enable [breakpoints] count COUNT RANGE...' Enable the specified breakpoints temporarily. GDB records COUNT with each of the specified breakpoints, and decrements a breakpoint's count when it is hit. When any count reaches 0, GDB disables that breakpoint. If a breakpoint has an ignore count (*note Break Conditions: Conditions.), that will be decremented to 0 before COUNT is affected. `enable [breakpoints] delete RANGE...' Enable the specified breakpoints to work once, then die. GDB deletes any of these breakpoints as soon as your program stops there. Breakpoints set by the `tbreak' command start out in this state. Except for a breakpoint set with `tbreak' (*note Setting Breakpoints: Set Breaks.), breakpoints that you set are initially enabled; subsequently, they become disabled or enabled only when you use one of the commands above. (The command `until' can set and delete a breakpoint of its own, but it does not change the state of your other breakpoints; see *note Continuing and Stepping: Continuing and Stepping.)  File: gdb.info, Node: Conditions, Next: Break Commands, Prev: Disabling, Up: Breakpoints 5.1.6 Break Conditions ---------------------- The simplest sort of breakpoint breaks every time your program reaches a specified place. You can also specify a "condition" for a breakpoint. A condition is just a Boolean expression in your programming language (*note Expressions: Expressions.). A breakpoint with a condition evaluates the expression each time your program reaches it, and your program stops only if the condition is _true_. This is the converse of using assertions for program validation; in that situation, you want to stop when the assertion is violated--that is, when the condition is false. In C, if you want to test an assertion expressed by the condition ASSERT, you should set the condition `! ASSERT' on the appropriate breakpoint. Conditions are also accepted for watchpoints; you may not need them, since a watchpoint is inspecting the value of an expression anyhow--but it might be simpler, say, to just set a watchpoint on a variable name, and specify a condition that tests whether the new value is an interesting one. Break conditions can have side effects, and may even call functions in your program. This can be useful, for example, to activate functions that log program progress, or to use your own print functions to format special data structures. The effects are completely predictable unless there is another enabled breakpoint at the same address. (In that case, GDB might see the other breakpoint first and stop your program without checking the condition of this one.) Note that breakpoint commands are usually more convenient and flexible than break conditions for the purpose of performing side effects when a breakpoint is reached (*note Breakpoint Command Lists: Break Commands.). Breakpoint conditions can also be evaluated on the target's side if the target supports it. Instead of evaluating the conditions locally, GDB encodes the expression into an agent expression (*note Agent Expressions::) suitable for execution on the target, independently of GDB. Global variables become raw memory locations, locals become stack accesses, and so forth. In this case, GDB will only be notified of a breakpoint trigger when its condition evaluates to true. This mechanism may provide faster response times depending on the performance characteristics of the target since it does not need to keep GDB informed about every breakpoint trigger, even those with false conditions. Break conditions can be specified when a breakpoint is set, by using `if' in the arguments to the `break' command. *Note Setting Breakpoints: Set Breaks. They can also be changed at any time with the `condition' command. You can also use the `if' keyword with the `watch' command. The `catch' command does not recognize the `if' keyword; `condition' is the only way to impose a further condition on a catchpoint. `condition BNUM EXPRESSION' Specify EXPRESSION as the break condition for breakpoint, watchpoint, or catchpoint number BNUM. After you set a condition, breakpoint BNUM stops your program only if the value of EXPRESSION is true (nonzero, in C). When you use `condition', GDB checks EXPRESSION immediately for syntactic correctness, and to determine whether symbols in it have referents in the context of your breakpoint. If EXPRESSION uses symbols not referenced in the context of the breakpoint, GDB prints an error message: No symbol "foo" in current context. GDB does not actually evaluate EXPRESSION at the time the `condition' command (or a command that sets a breakpoint with a condition, like `break if ...') is given, however. *Note Expressions: Expressions. `condition BNUM' Remove the condition from breakpoint number BNUM. It becomes an ordinary unconditional breakpoint. A special case of a breakpoint condition is to stop only when the breakpoint has been reached a certain number of times. This is so useful that there is a special way to do it, using the "ignore count" of the breakpoint. Every breakpoint has an ignore count, which is an integer. Most of the time, the ignore count is zero, and therefore has no effect. But if your program reaches a breakpoint whose ignore count is positive, then instead of stopping, it just decrements the ignore count by one and continues. As a result, if the ignore count value is N, the breakpoint does not stop the next N times your program reaches it. `ignore BNUM COUNT' Set the ignore count of breakpoint number BNUM to COUNT. The next COUNT times the breakpoint is reached, your program's execution does not stop; other than to decrement the ignore count, GDB takes no action. To make the breakpoint stop the next time it is reached, specify a count of zero. When you use `continue' to resume execution of your program from a breakpoint, you can specify an ignore count directly as an argument to `continue', rather than using `ignore'. *Note Continuing and Stepping: Continuing and Stepping. If a breakpoint has a positive ignore count and a condition, the condition is not checked. Once the ignore count reaches zero, GDB resumes checking the condition. You could achieve the effect of the ignore count with a condition such as `$foo-- <= 0' using a debugger convenience variable that is decremented each time. *Note Convenience Variables: Convenience Vars. Ignore counts apply to breakpoints, watchpoints, and catchpoints.  File: gdb.info, Node: Break Commands, Next: Dynamic Printf, Prev: Conditions, Up: Breakpoints 5.1.7 Breakpoint Command Lists ------------------------------ You can give any breakpoint (or watchpoint or catchpoint) a series of commands to execute when your program stops due to that breakpoint. For example, you might want to print the values of certain expressions, or enable other breakpoints. `commands [RANGE...]' `... COMMAND-LIST ...' `end' Specify a list of commands for the given breakpoints. The commands themselves appear on the following lines. Type a line containing just `end' to terminate the commands. To remove all commands from a breakpoint, type `commands' and follow it immediately with `end'; that is, give no commands. With no argument, `commands' refers to the last breakpoint, watchpoint, or catchpoint set (not to the breakpoint most recently encountered). If the most recent breakpoints were set with a single command, then the `commands' will apply to all the breakpoints set by that command. This applies to breakpoints set by `rbreak', and also applies when a single `break' command creates multiple breakpoints (*note Ambiguous Expressions: Ambiguous Expressions.). Pressing as a means of repeating the last GDB command is disabled within a COMMAND-LIST. You can use breakpoint commands to start your program up again. Simply use the `continue' command, or `step', or any other command that resumes execution. Any other commands in the command list, after a command that resumes execution, are ignored. This is because any time you resume execution (even with a simple `next' or `step'), you may encounter another breakpoint--which could have its own command list, leading to ambiguities about which list to execute. If the first command you specify in a command list is `silent', the usual message about stopping at a breakpoint is not printed. This may be desirable for breakpoints that are to print a specific message and then continue. If none of the remaining commands print anything, you see no sign that the breakpoint was reached. `silent' is meaningful only at the beginning of a breakpoint command list. The commands `echo', `output', and `printf' allow you to print precisely controlled output, and are often useful in silent breakpoints. *Note Commands for Controlled Output: Output. For example, here is how you could use breakpoint commands to print the value of `x' at entry to `foo' whenever `x' is positive. break foo if x>0 commands silent printf "x is %d\n",x cont end One application for breakpoint commands is to compensate for one bug so you can test for another. Put a breakpoint just after the erroneous line of code, give it a condition to detect the case in which something erroneous has been done, and give it commands to assign correct values to any variables that need them. End with the `continue' command so that your program does not stop, and start with the `silent' command so that no output is produced. Here is an example: break 403 commands silent set x = y + 4 cont end  File: gdb.info, Node: Dynamic Printf, Next: Save Breakpoints, Prev: Break Commands, Up: Breakpoints 5.1.8 Dynamic Printf -------------------- The dynamic printf command `dprintf' combines a breakpoint with formatted printing of your program's data to give you the effect of inserting `printf' calls into your program on-the-fly, without having to recompile it. In its most basic form, the output goes to the GDB console. However, you can set the variable `dprintf-style' for alternate handling. For instance, you can ask to format the output by calling your program's `printf' function. This has the advantage that the characters go to the program's output device, so they can recorded in redirects to files and so forth. If you are doing remote debugging with a stub or agent, you can also ask to have the printf handled by the remote agent. In addition to ensuring that the output goes to the remote program's device along with any other output the program might produce, you can also ask that the dprintf remain active even after disconnecting from the remote target. Using the stub/agent is also more efficient, as it can do everything without needing to communicate with GDB. `dprintf LOCATION,TEMPLATE,EXPRESSION[,EXPRESSION...]' Whenever execution reaches LOCATION, print the values of one or more EXPRESSIONS under the control of the string TEMPLATE. To print several values, separate them with commas. `set dprintf-style STYLE' Set the dprintf output to be handled in one of several different styles enumerated below. A change of style affects all existing dynamic printfs immediately. (If you need individual control over the print commands, simply define normal breakpoints with explicitly-supplied command lists.) `gdb' Handle the output using the GDB `printf' command. `call' Handle the output by calling a function in your program (normally `printf'). `agent' Have the remote debugging agent (such as `gdbserver') handle the output itself. This style is only available for agents that support running commands on the target. `set dprintf-function FUNCTION' Set the function to call if the dprintf style is `call'. By default its value is `printf'. You may set it to any expression. that GDB can evaluate to a function, as per the `call' command. `set dprintf-channel CHANNEL' Set a "channel" for dprintf. If set to a non-empty value, GDB will evaluate it as an expression and pass the result as a first argument to the `dprintf-function', in the manner of `fprintf' and similar functions. Otherwise, the dprintf format string will be the first argument, in the manner of `printf'. As an example, if you wanted `dprintf' output to go to a logfile that is a standard I/O stream assigned to the variable `mylog', you could do the following: (gdb) set dprintf-style call (gdb) set dprintf-function fprintf (gdb) set dprintf-channel mylog (gdb) dprintf 25,"at line 25, glob=%d\n",glob Dprintf 1 at 0x123456: file main.c, line 25. (gdb) info break 1 dprintf keep y 0x00123456 in main at main.c:25 call (void) fprintf (mylog,"at line 25, glob=%d\n",glob) continue (gdb) Note that the `info break' displays the dynamic printf commands as normal breakpoint commands; you can thus easily see the effect of the variable settings. `set disconnected-dprintf on' `set disconnected-dprintf off' Choose whether `dprintf' commands should continue to run if GDB has disconnected from the target. This only applies if the `dprintf-style' is `agent'. `show disconnected-dprintf off' Show the current choice for disconnected `dprintf'. GDB does not check the validity of function and channel, relying on you to supply values that are meaningful for the contexts in which they are being used. For instance, the function and channel may be the values of local variables, but if that is the case, then all enabled dynamic prints must be at locations within the scope of those locals. If evaluation fails, GDB will report an error.  File: gdb.info, Node: Save Breakpoints, Next: Static Probe Points, Prev: Dynamic Printf, Up: Breakpoints 5.1.9 How to save breakpoints to a file --------------------------------------- To save breakpoint definitions to a file use the `save breakpoints' command. `save breakpoints [FILENAME]' This command saves all current breakpoint definitions together with their commands and ignore counts, into a file `FILENAME' suitable for use in a later debugging session. This includes all types of breakpoints (breakpoints, watchpoints, catchpoints, tracepoints). To read the saved breakpoint definitions, use the `source' command (*note Command Files::). Note that watchpoints with expressions involving local variables may fail to be recreated because it may not be possible to access the context where the watchpoint is valid anymore. Because the saved breakpoint definitions are simply a sequence of GDB commands that recreate the breakpoints, you can edit the file in your favorite editing program, and remove the breakpoint definitions you're not interested in, or that can no longer be recreated.  File: gdb.info, Node: Static Probe Points, Next: Error in Breakpoints, Prev: Save Breakpoints, Up: Breakpoints 5.1.10 Static Probe Points -------------------------- GDB supports "SDT" probes in the code. SDT stands for Statically Defined Tracing, and the probes are designed to have a tiny runtime code and data footprint, and no dynamic relocations. They are usable from assembly, C and C++ languages. See `http://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation' for a good reference on how the SDT probes are implemented. Currently, `SystemTap' (`http://sourceware.org/systemtap/') SDT probes are supported on ELF-compatible systems. See `http://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApps' for more information on how to add `SystemTap' SDT probes in your applications. Some probes have an associated semaphore variable; for instance, this happens automatically if you defined your probe using a DTrace-style `.d' file. If your probe has a semaphore, GDB will automatically enable it when you specify a breakpoint using the `-probe-stap' notation. But, if you put a breakpoint at a probe's location by some other method (e.g., `break file:line'), then GDB will not automatically set the semaphore. You can examine the available static static probes using `info probes', with optional arguments: `info probes stap [PROVIDER [NAME [OBJFILE]]]' If given, PROVIDER is a regular expression used to match against provider names when selecting which probes to list. If omitted, probes by all probes from all providers are listed. If given, NAME is a regular expression to match against probe names when selecting which probes to list. If omitted, probe names are not considered when deciding whether to display them. If given, OBJFILE is a regular expression used to select which object files (executable or shared libraries) to examine. If not given, all object files are considered. `info probes all' List the available static probes, from all types. A probe may specify up to twelve arguments. These are available at the point at which the probe is defined--that is, when the current PC is at the probe's location. The arguments are available using the convenience variables (*note Convenience Vars::) `$_probe_arg0'...`$_probe_arg11'. Each probe argument is an integer of the appropriate size; types are not preserved. The convenience variable `$_probe_argc' holds the number of arguments at the current probe point. These variables are always available, but attempts to access them at any location other than a probe point will cause GDB to give an error message.  File: gdb.info, Node: Error in Breakpoints, Next: Breakpoint-related Warnings, Prev: Static Probe Points, Up: Breakpoints 5.1.11 "Cannot insert breakpoints" ---------------------------------- If you request too many active hardware-assisted breakpoints and watchpoints, you will see this error message: Stopped; cannot insert breakpoints. You may have requested too many hardware breakpoints and watchpoints. This message is printed when you attempt to resume the program, since only then GDB knows exactly how many hardware breakpoints and watchpoints it needs to insert. When this message is printed, you need to disable or remove some of the hardware-assisted breakpoints and watchpoints, and then continue.  File: gdb.info, Node: Breakpoint-related Warnings, Prev: Error in Breakpoints, Up: Breakpoints 5.1.12 "Breakpoint address adjusted..." --------------------------------------- Some processor architectures place constraints on the addresses at which breakpoints may be placed. For architectures thus constrained, GDB will attempt to adjust the breakpoint's address to comply with the constraints dictated by the architecture. One example of such an architecture is the Fujitsu FR-V. The FR-V is a VLIW architecture in which a number of RISC-like instructions may be bundled together for parallel execution. The FR-V architecture constrains the location of a breakpoint instruction within such a bundle to the instruction with the lowest address. GDB honors this constraint by adjusting a breakpoint's address to the first in the bundle. It is not uncommon for optimized code to have bundles which contain instructions from different source statements, thus it may happen that a breakpoint's address will be adjusted from one source statement to another. Since this adjustment may significantly alter GDB's breakpoint related behavior from what the user expects, a warning is printed when the breakpoint is first set and also when the breakpoint is hit. A warning like the one below is printed when setting a breakpoint that's been subject to address adjustment: warning: Breakpoint address adjusted from 0x00010414 to 0x00010410. Such warnings are printed both for user settable and GDB's internal breakpoints. If you see one of these warnings, you should verify that a breakpoint set at the adjusted address will have the desired affect. If not, the breakpoint in question may be removed and other breakpoints may be set which will have the desired behavior. E.g., it may be sufficient to place the breakpoint at a later instruction. A conditional breakpoint may also be useful in some cases to prevent the breakpoint from triggering too often. GDB will also issue a warning when stopping at one of these adjusted breakpoints: warning: Breakpoint 1 address previously adjusted from 0x00010414 to 0x00010410. When this warning is encountered, it may be too late to take remedial action except in cases where the breakpoint is hit earlier or more frequently than expected.  File: gdb.info, Node: Continuing and Stepping, Next: Skipping Over Functions and Files, Prev: Breakpoints, Up: Stopping 5.2 Continuing and Stepping =========================== "Continuing" means resuming program execution until your program completes normally. In contrast, "stepping" means executing just one more "step" of your program, where "step" may mean either one line of source code, or one machine instruction (depending on what particular command you use). Either when continuing or when stepping, your program may stop even sooner, due to a breakpoint or a signal. (If it stops due to a signal, you may want to use `handle', or use `signal 0' to resume execution. *Note Signals: Signals.) `continue [IGNORE-COUNT]' `c [IGNORE-COUNT]' `fg [IGNORE-COUNT]' Resume program execution, at the address where your program last stopped; any breakpoints set at that address are bypassed. The optional argument IGNORE-COUNT allows you to specify a further number of times to ignore a breakpoint at this location; its effect is like that of `ignore' (*note Break Conditions: Conditions.). The argument IGNORE-COUNT is meaningful only when your program stopped due to a breakpoint. At other times, the argument to `continue' is ignored. The synonyms `c' and `fg' (for "foreground", as the debugged program is deemed to be the foreground program) are provided purely for convenience, and have exactly the same behavior as `continue'. To resume execution at a different place, you can use `return' (*note Returning from a Function: Returning.) to go back to the calling function; or `jump' (*note Continuing at a Different Address: Jumping.) to go to an arbitrary location in your program. A typical technique for using stepping is to set a breakpoint (*note Breakpoints; Watchpoints; and Catchpoints: Breakpoints.) at the beginning of the function or the section of your program where a problem is believed to lie, run your program until it stops at that breakpoint, and then step through the suspect area, examining the variables that are interesting, until you see the problem happen. `step' Continue running your program until control reaches a different source line, then stop it and return control to GDB. This command is abbreviated `s'. _Warning:_ If you use the `step' command while control is within a function that was compiled without debugging information, execution proceeds until control reaches a function that does have debugging information. Likewise, it will not step into a function which is compiled without debugging information. To step through functions without debugging information, use the `stepi' command, described below. The `step' command only stops at the first instruction of a source line. This prevents the multiple stops that could otherwise occur in `switch' statements, `for' loops, etc. `step' continues to stop if a function that has debugging information is called within the line. In other words, `step' _steps inside_ any functions called within the line. Also, the `step' command only enters a function if there is line number information for the function. Otherwise it acts like the `next' command. This avoids problems when using `cc -gl' on MIPS machines. Previously, `step' entered subroutines if there was any debugging information about the routine. `step COUNT' Continue running as in `step', but do so COUNT times. If a breakpoint is reached, or a signal not related to stepping occurs before COUNT steps, stepping stops right away. `next [COUNT]' Continue to the next source line in the current (innermost) stack frame. This is similar to `step', but function calls that appear within the line of code are executed without stopping. Execution stops when control reaches a different line of code at the original stack level that was executing when you gave the `next' command. This command is abbreviated `n'. An argument COUNT is a repeat count, as for `step'. The `next' command only stops at the first instruction of a source line. This prevents multiple stops that could otherwise occur in `switch' statements, `for' loops, etc. `set step-mode' `set step-mode on' The `set step-mode on' command causes the `step' command to stop at the first instruction of a function which contains no debug line information rather than stepping over it. This is useful in cases where you may be interested in inspecting the machine instructions of a function which has no symbolic info and do not want GDB to automatically skip over this function. `set step-mode off' Causes the `step' command to step over any functions which contains no debug information. This is the default. `show step-mode' Show whether GDB will stop in or step over functions without source line debug information. `finish' Continue running until just after function in the selected stack frame returns. Print the returned value (if any). This command can be abbreviated as `fin'. Contrast this with the `return' command (*note Returning from a Function: Returning.). `until' `u' Continue running until a source line past the current line, in the current stack frame, is reached. This command is used to avoid single stepping through a loop more than once. It is like the `next' command, except that when `until' encounters a jump, it automatically continues execution until the program counter is greater than the address of the jump. This means that when you reach the end of a loop after single stepping though it, `until' makes your program continue execution until it exits the loop. In contrast, a `next' command at the end of a loop simply steps back to the beginning of the loop, which forces you to step through the next iteration. `until' always stops your program if it attempts to exit the current stack frame. `until' may produce somewhat counterintuitive results if the order of machine code does not match the order of the source lines. For example, in the following excerpt from a debugging session, the `f' (`frame') command shows that execution is stopped at line `206'; yet when we use `until', we get to line `195': (gdb) f #0 main (argc=4, argv=0xf7fffae8) at m4.c:206 206 expand_input(); (gdb) until 195 for ( ; argc > 0; NEXTARG) { This happened because, for execution efficiency, the compiler had generated code for the loop closure test at the end, rather than the start, of the loop--even though the test in a C `for'-loop is written before the body of the loop. The `until' command appeared to step back to the beginning of the loop when it advanced to this expression; however, it has not really gone to an earlier statement--not in terms of the actual machine code. `until' with no argument works by means of single instruction stepping, and hence is slower than `until' with an argument. `until LOCATION' `u LOCATION' Continue running your program until either the specified location is reached, or the current stack frame returns. LOCATION is any of the forms described in *note Specify Location::. This form of the command uses temporary breakpoints, and hence is quicker than `until' without an argument. The specified location is actually reached only if it is in the current frame. This implies that `until' can be used to skip over recursive function invocations. For instance in the code below, if the current location is line `96', issuing `until 99' will execute the program up to line `99' in the same invocation of factorial, i.e., after the inner invocations have returned. 94 int factorial (int value) 95 { 96 if (value > 1) { 97 value *= factorial (value - 1); 98 } 99 return (value); 100 } `advance LOCATION' Continue running the program up to the given LOCATION. An argument is required, which should be of one of the forms described in *note Specify Location::. Execution will also stop upon exit from the current stack frame. This command is similar to `until', but `advance' will not skip over recursive function calls, and the target location doesn't have to be in the same frame as the current one. `stepi' `stepi ARG' `si' Execute one machine instruction, then stop and return to the debugger. It is often useful to do `display/i $pc' when stepping by machine instructions. This makes GDB automatically display the next instruction to be executed, each time your program stops. *Note Automatic Display: Auto Display. An argument is a repeat count, as in `step'. `nexti' `nexti ARG' `ni' Execute one machine instruction, but if it is a function call, proceed until the function returns. An argument is a repeat count, as in `next'.  File: gdb.info, Node: Skipping Over Functions and Files, Next: Signals, Prev: Continuing and Stepping, Up: Stopping 5.3 Skipping Over Functions and Files ===================================== The program you are debugging may contain some functions which are uninteresting to debug. The `skip' comand lets you tell GDB to skip a function or all functions in a file when stepping. For example, consider the following C function: 101 int func() 102 { 103 foo(boring()); 104 bar(boring()); 105 } Suppose you wish to step into the functions `foo' and `bar', but you are not interested in stepping through `boring'. If you run `step' at line 103, you'll enter `boring()', but if you run `next', you'll step over both `foo' and `boring'! One solution is to `step' into `boring' and use the `finish' command to immediately exit it. But this can become tedious if `boring' is called from many places. A more flexible solution is to execute `skip boring'. This instructs GDB never to step into `boring'. Now when you execute `step' at line 103, you'll step over `boring' and directly into `foo'. You can also instruct GDB to skip all functions in a file, with, for example, `skip file boring.c'. `skip [LINESPEC]' `skip function [LINESPEC]' After running this command, the function named by LINESPEC or the function containing the line named by LINESPEC will be skipped over when stepping. *Note Specify Location::. If you do not specify LINESPEC, the function you're currently debugging will be skipped. (If you have a function called `file' that you want to skip, use `skip function file'.) `skip file [FILENAME]' After running this command, any function whose source lives in FILENAME will be skipped over when stepping. If you do not specify FILENAME, functions whose source lives in the file you're currently debugging will be skipped. Skips can be listed, deleted, disabled, and enabled, much like breakpoints. These are the commands for managing your list of skips: `info skip [RANGE]' Print details about the specified skip(s). If RANGE is not specified, print a table with details about all functions and files marked for skipping. `info skip' prints the following information about each skip: _Identifier_ A number identifying this skip. _Type_ The type of this skip, either `function' or `file'. _Enabled or Disabled_ Enabled skips are marked with `y'. Disabled skips are marked with `n'. _Address_ For function skips, this column indicates the address in memory of the function being skipped. If you've set a function skip on a function which has not yet been loaded, this field will contain `'. Once a shared library which has the function is loaded, `info skip' will show the function's address here. _What_ For file skips, this field contains the filename being skipped. For functions skips, this field contains the function name and its line number in the file where it is defined. `skip delete [RANGE]' Delete the specified skip(s). If RANGE is not specified, delete all skips. `skip enable [RANGE]' Enable the specified skip(s). If RANGE is not specified, enable all skips. `skip disable [RANGE]' Disable the specified skip(s). If RANGE is not specified, disable all skips.  File: gdb.info, Node: Signals, Next: Thread Stops, Prev: Skipping Over Functions and Files, Up: Stopping 5.4 Signals =========== A signal is an asynchronous event that can happen in a program. The operating system defines the possible kinds of signals, and gives each kind a name and a number. For example, in Unix `SIGINT' is the signal a program gets when you type an interrupt character (often `Ctrl-c'); `SIGSEGV' is the signal a program gets from referencing a place in memory far away from all the areas in use; `SIGALRM' occurs when the alarm clock timer goes off (which happens only if your program has requested an alarm). Some signals, including `SIGALRM', are a normal part of the functioning of your program. Others, such as `SIGSEGV', indicate errors; these signals are "fatal" (they kill your program immediately) if the program has not specified in advance some other way to handle the signal. `SIGINT' does not indicate an error in your program, but it is normally fatal so it can carry out the purpose of the interrupt: to kill the program. GDB has the ability to detect any occurrence of a signal in your program. You can tell GDB in advance what to do for each kind of signal. Normally, GDB is set up to let the non-erroneous signals like `SIGALRM' be silently passed to your program (so as not to interfere with their role in the program's functioning) but to stop your program immediately whenever an error signal happens. You can change these settings with the `handle' command. `info signals' `info handle' Print a table of all the kinds of signals and how GDB has been told to handle each one. You can use this to see the signal numbers of all the defined types of signals. `info signals SIG' Similar, but print information only about the specified signal number. `info handle' is an alias for `info signals'. `catch signal [SIGNAL... | `all']' Set a catchpoint for the indicated signals. *Note Set Catchpoints::, for details about this command. `handle SIGNAL [KEYWORDS...]' Change the way GDB handles signal SIGNAL. SIGNAL can be the number of a signal or its name (with or without the `SIG' at the beginning); a list of signal numbers of the form `LOW-HIGH'; or the word `all', meaning all the known signals. Optional arguments KEYWORDS, described below, say what change to make. The keywords allowed by the `handle' command can be abbreviated. Their full names are: `nostop' GDB should not stop your program when this signal happens. It may still print a message telling you that the signal has come in. `stop' GDB should stop your program when this signal happens. This implies the `print' keyword as well. `print' GDB should print a message when this signal happens. `noprint' GDB should not mention the occurrence of the signal at all. This implies the `nostop' keyword as well. `pass' `noignore' GDB should allow your program to see this signal; your program can handle the signal, or else it may terminate if the signal is fatal and not handled. `pass' and `noignore' are synonyms. `nopass' `ignore' GDB should not allow your program to see this signal. `nopass' and `ignore' are synonyms. When a signal stops your program, the signal is not visible to the program until you continue. Your program sees the signal then, if `pass' is in effect for the signal in question _at that time_. In other words, after GDB reports a signal, you can use the `handle' command with `pass' or `nopass' to control whether your program sees that signal when you continue. The default is set to `nostop', `noprint', `pass' for non-erroneous signals such as `SIGALRM', `SIGWINCH' and `SIGCHLD', and to `stop', `print', `pass' for the erroneous signals. You can also use the `signal' command to prevent your program from seeing a signal, or cause it to see a signal it normally would not see, or to give it any signal at any time. For example, if your program stopped due to some sort of memory reference error, you might store correct values into the erroneous variables and continue, hoping to see more execution; but your program would probably terminate immediately as a result of the fatal signal once it saw the signal. To prevent this, you can continue with `signal 0'. *Note Giving your Program a Signal: Signaling. On some targets, GDB can inspect extra signal information associated with the intercepted signal, before it is actually delivered to the program being debugged. This information is exported by the convenience variable `$_siginfo', and consists of data that is passed by the kernel to the signal handler at the time of the receipt of a signal. The data type of the information itself is target dependent. You can see the data type using the `ptype $_siginfo' command. On Unix systems, it typically corresponds to the standard `siginfo_t' type, as defined in the `signal.h' system header. Here's an example, on a GNU/Linux system, printing the stray referenced address that raised a segmentation fault. (gdb) continue Program received signal SIGSEGV, Segmentation fault. 0x0000000000400766 in main () 69 *(int *)p = 0; (gdb) ptype $_siginfo type = struct { int si_signo; int si_errno; int si_code; union { int _pad[28]; struct {...} _kill; struct {...} _timer; struct {...} _rt; struct {...} _sigchld; struct {...} _sigfault; struct {...} _sigpoll; } _sifields; } (gdb) ptype $_siginfo._sifields._sigfault type = struct { void *si_addr; } (gdb) p $_siginfo._sifields._sigfault.si_addr $1 = (void *) 0x7ffff7ff7000 Depending on target support, `$_siginfo' may also be writable.  File: gdb.info, Node: Thread Stops, Prev: Signals, Up: Stopping 5.5 Stopping and Starting Multi-thread Programs =============================================== GDB supports debugging programs with multiple threads (*note Debugging Programs with Multiple Threads: Threads.). There are two modes of controlling execution of your program within the debugger. In the default mode, referred to as "all-stop mode", when any thread in your program stops (for example, at a breakpoint or while being stepped), all other threads in the program are also stopped by GDB. On some targets, GDB also supports "non-stop mode", in which other threads can continue to run freely while you examine the stopped thread in the debugger. * Menu: * All-Stop Mode:: All threads stop when GDB takes control * Non-Stop Mode:: Other threads continue to execute * Background Execution:: Running your program asynchronously * Thread-Specific Breakpoints:: Controlling breakpoints * Interrupted System Calls:: GDB may interfere with system calls * Observer Mode:: GDB does not alter program behavior  File: gdb.info, Node: All-Stop Mode, Next: Non-Stop Mode, Up: Thread Stops 5.5.1 All-Stop Mode ------------------- In all-stop mode, whenever your program stops under GDB for any reason, _all_ threads of execution stop, not just the current thread. This allows you to examine the overall state of the program, including switching between threads, without worrying that things may change underfoot. Conversely, whenever you restart the program, _all_ threads start executing. _This is true even when single-stepping_ with commands like `step' or `next'. In particular, GDB cannot single-step all threads in lockstep. Since thread scheduling is up to your debugging target's operating system (not controlled by GDB), other threads may execute more than one statement while the current thread completes a single step. Moreover, in general other threads stop in the middle of a statement, rather than at a clean statement boundary, when the program stops. You might even find your program stopped in another thread after continuing or even single-stepping. This happens whenever some other thread runs into a breakpoint, a signal, or an exception before the first thread completes whatever you requested. Whenever GDB stops your program, due to a breakpoint or a signal, it automatically selects the thread where that breakpoint or signal happened. GDB alerts you to the context switch with a message such as `[Switching to Thread N]' to identify the thread. On some OSes, you can modify GDB's default behavior by locking the OS scheduler to allow only a single thread to run. `set scheduler-locking MODE' Set the scheduler locking mode. If it is `off', then there is no locking and any thread may run at any time. If `on', then only the current thread may run when the inferior is resumed. The `step' mode optimizes for single-stepping; it prevents other threads from preempting the current thread while you are stepping, so that the focus of debugging does not change unexpectedly. Other threads only rarely (or never) get a chance to run when you step. They are more likely to run when you `next' over a function call, and they are completely free to run when you use commands like `continue', `until', or `finish'. However, unless another thread hits a breakpoint during its timeslice, GDB does not change the current thread away from the thread that you are debugging. `show scheduler-locking' Display the current scheduler locking mode. By default, when you issue one of the execution commands such as `continue', `next' or `step', GDB allows only threads of the current inferior to run. For example, if GDB is attached to two inferiors, each with two threads, the `continue' command resumes only the two threads of the current inferior. This is useful, for example, when you debug a program that forks and you want to hold the parent stopped (so that, for instance, it doesn't run to exit), while you debug the child. In other situations, you may not be interested in inspecting the current state of any of the processes GDB is attached to, and you may want to resume them all until some breakpoint is hit. In the latter case, you can instruct GDB to allow all threads of all the inferiors to run with the `set schedule-multiple' command. `set schedule-multiple' Set the mode for allowing threads of multiple processes to be resumed when an execution command is issued. When `on', all threads of all processes are allowed to run. When `off', only the threads of the current process are resumed. The default is `off'. The `scheduler-locking' mode takes precedence when set to `on', or while you are stepping and set to `step'. `show schedule-multiple' Display the current mode for resuming the execution of threads of multiple processes.  File: gdb.info, Node: Non-Stop Mode, Next: Background Execution, Prev: All-Stop Mode, Up: Thread Stops 5.5.2 Non-Stop Mode ------------------- For some multi-threaded targets, GDB supports an optional mode of operation in which you can examine stopped program threads in the debugger while other threads continue to execute freely. This minimizes intrusion when debugging live systems, such as programs where some threads have real-time constraints or must continue to respond to external events. This is referred to as "non-stop" mode. In non-stop mode, when a thread stops to report a debugging event, _only_ that thread is stopped; GDB does not stop other threads as well, in contrast to the all-stop mode behavior. Additionally, execution commands such as `continue' and `step' apply by default only to the current thread in non-stop mode, rather than all threads as in all-stop mode. This allows you to control threads explicitly in ways that are not possible in all-stop mode -- for example, stepping one thread while allowing others to run freely, stepping one thread while holding all others stopped, or stepping several threads independently and simultaneously. To enter non-stop mode, use this sequence of commands before you run or attach to your program: # Enable the async interface. set target-async 1 # If using the CLI, pagination breaks non-stop. set pagination off # Finally, turn it on! set non-stop on You can use these commands to manipulate the non-stop mode setting: `set non-stop on' Enable selection of non-stop mode. `set non-stop off' Disable selection of non-stop mode. `show non-stop' Show the current non-stop enablement setting. Note these commands only reflect whether non-stop mode is enabled, not whether the currently-executing program is being run in non-stop mode. In particular, the `set non-stop' preference is only consulted when GDB starts or connects to the target program, and it is generally not possible to switch modes once debugging has started. Furthermore, since not all targets support non-stop mode, even when you have enabled non-stop mode, GDB may still fall back to all-stop operation by default. In non-stop mode, all execution commands apply only to the current thread by default. That is, `continue' only continues one thread. To continue all threads, issue `continue -a' or `c -a'. You can use GDB's background execution commands (*note Background Execution::) to run some threads in the background while you continue to examine or step others from GDB. The MI execution commands (*note GDB/MI Program Execution::) are always executed asynchronously in non-stop mode. Suspending execution is done with the `interrupt' command when running in the background, or `Ctrl-c' during foreground execution. In all-stop mode, this stops the whole process; but in non-stop mode the interrupt applies only to the current thread. To stop the whole program, use `interrupt -a'. Other execution commands do not currently support the `-a' option. In non-stop mode, when a thread stops, GDB doesn't automatically make that thread current, as it does in all-stop mode. This is because the thread stop notifications are asynchronous with respect to GDB's command interpreter, and it would be confusing if GDB unexpectedly changed to a different thread just as you entered a command to operate on the previously current thread.  File: gdb.info, Node: Background Execution, Next: Thread-Specific Breakpoints, Prev: Non-Stop Mode, Up: Thread Stops 5.5.3 Background Execution -------------------------- GDB's execution commands have two variants: the normal foreground (synchronous) behavior, and a background (asynchronous) behavior. In foreground execution, GDB waits for the program to report that some thread has stopped before prompting for another command. In background execution, GDB immediately gives a command prompt so that you can issue other commands while your program runs. You need to explicitly enable asynchronous mode before you can use background execution commands. You can use these commands to manipulate the asynchronous mode setting: `set target-async on' Enable asynchronous mode. `set target-async off' Disable asynchronous mode. `show target-async' Show the current target-async setting. If the target doesn't support async mode, GDB issues an error message if you attempt to use the background execution commands. To specify background execution, add a `&' to the command. For example, the background form of the `continue' command is `continue&', or just `c&'. The execution commands that accept background execution are: `run' *Note Starting your Program: Starting. `attach' *Note Debugging an Already-running Process: Attach. `step' *Note step: Continuing and Stepping. `stepi' *Note stepi: Continuing and Stepping. `next' *Note next: Continuing and Stepping. `nexti' *Note nexti: Continuing and Stepping. `continue' *Note continue: Continuing and Stepping. `finish' *Note finish: Continuing and Stepping. `until' *Note until: Continuing and Stepping. Background execution is especially useful in conjunction with non-stop mode for debugging programs with multiple threads; see *note Non-Stop Mode::. However, you can also use these commands in the normal all-stop mode with the restriction that you cannot issue another execution command until the previous one finishes. Examples of commands that are valid in all-stop mode while the program is running include `help' and `info break'. You can interrupt your program while it is running in the background by using the `interrupt' command. `interrupt' `interrupt -a' Suspend execution of the running program. In all-stop mode, `interrupt' stops the whole process, but in non-stop mode, it stops only the current thread. To stop the whole program in non-stop mode, use `interrupt -a'.  File: gdb.info, Node: Thread-Specific Breakpoints, Next: Interrupted System Calls, Prev: Background Execution, Up: Thread Stops 5.5.4 Thread-Specific Breakpoints --------------------------------- When your program has multiple threads (*note Debugging Programs with Multiple Threads: Threads.), you can choose whether to set breakpoints on all threads, or on a particular thread. `break LINESPEC thread THREADNO' `break LINESPEC thread THREADNO if ...' LINESPEC specifies source lines; there are several ways of writing them (*note Specify Location::), but the effect is always to specify some source line. Use the qualifier `thread THREADNO' with a breakpoint command to specify that you only want GDB to stop the program when a particular thread reaches this breakpoint. THREADNO is one of the numeric thread identifiers assigned by GDB, shown in the first column of the `info threads' display. If you do not specify `thread THREADNO' when you set a breakpoint, the breakpoint applies to _all_ threads of your program. You can use the `thread' qualifier on conditional breakpoints as well; in this case, place `thread THREADNO' before or after the breakpoint condition, like this: (gdb) break frik.c:13 thread 28 if bartab > lim  File: gdb.info, Node: Interrupted System Calls, Next: Observer Mode, Prev: Thread-Specific Breakpoints, Up: Thread Stops 5.5.5 Interrupted System Calls ------------------------------ There is an unfortunate side effect when using GDB to debug multi-threaded programs. If one thread stops for a breakpoint, or for some other reason, and another thread is blocked in a system call, then the system call may return prematurely. This is a consequence of the interaction between multiple threads and the signals that GDB uses to implement breakpoints and other events that stop execution. To handle this problem, your program should check the return value of each system call and react appropriately. This is good programming style anyways. For example, do not write code like this: sleep (10); The call to `sleep' will return early if a different thread stops at a breakpoint or for some other reason. Instead, write this: int unslept = 10; while (unslept > 0) unslept = sleep (unslept); A system call is allowed to return early, so the system is still conforming to its specification. But GDB does cause your multi-threaded program to behave differently than it would without GDB. Also, GDB uses internal breakpoints in the thread library to monitor certain events such as thread creation and thread destruction. When such an event happens, a system call in another thread may return prematurely, even though your program does not appear to stop.  File: gdb.info, Node: Observer Mode, Prev: Interrupted System Calls, Up: Thread Stops 5.5.6 Observer Mode ------------------- If you want to build on non-stop mode and observe program behavior without any chance of disruption by GDB, you can set variables to disable all of the debugger's attempts to modify state, whether by writing memory, inserting breakpoints, etc. These operate at a low level, intercepting operations from all commands. When all of these are set to `off', then GDB is said to be "observer mode". As a convenience, the variable `observer' can be set to disable these, plus enable non-stop mode. Note that GDB will not prevent you from making nonsensical combinations of these settings. For instance, if you have enabled `may-insert-breakpoints' but disabled `may-write-memory', then breakpoints that work by writing trap instructions into the code stream will still not be able to be placed. `set observer on' `set observer off' When set to `on', this disables all the permission variables below (except for `insert-fast-tracepoints'), plus enables non-stop debugging. Setting this to `off' switches back to normal debugging, though remaining in non-stop mode. `show observer' Show whether observer mode is on or off. `set may-write-registers on' `set may-write-registers off' This controls whether GDB will attempt to alter the values of registers, such as with assignment expressions in `print', or the `jump' command. It defaults to `on'. `show may-write-registers' Show the current permission to write registers. `set may-write-memory on' `set may-write-memory off' This controls whether GDB will attempt to alter the contents of memory, such as with assignment expressions in `print'. It defaults to `on'. `show may-write-memory' Show the current permission to write memory. `set may-insert-breakpoints on' `set may-insert-breakpoints off' This controls whether GDB will attempt to insert breakpoints. This affects all breakpoints, including internal breakpoints defined by GDB. It defaults to `on'. `show may-insert-breakpoints' Show the current permission to insert breakpoints. `set may-insert-tracepoints on' `set may-insert-tracepoints off' This controls whether GDB will attempt to insert (regular) tracepoints at the beginning of a tracing experiment. It affects only non-fast tracepoints, fast tracepoints being under the control of `may-insert-fast-tracepoints'. It defaults to `on'. `show may-insert-tracepoints' Show the current permission to insert tracepoints. `set may-insert-fast-tracepoints on' `set may-insert-fast-tracepoints off' This controls whether GDB will attempt to insert fast tracepoints at the beginning of a tracing experiment. It affects only fast tracepoints, regular (non-fast) tracepoints being under the control of `may-insert-tracepoints'. It defaults to `on'. `show may-insert-fast-tracepoints' Show the current permission to insert fast tracepoints. `set may-interrupt on' `set may-interrupt off' This controls whether GDB will attempt to interrupt or stop program execution. When this variable is `off', the `interrupt' command will have no effect, nor will `Ctrl-c'. It defaults to `on'. `show may-interrupt' Show the current permission to interrupt or stop the program.  File: gdb.info, Node: Reverse Execution, Next: Process Record and Replay, Prev: Stopping, Up: Top 6 Running programs backward *************************** When you are debugging a program, it is not unusual to realize that you have gone too far, and some event of interest has already happened. If the target environment supports it, GDB can allow you to "rewind" the program by running it backward. A target environment that supports reverse execution should be able to "undo" the changes in machine state that have taken place as the program was executing normally. Variables, registers etc. should revert to their previous values. Obviously this requires a great deal of sophistication on the part of the target environment; not all target environments can support reverse execution. When a program is executed in reverse, the instructions that have most recently been executed are "un-executed", in reverse order. The program counter runs backward, following the previous thread of execution in reverse. As each instruction is "un-executed", the values of memory and/or registers that were changed by that instruction are reverted to their previous states. After executing a piece of source code in reverse, all side effects of that code should be "undone", and all variables should be returned to their prior values(1). If you are debugging in a target environment that supports reverse execution, GDB provides the following commands. `reverse-continue [IGNORE-COUNT]' `rc [IGNORE-COUNT]' Beginning at the point where your program last stopped, start executing in reverse. Reverse execution will stop for breakpoints and synchronous exceptions (signals), just like normal execution. Behavior of asynchronous signals depends on the target environment. `reverse-step [COUNT]' Run the program backward until control reaches the start of a different source line; then stop it, and return control to GDB. Like the `step' command, `reverse-step' will only stop at the beginning of a source line. It "un-executes" the previously executed source line. If the previous source line included calls to debuggable functions, `reverse-step' will step (backward) into the called function, stopping at the beginning of the _last_ statement in the called function (typically a return statement). Also, as with the `step' command, if non-debuggable functions are called, `reverse-step' will run thru them backward without stopping. `reverse-stepi [COUNT]' Reverse-execute one machine instruction. Note that the instruction to be reverse-executed is _not_ the one pointed to by the program counter, but the instruction executed prior to that one. For instance, if the last instruction was a jump, `reverse-stepi' will take you back from the destination of the jump to the jump instruction itself. `reverse-next [COUNT]' Run backward to the beginning of the previous line executed in the current (innermost) stack frame. If the line contains function calls, they will be "un-executed" without stopping. Starting from the first line of a function, `reverse-next' will take you back to the caller of that function, _before_ the function was called, just as the normal `next' command would take you from the last line of a function back to its return to its caller (2). `reverse-nexti [COUNT]' Like `nexti', `reverse-nexti' executes a single instruction in reverse, except that called functions are "un-executed" atomically. That is, if the previously executed instruction was a return from another function, `reverse-nexti' will continue to execute in reverse until the call to that function (from the current stack frame) is reached. `reverse-finish' Just as the `finish' command takes you to the point where the current function returns, `reverse-finish' takes you to the point where it was called. Instead of ending up at the end of the current function invocation, you end up at the beginning. `set exec-direction' Set the direction of target execution. `set exec-direction reverse' GDB will perform all execution commands in reverse, until the exec-direction mode is changed to "forward". Affected commands include `step, stepi, next, nexti, continue, and finish'. The `return' command cannot be used in reverse mode. `set exec-direction forward' GDB will perform all execution commands in the normal fashion. This is the default. ---------- Footnotes ---------- (1) Note that some side effects are easier to undo than others. For instance, memory and registers are relatively easy, but device I/O is hard. Some targets may be able undo things like device I/O, and some may not. The contract between GDB and the reverse executing target requires only that the target do something reasonable when GDB tells it to execute backwards, and then report the results back to GDB. Whatever the target reports back to GDB, GDB will report back to the user. GDB assumes that the memory and registers that the target reports are in a consistant state, but GDB accepts whatever it is given. (2) Unless the code is too heavily optimized.  File: gdb.info, Node: Process Record and Replay, Next: Stack, Prev: Reverse Execution, Up: Top 7 Recording Inferior's Execution and Replaying It ************************************************* On some platforms, GDB provides a special "process record and replay" target that can record a log of the process execution, and replay it later with both forward and reverse execution commands. When this target is in use, if the execution log includes the record for the next instruction, GDB will debug in "replay mode". In the replay mode, the inferior does not really execute code instructions. Instead, all the events that normally happen during code execution are taken from the execution log. While code is not really executed in replay mode, the values of registers (including the program counter register) and the memory of the inferior are still changed as they normally would. Their contents are taken from the execution log. If the record for the next instruction is not in the execution log, GDB will debug in "record mode". In this mode, the inferior executes normally, and GDB records the execution log for future replay. The process record and replay target supports reverse execution (*note Reverse Execution::), even if the platform on which the inferior runs does not. However, the reverse execution is limited in this case by the range of the instructions recorded in the execution log. In other words, reverse execution on platforms that don't support it directly can only be done in the replay mode. When debugging in the reverse direction, GDB will work in replay mode as long as the execution log includes the record for the previous instruction; otherwise, it will work in record mode, if the platform supports reverse execution, or stop if not. For architecture environments that support process record and replay, GDB provides the following commands: `record METHOD' This command starts the process record and replay target. The recording method can be specified as parameter. Without a parameter the command uses the `full' recording method. The following recording methods are available: `full' Full record/replay recording using GDB's software record and replay implementation. This method allows replaying and reverse execution. `btrace' Hardware-supported instruction recording. This method does not allow replaying and reverse execution. This recording method may not be available on all processors. The process record and replay target can only debug a process that is already running. Therefore, you need first to start the process with the `run' or `start' commands, and then start the recording with the `record METHOD' command. Both `record METHOD' and `rec METHOD' are aliases of `target record-METHOD'. Displaced stepping (*note displaced stepping: Maintenance Commands.) will be automatically disabled when process record and replay target is started. That's because the process record and replay target doesn't support displaced stepping. If the inferior is in the non-stop mode (*note Non-Stop Mode::) or in the asynchronous execution mode (*note Background Execution::), not all recording methods are available. The `full' recording method does not support these two modes. `record stop' Stop the process record and replay target. When process record and replay target stops, the entire execution log will be deleted and the inferior will either be terminated, or will remain in its final state. When you stop the process record and replay target in record mode (at the end of the execution log), the inferior will be stopped at the next instruction that would have been recorded. In other words, if you record for a while and then stop recording, the inferior process will be left in the same state as if the recording never happened. On the other hand, if the process record and replay target is stopped while in replay mode (that is, not at the end of the execution log, but at some earlier point), the inferior process will become "live" at that earlier state, and it will then be possible to continue the usual "live" debugging of the process from that state. When the inferior process exits, or GDB detaches from it, process record and replay target will automatically stop itself. `record save FILENAME' Save the execution log to a file `FILENAME'. Default filename is `gdb_record.PROCESS_ID', where PROCESS_ID is the process ID of the inferior. This command may not be available for all recording methods. `record restore FILENAME' Restore the execution log from a file `FILENAME'. File must have been created with `record save'. `set record full insn-number-max LIMIT' Set the limit of instructions to be recorded for the `full' recording method. Default value is 200000. If LIMIT is a positive number, then GDB will start deleting instructions from the log once the number of the record instructions becomes greater than LIMIT. For every new recorded instruction, GDB will delete the earliest recorded instruction to keep the number of recorded instructions at the limit. (Since deleting recorded instructions loses information, GDB lets you control what happens when the limit is reached, by means of the `stop-at-limit' option, described below.) If LIMIT is zero, GDB will never delete recorded instructions from the execution log. The number of recorded instructions is unlimited in this case. `show record full insn-number-max' Show the limit of instructions to be recorded with the `full' recording method. `set record full stop-at-limit' Control the behavior of the `full' recording method when the number of recorded instructions reaches the limit. If ON (the default), GDB will stop when the limit is reached for the first time and ask you whether you want to stop the inferior or continue running it and recording the execution log. If you decide to continue recording, each new recorded instruction will cause the oldest one to be deleted. If this option is OFF, GDB will automatically delete the oldest record to make room for each new one, without asking. `show record full stop-at-limit' Show the current setting of `stop-at-limit'. `set record full memory-query' Control the behavior when GDB is unable to record memory changes caused by an instruction for the `full' recording method. If ON, GDB will query whether to stop the inferior in that case. If this option is OFF (the default), GDB will automatically ignore the effect of such instructions on memory. Later, when GDB replays this execution log, it will mark the log of this instruction as not accessible, and it will not affect the replay results. `show record full memory-query' Show the current setting of `memory-query'. `info record' Show various statistics about the recording depending on the recording method: `full' For the `full' recording method, it shows the state of process record and its in-memory execution log buffer, including: * Whether in record mode or replay mode. * Lowest recorded instruction number (counting from when the current execution log started recording instructions). * Highest recorded instruction number. * Current instruction about to be replayed (if in replay mode). * Number of instructions contained in the execution log. * Maximum number of instructions that may be contained in the execution log. `btrace' For the `btrace' recording method, it shows the number of instructions that have been recorded and the number of blocks of sequential control-flow that is formed by the recorded instructions. `record delete' When record target runs in replay mode ("in the past"), delete the subsequent execution log and begin to record a new execution log starting from the current address. This means you will abandon the previously recorded "future" and begin recording a new "future". `record instruction-history' Disassembles instructions from the recorded execution log. By default, ten instructions are disassembled. This can be changed using the `set record instruction-history-size' command. Instructions are printed in execution order. There are several ways to specify what part of the execution log to disassemble: `record instruction-history INSN' Disassembles ten instructions starting from instruction number INSN. `record instruction-history INSN, +/-N' Disassembles N instructions around instruction number INSN. If N is preceded with `+', disassembles N instructions after instruction number INSN. If N is preceded with `-', disassembles N instructions before instruction number INSN. `record instruction-history' Disassembles ten more instructions after the last disassembly. `record instruction-history -' Disassembles ten more instructions before the last disassembly. `record instruction-history BEGIN END' Disassembles instructions beginning with instruction number BEGIN until instruction number END. The instruction number END is not included. This command may not be available for all recording methods. `set record instruction-history-size' Define how many instructions to disassemble in the `record instruction-history' command. The default value is 10. `show record instruction-history-size' Show how many instructions to disassemble in the `record instruction-history' command. `record function-call-history' Prints the execution history at function granularity. It prints one line for each sequence of instructions that belong to the same function giving the name of that function, the source lines for this instruction sequence (if the `/l' modifier is specified), and the instructions numbers that form the sequence (if the `/i' modifier is specified). (gdb) list 1, 10 1 void foo (void) 2 { 3 } 4 5 void bar (void) 6 { 7 ... 8 foo (); 9 ... 10 } (gdb) record function-call-history /l 1 foo.c:6-8 bar 2 foo.c:2-3 foo 3 foo.c:9-10 bar By default, ten lines are printed. This can be changed using the `set record function-call-history-size' command. Functions are printed in execution order. There are several ways to specify what to print: `record function-call-history FUNC' Prints ten functions starting from function number FUNC. `record function-call-history FUNC, +/-N' Prints N functions around function number FUNC. If N is preceded with `+', prints N functions after function number FUNC. If N is preceded with `-', prints N functions before function number FUNC. `record function-call-history' Prints ten more functions after the last ten-line print. `record function-call-history -' Prints ten more functions before the last ten-line print. `record function-call-history BEGIN END' Prints functions beginning with function number BEGIN until function number END. The function number END is not included. This command may not be available for all recording methods. `set record function-call-history-size' Define how many lines to print in the `record function-call-history' command. The default value is 10. `show record function-call-history-size' Show how many lines to print in the `record function-call-history' command.  File: gdb.info, Node: Stack, Next: Source, Prev: Process Record and Replay, Up: Top 8 Examining the Stack ********************* When your program has stopped, the first thing you need to know is where it stopped and how it got there. Each time your program performs a function call, information about the call is generated. That information includes the location of the call in your program, the arguments of the call, and the local variables of the function being called. The information is saved in a block of data called a "stack frame". The stack frames are allocated in a region of memory called the "call stack". When your program stops, the GDB commands for examining the stack allow you to see all of this information. One of the stack frames is "selected" by GDB and many GDB commands refer implicitly to the selected frame. In particular, whenever you ask GDB for the value of a variable in your program, the value is found in the selected frame. There are special GDB commands to select whichever frame you are interested in. *Note Selecting a Frame: Selection. When your program stops, GDB automatically selects the currently executing frame and describes it briefly, similar to the `frame' command (*note Information about a Frame: Frame Info.). * Menu: * Frames:: Stack frames * Backtrace:: Backtraces * Selection:: Selecting a frame * Frame Info:: Information on a frame  File: gdb.info, Node: Frames, Next: Backtrace, Up: Stack 8.1 Stack Frames ================ The call stack is divided up into contiguous pieces called "stack frames", or "frames" for short; each frame is the data associated with one call to one function. The frame contains the arguments given to the function, the function's local variables, and the address at which the function is executing. When your program is started, the stack has only one frame, that of the function `main'. This is called the "initial" frame or the "outermost" frame. Each time a function is called, a new frame is made. Each time a function returns, the frame for that function invocation is eliminated. If a function is recursive, there can be many frames for the same function. The frame for the function in which execution is actually occurring is called the "innermost" frame. This is the most recently created of all the stack frames that still exist. Inside your program, stack frames are identified by their addresses. A stack frame consists of many bytes, each of which has its own address; each kind of computer has a convention for choosing one byte whose address serves as the address of the frame. Usually this address is kept in a register called the "frame pointer register" (*note $fp: Registers.) while execution is going on in that frame. GDB assigns numbers to all existing stack frames, starting with zero for the innermost frame, one for the frame that called it, and so on upward. These numbers do not really exist in your program; they are assigned by GDB to give you a way of designating stack frames in GDB commands. Some compilers provide a way to compile functions so that they operate without stack frames. (For example, the GCC option `-fomit-frame-pointer' generates functions without a frame.) This is occasionally done with heavily used library functions to save the frame setup time. GDB has limited facilities for dealing with these function invocations. If the innermost function invocation has no stack frame, GDB nevertheless regards it as though it had a separate frame, which is numbered zero as usual, allowing correct tracing of the function call chain. However, GDB has no provision for frameless functions elsewhere in the stack. `frame ARGS' The `frame' command allows you to move from one stack frame to another, and to print the stack frame you select. ARGS may be either the address of the frame or the stack frame number. Without an argument, `frame' prints the current stack frame. `select-frame' The `select-frame' command allows you to move from one stack frame to another without printing the frame. This is the silent version of `frame'.  File: gdb.info, Node: Backtrace, Next: Selection, Prev: Frames, Up: Stack 8.2 Backtraces ============== A backtrace is a summary of how your program got where it is. It shows one line per frame, for many frames, starting with the currently executing frame (frame zero), followed by its caller (frame one), and on up the stack. `backtrace' `bt' Print a backtrace of the entire stack: one line per frame for all frames in the stack. You can stop the backtrace at any time by typing the system interrupt character, normally `Ctrl-c'. `backtrace N' `bt N' Similar, but print only the innermost N frames. `backtrace -N' `bt -N' Similar, but print only the outermost N frames. `backtrace full' `bt full' `bt full N' `bt full -N' Print the values of the local variables also. N specifies the number of frames to print, as described above. The names `where' and `info stack' (abbreviated `info s') are additional aliases for `backtrace'. In a multi-threaded program, GDB by default shows the backtrace only for the current thread. To display the backtrace for several or all of the threads, use the command `thread apply' (*note thread apply: Threads.). For example, if you type `thread apply all backtrace', GDB will display the backtrace for all the threads; this is handy when you debug a core dump of a multi-threaded program. Each line in the backtrace shows the frame number and the function name. The program counter value is also shown--unless you use `set print address off'. The backtrace also shows the source file name and line number, as well as the arguments to the function. The program counter value is omitted if it is at the beginning of the code for that line number. Here is an example of a backtrace. It was made with the command `bt 3', so it shows the innermost three frames. #0 m4_traceon (obs=0x24eb0, argc=1, argv=0x2b8c8) at builtin.c:993 #1 0x6e38 in expand_macro (sym=0x2b600, data=...) at macro.c:242 #2 0x6840 in expand_token (obs=0x0, t=177664, td=0xf7fffb08) at macro.c:71 (More stack frames follow...) The display for frame zero does not begin with a program counter value, indicating that your program has stopped at the beginning of the code for line `993' of `builtin.c'. The value of parameter `data' in frame 1 has been replaced by `...'. By default, GDB prints the value of a parameter only if it is a scalar (integer, pointer, enumeration, etc). See command `set print frame-arguments' in *note Print Settings:: for more details on how to configure the way function parameter values are printed. If your program was compiled with optimizations, some compilers will optimize away arguments passed to functions if those arguments are never used after the call. Such optimizations generate code that passes arguments through registers, but doesn't store those arguments in the stack frame. GDB has no way of displaying such arguments in stack frames other than the innermost one. Here's what such a backtrace might look like: #0 m4_traceon (obs=0x24eb0, argc=1, argv=0x2b8c8) at builtin.c:993 #1 0x6e38 in expand_macro (sym=) at macro.c:242 #2 0x6840 in expand_token (obs=0x0, t=, td=0xf7fffb08) at macro.c:71 (More stack frames follow...) The values of arguments that were not saved in their stack frames are shown as `'. If you need to display the values of such optimized-out arguments, either deduce that from other variables whose values depend on the one you are interested in, or recompile without optimizations. Most programs have a standard user entry point--a place where system libraries and startup code transition into user code. For C this is `main'(1). When GDB finds the entry function in a backtrace it will terminate the backtrace, to avoid tracing into highly system-specific (and generally uninteresting) code. If you need to examine the startup code, or limit the number of levels in a backtrace, you can change this behavior: `set backtrace past-main' `set backtrace past-main on' Backtraces will continue past the user entry point. `set backtrace past-main off' Backtraces will stop when they encounter the user entry point. This is the default. `show backtrace past-main' Display the current user entry point backtrace policy. `set backtrace past-entry' `set backtrace past-entry on' Backtraces will continue past the internal entry point of an application. This entry point is encoded by the linker when the application is built, and is likely before the user entry point `main' (or equivalent) is called. `set backtrace past-entry off' Backtraces will stop when they encounter the internal entry point of an application. This is the default. `show backtrace past-entry' Display the current internal entry point backtrace policy. `set backtrace limit N' `set backtrace limit 0' Limit the backtrace to N levels. A value of zero means unlimited. `show backtrace limit' Display the current limit on backtrace levels. You can control how file names are displayed. `set filename-display' `set filename-display relative' Display file names relative to the compilation directory. This is the default. `set filename-display basename' Display only basename of a filename. `set filename-display absolute' Display an absolute filename. `show filename-display' Show the current way to display filenames. ---------- Footnotes ---------- (1) Note that embedded programs (the so-called "free-standing" environment) are not required to have a `main' function as the entry point. They could even have multiple entry points.  File: gdb.info, Node: Selection, Next: Frame Info, Prev: Backtrace, Up: Stack 8.3 Selecting a Frame ===================== Most commands for examining the stack and other data in your program work on whichever stack frame is selected at the moment. Here are the commands for selecting a stack frame; all of them finish by printing a brief description of the stack frame just selected. `frame N' `f N' Select frame number N. Recall that frame zero is the innermost (currently executing) frame, frame one is the frame that called the innermost one, and so on. The highest-numbered frame is the one for `main'. `frame ADDR' `f ADDR' Select the frame at address ADDR. This is useful mainly if the chaining of stack frames has been damaged by a bug, making it impossible for GDB to assign numbers properly to all frames. In addition, this can be useful when your program has multiple stacks and switches between them. On the SPARC architecture, `frame' needs two addresses to select an arbitrary frame: a frame pointer and a stack pointer. On the MIPS and Alpha architecture, it needs two addresses: a stack pointer and a program counter. On the 29k architecture, it needs three addresses: a register stack pointer, a program counter, and a memory stack pointer. `up N' Move N frames up the stack. For positive numbers N, this advances toward the outermost frame, to higher frame numbers, to frames that have existed longer. N defaults to one. `down N' Move N frames down the stack. For positive numbers N, this advances toward the innermost frame, to lower frame numbers, to frames that were created more recently. N defaults to one. You may abbreviate `down' as `do'. All of these commands end by printing two lines of output describing the frame. The first line shows the frame number, the function name, the arguments, and the source file and line number of execution in that frame. The second line shows the text of that source line. For example: (gdb) up #1 0x22f0 in main (argc=1, argv=0xf7fffbf4, env=0xf7fffbfc) at env.c:10 10 read_input_file (argv[i]); After such a printout, the `list' command with no arguments prints ten lines centered on the point of execution in the frame. You can also edit the program at the point of execution with your favorite editing program by typing `edit'. *Note Printing Source Lines: List, for details. `up-silently N' `down-silently N' These two commands are variants of `up' and `down', respectively; they differ in that they do their work silently, without causing display of the new frame. They are intended primarily for use in GDB command scripts, where the output might be unnecessary and distracting.  File: gdb.info, Node: Frame Info, Prev: Selection, Up: Stack 8.4 Information About a Frame ============================= There are several other commands to print information about the selected stack frame. `frame' `f' When used without any argument, this command does not change which frame is selected, but prints a brief description of the currently selected stack frame. It can be abbreviated `f'. With an argument, this command is used to select a stack frame. *Note Selecting a Frame: Selection. `info frame' `info f' This command prints a verbose description of the selected stack frame, including: * the address of the frame * the address of the next frame down (called by this frame) * the address of the next frame up (caller of this frame) * the language in which the source code corresponding to this frame is written * the address of the frame's arguments * the address of the frame's local variables * the program counter saved in it (the address of execution in the caller frame) * which registers were saved in the frame The verbose description is useful when something has gone wrong that has made the stack format fail to fit the usual conventions. `info frame ADDR' `info f ADDR' Print a verbose description of the frame at address ADDR, without selecting that frame. The selected frame remains unchanged by this command. This requires the same kind of address (more than one for some architectures) that you specify in the `frame' command. *Note Selecting a Frame: Selection. `info args' Print the arguments of the selected frame, each on a separate line. `info locals' Print the local variables of the selected frame, each on a separate line. These are all variables (declared either static or automatic) accessible at the point of execution of the selected frame.  File: gdb.info, Node: Source, Next: Data, Prev: Stack, Up: Top 9 Examining Source Files ************************ GDB can print parts of your program's source, since the debugging information recorded in the program tells GDB what source files were used to build it. When your program stops, GDB spontaneously prints the line where it stopped. Likewise, when you select a stack frame (*note Selecting a Frame: Selection.), GDB prints the line where execution in that frame has stopped. You can print other portions of source files by explicit command. If you use GDB through its GNU Emacs interface, you may prefer to use Emacs facilities to view source; see *note Using GDB under GNU Emacs: Emacs. * Menu: * List:: Printing source lines * Specify Location:: How to specify code locations * Edit:: Editing source files * Search:: Searching source files * Source Path:: Specifying source directories * Machine Code:: Source and machine code  File: gdb.info, Node: List, Next: Specify Location, Up: Source 9.1 Printing Source Lines ========================= To print lines from a source file, use the `list' command (abbreviated `l'). By default, ten lines are printed. There are several ways to specify what part of the file you want to print; see *note Specify Location::, for the full list. Here are the forms of the `list' command most commonly used: `list LINENUM' Print lines centered around line number LINENUM in the current source file. `list FUNCTION' Print lines centered around the beginning of function FUNCTION. `list' Print more lines. If the last lines printed were printed with a `list' command, this prints lines following the last lines printed; however, if the last line printed was a solitary line printed as part of displaying a stack frame (*note Examining the Stack: Stack.), this prints lines centered around that line. `list -' Print lines just before the lines last printed. By default, GDB prints ten source lines with any of these forms of the `list' command. You can change this using `set listsize': `set listsize COUNT' Make the `list' command display COUNT source lines (unless the `list' argument explicitly specifies some other number). Setting COUNT to 0 means there's no limit. `show listsize' Display the number of lines that `list' prints. Repeating a `list' command with discards the argument, so it is equivalent to typing just `list'. This is more useful than listing the same lines again. An exception is made for an argument of `-'; that argument is preserved in repetition so that each repetition moves up in the source file. In general, the `list' command expects you to supply zero, one or two "linespecs". Linespecs specify source lines; there are several ways of writing them (*note Specify Location::), but the effect is always to specify some source line. Here is a complete description of the possible arguments for `list': `list LINESPEC' Print lines centered around the line specified by LINESPEC. `list FIRST,LAST' Print lines from FIRST to LAST. Both arguments are linespecs. When a `list' command has two linespecs, and the source file of the second linespec is omitted, this refers to the same source file as the first linespec. `list ,LAST' Print lines ending with LAST. `list FIRST,' Print lines starting with FIRST. `list +' Print lines just after the lines last printed. `list -' Print lines just before the lines last printed. `list' As described in the preceding table.  File: gdb.info, Node: Specify Location, Next: Edit, Prev: List, Up: Source 9.2 Specifying a Location ========================= Several GDB commands accept arguments that specify a location of your program's code. Since GDB is a source-level debugger, a location usually specifies some line in the source code; for that reason, locations are also known as "linespecs". Here are all the different ways of specifying a code location that GDB understands: `LINENUM' Specifies the line number LINENUM of the current source file. `-OFFSET' `+OFFSET' Specifies the line OFFSET lines before or after the "current line". For the `list' command, the current line is the last one printed; for the breakpoint commands, this is the line at which execution stopped in the currently selected "stack frame" (*note Frames: Frames, for a description of stack frames.) When used as the second of the two linespecs in a `list' command, this specifies the line OFFSET lines up or down from the first linespec. `FILENAME:LINENUM' Specifies the line LINENUM in the source file FILENAME. If FILENAME is a relative file name, then it will match any source file name with the same trailing components. For example, if FILENAME is `gcc/expr.c', then it will match source file name of `/build/trunk/gcc/expr.c', but not `/build/trunk/libcpp/expr.c' or `/build/trunk/gcc/x-expr.c'. `FUNCTION' Specifies the line that begins the body of the function FUNCTION. For example, in C, this is the line with the open brace. `FUNCTION:LABEL' Specifies the line where LABEL appears in FUNCTION. `FILENAME:FUNCTION' Specifies the line that begins the body of the function FUNCTION in the file FILENAME. You only need the file name with a function name to avoid ambiguity when there are identically named functions in different source files. `LABEL' Specifies the line at which the label named LABEL appears. GDB searches for the label in the function corresponding to the currently selected stack frame. If there is no current selected stack frame (for instance, if the inferior is not running), then GDB will not search for a label. `*ADDRESS' Specifies the program address ADDRESS. For line-oriented commands, such as `list' and `edit', this specifies a source line that contains ADDRESS. For `break' and other breakpoint oriented commands, this can be used to set breakpoints in parts of your program which do not have debugging information or source files. Here ADDRESS may be any expression valid in the current working language (*note working language: Languages.) that specifies a code address. In addition, as a convenience, GDB extends the semantics of expressions used in locations to cover the situations that frequently happen during debugging. Here are the various forms of ADDRESS: `EXPRESSION' Any expression valid in the current working language. `FUNCADDR' An address of a function or procedure derived from its name. In C, C++, Java, Objective-C, Fortran, minimal, and assembly, this is simply the function's name FUNCTION (and actually a special case of a valid expression). In Pascal and Modula-2, this is `&FUNCTION'. In Ada, this is `FUNCTION'Address' (although the Pascal form also works). This form specifies the address of the function's first instruction, before the stack frame and arguments have been set up. `'FILENAME'::FUNCADDR' Like FUNCADDR above, but also specifies the name of the source file explicitly. This is useful if the name of the function does not specify the function unambiguously, e.g., if there are several functions with identical names in different source files. `-pstap|-probe-stap [OBJFILE:[PROVIDER:]]NAME' The GNU/Linux tool `SystemTap' provides a way for applications to embed static probes. *Note Static Probe Points::, for more information on finding and using static probes. This form of linespec specifies the location of such a static probe. If OBJFILE is given, only probes coming from that shared library or executable matching OBJFILE as a regular expression are considered. If PROVIDER is given, then only probes from that provider are considered. If several probes match the spec, GDB will insert a breakpoint at each one of those probes.  File: gdb.info, Node: Edit, Next: Search, Prev: Specify Location, Up: Source 9.3 Editing Source Files ======================== To edit the lines in a source file, use the `edit' command. The editing program of your choice is invoked with the current line set to the active line in the program. Alternatively, there are several ways to specify what part of the file you want to print if you want to see other parts of the program: `edit LOCATION' Edit the source file specified by `location'. Editing starts at that LOCATION, e.g., at the specified source line of the specified file. *Note Specify Location::, for all the possible forms of the LOCATION argument; here are the forms of the `edit' command most commonly used: `edit NUMBER' Edit the current source file with NUMBER as the active line number. `edit FUNCTION' Edit the file containing FUNCTION at the beginning of its definition. 9.3.1 Choosing your Editor -------------------------- You can customize GDB to use any editor you want (1). By default, it is `/bin/ex', but you can change this by setting the environment variable `EDITOR' before using GDB. For example, to configure GDB to use the `vi' editor, you could use these commands with the `sh' shell: EDITOR=/usr/bin/vi export EDITOR gdb ... or in the `csh' shell, setenv EDITOR /usr/bin/vi gdb ... ---------- Footnotes ---------- (1) The only restriction is that your editor (say `ex'), recognizes the following command-line syntax: ex +NUMBER file The optional numeric value +NUMBER specifies the number of the line in the file where to start editing.  File: gdb.info, Node: Search, Next: Source Path, Prev: Edit, Up: Source 9.4 Searching Source Files ========================== There are two commands for searching through the current source file for a regular expression. `forward-search REGEXP' `search REGEXP' The command `forward-search REGEXP' checks each line, starting with the one following the last line listed, for a match for REGEXP. It lists the line that is found. You can use the synonym `search REGEXP' or abbreviate the command name as `fo'. `reverse-search REGEXP' The command `reverse-search REGEXP' checks each line, starting with the one before the last line listed and going backward, for a match for REGEXP. It lists the line that is found. You can abbreviate this command as `rev'.  File: gdb.info, Node: Source Path, Next: Machine Code, Prev: Search, Up: Source 9.5 Specifying Source Directories ================================= Executable programs sometimes do not record the directories of the source files from which they were compiled, just the names. Even when they do, the directories could be moved between the compilation and your debugging session. GDB has a list of directories to search for source files; this is called the "source path". Each time GDB wants a source file, it tries all the directories in the list, in the order they are present in the list, until it finds a file with the desired name. For example, suppose an executable references the file `/usr/src/foo-1.0/lib/foo.c', and our source path is `/mnt/cross'. The file is first looked up literally; if this fails, `/mnt/cross/usr/src/foo-1.0/lib/foo.c' is tried; if this fails, `/mnt/cross/foo.c' is opened; if this fails, an error message is printed. GDB does not look up the parts of the source file name, such as `/mnt/cross/src/foo-1.0/lib/foo.c'. Likewise, the subdirectories of the source path are not searched: if the source path is `/mnt/cross', and the binary refers to `foo.c', GDB would not find it under `/mnt/cross/usr/src/foo-1.0/lib'. Plain file names, relative file names with leading directories, file names containing dots, etc. are all treated as described above; for instance, if the source path is `/mnt/cross', and the source file is recorded as `../lib/foo.c', GDB would first try `../lib/foo.c', then `/mnt/cross/../lib/foo.c', and after that--`/mnt/cross/foo.c'. Note that the executable search path is _not_ used to locate the source files. Whenever you reset or rearrange the source path, GDB clears out any information it has cached about where source files are found and where each line is in the file. When you start GDB, its source path includes only `cdir' and `cwd', in that order. To add other directories, use the `directory' command. The search path is used to find both program source files and GDB script files (read using the `-command' option and `source' command). In addition to the source path, GDB provides a set of commands that manage a list of source path substitution rules. A "substitution rule" specifies how to rewrite source directories stored in the program's debug information in case the sources were moved to a different directory between compilation and debugging. A rule is made of two strings, the first specifying what needs to be rewritten in the path, and the second specifying how it should be rewritten. In *note set substitute-path::, we name these two parts FROM and TO respectively. GDB does a simple string replacement of FROM with TO at the start of the directory part of the source file name, and uses that result instead of the original file name to look up the sources. Using the previous example, suppose the `foo-1.0' tree has been moved from `/usr/src' to `/mnt/cross', then you can tell GDB to replace `/usr/src' in all source path names with `/mnt/cross'. The first lookup will then be `/mnt/cross/foo-1.0/lib/foo.c' in place of the original location of `/usr/src/foo-1.0/lib/foo.c'. To define a source path substitution rule, use the `set substitute-path' command (*note set substitute-path::). To avoid unexpected substitution results, a rule is applied only if the FROM part of the directory name ends at a directory separator. For instance, a rule substituting `/usr/source' into `/mnt/cross' will be applied to `/usr/source/foo-1.0' but not to `/usr/sourceware/foo-2.0'. And because the substitution is applied only at the beginning of the directory name, this rule will not be applied to `/root/usr/source/baz.c' either. In many cases, you can achieve the same result using the `directory' command. However, `set substitute-path' can be more efficient in the case where the sources are organized in a complex tree with multiple subdirectories. With the `directory' command, you need to add each subdirectory of your project. If you moved the entire tree while preserving its internal organization, then `set substitute-path' allows you to direct the debugger to all the sources with one single command. `set substitute-path' is also more than just a shortcut command. The source path is only used if the file at the original location no longer exists. On the other hand, `set substitute-path' modifies the debugger behavior to look at the rewritten location instead. So, if for any reason a source file that is not relevant to your executable is located at the original location, a substitution rule is the only method available to point GDB at the new location. You can configure a default source path substitution rule by configuring GDB with the `--with-relocated-sources=DIR' option. The DIR should be the name of a directory under GDB's configured prefix (set with `--prefix' or `--exec-prefix'), and directory names in debug information under DIR will be adjusted automatically if the installed GDB is moved to a new location. This is useful if GDB, libraries or executables with debug information and corresponding source code are being moved together. `directory DIRNAME ...' `dir DIRNAME ...' Add directory DIRNAME to the front of the source path. Several directory names may be given to this command, separated by `:' (`;' on MS-DOS and MS-Windows, where `:' usually appears as part of absolute file names) or whitespace. You may specify a directory that is already in the source path; this moves it forward, so GDB searches it sooner. You can use the string `$cdir' to refer to the compilation directory (if one is recorded), and `$cwd' to refer to the current working directory. `$cwd' is not the same as `.'--the former tracks the current working directory as it changes during your GDB session, while the latter is immediately expanded to the current directory at the time you add an entry to the source path. `directory' Reset the source path to its default value (`$cdir:$cwd' on Unix systems). This requires confirmation. `set directories PATH-LIST' Set the source path to PATH-LIST. `$cdir:$cwd' are added if missing. `show directories' Print the source path: show which directories it contains. `set substitute-path FROM TO' Define a source path substitution rule, and add it at the end of the current list of existing substitution rules. If a rule with the same FROM was already defined, then the old rule is also deleted. For example, if the file `/foo/bar/baz.c' was moved to `/mnt/cross/baz.c', then the command (gdb) set substitute-path /usr/src /mnt/cross will tell GDB to replace `/usr/src' with `/mnt/cross', which will allow GDB to find the file `baz.c' even though it was moved. In the case when more than one substitution rule have been defined, the rules are evaluated one by one in the order where they have been defined. The first one matching, if any, is selected to perform the substitution. For instance, if we had entered the following commands: (gdb) set substitute-path /usr/src/include /mnt/include (gdb) set substitute-path /usr/src /mnt/src GDB would then rewrite `/usr/src/include/defs.h' into `/mnt/include/defs.h' by using the first rule. However, it would use the second rule to rewrite `/usr/src/lib/foo.c' into `/mnt/src/lib/foo.c'. `unset substitute-path [path]' If a path is specified, search the current list of substitution rules for a rule that would rewrite that path. Delete that rule if found. A warning is emitted by the debugger if no rule could be found. If no path is specified, then all substitution rules are deleted. `show substitute-path [path]' If a path is specified, then print the source path substitution rule which would rewrite that path, if any. If no path is specified, then print all existing source path substitution rules. If your source path is cluttered with directories that are no longer of interest, GDB may sometimes cause confusion by finding the wrong versions of source. You can correct the situation as follows: 1. Use `directory' with no argument to reset the source path to its default value. 2. Use `directory' with suitable arguments to reinstall the directories you want in the source path. You can add all the directories in one command.  File: gdb.info, Node: Machine Code, Prev: Source Path, Up: Source 9.6 Source and Machine Code =========================== You can use the command `info line' to map source lines to program addresses (and vice versa), and the command `disassemble' to display a range of addresses as machine instructions. You can use the command `set disassemble-next-line' to set whether to disassemble next source line when execution stops. When run under GNU Emacs mode, the `info line' command causes the arrow to point to the line specified. Also, `info line' prints addresses in symbolic form as well as hex. `info line LINESPEC' Print the starting and ending addresses of the compiled code for source line LINESPEC. You can specify source lines in any of the ways documented in *note Specify Location::. For example, we can use `info line' to discover the location of the object code for the first line of function `m4_changequote': (gdb) info line m4_changequote Line 895 of "builtin.c" starts at pc 0x634c and ends at 0x6350. We can also inquire (using `*ADDR' as the form for LINESPEC) what source line covers a particular address: (gdb) info line *0x63ff Line 926 of "builtin.c" starts at pc 0x63e4 and ends at 0x6404. After `info line', the default address for the `x' command is changed to the starting address of the line, so that `x/i' is sufficient to begin examining the machine code (*note Examining Memory: Memory.). Also, this address is saved as the value of the convenience variable `$_' (*note Convenience Variables: Convenience Vars.). `disassemble' `disassemble /m' `disassemble /r' This specialized command dumps a range of memory as machine instructions. It can also print mixed source+disassembly by specifying the `/m' modifier and print the raw instructions in hex as well as in symbolic form by specifying the `/r'. The default memory range is the function surrounding the program counter of the selected frame. A single argument to this command is a program counter value; GDB dumps the function surrounding this value. When two arguments are given, they should be separated by a comma, possibly surrounded by whitespace. The arguments specify a range of addresses to dump, in one of two forms: `START,END' the addresses from START (inclusive) to END (exclusive) `START,+LENGTH' the addresses from START (inclusive) to `START+LENGTH' (exclusive). When 2 arguments are specified, the name of the function is also printed (since there could be several functions in the given range). The argument(s) can be any expression yielding a numeric value, such as `0x32c4', `&main+10' or `$pc - 8'. If the range of memory being disassembled contains current program counter, the instruction at that location is shown with a `=>' marker. The following example shows the disassembly of a range of addresses of HP PA-RISC 2.0 code: (gdb) disas 0x32c4, 0x32e4 Dump of assembler code from 0x32c4 to 0x32e4: 0x32c4 : addil 0,dp 0x32c8 : ldw 0x22c(sr0,r1),r26 0x32cc : ldil 0x3000,r31 0x32d0 : ble 0x3f8(sr4,r31) 0x32d4 : ldo 0(r31),rp 0x32d8 : addil -0x800,dp 0x32dc : ldo 0x588(r1),r26 0x32e0 : ldil 0x3000,r31 End of assembler dump. Here is an example showing mixed source+assembly for Intel x86, when the program is stopped just after function prologue: (gdb) disas /m main Dump of assembler code for function main: 5 { 0x08048330 <+0>: push %ebp 0x08048331 <+1>: mov %esp,%ebp 0x08048333 <+3>: sub $0x8,%esp 0x08048336 <+6>: and $0xfffffff0,%esp 0x08048339 <+9>: sub $0x10,%esp 6 printf ("Hello.\n"); => 0x0804833c <+12>: movl $0x8048440,(%esp) 0x08048343 <+19>: call 0x8048284 7 return 0; 8 } 0x08048348 <+24>: mov $0x0,%eax 0x0804834d <+29>: leave 0x0804834e <+30>: ret End of assembler dump. Here is another example showing raw instructions in hex for AMD x86-64, (gdb) disas /r 0x400281,+10 Dump of assembler code from 0x400281 to 0x40028b: 0x0000000000400281: 38 36 cmp %dh,(%rsi) 0x0000000000400283: 2d 36 34 2e 73 sub $0x732e3436,%eax 0x0000000000400288: 6f outsl %ds:(%rsi),(%dx) 0x0000000000400289: 2e 32 00 xor %cs:(%rax),%al End of assembler dump. Addresses cannot be specified as a linespec (*note Specify Location::). So, for example, if you want to disassemble function `bar' in file `foo.c', you must type `disassemble 'foo.c'::bar' and not `disassemble foo.c:bar'. Some architectures have more than one commonly-used set of instruction mnemonics or other syntax. For programs that were dynamically linked and use shared libraries, instructions that call functions or branch to locations in the shared libraries might show a seemingly bogus location--it's actually a location of the relocation table. On some architectures, GDB might be able to resolve these to actual function names. `set disassembly-flavor INSTRUCTION-SET' Select the instruction set to use when disassembling the program via the `disassemble' or `x/i' commands. Currently this command is only defined for the Intel x86 family. You can set INSTRUCTION-SET to either `intel' or `att'. The default is `att', the AT&T flavor used by default by Unix assemblers for x86-based targets. `show disassembly-flavor' Show the current setting of the disassembly flavor. `set disassemble-next-line' `show disassemble-next-line' Control whether or not GDB will disassemble the next source line or instruction when execution stops. If ON, GDB will display disassembly of the next source line when execution of the program being debugged stops. This is _in addition_ to displaying the source line itself, which GDB always does if possible. If the next source line cannot be displayed for some reason (e.g., if GDB cannot find the source file, or there's no line info in the debug info), GDB will display disassembly of the next _instruction_ instead of showing the next source line. If AUTO, GDB will display disassembly of next instruction only if the source line cannot be displayed. This setting causes GDB to display some feedback when you step through a function with no line info or whose source file is unavailable. The default is OFF, which means never display the disassembly of the next line or instruction.  File: gdb.info, Node: Data, Next: Optimized Code, Prev: Source, Up: Top 10 Examining Data ***************** The usual way to examine data in your program is with the `print' command (abbreviated `p'), or its synonym `inspect'. It evaluates and prints the value of an expression of the language your program is written in (*note Using GDB with Different Languages: Languages.). It may also print the expression using a Python-based pretty-printer (*note Pretty Printing::). `print EXPR' `print /F EXPR' EXPR is an expression (in the source language). By default the value of EXPR is printed in a format appropriate to its data type; you can choose a different format by specifying `/F', where F is a letter specifying the format; see *note Output Formats: Output Formats. `print' `print /F' If you omit EXPR, GDB displays the last value again (from the "value history"; *note Value History: Value History.). This allows you to conveniently inspect the same value in an alternative format. A more low-level way of examining data is with the `x' command. It examines data in memory at a specified address and prints it in a specified format. *Note Examining Memory: Memory. If you are interested in information about types, or about how the fields of a struct or a class are declared, use the `ptype EXP' command rather than `print'. *Note Examining the Symbol Table: Symbols. Another way of examining values of expressions and type information is through the Python extension command `explore' (available only if the GDB build is configured with `--with-python'). It offers an interactive way to start at the highest level (or, the most abstract level) of the data type of an expression (or, the data type itself) and explore all the way down to leaf scalar values/fields embedded in the higher level data types. `explore ARG' ARG is either an expression (in the source language), or a type visible in the current context of the program being debugged. The working of the `explore' command can be illustrated with an example. If a data type `struct ComplexStruct' is defined in your C program as struct SimpleStruct { int i; double d; }; struct ComplexStruct { struct SimpleStruct *ss_p; int arr[10]; }; followed by variable declarations as struct SimpleStruct ss = { 10, 1.11 }; struct ComplexStruct cs = { &ss, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } }; then, the value of the variable `cs' can be explored using the `explore' command as follows. (gdb) explore cs The value of `cs' is a struct/class of type `struct ComplexStruct' with the following fields: ss_p = arr = Enter the field number of choice: Since the fields of `cs' are not scalar values, you are being prompted to chose the field you want to explore. Let's say you choose the field `ss_p' by entering `0'. Then, since this field is a pointer, you will be asked if it is pointing to a single value. From the declaration of `cs' above, it is indeed pointing to a single value, hence you enter `y'. If you enter `n', then you will be asked if it were pointing to an array of values, in which case this field will be explored as if it were an array. `cs.ss_p' is a pointer to a value of type `struct SimpleStruct' Continue exploring it as a pointer to a single value [y/n]: y The value of `*(cs.ss_p)' is a struct/class of type `struct SimpleStruct' with the following fields: i = 10 .. (Value of type `int') d = 1.1100000000000001 .. (Value of type `double') Press enter to return to parent value: If the field `arr' of `cs' was chosen for exploration by entering `1' earlier, then since it is as array, you will be prompted to enter the index of the element in the array that you want to explore. `cs.arr' is an array of `int'. Enter the index of the element you want to explore in `cs.arr': 5 `(cs.arr)[5]' is a scalar value of type `int'. (cs.arr)[5] = 4 Press enter to return to parent value: In general, at any stage of exploration, you can go deeper towards the leaf values by responding to the prompts appropriately, or hit the return key to return to the enclosing data structure (the higher level data structure). Similar to exploring values, you can use the `explore' command to explore types. Instead of specifying a value (which is typically a variable name or an expression valid in the current context of the program being debugged), you specify a type name. If you consider the same example as above, your can explore the type `struct ComplexStruct' by passing the argument `struct ComplexStruct' to the `explore' command. (gdb) explore struct ComplexStruct By responding to the prompts appropriately in the subsequent interactive session, you can explore the type `struct ComplexStruct' in a manner similar to how the value `cs' was explored in the above example. The `explore' command also has two sub-commands, `explore value' and `explore type'. The former sub-command is a way to explicitly specify that value exploration of the argument is being invoked, while the latter is a way to explicitly specify that type exploration of the argument is being invoked. `explore value EXPR' This sub-command of `explore' explores the value of the expression EXPR (if EXPR is an expression valid in the current context of the program being debugged). The behavior of this command is identical to that of the behavior of the `explore' command being passed the argument EXPR. `explore type ARG' This sub-command of `explore' explores the type of ARG (if ARG is a type visible in the current context of program being debugged), or the type of the value/expression ARG (if ARG is an expression valid in the current context of the program being debugged). If ARG is a type, then the behavior of this command is identical to that of the `explore' command being passed the argument ARG. If ARG is an expression, then the behavior of this command will be identical to that of the `explore' command being passed the type of ARG as the argument. * Menu: * Expressions:: Expressions * Ambiguous Expressions:: Ambiguous Expressions * Variables:: Program variables * Arrays:: Artificial arrays * Output Formats:: Output formats * Memory:: Examining memory * Auto Display:: Automatic display * Print Settings:: Print settings * Pretty Printing:: Python pretty printing * Value History:: Value history * Convenience Vars:: Convenience variables * Convenience Funs:: Convenience functions * Registers:: Registers * Floating Point Hardware:: Floating point hardware * Vector Unit:: Vector Unit * OS Information:: Auxiliary data provided by operating system * Memory Region Attributes:: Memory region attributes * Dump/Restore Files:: Copy between memory and a file * Core File Generation:: Cause a program dump its core * Character Sets:: Debugging programs that use a different character set than GDB does * Caching Remote Data:: Data caching for remote targets * Searching Memory:: Searching memory for a sequence of bytes  File: gdb.info, Node: Expressions, Next: Ambiguous Expressions, Up: Data 10.1 Expressions ================ `print' and many other GDB commands accept an expression and compute its value. Any kind of constant, variable or operator defined by the programming language you are using is valid in an expression in GDB. This includes conditional expressions, function calls, casts, and string constants. It also includes preprocessor macros, if you compiled your program to include this information; see *note Compilation::. GDB supports array constants in expressions input by the user. The syntax is {ELEMENT, ELEMENT...}. For example, you can use the command `print {1, 2, 3}' to create an array of three integers. If you pass an array to a function or assign it to a program variable, GDB copies the array to memory that is `malloc'ed in the target program. Because C is so widespread, most of the expressions shown in examples in this manual are in C. *Note Using GDB with Different Languages: Languages, for information on how to use expressions in other languages. In this section, we discuss operators that you can use in GDB expressions regardless of your programming language. Casts are supported in all languages, not just in C, because it is so useful to cast a number into a pointer in order to examine a structure at that address in memory. GDB supports these operators, in addition to those common to programming languages: `@' `@' is a binary operator for treating parts of memory as arrays. *Note Artificial Arrays: Arrays, for more information. `::' `::' allows you to specify a variable in terms of the file or function where it is defined. *Note Program Variables: Variables. `{TYPE} ADDR' Refers to an object of type TYPE stored at address ADDR in memory. ADDR may be any expression whose value is an integer or pointer (but parentheses are required around binary operators, just as in a cast). This construct is allowed regardless of what kind of data is normally supposed to reside at ADDR.  File: gdb.info, Node: Ambiguous Expressions, Next: Variables, Prev: Expressions, Up: Data 10.2 Ambiguous Expressions ========================== Expressions can sometimes contain some ambiguous elements. For instance, some programming languages (notably Ada, C++ and Objective-C) permit a single function name to be defined several times, for application in different contexts. This is called "overloading". Another example involving Ada is generics. A "generic package" is similar to C++ templates and is typically instantiated several times, resulting in the same function name being defined in different contexts. In some cases and depending on the language, it is possible to adjust the expression to remove the ambiguity. For instance in C++, you can specify the signature of the function you want to break on, as in `break FUNCTION(TYPES)'. In Ada, using the fully qualified name of your function often makes the expression unambiguous as well. When an ambiguity that needs to be resolved is detected, the debugger has the capability to display a menu of numbered choices for each possibility, and then waits for the selection with the prompt `>'. The first option is always `[0] cancel', and typing `0 ' aborts the current command. If the command in which the expression was used allows more than one choice to be selected, the next option in the menu is `[1] all', and typing `1 ' selects all possible choices. For example, the following session excerpt shows an attempt to set a breakpoint at the overloaded symbol `String::after'. We choose three particular definitions of that function name: (gdb) b String::after [0] cancel [1] all [2] file:String.cc; line number:867 [3] file:String.cc; line number:860 [4] file:String.cc; line number:875 [5] file:String.cc; line number:853 [6] file:String.cc; line number:846 [7] file:String.cc; line number:735 > 2 4 6 Breakpoint 1 at 0xb26c: file String.cc, line 867. Breakpoint 2 at 0xb344: file String.cc, line 875. Breakpoint 3 at 0xafcc: file String.cc, line 846. Multiple breakpoints were set. Use the "delete" command to delete unwanted breakpoints. (gdb) `set multiple-symbols MODE' This option allows you to adjust the debugger behavior when an expression is ambiguous. By default, MODE is set to `all'. If the command with which the expression is used allows more than one choice, then GDB automatically selects all possible choices. For instance, inserting a breakpoint on a function using an ambiguous name results in a breakpoint inserted on each possible match. However, if a unique choice must be made, then GDB uses the menu to help you disambiguate the expression. For instance, printing the address of an overloaded function will result in the use of the menu. When MODE is set to `ask', the debugger always uses the menu when an ambiguity is detected. Finally, when MODE is set to `cancel', the debugger reports an error due to the ambiguity and the command is aborted. `show multiple-symbols' Show the current value of the `multiple-symbols' setting.  File: gdb.info, Node: Variables, Next: Arrays, Prev: Ambiguous Expressions, Up: Data 10.3 Program Variables ====================== The most common kind of expression to use is the name of a variable in your program. Variables in expressions are understood in the selected stack frame (*note Selecting a Frame: Selection.); they must be either: * global (or file-static) or * visible according to the scope rules of the programming language from the point of execution in that frame This means that in the function foo (a) int a; { bar (a); { int b = test (); bar (b); } } you can examine and use the variable `a' whenever your program is executing within the function `foo', but you can only use or examine the variable `b' while your program is executing inside the block where `b' is declared. There is an exception: you can refer to a variable or function whose scope is a single source file even if the current execution point is not in this file. But it is possible to have more than one such variable or function with the same name (in different source files). If that happens, referring to that name has unpredictable effects. If you wish, you can specify a static variable in a particular function or file by using the colon-colon (`::') notation: FILE::VARIABLE FUNCTION::VARIABLE Here FILE or FUNCTION is the name of the context for the static VARIABLE. In the case of file names, you can use quotes to make sure GDB parses the file name as a single word--for example, to print a global value of `x' defined in `f2.c': (gdb) p 'f2.c'::x The `::' notation is normally used for referring to static variables, since you typically disambiguate uses of local variables in functions by selecting the appropriate frame and using the simple name of the variable. However, you may also use this notation to refer to local variables in frames enclosing the selected frame: void foo (int a) { if (a < 10) bar (a); else process (a); /* Stop here */ } int bar (int a) { foo (a + 5); } For example, if there is a breakpoint at the commented line, here is what you might see when the program stops after executing the call `bar(0)': (gdb) p a $1 = 10 (gdb) p bar::a $2 = 5 (gdb) up 2 #2 0x080483d0 in foo (a=5) at foobar.c:12 (gdb) p a $3 = 5 (gdb) p bar::a $4 = 0 These uses of `::' are very rarely in conflict with the very similar use of the same notation in C++. GDB also supports use of the C++ scope resolution operator in GDB expressions. _Warning:_ Occasionally, a local variable may appear to have the wrong value at certain points in a function--just after entry to a new scope, and just before exit. You may see this problem when you are stepping by machine instructions. This is because, on most machines, it takes more than one instruction to set up a stack frame (including local variable definitions); if you are stepping by machine instructions, variables may appear to have the wrong values until the stack frame is completely built. On exit, it usually also takes more than one machine instruction to destroy a stack frame; after you begin stepping through that group of instructions, local variable definitions may be gone. This may also happen when the compiler does significant optimizations. To be sure of always seeing accurate values, turn off all optimization when compiling. Another possible effect of compiler optimizations is to optimize unused variables out of existence, or assign variables to registers (as opposed to memory addresses). Depending on the support for such cases offered by the debug info format used by the compiler, GDB might not be able to display values for such local variables. If that happens, GDB will print a message like this: No symbol "foo" in current context. To solve such problems, either recompile without optimizations, or use a different debug info format, if the compiler supports several such formats. *Note Compilation::, for more information on choosing compiler options. *Note C and C++: C, for more information about debug info formats that are best suited to C++ programs. If you ask to print an object whose contents are unknown to GDB, e.g., because its data type is not completely specified by the debug information, GDB will say `'. *Note incomplete type: Symbols, for more about this. If you append `@entry' string to a function parameter name you get its value at the time the function got called. If the value is not available an error message is printed. Entry values are available only with some compilers. Entry values are normally also printed at the function parameter list according to *note set print entry-values::. Breakpoint 1, d (i=30) at gdb.base/entry-value.c:29 29 i++; (gdb) next 30 e (i); (gdb) print i $1 = 31 (gdb) print i@entry $2 = 30 Strings are identified as arrays of `char' values without specified signedness. Arrays of either `signed char' or `unsigned char' get printed as arrays of 1 byte sized integers. `-fsigned-char' or `-funsigned-char' GCC options have no effect as GDB defines literal string type `"char"' as `char' without a sign. For program code char var0[] = "A"; signed char var1[] = "A"; You get during debugging (gdb) print var0 $1 = "A" (gdb) print var1 $2 = {65 'A', 0 '\0'}  File: gdb.info, Node: Arrays, Next: Output Formats, Prev: Variables, Up: Data 10.4 Artificial Arrays ====================== It is often useful to print out several successive objects of the same type in memory; a section of an array, or an array of dynamically determined size for which only a pointer exists in the program. You can do this by referring to a contiguous span of memory as an "artificial array", using the binary operator `@'. The left operand of `@' should be the first element of the desired array and be an individual object. The right operand should be the desired length of the array. The result is an array value whose elements are all of the type of the left argument. The first element is actually the left argument; the second element comes from bytes of memory immediately following those that hold the first element, and so on. Here is an example. If a program says int *array = (int *) malloc (len * sizeof (int)); you can print the contents of `array' with p *array@len The left operand of `@' must reside in memory. Array values made with `@' in this way behave just like other arrays in terms of subscripting, and are coerced to pointers when used in expressions. Artificial arrays most often appear in expressions via the value history (*note Value History: Value History.), after printing one out. Another way to create an artificial array is to use a cast. This re-interprets a value as if it were an array. The value need not be in memory: (gdb) p/x (short[2])0x12345678 $1 = {0x1234, 0x5678} As a convenience, if you leave the array length out (as in `(TYPE[])VALUE') GDB calculates the size to fill the value (as `sizeof(VALUE)/sizeof(TYPE)': (gdb) p/x (short[])0x12345678 $2 = {0x1234, 0x5678} Sometimes the artificial array mechanism is not quite enough; in moderately complex data structures, the elements of interest may not actually be adjacent--for example, if you are interested in the values of pointers in an array. One useful work-around in this situation is to use a convenience variable (*note Convenience Variables: Convenience Vars.) as a counter in an expression that prints the first interesting value, and then repeat that expression via . For instance, suppose you have an array `dtab' of pointers to structures, and you are interested in the values of a field `fv' in each structure. Here is an example of what you might type: set $i = 0 p dtab[$i++]->fv ...  File: gdb.info, Node: Output Formats, Next: Memory, Prev: Arrays, Up: Data 10.5 Output Formats =================== By default, GDB prints a value according to its data type. Sometimes this is not what you want. For example, you might want to print a number in hex, or a pointer in decimal. Or you might want to view data in memory at a certain address as a character string or as an instruction. To do these things, specify an "output format" when you print a value. The simplest use of output formats is to say how to print a value already computed. This is done by starting the arguments of the `print' command with a slash and a format letter. The format letters supported are: `x' Regard the bits of the value as an integer, and print the integer in hexadecimal. `d' Print as integer in signed decimal. `u' Print as integer in unsigned decimal. `o' Print as integer in octal. `t' Print as integer in binary. The letter `t' stands for "two". (1) `a' Print as an address, both absolute in hexadecimal and as an offset from the nearest preceding symbol. You can use this format used to discover where (in what function) an unknown address is located: (gdb) p/a 0x54320 $3 = 0x54320 <_initialize_vx+396> The command `info symbol 0x54320' yields similar results. *Note info symbol: Symbols. `c' Regard as an integer and print it as a character constant. This prints both the numerical value and its character representation. The character representation is replaced with the octal escape `\nnn' for characters outside the 7-bit ASCII range. Without this format, GDB displays `char', `unsigned char', and `signed char' data as character constants. Single-byte members of vectors are displayed as integer data. `f' Regard the bits of the value as a floating point number and print using typical floating point syntax. `s' Regard as a string, if possible. With this format, pointers to single-byte data are displayed as null-terminated strings and arrays of single-byte data are displayed as fixed-length strings. Other values are displayed in their natural types. Without this format, GDB displays pointers to and arrays of `char', `unsigned char', and `signed char' as strings. Single-byte members of a vector are displayed as an integer array. `r' Print using the `raw' formatting. By default, GDB will use a Python-based pretty-printer, if one is available (*note Pretty Printing::). This typically results in a higher-level display of the value's contents. The `r' format bypasses any Python pretty-printer which might exist. For example, to print the program counter in hex (*note Registers::), type p/x $pc Note that no space is required before the slash; this is because command names in GDB cannot contain a slash. To reprint the last value in the value history with a different format, you can use the `print' command with just a format and no expression. For example, `p/x' reprints the last value in hex. ---------- Footnotes ---------- (1) `b' cannot be used because these format letters are also used with the `x' command, where `b' stands for "byte"; see *note Examining Memory: Memory. gdb-doc-7.6.2/gdb/doc/gdbint.info-10000644000175000017500000110635412250773371015667 0ustar zumbizumbiThis is gdbint.info, produced by makeinfo version 4.13 from ./gdbint.texinfo. INFO-DIR-SECTION Software development START-INFO-DIR-ENTRY * Gdb-Internals: (gdbint). The GNU debugger's internals. END-INFO-DIR-ENTRY Copyright (C) 1990-2013 Free Software Foundation, Inc. Contributed by Cygnus Solutions. Written by John Gilmore. Second Edition by Stan Shebs. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This file documents the internals of the GNU debugger GDB. Copyright (C) 1990-2013 Free Software Foundation, Inc. Contributed by Cygnus Solutions. Written by John Gilmore. Second Edition by Stan Shebs. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".  File: gdbint.info, Node: Top, Next: Summary, Up: (dir) Scope of this Document ********************** This document documents the internals of the GNU debugger, GDB. It includes description of GDB's key algorithms and operations, as well as the mechanisms that adapt GDB to specific hosts and targets. * Menu: * Summary:: * Overall Structure:: * Algorithms:: * User Interface:: * libgdb:: * Values:: * Stack Frames:: * Symbol Handling:: * Language Support:: * Host Definition:: * Target Architecture Definition:: * Target Descriptions:: * Target Vector Definition:: * Native Debugging:: * Support Libraries:: * Coding Standards:: * Misc Guidelines:: * Porting GDB:: * Versions and Branches:: * Start of New Year Procedure:: * Releasing GDB:: * Testsuite:: * Hints:: * GDB Observers:: GDB Currently available observers * GNU Free Documentation License:: The license for this documentation * Concept Index:: * Function and Variable Index::  File: gdbint.info, Node: Summary, Next: Overall Structure, Prev: Top, Up: Top 1 Summary ********* * Menu: * Requirements:: * Contributors::  File: gdbint.info, Node: Requirements, Next: Contributors, Up: Summary 1.1 Requirements ================ Before diving into the internals, you should understand the formal requirements and other expectations for GDB. Although some of these may seem obvious, there have been proposals for GDB that have run counter to these requirements. First of all, GDB is a debugger. It's not designed to be a front panel for embedded systems. It's not a text editor. It's not a shell. It's not a programming environment. GDB is an interactive tool. Although a batch mode is available, GDB's primary role is to interact with a human programmer. GDB should be responsive to the user. A programmer hot on the trail of a nasty bug, and operating under a looming deadline, is going to be very impatient of everything, including the response time to debugger commands. GDB should be relatively permissive, such as for expressions. While the compiler should be picky (or have the option to be made picky), since source code lives for a long time usually, the programmer doing debugging shouldn't be spending time figuring out to mollify the debugger. GDB will be called upon to deal with really large programs. Executable sizes of 50 to 100 megabytes occur regularly, and we've heard reports of programs approaching 1 gigabyte in size. GDB should be able to run everywhere. No other debugger is available for even half as many configurations as GDB supports.  File: gdbint.info, Node: Contributors, Prev: Requirements, Up: Summary 1.2 Contributors ================ The first edition of this document was written by John Gilmore of Cygnus Solutions. The current second edition was written by Stan Shebs of Cygnus Solutions, who continues to update the manual. Over the years, many others have made additions and changes to this document. This section attempts to record the significant contributors to that effort. One of the virtues of free software is that everyone is free to contribute to it; with regret, we cannot actually acknowledge everyone here. _Plea:_ This section has only been added relatively recently (four years after publication of the second edition). Additions to this section are particularly welcome. If you or your friends (or enemies, to be evenhanded) have been unfairly omitted from this list, we would like to add your names! A document such as this relies on being kept up to date by numerous small updates by contributing engineers as they make changes to the code base. The file `ChangeLog' in the GDB distribution approximates a blow-by-blow account. The most prolific contributors to this important, but low profile task are Andrew Cagney (responsible for over half the entries), Daniel Jacobowitz, Mark Kettenis, Jim Blandy and Eli Zaretskii. Eli Zaretskii and Daniel Jacobowitz wrote the sections documenting watchpoints. Jeremy Bennett updated the sections on initializing a new architecture and register representation, and added the section on Frame Interpretation.  File: gdbint.info, Node: Overall Structure, Next: Algorithms, Prev: Summary, Up: Top 2 Overall Structure ******************* GDB consists of three major subsystems: user interface, symbol handling (the "symbol side"), and target system handling (the "target side"). The user interface consists of several actual interfaces, plus supporting code. The symbol side consists of object file readers, debugging info interpreters, symbol table management, source language expression parsing, type and value printing. The target side consists of execution control, stack frame analysis, and physical target manipulation. The target side/symbol side division is not formal, and there are a number of exceptions. For instance, core file support involves symbolic elements (the basic core file reader is in BFD) and target elements (it supplies the contents of memory and the values of registers). Instead, this division is useful for understanding how the minor subsystems should fit together. 2.1 The Symbol Side =================== The symbolic side of GDB can be thought of as "everything you can do in GDB without having a live program running". For instance, you can look at the types of variables, and evaluate many kinds of expressions. 2.2 The Target Side =================== The target side of GDB is the "bits and bytes manipulator". Although it may make reference to symbolic info here and there, most of the target side will run with only a stripped executable available--or even no executable at all, in remote debugging cases. Operations such as disassembly, stack frame crawls, and register display, are able to work with no symbolic info at all. In some cases, such as disassembly, GDB will use symbolic info to present addresses relative to symbols rather than as raw numbers, but it will work either way. 2.3 Configurations ================== "Host" refers to attributes of the system where GDB runs. "Target" refers to the system where the program being debugged executes. In most cases they are the same machine, in which case a third type of "Native" attributes come into play. Defines and include files needed to build on the host are host support. Examples are tty support, system defined types, host byte order, host float format. These are all calculated by `autoconf' when the debugger is built. Defines and information needed to handle the target format are target dependent. Examples are the stack frame format, instruction set, breakpoint instruction, registers, and how to set up and tear down the stack to call a function. Information that is only needed when the host and target are the same, is native dependent. One example is Unix child process support; if the host and target are not the same, calling `fork' to start the target process is a bad idea. The various macros needed for finding the registers in the `upage', running `ptrace', and such are all in the native-dependent files. Another example of native-dependent code is support for features that are really part of the target environment, but which require `#include' files that are only available on the host system. Core file handling and `setjmp' handling are two common cases. When you want to make GDB work as the traditional native debugger on a system, you will need to supply both target and native information. 2.4 Source Tree Structure ========================= The GDB source directory has a mostly flat structure--there are only a few subdirectories. A file's name usually gives a hint as to what it does; for example, `stabsread.c' reads stabs, `dwarf2read.c' reads DWARF 2, etc. Files that are related to some common task have names that share common substrings. For example, `*-thread.c' files deal with debugging threads on various platforms; `*read.c' files deal with reading various kinds of symbol and object files; `inf*.c' files deal with direct control of the "inferior program" (GDB parlance for the program being debugged). There are several dozens of files in the `*-tdep.c' family. `tdep' stands for "target-dependent code"--each of these files implements debug support for a specific target architecture (sparc, mips, etc). Usually, only one of these will be used in a specific GDB configuration (sometimes two, closely related). Similarly, there are many `*-nat.c' files, each one for native debugging on a specific system (e.g., `sparc-linux-nat.c' is for native debugging of Sparc machines running the Linux kernel). The few subdirectories of the source tree are: `cli' Code that implements "CLI", the GDB Command-Line Interpreter. *Note Command Interpreter: User Interface. `gdbserver' Code for the GDB remote server. `gdbtk' Code for Insight, the GDB TK-based GUI front-end. `mi' The "GDB/MI", the GDB Machine Interface interpreter. `signals' Target signal translation code. `tui' Code for "TUI", the GDB Text-mode full-screen User Interface. *Note TUI: User Interface.  File: gdbint.info, Node: Algorithms, Next: User Interface, Prev: Overall Structure, Up: Top 3 Algorithms ************ GDB uses a number of debugging-specific algorithms. They are often not very complicated, but get lost in the thicket of special cases and real-world issues. This chapter describes the basic algorithms and mentions some of the specific target definitions that they use. 3.1 Prologue Analysis ===================== To produce a backtrace and allow the user to manipulate older frames' variables and arguments, GDB needs to find the base addresses of older frames, and discover where those frames' registers have been saved. Since a frame's "callee-saves" registers get saved by younger frames if and when they're reused, a frame's registers may be scattered unpredictably across younger frames. This means that changing the value of a register-allocated variable in an older frame may actually entail writing to a save slot in some younger frame. Modern versions of GCC emit Dwarf call frame information ("CFI"), which describes how to find frame base addresses and saved registers. But CFI is not always available, so as a fallback GDB uses a technique called "prologue analysis" to find frame sizes and saved registers. A prologue analyzer disassembles the function's machine code starting from its entry point, and looks for instructions that allocate frame space, save the stack pointer in a frame pointer register, save registers, and so on. Obviously, this can't be done accurately in general, but it's tractable to do well enough to be very helpful. Prologue analysis predates the GNU toolchain's support for CFI; at one time, prologue analysis was the only mechanism GDB used for stack unwinding at all, when the function calling conventions didn't specify a fixed frame layout. In the olden days, function prologues were generated by hand-written, target-specific code in GCC, and treated as opaque and untouchable by optimizers. Looking at this code, it was usually straightforward to write a prologue analyzer for GDB that would accurately understand all the prologues GCC would generate. However, over time GCC became more aggressive about instruction scheduling, and began to understand more about the semantics of the prologue instructions themselves; in response, GDB's analyzers became more complex and fragile. Keeping the prologue analyzers working as GCC (and the instruction sets themselves) evolved became a substantial task. To try to address this problem, the code in `prologue-value.h' and `prologue-value.c' provides a general framework for writing prologue analyzers that are simpler and more robust than ad-hoc analyzers. When we analyze a prologue using the prologue-value framework, we're really doing "abstract interpretation" or "pseudo-evaluation": running the function's code in simulation, but using conservative approximations of the values registers and memory would hold when the code actually runs. For example, if our function starts with the instruction: addi r1, 42 # add 42 to r1 we don't know exactly what value will be in `r1' after executing this instruction, but we do know it'll be 42 greater than its original value. If we then see an instruction like: addi r1, 22 # add 22 to r1 we still don't know what `r1's' value is, but again, we can say it is now 64 greater than its original value. If the next instruction were: mov r2, r1 # set r2 to r1's value then we can say that `r2's' value is now the original value of `r1' plus 64. It's common for prologues to save registers on the stack, so we'll need to track the values of stack frame slots, as well as the registers. So after an instruction like this: mov (fp+4), r2 then we'd know that the stack slot four bytes above the frame pointer holds the original value of `r1' plus 64. And so on. Of course, this can only go so far before it gets unreasonable. If we wanted to be able to say anything about the value of `r1' after the instruction: xor r1, r3 # exclusive-or r1 and r3, place result in r1 then things would get pretty complex. But remember, we're just doing a conservative approximation; if exclusive-or instructions aren't relevant to prologues, we can just say `r1''s value is now "unknown". We can ignore things that are too complex, if that loss of information is acceptable for our application. So when we say "conservative approximation" here, what we mean is an approximation that is either accurate, or marked "unknown", but never inaccurate. Using this framework, a prologue analyzer is simply an interpreter for machine code, but one that uses conservative approximations for the contents of registers and memory instead of actual values. Starting from the function's entry point, you simulate instructions up to the current PC, or an instruction that you don't know how to simulate. Now you can examine the state of the registers and stack slots you've kept track of. * To see how large your stack frame is, just check the value of the stack pointer register; if it's the original value of the SP minus a constant, then that constant is the stack frame's size. If the SP's value has been marked as "unknown", then that means the prologue has done something too complex for us to track, and we don't know the frame size. * To see where we've saved the previous frame's registers, we just search the values we've tracked -- stack slots, usually, but registers, too, if you want -- for something equal to the register's original value. If the calling conventions suggest a standard place to save a given register, then we can check there first, but really, anything that will get us back the original value will probably work. This does take some work. But prologue analyzers aren't quick-and-simple pattern patching to recognize a few fixed prologue forms any more; they're big, hairy functions. Along with inferior function calls, prologue analysis accounts for a substantial portion of the time needed to stabilize a GDB port. So it's worthwhile to look for an approach that will be easier to understand and maintain. In the approach described above: * It's easier to see that the analyzer is correct: you just see whether the analyzer properly (albeit conservatively) simulates the effect of each instruction. * It's easier to extend the analyzer: you can add support for new instructions, and know that you haven't broken anything that wasn't already broken before. * It's orthogonal: to gather new information, you don't need to complicate the code for each instruction. As long as your domain of conservative values is already detailed enough to tell you what you need, then all the existing instruction simulations are already gathering the right data for you. The file `prologue-value.h' contains detailed comments explaining the framework and how to use it. 3.2 Breakpoint Handling ======================= In general, a breakpoint is a user-designated location in the program where the user wants to regain control if program execution ever reaches that location. There are two main ways to implement breakpoints; either as "hardware" breakpoints or as "software" breakpoints. Hardware breakpoints are sometimes available as a builtin debugging features with some chips. Typically these work by having dedicated register into which the breakpoint address may be stored. If the PC (shorthand for "program counter") ever matches a value in a breakpoint registers, the CPU raises an exception and reports it to GDB. Another possibility is when an emulator is in use; many emulators include circuitry that watches the address lines coming out from the processor, and force it to stop if the address matches a breakpoint's address. A third possibility is that the target already has the ability to do breakpoints somehow; for instance, a ROM monitor may do its own software breakpoints. So although these are not literally "hardware breakpoints", from GDB's point of view they work the same; GDB need not do anything more than set the breakpoint and wait for something to happen. Since they depend on hardware resources, hardware breakpoints may be limited in number; when the user asks for more, GDB will start trying to set software breakpoints. (On some architectures, notably the 32-bit x86 platforms, GDB cannot always know whether there's enough hardware resources to insert all the hardware breakpoints and watchpoints. On those platforms, GDB prints an error message only when the program being debugged is continued.) Software breakpoints require GDB to do somewhat more work. The basic theory is that GDB will replace a program instruction with a trap, illegal divide, or some other instruction that will cause an exception, and then when it's encountered, GDB will take the exception and stop the program. When the user says to continue, GDB will restore the original instruction, single-step, re-insert the trap, and continue on. Since it literally overwrites the program being tested, the program area must be writable, so this technique won't work on programs in ROM. It can also distort the behavior of programs that examine themselves, although such a situation would be highly unusual. Also, the software breakpoint instruction should be the smallest size of instruction, so it doesn't overwrite an instruction that might be a jump target, and cause disaster when the program jumps into the middle of the breakpoint instruction. (Strictly speaking, the breakpoint must be no larger than the smallest interval between instructions that may be jump targets; perhaps there is an architecture where only even-numbered instructions may jumped to.) Note that it's possible for an instruction set not to have any instructions usable for a software breakpoint, although in practice only the ARC has failed to define such an instruction. Basic breakpoint object handling is in `breakpoint.c'. However, much of the interesting breakpoint action is in `infrun.c'. `target_remove_breakpoint (BP_TGT)' `target_insert_breakpoint (BP_TGT)' Insert or remove a software breakpoint at address `BP_TGT->placed_address'. Returns zero for success, non-zero for failure. On input, BP_TGT contains the address of the breakpoint, and is otherwise initialized to zero. The fields of the `struct bp_target_info' pointed to by BP_TGT are updated to contain other information about the breakpoint on output. The field `placed_address' may be updated if the breakpoint was placed at a related address; the field `shadow_contents' contains the real contents of the bytes where the breakpoint has been inserted, if reading memory would return the breakpoint instead of the underlying memory; the field `shadow_len' is the length of memory cached in `shadow_contents', if any; and the field `placed_size' is optionally set and used by the target, if it could differ from `shadow_len'. For example, the remote target `Z0' packet does not require shadowing memory, so `shadow_len' is left at zero. However, the length reported by `gdbarch_breakpoint_from_pc' is cached in `placed_size', so that a matching `z0' packet can be used to remove the breakpoint. `target_remove_hw_breakpoint (BP_TGT)' `target_insert_hw_breakpoint (BP_TGT)' Insert or remove a hardware-assisted breakpoint at address `BP_TGT->placed_address'. Returns zero for success, non-zero for failure. See `target_insert_breakpoint' for a description of the `struct bp_target_info' pointed to by BP_TGT; the `shadow_contents' and `shadow_len' members are not used for hardware breakpoints, but `placed_size' may be. 3.3 Single Stepping =================== 3.4 Signal Handling =================== 3.5 Thread Handling =================== 3.6 Inferior Function Calls =========================== 3.7 Longjmp Support =================== GDB has support for figuring out that the target is doing a `longjmp' and for stopping at the target of the jump, if we are stepping. This is done with a few specialized internal breakpoints, which are visible in the output of the `maint info breakpoint' command. To make this work, you need to define a function called `gdbarch_get_longjmp_target', which will examine the `jmp_buf' structure and extract the `longjmp' target address. Since `jmp_buf' is target specific and typically defined in a target header not available to GDB, you will need to determine the offset of the PC manually and return that; many targets define a `jb_pc_offset' field in the tdep structure to save the value once calculated. 3.8 Watchpoints =============== Watchpoints are a special kind of breakpoints (*note breakpoints: Algorithms.) which break when data is accessed rather than when some instruction is executed. When you have data which changes without your knowing what code does that, watchpoints are the silver bullet to hunt down and kill such bugs. Watchpoints can be either hardware-assisted or not; the latter type is known as "software watchpoints." GDB always uses hardware-assisted watchpoints if they are available, and falls back on software watchpoints otherwise. Typical situations where GDB will use software watchpoints are: * The watched memory region is too large for the underlying hardware watchpoint support. For example, each x86 debug register can watch up to 4 bytes of memory, so trying to watch data structures whose size is more than 16 bytes will cause GDB to use software watchpoints. * The value of the expression to be watched depends on data held in registers (as opposed to memory). * Too many different watchpoints requested. (On some architectures, this situation is impossible to detect until the debugged program is resumed.) Note that x86 debug registers are used both for hardware breakpoints and for watchpoints, so setting too many hardware breakpoints might cause watchpoint insertion to fail. * No hardware-assisted watchpoints provided by the target implementation. Software watchpoints are very slow, since GDB needs to single-step the program being debugged and test the value of the watched expression(s) after each instruction. The rest of this section is mostly irrelevant for software watchpoints. When the inferior stops, GDB tries to establish, among other possible reasons, whether it stopped due to a watchpoint being hit. It first uses `STOPPED_BY_WATCHPOINT' to see if any watchpoint was hit. If not, all watchpoint checking is skipped. Then GDB calls `target_stopped_data_address' exactly once. This method returns the address of the watchpoint which triggered, if the target can determine it. If the triggered address is available, GDB compares the address returned by this method with each watched memory address in each active watchpoint. For data-read and data-access watchpoints, GDB announces every watchpoint that watches the triggered address as being hit. For this reason, data-read and data-access watchpoints _require_ that the triggered address be available; if not, read and access watchpoints will never be considered hit. For data-write watchpoints, if the triggered address is available, GDB considers only those watchpoints which match that address; otherwise, GDB considers all data-write watchpoints. For each data-write watchpoint that GDB considers, it evaluates the expression whose value is being watched, and tests whether the watched value has changed. Watchpoints whose watched values have changed are announced as hit. GDB uses several macros and primitives to support hardware watchpoints: `TARGET_CAN_USE_HARDWARE_WATCHPOINT (TYPE, COUNT, OTHER)' Return the number of hardware watchpoints of type TYPE that are possible to be set. The value is positive if COUNT watchpoints of this type can be set, zero if setting watchpoints of this type is not supported, and negative if COUNT is more than the maximum number of watchpoints of type TYPE that can be set. OTHER is non-zero if other types of watchpoints are currently enabled (there are architectures which cannot set watchpoints of different types at the same time). `TARGET_REGION_OK_FOR_HW_WATCHPOINT (ADDR, LEN)' Return non-zero if hardware watchpoints can be used to watch a region whose address is ADDR and whose length in bytes is LEN. `target_insert_watchpoint (ADDR, LEN, TYPE)' `target_remove_watchpoint (ADDR, LEN, TYPE)' Insert or remove a hardware watchpoint starting at ADDR, for LEN bytes. TYPE is the watchpoint type, one of the possible values of the enumerated data type `target_hw_bp_type', defined by `breakpoint.h' as follows: enum target_hw_bp_type { hw_write = 0, /* Common (write) HW watchpoint */ hw_read = 1, /* Read HW watchpoint */ hw_access = 2, /* Access (read or write) HW watchpoint */ hw_execute = 3 /* Execute HW breakpoint */ }; These two macros should return 0 for success, non-zero for failure. `target_stopped_data_address (ADDR_P)' If the inferior has some watchpoint that triggered, place the address associated with the watchpoint at the location pointed to by ADDR_P and return non-zero. Otherwise, return zero. This is required for data-read and data-access watchpoints. It is not required for data-write watchpoints, but GDB uses it to improve handling of those also. GDB will only call this method once per watchpoint stop, immediately after calling `STOPPED_BY_WATCHPOINT'. If the target's watchpoint indication is sticky, i.e., stays set after resuming, this method should clear it. For instance, the x86 debug control register has sticky triggered flags. `target_watchpoint_addr_within_range (TARGET, ADDR, START, LENGTH)' Check whether ADDR (as returned by `target_stopped_data_address') lies within the hardware-defined watchpoint region described by START and LENGTH. This only needs to be provided if the granularity of a watchpoint is greater than one byte, i.e., if the watchpoint can also trigger on nearby addresses outside of the watched region. `HAVE_STEPPABLE_WATCHPOINT' If defined to a non-zero value, it is not necessary to disable a watchpoint to step over it. Like `gdbarch_have_nonsteppable_watchpoint', this is usually set when watchpoints trigger at the instruction which will perform an interesting read or write. It should be set if there is a temporary disable bit which allows the processor to step over the interesting instruction without raising the watchpoint exception again. `int gdbarch_have_nonsteppable_watchpoint (GDBARCH)' If it returns a non-zero value, GDB should disable a watchpoint to step the inferior over it. This is usually set when watchpoints trigger at the instruction which will perform an interesting read or write. `HAVE_CONTINUABLE_WATCHPOINT' If defined to a non-zero value, it is possible to continue the inferior after a watchpoint has been hit. This is usually set when watchpoints trigger at the instruction following an interesting read or write. `STOPPED_BY_WATCHPOINT (WAIT_STATUS)' Return non-zero if stopped by a watchpoint. WAIT_STATUS is of the type `struct target_waitstatus', defined by `target.h'. Normally, this macro is defined to invoke the function pointed to by the `to_stopped_by_watchpoint' member of the structure (of the type `target_ops', defined on `target.h') that describes the target-specific operations; `to_stopped_by_watchpoint' ignores the WAIT_STATUS argument. GDB does not require the non-zero value returned by `STOPPED_BY_WATCHPOINT' to be 100% correct, so if a target cannot determine for sure whether the inferior stopped due to a watchpoint, it could return non-zero "just in case". 3.8.1 Watchpoints and Threads ----------------------------- GDB only supports process-wide watchpoints, which trigger in all threads. GDB uses the thread ID to make watchpoints act as if they were thread-specific, but it cannot set hardware watchpoints that only trigger in a specific thread. Therefore, even if the target supports threads, per-thread debug registers, and watchpoints which only affect a single thread, it should set the per-thread debug registers for all threads to the same value. On GNU/Linux native targets, this is accomplished by using `ALL_LWPS' in `target_insert_watchpoint' and `target_remove_watchpoint' and by using `linux_set_new_thread' to register a handler for newly created threads. GDB's GNU/Linux support only reports a single event at a time, although multiple events can trigger simultaneously for multi-threaded programs. When multiple events occur, `linux-nat.c' queues subsequent events and returns them the next time the program is resumed. This means that `STOPPED_BY_WATCHPOINT' and `target_stopped_data_address' only need to consult the current thread's state--the thread indicated by `inferior_ptid'. If two threads have hit watchpoints simultaneously, those routines will be called a second time for the second thread. 3.8.2 x86 Watchpoints --------------------- The 32-bit Intel x86 (a.k.a. ia32) processors feature special debug registers designed to facilitate debugging. GDB provides a generic library of functions that x86-based ports can use to implement support for watchpoints and hardware-assisted breakpoints. This subsection documents the x86 watchpoint facilities in GDB. (At present, the library functions read and write debug registers directly, and are thus only available for native configurations.) To use the generic x86 watchpoint support, a port should do the following: * Define the macro `I386_USE_GENERIC_WATCHPOINTS' somewhere in the target-dependent headers. * Include the `config/i386/nm-i386.h' header file _after_ defining `I386_USE_GENERIC_WATCHPOINTS'. * Add `i386-nat.o' to the value of the Make variable `NATDEPFILES' (*note NATDEPFILES: Native Debugging.). * Provide implementations for the `I386_DR_LOW_*' macros described below. Typically, each macro should call a target-specific function which does the real work. The x86 watchpoint support works by maintaining mirror images of the debug registers. Values are copied between the mirror images and the real debug registers via a set of macros which each target needs to provide: `I386_DR_LOW_SET_CONTROL (VAL)' Set the Debug Control (DR7) register to the value VAL. `I386_DR_LOW_SET_ADDR (IDX, ADDR)' Put the address ADDR into the debug register number IDX. `I386_DR_LOW_RESET_ADDR (IDX)' Reset (i.e. zero out) the address stored in the debug register number IDX. `I386_DR_LOW_GET_STATUS' Return the value of the Debug Status (DR6) register. This value is used immediately after it is returned by `I386_DR_LOW_GET_STATUS', so as to support per-thread status register values. For each one of the 4 debug registers (whose indices are from 0 to 3) that store addresses, a reference count is maintained by GDB, to allow sharing of debug registers by several watchpoints. This allows users to define several watchpoints that watch the same expression, but with different conditions and/or commands, without wasting debug registers which are in short supply. GDB maintains the reference counts internally, targets don't have to do anything to use this feature. The x86 debug registers can each watch a region that is 1, 2, or 4 bytes long. The ia32 architecture requires that each watched region be appropriately aligned: 2-byte region on 2-byte boundary, 4-byte region on 4-byte boundary. However, the x86 watchpoint support in GDB can watch unaligned regions and regions larger than 4 bytes (up to 16 bytes) by allocating several debug registers to watch a single region. This allocation of several registers per a watched region is also done automatically without target code intervention. The generic x86 watchpoint support provides the following API for the GDB's application code: `i386_region_ok_for_watchpoint (ADDR, LEN)' The macro `TARGET_REGION_OK_FOR_HW_WATCHPOINT' is set to call this function. It counts the number of debug registers required to watch a given region, and returns a non-zero value if that number is less than 4, the number of debug registers available to x86 processors. `i386_stopped_data_address (ADDR_P)' The target function `target_stopped_data_address' is set to call this function. This function examines the breakpoint condition bits in the DR6 Debug Status register, as returned by the `I386_DR_LOW_GET_STATUS' macro, and returns the address associated with the first bit that is set in DR6. `i386_stopped_by_watchpoint (void)' The macro `STOPPED_BY_WATCHPOINT' is set to call this function. The argument passed to `STOPPED_BY_WATCHPOINT' is ignored. This function examines the breakpoint condition bits in the DR6 Debug Status register, as returned by the `I386_DR_LOW_GET_STATUS' macro, and returns true if any bit is set. Otherwise, false is returned. `i386_insert_watchpoint (ADDR, LEN, TYPE)' `i386_remove_watchpoint (ADDR, LEN, TYPE)' Insert or remove a watchpoint. The macros `target_insert_watchpoint' and `target_remove_watchpoint' are set to call these functions. `i386_insert_watchpoint' first looks for a debug register which is already set to watch the same region for the same access types; if found, it just increments the reference count of that debug register, thus implementing debug register sharing between watchpoints. If no such register is found, the function looks for a vacant debug register, sets its mirrored value to ADDR, sets the mirrored value of DR7 Debug Control register as appropriate for the LEN and TYPE parameters, and then passes the new values of the debug register and DR7 to the inferior by calling `I386_DR_LOW_SET_ADDR' and `I386_DR_LOW_SET_CONTROL'. If more than one debug register is required to cover the given region, the above process is repeated for each debug register. `i386_remove_watchpoint' does the opposite: it resets the address in the mirrored value of the debug register and its read/write and length bits in the mirrored value of DR7, then passes these new values to the inferior via `I386_DR_LOW_RESET_ADDR' and `I386_DR_LOW_SET_CONTROL'. If a register is shared by several watchpoints, each time a `i386_remove_watchpoint' is called, it decrements the reference count, and only calls `I386_DR_LOW_RESET_ADDR' and `I386_DR_LOW_SET_CONTROL' when the count goes to zero. `i386_insert_hw_breakpoint (BP_TGT)' `i386_remove_hw_breakpoint (BP_TGT)' These functions insert and remove hardware-assisted breakpoints. The macros `target_insert_hw_breakpoint' and `target_remove_hw_breakpoint' are set to call these functions. The argument is a `struct bp_target_info *', as described in the documentation for `target_insert_breakpoint'. These functions work like `i386_insert_watchpoint' and `i386_remove_watchpoint', respectively, except that they set up the debug registers to watch instruction execution, and each hardware-assisted breakpoint always requires exactly one debug register. `i386_cleanup_dregs (void)' This function clears all the reference counts, addresses, and control bits in the mirror images of the debug registers. It doesn't affect the actual debug registers in the inferior process. *Notes:* 1. x86 processors support setting watchpoints on I/O reads or writes. However, since no target supports this (as of March 2001), and since `enum target_hw_bp_type' doesn't even have an enumeration for I/O watchpoints, this feature is not yet available to GDB running on x86. 2. x86 processors can enable watchpoints locally, for the current task only, or globally, for all the tasks. For each debug register, there's a bit in the DR7 Debug Control register that determines whether the associated address is watched locally or globally. The current implementation of x86 watchpoint support in GDB always sets watchpoints to be locally enabled, since global watchpoints might interfere with the underlying OS and are probably unavailable in many platforms. 3.9 Checkpoints =============== In the abstract, a checkpoint is a point in the execution history of the program, which the user may wish to return to at some later time. Internally, a checkpoint is a saved copy of the program state, including whatever information is required in order to restore the program to that state at a later time. This can be expected to include the state of registers and memory, and may include external state such as the state of open files and devices. There are a number of ways in which checkpoints may be implemented in gdb, e.g. as corefiles, as forked processes, and as some opaque method implemented on the target side. A corefile can be used to save an image of target memory and register state, which can in principle be restored later -- but corefiles do not typically include information about external entities such as open files. Currently this method is not implemented in gdb. A forked process can save the state of user memory and registers, as well as some subset of external (kernel) state. This method is used to implement checkpoints on Linux, and in principle might be used on other systems. Some targets, e.g. simulators, might have their own built-in method for saving checkpoints, and gdb might be able to take advantage of that capability without necessarily knowing any details of how it is done. 3.10 Observing changes in GDB internals ======================================= In order to function properly, several modules need to be notified when some changes occur in the GDB internals. Traditionally, these modules have relied on several paradigms, the most common ones being hooks and gdb-events. Unfortunately, none of these paradigms was versatile enough to become the standard notification mechanism in GDB. The fact that they only supported one "client" was also a strong limitation. A new paradigm, based on the Observer pattern of the `Design Patterns' book, has therefore been implemented. The goal was to provide a new interface overcoming the issues with the notification mechanisms previously available. This new interface needed to be strongly typed, easy to extend, and versatile enough to be used as the standard interface when adding new notifications. See *note GDB Observers:: for a brief description of the observers currently implemented in GDB. The rationale for the current implementation is also briefly discussed.  File: gdbint.info, Node: User Interface, Next: libgdb, Prev: Algorithms, Up: Top 4 User Interface **************** GDB has several user interfaces, of which the traditional command-line interface is perhaps the most familiar. 4.1 Command Interpreter ======================= The command interpreter in GDB is fairly simple. It is designed to allow for the set of commands to be augmented dynamically, and also has a recursive subcommand capability, where the first argument to a command may itself direct a lookup on a different command list. For instance, the `set' command just starts a lookup on the `setlist' command list, while `set thread' recurses to the `set_thread_cmd_list'. To add commands in general, use `add_cmd'. `add_com' adds to the main command list, and should be used for those commands. The usual place to add commands is in the `_initialize_XYZ' routines at the ends of most source files. To add paired `set' and `show' commands, use `add_setshow_cmd' or `add_setshow_cmd_full'. The former is a slightly simpler interface which is useful when you don't need to further modify the new command structures, while the latter returns the new command structures for manipulation. Before removing commands from the command set it is a good idea to deprecate them for some time. Use `deprecate_cmd' on commands or aliases to set the deprecated flag. `deprecate_cmd' takes a `struct cmd_list_element' as it's first argument. You can use the return value from `add_com' or `add_cmd' to deprecate the command immediately after it is created. The first time a command is used the user will be warned and offered a replacement (if one exists). Note that the replacement string passed to `deprecate_cmd' should be the full name of the command, i.e., the entire string the user should type at the command line. 4.2 UI-Independent Output--the `ui_out' Functions ================================================= The `ui_out' functions present an abstraction level for the GDB output code. They hide the specifics of different user interfaces supported by GDB, and thus free the programmer from the need to write several versions of the same code, one each for every UI, to produce output. 4.2.1 Overview and Terminology ------------------------------ In general, execution of each GDB command produces some sort of output, and can even generate an input request. Output can be generated for the following purposes: * to display a _result_ of an operation; * to convey _info_ or produce side-effects of a requested operation; * to provide a _notification_ of an asynchronous event (including progress indication of a prolonged asynchronous operation); * to display _error messages_ (including warnings); * to show _debug data_; * to _query_ or prompt a user for input (a special case). This section mainly concentrates on how to build result output, although some of it also applies to other kinds of output. Generation of output that displays the results of an operation involves one or more of the following: * output of the actual data * formatting the output as appropriate for console output, to make it easily readable by humans * machine oriented formatting-a more terse formatting to allow for easy parsing by programs which read GDB's output * annotation, whose purpose is to help legacy GUIs to identify interesting parts in the output The `ui_out' routines take care of the first three aspects. Annotations are provided by separate annotation routines. Note that use of annotations for an interface between a GUI and GDB is deprecated. Output can be in the form of a single item, which we call a "field"; a "list" consisting of identical fields; a "tuple" consisting of non-identical fields; or a "table", which is a tuple consisting of a header and a body. In a BNF-like form: ` ==>' `
' `
==>' `{ }' ` ==>' ` ' `<body> ==>' `{<row>}' 4.2.2 General Conventions ------------------------- Most `ui_out' routines are of type `void', the exceptions are `ui_out_stream_new' (which returns a pointer to the newly created object) and the `make_cleanup' routines. The first parameter is always the `ui_out' vector object, a pointer to a `struct ui_out'. The FORMAT parameter is like in `printf' family of functions. When it is present, there must also be a variable list of arguments sufficient used to satisfy the `%' specifiers in the supplied format. When a character string argument is not used in a `ui_out' function call, a `NULL' pointer has to be supplied instead. 4.2.3 Table, Tuple and List Functions ------------------------------------- This section introduces `ui_out' routines for building lists, tuples and tables. The routines to output the actual data items (fields) are presented in the next section. To recap: A "tuple" is a sequence of "fields", each field containing information about an object; a "list" is a sequence of fields where each field describes an identical object. Use the "table" functions when your output consists of a list of rows (tuples) and the console output should include a heading. Use this even when you are listing just one object but you still want the header. Tables can not be nested. Tuples and lists can be nested up to a maximum of five levels. The overall structure of the table output code is something like this: ui_out_table_begin ui_out_table_header ... ui_out_table_body ui_out_tuple_begin ui_out_field_* ... ui_out_tuple_end ... ui_out_table_end Here is the description of table-, tuple- and list-related `ui_out' functions: -- Function: void ui_out_table_begin (struct ui_out *UIOUT, int NBROFCOLS, int NR_ROWS, const char *TBLID) The function `ui_out_table_begin' marks the beginning of the output of a table. It should always be called before any other `ui_out' function for a given table. NBROFCOLS is the number of columns in the table. NR_ROWS is the number of rows in the table. TBLID is an optional string identifying the table. The string pointed to by TBLID is copied by the implementation of `ui_out_table_begin', so the application can free the string if it was `malloc'ed. The companion function `ui_out_table_end', described below, marks the end of the table's output. -- Function: void ui_out_table_header (struct ui_out *UIOUT, int WIDTH, enum ui_align ALIGNMENT, const char *COLHDR) `ui_out_table_header' provides the header information for a single table column. You call this function several times, one each for every column of the table, after `ui_out_table_begin', but before `ui_out_table_body'. The value of WIDTH gives the column width in characters. The value of ALIGNMENT is one of `left', `center', and `right', and it specifies how to align the header: left-justify, center, or right-justify it. COLHDR points to a string that specifies the column header; the implementation copies that string, so column header strings in `malloc'ed storage can be freed after the call. -- Function: void ui_out_table_body (struct ui_out *UIOUT) This function delimits the table header from the table body. -- Function: void ui_out_table_end (struct ui_out *UIOUT) This function signals the end of a table's output. It should be called after the table body has been produced by the list and field output functions. There should be exactly one call to `ui_out_table_end' for each call to `ui_out_table_begin', otherwise the `ui_out' functions will signal an internal error. The output of the tuples that represent the table rows must follow the call to `ui_out_table_body' and precede the call to `ui_out_table_end'. You build a tuple by calling `ui_out_tuple_begin' and `ui_out_tuple_end', with suitable calls to functions which actually output fields between them. -- Function: void ui_out_tuple_begin (struct ui_out *UIOUT, const char *ID) This function marks the beginning of a tuple output. ID points to an optional string that identifies the tuple; it is copied by the implementation, and so strings in `malloc'ed storage can be freed after the call. -- Function: void ui_out_tuple_end (struct ui_out *UIOUT) This function signals an end of a tuple output. There should be exactly one call to `ui_out_tuple_end' for each call to `ui_out_tuple_begin', otherwise an internal GDB error will be signaled. -- Function: struct cleanup * make_cleanup_ui_out_tuple_begin_end (struct ui_out *UIOUT, const char *ID) This function first opens the tuple and then establishes a cleanup (*note Cleanups: Misc Guidelines.) to close the tuple. It provides a convenient and correct implementation of the non-portable(1) code sequence: struct cleanup *old_cleanup; ui_out_tuple_begin (uiout, "..."); old_cleanup = make_cleanup ((void(*)(void *)) ui_out_tuple_end, uiout); -- Function: void ui_out_list_begin (struct ui_out *UIOUT, const char *ID) This function marks the beginning of a list output. ID points to an optional string that identifies the list; it is copied by the implementation, and so strings in `malloc'ed storage can be freed after the call. -- Function: void ui_out_list_end (struct ui_out *UIOUT) This function signals an end of a list output. There should be exactly one call to `ui_out_list_end' for each call to `ui_out_list_begin', otherwise an internal GDB error will be signaled. -- Function: struct cleanup * make_cleanup_ui_out_list_begin_end (struct ui_out *UIOUT, const char *ID) Similar to `make_cleanup_ui_out_tuple_begin_end', this function opens a list and then establishes cleanup (*note Cleanups: Misc Guidelines.) that will close the list. 4.2.4 Item Output Functions --------------------------- The functions described below produce output for the actual data items, or fields, which contain information about the object. Choose the appropriate function accordingly to your particular needs. -- Function: void ui_out_field_fmt (struct ui_out *UIOUT, char *FLDNAME, char *FORMAT, ...) This is the most general output function. It produces the representation of the data in the variable-length argument list according to formatting specifications in FORMAT, a `printf'-like format string. The optional argument FLDNAME supplies the name of the field. The data items themselves are supplied as additional arguments after FORMAT. This generic function should be used only when it is not possible to use one of the specialized versions (see below). -- Function: void ui_out_field_int (struct ui_out *UIOUT, const char *FLDNAME, int VALUE) This function outputs a value of an `int' variable. It uses the `"%d"' output conversion specification. FLDNAME specifies the name of the field. -- Function: void ui_out_field_fmt_int (struct ui_out *UIOUT, int WIDTH, enum ui_align ALIGNMENT, const char *FLDNAME, int VALUE) This function outputs a value of an `int' variable. It differs from `ui_out_field_int' in that the caller specifies the desired WIDTH and ALIGNMENT of the output. FLDNAME specifies the name of the field. -- Function: void ui_out_field_core_addr (struct ui_out *UIOUT, const char *FLDNAME, struct gdbarch *GDBARCH, CORE_ADDR ADDRESS) This function outputs an address as appropriate for GDBARCH. -- Function: void ui_out_field_string (struct ui_out *UIOUT, const char *FLDNAME, const char *STRING) This function outputs a string using the `"%s"' conversion specification. Sometimes, there's a need to compose your output piece by piece using functions that operate on a stream, such as `value_print' or `fprintf_symbol_filtered'. These functions accept an argument of the type `struct ui_file *', a pointer to a `ui_file' object used to store the data stream used for the output. When you use one of these functions, you need a way to pass their results stored in a `ui_file' object to the `ui_out' functions. To this end, you first create a `ui_stream' object by calling `ui_out_stream_new', pass the `stream' member of that `ui_stream' object to `value_print' and similar functions, and finally call `ui_out_field_stream' to output the field you constructed. When the `ui_stream' object is no longer needed, you should destroy it and free its memory by calling `ui_out_stream_delete'. -- Function: struct ui_stream * ui_out_stream_new (struct ui_out *UIOUT) This function creates a new `ui_stream' object which uses the same output methods as the `ui_out' object whose pointer is passed in UIOUT. It returns a pointer to the newly created `ui_stream' object. -- Function: void ui_out_stream_delete (struct ui_stream *STREAMBUF) This functions destroys a `ui_stream' object specified by STREAMBUF. -- Function: void ui_out_field_stream (struct ui_out *UIOUT, const char *FIELDNAME, struct ui_stream *STREAMBUF) This function consumes all the data accumulated in `streambuf->stream' and outputs it like `ui_out_field_string' does. After a call to `ui_out_field_stream', the accumulated data no longer exists, but the stream is still valid and may be used for producing more fields. *Important:* If there is any chance that your code could bail out before completing output generation and reaching the point where `ui_out_stream_delete' is called, it is necessary to set up a cleanup, to avoid leaking memory and other resources. Here's a skeleton code to do that: struct ui_stream *mybuf = ui_out_stream_new (uiout); struct cleanup *old = make_cleanup (ui_out_stream_delete, mybuf); ... do_cleanups (old); If the function already has the old cleanup chain set (for other kinds of cleanups), you just have to add your cleanup to it: mybuf = ui_out_stream_new (uiout); make_cleanup (ui_out_stream_delete, mybuf); Note that with cleanups in place, you should not call `ui_out_stream_delete' directly, or you would attempt to free the same buffer twice. 4.2.5 Utility Output Functions ------------------------------ -- Function: void ui_out_field_skip (struct ui_out *UIOUT, const char *FLDNAME) This function skips a field in a table. Use it if you have to leave an empty field without disrupting the table alignment. The argument FLDNAME specifies a name for the (missing) filed. -- Function: void ui_out_text (struct ui_out *UIOUT, const char *STRING) This function outputs the text in STRING in a way that makes it easy to be read by humans. For example, the console implementation of this method filters the text through a built-in pager, to prevent it from scrolling off the visible portion of the screen. Use this function for printing relatively long chunks of text around the actual field data: the text it produces is not aligned according to the table's format. Use `ui_out_field_string' to output a string field, and use `ui_out_message', described below, to output short messages. -- Function: void ui_out_spaces (struct ui_out *UIOUT, int NSPACES) This function outputs NSPACES spaces. It is handy to align the text produced by `ui_out_text' with the rest of the table or list. -- Function: void ui_out_message (struct ui_out *UIOUT, int VERBOSITY, const char *FORMAT, ...) This function produces a formatted message, provided that the current verbosity level is at least as large as given by VERBOSITY. The current verbosity level is specified by the user with the `set verbositylevel' command.(2) -- Function: void ui_out_wrap_hint (struct ui_out *UIOUT, char *INDENT) This function gives the console output filter (a paging filter) a hint of where to break lines which are too long. Ignored for all other output consumers. INDENT, if non-`NULL', is the string to be printed to indent the wrapped text on the next line; it must remain accessible until the next call to `ui_out_wrap_hint', or until an explicit newline is produced by one of the other functions. If INDENT is `NULL', the wrapped text will not be indented. -- Function: void ui_out_flush (struct ui_out *UIOUT) This function flushes whatever output has been accumulated so far, if the UI buffers output. 4.2.6 Examples of Use of `ui_out' functions ------------------------------------------- This section gives some practical examples of using the `ui_out' functions to generalize the old console-oriented code in GDB. The examples all come from functions defined on the `breakpoints.c' file. This example, from the `breakpoint_1' function, shows how to produce a table. The original code was: if (!found_a_breakpoint++) { annotate_breakpoints_headers (); annotate_field (0); printf_filtered ("Num "); annotate_field (1); printf_filtered ("Type "); annotate_field (2); printf_filtered ("Disp "); annotate_field (3); printf_filtered ("Enb "); if (addressprint) { annotate_field (4); printf_filtered ("Address "); } annotate_field (5); printf_filtered ("What\n"); annotate_breakpoints_table (); } Here's the new version: nr_printable_breakpoints = ...; if (addressprint) ui_out_table_begin (ui, 6, nr_printable_breakpoints, "BreakpointTable"); else ui_out_table_begin (ui, 5, nr_printable_breakpoints, "BreakpointTable"); if (nr_printable_breakpoints > 0) annotate_breakpoints_headers (); if (nr_printable_breakpoints > 0) annotate_field (0); ui_out_table_header (uiout, 3, ui_left, "number", "Num"); /* 1 */ if (nr_printable_breakpoints > 0) annotate_field (1); ui_out_table_header (uiout, 14, ui_left, "type", "Type"); /* 2 */ if (nr_printable_breakpoints > 0) annotate_field (2); ui_out_table_header (uiout, 4, ui_left, "disp", "Disp"); /* 3 */ if (nr_printable_breakpoints > 0) annotate_field (3); ui_out_table_header (uiout, 3, ui_left, "enabled", "Enb"); /* 4 */ if (addressprint) { if (nr_printable_breakpoints > 0) annotate_field (4); if (print_address_bits <= 32) ui_out_table_header (uiout, 10, ui_left, "addr", "Address");/* 5 */ else ui_out_table_header (uiout, 18, ui_left, "addr", "Address");/* 5 */ } if (nr_printable_breakpoints > 0) annotate_field (5); ui_out_table_header (uiout, 40, ui_noalign, "what", "What"); /* 6 */ ui_out_table_body (uiout); if (nr_printable_breakpoints > 0) annotate_breakpoints_table (); This example, from the `print_one_breakpoint' function, shows how to produce the actual data for the table whose structure was defined in the above example. The original code was: annotate_record (); annotate_field (0); printf_filtered ("%-3d ", b->number); annotate_field (1); if ((int)b->type > (sizeof(bptypes)/sizeof(bptypes[0])) || ((int) b->type != bptypes[(int) b->type].type)) internal_error ("bptypes table does not describe type #%d.", (int)b->type); printf_filtered ("%-14s ", bptypes[(int)b->type].description); annotate_field (2); printf_filtered ("%-4s ", bpdisps[(int)b->disposition]); annotate_field (3); printf_filtered ("%-3c ", bpenables[(int)b->enable]); ... This is the new version: annotate_record (); ui_out_tuple_begin (uiout, "bkpt"); annotate_field (0); ui_out_field_int (uiout, "number", b->number); annotate_field (1); if (((int) b->type > (sizeof (bptypes) / sizeof (bptypes[0]))) || ((int) b->type != bptypes[(int) b->type].type)) internal_error ("bptypes table does not describe type #%d.", (int) b->type); ui_out_field_string (uiout, "type", bptypes[(int)b->type].description); annotate_field (2); ui_out_field_string (uiout, "disp", bpdisps[(int)b->disposition]); annotate_field (3); ui_out_field_fmt (uiout, "enabled", "%c", bpenables[(int)b->enable]); ... This example, also from `print_one_breakpoint', shows how to produce a complicated output field using the `print_expression' functions which requires a stream to be passed. It also shows how to automate stream destruction with cleanups. The original code was: annotate_field (5); print_expression (b->exp, gdb_stdout); The new version is: struct ui_stream *stb = ui_out_stream_new (uiout); struct cleanup *old_chain = make_cleanup_ui_out_stream_delete (stb); ... annotate_field (5); print_expression (b->exp, stb->stream); ui_out_field_stream (uiout, "what", local_stream); This example, also from `print_one_breakpoint', shows how to use `ui_out_text' and `ui_out_field_string'. The original code was: annotate_field (5); if (b->dll_pathname == NULL) printf_filtered ("<any library> "); else printf_filtered ("library \"%s\" ", b->dll_pathname); It became: annotate_field (5); if (b->dll_pathname == NULL) { ui_out_field_string (uiout, "what", "<any library>"); ui_out_spaces (uiout, 1); } else { ui_out_text (uiout, "library \""); ui_out_field_string (uiout, "what", b->dll_pathname); ui_out_text (uiout, "\" "); } The following example from `print_one_breakpoint' shows how to use `ui_out_field_int' and `ui_out_spaces'. The original code was: annotate_field (5); if (b->forked_inferior_pid != 0) printf_filtered ("process %d ", b->forked_inferior_pid); It became: annotate_field (5); if (b->forked_inferior_pid != 0) { ui_out_text (uiout, "process "); ui_out_field_int (uiout, "what", b->forked_inferior_pid); ui_out_spaces (uiout, 1); } Here's an example of using `ui_out_field_string'. The original code was: annotate_field (5); if (b->exec_pathname != NULL) printf_filtered ("program \"%s\" ", b->exec_pathname); It became: annotate_field (5); if (b->exec_pathname != NULL) { ui_out_text (uiout, "program \""); ui_out_field_string (uiout, "what", b->exec_pathname); ui_out_text (uiout, "\" "); } Finally, here's an example of printing an address. The original code: annotate_field (4); printf_filtered ("%s ", hex_string_custom ((unsigned long) b->address, 8)); It became: annotate_field (4); ui_out_field_core_addr (uiout, "Address", b->address); 4.3 Console Printing ==================== 4.4 TUI ======= ---------- Footnotes ---------- (1) The function cast is not portable ISO C. (2) As of this writing (April 2001), setting verbosity level is not yet implemented, and is always returned as zero. So calling `ui_out_message' with a VERBOSITY argument more than zero will cause the message to never be printed.  File: gdbint.info, Node: libgdb, Next: Values, Prev: User Interface, Up: Top 5 libgdb ******** 5.1 libgdb 1.0 ============== `libgdb' 1.0 was an abortive project of years ago. The theory was to provide an API to GDB's functionality. 5.2 libgdb 2.0 ============== `libgdb' 2.0 is an ongoing effort to update GDB so that is better able to support graphical and other environments. Since `libgdb' development is on-going, its architecture is still evolving. The following components have so far been identified: * Observer - `gdb-events.h'. * Builder - `ui-out.h' * Event Loop - `event-loop.h' * Library - `gdb.h' The model that ties these components together is described below. 5.3 The `libgdb' Model ====================== A client of `libgdb' interacts with the library in two ways. * As an observer (using `gdb-events') receiving notifications from `libgdb' of any internal state changes (break point changes, run state, etc). * As a client querying `libgdb' (using the `ui-out' builder) to obtain various status values from GDB. Since `libgdb' could have multiple clients (e.g., a GUI supporting the existing GDB CLI), those clients must co-operate when controlling `libgdb'. In particular, a client must ensure that `libgdb' is idle (i.e. no other client is using `libgdb') before responding to a `gdb-event' by making a query. 5.4 CLI support =============== At present GDB's CLI is very much entangled in with the core of `libgdb'. Consequently, a client wishing to include the CLI in their interface needs to carefully co-ordinate its own and the CLI's requirements. It is suggested that the client set `libgdb' up to be bi-modal (alternate between CLI and client query modes). The notes below sketch out the theory: * The client registers itself as an observer of `libgdb'. * The client create and install `cli-out' builder using its own versions of the `ui-file' `gdb_stderr', `gdb_stdtarg' and `gdb_stdout' streams. * The client creates a separate custom `ui-out' builder that is only used while making direct queries to `libgdb'. When the client receives input intended for the CLI, it simply passes it along. Since the `cli-out' builder is installed by default, all the CLI output in response to that command is routed (pronounced rooted) through to the client controlled `gdb_stdout' et. al. streams. At the same time, the client is kept abreast of internal changes by virtue of being a `libgdb' observer. The only restriction on the client is that it must wait until `libgdb' becomes idle before initiating any queries (using the client's custom builder). 5.5 `libgdb' components ======================= Observer - `gdb-events.h' ------------------------- `gdb-events' provides the client with a very raw mechanism that can be used to implement an observer. At present it only allows for one observer and that observer must, internally, handle the need to delay the processing of any event notifications until after `libgdb' has finished the current command. Builder - `ui-out.h' -------------------- `ui-out' provides the infrastructure necessary for a client to create a builder. That builder is then passed down to `libgdb' when doing any queries. Event Loop - `event-loop.h' --------------------------- `event-loop', currently non-re-entrant, provides a simple event loop. A client would need to either plug its self into this loop or, implement a new event-loop that GDB would use. The event-loop will eventually be made re-entrant. This is so that GDB can better handle the problem of some commands blocking instead of returning. Library - `gdb.h' ----------------- `libgdb' is the most obvious component of this system. It provides the query interface. Each function is parameterized by a `ui-out' builder. The result of the query is constructed using that builder before the query function returns.  File: gdbint.info, Node: Values, Next: Stack Frames, Prev: libgdb, Up: Top 6 Values ******** 6.1 Values ========== GDB uses `struct value', or "values", as an internal abstraction for the representation of a variety of inferior objects and GDB convenience objects. Values have an associated `struct type', that describes a virtual view of the raw data or object stored in or accessed through the value. A value is in addition discriminated by its lvalue-ness, given its `enum lval_type' enumeration type: ``not_lval'' This value is not an lval. It can't be assigned to. ``lval_memory'' This value represents an object in memory. ``lval_register'' This value represents an object that lives in a register. ``lval_internalvar'' Represents the value of an internal variable. ``lval_internalvar_component'' Represents part of a GDB internal variable. E.g., a structure field. ``lval_computed'' These are "computed" values. They allow creating specialized value objects for specific purposes, all abstracted away from the core value support code. The creator of such a value writes specialized functions to handle the reading and writing to/from the value's backend data, and optionally, a "copy operator" and a "destructor". Pointers to these functions are stored in a `struct lval_funcs' instance (declared in `value.h'), and passed to the `allocate_computed_value' function, as in the example below. static void nil_value_read (struct value *v) { /* This callback reads data from some backend, and stores it in V. In this case, we always read null data. You'll want to fill in something more interesting. */ memset (value_contents_all_raw (v), value_offset (v), TYPE_LENGTH (value_type (v))); } static void nil_value_write (struct value *v, struct value *fromval) { /* Takes the data from FROMVAL and stores it in the backend of V. */ to_oblivion (value_contents_all_raw (fromval), value_offset (v), TYPE_LENGTH (value_type (fromval))); } static struct lval_funcs nil_value_funcs = { nil_value_read, nil_value_write }; struct value * make_nil_value (void) { struct type *type; struct value *v; type = make_nils_type (); v = allocate_computed_value (type, &nil_value_funcs, NULL); return v; } See the implementation of the `$_siginfo' convenience variable in `infrun.c' as a real example use of lval_computed.  File: gdbint.info, Node: Stack Frames, Next: Symbol Handling, Prev: Values, Up: Top 7 Stack Frames ************** A frame is a construct that GDB uses to keep track of calling and called functions. GDB's frame model, a fresh design, was implemented with the need to support DWARF's Call Frame Information in mind. In fact, the term "unwind" is taken directly from that specification. Developers wishing to learn more about unwinders, are encouraged to read the DWARF specification, available from `http://www.dwarfstd.org'. GDB's model is that you find a frame's registers by "unwinding" them from the next younger frame. That is, `get_frame_register' which returns the value of a register in frame #1 (the next-to-youngest frame), is implemented by calling frame #0's `frame_register_unwind' (the youngest frame). But then the obvious question is: how do you access the registers of the youngest frame itself? To answer this question, GDB has the "sentinel" frame, the "-1st" frame. Unwinding registers from the sentinel frame gives you the current values of the youngest real frame's registers. If F is a sentinel frame, then `get_frame_type (F) == SENTINEL_FRAME'. 7.1 Selecting an Unwinder ========================= The architecture registers a list of frame unwinders (`struct frame_unwind'), using the functions `frame_unwind_prepend_unwinder' and `frame_unwind_append_unwinder'. Each unwinder includes a sniffer. Whenever GDB needs to unwind a frame (to fetch the previous frame's registers or the current frame's ID), it calls registered sniffers in order to find one which recognizes the frame. The first time a sniffer returns non-zero, the corresponding unwinder is assigned to the frame. 7.2 Unwinding the Frame ID ========================== Every frame has an associated ID, of type `struct frame_id'. The ID includes the stack base and function start address for the frame. The ID persists through the entire life of the frame, including while other called frames are running; it is used to locate an appropriate `struct frame_info' from the cache. Every time the inferior stops, and at various other times, the frame cache is flushed. Because of this, parts of GDB which need to keep track of individual frames cannot use pointers to `struct frame_info'. A frame ID provides a stable reference to a frame, even when the unwinder must be run again to generate a new `struct frame_info' for the same frame. The frame's unwinder's `this_id' method is called to find the ID. Note that this is different from register unwinding, where the next frame's `prev_register' is called to unwind this frame's registers. Both stack base and function address are required to identify the frame, because a recursive function has the same function address for two consecutive frames and a leaf function may have the same stack address as its caller. On some platforms, a third address is part of the ID to further disambiguate frames--for instance, on IA-64 the separate register stack address is included in the ID. An invalid frame ID (`outer_frame_id') returned from the `this_id' method means to stop unwinding after this frame. `null_frame_id' is another invalid frame ID which should be used when there is no frame. For instance, certain breakpoints are attached to a specific frame, and that frame is identified through its frame ID (we use this to implement the "finish" command). Using `null_frame_id' as the frame ID for a given breakpoint means that the breakpoint is not specific to any frame. The `this_id' method should never return `null_frame_id'. 7.3 Unwinding Registers ======================= Each unwinder includes a `prev_register' method. This method takes a frame, an associated cache pointer, and a register number. It returns a `struct value *' describing the requested register, as saved by this frame. This is the value of the register that is current in this frame's caller. The returned value must have the same type as the register. It may have any lvalue type. In most circumstances one of these routines will generate the appropriate value: `frame_unwind_got_optimized' This register was not saved. `frame_unwind_got_register' This register was copied into another register in this frame. This is also used for unchanged registers; they are "copied" into the same register. `frame_unwind_got_memory' This register was saved in memory. `frame_unwind_got_constant' This register was not saved, but the unwinder can compute the previous value some other way. `frame_unwind_got_address' Same as `frame_unwind_got_constant', except that the value is a target address. This is frequently used for the stack pointer, which is not explicitly saved but has a known offset from this frame's stack pointer. For architectures with a flat unified address space, this is generally the same as `frame_unwind_got_constant'.  File: gdbint.info, Node: Symbol Handling, Next: Language Support, Prev: Stack Frames, Up: Top 8 Symbol Handling ***************** Symbols are a key part of GDB's operation. Symbols include variables, functions, and types. Symbol information for a large program can be truly massive, and reading of symbol information is one of the major performance bottlenecks in GDB; it can take many minutes to process it all. Studies have shown that nearly all the time spent is computational, rather than file reading. One of the ways for GDB to provide a good user experience is to start up quickly, taking no more than a few seconds. It is simply not possible to process all of a program's debugging info in that time, and so we attempt to handle symbols incrementally. For instance, we create "partial symbol tables" consisting of only selected symbols, and only expand them to full symbol tables when necessary. 8.1 Symbol Reading ================== GDB reads symbols from "symbol files". The usual symbol file is the file containing the program which GDB is debugging. GDB can be directed to use a different file for symbols (with the `symbol-file' command), and it can also read more symbols via the `add-file' and `load' commands. In addition, it may bring in more symbols while loading shared libraries. Symbol files are initially opened by code in `symfile.c' using the BFD library (*note Support Libraries::). BFD identifies the type of the file by examining its header. `find_sym_fns' then uses this identification to locate a set of symbol-reading functions. Symbol-reading modules identify themselves to GDB by calling `add_symtab_fns' during their module initialization. The argument to `add_symtab_fns' is a `struct sym_fns' which contains the name (or name prefix) of the symbol format, the length of the prefix, and pointers to four functions. These functions are called at various times to process symbol files whose identification matches the specified prefix. The functions supplied by each module are: `XYZ_symfile_init(struct sym_fns *sf)' Called from `symbol_file_add' when we are about to read a new symbol file. This function should clean up any internal state (possibly resulting from half-read previous files, for example) and prepare to read a new symbol file. Note that the symbol file which we are reading might be a new "main" symbol file, or might be a secondary symbol file whose symbols are being added to the existing symbol table. The argument to `XYZ_symfile_init' is a newly allocated `struct sym_fns' whose `bfd' field contains the BFD for the new symbol file being read. Its `private' field has been zeroed, and can be modified as desired. Typically, a struct of private information will be `malloc''d, and a pointer to it will be placed in the `private' field. There is no result from `XYZ_symfile_init', but it can call `error' if it detects an unavoidable problem. `XYZ_new_init()' Called from `symbol_file_add' when discarding existing symbols. This function needs only handle the symbol-reading module's internal state; the symbol table data structures visible to the rest of GDB will be discarded by `symbol_file_add'. It has no arguments and no result. It may be called after `XYZ_symfile_init', if a new symbol table is being read, or may be called alone if all symbols are simply being discarded. `XYZ_symfile_read(struct sym_fns *sf, CORE_ADDR addr, int mainline)' Called from `symbol_file_add' to actually read the symbols from a symbol-file into a set of psymtabs or symtabs. `sf' points to the `struct sym_fns' originally passed to `XYZ_sym_init' for possible initialization. `addr' is the offset between the file's specified start address and its true address in memory. `mainline' is 1 if this is the main symbol table being read, and 0 if a secondary symbol file (e.g., shared library or dynamically loaded file) is being read. In addition, if a symbol-reading module creates psymtabs when XYZ_symfile_read is called, these psymtabs will contain a pointer to a function `XYZ_psymtab_to_symtab', which can be called from any point in the GDB symbol-handling code. `XYZ_psymtab_to_symtab (struct partial_symtab *pst)' Called from `psymtab_to_symtab' (or the `PSYMTAB_TO_SYMTAB' macro) if the psymtab has not already been read in and had its `pst->symtab' pointer set. The argument is the psymtab to be fleshed-out into a symtab. Upon return, `pst->readin' should have been set to 1, and `pst->symtab' should contain a pointer to the new corresponding symtab, or zero if there were no symbols in that part of the symbol file. 8.2 Partial Symbol Tables ========================= GDB has three types of symbol tables: * Full symbol tables ("symtabs"). These contain the main information about symbols and addresses. * Partial symbol tables ("psymtabs"). These contain enough information to know when to read the corresponding part of the full symbol table. * Minimal symbol tables ("msymtabs"). These contain information gleaned from non-debugging symbols. This section describes partial symbol tables. A psymtab is constructed by doing a very quick pass over an executable file's debugging information. Small amounts of information are extracted--enough to identify which parts of the symbol table will need to be re-read and fully digested later, when the user needs the information. The speed of this pass causes GDB to start up very quickly. Later, as the detailed rereading occurs, it occurs in small pieces, at various times, and the delay therefrom is mostly invisible to the user. The symbols that show up in a file's psymtab should be, roughly, those visible to the debugger's user when the program is not running code from that file. These include external symbols and types, static symbols and types, and `enum' values declared at file scope. The psymtab also contains the range of instruction addresses that the full symbol table would represent. The idea is that there are only two ways for the user (or much of the code in the debugger) to reference a symbol: * By its address (e.g., execution stops at some address which is inside a function in this file). The address will be noticed to be in the range of this psymtab, and the full symtab will be read in. `find_pc_function', `find_pc_line', and other `find_pc_...' functions handle this. * By its name (e.g., the user asks to print a variable, or set a breakpoint on a function). Global names and file-scope names will be found in the psymtab, which will cause the symtab to be pulled in. Local names will have to be qualified by a global name, or a file-scope name, in which case we will have already read in the symtab as we evaluated the qualifier. Or, a local symbol can be referenced when we are "in" a local scope, in which case the first case applies. `lookup_symbol' does most of the work here. The only reason that psymtabs exist is to cause a symtab to be read in at the right moment. Any symbol that can be elided from a psymtab, while still causing that to happen, should not appear in it. Since psymtabs don't have the idea of scope, you can't put local symbols in them anyway. Psymtabs don't have the idea of the type of a symbol, either, so types need not appear, unless they will be referenced by name. It is a bug for GDB to behave one way when only a psymtab has been read, and another way if the corresponding symtab has been read in. Such bugs are typically caused by a psymtab that does not contain all the visible symbols, or which has the wrong instruction address ranges. The psymtab for a particular section of a symbol file (objfile) could be thrown away after the symtab has been read in. The symtab should always be searched before the psymtab, so the psymtab will never be used (in a bug-free environment). Currently, psymtabs are allocated on an obstack, and all the psymbols themselves are allocated in a pair of large arrays on an obstack, so there is little to be gained by trying to free them unless you want to do a lot more work. Whether or not psymtabs are created depends on the objfile's symbol reader. The core of GDB hides the details of partial symbols and partial symbol tables behind a set of function pointers known as the "quick symbol functions". These are documented in `symfile.h'. 8.3 Types ========= Fundamental Types (e.g., `FT_VOID', `FT_BOOLEAN'). -------------------------------------------------- These are the fundamental types that GDB uses internally. Fundamental types from the various debugging formats (stabs, ELF, etc) are mapped into one of these. They are basically a union of all fundamental types that GDB knows about for all the languages that GDB knows about. Type Codes (e.g., `TYPE_CODE_PTR', `TYPE_CODE_ARRAY'). ------------------------------------------------------ Each time GDB builds an internal type, it marks it with one of these types. The type may be a fundamental type, such as `TYPE_CODE_INT', or a derived type, such as `TYPE_CODE_PTR' which is a pointer to another type. Typically, several `FT_*' types map to one `TYPE_CODE_*' type, and are distinguished by other members of the type struct, such as whether the type is signed or unsigned, and how many bits it uses. Builtin Types (e.g., `builtin_type_void', `builtin_type_char'). --------------------------------------------------------------- These are instances of type structs that roughly correspond to fundamental types and are created as global types for GDB to use for various ugly historical reasons. We eventually want to eliminate these. Note for example that `builtin_type_int' initialized in `gdbtypes.c' is basically the same as a `TYPE_CODE_INT' type that is initialized in `c-lang.c' for an `FT_INTEGER' fundamental type. The difference is that the `builtin_type' is not associated with any particular objfile, and only one instance exists, while `c-lang.c' builds as many `TYPE_CODE_INT' types as needed, with each one associated with some particular objfile. 8.4 Object File Formats ======================= 8.4.1 a.out ----------- The `a.out' format is the original file format for Unix. It consists of three sections: `text', `data', and `bss', which are for program code, initialized data, and uninitialized data, respectively. The `a.out' format is so simple that it doesn't have any reserved place for debugging information. (Hey, the original Unix hackers used `adb', which is a machine-language debugger!) The only debugging format for `a.out' is stabs, which is encoded as a set of normal symbols with distinctive attributes. The basic `a.out' reader is in `dbxread.c'. 8.4.2 COFF ---------- The COFF format was introduced with System V Release 3 (SVR3) Unix. COFF files may have multiple sections, each prefixed by a header. The number of sections is limited. The COFF specification includes support for debugging. Although this was a step forward, the debugging information was woefully limited. For instance, it was not possible to represent code that came from an included file. GNU's COFF-using configs often use stabs-type info, encapsulated in special sections. The COFF reader is in `coffread.c'. 8.4.3 ECOFF ----------- ECOFF is an extended COFF originally introduced for Mips and Alpha workstations. The basic ECOFF reader is in `mipsread.c'. 8.4.4 XCOFF ----------- The IBM RS/6000 running AIX uses an object file format called XCOFF. The COFF sections, symbols, and line numbers are used, but debugging symbols are `dbx'-style stabs whose strings are located in the `.debug' section (rather than the string table). For more information, see *note Top: (stabs)Top. The shared library scheme has a clean interface for figuring out what shared libraries are in use, but the catch is that everything which refers to addresses (symbol tables and breakpoints at least) needs to be relocated for both shared libraries and the main executable. At least using the standard mechanism this can only be done once the program has been run (or the core file has been read). 8.4.5 PE -------- Windows 95 and NT use the PE ("Portable Executable") format for their executables. PE is basically COFF with additional headers. While BFD includes special PE support, GDB needs only the basic COFF reader. 8.4.6 ELF --------- The ELF format came with System V Release 4 (SVR4) Unix. ELF is similar to COFF in being organized into a number of sections, but it removes many of COFF's limitations. Debugging info may be either stabs encapsulated in ELF sections, or more commonly these days, DWARF. The basic ELF reader is in `elfread.c'. 8.4.7 SOM --------- SOM is HP's object file and debug format (not to be confused with IBM's SOM, which is a cross-language ABI). The SOM reader is in `somread.c'. 8.5 Debugging File Formats ========================== This section describes characteristics of debugging information that are independent of the object file format. 8.5.1 stabs ----------- `stabs' started out as special symbols within the `a.out' format. Since then, it has been encapsulated into other file formats, such as COFF and ELF. While `dbxread.c' does some of the basic stab processing, including for encapsulated versions, `stabsread.c' does the real work. 8.5.2 COFF ---------- The basic COFF definition includes debugging information. The level of support is minimal and non-extensible, and is not often used. 8.5.3 Mips debug (Third Eye) ---------------------------- ECOFF includes a definition of a special debug format. The file `mdebugread.c' implements reading for this format. 8.5.4 DWARF 2 ------------- DWARF 2 is an improved but incompatible version of DWARF 1. The DWARF 2 reader is in `dwarf2read.c'. 8.5.5 Compressed DWARF 2 ------------------------ Compressed DWARF 2 is not technically a separate debugging format, but merely DWARF 2 debug information that has been compressed. In this format, every object-file section holding DWARF 2 debugging information is compressed and prepended with a header. (The section is also typically renamed, so a section called `.debug_info' in a DWARF 2 binary would be called `.zdebug_info' in a compressed DWARF 2 binary.) The header is 12 bytes long: * 4 bytes: the literal string "ZLIB" * 8 bytes: the uncompressed size of the section, in big-endian byte order. The same reader is used for both compressed an normal DWARF 2 info. Section decompression is done in `zlib_decompress_section' in `dwarf2read.c'. 8.5.6 DWARF 3 ------------- DWARF 3 is an improved version of DWARF 2. 8.5.7 SOM --------- Like COFF, the SOM definition includes debugging information. 8.6 Adding a New Symbol Reader to GDB ===================================== If you are using an existing object file format (`a.out', COFF, ELF, etc), there is probably little to be done. If you need to add a new object file format, you must first add it to BFD. This is beyond the scope of this document. You must then arrange for the BFD code to provide access to the debugging symbols. Generally GDB will have to call swapping routines from BFD and a few other BFD internal routines to locate the debugging information. As much as possible, GDB should not depend on the BFD internal data structures. For some targets (e.g., COFF), there is a special transfer vector used to call swapping routines, since the external data structures on various platforms have different sizes and layouts. Specialized routines that will only ever be implemented by one object file format may be called directly. This interface should be described in a file `bfd/libXYZ.h', which is included by GDB. 8.7 Memory Management for Symbol Files ====================================== Most memory associated with a loaded symbol file is stored on its `objfile_obstack'. This includes symbols, types, namespace data, and other information produced by the symbol readers. Because this data lives on the objfile's obstack, it is automatically released when the objfile is unloaded or reloaded. Therefore one objfile must not reference symbol or type data from another objfile; they could be unloaded at different times. User convenience variables, et cetera, have associated types. Normally these types live in the associated objfile. However, when the objfile is unloaded, those types are deep copied to global memory, so that the values of the user variables and history items are not lost.  File: gdbint.info, Node: Language Support, Next: Host Definition, Prev: Symbol Handling, Up: Top 9 Language Support ****************** GDB's language support is mainly driven by the symbol reader, although it is possible for the user to set the source language manually. GDB chooses the source language by looking at the extension of the file recorded in the debug info; `.c' means C, `.f' means Fortran, etc. It may also use a special-purpose language identifier if the debug format supports it, like with DWARF. 9.1 Adding a Source Language to GDB =================================== To add other languages to GDB's expression parser, follow the following steps: _Create the expression parser._ This should reside in a file `LANG-exp.y'. Routines for building parsed expressions into a `union exp_element' list are in `parse.c'. Since we can't depend upon everyone having Bison, and YACC produces parsers that define a bunch of global names, the following lines *must* be included at the top of the YACC parser, to prevent the various parsers from defining the same global names: #define yyparse LANG_parse #define yylex LANG_lex #define yyerror LANG_error #define yylval LANG_lval #define yychar LANG_char #define yydebug LANG_debug #define yypact LANG_pact #define yyr1 LANG_r1 #define yyr2 LANG_r2 #define yydef LANG_def #define yychk LANG_chk #define yypgo LANG_pgo #define yyact LANG_act #define yyexca LANG_exca #define yyerrflag LANG_errflag #define yynerrs LANG_nerrs At the bottom of your parser, define a `struct language_defn' and initialize it with the right values for your language. Define an `initialize_LANG' routine and have it call `add_language(LANG_language_defn)' to tell the rest of GDB that your language exists. You'll need some other supporting variables and functions, which will be used via pointers from your `LANG_language_defn'. See the declaration of `struct language_defn' in `language.h', and the other `*-exp.y' files, for more information. _Add any evaluation routines, if necessary_ If you need new opcodes (that represent the operations of the language), add them to the enumerated type in `expression.h'. Add support code for these operations in the `evaluate_subexp' function defined in the file `eval.c'. Add cases for new opcodes in two functions from `parse.c': `prefixify_subexp' and `length_of_subexp'. These compute the number of `exp_element's that a given operation takes up. _Update some existing code_ Add an enumerated identifier for your language to the enumerated type `enum language' in `defs.h'. Update the routines in `language.c' so your language is included. These routines include type predicates and such, which (in some cases) are language dependent. If your language does not appear in the switch statement, an error is reported. Also included in `language.c' is the code that updates the variable `current_language', and the routines that translate the `language_LANG' enumerated identifier into a printable string. Update the function `_initialize_language' to include your language. This function picks the default language upon startup, so is dependent upon which languages that GDB is built for. Update `allocate_symtab' in `symfile.c' and/or symbol-reading code so that the language of each symtab (source file) is set properly. This is used to determine the language to use at each stack frame level. Currently, the language is set based upon the extension of the source file. If the language can be better inferred from the symbol information, please set the language of the symtab in the symbol-reading code. Add helper code to `print_subexp' (in `expprint.c') to handle any new expression opcodes you have added to `expression.h'. Also, add the printed representations of your operators to `op_print_tab'. _Add a place of call_ Add a call to `LANG_parse()' and `LANG_error' in `parse_exp_1' (defined in `parse.c'). _Edit `Makefile.in'_ Add dependencies in `Makefile.in'. Make sure you update the macro variables such as `HFILES' and `OBJS', otherwise your code may not get linked in, or, worse yet, it may not get `tar'red into the distribution!  File: gdbint.info, Node: Host Definition, Next: Target Architecture Definition, Prev: Language Support, Up: Top 10 Host Definition ****************** With the advent of Autoconf, it's rarely necessary to have host definition machinery anymore. The following information is provided, mainly, as an historical reference. 10.1 Adding a New Host ====================== GDB's host configuration support normally happens via Autoconf. New host-specific definitions should not be needed. Older hosts GDB still use the host-specific definitions and files listed below, but these mostly exist for historical reasons, and will eventually disappear. `gdb/config/ARCH/XYZ.mh' This file is a Makefile fragment that once contained both host and native configuration information (*note Native Debugging::) for the machine XYZ. The host configuration information is now handled by Autoconf. Host configuration information included definitions for `CC', `SYSV_DEFINE', `XM_CFLAGS', `XM_ADD_FILES', `XM_CLIBS', `XM_CDEPS', etc.; see `Makefile.in'. New host-only configurations do not need this file. (Files named `gdb/config/ARCH/xm-XYZ.h' were once used to define host-specific macros, but were no longer needed and have all been removed.) Generic Host Support Files -------------------------- There are some "generic" versions of routines that can be used by various systems. `ser-unix.c' This contains serial line support for Unix systems. It is included by default on all Unix-like hosts. `ser-pipe.c' This contains serial pipe support for Unix systems. It is included by default on all Unix-like hosts. `ser-mingw.c' This contains serial line support for 32-bit programs running under Windows using MinGW. `ser-go32.c' This contains serial line support for 32-bit programs running under DOS, using the DJGPP (a.k.a. GO32) execution environment. `ser-tcp.c' This contains generic TCP support using sockets. It is included by default on all Unix-like hosts and with MinGW. 10.2 Host Conditionals ====================== When GDB is configured and compiled, various macros are defined or left undefined, to control compilation based on the attributes of the host system. While formerly they could be set in host-specific header files, at present they can be changed only by setting `CFLAGS' when building, or by editing the source code. These macros and their meanings (or if the meaning is not documented here, then one of the source files where they are used is indicated) are: `GDBINIT_FILENAME' The default name of GDB's initialization file (normally `.gdbinit'). `CRLF_SOURCE_FILES' Define this if host files use `\r\n' rather than `\n' as a line terminator. This will cause source file listings to omit `\r' characters when printing and it will allow `\r\n' line endings of files which are "sourced" by gdb. It must be possible to open files in binary mode using `O_BINARY' or, for fopen, `"rb"'. `DEFAULT_PROMPT' The default value of the prompt string (normally `"(gdb) "'). `DEV_TTY' The name of the generic TTY device, defaults to `"/dev/tty"'. `ISATTY' Substitute for isatty, if not available. `FOPEN_RB' Define this if binary files are opened the same way as text files. `PRINTF_HAS_LONG_LONG' Define this if the host can handle printing of long long integers via the printf format conversion specifier `ll'. This is set by the `configure' script. `LSEEK_NOT_LINEAR' Define this if `lseek (n)' does not necessarily move to byte number `n' in the file. This is only used when reading source files. It is normally faster to define `CRLF_SOURCE_FILES' when possible. `lint' Define this to help placate `lint' in some situations. `volatile' Define this to override the defaults of `__volatile__' or `/**/'.  File: gdbint.info, Node: Target Architecture Definition, Next: Target Descriptions, Prev: Host Definition, Up: Top 11 Target Architecture Definition ********************************* GDB's target architecture defines what sort of machine-language programs GDB can work with, and how it works with them. The target architecture object is implemented as the C structure `struct gdbarch *'. The structure, and its methods, are generated using the Bourne shell script `gdbarch.sh'. * Menu: * OS ABI Variant Handling:: * Initialize New Architecture:: * Registers and Memory:: * Pointers and Addresses:: * Address Classes:: * Register Representation:: * Frame Interpretation:: * Inferior Call Setup:: * Adding support for debugging core files:: * Defining Other Architecture Features:: * Adding a New Target::  File: gdbint.info, Node: OS ABI Variant Handling, Next: Initialize New Architecture, Up: Target Architecture Definition 11.1 Operating System ABI Variant Handling ========================================== GDB provides a mechanism for handling variations in OS ABIs. An OS ABI variant may have influence over any number of variables in the target architecture definition. There are two major components in the OS ABI mechanism: sniffers and handlers. A "sniffer" examines a file matching a BFD architecture/flavour pair (the architecture may be wildcarded) in an attempt to determine the OS ABI of that file. Sniffers with a wildcarded architecture are considered to be "generic", while sniffers for a specific architecture are considered to be "specific". A match from a specific sniffer overrides a match from a generic sniffer. Multiple sniffers for an architecture/flavour may exist, in order to differentiate between two different operating systems which use the same basic file format. The OS ABI framework provides a generic sniffer for ELF-format files which examines the `EI_OSABI' field of the ELF header, as well as note sections known to be used by several operating systems. A "handler" is used to fine-tune the `gdbarch' structure for the selected OS ABI. There may be only one handler for a given OS ABI for each BFD architecture. The following OS ABI variants are defined in `defs.h': `GDB_OSABI_UNINITIALIZED' Used for struct gdbarch_info if ABI is still uninitialized. `GDB_OSABI_UNKNOWN' The ABI of the inferior is unknown. The default `gdbarch' settings for the architecture will be used. `GDB_OSABI_SVR4' UNIX System V Release 4. `GDB_OSABI_HURD' GNU using the Hurd kernel. `GDB_OSABI_SOLARIS' Sun Solaris. `GDB_OSABI_OSF1' OSF/1, including Digital UNIX and Compaq Tru64 UNIX. `GDB_OSABI_LINUX' GNU using the Linux kernel. `GDB_OSABI_FREEBSD_AOUT' FreeBSD using the `a.out' executable format. `GDB_OSABI_FREEBSD_ELF' FreeBSD using the ELF executable format. `GDB_OSABI_NETBSD_AOUT' NetBSD using the `a.out' executable format. `GDB_OSABI_NETBSD_ELF' NetBSD using the ELF executable format. `GDB_OSABI_OPENBSD_ELF' OpenBSD using the ELF executable format. `GDB_OSABI_WINCE' Windows CE. `GDB_OSABI_GO32' DJGPP. `GDB_OSABI_IRIX' Irix. `GDB_OSABI_INTERIX' Interix (Posix layer for MS-Windows systems). `GDB_OSABI_HPUX_ELF' HP/UX using the ELF executable format. `GDB_OSABI_HPUX_SOM' HP/UX using the SOM executable format. `GDB_OSABI_QNXNTO' QNX Neutrino. `GDB_OSABI_CYGWIN' Cygwin. `GDB_OSABI_AIX' AIX. Here are the functions that make up the OS ABI framework: -- Function: const char * gdbarch_osabi_name (enum gdb_osabi OSABI) Return the name of the OS ABI corresponding to OSABI. -- Function: void gdbarch_register_osabi (enum bfd_architecture ARCH, unsigned long MACHINE, enum gdb_osabi OSABI, void (*INIT_OSABI)(struct gdbarch_info INFO, struct gdbarch *GDBARCH)) Register the OS ABI handler specified by INIT_OSABI for the architecture, machine type and OS ABI specified by ARCH, MACHINE and OSABI. In most cases, a value of zero for the machine type, which implies the architecture's default machine type, will suffice. -- Function: void gdbarch_register_osabi_sniffer (enum bfd_architecture ARCH, enum bfd_flavour FLAVOUR, enum gdb_osabi (*SNIFFER)(bfd *ABFD)) Register the OS ABI file sniffer specified by SNIFFER for the BFD architecture/flavour pair specified by ARCH and FLAVOUR. If ARCH is `bfd_arch_unknown', the sniffer is considered to be generic, and is allowed to examine FLAVOUR-flavoured files for any architecture. -- Function: enum gdb_osabi gdbarch_lookup_osabi (bfd *ABFD) Examine the file described by ABFD to determine its OS ABI. The value `GDB_OSABI_UNKNOWN' is returned if the OS ABI cannot be determined. -- Function: void gdbarch_init_osabi (struct gdbarch info INFO, struct gdbarch *GDBARCH, enum gdb_osabi OSABI) Invoke the OS ABI handler corresponding to OSABI to fine-tune the `gdbarch' structure specified by GDBARCH. If a handler corresponding to OSABI has not been registered for GDBARCH's architecture, a warning will be issued and the debugging session will continue with the defaults already established for GDBARCH. -- Function: void generic_elf_osabi_sniff_abi_tag_sections (bfd *ABFD, asection *SECT, void *OBJ) Helper routine for ELF file sniffers. Examine the file described by ABFD and look at ABI tag note sections to determine the OS ABI from the note. This function should be called via `bfd_map_over_sections'.  File: gdbint.info, Node: Initialize New Architecture, Next: Registers and Memory, Prev: OS ABI Variant Handling, Up: Target Architecture Definition 11.2 Initializing a New Architecture ==================================== * Menu: * How an Architecture is Represented:: * Looking Up an Existing Architecture:: * Creating a New Architecture::  File: gdbint.info, Node: How an Architecture is Represented, Next: Looking Up an Existing Architecture, Up: Initialize New Architecture 11.2.1 How an Architecture is Represented ----------------------------------------- Each `gdbarch' is associated with a single BFD architecture, via a `bfd_arch_ARCH' in the `bfd_architecture' enumeration. The `gdbarch' is registered by a call to `register_gdbarch_init', usually from the file's `_initialize_FILENAME' routine, which will be automatically called during GDB startup. The arguments are a BFD architecture constant and an initialization function. A GDB description for a new architecture, ARCH is created by defining a global function `_initialize_ARCH_tdep', by convention in the source file `ARCH-tdep.c'. For example, in the case of the OpenRISC 1000, this function is called `_initialize_or1k_tdep' and is found in the file `or1k-tdep.c'. The resulting object files containing the implementation of the `_initialize_ARCH_tdep' function are specified in the GDB `configure.tgt' file, which includes a large case statement pattern matching against the `--target' option of the `configure' script. The new `struct gdbarch' is created within the `_initialize_ARCH_tdep' function by calling `gdbarch_register': void gdbarch_register (enum bfd_architecture ARCHITECTURE, gdbarch_init_ftype *INIT_FUNC, gdbarch_dump_tdep_ftype *TDEP_DUMP_FUNC); The ARCHITECTURE will identify the unique BFD to be associated with this `gdbarch'. The INIT_FUNC funciton is called to create and return the new `struct gdbarch'. The TDEP_DUMP_FUNC function will dump the target specific details associated with this architecture. For example the function `_initialize_or1k_tdep' creates its architecture for 32-bit OpenRISC 1000 architectures by calling: gdbarch_register (bfd_arch_or32, or1k_gdbarch_init, or1k_dump_tdep);  File: gdbint.info, Node: Looking Up an Existing Architecture, Next: Creating a New Architecture, Prev: How an Architecture is Represented, Up: Initialize New Architecture 11.2.2 Looking Up an Existing Architecture ------------------------------------------ The initialization function has this prototype: static struct gdbarch * ARCH_gdbarch_init (struct gdbarch_info INFO, struct gdbarch_list *ARCHES) The INFO argument contains parameters used to select the correct architecture, and ARCHES is a list of architectures which have already been created with the same `bfd_arch_ARCH' value. The initialization function should first make sure that INFO is acceptable, and return `NULL' if it is not. Then, it should search through ARCHES for an exact match to INFO, and return one if found. Lastly, if no exact match was found, it should create a new architecture based on INFO and return it. The lookup is done using `gdbarch_list_lookup_by_info'. It is passed the list of existing architectures, ARCHES, and the `struct gdbarch_info', INFO, and returns the first matching architecture it finds, or `NULL' if none are found. If an architecture is found it can be returned as the result from the initialization function, otherwise a new `struct gdbach' will need to be created. The struct gdbarch_info has the following components: struct gdbarch_info { const struct bfd_arch_info *bfd_arch_info; int byte_order; bfd *abfd; struct gdbarch_tdep_info *tdep_info; enum gdb_osabi osabi; const struct target_desc *target_desc; }; The `bfd_arch_info' member holds the key details about the architecture. The `byte_order' member is a value in an enumeration indicating the endianism. The `abfd' member is a pointer to the full BFD, the `tdep_info' member is additional custom target specific information, `osabi' identifies which (if any) of a number of operating specific ABIs are used by this architecture and the `target_desc' member is a set of name-value pairs with information about register usage in this target. When the `struct gdbarch' initialization function is called, not all the fields are provided--only those which can be deduced from the BFD. The `struct gdbarch_info', INFO is used as a look-up key with the list of existing architectures, ARCHES to see if a suitable architecture already exists. The TDEP_INFO, OSABI and TARGET_DESC fields may be added before this lookup to refine the search. Only information in INFO should be used to choose the new architecture. Historically, INFO could be sparse, and defaults would be collected from the first element on ARCHES. However, GDB now fills in INFO more thoroughly, so new `gdbarch' initialization functions should not take defaults from ARCHES.  File: gdbint.info, Node: Creating a New Architecture, Prev: Looking Up an Existing Architecture, Up: Initialize New Architecture 11.2.3 Creating a New Architecture ---------------------------------- If no architecture is found, then a new architecture must be created, by calling `gdbarch_alloc' using the supplied `struct gdbarch_info' and any additional custom target specific information in a `struct gdbarch_tdep'. The prototype for `gdbarch_alloc' is: struct gdbarch *gdbarch_alloc (const struct gdbarch_info *INFO, struct gdbarch_tdep *TDEP); The newly created struct gdbarch must then be populated. Although there are default values, in most cases they are not what is required. For each element, X, there is are a pair of corresponding accessor functions, one to set the value of that element, `set_gdbarch_X', the second to either get the value of an element (if it is a variable) or to apply the element (if it is a function), `gdbarch_X'. Note that both accessor functions take a pointer to the `struct gdbarch' as first argument. Populating the new `gdbarch' should use the `set_gdbarch' functions. The following sections identify the main elements that should be set in this way. This is not the complete list, but represents the functions and elements that must commonly be specified for a new architecture. Many of the functions and variables are described in the header file `gdbarch.h'. This is the main work in defining a new architecture. Implementing the set of functions to populate the `struct gdbarch'. `struct gdbarch_tdep' is not defined within GDB--it is up to the user to define this struct if it is needed to hold custom target information that is not covered by the standard `struct gdbarch'. For example with the OpenRISC 1000 architecture it is used to hold the number of matchpoints available in the target (along with other information). If there is no additional target specific information, it can be set to `NULL'.  File: gdbint.info, Node: Registers and Memory, Next: Pointers and Addresses, Prev: Initialize New Architecture, Up: Target Architecture Definition 11.3 Registers and Memory ========================= GDB's model of the target machine is rather simple. GDB assumes the machine includes a bank of registers and a block of memory. Each register may have a different size. GDB does not have a magical way to match up with the compiler's idea of which registers are which; however, it is critical that they do match up accurately. The only way to make this work is to get accurate information about the order that the compiler uses, and to reflect that in the `gdbarch_register_name' and related functions. GDB can handle big-endian, little-endian, and bi-endian architectures.  File: gdbint.info, Node: Pointers and Addresses, Next: Address Classes, Prev: Registers and Memory, Up: Target Architecture Definition 11.4 Pointers Are Not Always Addresses ====================================== On almost all 32-bit architectures, the representation of a pointer is indistinguishable from the representation of some fixed-length number whose value is the byte address of the object pointed to. On such machines, the words "pointer" and "address" can be used interchangeably. However, architectures with smaller word sizes are often cramped for address space, so they may choose a pointer representation that breaks this identity, and allows a larger code address space. For example, the Renesas D10V is a 16-bit VLIW processor whose instructions are 32 bits long(1). If the D10V used ordinary byte addresses to refer to code locations, then the processor would only be able to address 64kb of instructions. However, since instructions must be aligned on four-byte boundaries, the low two bits of any valid instruction's byte address are always zero--byte addresses waste two bits. So instead of byte addresses, the D10V uses word addresses--byte addresses shifted right two bits--to refer to code. Thus, the D10V can use 16-bit words to address 256kb of code space. However, this means that code pointers and data pointers have different forms on the D10V. The 16-bit word `0xC020' refers to byte address `0xC020' when used as a data address, but refers to byte address `0x30080' when used as a code address. (The D10V also uses separate code and data address spaces, which also affects the correspondence between pointers and addresses, but we're going to ignore that here; this example is already too long.) To cope with architectures like this--the D10V is not the only one!--GDB tries to distinguish between "addresses", which are byte numbers, and "pointers", which are the target's representation of an address of a particular type of data. In the example above, `0xC020' is the pointer, which refers to one of the addresses `0xC020' or `0x30080', depending on the type imposed upon it. GDB provides functions for turning a pointer into an address and vice versa, in the appropriate way for the current architecture. Unfortunately, since addresses and pointers are identical on almost all processors, this distinction tends to bit-rot pretty quickly. Thus, each time you port GDB to an architecture which does distinguish between pointers and addresses, you'll probably need to clean up some architecture-independent code. Here are functions which convert between pointers and addresses: -- Function: CORE_ADDR extract_typed_address (void *BUF, struct type *TYPE) Treat the bytes at BUF as a pointer or reference of type TYPE, and return the address it represents, in a manner appropriate for the current architecture. This yields an address GDB can use to read target memory, disassemble, etc. Note that BUF refers to a buffer in GDB's memory, not the inferior's. For example, if the current architecture is the Intel x86, this function extracts a little-endian integer of the appropriate length from BUF and returns it. However, if the current architecture is the D10V, this function will return a 16-bit integer extracted from BUF, multiplied by four if TYPE is a pointer to a function. If TYPE is not a pointer or reference type, then this function will signal an internal error. -- Function: CORE_ADDR store_typed_address (void *BUF, struct type *TYPE, CORE_ADDR ADDR) Store the address ADDR in BUF, in the proper format for a pointer of type TYPE in the current architecture. Note that BUF refers to a buffer in GDB's memory, not the inferior's. For example, if the current architecture is the Intel x86, this function stores ADDR unmodified as a little-endian integer of the appropriate length in BUF. However, if the current architecture is the D10V, this function divides ADDR by four if TYPE is a pointer to a function, and then stores it in BUF. If TYPE is not a pointer or reference type, then this function will signal an internal error. -- Function: CORE_ADDR value_as_address (struct value *VAL) Assuming that VAL is a pointer, return the address it represents, as appropriate for the current architecture. This function actually works on integral values, as well as pointers. For pointers, it performs architecture-specific conversions as described above for `extract_typed_address'. -- Function: CORE_ADDR value_from_pointer (struct type *TYPE, CORE_ADDR ADDR) Create and return a value representing a pointer of type TYPE to the address ADDR, as appropriate for the current architecture. This function performs architecture-specific conversions as described above for `store_typed_address'. Here are two functions which architectures can define to indicate the relationship between pointers and addresses. These have default definitions, appropriate for architectures on which all pointers are simple unsigned byte addresses. -- Function: CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *GDBARCH, struct type *TYPE, char *BUF) Assume that BUF holds a pointer of type TYPE, in the appropriate format for the current architecture. Return the byte address the pointer refers to. This function may safely assume that TYPE is either a pointer or a C++ reference type. -- Function: void gdbarch_address_to_pointer (struct gdbarch *GDBARCH, struct type *TYPE, char *BUF, CORE_ADDR ADDR) Store in BUF a pointer of type TYPE representing the address ADDR, in the appropriate format for the current architecture. This function may safely assume that TYPE is either a pointer or a C++ reference type. ---------- Footnotes ---------- (1) Some D10V instructions are actually pairs of 16-bit sub-instructions. However, since you can't jump into the middle of such a pair, code addresses can only refer to full 32 bit instructions, which is what matters in this explanation.  File: gdbint.info, Node: Address Classes, Next: Register Representation, Prev: Pointers and Addresses, Up: Target Architecture Definition 11.5 Address Classes ==================== Sometimes information about different kinds of addresses is available via the debug information. For example, some programming environments define addresses of several different sizes. If the debug information distinguishes these kinds of address classes through either the size info (e.g, `DW_AT_byte_size' in DWARF 2) or through an explicit address class attribute (e.g, `DW_AT_address_class' in DWARF 2), the following macros should be defined in order to disambiguate these types within GDB as well as provide the added information to a GDB user when printing type expressions. -- Function: int gdbarch_address_class_type_flags (struct gdbarch *GDBARCH, int BYTE_SIZE, int DWARF2_ADDR_CLASS) Returns the type flags needed to construct a pointer type whose size is BYTE_SIZE and whose address class is DWARF2_ADDR_CLASS. This function is normally called from within a symbol reader. See `dwarf2read.c'. -- Function: char * gdbarch_address_class_type_flags_to_name (struct gdbarch *GDBARCH, int TYPE_FLAGS) Given the type flags representing an address class qualifier, return its name. -- Function: int gdbarch_address_class_name_to_type_flags (struct gdbarch *GDBARCH, int NAME, int *TYPE_FLAGS_PTR) Given an address qualifier name, set the `int' referenced by TYPE_FLAGS_PTR to the type flags for that address class qualifier. Since the need for address classes is rather rare, none of the address class functions are defined by default. Predicate functions are provided to detect when they are defined. Consider a hypothetical architecture in which addresses are normally 32-bits wide, but 16-bit addresses are also supported. Furthermore, suppose that the DWARF 2 information for this architecture simply uses a `DW_AT_byte_size' value of 2 to indicate the use of one of these "short" pointers. The following functions could be defined to implement the address class functions: somearch_address_class_type_flags (int byte_size, int dwarf2_addr_class) { if (byte_size == 2) return TYPE_FLAG_ADDRESS_CLASS_1; else return 0; } static char * somearch_address_class_type_flags_to_name (int type_flags) { if (type_flags & TYPE_FLAG_ADDRESS_CLASS_1) return "short"; else return NULL; } int somearch_address_class_name_to_type_flags (char *name, int *type_flags_ptr) { if (strcmp (name, "short") == 0) { *type_flags_ptr = TYPE_FLAG_ADDRESS_CLASS_1; return 1; } else return 0; } The qualifier `@short' is used in GDB's type expressions to indicate the presence of one of these "short" pointers. For example if the debug information indicates that `short_ptr_var' is one of these short pointers, GDB might show the following behavior: (gdb) ptype short_ptr_var type = int * @short  File: gdbint.info, Node: Register Representation, Next: Frame Interpretation, Prev: Address Classes, Up: Target Architecture Definition 11.6 Register Representation ============================ * Menu: * Raw and Cooked Registers:: * Register Architecture Functions & Variables:: * Register Information Functions:: * Register and Memory Data:: * Register Caching::  File: gdbint.info, Node: Raw and Cooked Registers, Next: Register Architecture Functions & Variables, Up: Register Representation 11.6.1 Raw and Cooked Registers ------------------------------- GDB considers registers to be a set with members numbered linearly from 0 upwards. The first part of that set corresponds to real physical registers, the second part to any "pseudo-registers". Pseudo-registers have no independent physical existence, but are useful representations of information within the architecture. For example the OpenRISC 1000 architecture has up to 32 general purpose registers, which are typically represented as 32-bit (or 64-bit) integers. However the GPRs are also used as operands to the floating point operations, and it could be convenient to define a set of pseudo-registers, to show the GPRs represented as floating point values. For any architecture, the implementer will decide on a mapping from hardware to GDB register numbers. The registers corresponding to real hardware are referred to as "raw" registers, the remaining registers are "pseudo-registers". The total register set (raw and pseudo) is called the "cooked" register set.  File: gdbint.info, Node: Register Architecture Functions & Variables, Next: Register Information Functions, Prev: Raw and Cooked Registers, Up: Register Representation 11.6.2 Functions and Variables Specifying the Register Architecture ------------------------------------------------------------------- These `struct gdbarch' functions and variables specify the number and type of registers in the architecture. -- Architecture Function: CORE_ADDR read_pc (struct regcache *REGCACHE) -- Architecture Function: void write_pc (struct regcache *REGCACHE, CORE_ADDR VAL) Read or write the program counter. The default value of both functions is `NULL' (no function available). If the program counter is just an ordinary register, it can be specified in `struct gdbarch' instead (see `pc_regnum' below) and it will be read or written using the standard routines to access registers. This function need only be specified if the program counter is not an ordinary register. Any register information can be obtained using the supplied register cache, REGCACHE. *Note Register Caching: Register Caching. -- Architecture Function: void pseudo_register_read (struct gdbarch *GDBARCH, struct regcache *REGCACHE, int REGNUM, const gdb_byte *BUF) -- Architecture Function: void pseudo_register_write (struct gdbarch *GDBARCH, struct regcache *REGCACHE, int REGNUM, const gdb_byte *BUF) These functions should be defined if there are any pseudo-registers. The default value is `NULL'. REGNUM is the number of the register to read or write (which will be a "cooked" register number) and BUF is the buffer where the value read will be placed, or from which the value to be written will be taken. The value in the buffer may be converted to or from a signed or unsigned integral value using one of the utility functions (*note Using Different Register and Memory Data Representations: Register and Memory Data.). The access should be for the specified architecture, GDBARCH. Any register information can be obtained using the supplied register cache, REGCACHE. *Note Register Caching: Register Caching. -- Architecture Variable: int sp_regnum This specifies the register holding the stack pointer, which may be a raw or pseudo-register. It defaults to -1 (not defined), but it is an error for it not to be defined. The value of the stack pointer register can be accessed withing GDB as the variable `$sp'. -- Architecture Variable: int pc_regnum This specifies the register holding the program counter, which may be a raw or pseudo-register. It defaults to -1 (not defined). If `pc_regnum' is not defined, then the functions `read_pc' and `write_pc' (see above) must be defined. The value of the program counter (whether defined as a register, or through `read_pc' and `write_pc') can be accessed withing GDB as the variable `$pc'. -- Architecture Variable: int ps_regnum This specifies the register holding the processor status (often called the status register), which may be a raw or pseudo-register. It defaults to -1 (not defined). If defined, the value of this register can be accessed withing GDB as the variable `$ps'. -- Architecture Variable: int fp0_regnum This specifies the first floating point register. It defaults to 0. `fp0_regnum' is not needed unless the target offers support for floating point.  File: gdbint.info, Node: Register Information Functions, Next: Register and Memory Data, Prev: Register Architecture Functions & Variables, Up: Register Representation 11.6.3 Functions Giving Register Information -------------------------------------------- These functions return information about registers. -- Architecture Function: const char * register_name (struct gdbarch *GDBARCH, int REGNUM) This function should convert a register number (raw or pseudo) to a register name (as a C `const char *'). This is used both to determine the name of a register for output and to work out the meaning of any register names used as input. The function may also return `NULL', to indicate that REGNUM is not a valid register. For example with the OpenRISC 1000, GDB registers 0-31 are the General Purpose Registers, register 32 is the program counter and register 33 is the supervision register (i.e. the processor status register), which map to the strings `"gpr00"' through `"gpr31"', `"pc"' and `"sr"' respectively. This means that the GDB command `print $gpr5' should print the value of the OR1K general purpose register 5(1). The default value for this function is `NULL', meaning undefined. It should always be defined. The access should be for the specified architecture, GDBARCH. -- Architecture Function: struct type * register_type (struct gdbarch *GDBARCH, int REGNUM) Given a register number, this function identifies the type of data it may be holding, specified as a `struct type'. GDB allows creation of arbitrary types, but a number of built in types are provided (`builtin_type_void', `builtin_type_int32' etc), together with functions to derive types from these. Typically the program counter will have a type of "pointer to function" (it points to code), the frame pointer and stack pointer will have types of "pointer to void" (they point to data on the stack) and all other integer registers will have a type of 32-bit integer or 64-bit integer. This information guides the formatting when displaying register information. The default value is `NULL' meaning no information is available to guide formatting when displaying registers. -- Architecture Function: void print_registers_info (struct gdbarch *GDBARCH, struct ui_file *FILE, struct frame_info *FRAME, int REGNUM, int ALL) Define this function to print out one or all of the registers for the GDB `info registers' command. The default value is the function `default_print_registers_info', which uses the register type information (see `register_type' above) to determine how each register should be printed. Define a custom version of this function for fuller control over how the registers are displayed. The access should be for the specified architecture, GDBARCH, with output to the file specified by the User Interface Independent Output file handle, FILE (*note UI-Independent Output--the `ui_out' Functions: UI-Independent Output.). The registers should show their values in the frame specified by FRAME. If REGNUM is -1 and ALL is zero, then all the "significant" registers should be shown (the implementer should decide which registers are "significant"). Otherwise only the value of the register specified by REGNUM should be output. If REGNUM is -1 and ALL is non-zero (true), then the value of all registers should be shown. By default `default_print_registers_info' prints one register per line, and if ALL is zero omits floating-point registers. -- Architecture Function: void print_float_info (struct gdbarch *GDBARCH, struct ui_file *FILE, struct frame_info *FRAME, const char *ARGS) Define this function to provide output about the floating point unit and registers for the GDB `info float' command respectively. The default value is `NULL' (not defined), meaning no information will be provided. The GDBARCH and FILE and FRAME arguments have the same meaning as in the `print_registers_info' function above. The string ARGS contains any supplementary arguments to the `info float' command. Define this function if the target supports floating point operations. -- Architecture Function: void print_vector_info (struct gdbarch *GDBARCH, struct ui_file *FILE, struct frame_info *FRAME, const char *ARGS) Define this function to provide output about the vector unit and registers for the GDB `info vector' command respectively. The default value is `NULL' (not defined), meaning no information will be provided. The GDBARCH, FILE and FRAME arguments have the same meaning as in the `print_registers_info' function above. The string ARGS contains any supplementary arguments to the `info vector' command. Define this function if the target supports vector operations. -- Architecture Function: int register_reggroup_p (struct gdbarch *GDBARCH, int REGNUM, struct reggroup *GROUP) GDB groups registers into different categories (general, vector, floating point etc). This function, given a register, REGNUM, and group, GROUP, returns 1 (true) if the register is in the group and 0 (false) otherwise. The information should be for the specified architecture, GDBARCH The default value is the function `default_register_reggroup_p' which will do a reasonable job based on the type of the register (see the function `register_type' above), with groups for general purpose registers, floating point registers, vector registers and raw (i.e not pseudo) registers. ---------- Footnotes ---------- (1) Historically, GDB always had a concept of a frame pointer register, which could be accessed via the GDB variable, `$fp'. That concept is now deprecated, recognizing that not all architectures have a frame pointer. However if an architecture does have a frame pointer register, and defines a register or pseudo-register with the name `"fp"', then that register will be used as the value of the `$fp' variable.  File: gdbint.info, Node: Register and Memory Data, Next: Register Caching, Prev: Register Information Functions, Up: Register Representation 11.6.4 Using Different Register and Memory Data Representations --------------------------------------------------------------- Some architectures have different representations of data objects, depending whether the object is held in a register or memory. For example: * The Alpha architecture can represent 32 bit integer values in floating-point registers. * The x86 architecture supports 80-bit floating-point registers. The `long double' data type occupies 96 bits in memory but only 80 bits when stored in a register. In general, the register representation of a data type is determined by the architecture, or GDB's interface to the architecture, while the memory representation is determined by the Application Binary Interface. For almost all data types on almost all architectures, the two representations are identical, and no special handling is needed. However, they do occasionally differ. An architecture may define the following `struct gdbarch' functions to request conversions between the register and memory representations of a data type: -- Architecture Function: int gdbarch_convert_register_p (struct gdbarch *GDBARCH, int REG) Return non-zero (true) if the representation of a data value stored in this register may be different to the representation of that same data value when stored in memory. The default value is `NULL' (undefined). If this function is defined and returns non-zero, the `struct gdbarch' functions `gdbarch_register_to_value' and `gdbarch_value_to_register' (see below) should be used to perform any necessary conversion. If defined, this function should return zero for the register's native type, when no conversion is necessary. -- Architecture Function: void gdbarch_register_to_value (struct gdbarch *GDBARCH, int REG, struct type *TYPE, char *FROM, char *TO) Convert the value of register number REG to a data object of type TYPE. The buffer at FROM holds the register's value in raw format; the converted value should be placed in the buffer at TO. _Note:_ `gdbarch_register_to_value' and `gdbarch_value_to_register' take their REG and TYPE arguments in different orders. `gdbarch_register_to_value' should only be used with registers for which the `gdbarch_convert_register_p' function returns a non-zero value. -- Architecture Function: void gdbarch_value_to_register (struct gdbarch *GDBARCH, struct type *TYPE, int REG, char *FROM, char *TO) Convert a data value of type TYPE to register number REG' raw format. _Note:_ `gdbarch_register_to_value' and `gdbarch_value_to_register' take their REG and TYPE arguments in different orders. `gdbarch_value_to_register' should only be used with registers for which the `gdbarch_convert_register_p' function returns a non-zero value.  File: gdbint.info, Node: Register Caching, Prev: Register and Memory Data, Up: Register Representation 11.6.5 Register Caching ----------------------- Caching of registers is used, so that the target does not need to be accessed and reanalyzed multiple times for each register in circumstances where the register value cannot have changed. GDB provides `struct regcache', associated with a particular `struct gdbarch' to hold the cached values of the raw registers. A set of functions is provided to access both the raw registers (with `raw' in their name) and the full set of cooked registers (with `cooked' in their name). Functions are provided to ensure the register cache is kept synchronized with the values of the actual registers in the target. Accessing registers through the `struct regcache' routines will ensure that the appropriate `struct gdbarch' functions are called when necessary to access the underlying target architecture. In general users should use the "cooked" functions, since these will map to the "raw" functions automatically as appropriate. The two key functions are `regcache_cooked_read' and `regcache_cooked_write' which read or write a register from or to a byte buffer (type `gdb_byte *'). For convenience the wrapper functions `regcache_cooked_read_signed', `regcache_cooked_read_unsigned', `regcache_cooked_write_signed' and `regcache_cooked_write_unsigned' are provided, which read or write the value using the buffer and convert to or from an integral value as appropriate.  File: gdbint.info, Node: Frame Interpretation, Next: Inferior Call Setup, Prev: Register Representation, Up: Target Architecture Definition 11.7 Frame Interpretation ========================= * Menu: * All About Stack Frames:: * Frame Handling Terminology:: * Prologue Caches:: * Functions and Variable to Analyze Frames:: * Functions to Access Frame Data:: * Analyzing Stacks---Frame Sniffers::  File: gdbint.info, Node: All About Stack Frames, Next: Frame Handling Terminology, Up: Frame Interpretation 11.7.1 All About Stack Frames ----------------------------- GDB needs to understand the stack on which local (automatic) variables are stored. The area of the stack containing all the local variables for a function invocation is known as the "stack frame" for that function (or colloquially just as the "frame"). In turn the function that called the function will have its stack frame, and so on back through the chain of functions that have been called. Almost all architectures have one register dedicated to point to the end of the stack (the "stack pointer"). Many have a second register which points to the start of the currently active stack frame (the "frame pointer"). The specific arrangements for an architecture are a key part of the ABI. A diagram helps to explain this. Here is a simple program to compute factorials: #include <stdio.h> int fact (int n) { if (0 == n) { return 1; } else { return n * fact (n - 1); } } main () { int i; for (i = 0; i < 10; i++) { int f = fact (i); printf ("%d! = %d\n", i, f); } } Consider the state of the stack when the code reaches line 6 after the main program has called `fact (3)'. The chain of function calls will be `main ()', `fact (3)', `fact (2)', `fact (1)' and `fact (0)'. In this illustration the stack is falling (as used for example by the OpenRISC 1000 ABI). The stack pointer (SP) is at the end of the stack (lowest address) and the frame pointer (FP) is at the highest address in the current stack frame. The following diagram shows how the stack looks. �[image src="stack_frame.png" text=" ^ ->| | Frame | | | | Number - | | |============| int fact (int n) | | | | i = 3 | { | | | |------------| if (0 == n) { | | | | f = ? | return 1; <-------- PC #4 main() < | | |------------| } | | | | | else { | | -+->|------------| ---> return n * fact (n - 1); | -+-+--+-----o | | } = | | |============| | } | | | | n = 3 | | | | | |------------| | main () #3 fact (3) < | | | o---------+- { | -+-+->|------------| | | int i; | | | --+-----o | | | = | | |============| | | for (i = 0; i < 10; i++) { | | | | n = 2 | | -> int f = fact (i); | | | |------------| | printf (\"%d! = %d\\n\", i , f); #2 fact (2) < | | | o------+--| } | | | ->|------------| | } | | -+--+-----o | | = | | |============| | | | | | n = 1 | | | | | |------------| | #1 fact (1) < | | | o------+--| | | | |------------| | | ---|--+-----o |<-+------- FP = | |============| | | | | | n = 0 | | | | | |------------| | | #0 fact (0) < | | o--------- | | | |------------| | | --+-----o |<--------- SP | = |============| | | | Red Zone | v | \\/\\/\\/\\/\\/\\/\\/ Direction of #-1 < \\/\\/\\/\\/\\/\\/\\/ stack growth | | | "�] In each stack frame, offset 0 from the stack pointer is the frame pointer of the previous frame and offset 4 (this is illustrating a 32-bit architecture) from the stack pointer is the return address. Local variables are indexed from the frame pointer, with negative indexes. In the function `fact', offset -4 from the frame pointer is the argument N. In the `main' function, offset -4 from the frame pointer is the local variable I and offset -8 from the frame pointer is the local variable F(1). It is very easy to get confused when examining stacks. GDB has terminology it uses rigorously throughout. The stack frame of the function currently executing, or where execution stopped is numbered zero. In this example frame #0 is the stack frame of the call to `fact (0)'. The stack frame of its calling function (`fact (1)' in this case) is numbered #1 and so on back through the chain of calls. The main GDB data structure describing frames is `struct frame_info'. It is not used directly, but only via its accessor functions. `frame_info' includes information about the registers in the frame and a pointer to the code of the function with which the frame is associated. The entire stack is represented as a linked list of `frame_info' structs. ---------- Footnotes ---------- (1) This is a simplified example for illustrative purposes only. Good optimizing compilers would not put anything on the stack for such simple functions. Indeed they might eliminate the recursion and use of the stack entirely!  File: gdbint.info, Node: Frame Handling Terminology, Next: Prologue Caches, Prev: All About Stack Frames, Up: Frame Interpretation 11.7.2 Frame Handling Terminology --------------------------------- It is easy to get confused when referencing stack frames. GDB uses some precise terminology. * "THIS" frame is the frame currently under consideration. * The "NEXT" frame, also sometimes called the inner or newer frame is the frame of the function called by the function of THIS frame. * The "PREVIOUS" frame, also sometimes called the outer or older frame is the frame of the function which called the function of THIS frame. So in the example in the previous section (*note All About Stack Frames: All About Stack Frames.), if THIS frame is #3 (the call to `fact (3)'), the NEXT frame is frame #2 (the call to `fact (2)') and the PREVIOUS frame is frame #4 (the call to `main ()'). The "innermost" frame is the frame of the current executing function, or where the program stopped, in this example, in the middle of the call to `fact (0))'. It is always numbered frame #0. The "base" of a frame is the address immediately before the start of the NEXT frame. For a stack which grows down in memory (a "falling" stack) this will be the lowest address and for a stack which grows up in memory (a "rising" stack) this will be the highest address in the frame. GDB functions to analyze the stack are typically given a pointer to the NEXT frame to determine information about THIS frame. Information about THIS frame includes data on where the registers of the PREVIOUS frame are stored in this stack frame. In this example the frame pointer of the PREVIOUS frame is stored at offset 0 from the stack pointer of THIS frame. The process whereby a function is given a pointer to the NEXT frame to work out information about THIS frame is referred to as "unwinding". The GDB functions involved in this typically include unwind in their name. The process of analyzing a target to determine the information that should go in struct frame_info is called "sniffing". The functions that carry this out are called sniffers and typically include sniffer in their name. More than one sniffer may be required to extract all the information for a particular frame. Because so many functions work using the NEXT frame, there is an issue about addressing the innermost frame--it has no NEXT frame. To solve this GDB creates a dummy frame #-1, known as the "sentinel" frame.  File: gdbint.info, Node: Prologue Caches, Next: Functions and Variable to Analyze Frames, Prev: Frame Handling Terminology, Up: Frame Interpretation 11.7.3 Prologue Caches ---------------------- All the frame sniffing functions typically examine the code at the start of the corresponding function, to determine the state of registers. The ABI will save old values and set new values of key registers at the start of each function in what is known as the function "prologue". For any particular stack frame this data does not change, so all the standard unwinding functions, in addition to receiving a pointer to the NEXT frame as their first argument, receive a pointer to a "prologue cache" as their second argument. This can be used to store values associated with a particular frame, for reuse on subsequent calls involving the same frame. It is up to the user to define the structure used (it is a `void *' pointer) and arrange allocation and deallocation of storage. However for general use, GDB provides `struct trad_frame_cache', with a set of accessor routines. This structure holds the stack and code address of THIS frame, the base address of the frame, a pointer to the struct `frame_info' for the NEXT frame and details of where the registers of the PREVIOUS frame may be found in THIS frame. Typically the first time any sniffer function is called with NEXT frame, the prologue sniffer for THIS frame will be `NULL'. The sniffer will analyze the frame, allocate a prologue cache structure and populate it. Subsequent calls using the same NEXT frame will pass in this prologue cache, so the data can be returned with no additional analysis.  File: gdbint.info, Node: Functions and Variable to Analyze Frames, Next: Functions to Access Frame Data, Prev: Prologue Caches, Up: Frame Interpretation 11.7.4 Functions and Variable to Analyze Frames ----------------------------------------------- These struct `gdbarch' functions and variable should be defined to provide analysis of the stack frame and allow it to be adjusted as required. -- Architecture Function: CORE_ADDR skip_prologue (struct gdbarch *GDBARCH, CORE_ADDR PC) The prologue of a function is the code at the beginning of the function which sets up the stack frame, saves the return address etc. The code representing the behavior of the function starts after the prologue. This function skips past the prologue of a function if the program counter, PC, is within the prologue of a function. The result is the program counter immediately after the prologue. With modern optimizing compilers, this may be a far from trivial exercise. However the required information may be within the binary as DWARF2 debugging information, making the job much easier. The default value is `NULL' (not defined). This function should always be provided, but can take advantage of DWARF2 debugging information, if that is available. -- Architecture Function: int inner_than (CORE_ADDR LHS, CORE_ADDR RHS) Given two frame or stack pointers, return non-zero (true) if the first represents the "inner" stack frame and 0 (false) otherwise. This is used to determine whether the target has a stack which grows up in memory (rising stack) or grows down in memory (falling stack). *Note All About Stack Frames: All About Stack Frames, for an explanation of "inner" frames. The default value of this function is `NULL' and it should always be defined. However for almost all architectures one of the built-in functions can be used: `core_addr_lessthan' (for stacks growing down in memory) or `core_addr_greaterthan' (for stacks growing up in memory). -- Architecture Function: CORE_ADDR frame_align (struct gdbarch *GDBARCH, CORE_ADDR ADDRESS) The architecture may have constraints on how its frames are aligned. For example the OpenRISC 1000 ABI requires stack frames to be double-word aligned, but 32-bit versions of the architecture allocate single-word values to the stack. Thus extra padding may be needed at the end of a stack frame. Given a proposed address for the stack pointer, this function returns a suitably aligned address (by expanding the stack frame). The default value is `NULL' (undefined). This function should be defined for any architecture where it is possible the stack could become misaligned. The utility functions `align_down' (for falling stacks) and `align_up' (for rising stacks) will facilitate the implementation of this function. -- Architecture Variable: int frame_red_zone_size Some ABIs reserve space beyond the end of the stack for use by leaf functions without prologue or epilogue or by exception handlers (for example the OpenRISC 1000). This is known as a "red zone" (AMD terminology). The AMD64 (nee x86-64) ABI documentation refers to the "red zone" when describing this scratch area. The default value is 0. Set this field if the architecture has such a red zone. The value must be aligned as required by the ABI (see `frame_align' above for an explanation of stack frame alignment).  File: gdbint.info, Node: Functions to Access Frame Data, Next: Analyzing Stacks---Frame Sniffers, Prev: Functions and Variable to Analyze Frames, Up: Frame Interpretation 11.7.5 Functions to Access Frame Data ------------------------------------- These functions provide access to key registers and arguments in the stack frame. -- Architecture Function: CORE_ADDR unwind_pc (struct gdbarch *GDBARCH, struct frame_info *NEXT_FRAME) This function is given a pointer to the NEXT stack frame (*note All About Stack Frames: All About Stack Frames, for how frames are represented) and returns the value of the program counter in the PREVIOUS frame (i.e. the frame of the function that called THIS one). This is commonly referred to as the "return address". The implementation, which must be frame agnostic (work with any frame), is typically no more than: ULONGEST pc; pc = frame_unwind_register_unsigned (next_frame, ARCH_PC_REGNUM); return gdbarch_addr_bits_remove (gdbarch, pc); -- Architecture Function: CORE_ADDR unwind_sp (struct gdbarch *GDBARCH, struct frame_info *NEXT_FRAME) This function is given a pointer to the NEXT stack frame (*note All About Stack Frames: All About Stack Frames. for how frames are represented) and returns the value of the stack pointer in the PREVIOUS frame (i.e. the frame of the function that called THIS one). The implementation, which must be frame agnostic (work with any frame), is typically no more than: ULONGEST sp; sp = frame_unwind_register_unsigned (next_frame, ARCH_SP_REGNUM); return gdbarch_addr_bits_remove (gdbarch, sp); -- Architecture Function: int frame_num_args (struct gdbarch *GDBARCH, struct frame_info *THIS_FRAME) This function is given a pointer to THIS stack frame (*note All About Stack Frames: All About Stack Frames. for how frames are represented), and returns the number of arguments that are being passed, or -1 if not known. The default value is `NULL' (undefined), in which case the number of arguments passed on any stack frame is always unknown. For many architectures this will be a suitable default.  File: gdbint.info, Node: Analyzing Stacks---Frame Sniffers, Prev: Functions to Access Frame Data, Up: Frame Interpretation 11.7.6 Analyzing Stacks--Frame Sniffers --------------------------------------- When a program stops, GDB needs to construct the chain of struct `frame_info' representing the state of the stack using appropriate "sniffers". Each architecture requires appropriate sniffers, but they do not form entries in `struct gdbarch', since more than one sniffer may be required and a sniffer may be suitable for more than one `struct gdbarch'. Instead sniffers are associated with architectures using the following functions. * `frame_unwind_append_sniffer' is used to add a new sniffer to analyze THIS frame when given a pointer to the NEXT frame. * `frame_base_append_sniffer' is used to add a new sniffer which can determine information about the base of a stack frame. * `frame_base_set_default' is used to specify the default base sniffer. These functions all take a reference to `struct gdbarch', so they are associated with a specific architecture. They are usually called in the `gdbarch' initialization function, after the `gdbarch' struct has been set up. Unless a default has been set, the most recently appended sniffer will be tried first. The main frame unwinding sniffer (as set by `frame_unwind_append_sniffer)' returns a structure specifying a set of sniffing functions: struct frame_unwind { enum frame_type type; frame_this_id_ftype *this_id; frame_prev_register_ftype *prev_register; const struct frame_data *unwind_data; frame_sniffer_ftype *sniffer; frame_prev_pc_ftype *prev_pc; frame_dealloc_cache_ftype *dealloc_cache; }; The `type' field indicates the type of frame this sniffer can handle: normal, dummy (*note Functions Creating Dummy Frames: Functions Creating Dummy Frames.), signal handler or sentinel. Signal handlers sometimes have their own simplified stack structure for efficiency, so may need their own handlers. The `unwind_data' field holds additional information which may be relevant to particular types of frame. For example it may hold additional information for signal handler frames. The remaining fields define functions that yield different types of information when given a pointer to the NEXT stack frame. Not all functions need be provided. If an entry is `NULL', the next sniffer will be tried instead. * `this_id' determines the stack pointer and function (code entry point) for THIS stack frame. * `prev_register' determines where the values of registers for the PREVIOUS stack frame are stored in THIS stack frame. * `sniffer' takes a look at THIS frame's registers to determine if this is the appropriate unwinder. * `prev_pc' determines the program counter for THIS frame. Only needed if the program counter is not an ordinary register (*note Functions and Variables Specifying the Register Architecture: Register Architecture Functions & Variables.). * `dealloc_cache' frees any additional memory associated with the prologue cache for this frame (*note Prologue Caches: Prologue Caches.). In general it is only the `this_id' and `prev_register' fields that need be defined for custom sniffers. The frame base sniffer is much simpler. It is a `struct frame_base', which refers to the corresponding `frame_unwind' struct and whose fields refer to functions yielding various addresses within the frame. struct frame_base { const struct frame_unwind *unwind; frame_this_base_ftype *this_base; frame_this_locals_ftype *this_locals; frame_this_args_ftype *this_args; }; All the functions referred to take a pointer to the NEXT frame as argument. The function referred to by `this_base' returns the base address of THIS frame, the function referred to by `this_locals' returns the base address of local variables in THIS frame and the function referred to by `this_args' returns the base address of the function arguments in this frame. As described above, the base address of a frame is the address immediately before the start of the NEXT frame. For a falling stack, this is the lowest address in the frame and for a rising stack it is the highest address in the frame. For most architectures the same address is also the base address for local variables and arguments, in which case the same function can be used for all three entries(1). ---------- Footnotes ---------- (1) It is worth noting that if it cannot be determined in any other way (for example by there being a register with the name `"fp"'), then the result of the `this_base' function will be used as the value of the frame pointer variable `$fp' in GDB. This is very often not correct (for example with the OpenRISC 1000, this value is the stack pointer, `$sp'). In this case a register (raw or pseudo) with the name `"fp"' should be defined. It will be used in preference as the value of `$fp'.  File: gdbint.info, Node: Inferior Call Setup, Next: Adding support for debugging core files, Prev: Frame Interpretation, Up: Target Architecture Definition 11.8 Inferior Call Setup ======================== * Menu: * About Dummy Frames:: * Functions Creating Dummy Frames::  File: gdbint.info, Node: About Dummy Frames, Next: Functions Creating Dummy Frames, Up: Inferior Call Setup 11.8.1 About Dummy Frames ------------------------- GDB can call functions in the target code (for example by using the `call' or `print' commands). These functions may be breakpointed, and it is essential that if a function does hit a breakpoint, commands like `backtrace' work correctly. This is achieved by making the stack look as though the function had been called from the point where GDB had previously stopped. This requires that GDB can set up stack frames appropriate for such function calls.  File: gdbint.info, Node: Functions Creating Dummy Frames, Prev: About Dummy Frames, Up: Inferior Call Setup 11.8.2 Functions Creating Dummy Frames -------------------------------------- The following functions provide the functionality to set up such "dummy" stack frames. -- Architecture Function: CORE_ADDR push_dummy_call (struct gdbarch *GDBARCH, struct value *FUNCTION, struct regcache *REGCACHE, CORE_ADDR BP_ADDR, int NARGS, struct value **ARGS, CORE_ADDR SP, int STRUCT_RETURN, CORE_ADDR STRUCT_ADDR) This function sets up a dummy stack frame for the function about to be called. `push_dummy_call' is given the arguments to be passed and must copy them into registers or push them on to the stack as appropriate for the ABI. FUNCTION is a pointer to the function that will be called and REGCACHE the register cache from which values should be obtained. BP_ADDR is the address to which the function should return (which is breakpointed, so GDB can regain control, hence the name). NARGS is the number of arguments to pass and ARGS an array containing the argument values. STRUCT_RETURN is non-zero (true) if the function returns a structure, and if so STRUCT_ADDR is the address in which the structure should be returned. After calling this function, GDB will pass control to the target at the address of the function, which will find the stack and registers set up just as expected. The default value of this function is `NULL' (undefined). If the function is not defined, then GDB will not allow the user to call functions within the target being debugged. -- Architecture Function: struct frame_id unwind_dummy_id (struct gdbarch *GDBARCH, struct frame_info *NEXT_FRAME) This is the inverse of `push_dummy_call' which restores the stack pointer and program counter after a call to evaluate a function using a dummy stack frame. The result is a `struct frame_id', which contains the value of the stack pointer and program counter to be used. The NEXT frame pointer is provided as argument, NEXT_FRAME. THIS frame is the frame of the dummy function, which can be unwound, to yield the required stack pointer and program counter from the PREVIOUS frame. The default value is `NULL' (undefined). If `push_dummy_call' is defined, then this function should also be defined. -- Architecture Function: CORE_ADDR push_dummy_code (struct gdbarch *GDBARCH, CORE_ADDR SP, CORE_ADDR FUNADDR, struct value **ARGS, int NARGS, struct type *VALUE_TYPE, CORE_ADDR *REAL_PC, CORE_ADDR *BP_ADDR, struct regcache *REGCACHE) If this function is not defined (its default value is `NULL'), a dummy call will use the entry point of the currently loaded code on the target as its return address. A temporary breakpoint will be set there, so the location must be writable and have room for a breakpoint. It is possible that this default is not suitable. It might not be writable (in ROM possibly), or the ABI might require code to be executed on return from a call to unwind the stack before the breakpoint is encountered. If either of these is the case, then push_dummy_code should be defined to push an instruction sequence onto the end of the stack to which the dummy call should return. The arguments are essentially the same as those to `push_dummy_call'. However the function is provided with the type of the function result, VALUE_TYPE, BP_ADDR is used to return a value (the address at which the breakpoint instruction should be inserted) and REAL PC is used to specify the resume address when starting the call sequence. The function should return the updated innermost stack address. _Note:_ This does require that code in the stack can be executed. Some Harvard architectures may not allow this.  File: gdbint.info, Node: Adding support for debugging core files, Next: Defining Other Architecture Features, Prev: Inferior Call Setup, Up: Target Architecture Definition 11.9 Adding support for debugging core files ============================================ The prerequisite for adding core file support in GDB is to have core file support in BFD. Once BFD support is available, writing the apropriate `regset_from_core_section' architecture function should be all that is needed in order to add support for core files in GDB.  File: gdbint.info, Node: Defining Other Architecture Features, Next: Adding a New Target, Prev: Adding support for debugging core files, Up: Target Architecture Definition 11.10 Defining Other Architecture Features ========================================== This section describes other functions and values in `gdbarch', together with some useful macros, that you can use to define the target architecture. `CORE_ADDR gdbarch_addr_bits_remove (GDBARCH, ADDR)' If a raw machine instruction address includes any bits that are not really part of the address, then this function is used to zero those bits in ADDR. This is only used for addresses of instructions, and even then not in all contexts. For example, the two low-order bits of the PC on the Hewlett-Packard PA 2.0 architecture contain the privilege level of the corresponding instruction. Since instructions must always be aligned on four-byte boundaries, the processor masks out these bits to generate the actual address of the instruction. `gdbarch_addr_bits_remove' would then for example look like that: arch_addr_bits_remove (CORE_ADDR addr) { return (addr &= ~0x3); } `int address_class_name_to_type_flags (GDBARCH, NAME, TYPE_FLAGS_PTR)' If NAME is a valid address class qualifier name, set the `int' referenced by TYPE_FLAGS_PTR to the mask representing the qualifier and return 1. If NAME is not a valid address class qualifier name, return 0. The value for TYPE_FLAGS_PTR should be one of `TYPE_FLAG_ADDRESS_CLASS_1', `TYPE_FLAG_ADDRESS_CLASS_2', or possibly some combination of these values or'd together. *Note Address Classes: Target Architecture Definition. `int address_class_name_to_type_flags_p (GDBARCH)' Predicate which indicates whether `address_class_name_to_type_flags' has been defined. `int gdbarch_address_class_type_flags (GDBARCH, BYTE_SIZE, DWARF2_ADDR_CLASS)' Given a pointers byte size (as described by the debug information) and the possible `DW_AT_address_class' value, return the type flags used by GDB to represent this address class. The value returned should be one of `TYPE_FLAG_ADDRESS_CLASS_1', `TYPE_FLAG_ADDRESS_CLASS_2', or possibly some combination of these values or'd together. *Note Address Classes: Target Architecture Definition. `int gdbarch_address_class_type_flags_p (GDBARCH)' Predicate which indicates whether `gdbarch_address_class_type_flags_p' has been defined. `const char *gdbarch_address_class_type_flags_to_name (GDBARCH, TYPE_FLAGS)' Return the name of the address class qualifier associated with the type flags given by TYPE_FLAGS. `int gdbarch_address_class_type_flags_to_name_p (GDBARCH)' Predicate which indicates whether `gdbarch_address_class_type_flags_to_name' has been defined. *Note Address Classes: Target Architecture Definition. `void gdbarch_address_to_pointer (GDBARCH, TYPE, BUF, ADDR)' Store in BUF a pointer of type TYPE representing the address ADDR, in the appropriate format for the current architecture. This function may safely assume that TYPE is either a pointer or a C++ reference type. *Note Pointers Are Not Always Addresses: Target Architecture Definition. `int gdbarch_believe_pcc_promotion (GDBARCH)' Used to notify if the compiler promotes a `short' or `char' parameter to an `int', but still reports the parameter as its original type, rather than the promoted type. `gdbarch_bits_big_endian (GDBARCH)' This is used if the numbering of bits in the targets does *not* match the endianism of the target byte order. A value of 1 means that the bits are numbered in a big-endian bit order, 0 means little-endian. `set_gdbarch_bits_big_endian (GDBARCH, BITS_BIG_ENDIAN)' Calling set_gdbarch_bits_big_endian with a value of 1 indicates that the bits in the target are numbered in a big-endian bit order, 0 indicates little-endian. `BREAKPOINT' This is the character array initializer for the bit pattern to put into memory where a breakpoint is set. Although it's common to use a trap instruction for a breakpoint, it's not required; for instance, the bit pattern could be an invalid instruction. The breakpoint must be no longer than the shortest instruction of the architecture. `BREAKPOINT' has been deprecated in favor of `gdbarch_breakpoint_from_pc'. `BIG_BREAKPOINT' `LITTLE_BREAKPOINT' Similar to BREAKPOINT, but used for bi-endian targets. `BIG_BREAKPOINT' and `LITTLE_BREAKPOINT' have been deprecated in favor of `gdbarch_breakpoint_from_pc'. `const gdb_byte *gdbarch_breakpoint_from_pc (GDBARCH, PCPTR, LENPTR)' Use the program counter to determine the contents and size of a breakpoint instruction. It returns a pointer to a static string of bytes that encode a breakpoint instruction, stores the length of the string to `*LENPTR', and adjusts the program counter (if necessary) to point to the actual memory location where the breakpoint should be inserted. On input, the program counter (`*PCPTR' is the encoded inferior's PC register. If software breakpoints are supported, the function sets this argument to the PC's plain address. If software breakpoints are not supported, the function returns NULL instead of the encoded breakpoint instruction. Although it is common to use a trap instruction for a breakpoint, it's not required; for instance, the bit pattern could be an invalid instruction. The breakpoint must be no longer than the shortest instruction of the architecture. Provided breakpoint bytes can be also used by `bp_loc_is_permanent' to detect permanent breakpoints. `gdbarch_breakpoint_from_pc' should return an unchanged memory copy if it was called for a location with permanent breakpoint as some architectures use breakpoint instructions containing arbitrary parameter value. Replaces all the other BREAKPOINT macros. `int gdbarch_memory_insert_breakpoint (GDBARCH, BP_TGT)' `gdbarch_memory_remove_breakpoint (GDBARCH, BP_TGT)' Insert or remove memory based breakpoints. Reasonable defaults (`default_memory_insert_breakpoint' and `default_memory_remove_breakpoint' respectively) have been provided so that it is not necessary to set these for most architectures. Architectures which may want to set `gdbarch_memory_insert_breakpoint' and `gdbarch_memory_remove_breakpoint' will likely have instructions that are oddly sized or are not stored in a conventional manner. It may also be desirable (from an efficiency standpoint) to define custom breakpoint insertion and removal routines if `gdbarch_breakpoint_from_pc' needs to read the target's memory for some reason. `CORE_ADDR gdbarch_adjust_breakpoint_address (GDBARCH, BPADDR)' Given an address at which a breakpoint is desired, return a breakpoint address adjusted to account for architectural constraints on breakpoint placement. This method is not needed by most targets. The FR-V target (see `frv-tdep.c') requires this method. The FR-V is a VLIW architecture in which a number of RISC-like instructions are grouped (packed) together into an aggregate instruction or instruction bundle. When the processor executes one of these bundles, the component instructions are executed in parallel. In the course of optimization, the compiler may group instructions from distinct source statements into the same bundle. The line number information associated with one of the latter statements will likely refer to some instruction other than the first one in the bundle. So, if the user attempts to place a breakpoint on one of these latter statements, GDB must be careful to _not_ place the break instruction on any instruction other than the first one in the bundle. (Remember though that the instructions within a bundle execute in parallel, so the _first_ instruction is the instruction at the lowest address and has nothing to do with execution order.) The FR-V's `gdbarch_adjust_breakpoint_address' method will adjust a breakpoint's address by scanning backwards for the beginning of the bundle, returning the address of the bundle. Since the adjustment of a breakpoint may significantly alter a user's expectation, GDB prints a warning when an adjusted breakpoint is initially set and each time that that breakpoint is hit. `int gdbarch_call_dummy_location (GDBARCH)' See the file `inferior.h'. This method has been replaced by `gdbarch_push_dummy_code' (*note gdbarch_push_dummy_code::). `int gdbarch_cannot_fetch_register (GDBARCH, REGUM)' This function should return nonzero if REGNO cannot be fetched from an inferior process. `int gdbarch_cannot_store_register (GDBARCH, REGNUM)' This function should return nonzero if REGNO should not be written to the target. This is often the case for program counters, status words, and other special registers. This function returns 0 as default so that GDB will assume that all registers may be written. `int gdbarch_convert_register_p (GDBARCH, REGNUM, struct type *TYPE)' Return non-zero if register REGNUM represents data values of type TYPE in a non-standard form. *Note Using Different Register and Memory Data Representations: Target Architecture Definition. `int gdbarch_fp0_regnum (GDBARCH)' This function returns the number of the first floating point register, if the machine has such registers. Otherwise, it returns -1. `CORE_ADDR gdbarch_decr_pc_after_break (GDBARCH)' This function shall return the amount by which to decrement the PC after the program encounters a breakpoint. This is often the number of bytes in `BREAKPOINT', though not always. For most targets this value will be 0. `DISABLE_UNSETTABLE_BREAK (ADDR)' If defined, this should evaluate to 1 if ADDR is in a shared library in which breakpoints cannot be set and so should be disabled. `int gdbarch_dwarf2_reg_to_regnum (GDBARCH, DWARF2_REGNR)' Convert DWARF2 register number DWARF2_REGNR into GDB regnum. If not defined, no conversion will be performed. `int gdbarch_ecoff_reg_to_regnum (GDBARCH, ECOFF_REGNR)' Convert ECOFF register number ECOFF_REGNR into GDB regnum. If not defined, no conversion will be performed. `GCC_COMPILED_FLAG_SYMBOL' `GCC2_COMPILED_FLAG_SYMBOL' If defined, these are the names of the symbols that GDB will look for to detect that GCC compiled the file. The default symbols are `gcc_compiled.' and `gcc2_compiled.', respectively. (Currently only defined for the Delta 68.) `gdbarch_get_longjmp_target' This function determines the target PC address that `longjmp' will jump to, assuming that we have just stopped at a `longjmp' breakpoint. It takes a `CORE_ADDR *' as argument, and stores the target PC value through this pointer. It examines the current state of the machine as needed, typically by using a manually-determined offset into the `jmp_buf'. (While we might like to get the offset from the target's `jmpbuf.h', that header file cannot be assumed to be available when building a cross-debugger.) `DEPRECATED_IBM6000_TARGET' Shows that we are configured for an IBM RS/6000 system. This conditional should be eliminated (FIXME) and replaced by feature-specific macros. It was introduced in haste and we are repenting at leisure. `I386_USE_GENERIC_WATCHPOINTS' An x86-based target can define this to use the generic x86 watchpoint support; see *note I386_USE_GENERIC_WATCHPOINTS: Algorithms. `gdbarch_in_function_epilogue_p (GDBARCH, ADDR)' Returns non-zero if the given ADDR is in the epilogue of a function. The epilogue of a function is defined as the part of a function where the stack frame of the function already has been destroyed up to the final `return from function call' instruction. `int gdbarch_in_solib_return_trampoline (GDBARCH, PC, NAME)' Define this function to return nonzero if the program is stopped in the trampoline that returns from a shared library. `target_so_ops.in_dynsym_resolve_code (PC)' Define this to return nonzero if the program is stopped in the dynamic linker. `SKIP_SOLIB_RESOLVER (PC)' Define this to evaluate to the (nonzero) address at which execution should continue to get past the dynamic linker's symbol resolution function. A zero value indicates that it is not important or necessary to set a breakpoint to get through the dynamic linker and that single stepping will suffice. `CORE_ADDR gdbarch_integer_to_address (GDBARCH, TYPE, BUF)' Define this when the architecture needs to handle non-pointer to address conversions specially. Converts that value to an address according to the current architectures conventions. _Pragmatics: When the user copies a well defined expression from their source code and passes it, as a parameter, to GDB's `print' command, they should get the same value as would have been computed by the target program. Any deviation from this rule can cause major confusion and annoyance, and needs to be justified carefully. In other words, GDB doesn't really have the freedom to do these conversions in clever and useful ways. It has, however, been pointed out that users aren't complaining about how GDB casts integers to pointers; they are complaining that they can't take an address from a disassembly listing and give it to `x/i'. Adding an architecture method like `gdbarch_integer_to_address' certainly makes it possible for GDB to "get it right" in all circumstances._ *Note Pointers Are Not Always Addresses: Target Architecture Definition. `CORE_ADDR gdbarch_pointer_to_address (GDBARCH, TYPE, BUF)' Assume that BUF holds a pointer of type TYPE, in the appropriate format for the current architecture. Return the byte address the pointer refers to. *Note Pointers Are Not Always Addresses: Target Architecture Definition. `void gdbarch_register_to_value(GDBARCH, FRAME, REGNUM, TYPE, FUR)' Convert the raw contents of register REGNUM into a value of type TYPE. *Note Using Different Register and Memory Data Representations: Target Architecture Definition. `REGISTER_CONVERT_TO_VIRTUAL(REG, TYPE, FROM, TO)' Convert the value of register REG from its raw form to its virtual form. *Note Raw and Virtual Register Representations: Target Architecture Definition. `REGISTER_CONVERT_TO_RAW(TYPE, REG, FROM, TO)' Convert the value of register REG from its virtual form to its raw form. *Note Raw and Virtual Register Representations: Target Architecture Definition. `const struct regset *regset_from_core_section (struct gdbarch * GDBARCH, const char * SECT_NAME, size_t SECT_SIZE)' Return the appropriate register set for a core file section with name SECT_NAME and size SECT_SIZE. `SOFTWARE_SINGLE_STEP_P()' Define this as 1 if the target does not have a hardware single-step mechanism. The macro `SOFTWARE_SINGLE_STEP' must also be defined. `SOFTWARE_SINGLE_STEP(SIGNAL, INSERT_BREAKPOINTS_P)' A function that inserts or removes (depending on INSERT_BREAKPOINTS_P) breakpoints at each possible destinations of the next instruction. See `sparc-tdep.c' and `rs6000-tdep.c' for examples. `set_gdbarch_sofun_address_maybe_missing (GDBARCH, SET)' Somebody clever observed that, the more actual addresses you have in the debug information, the more time the linker has to spend relocating them. So whenever there's some other way the debugger could find the address it needs, you should omit it from the debug info, to make linking faster. Calling `set_gdbarch_sofun_address_maybe_missing' with a non-zero argument SET indicates that a particular set of hacks of this sort are in use, affecting `N_SO' and `N_FUN' entries in stabs-format debugging information. `N_SO' stabs mark the beginning and ending addresses of compilation units in the text segment. `N_FUN' stabs mark the starts and ends of functions. In this case, GDB assumes two things: * `N_FUN' stabs have an address of zero. Instead of using those addresses, you should find the address where the function starts by taking the function name from the stab, and then looking that up in the minsyms (the linker/assembler symbol table). In other words, the stab has the name, and the linker/assembler symbol table is the only place that carries the address. * `N_SO' stabs have an address of zero, too. You just look at the `N_FUN' stabs that appear before and after the `N_SO' stab, and guess the starting and ending addresses of the compilation unit from them. `int gdbarch_stabs_argument_has_addr (GDBARCH, TYPE)' Define this function to return nonzero if a function argument of type TYPE is passed by reference instead of value. `CORE_ADDR gdbarch_push_dummy_call (GDBARCH, FUNCTION, REGCACHE, BP_ADDR, NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR)' Define this to push the dummy frame's call to the inferior function onto the stack. In addition to pushing NARGS, the code should push STRUCT_ADDR (when STRUCT_RETURN is non-zero), and the return address (BP_ADDR, in inferior's PC register encoding). FUNCTION is a pointer to a `struct value'; on architectures that use function descriptors, this contains the function descriptor value. Returns the updated top-of-stack pointer. `CORE_ADDR gdbarch_push_dummy_code (GDBARCH, SP, FUNADDR, USING_GCC, ARGS, NARGS, VALUE_TYPE, REAL_PC, BP_ADDR, REGCACHE)' Given a stack based call dummy, push the instruction sequence (including space for a breakpoint) to which the called function should return. Set BP_ADDR to the address at which the breakpoint instruction should be inserted (in inferior's PC register encoding), REAL_PC to the resume address when starting the call sequence, and return the updated inner-most stack address. By default, the stack is grown sufficient to hold a frame-aligned (*note frame_align::) breakpoint, BP_ADDR is set to the address reserved for that breakpoint (in inferior's PC register encoding), and REAL_PC set to FUNADDR. This method replaces `gdbarch_call_dummy_location (GDBARCH)'. `int gdbarch_sdb_reg_to_regnum (GDBARCH, SDB_REGNR)' Use this function to convert sdb register SDB_REGNR into GDB regnum. If not defined, no conversion will be done. `enum return_value_convention gdbarch_return_value (struct gdbarch *GDBARCH, struct type *VALTYPE, struct regcache *REGCACHE, void *READBUF, const void *WRITEBUF)' Given a function with a return-value of type RETTYPE, return which return-value convention that function would use. GDB currently recognizes two function return-value conventions: `RETURN_VALUE_REGISTER_CONVENTION' where the return value is found in registers; and `RETURN_VALUE_STRUCT_CONVENTION' where the return value is found in memory and the address of that memory location is passed in as the function's first parameter. If the register convention is being used, and WRITEBUF is non-`NULL', also copy the return-value in WRITEBUF into REGCACHE. If the register convention is being used, and READBUF is non-`NULL', also copy the return value from REGCACHE into READBUF (REGCACHE contains a copy of the registers from the just returned function). _Maintainer note: This method replaces separate predicate, extract, store methods. By having only one method, the logic needed to determine the return-value convention need only be implemented in one place. If GDB were written in an OO language, this method would instead return an object that knew how to perform the register return-value extract and store._ _Maintainer note: This method does not take a GCC_P parameter, and such a parameter should not be added. If an architecture that requires per-compiler or per-function information be identified, then the replacement of RETTYPE with `struct value' FUNCTION should be pursued._ _Maintainer note: The REGCACHE parameter limits this methods to the inner most frame. While replacing REGCACHE with a `struct frame_info' FRAME parameter would remove that limitation there has yet to be a demonstrated need for such a change._ `void gdbarch_skip_permanent_breakpoint (GDBARCH, REGCACHE)' Advance the inferior's PC past a permanent breakpoint. GDB normally steps over a breakpoint by removing it, stepping one instruction, and re-inserting the breakpoint. However, permanent breakpoints are hardwired into the inferior, and can't be removed, so this strategy doesn't work. Calling `gdbarch_skip_permanent_breakpoint' adjusts the processor's state so that execution will resume just after the breakpoint. This function does the right thing even when the breakpoint is in the delay slot of a branch or jump. `CORE_ADDR gdbarch_skip_trampoline_code (GDBARCH, FRAME, PC)' If the target machine has trampoline code that sits between callers and the functions being called, then define this function to return a new PC that is at the start of the real function. `int gdbarch_deprecated_fp_regnum (GDBARCH)' If the frame pointer is in a register, use this function to return the number of that register. `int gdbarch_stab_reg_to_regnum (GDBARCH, STAB_REGNR)' Use this function to convert stab register STAB_REGNR into GDB regnum. If not defined, no conversion will be done. `TARGET_CHAR_BIT' Number of bits in a char; defaults to 8. `int gdbarch_char_signed (GDBARCH)' Non-zero if `char' is normally signed on this architecture; zero if it should be unsigned. The ISO C standard requires the compiler to treat `char' as equivalent to either `signed char' or `unsigned char'; any character in the standard execution set is supposed to be positive. Most compilers treat `char' as signed, but `char' is unsigned on the IBM S/390, RS6000, and PowerPC targets. `int gdbarch_double_bit (GDBARCH)' Number of bits in a double float; defaults to `8 * TARGET_CHAR_BIT'. `int gdbarch_float_bit (GDBARCH)' Number of bits in a float; defaults to `4 * TARGET_CHAR_BIT'. `int gdbarch_int_bit (GDBARCH)' Number of bits in an integer; defaults to `4 * TARGET_CHAR_BIT'. `int gdbarch_long_bit (GDBARCH)' Number of bits in a long integer; defaults to `4 * TARGET_CHAR_BIT'. `int gdbarch_long_double_bit (GDBARCH)' Number of bits in a long double float; defaults to `2 * gdbarch_double_bit (GDBARCH)'. `int gdbarch_long_long_bit (GDBARCH)' Number of bits in a long long integer; defaults to `2 * gdbarch_long_bit (GDBARCH)'. `int gdbarch_ptr_bit (GDBARCH)' Number of bits in a pointer; defaults to `gdbarch_int_bit (GDBARCH)'. `int gdbarch_short_bit (GDBARCH)' Number of bits in a short integer; defaults to `2 * TARGET_CHAR_BIT'. `void gdbarch_virtual_frame_pointer (GDBARCH, PC, FRAME_REGNUM, FRAME_OFFSET)' Returns a `(REGISTER, OFFSET)' pair representing the virtual frame pointer in use at the code address PC. If virtual frame pointers are not used, a default definition simply returns `gdbarch_deprecated_fp_regnum' (or `gdbarch_sp_regnum', if no frame pointer is defined), with an offset of zero. `TARGET_HAS_HARDWARE_WATCHPOINTS' If non-zero, the target has support for hardware-assisted watchpoints. *Note watchpoints: Algorithms, for more details and other related macros. `int gdbarch_print_insn (GDBARCH, VMA, INFO)' This is the function used by GDB to print an assembly instruction. It prints the instruction at address VMA in debugged memory and returns the length of the instruction, in bytes. This usually points to a function in the `opcodes' library (*note Opcodes: Support Libraries.). INFO is a structure (of type `disassemble_info') defined in the header file `include/dis-asm.h', and used to pass information to the instruction decoding routine. `frame_id gdbarch_dummy_id (GDBARCH, FRAME)' Given FRAME return a `struct frame_id' that uniquely identifies an inferior function call's dummy frame. The value returned must match the dummy frame stack value previously saved by `call_function_by_hand'. `void gdbarch_value_to_register (GDBARCH, FRAME, TYPE, BUF)' Convert a value of type TYPE into the raw contents of a register. *Note Using Different Register and Memory Data Representations: Target Architecture Definition. Motorola M68K target conditionals. `BPT_VECTOR' Define this to be the 4-bit location of the breakpoint trap vector. If not defined, it will default to `0xf'. `REMOTE_BPT_VECTOR' Defaults to `1'.  File: gdbint.info, Node: Adding a New Target, Prev: Defining Other Architecture Features, Up: Target Architecture Definition 11.11 Adding a New Target ========================= The following files add a target to GDB: `gdb/TTT-tdep.c' Contains any miscellaneous code required for this target machine. On some machines it doesn't exist at all. `gdb/ARCH-tdep.c' `gdb/ARCH-tdep.h' This is required to describe the basic layout of the target machine's processor chip (registers, stack, etc.). It can be shared among many targets that use the same processor architecture. (Target header files such as `gdb/config/ARCH/tm-TTT.h', `gdb/config/ARCH/tm-ARCH.h', and `config/tm-OS.h' are no longer used.) A GDB description for a new architecture, arch is created by defining a global function `_initialize_ARCH_tdep', by convention in the source file `ARCH-tdep.c'. For example, in the case of the OpenRISC 1000, this function is called `_initialize_or1k_tdep' and is found in the file `or1k-tdep.c'. The object file resulting from compiling this source file, which will contain the implementation of the `_initialize_ARCH_tdep' function is specified in the GDB `configure.tgt' file, which includes a large case statement pattern matching against the `--target' option of the `configure' script. _Note:_ If the architecture requires multiple source files, the corresponding binaries should be included in `configure.tgt'. However if there are header files, the dependencies on these will not be picked up from the entries in `configure.tgt'. The `Makefile.in' file will need extending to show these dependencies. A new struct gdbarch, defining the new architecture, is created within the `_initialize_ARCH_tdep' function by calling `gdbarch_register': void gdbarch_register (enum bfd_architecture architecture, gdbarch_init_ftype *init_func, gdbarch_dump_tdep_ftype *tdep_dump_func); This function has been described fully in an earlier section. *Note How an Architecture is Represented: How an Architecture is Represented. The new `struct gdbarch' should contain implementations of the necessary functions (described in the previous sections) to describe the basic layout of the target machine's processor chip (registers, stack, etc.). It can be shared among many targets that use the same processor architecture.  File: gdbint.info, Node: Target Descriptions, Next: Target Vector Definition, Prev: Target Architecture Definition, Up: Top 12 Target Descriptions ********************** The target architecture definition (*note Target Architecture Definition::) contains GDB's hard-coded knowledge about an architecture. For some platforms, it is handy to have more flexible knowledge about a specific instance of the architecture--for instance, a processor or development board. "Target descriptions" provide a mechanism for the user to tell GDB more about what their target supports, or for the target to tell GDB directly. For details on writing, automatically supplying, and manually selecting target descriptions, see *note Target Descriptions: (gdb)Target Descriptions. This section will cover some related topics about the GDB internals. * Menu: * Target Descriptions Implementation:: * Adding Target Described Register Support::  File: gdbint.info, Node: Target Descriptions Implementation, Next: Adding Target Described Register Support, Up: Target Descriptions 12.1 Target Descriptions Implementation ======================================= Before GDB connects to a new target, or runs a new program on an existing target, it discards any existing target description and reverts to a default gdbarch. Then, after connecting, it looks for a new target description by calling `target_find_description'. A description may come from a user specified file (XML), the remote `qXfer:features:read' packet (also XML), or from any custom `to_read_description' routine in the target vector. For instance, the remote target supports guessing whether a MIPS target is 32-bit or 64-bit based on the size of the `g' packet. If any target description is found, GDB creates a new gdbarch incorporating the description by calling `gdbarch_update_p'. Any `<architecture>' element is handled first, to determine which architecture's gdbarch initialization routine is called to create the new architecture. Then the initialization routine is called, and has a chance to adjust the constructed architecture based on the contents of the target description. For instance, it can recognize any properties set by a `to_read_description' routine. Also see *note Adding Target Described Register Support::.  File: gdbint.info, Node: Adding Target Described Register Support, Prev: Target Descriptions Implementation, Up: Target Descriptions 12.2 Adding Target Described Register Support ============================================= Target descriptions can report additional registers specific to an instance of the target. But it takes a little work in the architecture specific routines to support this. A target description must either have no registers or a complete set--this avoids complexity in trying to merge standard registers with the target defined registers. It is the architecture's responsibility to validate that a description with registers has everything it needs. To keep architecture code simple, the same mechanism is used to assign fixed internal register numbers to standard registers. If `tdesc_has_registers' returns 1, the description contains registers. The architecture's `gdbarch_init' routine should: * Call `tdesc_data_alloc' to allocate storage, early, before searching for a matching gdbarch or allocating a new one. * Use `tdesc_find_feature' to locate standard features by name. * Use `tdesc_numbered_register' and `tdesc_numbered_register_choices' to locate the expected registers in the standard features. * Return `NULL' if a required feature is missing, or if any standard feature is missing expected registers. This will produce a warning that the description was incomplete. * Free the allocated data before returning, unless `tdesc_use_registers' is called. * Call `set_gdbarch_num_regs' as usual, with a number higher than any fixed number passed to `tdesc_numbered_register'. * Call `tdesc_use_registers' after creating a new gdbarch, before returning it. After `tdesc_use_registers' has been called, the architecture's `register_name', `register_type', and `register_reggroup_p' routines will not be called; that information will be taken from the target description. `num_regs' may be increased to account for any additional registers in the description. Pseudo-registers require some extra care: * Using `tdesc_numbered_register' allows the architecture to give constant register numbers to standard architectural registers, e.g. as an `enum' in `ARCH-tdep.h'. But because pseudo-registers are always numbered above `num_regs', which may be increased by the description, constant numbers can not be used for pseudos. They must be numbered relative to `num_regs' instead. * The description will not describe pseudo-registers, so the architecture must call `set_tdesc_pseudo_register_name', `set_tdesc_pseudo_register_type', and `set_tdesc_pseudo_register_reggroup_p' to supply routines describing pseudo registers. These routines will be passed internal register numbers, so the same routines used for the gdbarch equivalents are usually suitable.  File: gdbint.info, Node: Target Vector Definition, Next: Native Debugging, Prev: Target Descriptions, Up: Top 13 Target Vector Definition *************************** The target vector defines the interface between GDB's abstract handling of target systems, and the nitty-gritty code that actually exercises control over a process or a serial port. GDB includes some 30-40 different target vectors; however, each configuration of GDB includes only a few of them. * Menu: * Managing Execution State:: * Existing Targets::  File: gdbint.info, Node: Managing Execution State, Next: Existing Targets, Up: Target Vector Definition 13.1 Managing Execution State ============================= A target vector can be completely inactive (not pushed on the target stack), active but not running (pushed, but not connected to a fully manifested inferior), or completely active (pushed, with an accessible inferior). Most targets are only completely inactive or completely active, but some support persistent connections to a target even when the target has exited or not yet started. For example, connecting to the simulator using `target sim' does not create a running program. Neither registers nor memory are accessible until `run'. Similarly, after `kill', the program can not continue executing. But in both cases GDB remains connected to the simulator, and target-specific commands are directed to the simulator. A target which only supports complete activation should push itself onto the stack in its `to_open' routine (by calling `push_target'), and unpush itself from the stack in its `to_mourn_inferior' routine (by calling `unpush_target'). A target which supports both partial and complete activation should still call `push_target' in `to_open', but not call `unpush_target' in `to_mourn_inferior'. Instead, it should call either `target_mark_running' or `target_mark_exited' in its `to_open', depending on whether the target is fully active after connection. It should also call `target_mark_running' any time the inferior becomes fully active (e.g. in `to_create_inferior' and `to_attach'), and `target_mark_exited' when the inferior becomes inactive (in `to_mourn_inferior'). The target should also make sure to call `target_mourn_inferior' from its `to_kill', to return the target to inactive state.  File: gdbint.info, Node: Existing Targets, Prev: Managing Execution State, Up: Target Vector Definition 13.2 Existing Targets ===================== 13.2.1 File Targets ------------------- Both executables and core files have target vectors. 13.2.2 Standard Protocol and Remote Stubs ----------------------------------------- GDB's file `remote.c' talks a serial protocol to code that runs in the target system. GDB provides several sample "stubs" that can be integrated into target programs or operating systems for this purpose; they are named `CPU-stub.c'. Many operating systems, embedded targets, emulators, and simulators already have a GDB stub built into them, and maintenance of the remote protocol must be careful to preserve compatibility. The GDB user's manual describes how to put such a stub into your target code. What follows is a discussion of integrating the SPARC stub into a complicated operating system (rather than a simple program), by Stu Grossman, the author of this stub. The trap handling code in the stub assumes the following upon entry to `trap_low': 1. %l1 and %l2 contain pc and npc respectively at the time of the trap; 2. traps are disabled; 3. you are in the correct trap window. As long as your trap handler can guarantee those conditions, then there is no reason why you shouldn't be able to "share" traps with the stub. The stub has no requirement that it be jumped to directly from the hardware trap vector. That is why it calls `exceptionHandler()', which is provided by the external environment. For instance, this could set up the hardware traps to actually execute code which calls the stub first, and then transfers to its own trap handler. For the most point, there probably won't be much of an issue with "sharing" traps, as the traps we use are usually not used by the kernel, and often indicate unrecoverable error conditions. Anyway, this is all controlled by a table, and is trivial to modify. The most important trap for us is for `ta 1'. Without that, we can't single step or do breakpoints. Everything else is unnecessary for the proper operation of the debugger/stub. From reading the stub, it's probably not obvious how breakpoints work. They are simply done by deposit/examine operations from GDB. 13.2.3 ROM Monitor Interface ---------------------------- 13.2.4 Custom Protocols ----------------------- 13.2.5 Transport Layer ---------------------- 13.2.6 Builtin Simulator ------------------------  File: gdbint.info, Node: Native Debugging, Next: Support Libraries, Prev: Target Vector Definition, Up: Top 14 Native Debugging ******************* Several files control GDB's configuration for native support: `gdb/config/ARCH/XYZ.mh' Specifies Makefile fragments needed by a _native_ configuration on machine XYZ. In particular, this lists the required native-dependent object files, by defining `NATDEPFILES=...'. Also specifies the header file which describes native support on XYZ, by defining `NAT_FILE= nm-XYZ.h'. You can also define `NAT_CFLAGS', `NAT_ADD_FILES', `NAT_CLIBS', `NAT_CDEPS', `NAT_GENERATED_FILES', etc.; see `Makefile.in'. _Maintainer's note: The `.mh' suffix is because this file originally contained `Makefile' fragments for hosting GDB on machine XYZ. While the file is no longer used for this purpose, the `.mh' suffix remains. Perhaps someone will eventually rename these fragments so that they have a `.mn' suffix._ `gdb/config/ARCH/nm-XYZ.h' (`nm.h' is a link to this file, created by `configure'). Contains C macro definitions describing the native system environment, such as child process control and core file support. `gdb/XYZ-nat.c' Contains any miscellaneous C code required for this native support of this machine. On some machines it doesn't exist at all. There are some "generic" versions of routines that can be used by various systems. These can be customized in various ways by macros defined in your `nm-XYZ.h' file. If these routines work for the XYZ host, you can just include the generic file's name (with `.o', not `.c') in `NATDEPFILES'. Otherwise, if your machine needs custom support routines, you will need to write routines that perform the same functions as the generic file. Put them into `XYZ-nat.c', and put `XYZ-nat.o' into `NATDEPFILES'. `inftarg.c' This contains the _target_ops vector_ that supports Unix child processes on systems which use ptrace and wait to control the child. `procfs.c' This contains the _target_ops vector_ that supports Unix child processes on systems which use /proc to control the child. `fork-child.c' This does the low-level grunge that uses Unix system calls to do a "fork and exec" to start up a child process. `infptrace.c' This is the low level interface to inferior processes for systems using the Unix `ptrace' call in a vanilla way. 14.1 ptrace =========== 14.2 /proc ========== 14.3 win32 ========== 14.4 shared libraries ===================== 14.5 Native Conditionals ======================== When GDB is configured and compiled, various macros are defined or left undefined, to control compilation when the host and target systems are the same. These macros should be defined (or left undefined) in `nm-SYSTEM.h'. `I386_USE_GENERIC_WATCHPOINTS' An x86-based machine can define this to use the generic x86 watchpoint support; see *note I386_USE_GENERIC_WATCHPOINTS: Algorithms. `SOLIB_ADD (FILENAME, FROM_TTY, TARG, READSYMS)' Define this to expand into an expression that will cause the symbols in FILENAME to be added to GDB's symbol table. If READSYMS is zero symbols are not read but any necessary low level processing for FILENAME is still done. `SOLIB_CREATE_INFERIOR_HOOK' Define this to expand into any shared-library-relocation code that you want to be run just after the child process has been forked. `START_INFERIOR_TRAPS_EXPECTED' When starting an inferior, GDB normally expects to trap twice; once when the shell execs, and once when the program itself execs. If the actual number of traps is something other than 2, then define this macro to expand into the number expected.  File: gdbint.info, Node: Support Libraries, Next: Coding Standards, Prev: Native Debugging, Up: Top 15 Support Libraries ******************** 15.1 BFD ======== BFD provides support for GDB in several ways: _identifying executable and core files_ BFD will identify a variety of file types, including a.out, coff, and several variants thereof, as well as several kinds of core files. _access to sections of files_ BFD parses the file headers to determine the names, virtual addresses, sizes, and file locations of all the various named sections in files (such as the text section or the data section). GDB simply calls BFD to read or write section X at byte offset Y for length Z. _specialized core file support_ BFD provides routines to determine the failing command name stored in a core file, the signal with which the program failed, and whether a core file matches (i.e. could be a core dump of) a particular executable file. _locating the symbol information_ GDB uses an internal interface of BFD to determine where to find the symbol information in an executable file or symbol-file. GDB itself handles the reading of symbols, since BFD does not "understand" debug symbols, but GDB uses BFD's cached information to find the symbols, string table, etc. 15.2 opcodes ============ The opcodes library provides GDB's disassembler. (It's a separate library because it's also used in binutils, for `objdump'). 15.3 readline ============= The `readline' library provides a set of functions for use by applications that allow users to edit command lines as they are typed in. 15.4 libiberty ============== The `libiberty' library provides a set of functions and features that integrate and improve on functionality found in modern operating systems. Broadly speaking, such features can be divided into three groups: supplemental functions (functions that may be missing in some environments and operating systems), replacement functions (providing a uniform and easier to use interface for commonly used standard functions), and extensions (which provide additional functionality beyond standard functions). GDB uses various features provided by the `libiberty' library, for instance the C++ demangler, the IEEE floating format support functions, the input options parser `getopt', the `obstack' extension, and other functions. 15.4.1 `obstacks' in GDB ------------------------ The obstack mechanism provides a convenient way to allocate and free chunks of memory. Each obstack is a pool of memory that is managed like a stack. Objects (of any nature, size and alignment) are allocated and freed in a LIFO fashion on an obstack (see `libiberty''s documentation for a more detailed explanation of `obstacks'). The most noticeable use of the `obstacks' in GDB is in object files. There is an obstack associated with each internal representation of an object file. Lots of things get allocated on these `obstacks': dictionary entries, blocks, blockvectors, symbols, minimal symbols, types, vectors of fundamental types, class fields of types, object files section lists, object files section offset lists, line tables, symbol tables, partial symbol tables, string tables, symbol table private data, macros tables, debug information sections and entries, import and export lists (som), unwind information (hppa), dwarf2 location expressions data. Plus various strings such as directory names strings, debug format strings, names of types. An essential and convenient property of all data on `obstacks' is that memory for it gets allocated (with `obstack_alloc') at various times during a debugging session, but it is released all at once using the `obstack_free' function. The `obstack_free' function takes a pointer to where in the stack it must start the deletion from (much like the cleanup chains have a pointer to where to start the cleanups). Because of the stack like structure of the `obstacks', this allows to free only a top portion of the obstack. There are a few instances in GDB where such thing happens. Calls to `obstack_free' are done after some local data is allocated to the obstack. Only the local data is deleted from the obstack. Of course this assumes that nothing between the `obstack_alloc' and the `obstack_free' allocates anything else on the same obstack. For this reason it is best and safest to use temporary `obstacks'. Releasing the whole obstack is also not safe per se. It is safe only under the condition that we know the `obstacks' memory is no longer needed. In GDB we get rid of the `obstacks' only when we get rid of the whole objfile(s), for instance upon reading a new symbol file. 15.5 gnu-regex ============== Regex conditionals. `C_ALLOCA' `NFAILURES' `RE_NREGS' `SIGN_EXTEND_CHAR' `SWITCH_ENUM_BUG' `SYNTAX_TABLE' `Sword' `sparc' 15.6 Array Containers ===================== Often it is necessary to manipulate a dynamic array of a set of objects. C forces some bookkeeping on this, which can get cumbersome and repetitive. The `vec.h' file contains macros for defining and using a typesafe vector type. The functions defined will be inlined when compiling, and so the abstraction cost should be zero. Domain checks are added to detect programming errors. An example use would be an array of symbols or section information. The array can be grown as symbols are read in (or preallocated), and the accessor macros provided keep care of all the necessary bookkeeping. Because the arrays are type safe, there is no danger of accidentally mixing up the contents. Think of these as C++ templates, but implemented in C. Because of the different behavior of structure objects, scalar objects and of pointers, there are three flavors of vector, one for each of these variants. Both the structure object and pointer variants pass pointers to objects around -- in the former case the pointers are stored into the vector and in the latter case the pointers are dereferenced and the objects copied into the vector. The scalar object variant is suitable for `int'-like objects, and the vector elements are returned by value. There are both `index' and `iterate' accessors. The iterator returns a boolean iteration condition and updates the iteration variable passed by reference. Because the iterator will be inlined, the address-of can be optimized away. The vectors are implemented using the trailing array idiom, thus they are not resizeable without changing the address of the vector object itself. This means you cannot have variables or fields of vector type -- always use a pointer to a vector. The one exception is the final field of a structure, which could be a vector type. You will have to use the `embedded_size' & `embedded_init' calls to create such objects, and they will probably not be resizeable (so don't use the "safe" allocation variants). The trailing array idiom is used (rather than a pointer to an array of data), because, if we allow `NULL' to also represent an empty vector, empty vectors occupy minimal space in the structure containing them. Each operation that increases the number of active elements is available in "quick" and "safe" variants. The former presumes that there is sufficient allocated space for the operation to succeed (it dies if there is not). The latter will reallocate the vector, if needed. Reallocation causes an exponential increase in vector size. If you know you will be adding N elements, it would be more efficient to use the reserve operation before adding the elements with the "quick" operation. This will ensure there are at least as many elements as you ask for, it will exponentially increase if there are too few spare slots. If you want reserve a specific number of slots, but do not want the exponential increase (for instance, you know this is the last allocation), use a negative number for reservation. You can also create a vector of a specific size from the get go. You should prefer the push and pop operations, as they append and remove from the end of the vector. If you need to remove several items in one go, use the truncate operation. The insert and remove operations allow you to change elements in the middle of the vector. There are two remove operations, one which preserves the element ordering `ordered_remove', and one which does not `unordered_remove'. The latter function copies the end element into the removed slot, rather than invoke a memmove operation. The `lower_bound' function will determine where to place an item in the array using insert that will maintain sorted order. If you need to directly manipulate a vector, then the `address' accessor will return the address of the start of the vector. Also the `space' predicate will tell you whether there is spare capacity in the vector. You will not normally need to use these two functions. Vector types are defined using a `DEF_VEC_{O,P,I}(TYPENAME)' macro. Variables of vector type are declared using a `VEC(TYPENAME)' macro. The characters `O', `P' and `I' indicate whether TYPENAME is an object (`O'), pointer (`P') or integral (`I') type. Be careful to pick the correct one, as you'll get an awkward and inefficient API if you use the wrong one. There is a check, which results in a compile-time warning, for the `P' and `I' versions, but there is no check for the `O' versions, as that is not possible in plain C. An example of their use would be, DEF_VEC_P(tree); // non-managed tree vector. struct my_struct { VEC(tree) *v; // A (pointer to) a vector of tree pointers. }; struct my_struct *s; if (VEC_length(tree, s->v)) { we have some contents } VEC_safe_push(tree, s->v, decl); // append some decl onto the end for (ix = 0; VEC_iterate(tree, s->v, ix, elt); ix++) { do something with elt } The `vec.h' file provides details on how to invoke the various accessors provided. They are enumerated here: `VEC_length' Return the number of items in the array, `VEC_empty' Return true if the array has no elements. `VEC_last' `VEC_index' Return the last or arbitrary item in the array. `VEC_iterate' Access an array element and indicate whether the array has been traversed. `VEC_alloc' `VEC_free' Create and destroy an array. `VEC_embedded_size' `VEC_embedded_init' Helpers for embedding an array as the final element of another struct. `VEC_copy' Duplicate an array. `VEC_space' Return the amount of free space in an array. `VEC_reserve' Ensure a certain amount of free space. `VEC_quick_push' `VEC_safe_push' Append to an array, either assuming the space is available, or making sure that it is. `VEC_pop' Remove the last item from an array. `VEC_truncate' Remove several items from the end of an array. `VEC_safe_grow' Add several items to the end of an array. `VEC_replace' Overwrite an item in the array. `VEC_quick_insert' `VEC_safe_insert' Insert an item into the middle of the array. Either the space must already exist, or the space is created. `VEC_ordered_remove' `VEC_unordered_remove' Remove an item from the array, preserving order or not. `VEC_block_remove' Remove a set of items from the array. `VEC_address' Provide the address of the first element. `VEC_lower_bound' Binary search the array. 15.7 include ============  File: gdbint.info, Node: Coding Standards, Next: Misc Guidelines, Prev: Support Libraries, Up: Top 16 Coding Standards ******************* 16.1 GDB C Coding Standards =========================== GDB follows the GNU coding standards, as described in `etc/standards.texi'. This file is also available for anonymous FTP from GNU archive sites. GDB takes a strict interpretation of the standard; in general, when the GNU standard recommends a practice but does not require it, GDB requires it. GDB follows an additional set of coding standards specific to GDB, as described in the following sections. 16.1.1 ISO C ------------ GDB assumes an ISO/IEC 9899:1990 (a.k.a. ISO C90) compliant compiler. GDB does not assume an ISO C or POSIX compliant C library. 16.1.2 Formatting ----------------- The standard GNU recommendations for formatting must be followed strictly. Any GDB-specific deviation from GNU recomendations is described below. A function declaration should not have its name in column zero. A function definition should have its name in column zero. /* Declaration */ static void foo (void); /* Definition */ void foo (void) { } _Pragmatics: This simplifies scripting. Function definitions can be found using `^function-name'._ There must be a space between a function or macro name and the opening parenthesis of its argument list (except for macro definitions, as required by C). There must not be a space after an open paren/bracket or before a close paren/bracket. While additional whitespace is generally helpful for reading, do not use more than one blank line to separate blocks, and avoid adding whitespace after the end of a program line (as of 1/99, some 600 lines had whitespace after the semicolon). Excess whitespace causes difficulties for `diff' and `patch' utilities. Pointers are declared using the traditional K&R C style: void *foo; and not: void * foo; void* foo; In addition, whitespace around casts and unary operators should follow the following guidelines: Use... ...instead of `!x' `! x' `~x' `~ x' `-x' `- x' (unary minus) `(foo) x' `(foo)x' (cast) `*x' `* x' (pointer dereference) Any two or more lines in code should be wrapped in braces, even if they are comments, as they look like separate statements: if (i) { /* Return success. */ return 0; } and not: if (i) /* Return success. */ return 0; 16.1.3 Comments --------------- The standard GNU requirements on comments must be followed strictly. Block comments must appear in the following form, with no `/*'- or `*/'-only lines, and no leading `*': /* Wait for control to return from inferior to debugger. If inferior gets a signal, we may decide to start it up again instead of returning. That is why there is a loop in this function. When this function actually returns it means the inferior should be left stopped and GDB should read more commands. */ (Note that this format is encouraged by Emacs; tabbing for a multi-line comment works correctly, and `M-q' fills the block consistently.) Put a blank line between the block comments preceding function or variable definitions, and the definition itself. In general, put function-body comments on lines by themselves, rather than trying to fit them into the 20 characters left at the end of a line, since either the comment or the code will inevitably get longer than will fit, and then somebody will have to move it anyhow. 16.1.4 C Usage -------------- Code must not depend on the sizes of C data types, the format of the host's floating point numbers, the alignment of anything, or the order of evaluation of expressions. Use functions freely. There are only a handful of compute-bound areas in GDB that might be affected by the overhead of a function call, mainly in symbol reading. Most of GDB's performance is limited by the target interface (whether serial line or system call). However, use functions with moderation. A thousand one-line functions are just as hard to understand as a single thousand-line function. _Macros are bad, M'kay._ (But if you have to use a macro, make sure that the macro arguments are protected with parentheses.) Declarations like `struct foo *' should be used in preference to declarations like `typedef struct foo { ... } *foo_ptr'. Zero constant (`0') is not interchangeable with a null pointer constant (`NULL') anywhere. GCC does not give a warning for such interchange. Specifically: incorrect `if (pointervar) {}' incorrect `if (!pointervar) {}' incorrect `if (pointervar != 0) {}' incorrect `if (pointervar == 0) {}' correct `if (pointervar != NULL) {}' correct `if (pointervar == NULL) {}' 16.1.5 Function Prototypes -------------------------- Prototypes must be used when both _declaring_ and _defining_ a function. Prototypes for GDB functions must include both the argument type and name, with the name matching that used in the actual function definition. All external functions should have a declaration in a header file that callers include, that declaration should use the `extern' modifier. The only exception concerns `_initialize_*' functions, which must be external so that `init.c' construction works, but shouldn't be visible to random source files. Where a source file needs a forward declaration of a static function, that declaration must appear in a block near the top of the source file. 16.1.6 File Names ----------------- Any file used when building the core of GDB must be in lower case. Any file used when building the core of GDB must be 8.3 unique. These requirements apply to both source and generated files. _Pragmatics: The core of GDB must be buildable on many platforms including DJGPP and MacOS/HFS. Every time an unfriendly file is introduced to the build process both `Makefile.in' and `configure.in' need to be modified accordingly. Compare the convoluted conversion process needed to transform `COPYING' into `copying.c' with the conversion needed to transform `version.in' into `version.c'._ Any file non 8.3 compliant file (that is not used when building the core of GDB) must be added to `gdb/config/djgpp/fnchange.lst'. _Pragmatics: This is clearly a compromise._ When GDB has a local version of a system header file (ex `string.h') the file name based on the POSIX header prefixed with `gdb_' (`gdb_string.h'). These headers should be relatively independent: they should use only macros defined by `configure', the compiler, or the host; they should include only system headers; they should refer only to system types. They may be shared between multiple programs, e.g. GDB and GDBSERVER. For other files `-' is used as the separator. 16.1.7 Include Files -------------------- A `.c' file should include `defs.h' first. A `.c' file should directly include the `.h' file of every declaration and/or definition it directly refers to. It cannot rely on indirect inclusion. A `.h' file should directly include the `.h' file of every declaration and/or definition it directly refers to. It cannot rely on indirect inclusion. Exception: The file `defs.h' does not need to be directly included. An external declaration should only appear in one include file. An external declaration should never appear in a `.c' file. Exception: a declaration for the `_initialize' function that pacifies `-Wmissing-declaration'. A `typedef' definition should only appear in one include file. An opaque `struct' declaration can appear in multiple `.h' files. Where possible, a `.h' file should use an opaque `struct' declaration instead of an include. All `.h' files should be wrapped in: #ifndef INCLUDE_FILE_NAME_H #define INCLUDE_FILE_NAME_H header body #endif 16.2 GDB Python Coding Standards ================================ GDB follows the published `Python' coding standards in `PEP008' (http://www.python.org/dev/peps/pep-0008/). In addition, the guidelines in the Google Python Style Guide (http://google-styleguide.googlecode.com/svn/trunk/pyguide.html) are also followed where they do not conflict with `PEP008'. 16.2.1 GDB-specific exceptions ------------------------------ There are a few exceptions to the published standards. They exist mainly for consistency with the `C' standards. * Use `FIXME' instead of `TODO'.  File: gdbint.info, Node: Misc Guidelines, Next: Porting GDB, Prev: Coding Standards, Up: Top 17 Misc Guidelines ****************** This chapter covers topics that are lower-level than the major algorithms of GDB. 17.1 Cleanups ============= Cleanups are a structured way to deal with things that need to be done later. When your code does something (e.g., `xmalloc' some memory, or `open' a file) that needs to be undone later (e.g., `xfree' the memory or `close' the file), it can make a cleanup. The cleanup will be done at some future point: when the command is finished and control returns to the top level; when an error occurs and the stack is unwound; or when your code decides it's time to explicitly perform cleanups. Alternatively you can elect to discard the cleanups you created. Syntax: `struct cleanup *OLD_CHAIN;' Declare a variable which will hold a cleanup chain handle. `OLD_CHAIN = make_cleanup (FUNCTION, ARG);' Make a cleanup which will cause FUNCTION to be called with ARG (a `char *') later. The result, OLD_CHAIN, is a handle that can later be passed to `do_cleanups' or `discard_cleanups'. Unless you are going to call `do_cleanups' or `discard_cleanups', you can ignore the result from `make_cleanup'. `do_cleanups (OLD_CHAIN);' Do all cleanups added to the chain since the corresponding `make_cleanup' call was made. `discard_cleanups (OLD_CHAIN);' Same as `do_cleanups' except that it just removes the cleanups from the chain and does not call the specified functions. Cleanups are implemented as a chain. The handle returned by `make_cleanups' includes the cleanup passed to the call and any later cleanups appended to the chain (but not yet discarded or performed). E.g.: make_cleanup (a, 0); { struct cleanup *old = make_cleanup (b, 0); make_cleanup (c, 0) ... do_cleanups (old); } will call `c()' and `b()' but will not call `a()'. The cleanup that calls `a()' will remain in the cleanup chain, and will be done later unless otherwise discarded. Your function should explicitly do or discard the cleanups it creates. Failing to do this leads to non-deterministic behavior since the caller will arbitrarily do or discard your functions cleanups. This need leads to two common cleanup styles. The first style is try/finally. Before it exits, your code-block calls `do_cleanups' with the old cleanup chain and thus ensures that your code-block's cleanups are always performed. For instance, the following code-segment avoids a memory leak problem (even when `error' is called and a forced stack unwind occurs) by ensuring that the `xfree' will always be called: struct cleanup *old = make_cleanup (null_cleanup, 0); data = xmalloc (sizeof blah); make_cleanup (xfree, data); ... blah blah ... do_cleanups (old); The second style is try/except. Before it exits, your code-block calls `discard_cleanups' with the old cleanup chain and thus ensures that any created cleanups are not performed. For instance, the following code segment, ensures that the file will be closed but only if there is an error: FILE *file = fopen ("afile", "r"); struct cleanup *old = make_cleanup (close_file, file); ... blah blah ... discard_cleanups (old); return file; Some functions, e.g., `fputs_filtered()' or `error()', specify that they "should not be called when cleanups are not in place". This means that any actions you need to reverse in the case of an error or interruption must be on the cleanup chain before you call these functions, since they might never return to your code (they `longjmp' instead). 17.2 Per-architecture module data ================================= The multi-arch framework includes a mechanism for adding module specific per-architecture data-pointers to the `struct gdbarch' architecture object. A module registers one or more per-architecture data-pointers using: -- Architecture Function: struct gdbarch_data * gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *PRE_INIT) PRE_INIT is used to, on-demand, allocate an initial value for a per-architecture data-pointer using the architecture's obstack (passed in as a parameter). Since PRE_INIT can be called during architecture creation, it is not parameterized with the architecture. and must not call modules that use per-architecture data. -- Architecture Function: struct gdbarch_data * gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *POST_INIT) POST_INIT is used to obtain an initial value for a per-architecture data-pointer _after_. Since POST_INIT is always called after architecture creation, it both receives the fully initialized architecture and is free to call modules that use per-architecture data (care needs to be taken to ensure that those other modules do not try to call back to this module as that will create in cycles in the initialization call graph). These functions return a `struct gdbarch_data' that is used to identify the per-architecture data-pointer added for that module. The per-architecture data-pointer is accessed using the function: -- Architecture Function: void * gdbarch_data (struct gdbarch *GDBARCH, struct gdbarch_data *DATA_HANDLE) Given the architecture ARCH and module data handle DATA_HANDLE (returned by `gdbarch_data_register_pre_init' or `gdbarch_data_register_post_init'), this function returns the current value of the per-architecture data-pointer. If the data pointer is `NULL', it is first initialized by calling the corresponding PRE_INIT or POST_INIT method. The examples below assume the following definitions: struct nozel { int total; }; static struct gdbarch_data *nozel_handle; A module can extend the architecture vector, adding additional per-architecture data, using the PRE_INIT method. The module's per-architecture data is then initialized during architecture creation. In the below, the module's per-architecture _nozel_ is added. An architecture can specify its nozel by calling `set_gdbarch_nozel' from `gdbarch_init'. static void * nozel_pre_init (struct obstack *obstack) { struct nozel *data = OBSTACK_ZALLOC (obstack, struct nozel); return data; } extern void set_gdbarch_nozel (struct gdbarch *gdbarch, int total) { struct nozel *data = gdbarch_data (gdbarch, nozel_handle); data->total = nozel; } A module can on-demand create architecture dependent data structures using `post_init'. In the below, the nozel's total is computed on-demand by `nozel_post_init' using information obtained from the architecture. static void * nozel_post_init (struct gdbarch *gdbarch) { struct nozel *data = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct nozel); nozel->total = gdbarch... (gdbarch); return data; } extern int nozel_total (struct gdbarch *gdbarch) { struct nozel *data = gdbarch_data (gdbarch, nozel_handle); return data->total; } 17.3 Wrapping Output Lines ========================== Output that goes through `printf_filtered' or `fputs_filtered' or `fputs_demangled' needs only to have calls to `wrap_here' added in places that would be good breaking points. The utility routines will take care of actually wrapping if the line width is exceeded. The argument to `wrap_here' is an indentation string which is printed _only_ if the line breaks there. This argument is saved away and used later. It must remain valid until the next call to `wrap_here' or until a newline has been printed through the `*_filtered' functions. Don't pass in a local variable and then return! It is usually best to call `wrap_here' after printing a comma or space. If you call it before printing a space, make sure that your indentation properly accounts for the leading space that will print if the line wraps there. Any function or set of functions that produce filtered output must finish by printing a newline, to flush the wrap buffer, before switching to unfiltered (`printf') output. Symbol reading routines that print warnings are a good example. 17.4 Memory Management ====================== GDB does not use the functions `malloc', `realloc', `calloc', `free' and `asprintf'. GDB uses the functions `xmalloc', `xrealloc' and `xcalloc' when allocating memory. Unlike `malloc' et.al. these functions do not return when the memory pool is empty. Instead, they unwind the stack using cleanups. These functions return `NULL' when requested to allocate a chunk of memory of size zero. _Pragmatics: By using these functions, the need to check every memory allocation is removed. These functions provide portable behavior._ GDB does not use the function `free'. GDB uses the function `xfree' to return memory to the memory pool. Consistent with ISO-C, this function ignores a request to free a `NULL' pointer. _Pragmatics: On some systems `free' fails when passed a `NULL' pointer._ GDB can use the non-portable function `alloca' for the allocation of small temporary values (such as strings). _Pragmatics: This function is very non-portable. Some systems restrict the memory being allocated to no more than a few kilobytes._ GDB uses the string function `xstrdup' and the print function `xstrprintf'. _Pragmatics: `asprintf' and `strdup' can fail. Print functions such as `sprintf' are very prone to buffer overflow errors._ 17.5 Compiler Warnings ====================== With few exceptions, developers should avoid the configuration option `--disable-werror' when building GDB. The exceptions are listed in the file `gdb/MAINTAINERS'. The default, when building with GCC, is `--enable-werror'. This option causes GDB (when built using GCC) to be compiled with a carefully selected list of compiler warning flags. Any warnings from those flags are treated as errors. The current list of warning flags includes: `-Wall' Recommended GCC warnings. `-Wdeclaration-after-statement' GCC 3.x (and later) and C99 allow declarations mixed with code, but GCC 2.x and C89 do not. `-Wpointer-arith' `-Wformat-nonliteral' Non-literal format strings, with a few exceptions, are bugs - they might contain unintended user-supplied format specifiers. Since GDB uses the `format printf' attribute on all `printf' like functions this checks not just `printf' calls but also calls to functions such as `fprintf_unfiltered'. `-Wno-pointer-sign' In version 4.0, GCC began warning about pointer argument passing or assignment even when the source and destination differed only in signedness. However, most GDB code doesn't distinguish carefully between `char' and `unsigned char'. In early 2006 the GDB developers decided correcting these warnings wasn't worth the time it would take. `-Wno-unused-parameter' Due to the way that GDB is implemented many functions have unused parameters. Consequently this warning is avoided. The macro `ATTRIBUTE_UNUSED' is not used as it leads to false negatives -- it is not an error to have `ATTRIBUTE_UNUSED' on a parameter that is being used. `-Wno-unused' `-Wno-switch' `-Wno-char-subscripts' These are warnings which might be useful for GDB, but are currently too noisy to enable with `-Werror'. 17.6 Internal Error Recovery ============================ During its execution, GDB can encounter two types of errors. User errors and internal errors. User errors include not only a user entering an incorrect command but also problems arising from corrupt object files and system errors when interacting with the target. Internal errors include situations where GDB has detected, at run time, a corrupt or erroneous situation. When reporting an internal error, GDB uses `internal_error' and `gdb_assert'. GDB must not call `abort' or `assert'. _Pragmatics: There is no `internal_warning' function. Either the code detected a user error, recovered from it and issued a `warning' or the code failed to correctly recover from the user error and issued an `internal_error'._ 17.7 Command Names ================== GDB U/I commands are written `foo-bar', not `foo_bar'. 17.8 Clean Design and Portable Implementation ============================================= In addition to getting the syntax right, there's the little question of semantics. Some things are done in certain ways in GDB because long experience has shown that the more obvious ways caused various kinds of trouble. You can't assume the byte order of anything that comes from a target (including VALUEs, object files, and instructions). Such things must be byte-swapped using `SWAP_TARGET_AND_HOST' in GDB, or one of the swap routines defined in `bfd.h', such as `bfd_get_32'. You can't assume that you know what interface is being used to talk to the target system. All references to the target must go through the current `target_ops' vector. You can't assume that the host and target machines are the same machine (except in the "native" support modules). In particular, you can't assume that the target machine's header files will be available on the host machine. Target code must bring along its own header files - written from scratch or explicitly donated by their owner, to avoid copyright problems. Insertion of new `#ifdef''s will be frowned upon. It's much better to write the code portably than to conditionalize it for various systems. New `#ifdef''s which test for specific compilers or manufacturers or operating systems are unacceptable. All `#ifdef''s should test for features. The information about which configurations contain which features should be segregated into the configuration files. Experience has proven far too often that a feature unique to one particular system often creeps into other systems; and that a conditional based on some predefined macro for your current system will become worthless over time, as new versions of your system come out that behave differently with regard to this feature. Adding code that handles specific architectures, operating systems, target interfaces, or hosts, is not acceptable in generic code. One particularly notorious area where system dependencies tend to creep in is handling of file names. The mainline GDB code assumes Posix semantics of file names: absolute file names begin with a forward slash `/', slashes are used to separate leading directories, case-sensitive file names. These assumptions are not necessarily true on non-Posix systems such as MS-Windows. To avoid system-dependent code where you need to take apart or construct a file name, use the following portable macros: `HAVE_DOS_BASED_FILE_SYSTEM' This preprocessing symbol is defined to a non-zero value on hosts whose filesystems belong to the MS-DOS/MS-Windows family. Use this symbol to write conditional code which should only be compiled for such hosts. `IS_DIR_SEPARATOR (C)' Evaluates to a non-zero value if C is a directory separator character. On Unix and GNU/Linux systems, only a slash `/' is such a character, but on Windows, both `/' and `\' will pass. `IS_ABSOLUTE_PATH (FILE)' Evaluates to a non-zero value if FILE is an absolute file name. For Unix and GNU/Linux hosts, a name which begins with a slash `/' is absolute. On DOS and Windows, `d:/foo' and `x:\bar' are also absolute file names. `FILENAME_CMP (F1, F2)' Calls a function which compares file names F1 and F2 as appropriate for the underlying host filesystem. For Posix systems, this simply calls `strcmp'; on case-insensitive filesystems it will call `strcasecmp' instead. `DIRNAME_SEPARATOR' Evaluates to a character which separates directories in `PATH'-style lists, typically held in environment variables. This character is `:' on Unix, `;' on DOS and Windows. `SLASH_STRING' This evaluates to a constant string you should use to produce an absolute filename from leading directories and the file's basename. `SLASH_STRING' is `"/"' on most systems, but might be `"\\"' for some Windows-based ports. In addition to using these macros, be sure to use portable library functions whenever possible. For example, to extract a directory or a basename part from a file name, use the `dirname' and `basename' library functions (available in `libiberty' for platforms which don't provide them), instead of searching for a slash with `strrchr'. Another way to generalize GDB along a particular interface is with an attribute struct. For example, GDB has been generalized to handle multiple kinds of remote interfaces--not by `#ifdef's everywhere, but by defining the `target_ops' structure and having a current target (as well as a stack of targets below it, for memory references). Whenever something needs to be done that depends on which remote interface we are using, a flag in the current target_ops structure is tested (e.g., `target_has_stack'), or a function is called through a pointer in the current target_ops structure. In this way, when a new remote interface is added, only one module needs to be touched--the one that actually implements the new remote interface. Other examples of attribute-structs are BFD access to multiple kinds of object file formats, or GDB's access to multiple source languages. Please avoid duplicating code. For example, in GDB 3.x all the code interfacing between `ptrace' and the rest of GDB was duplicated in `*-dep.c', and so changing something was very painful. In GDB 4.x, these have all been consolidated into `infptrace.c'. `infptrace.c' can deal with variations between systems the same way any system-independent file would (hooks, `#if defined', etc.), and machines which are radically different don't need to use `infptrace.c' at all. All debugging code must be controllable using the `set debug MODULE' command. Do not use `printf' to print trace messages. Use `fprintf_unfiltered(gdb_stdlog, ...'. Do not use `#ifdef DEBUG'.  File: gdbint.info, Node: Porting GDB, Next: Versions and Branches, Prev: Misc Guidelines, Up: Top 18 Porting GDB ************** Most of the work in making GDB compile on a new machine is in specifying the configuration of the machine. Porting a new architecture to GDB can be broken into a number of steps. * Ensure a BFD exists for executables of the target architecture in the `bfd' directory. If one does not exist, create one by modifying an existing similar one. * Implement a disassembler for the target architecture in the `opcodes' directory. * Define the target architecture in the `gdb' directory (*note Adding a New Target: Adding a New Target.). Add the pattern for the new target to `configure.tgt' with the names of the files that contain the code. By convention the target architecture definition for an architecture ARCH is placed in `ARCH-tdep.c'. Within `ARCH-tdep.c' define the function `_initialize_ARCH_tdep' which calls `gdbarch_register' to create the new `struct gdbarch' for the architecture. * If a new remote target is needed, consider adding a new remote target by defining a function `_initialize_remote_ARCH'. However if at all possible use the GDB _Remote Serial Protocol_ for this and implement the server side protocol independently with the target. * If desired implement a simulator in the `sim' directory. This should create the library `libsim.a' implementing the interface in `remote-sim.h' (found in the `include' directory). * Build and test. If desired, lobby the GDB steering group to have the new port included in the main distribution! * Add a description of the new architecture to the main GDB user guide (*note Configuration Specific Information: (gdb)Configuration Specific Information.).  File: gdbint.info, Node: Versions and Branches, Next: Start of New Year Procedure, Prev: Porting GDB, Up: Top 19 Versions and Branches ************************ 19.1 Versions ============= GDB's version is determined by the file `gdb/version.in' and takes one of the following forms: MAJOR.MINOR MAJOR.MINOR.PATCHLEVEL an official release (e.g., 6.2 or 6.2.1) MAJOR.MINOR.PATCHLEVEL.YYYYMMDD a snapshot taken at YYYY-MM-DD-gmt (e.g., 6.1.50.20020302, 6.1.90.20020304, or 6.1.0.20020308) MAJOR.MINOR.PATCHLEVEL.YYYYMMDD-cvs a CVS check out drawn on YYYY-MM-DD (e.g., 6.1.50.20020302-cvs, 6.1.90.20020304-cvs, or 6.1.0.20020308-cvs) MAJOR.MINOR.PATCHLEVEL.YYYYMMDD (VENDOR) a vendor specific release of GDB, that while based on MAJOR.MINOR.PATCHLEVEL.YYYYMMDD, may include additional changes GDB's mainline uses the MAJOR and MINOR version numbers from the most recent release branch, with a PATCHLEVEL of 50. At the time each new release branch is created, the mainline's MAJOR and MINOR version numbers are updated. GDB's release branch is similar. When the branch is cut, the PATCHLEVEL is changed from 50 to 90. As draft releases are drawn from the branch, the PATCHLEVEL is incremented. Once the first release (MAJOR.MINOR) has been made, the PATCHLEVEL is set to 0 and updates have an incremented PATCHLEVEL. For snapshots, and CVS check outs, it is also possible to identify the CVS origin: MAJOR.MINOR.50.YYYYMMDD drawn from the HEAD of mainline CVS (e.g., 6.1.50.20020302) MAJOR.MINOR.90.YYYYMMDD MAJOR.MINOR.91.YYYYMMDD ... drawn from a release branch prior to the release (e.g., 6.1.90.20020304) MAJOR.MINOR.0.YYYYMMDD MAJOR.MINOR.1.YYYYMMDD ... drawn from a release branch after the release (e.g., 6.2.0.20020308) If the previous GDB version is 6.1 and the current version is 6.2, then, substituting 6 for MAJOR and 1 or 2 for MINOR, here's an illustration of a typical sequence: <HEAD> | 6.1.50.20020302-cvs | +--------------------------. | <gdb_6_2-branch> | | 6.2.50.20020303-cvs 6.1.90 (draft #1) | | 6.2.50.20020304-cvs 6.1.90.20020304-cvs | | 6.2.50.20020305-cvs 6.1.91 (draft #2) | | 6.2.50.20020306-cvs 6.1.91.20020306-cvs | | 6.2.50.20020307-cvs 6.2 (release) | | 6.2.50.20020308-cvs 6.2.0.20020308-cvs | | 6.2.50.20020309-cvs 6.2.1 (update) | | 6.2.50.20020310-cvs <branch closed> | 6.2.50.20020311-cvs | +--------------------------. | <gdb_6_3-branch> | | 6.3.50.20020312-cvs 6.2.90 (draft #1) | | 19.2 Release Branches ===================== GDB draws a release series (6.2, 6.2.1, ...) from a single release branch, and identifies that branch using the CVS branch tags: gdb_MAJOR_MINOR-YYYYMMDD-branchpoint gdb_MAJOR_MINOR-branch gdb_MAJOR_MINOR-YYYYMMDD-release _Pragmatics: To help identify the date at which a branch or release is made, both the branchpoint and release tags include the date that they are cut (YYYYMMDD) in the tag. The branch tag, denoting the head of the branch, does not need this._ 19.3 Vendor Branches ==================== To avoid version conflicts, vendors are expected to modify the file `gdb/version.in' to include a vendor unique alphabetic identifier (an official GDB release never uses alphabetic characters in its version identifier). E.g., `6.2widgit2', or `6.2 (Widgit Inc Patch 2)'. 19.4 Experimental Branches ========================== 19.4.1 Guidelines ----------------- GDB permits the creation of branches, cut from the CVS repository, for experimental development. Branches make it possible for developers to share preliminary work, and maintainers to examine significant new developments. The following are a set of guidelines for creating such branches: _a branch has an owner_ The owner can set further policy for a branch, but may not change the ground rules. In particular, they can set a policy for commits (be it adding more reviewers or deciding who can commit). _all commits are posted_ All changes committed to a branch shall also be posted to the GDB patches mailing list <gdb-patches@sourceware.org>. While commentary on such changes are encouraged, people should remember that the changes only apply to a branch. _all commits are covered by an assignment_ This ensures that all changes belong to the Free Software Foundation, and avoids the possibility that the branch may become contaminated. _a branch is focused_ A focused branch has a single objective or goal, and does not contain unnecessary or irrelevant changes. Cleanups, where identified, being be pushed into the mainline as soon as possible. _a branch tracks mainline_ This keeps the level of divergence under control. It also keeps the pressure on developers to push cleanups and other stuff into the mainline. _a branch shall contain the entire GDB module_ The GDB module `gdb' should be specified when creating a branch (branches of individual files should be avoided). *Note Tags::. _a branch shall be branded using `version.in'_ The file `gdb/version.in' shall be modified so that it identifies the branch OWNER and branch NAME, e.g., `6.2.50.20030303_owner_name' or `6.2 (Owner Name)'. 19.4.2 Tags ----------- To simplify the identification of GDB branches, the following branch tagging convention is strongly recommended: `OWNER_NAME-YYYYMMDD-branchpoint' `OWNER_NAME-YYYYMMDD-branch' The branch point and corresponding branch tag. YYYYMMDD is the date that the branch was created. A branch is created using the sequence: cvs rtag OWNER_NAME-YYYYMMDD-branchpoint gdb cvs rtag -b -r OWNER_NAME-YYYYMMDD-branchpoint \ OWNER_NAME-YYYYMMDD-branch gdb `OWNER_NAME-YYYYMMDD-mergepoint' The tagged point, on the mainline, that was used when merging the branch on YYYYMMDD. To merge in all changes since the branch was cut, use a command sequence like: cvs rtag OWNER_NAME-YYYYMMDD-mergepoint gdb cvs update \ -jOWNER_NAME-YYYYMMDD-branchpoint -jOWNER_NAME-YYYYMMDD-mergepoint Similar sequences can be used to just merge in changes since the last merge. For further information on CVS, see Concurrent Versions System (http://www.gnu.org/software/cvs/).  File: gdbint.info, Node: Start of New Year Procedure, Next: Releasing GDB, Prev: Versions and Branches, Up: Top 20 Start of New Year Procedure ****************************** At the start of each new year, the following actions should be performed: * Rotate the ChangeLog file The current `ChangeLog' file should be renamed into `ChangeLog-YYYY' where YYYY is the year that has just passed. A new `ChangeLog' file should be created, and its contents should contain a reference to the previous ChangeLog. The following should also be preserved at the end of the new ChangeLog, in order to provide the appropriate settings when editing this file with Emacs: Local Variables: mode: change-log left-margin: 8 fill-column: 74 version-control: never coding: utf-8 End: * Add an entry for the newly created ChangeLog file (`ChangeLog-YYYY') in `gdb/config/djgpp/fnchange.lst'. * Update the copyright year in the startup message Update the copyright year in: * file `top.c', function `print_gdb_version' * file `gdbserver/server.c', function `gdbserver_version' * file `gdbserver/gdbreplay.c', function `gdbreplay_version' * Run the `copyright.py' Python script to add the new year in the copyright notices of most source files. This script has been tested with Python 2.6 and 2.7.  File: gdbint.info, Node: Releasing GDB, Next: Testsuite, Prev: Start of New Year Procedure, Up: Top 21 Releasing GDB **************** 21.1 Branch Commit Policy ========================= The branch commit policy is pretty slack. GDB releases 5.0, 5.1 and 5.2 all used the below: * The `gdb/MAINTAINERS' file still holds. * Don't fix something on the branch unless/until it is also fixed in the trunk. If this isn't possible, mentioning it in the `gdb/PROBLEMS' file is better than committing a hack. * When considering a patch for the branch, suggested criteria include: Does it fix a build? Does it fix the sequence `break main; run' when debugging a static binary? * The further a change is from the core of GDB, the less likely the change will worry anyone (e.g., target specific code). * Only post a proposal to change the core of GDB after you've sent individual bribes to all the people listed in the `MAINTAINERS' file ;-) _Pragmatics: Provided updates are restricted to non-core functionality there is little chance that a broken change will be fatal. This means that changes such as adding a new architectures or (within reason) support for a new host are considered acceptable._ 21.2 Obsoleting code ==================== Before anything else, poke the other developers (and around the source code) to see if there is anything that can be removed from GDB (an old target, an unused file). Obsolete code is identified by adding an `OBSOLETE' prefix to every line. Doing this means that it is easy to identify something that has been obsoleted when greping through the sources. The process is done in stages -- this is mainly to ensure that the wider GDB community has a reasonable opportunity to respond. Remember, everything on the Internet takes a week. 1. Post the proposal on the GDB mailing list <gdb@sourceware.org> Creating a bug report to track the task's state, is also highly recommended. 2. Wait a week or so. 3. Post the proposal on the GDB Announcement mailing list <gdb-announce@sourceware.org>. 4. Wait a week or so. 5. Go through and edit all relevant files and lines so that they are prefixed with the word `OBSOLETE'. 6. Wait until the next GDB version, containing this obsolete code, has been released. 7. Remove the obsolete code. _Maintainer note: While removing old code is regrettable it is hopefully better for GDB's long term development. Firstly it helps the developers by removing code that is either no longer relevant or simply wrong. Secondly since it removes any history associated with the file (effectively clearing the slate) the developer has a much freer hand when it comes to fixing broken files._ 21.3 Before the Branch ====================== The most important objective at this stage is to find and fix simple changes that become a pain to track once the branch is created. For instance, configuration problems that stop GDB from even building. If you can't get the problem fixed, document it in the `gdb/PROBLEMS' file. Prompt for `gdb/NEWS' --------------------- People always forget. Send a post reminding them but also if you know something interesting happened add it yourself. The `schedule' script will mention this in its e-mail. Review `gdb/README' ------------------- Grab one of the nightly snapshots and then walk through the `gdb/README' looking for anything that can be improved. The `schedule' script will mention this in its e-mail. Refresh any imported files. --------------------------- A number of files are taken from external repositories. They include: * `texinfo/texinfo.tex' * `config.guess' et. al. (see the top-level `MAINTAINERS' file) * `etc/standards.texi', `etc/make-stds.texi' Check the ARI ------------- A.R.I. is an `awk' script (Awk Regression Index ;-) that checks for a number of errors and coding conventions. The checks include things like using `malloc' instead of `xmalloc' and file naming problems. There shouldn't be any regressions. 21.3.1 Review the bug data base ------------------------------- Close anything obviously fixed. 21.3.2 Check all cross targets build ------------------------------------ The targets are listed in `gdb/MAINTAINERS'. 21.4 Cut the Branch =================== Create the branch ----------------- $ u=5.1 $ v=5.2 $ V=`echo $v | sed 's/\./_/g'` $ D=`date -u +%Y-%m-%d` $ echo $u $V $D 5.1 5_2 2002-03-03 $ echo cvs -f -d :ext:sourceware.org:/cvs/src rtag \ -D $D-gmt gdb_$V-$D-branchpoint insight cvs -f -d :ext:sourceware.org:/cvs/src rtag -D 2002-03-03-gmt gdb_5_2-2002-03-03-branchpoint insight $ ^echo ^^ ... $ echo cvs -f -d :ext:sourceware.org:/cvs/src rtag \ -b -r gdb_$V-$D-branchpoint gdb_$V-branch insight cvs -f -d :ext:sourceware.org:/cvs/src rtag \ -b -r gdb_5_2-2002-03-03-branchpoint gdb_5_2-branch insight $ ^echo ^^ ... $ * By using `-D YYYY-MM-DD-gmt', the branch is forced to an exact date/time. * The trunk is first tagged so that the branch point can easily be found. * Insight, which includes GDB, is tagged at the same time. * `version.in' gets bumped to avoid version number conflicts. * The reading of `.cvsrc' is disabled using `-f'. Update `version.in' ------------------- $ u=5.1 $ v=5.2 $ V=`echo $v | sed 's/\./_/g'` $ echo $u $v$V 5.1 5_2 $ cd /tmp $ echo cvs -f -d :ext:sourceware.org:/cvs/src co \ -r gdb_$V-branch src/gdb/version.in cvs -f -d :ext:sourceware.org:/cvs/src co -r gdb_5_2-branch src/gdb/version.in $ ^echo ^^ U src/gdb/version.in $ cd src/gdb $ echo $u.90-0000-00-00-cvs > version.in $ cat version.in 5.1.90-0000-00-00-cvs $ cvs -f commit version.in * `0000-00-00' is used as a date to pump prime the version.in update mechanism. * `.90' and the previous branch version are used as fairly arbitrary initial branch version number. Update the web and news pages ----------------------------- Something? Tweak cron to track the new branch ---------------------------------- The file `gdbadmin/cron/crontab' contains gdbadmin's cron table. This file needs to be updated so that: * A daily timestamp is added to the file `version.in'. * The new branch is included in the snapshot process. See the file `gdbadmin/cron/README' for how to install the updated cron table. The file `gdbadmin/ss/README' should also be reviewed to reflect any changes. That file is copied to both the branch/ and current/ snapshot directories. Update the NEWS and README files -------------------------------- The `NEWS' file needs to be updated so that on the branch it refers to _changes in the current release_ while on the trunk it also refers to _changes since the current release_. The `README' file needs to be updated so that it refers to the current release. Post the branch info -------------------- Send an announcement to the mailing lists: * GDB Announcement mailing list <gdb-announce@sourceware.org> * GDB Discussion mailing list <gdb@sourceware.org> and GDB Testers mailing list <gdb-testers@sourceware.org> _Pragmatics: The branch creation is sent to the announce list to ensure that people people not subscribed to the higher volume discussion list are alerted._ The announcement should include: * The branch tag. * How to check out the branch using CVS. * The date/number of weeks until the release. * The branch commit policy still holds. 21.5 Stabilize the branch ========================= Something goes here. 21.6 Create a Release ===================== The process of creating and then making available a release is broken down into a number of stages. The first part addresses the technical process of creating a releasable tar ball. The later stages address the process of releasing that tar ball. When making a release candidate just the first section is needed. 21.6.1 Create a release candidate --------------------------------- The objective at this stage is to create a set of tar balls that can be made available as a formal release (or as a less formal release candidate). Freeze the branch ................. Send out an e-mail notifying everyone that the branch is frozen to <gdb-patches@sourceware.org>. Establish a few defaults. ......................... $ b=gdb_5_2-branch $ v=5.2 $ t=/sourceware/snapshot-tmp/gdbadmin-tmp $ echo $t/$b/$v /sourceware/snapshot-tmp/gdbadmin-tmp/gdb_5_2-branch/5.2 $ mkdir -p $t/$b/$v $ cd $t/$b/$v $ pwd /sourceware/snapshot-tmp/gdbadmin-tmp/gdb_5_2-branch/5.2 $ which autoconf /home/gdbadmin/bin/autoconf $ Notes: * Check the `autoconf' version carefully. You want to be using the version documented in the toplevel `README-maintainer-mode' file. It is very unlikely that the version of `autoconf' installed in system directories (e.g., `/usr/bin/autoconf') is correct. Check out the relevant modules: ............................... $ for m in gdb insight do ( mkdir -p $m && cd $m && cvs -q -f -d /cvs/src co -P -r $b $m ) done $ Note: * The reading of `.cvsrc' is disabled (`-f') so that there isn't any confusion between what is written here and what your local `cvs' really does. Update relevant files. ...................... `gdb/NEWS' Major releases get their comments added as part of the mainline. Minor releases should probably mention any significant bugs that were fixed. Don't forget to include the `ChangeLog' entry. $ emacs gdb/src/gdb/NEWS ... c-x 4 a ... c-x c-s c-x c-c $ cp gdb/src/gdb/NEWS insight/src/gdb/NEWS $ cp gdb/src/gdb/ChangeLog insight/src/gdb/ChangeLog `gdb/README' You'll need to update: * The version. * The update date. * Who did it. $ emacs gdb/src/gdb/README ... c-x 4 a ... c-x c-s c-x c-c $ cp gdb/src/gdb/README insight/src/gdb/README $ cp gdb/src/gdb/ChangeLog insight/src/gdb/ChangeLog _Maintainer note: Hopefully the `README' file was reviewed before the initial branch was cut so just a simple substitute is needed to get it updated._ _Maintainer note: Other projects generate `README' and `INSTALL' from the core documentation. This might be worth pursuing._ `gdb/version.in' $ echo $v > gdb/src/gdb/version.in $ cat gdb/src/gdb/version.in 5.2 $ emacs gdb/src/gdb/version.in ... c-x 4 a ... Bump to version ... c-x c-s c-x c-c $ cp gdb/src/gdb/version.in insight/src/gdb/version.in $ cp gdb/src/gdb/ChangeLog insight/src/gdb/ChangeLog Do the dirty work ................. This is identical to the process used to create the daily snapshot. $ for m in gdb insight do ( cd $m/src && gmake -f src-release $m.tar ) done If the top level source directory does not have `src-release' (GDB version 5.3.1 or earlier), try these commands instead: $ for m in gdb insight do ( cd $m/src && gmake -f Makefile.in $m.tar ) done Check the source files ...................... You're looking for files that have mysteriously disappeared. `distclean' has the habit of deleting files it shouldn't. Watch out for the `version.in' update `cronjob'. $ ( cd gdb/src && cvs -f -q -n update ) M djunpack.bat ? gdb-5.1.91.tar ? proto-toplev ... lots of generated files ... M gdb/ChangeLog M gdb/NEWS M gdb/README M gdb/version.in ... lots of generated files ... $ _Don't worry about the `gdb.info-??' or `gdb/p-exp.tab.c'. They were generated (and yes `gdb.info-1' was also generated only something strange with CVS means that they didn't get suppressed). Fixing it would be nice though._ Create compressed versions of the release ......................................... $ cp */src/*.tar . $ cp */src/*.bz2 . $ ls -F gdb/ gdb-5.2.tar insight/ insight-5.2.tar $ for m in gdb insight do bzip2 -v -9 -c $m-$v.tar > $m-$v.tar.bz2 gzip -v -9 -c $m-$v.tar > $m-$v.tar.gz done $ Note: * A pipe such as `bunzip2 < xxx.bz2 | gzip -9 > xxx.gz' is not since, in that mode, `gzip' does not know the name of the file and, hence, can not include it in the compressed file. This is also why the release process runs `tar' and `bzip2' as separate passes. 21.6.2 Sanity check the tar ball -------------------------------- Pick a popular machine (Solaris/PPC?) and try the build on that. $ bunzip2 < gdb-5.2.tar.bz2 | tar xpf - $ cd gdb-5.2 $ ./configure $ make ... $ ./gdb/gdb ./gdb/gdb GNU gdb 5.2 ... (gdb) b main Breakpoint 1 at 0x80732bc: file main.c, line 734. (gdb) run Starting program: /tmp/gdb-5.2/gdb/gdb Breakpoint 1, main (argc=1, argv=0xbffff8b4) at main.c:734 734 catch_errors (captured_main, &args, "", RETURN_MASK_ALL); (gdb) print args $1 = {argc = 136426532, argv = 0x821b7f0} (gdb) 21.6.3 Make a release candidate available ----------------------------------------- If this is a release candidate then the only remaining steps are: 1. Commit `version.in' and `ChangeLog' 2. Tweak `version.in' (and `ChangeLog' to read L.M.N-0000-00-00-cvs so that the version update process can restart. 3. Make the release candidate available in `ftp://sourceware.org/pub/gdb/snapshots/branch' 4. Notify the relevant mailing lists ( <gdb@sourceware.org> and <gdb-testers@sourceware.org> that the candidate is available. 21.6.4 Make a formal release available -------------------------------------- (And you thought all that was required was to post an e-mail.) Install on sware ................ Copy the new files to both the release and the old release directory: $ cp *.bz2 *.gz ~ftp/pub/gdb/old-releases/ $ cp *.bz2 *.gz ~ftp/pub/gdb/releases Clean up the releases directory so that only the most recent releases are available (e.g. keep 5.2 and 5.2.1 but remove 5.1): $ cd ~ftp/pub/gdb/releases $ rm ... Update the file `README' and `.message' in the releases directory: $ vi README ... $ rm -f .message $ ln README .message Update the web pages. ..................... `htdocs/download/ANNOUNCEMENT' This file, which is posted as the official announcement, includes: * General announcement. * News. If making an M.N.1 release, retain the news from earlier M.N release. * Errata. `htdocs/index.html' `htdocs/news/index.html' `htdocs/download/index.html' These files include: * Announcement of the most recent release. * News entry (remember to update both the top level and the news directory). These pages also need to be regenerate using `index.sh'. `download/onlinedocs/' You need to find the magic command that is used to generate the online docs from the `.tar.bz2'. The best way is to look in the output from one of the nightly `cron' jobs and then just edit accordingly. Something like: $ ~/ss/update-web-docs \ ~ftp/pub/gdb/releases/gdb-5.2.tar.bz2 \ $PWD/www \ /www/sourceware/htdocs/gdb/download/onlinedocs \ gdb `download/ari/' Just like the online documentation. Something like: $ /bin/sh ~/ss/update-web-ari \ ~ftp/pub/gdb/releases/gdb-5.2.tar.bz2 \ $PWD/www \ /www/sourceware/htdocs/gdb/download/ari \ gdb Shadow the pages onto gnu ......................... Something goes here. Install the GDB tar ball on GNU ............................... At the time of writing, the GNU machine was `gnudist.gnu.org' in `~ftp/gnu/gdb'. Make the `ANNOUNCEMENT' ....................... Post the `ANNOUNCEMENT' file you created above to: * GDB Announcement mailing list <gdb-announce@sourceware.org> * General GNU Announcement list <info-gnu@gnu.org> (but delay it a day or so to let things get out) * GDB Bug Report mailing list <bug-gdb@gnu.org> 21.6.5 Cleanup -------------- The release is out but you're still not finished. Commit outstanding changes .......................... In particular you'll need to commit any changes to: * `gdb/ChangeLog' * `gdb/version.in' * `gdb/NEWS' * `gdb/README' Tag the release ............... Something like: $ d=`date -u +%Y-%m-%d` $ echo $d 2002-01-24 $ ( cd insight/src/gdb && cvs -f -q update ) $ ( cd insight/src && cvs -f -q tag gdb_5_2-$d-release ) Insight is used since that contains more of the release than GDB. Mention the release on the trunk ................................ Just put something in the `ChangeLog' so that the trunk also indicates when the release was made. Restart `gdb/version.in' ........................ If `gdb/version.in' does not contain an ISO date such as `2002-01-24' then the daily `cronjob' won't update it. Having committed all the release changes it can be set to `5.2.0_0000-00-00-cvs' which will restart things (yes the `_' is important - it affects the snapshot process). Don't forget the `ChangeLog'. Merge into trunk ................ The files committed to the branch may also need changes merged into the trunk. Revise the release schedule ........................... Post a revised release schedule to GDB Discussion List <gdb@sourceware.org> with an updated announcement. The schedule can be generated by running: $ ~/ss/schedule `date +%s` schedule The first parameter is approximate date/time in seconds (from the epoch) of the most recent release. Also update the schedule `cronjob'. 21.7 Post release ================= Remove any `OBSOLETE' code.  File: gdbint.info, Node: Testsuite, Next: Hints, Prev: Releasing GDB, Up: Top 22 Testsuite ************ The testsuite is an important component of the GDB package. While it is always worthwhile to encourage user testing, in practice this is rarely sufficient; users typically use only a small subset of the available commands, and it has proven all too common for a change to cause a significant regression that went unnoticed for some time. The GDB testsuite uses the DejaGNU testing framework. The tests themselves are calls to various `Tcl' procs; the framework runs all the procs and summarizes the passes and fails. 22.1 Using the Testsuite ======================== To run the testsuite, simply go to the GDB object directory (or to the testsuite's objdir) and type `make check'. This just sets up some environment variables and invokes DejaGNU's `runtest' script. While the testsuite is running, you'll get mentions of which test file is in use, and a mention of any unexpected passes or fails. When the testsuite is finished, you'll get a summary that looks like this: === gdb Summary === # of expected passes 6016 # of unexpected failures 58 # of unexpected successes 5 # of expected failures 183 # of unresolved testcases 3 # of untested testcases 5 To run a specific test script, type: make check RUNTESTFLAGS='TESTS' where TESTS is a list of test script file names, separated by spaces. If you use GNU make, you can use its `-j' option to run the testsuite in parallel. This can greatly reduce the amount of time it takes for the testsuite to run. In this case, if you set `RUNTESTFLAGS' then, by default, the tests will be run serially even under `-j'. You can override this and force a parallel run by setting the `make' variable `FORCE_PARALLEL' to any non-empty value. Note that the parallel `make check' assumes that you want to run the entire testsuite, so it is not compatible with some dejagnu options, like `--directory'. The ideal test run consists of expected passes only; however, reality conspires to keep us from this ideal. Unexpected failures indicate real problems, whether in GDB or in the testsuite. Expected failures are still failures, but ones which have been decided are too hard to deal with at the time; for instance, a test case might work everywhere except on AIX, and there is no prospect of the AIX case being fixed in the near future. Expected failures should not be added lightly, since you may be masking serious bugs in GDB. Unexpected successes are expected fails that are passing for some reason, while unresolved and untested cases often indicate some minor catastrophe, such as the compiler being unable to deal with a test program. When making any significant change to GDB, you should run the testsuite before and after the change, to confirm that there are no regressions. Note that truly complete testing would require that you run the testsuite with all supported configurations and a variety of compilers; however this is more than really necessary. In many cases testing with a single configuration is sufficient. Other useful options are to test one big-endian (Sparc) and one little-endian (x86) host, a cross config with a builtin simulator (powerpc-eabi, mips-elf), or a 64-bit host (Alpha). If you add new functionality to GDB, please consider adding tests for it as well; this way future GDB hackers can detect and fix their changes that break the functionality you added. Similarly, if you fix a bug that was not previously reported as a test failure, please add a test case for it. Some cases are extremely difficult to test, such as code that handles host OS failures or bugs in particular versions of compilers, and it's OK not to try to write tests for all of those. DejaGNU supports separate build, host, and target machines. However, some GDB test scripts do not work if the build machine and the host machine are not the same. In such an environment, these scripts will give a result of "UNRESOLVED", like this: UNRESOLVED: gdb.base/example.exp: This test script does not work on a remote host. 22.2 Testsuite Parameters ========================= Several variables exist to modify the behavior of the testsuite. * `TRANSCRIPT' Sometimes it is convenient to get a transcript of the commands which the testsuite sends to GDB. For example, if GDB crashes during testing, a transcript can be used to more easily reconstruct the failure when running GDB under GDB. You can instruct the GDB testsuite to write transcripts by setting the DejaGNU variable `TRANSCRIPT' (to any value) before invoking `runtest' or `make check'. The transcripts will be written into DejaGNU's output directory. One transcript will be made for each invocation of GDB; they will be named `transcript.N', where N is an integer. The first line of the transcript file will show how GDB was invoked; each subsequent line is a command sent as input to GDB. make check RUNTESTFLAGS=TRANSCRIPT=y Note that the transcript is not always complete. In particular, tests of completion can yield partial command lines. * `GDB' Sometimes one wishes to test a different GDB than the one in the build directory. For example, one may wish to run the testsuite on `/usr/bin/gdb'. make check RUNTESTFLAGS=GDB=/usr/bin/gdb * `GDBSERVER' When testing a different GDB, it is often useful to also test a different gdbserver. make check RUNTESTFLAGS="GDB=/usr/bin/gdb GDBSERVER=/usr/bin/gdbserver" * `INTERNAL_GDBFLAGS' When running the testsuite normally one doesn't want whatever is in `~/.gdbinit' to interfere with the tests, therefore the test harness passes `-nx' to GDB. One also doesn't want any windowed version of GDB, e.g., `gdb -tui', to run. This is achieved via `INTERNAL_GDBFLAGS'. set INTERNAL_GDBFLAGS "-nw -nx" This is all well and good, except when testing an installed GDB that has been configured with `--with-system-gdbinit'. Here one does not want `~/.gdbinit' loaded but one may want the system `.gdbinit' file loaded. This can be achieved by pointing `$HOME' at a directory without a `.gdbinit' and by overriding `INTERNAL_GDBFLAGS' and removing `-nx'. cd testsuite HOME=`pwd` runtest \ GDB=/usr/bin/gdb \ GDBSERVER=/usr/bin/gdbserver \ INTERNAL_GDBFLAGS=-nw There are two ways to run the testsuite and pass additional parameters to DejaGnu. The first is with `make check' and specifying the makefile variable `RUNTESTFLAGS'. make check RUNTESTFLAGS=TRANSCRIPT=y The second is to cd to the `testsuite' directory and invoke the DejaGnu `runtest' command directly. cd testsuite make site.exp runtest TRANSCRIPT=y 22.3 Testsuite Configuration ============================ It is possible to adjust the behavior of the testsuite by defining the global variables listed below, either in a `site.exp' file, or in a board file. * `gdb_test_timeout' Defining this variable changes the default timeout duration used during communication with GDB. More specifically, the global variable used during testing is `timeout', but this variable gets reset to `gdb_test_timeout' at the beginning of each testcase, making sure that any local change to `timeout' in a testcase does not affect subsequent testcases. This global variable comes in handy when the debugger is slower than normal due to the testing environment, triggering unexpected `TIMEOUT' test failures. Examples include when testing on a remote machine, or against a system where communications are slow. If not specifically defined, this variable gets automatically defined to the same value as `timeout' during the testsuite initialization. The default value of the timeout is defined in the file `gdb/testsuite/config/unix.exp' that is part of the GDB test suite(1). 22.4 Testsuite Organization =========================== The testsuite is entirely contained in `gdb/testsuite'. While the testsuite includes some makefiles and configury, these are very minimal, and used for little besides cleaning up, since the tests themselves handle the compilation of the programs that GDB will run. The file `testsuite/lib/gdb.exp' contains common utility procs useful for all GDB tests, while the directory `testsuite/config' contains configuration-specific files, typically used for special-purpose definitions of procs like `gdb_load' and `gdb_start'. The tests themselves are to be found in `testsuite/gdb.*' and subdirectories of those. The names of the test files must always end with `.exp'. DejaGNU collects the test files by wildcarding in the test directories, so both subdirectories and individual files get chosen and run in alphabetical order. The following table lists the main types of subdirectories and what they are for. Since DejaGNU finds test files no matter where they are located, and since each test file sets up its own compilation and execution environment, this organization is simply for convenience and intelligibility. `gdb.base' This is the base testsuite. The tests in it should apply to all configurations of GDB (but generic native-only tests may live here). The test programs should be in the subset of C that is valid K&R, ANSI/ISO, and C++ (`#ifdef's are allowed if necessary, for instance for prototypes). `gdb.LANG' Language-specific tests for any language LANG besides C. Examples are `gdb.cp' and `gdb.java'. `gdb.PLATFORM' Non-portable tests. The tests are specific to a specific configuration (host or target), such as HP-UX or eCos. Example is `gdb.hp', for HP-UX. `gdb.COMPILER' Tests specific to a particular compiler. As of this writing (June 1999), there aren't currently any groups of tests in this category that couldn't just as sensibly be made platform-specific, but one could imagine a `gdb.gcc', for tests of GDB's handling of GCC extensions. `gdb.SUBSYSTEM' Tests that exercise a specific GDB subsystem in more depth. For instance, `gdb.disasm' exercises various disassemblers, while `gdb.stabs' tests pathways through the stabs symbol reader. 22.5 Writing Tests ================== In many areas, the GDB tests are already quite comprehensive; you should be able to copy existing tests to handle new cases. You should try to use `gdb_test' whenever possible, since it includes cases to handle all the unexpected errors that might happen. However, it doesn't cost anything to add new test procedures; for instance, `gdb.base/exprs.exp' defines a `test_expr' that calls `gdb_test' multiple times. Only use `send_gdb' and `gdb_expect' when absolutely necessary. Even if GDB has several valid responses to a command, you can use `gdb_test_multiple'. Like `gdb_test', `gdb_test_multiple' recognizes internal errors and unexpected prompts. Do not write tests which expect a literal tab character from GDB. On some operating systems (e.g. OpenBSD) the TTY layer expands tabs to spaces, so by the time GDB's output reaches expect the tab is gone. The source language programs do _not_ need to be in a consistent style. Since GDB is used to debug programs written in many different styles, it's worth having a mix of styles in the testsuite; for instance, some GDB bugs involving the display of source lines would never manifest themselves if the programs used GNU coding style uniformly. Some testcase results need more detailed explanation: `KFAIL' Known problem of GDB itself. You must specify the GDB bug report number like in these sample tests: kfail "gdb/13392" "continue to marker 2" or setup_kfail gdb/13392 "*-*-*" kfail "continue to marker 2" `XFAIL' Known problem of environment. This typically includes GCC but it includes also many other system components which cannot be fixed in the GDB project. Sample test with sanity check not knowing the specific cause of the problem: # On x86_64 it is commonly about 4MB. if {$stub_size > 25000000} { xfail "stub size $stub_size is too large" return } You should provide bug report number for the failing component of the environment, if such bug report is available: if {[test_compiler_info {gcc-[0-3]-*}] || [test_compiler_info {gcc-4-[0-5]-*}]} { setup_xfail "gcc/46955" *-*-* } gdb_test "python print ttype.template_argument(2)" "&C::c" 22.6 Board settings =================== In GDB testsuite, the tests can be configured or customized in the board file by means of "Board Settings". Each setting should be consulted by test cases that depend on the corresponding feature. Here are the supported board settings: `gdb,cannot_call_functions' The board does not support inferior call, that is, invoking inferior functions in GDB. `gdb,can_reverse' The board supports reverse execution. `gdb,no_hardware_watchpoints' The board does not support hardware watchpoints. `gdb,nofileio' GDB is unable to intercept target file operations in remote and perform them on the host. `gdb,noinferiorio' The board is unable to provide I/O capability to the inferior. `gdb,nosignals' The board does not support signals. `gdb,skip_huge_test' Skip time-consuming tests on the board with slow connection. `gdb,skip_float_tests' Skip tests related to float points on target board. `gdb,use_precord' The board supports process record. `gdb_server_prog' The location of GDBserver. If GDBserver somewhere other than its default location is used in test, specify the location of GDBserver in this variable. The location is a file name of GDBserver that can be either absolute or relative to testsuite subdirectory in build directory. `in_proc_agent' The location of in-process agent. If in-process agent other than its default location is used in test, specify the location of in-process agent in this variable. The location is a file name of in-process agent that can be either absolute or relative to testsuite subdirectory in build directory. `noargs' GDB does not support argument passing for inferior. `no_long_long' The board does not support type `long long'. `use_gdb_stub' The tests are running with gdb stub. ---------- Footnotes ---------- (1) If you are using a board file, it could override the test-suite default; search the board file for "timeout".  File: gdbint.info, Node: Hints, Next: GDB Observers, Prev: Testsuite, Up: Top 23 Hints ******** Check the `README' file, it often has useful information that does not appear anywhere else in the directory. * Menu: * Getting Started:: Getting started working on GDB * Debugging GDB:: Debugging GDB with itself  File: gdbint.info, Node: Getting Started, Next: Debugging GDB, Up: Hints 23.1 Getting Started ==================== GDB is a large and complicated program, and if you first starting to work on it, it can be hard to know where to start. Fortunately, if you know how to go about it, there are ways to figure out what is going on. This manual, the GDB Internals manual, has information which applies generally to many parts of GDB. Information about particular functions or data structures are located in comments with those functions or data structures. If you run across a function or a global variable which does not have a comment correctly explaining what is does, this can be thought of as a bug in GDB; feel free to submit a bug report, with a suggested comment if you can figure out what the comment should say. If you find a comment which is actually wrong, be especially sure to report that. Comments explaining the function of macros defined in host, target, or native dependent files can be in several places. Sometimes they are repeated every place the macro is defined. Sometimes they are where the macro is used. Sometimes there is a header file which supplies a default definition of the macro, and the comment is there. This manual also documents all the available macros. Start with the header files. Once you have some idea of how GDB's internal symbol tables are stored (see `symtab.h', `gdbtypes.h'), you will find it much easier to understand the code which uses and creates those symbol tables. You may wish to process the information you are getting somehow, to enhance your understanding of it. Summarize it, translate it to another language, add some (perhaps trivial or non-useful) feature to GDB, use the code to predict what a test case would do and write the test case and verify your prediction, etc. If you are reading code and your eyes are starting to glaze over, this is a sign you need to use a more active approach. Once you have a part of GDB to start with, you can find more specifically the part you are looking for by stepping through each function with the `next' command. Do not use `step' or you will quickly get distracted; when the function you are stepping through calls another function try only to get a big-picture understanding (perhaps using the comment at the beginning of the function being called) of what it does. This way you can identify which of the functions being called by the function you are stepping through is the one which you are interested in. You may need to examine the data structures generated at each stage, with reference to the comments in the header files explaining what the data structures are supposed to look like. Of course, this same technique can be used if you are just reading the code, rather than actually stepping through it. The same general principle applies--when the code you are looking at calls something else, just try to understand generally what the code being called does, rather than worrying about all its details. A good place to start when tracking down some particular area is with a command which invokes that feature. Suppose you want to know how single-stepping works. As a GDB user, you know that the `step' command invokes single-stepping. The command is invoked via command tables (see `command.h'); by convention the function which actually performs the command is formed by taking the name of the command and adding `_command', or in the case of an `info' subcommand, `_info'. For example, the `step' command invokes the `step_command' function and the `info display' command invokes `display_info'. When this convention is not followed, you might have to use `grep' or `M-x tags-search' in emacs, or run GDB on itself and set a breakpoint in `execute_command'. If all of the above fail, it may be appropriate to ask for information on `bug-gdb'. But _never_ post a generic question like "I was wondering if anyone could give me some tips about understanding GDB"--if we had some magic secret we would put it in this manual. Suggestions for improving the manual are always welcome, of course. ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/gdb/doc/annotate.info�����������������������������������������������������������������0000644�0001750�0001750�00000137016�12250773371�016071� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is annotate.info, produced by makeinfo version 4.13 from ./annotate.texinfo. INFO-DIR-SECTION Software development START-INFO-DIR-ENTRY * Annotate: (annotate). The obsolete annotation interface. END-INFO-DIR-ENTRY Copyright (C) 1994-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This file documents GDB's obsolete annotations. Copyright (C) 1994-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".  File: annotate.info, Node: Top, Next: Annotations Overview, Up: (dir) GDB Annotations *************** This document describes the obsolete level two annotation interface implemented in older GDB versions. * Menu: * Annotations Overview:: What annotations are; the general syntax. * Limitations:: Limitations of the annotation interface. * Migrating to GDB/MI:: Migrating to GDB/MI * Server Prefix:: Issuing a command without affecting user state. * Value Annotations:: Values are marked as such. * Frame Annotations:: Stack frames are annotated. * Displays:: GDB can be told to display something periodically. * Prompting:: Annotations marking GDB's need for input. * Errors:: Annotations for error messages. * Breakpoint Info:: Information on breakpoints. * Invalidation:: Some annotations describe things now invalid. * Annotations for Running:: Whether the program is running, how it stopped, etc. * Source Annotations:: Annotations describing source code. * Multi-threaded Apps:: An annotation that reports multi-threadedness. * GNU Free Documentation License::  File: annotate.info, Node: Annotations Overview, Next: Limitations, Prev: Top, Up: Top 1 What is an Annotation? ************************ To produce obsolete level two annotations, start GDB with the `--annotate=2' option. Annotations start with a newline character, two `control-z' characters, and the name of the annotation. If there is no additional information associated with this annotation, the name of the annotation is followed immediately by a newline. If there is additional information, the name of the annotation is followed by a space, the additional information, and a newline. The additional information cannot contain newline characters. Any output not beginning with a newline and two `control-z' characters denotes literal output from GDB. Currently there is no need for GDB to output a newline followed by two `control-z' characters, but if there was such a need, the annotations could be extended with an `escape' annotation which means those three characters as output. A simple example of starting up GDB with annotations is: $ gdb --annotate=2 GNU GDB 5.0 Copyright 2000 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc-sun-sunos4.1.3" ^Z^Zpre-prompt (gdb) ^Z^Zprompt quit ^Z^Zpost-prompt $ Here `quit' is input to GDB; the rest is output from GDB. The three lines beginning `^Z^Z' (where `^Z' denotes a `control-z' character) are annotations; the rest is output from GDB.  File: annotate.info, Node: Limitations, Next: Migrating to GDB/MI, Prev: Annotations Overview, Up: Top 2 Limitations of the Annotation Interface ***************************************** The level two annotations mechanism is known to have a number of technical and architectural limitations. As a consequence, in 2001, with the release of GDB 5.1 and the addition of GDB/MI, the annotation interface was marked as deprecated. This chapter discusses the known problems. 2.1 Dependant on CLI output =========================== The annotation interface works by interspersing markups with GDB normal command-line interpreter output. Unfortunately, this makes the annotation client dependant on not just the annotations, but also the CLI output. This is because the client is forced to assume that specific GDB commands provide specific information. Any change to GDB's CLI output modifies or removes that information and, consequently, likely breaks the client. Since the GDB/MI output is independent of the CLI, it does not have this problem. 2.2 Scalability =============== The annotation interface relies on value annotations (*note Value Annotations::) and the display mechanism as a way of obtaining up-to-date value information. These mechanisms are not scalable. In a graphical environment, where many values can be displayed simultaneously, a serious performance problem occurs when the client tries to first extract from GDB, and then re-display, all those values. The client should instead only request and update the values that changed. The GDB/MI Variable Objects provide just that mechanism. 2.3 Correctness =============== The annotation interface assumes that a variable's value can only be changed when the target is running. This assumption is not correct. A single assignment to a single variable can result in the entire target, and all displayed values, needing an update. The GDB/MI Variable Objects include a mechanism for efficiently reporting such changes. 2.4 Reliability =============== The GDB/MI interface includes a dedicated test directory (`gdb/gdb.mi'), and any addition or fix to GDB/MI must include testsuite changes. 2.5 Maintainability =================== The annotation mechanism was implemented by interspersing CLI print statements with various annotations. As a consequence, any CLI output change can alter the annotation output. Since the GDB/MI output is independent of the CLI, and the GDB/MI is increasingly implemented independent of the CLI code, its long term maintenance is much easier.  File: annotate.info, Node: Migrating to GDB/MI, Next: Server Prefix, Prev: Limitations, Up: Top 3 Migrating to GDB/MI ********************* By using the `interp mi' command, it is possible for annotation clients to invoke GDB/MI commands, and hence access the GDB/MI. By doing this, existing annotation clients have a migration path from this obsolete interface to GDB/MI.  File: annotate.info, Node: Server Prefix, Next: Value Annotations, Prev: Migrating to GDB/MI, Up: Top 4 The Server Prefix ******************* To issue a command to GDB without affecting certain aspects of the state which is seen by users, prefix it with `server '. This means that this command will not affect the command history, nor will it affect GDB's notion of which command to repeat if <RET> is pressed on a line by itself. The server prefix does not affect the recording of values into the value history; to print a value without recording it into the value history, use the `output' command instead of the `print' command.  File: annotate.info, Node: Value Annotations, Next: Frame Annotations, Prev: Server Prefix, Up: Top 5 Values ******** _Value Annotations have been removed. GDB/MI instead provides Variable Objects._ When a value is printed in various contexts, GDB uses annotations to delimit the value from the surrounding text. If a value is printed using `print' and added to the value history, the annotation looks like ^Z^Zvalue-history-begin HISTORY-NUMBER VALUE-FLAGS HISTORY-STRING ^Z^Zvalue-history-value THE-VALUE ^Z^Zvalue-history-end where HISTORY-NUMBER is the number it is getting in the value history, HISTORY-STRING is a string, such as `$5 = ', which introduces the value to the user, THE-VALUE is the output corresponding to the value itself, and VALUE-FLAGS is `*' for a value which can be dereferenced and `-' for a value which cannot. If the value is not added to the value history (it is an invalid float or it is printed with the `output' command), the annotation is similar: ^Z^Zvalue-begin VALUE-FLAGS THE-VALUE ^Z^Zvalue-end When GDB prints an argument to a function (for example, in the output from the `backtrace' command), it annotates it as follows: ^Z^Zarg-begin ARGUMENT-NAME ^Z^Zarg-name-end SEPARATOR-STRING ^Z^Zarg-value VALUE-FLAGS THE-VALUE ^Z^Zarg-end where ARGUMENT-NAME is the name of the argument, SEPARATOR-STRING is text which separates the name from the value for the user's benefit (such as `='), and VALUE-FLAGS and THE-VALUE have the same meanings as in a `value-history-begin' annotation. When printing a structure, GDB annotates it as follows: ^Z^Zfield-begin VALUE-FLAGS FIELD-NAME ^Z^Zfield-name-end SEPARATOR-STRING ^Z^Zfield-value THE-VALUE ^Z^Zfield-end where FIELD-NAME is the name of the field, SEPARATOR-STRING is text which separates the name from the value for the user's benefit (such as `='), and VALUE-FLAGS and THE-VALUE have the same meanings as in a `value-history-begin' annotation. When printing an array, GDB annotates it as follows: ^Z^Zarray-section-begin ARRAY-INDEX VALUE-FLAGS where ARRAY-INDEX is the index of the first element being annotated and VALUE-FLAGS has the same meaning as in a `value-history-begin' annotation. This is followed by any number of elements, where is element can be either a single element: `,' WHITESPACE ; omitted for the first element THE-VALUE ^Z^Zelt or a repeated element `,' WHITESPACE ; omitted for the first element THE-VALUE ^Z^Zelt-rep NUMBER-OF-REPETITIONS REPETITION-STRING ^Z^Zelt-rep-end In both cases, THE-VALUE is the output for the value of the element and WHITESPACE can contain spaces, tabs, and newlines. In the repeated case, NUMBER-OF-REPETITIONS is the number of consecutive array elements which contain that value, and REPETITION-STRING is a string which is designed to convey to the user that repetition is being depicted. Once all the array elements have been output, the array annotation is ended with ^Z^Zarray-section-end  File: annotate.info, Node: Frame Annotations, Next: Displays, Prev: Value Annotations, Up: Top 6 Frames ******** _Value Annotations have been removed. GDB/MI instead provides a number of frame commands._ _Frame annotations are no longer available. The GDB/MI provides `-stack-list-arguments', `-stack-list-locals', and `-stack-list-frames' commands._ Whenever GDB prints a frame, it annotates it. For example, this applies to frames printed when GDB stops, output from commands such as `backtrace' or `up', etc. The frame annotation begins with ^Z^Zframe-begin LEVEL ADDRESS LEVEL-STRING where LEVEL is the number of the frame (0 is the innermost frame, and other frames have positive numbers), ADDRESS is the address of the code executing in that frame, and LEVEL-STRING is a string designed to convey the level to the user. ADDRESS is in the form `0x' followed by one or more lowercase hex digits (note that this does not depend on the language). The frame ends with ^Z^Zframe-end Between these annotations is the main body of the frame, which can consist of * ^Z^Zfunction-call FUNCTION-CALL-STRING where FUNCTION-CALL-STRING is text designed to convey to the user that this frame is associated with a function call made by GDB to a function in the program being debugged. * ^Z^Zsignal-handler-caller SIGNAL-HANDLER-CALLER-STRING where SIGNAL-HANDLER-CALLER-STRING is text designed to convey to the user that this frame is associated with whatever mechanism is used by this operating system to call a signal handler (it is the frame which calls the signal handler, not the frame for the signal handler itself). * A normal frame. This can optionally (depending on whether this is thought of as interesting information for the user to see) begin with ^Z^Zframe-address ADDRESS ^Z^Zframe-address-end SEPARATOR-STRING where ADDRESS is the address executing in the frame (the same address as in the `frame-begin' annotation, but printed in a form which is intended for user consumption--in particular, the syntax varies depending on the language), and SEPARATOR-STRING is a string intended to separate this address from what follows for the user's benefit. Then comes ^Z^Zframe-function-name FUNCTION-NAME ^Z^Zframe-args ARGUMENTS where FUNCTION-NAME is the name of the function executing in the frame, or `??' if not known, and ARGUMENTS are the arguments to the frame, with parentheses around them (each argument is annotated individually as well, *note Value Annotations::). If source information is available, a reference to it is then printed: ^Z^Zframe-source-begin SOURCE-INTRO-STRING ^Z^Zframe-source-file FILENAME ^Z^Zframe-source-file-end : ^Z^Zframe-source-line LINE-NUMBER ^Z^Zframe-source-end where SOURCE-INTRO-STRING separates for the user's benefit the reference from the text which precedes it, FILENAME is the name of the source file, and LINE-NUMBER is the line number within that file (the first line is line 1). If GDB prints some information about where the frame is from (which library, which load segment, etc.; currently only done on the RS/6000), it is annotated with ^Z^Zframe-where INFORMATION Then, if source is to actually be displayed for this frame (for example, this is not true for output from the `backtrace' command), then a `source' annotation (*note Source Annotations::) is displayed. Unlike most annotations, this is output instead of the normal text which would be output, not in addition.  File: annotate.info, Node: Displays, Next: Prompting, Prev: Frame Annotations, Up: Top 7 Displays ********** _Display Annotations have been removed. GDB/MI instead provides Variable Objects._ When GDB is told to display something using the `display' command, the results of the display are annotated: ^Z^Zdisplay-begin NUMBER ^Z^Zdisplay-number-end NUMBER-SEPARATOR ^Z^Zdisplay-format FORMAT ^Z^Zdisplay-expression EXPRESSION ^Z^Zdisplay-expression-end EXPRESSION-SEPARATOR ^Z^Zdisplay-value VALUE ^Z^Zdisplay-end where NUMBER is the number of the display, NUMBER-SEPARATOR is intended to separate the number from what follows for the user, FORMAT includes information such as the size, format, or other information about how the value is being displayed, EXPRESSION is the expression being displayed, EXPRESSION-SEPARATOR is intended to separate the expression from the text that follows for the user, and VALUE is the actual value being displayed.  File: annotate.info, Node: Prompting, Next: Errors, Prev: Displays, Up: Top 8 Annotation for GDB Input ************************** When GDB prompts for input, it annotates this fact so it is possible to know when to send output, when the output from a given command is over, etc. Different kinds of input each have a different "input type". Each input type has three annotations: a `pre-' annotation, which denotes the beginning of any prompt which is being output, a plain annotation, which denotes the end of the prompt, and then a `post-' annotation which denotes the end of any echo which may (or may not) be associated with the input. For example, the `prompt' input type features the following annotations: ^Z^Zpre-prompt ^Z^Zprompt ^Z^Zpost-prompt The input types are `prompt' When GDB is prompting for a command (the main GDB prompt). `commands' When GDB prompts for a set of commands, like in the `commands' command. The annotations are repeated for each command which is input. `overload-choice' When GDB wants the user to select between various overloaded functions. `query' When GDB wants the user to confirm a potentially dangerous operation. `prompt-for-continue' When GDB is asking the user to press return to continue. Note: Don't expect this to work well; instead use `set height 0' to disable prompting. This is because the counting of lines is buggy in the presence of annotations.  File: annotate.info, Node: Errors, Next: Breakpoint Info, Prev: Prompting, Up: Top 9 Errors ******** ^Z^Zquit This annotation occurs right before GDB responds to an interrupt. ^Z^Zerror This annotation occurs right before GDB responds to an error. Quit and error annotations indicate that any annotations which GDB was in the middle of may end abruptly. For example, if a `value-history-begin' annotation is followed by a `error', one cannot expect to receive the matching `value-history-end'. One cannot expect not to receive it either, however; an error annotation does not necessarily mean that GDB is immediately returning all the way to the top level. A quit or error annotation may be preceded by ^Z^Zerror-begin Any output between that and the quit or error annotation is the error message. Warning messages are not yet annotated.  File: annotate.info, Node: Breakpoint Info, Next: Invalidation, Prev: Errors, Up: Top 10 Information on Breakpoints ***************************** _Breakpoint Annotations have been removed. GDB/MI instead provides breakpoint commands._ The output from the `info breakpoints' command is annotated as follows: ^Z^Zbreakpoints-headers HEADER-ENTRY ^Z^Zbreakpoints-table where HEADER-ENTRY has the same syntax as an entry (see below) but instead of containing data, it contains strings which are intended to convey the meaning of each field to the user. This is followed by any number of entries. If a field does not apply for this entry, it is omitted. Fields may contain trailing whitespace. Each entry consists of: ^Z^Zrecord ^Z^Zfield 0 NUMBER ^Z^Zfield 1 TYPE ^Z^Zfield 2 DISPOSITION ^Z^Zfield 3 ENABLE ^Z^Zfield 4 ADDRESS ^Z^Zfield 5 WHAT ^Z^Zfield 6 FRAME ^Z^Zfield 7 CONDITION ^Z^Zfield 8 IGNORE-COUNT ^Z^Zfield 9 COMMANDS Note that ADDRESS is intended for user consumption--the syntax varies depending on the language. The output ends with ^Z^Zbreakpoints-table-end  File: annotate.info, Node: Invalidation, Next: Annotations for Running, Prev: Breakpoint Info, Up: Top 11 Invalidation Notices *********************** The following annotations say that certain pieces of state may have changed. `^Z^Zframes-invalid' The frames (for example, output from the `backtrace' command) may have changed. `^Z^Zbreakpoints-invalid' The breakpoints may have changed. For example, the user just added or deleted a breakpoint.  File: annotate.info, Node: Annotations for Running, Next: Source Annotations, Prev: Invalidation, Up: Top 12 Running the Program ********************** When the program starts executing due to a GDB command such as `step' or `continue', ^Z^Zstarting is output. When the program stops, ^Z^Zstopped is output. Before the `stopped' annotation, a variety of annotations describe how the program stopped. `^Z^Zexited EXIT-STATUS' The program exited, and EXIT-STATUS is the exit status (zero for successful exit, otherwise nonzero). `^Z^Zsignalled' The program exited with a signal. After the `^Z^Zsignalled', the annotation continues: INTRO-TEXT ^Z^Zsignal-name NAME ^Z^Zsignal-name-end MIDDLE-TEXT ^Z^Zsignal-string STRING ^Z^Zsignal-string-end END-TEXT where NAME is the name of the signal, such as `SIGILL' or `SIGSEGV', and STRING is the explanation of the signal, such as `Illegal Instruction' or `Segmentation fault'. INTRO-TEXT, MIDDLE-TEXT, and END-TEXT are for the user's benefit and have no particular format. `^Z^Zsignal' The syntax of this annotation is just like `signalled', but GDB is just saying that the program received the signal, not that it was terminated with it. `^Z^Zbreakpoint NUMBER' The program hit breakpoint number NUMBER. `^Z^Zwatchpoint NUMBER' The program hit watchpoint number NUMBER.  File: annotate.info, Node: Source Annotations, Next: Multi-threaded Apps, Prev: Annotations for Running, Up: Top 13 Displaying Source ******************** The following annotation is used instead of displaying source code: ^Z^Zsource FILENAME:LINE:CHARACTER:MIDDLE:ADDR where FILENAME is an absolute file name indicating which source file, LINE is the line number within that file (where 1 is the first line in the file), CHARACTER is the character position within the file (where 0 is the first character in the file) (for most debug formats this will necessarily point to the beginning of a line), MIDDLE is `middle' if ADDR is in the middle of the line, or `beg' if ADDR is at the beginning of the line, and ADDR is the address in the target program associated with the source which is being displayed. ADDR is in the form `0x' followed by one or more lowercase hex digits (note that this does not depend on the language).  File: annotate.info, Node: Multi-threaded Apps, Next: GNU Free Documentation License, Prev: Source Annotations, Up: Top 14 Multi-threaded Applications ****************************** The following annotations report thread related changes of state. `^Z^Znew-thread' This annotation is issued once for each thread that is created apart from the main thread, which is not reported. `^Z^Zthread-changed' The selected thread has changed. This may occur at the request of the user with the `thread' command, or as a result of execution, e.g., another thread hits a breakpoint.  File: annotate.info, Node: GNU Free Documentation License, Prev: Multi-threaded Apps, Up: Top Appendix A GNU Free Documentation License ***************************************** Version 1.3, 3 November 2008 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. `http://fsf.org/' Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. The "publisher" means any person or entity that distributes copies of the Document to the public. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements." 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See `http://www.gnu.org/copyleft/'. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. 11. RELICENSING "Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site. "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. "Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. ADDENDUM: How to use this License for your documents ==================================================== To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.  Tag Table: Node: Top1173 Node: Annotations Overview2343 Node: Limitations4142 Node: Migrating to GDB/MI6727 Node: Server Prefix7110 Node: Value Annotations7756 Node: Frame Annotations10926 Node: Displays14825 Node: Prompting15856 Node: Errors17359 Node: Breakpoint Info18249 Node: Invalidation19474 Node: Annotations for Running19953 Node: Source Annotations21466 Node: Multi-threaded Apps22412 Node: GNU Free Documentation License23021  End Tag Table ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/gdb/doc/gdb.info-6��������������������������������������������������������������������0000644�0001750�0001750�00000547367�12250773371�015175� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo. INFO-DIR-SECTION Software development START-INFO-DIR-ENTRY * Gdb: (gdb). The GNU debugger. END-INFO-DIR-ENTRY Copyright (C) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom." This file documents the GNU debugger GDB. This is the Tenth Edition, of `Debugging with GDB: the GNU Source-Level Debugger' for GDB (GDB) Version 7.6.2. Copyright (C) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom."  File: gdb.info, Node: Copying, Next: GNU Free Documentation License, Prev: Index Section Format, Up: Top Appendix K GNU GENERAL PUBLIC LICENSE ************************************* Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. `http://fsf.org/' Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble ======== The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS ==================== 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a. The work must carry prominent notices stating that you modified it, and giving a relevant date. b. The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c. You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d. If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a. Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b. Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c. Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d. Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e. Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a. Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b. Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c. Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d. Limiting the use for publicity purposes of names of licensors or authors of the material; or e. Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f. Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS =========================== How to Apply These Terms to Your New Programs ============================================= If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES. Copyright (C) YEAR NAME OF AUTHOR 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 3 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, see `http://www.gnu.org/licenses/'. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: PROGRAM Copyright (C) YEAR NAME OF AUTHOR This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see `http://www.gnu.org/licenses/'. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read `http://www.gnu.org/philosophy/why-not-lgpl.html'.  File: gdb.info, Node: GNU Free Documentation License, Next: Concept Index, Prev: Copying, Up: Top Appendix L GNU Free Documentation License ***************************************** Version 1.3, 3 November 2008 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. `http://fsf.org/' Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. The "publisher" means any person or entity that distributes copies of the Document to the public. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements." 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See `http://www.gnu.org/copyleft/'. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. 11. RELICENSING "Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site. "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. "Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. ADDENDUM: How to use this License for your documents ==================================================== To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.  File: gdb.info, Node: Concept Index, Next: Command and Variable Index, Prev: GNU Free Documentation License, Up: Top Concept Index ************* �[index�] * Menu: * ! packet: Packets. (line 49) * "No symbol "foo" in current context": Variables. (line 110) * # in Modula-2: GDB/M2. (line 18) * $: Value History. (line 13) * $$: Value History. (line 13) * $_ and info breakpoints: Set Breaks. (line 128) * $_ and info line: Machine Code. (line 30) * $_, $__, and value history: Memory. (line 109) * --annotate: Mode Options. (line 125) * --args: Mode Options. (line 138) * --attach, gdbserver option: Server. (line 86) * --batch: Mode Options. (line 46) * --batch-silent: Mode Options. (line 64) * --baud: Mode Options. (line 144) * --cd: Mode Options. (line 105) * --command: File Options. (line 51) * --core: File Options. (line 43) * --data-directory: Mode Options. (line 109) * --debug, gdbserver option: Server. (line 166) * --directory: File Options. (line 77) * --eval-command: File Options. (line 57) * --exec: File Options. (line 35) * --fullname: Mode Options. (line 114) * --init-command: File Options. (line 67) * --init-eval-command: File Options. (line 72) * --interpreter: Mode Options. (line 163) * --multi, gdbserver option: Server. (line 119) * --nh: Mode Options. (line 36) * --nowindows: Mode Options. (line 95) * --nx: Mode Options. (line 11) * --once, gdbserver option: Server. (line 151) * --pid: File Options. (line 47) * --quiet: Mode Options. (line 42) * --readnow: File Options. (line 81) * --remote-debug, gdbserver option: Server. (line 167) * --return-child-result: Mode Options. (line 76) * --se: File Options. (line 39) * --silent: Mode Options. (line 42) * --statistics: Mode Options. (line 180) * --symbols: File Options. (line 31) * --tty: Mode Options. (line 153) * --tui: Mode Options. (line 156) * --version: Mode Options. (line 184) * --windows: Mode Options. (line 101) * --with-gdb-datadir: Data Files. (line 19) * --with-relocated-sources: Source Path. (line 89) * --with-sysroot: Files. (line 439) * --wrapper, gdbserver option: Server. (line 172) * --write: Mode Options. (line 175) * -b: Mode Options. (line 144) * -c: File Options. (line 43) * -d: File Options. (line 77) * -e: File Options. (line 35) * -ex: File Options. (line 57) * -f: Mode Options. (line 114) * -iex: File Options. (line 72) * -ix: File Options. (line 67) * -l: Mode Options. (line 148) * -n: Mode Options. (line 11) * -nw: Mode Options. (line 95) * -p: File Options. (line 47) * -q: Mode Options. (line 42) * -r: File Options. (line 81) * -s: File Options. (line 31) * -t: Mode Options. (line 153) * -w: Mode Options. (line 101) * -x: File Options. (line 51) * ., Modula-2 scope operator: M2 Scope. (line 6) * .build-id directory: Separate Debug Files. (line 6) * .debug subdirectories: Separate Debug Files. (line 6) * .debug_gdb_scripts section: dotdebug_gdb_scripts section. (line 6) * .gdb_index section: Index Files. (line 6) * .gdb_index section format: Index Section Format. (line 6) * .gdbinit: Startup. (line 66) * .gnu_debugdata section: MiniDebugInfo. (line 6) * .gnu_debuglink sections: Separate Debug Files. (line 80) * .note.gnu.build-id sections: Separate Debug Files. (line 98) * .o files, reading symbols from: Files. (line 132) * /proc: SVR4 Process Information. (line 6) * <architecture>: Target Description Format. (line 73) * <compatible>: Target Description Format. (line 96) * <feature>: Target Description Format. (line 120) * <flags>: Target Description Format. (line 186) * <osabi>: Target Description Format. (line 83) * <reg>: Target Description Format. (line 199) * <struct>: Target Description Format. (line 164) * <union>: Target Description Format. (line 154) * <vector>: Target Description Format. (line 147) * ? packet: Packets. (line 58) * _NSPrintForDebugger, and printing Objective-C objects: The Print Command with Objective-C. (line 11) * A packet: Packets. (line 65) * AArch64 support: AArch64. (line 6) * abbreviation: Command Syntax. (line 13) * acknowledgment, for GDB remote: Packet Acknowledgment. (line 6) * active targets: Active Targets. (line 6) * Ada: Ada. (line 6) * Ada exception catching: Set Catchpoints. (line 19) * Ada mode, general: Ada Mode Intro. (line 6) * Ada task switching: Ada Tasks. (line 115) * Ada tasking and core file debugging: Ada Tasks and Core Files. (line 6) * Ada, deviations from: Additions to Ada. (line 6) * Ada, omissions from: Omissions from Ada. (line 6) * Ada, problems: Ada Glitches. (line 6) * Ada, tasking: Ada Tasks. (line 6) * add new commands for external monitor: Connecting. (line 105) * address of a symbol: Symbols. (line 74) * address size for remote targets: Remote Configuration. (line 12) * ADP (Angel Debugger Protocol) logging: ARM. (line 89) * aggregates (Ada): Omissions from Ada. (line 44) * AIX threads: Debugging Output. (line 36) * aliases for commands: Aliases. (line 6) * alignment of remote memory accesses: Packets. (line 235) * all-stop mode: All-Stop Mode. (line 6) * Alpha stack: MIPS. (line 6) * ambiguous expressions: Ambiguous Expressions. (line 6) * annotations: Annotations Overview. (line 6) * annotations for errors, warnings and interrupts: Errors. (line 6) * annotations for invalidation messages: Invalidation. (line 6) * annotations for prompts: Prompting. (line 6) * annotations for running programs: Annotations for Running. (line 6) * annotations for source display: Source Annotations. (line 6) * append data to a file: Dump/Restore Files. (line 6) * apply command to several threads: Threads. (line 122) * architecture debugging info: Debugging Output. (line 26) * argument count in user-defined commands: Define. (line 25) * arguments (to your program): Arguments. (line 6) * arguments, to gdbserver: Server. (line 34) * arguments, to user-defined commands: Define. (line 6) * ARM 32-bit mode: ARM. (line 25) * ARM AArch64: Debugging Output. (line 18) * ARM RDI: ARM. (line 6) * array aggregates (Ada): Omissions from Ada. (line 44) * arrays: Arrays. (line 6) * arrays in expressions: Expressions. (line 14) * artificial array: Arrays. (line 6) * assembly instructions: Machine Code. (line 36) * assignment: Assignment. (line 6) * async output in GDB/MI: GDB/MI Output Syntax. (line 98) * async records in GDB/MI: GDB/MI Async Records. (line 6) * asynchronous execution: Background Execution. (line 6) * asynchronous execution, and process record and replay: Process Record and Replay. (line 68) * AT&T disassembly flavor: Machine Code. (line 132) * attach: Attach. (line 6) * attach to a program, gdbserver: Server. (line 86) * auto-loading: Auto-loading. (line 6) * auto-loading init file in the current directory: Init File in the Current Directory. (line 6) * auto-loading libthread_db.so.1: libthread_db.so.1 file. (line 6) * auto-loading OBJFILE-gdb.gdb: objfile-gdb.gdb file. (line 6) * auto-loading safe-path: Auto-loading safe path. (line 6) * auto-loading verbose mode: Auto-loading verbose mode. (line 6) * auto-retry, for remote TCP target: Remote Configuration. (line 117) * automatic display: Auto Display. (line 6) * automatic hardware breakpoints: Set Breaks. (line 297) * automatic overlay debugging: Automatic Overlay Debugging. (line 6) * automatic thread selection: All-Stop Mode. (line 28) * auxiliary vector: OS Information. (line 9) * AVR: AVR. (line 6) * B packet: Packets. (line 92) * b packet: Packets. (line 77) * background execution: Background Execution. (line 6) * backtrace beyond main function: Backtrace. (line 93) * backtrace limit: Backtrace. (line 129) * base name differences: Files. (line 506) * baud rate for remote targets: Remote Configuration. (line 21) * bc packet: Packets. (line 97) * bcache statistics: Maintenance Commands. (line 239) * bits in remote address: Remote Configuration. (line 12) * blocks in python: Blocks In Python. (line 6) * bookmark: Checkpoint/Restart. (line 6) * branch trace format: Branch Trace Format. (line 6) * break in overloaded functions: Debugging C Plus Plus. (line 9) * break on a system call.: Set Catchpoints. (line 48) * break on fork/exec: Set Catchpoints. (line 43) * BREAK signal instead of Ctrl-C: Remote Configuration. (line 29) * breakpoint address adjusted: Breakpoint-related Warnings. (line 6) * breakpoint at static probe point: Specify Location. (line 91) * breakpoint commands: Break Commands. (line 6) * breakpoint commands for GDB/MI: GDB/MI Breakpoint Commands. (line 6) * breakpoint commands, in remote protocol: General Query Packets. (line 697) * breakpoint conditions: Conditions. (line 6) * breakpoint kinds, ARM: ARM Breakpoint Kinds. (line 6) * breakpoint kinds, MIPS: MIPS Breakpoint Kinds. (line 6) * breakpoint numbers: Breakpoints. (line 41) * breakpoint on events: Breakpoints. (line 33) * breakpoint on memory address: Breakpoints. (line 20) * breakpoint on variable modification: Breakpoints. (line 20) * breakpoint ranges: Breakpoints. (line 48) * breakpoint subroutine, remote: Stub Contents. (line 31) * breakpointing Ada elaboration code: Stopping Before Main Program. (line 6) * breakpoints: Breakpoints. (line 6) * breakpoints and tasks, in Ada: Ada Tasks. (line 135) * breakpoints and threads: Thread-Specific Breakpoints. (line 10) * breakpoints at functions matching a regexp: Set Breaks. (line 92) * breakpoints in overlays: Overlay Commands. (line 93) * breakpoints in python: Breakpoints In Python. (line 6) * breakpoints, multiple locations: Set Breaks. (line 201) * bs packet: Packets. (line 103) * bug criteria: Bug Criteria. (line 6) * bug reports: Bug Reporting. (line 6) * bugs in GDB: GDB Bugs. (line 6) * build ID sections: Separate Debug Files. (line 98) * build ID, and separate debugging files: Separate Debug Files. (line 6) * building GDB, requirements for: Requirements. (line 6) * built-in simulator target: Target Commands. (line 73) * builtin Go functions: Go. (line 31) * builtin Go types: Go. (line 28) * C and C++: C. (line 6) * C and C++ checks: C Checks. (line 6) * C and C++ constants: C Constants. (line 6) * C and C++ defaults: C Defaults. (line 6) * C and C++ operators: C Operators. (line 6) * C packet: Packets. (line 119) * c packet: Packets. (line 110) * C++: C. (line 10) * C++ compilers: C Plus Plus Expressions. (line 8) * C++ exception handling: Debugging C Plus Plus. (line 20) * C++ overload debugging info: Debugging Output. (line 157) * C++ scope resolution: Variables. (line 90) * C++ symbol decoding style: Print Settings. (line 413) * C++ symbol display: Debugging C Plus Plus. (line 35) * caching data of remote targets: Caching Remote Data. (line 6) * call dummy stack unwinding: Calling. (line 35) * call dummy stack unwinding on unhandled exception.: Calling. (line 46) * call overloaded functions: C Plus Plus Expressions. (line 26) * call stack: Stack. (line 9) * call stack traces: Backtrace. (line 6) * calling functions: Calling. (line 6) * calling make: Shell Commands. (line 21) * case sensitivity in symbol names: Symbols. (line 27) * case-insensitive symbol names: Symbols. (line 27) * casts, in expressions: Expressions. (line 28) * casts, to view memory: Expressions. (line 43) * catch Ada exceptions: Set Catchpoints. (line 19) * catchpoints: Breakpoints. (line 33) * catchpoints, setting: Set Catchpoints. (line 6) * Cell Broadband Engine: SPU. (line 6) * change working directory: Working Directory. (line 16) * character sets: Character Sets. (line 6) * charset: Character Sets. (line 6) * checkpoint: Checkpoint/Restart. (line 6) * checkpoints and process id: Checkpoint/Restart. (line 80) * checks, range: Type Checking. (line 45) * checks, type: Checks. (line 24) * checksum, for GDB remote: Overview. (line 20) * choosing target byte order: Byte Order. (line 6) * circular trace buffer: Starting and Stopping Trace Experiments. (line 81) * clearing breakpoints, watchpoints, catchpoints: Delete Breaks. (line 6) * close, file-i/o system call: close. (line 6) * closest symbol and offset for an address: Symbols. (line 84) * code address and its source line: Machine Code. (line 25) * code compression, MIPS: MIPS. (line 55) * COFF/PE exported symbols: Debugging Output. (line 54) * collected data discarded: Starting and Stopping Trace Experiments. (line 6) * colon, doubled as scope operator: M2 Scope. (line 6) * colon-colon, context for variables/functions: Variables. (line 44) * command editing: Readline Bare Essentials. (line 6) * command files: Command Files. (line 6) * command history: Command History. (line 6) * command hooks: Hooks. (line 6) * command interpreters: Interpreters. (line 6) * command line editing: Editing. (line 6) * command scripts, debugging: Messages/Warnings. (line 67) * command tracing: Messages/Warnings. (line 62) * commands for C++: Debugging C Plus Plus. (line 6) * commands in python: Commands In Python. (line 6) * commands to access python: Python Commands. (line 6) * comment: Command Syntax. (line 38) * COMMON blocks, Fortran: Special Fortran Commands. (line 9) * common targets: Target Commands. (line 46) * compatibility, GDB/MI and CLI: GDB/MI Compatibility with CLI. (line 6) * compilation directory: Source Path. (line 108) * compiling, on Sparclet: Sparclet. (line 16) * completion: Completion. (line 6) * completion of Python commands: Commands In Python. (line 72) * completion of quoted strings: Completion. (line 57) * completion of structure field names: Completion. (line 96) * completion of union field names: Completion. (line 96) * compressed debug sections: Requirements. (line 44) * conditional breakpoints: Conditions. (line 6) * conditional tracepoints: Tracepoint Conditions. (line 6) * configuring GDB: Running Configure. (line 6) * confirmation: Messages/Warnings. (line 50) * connection timeout, for remote TCP target: Remote Configuration. (line 132) * console i/o as part of file-i/o: Console I/O. (line 6) * console interpreter: Interpreters. (line 21) * console output in GDB/MI: GDB/MI Output Syntax. (line 106) * constants, in file-i/o protocol: Constants. (line 6) * continuing: Continuing and Stepping. (line 6) * continuing threads: Thread Stops. (line 6) * control C, and remote debugging: Bootstrapping. (line 25) * controlling terminal: Input/Output. (line 23) * convenience functions: Convenience Funs. (line 6) * convenience functions in python: Functions In Python. (line 6) * convenience variables: Convenience Vars. (line 6) * convenience variables for tracepoints: Tracepoint Variables. (line 6) * convenience variables, and trace state variables: Trace State Variables. (line 17) * convenience variables, initializing: Convenience Vars. (line 42) * core dump file: Files. (line 6) * core dump file target: Target Commands. (line 54) * crash of debugger: Bug Criteria. (line 9) * CRC algorithm definition: Separate Debug Files. (line 142) * CRC of memory block, remote request: General Query Packets. (line 68) * CRIS: CRIS. (line 6) * CRIS mode: CRIS. (line 26) * CRIS version: CRIS. (line 10) * Ctrl-BREAK, MS-Windows: Cygwin Native. (line 9) * ctrl-c message, in file-i/o protocol: The Ctrl-C Message. (line 6) * current Ada task ID: Ada Tasks. (line 105) * current directory: Source Path. (line 108) * current Go package: Go. (line 11) * current stack frame: Frames. (line 45) * current thread: Threads. (line 45) * current thread, remote request: General Query Packets. (line 57) * custom JIT debug info: Custom Debug Info. (line 6) * Cygwin DLL, debugging: Cygwin Native. (line 42) * Cygwin-specific commands: Cygwin Native. (line 6) * D: D. (line 6) * D packet: Packets. (line 135) * d packet: Packets. (line 128) * Darwin: Darwin. (line 6) * data breakpoints: Breakpoints. (line 20) * data manipulation, in GDB/MI: GDB/MI Data Manipulation. (line 6) * dcache line-size: Caching Remote Data. (line 48) * dcache size: Caching Remote Data. (line 45) * dead names, GNU Hurd: Hurd Native. (line 85) * debug expression parser: Debugging Output. (line 163) * debug formats and C++: C Plus Plus Expressions. (line 8) * debug link sections: Separate Debug Files. (line 80) * debug remote protocol: Debugging Output. (line 172) * debugger crash: Bug Criteria. (line 9) * debugging agent: In-Process Agent. (line 6) * debugging C++ programs: C Plus Plus Expressions. (line 8) * debugging information directory, global: Separate Debug Files. (line 6) * debugging information in separate files: Separate Debug Files. (line 6) * debugging libthread_db: Threads. (line 216) * debugging multiple processes: Forks. (line 52) * debugging optimized code: Optimized Code. (line 6) * debugging stub, example: Remote Stub. (line 6) * debugging target: Targets. (line 6) * debugging the Cygwin DLL: Cygwin Native. (line 42) * decimal floating point format: Decimal Floating Point. (line 6) * default collection action: Tracepoint Actions. (line 135) * default data directory: Data Files. (line 19) * default source path substitution: Source Path. (line 89) * default system root: Files. (line 439) * define trace state variable, remote request: Tracepoint Packets. (line 127) * defining macros interactively: Macros. (line 59) * definition of a macro, showing: Macros. (line 47) * delete breakpoints: Delete Breaks. (line 41) * deleting breakpoints, watchpoints, catchpoints: Delete Breaks. (line 6) * deliver a signal to a program: Signaling. (line 6) * demangling C++ names: Print Settings. (line 394) * deprecated commands: Maintenance Commands. (line 102) * derived type of an object, printing: Print Settings. (line 446) * descriptor tables display: DJGPP Native. (line 24) * detach from task, GNU Hurd: Hurd Native. (line 60) * detach from thread, GNU Hurd: Hurd Native. (line 110) * direct memory access (DMA) on MS-DOS: DJGPP Native. (line 75) * directories for source files: Source Path. (line 6) * directory, compilation: Source Path. (line 108) * directory, current: Source Path. (line 108) * disable address space randomization, remote request: General Query Packets. (line 88) * disconnected tracing: Starting and Stopping Trace Experiments. (line 45) * displaced stepping debugging info: Debugging Output. (line 76) * displaced stepping support: Maintenance Commands. (line 68) * displaced stepping, and process record and replay: Process Record and Replay. (line 63) * display command history: Command History. (line 78) * display derived types: Print Settings. (line 446) * display disabled out of scope: Auto Display. (line 86) * display GDB copyright: Help. (line 137) * display of expressions: Auto Display. (line 6) * display remote monitor communications: Target Commands. (line 108) * display remote packets: Debugging Output. (line 172) * DJGPP debugging: DJGPP Native. (line 6) * DLLs with no debugging symbols: Non-debug DLL Symbols. (line 6) * do not print frame argument values: Print Settings. (line 151) * documentation: Formatting Documentation. (line 22) * don't repeat command: Define. (line 61) * don't repeat Python command: Commands In Python. (line 43) * DOS file-name semantics of file names.: Files. (line 462) * DOS serial data link, remote debugging: DJGPP Native. (line 121) * DOS serial port status: DJGPP Native. (line 142) * download server address (M32R): M32R/D. (line 27) * download to Sparclet: Sparclet Download. (line 6) * download to VxWorks: VxWorks Download. (line 6) * DPMI: DJGPP Native. (line 6) * dprintf: Dynamic Printf. (line 6) * dump all data collected at tracepoint: tdump. (line 6) * dump core from inferior: Core File Generation. (line 6) * dump data to a file: Dump/Restore Files. (line 6) * dump/restore files: Dump/Restore Files. (line 6) * DVC register: PowerPC Embedded. (line 6) * DWARF 2 compilation units cache: Maintenance Commands. (line 297) * DWARF-2 CFI and CRIS: CRIS. (line 18) * DWARF2 DIEs: Debugging Output. (line 62) * DWARF2 Reading: Debugging Output. (line 69) * dynamic linking: Files. (line 113) * dynamic printf: Dynamic Printf. (line 6) * dynamic varobj: GDB/MI Variable Objects. (line 164) * editing: Editing. (line 15) * editing command lines: Readline Bare Essentials. (line 6) * editing source files: Edit. (line 6) * eight-bit characters in strings: Print Settings. (line 339) * elaboration phase: Starting. (line 90) * Emacs: Emacs. (line 6) * empty response, for unsupported packets: Overview. (line 96) * enable/disable a breakpoint: Disabling. (line 6) * entering numbers: Numbers. (line 6) * environment (of your program): Environment. (line 6) * errno values, in file-i/o protocol: Errno Values. (line 6) * error on valid input: Bug Criteria. (line 12) * event debugging info: Debugging Output. (line 84) * event designators: Event Designators. (line 6) * event handling: Set Catchpoints. (line 6) * examine process image: SVR4 Process Information. (line 6) * examining data: Data. (line 6) * examining memory: Memory. (line 9) * exception handlers: Set Catchpoints. (line 6) * exceptions, python: Exception Handling. (line 6) * executable file: Files. (line 16) * executable file target: Target Commands. (line 50) * executable file, for remote target: Remote Configuration. (line 88) * execute commands from a file: Command Files. (line 17) * execute forward or backward in time: Reverse Execution. (line 87) * execute remote command, remote request: General Query Packets. (line 339) * execution, foreground, background and asynchronous: Background Execution. (line 6) * exiting GDB: Quitting GDB. (line 6) * expand macro once: Macros. (line 38) * expanding preprocessor macros: Macros. (line 29) * explore type: Data. (line 145) * explore value: Data. (line 138) * exploring hierarchical data structures: Data. (line 36) * expression debugging info: Debugging Output. (line 91) * expression parser, debugging info: Debugging Output. (line 163) * expressions: Expressions. (line 6) * expressions in Ada: Ada. (line 11) * expressions in C or C++: C. (line 6) * expressions in C++: C Plus Plus Expressions. (line 6) * expressions in Modula-2: Modula-2. (line 12) * extend GDB for remote targets: Connecting. (line 105) * extending GDB: Extending GDB. (line 6) * extra signal information: Signals. (line 106) * F packet: Packets. (line 152) * F reply packet: The F Reply Packet. (line 6) * F request packet: The F Request Packet. (line 6) * fast tracepoints: Set Tracepoints. (line 24) * fast tracepoints, setting: Create and Delete Tracepoints. (line 51) * fatal signal: Bug Criteria. (line 9) * fatal signals: Signals. (line 15) * features of the remote protocol: General Query Packets. (line 399) * file name canonicalization: Files. (line 506) * file transfer: File Transfer. (line 6) * file transfer, remote protocol: Host I/O Packets. (line 6) * file-i/o examples: File-I/O Examples. (line 6) * file-i/o overview: File-I/O Overview. (line 6) * File-I/O remote protocol extension: File-I/O Remote Protocol Extension. (line 6) * file-i/o reply packet: The F Reply Packet. (line 6) * file-i/o request packet: The F Request Packet. (line 6) * filename-display: Backtrace. (line 138) * find downloadable SREC files (M32R): M32R/D. (line 15) * find trace snapshot: tfind. (line 6) * flinching: Messages/Warnings. (line 50) * float promotion: ABI. (line 34) * floating point: Floating Point Hardware. (line 6) * floating point registers: Registers. (line 15) * floating point, MIPS remote: MIPS Embedded. (line 60) * focus of debugging: Threads. (line 45) * foo: Symbol Errors. (line 50) * foreground execution: Background Execution. (line 6) * fork, debugging programs which call: Forks. (line 6) * format options: Print Settings. (line 6) * formatted output: Output Formats. (line 6) * Fortran: Summary. (line 40) * Fortran Defaults: Fortran Defaults. (line 6) * Fortran operators and expressions: Fortran Operators. (line 6) * Fortran-specific support in GDB: Fortran. (line 6) * FR-V shared-library debugging: Debugging Output. (line 190) * frame debugging info: Debugging Output. (line 99) * frame number: Frames. (line 28) * frame pointer: Frames. (line 21) * frame pointer register: Registers. (line 26) * frame, definition: Frames. (line 6) * frameless execution: Frames. (line 34) * frames in python: Frames In Python. (line 6) * free memory information (MS-DOS): DJGPP Native. (line 19) * fstat, file-i/o system call: stat/fstat. (line 6) * Fujitsu: Remote Stub. (line 69) * full symbol tables, listing GDB's internal: Symbols. (line 367) * function call arguments, optimized out: Backtrace. (line 71) * function entry/exit, wrong values of variables: Variables. (line 94) * functions without line info, and stepping: Continuing and Stepping. (line 93) * G packet: Packets. (line 186) * g packet: Packets. (line 157) * g++, GNU C++ compiler: C. (line 10) * garbled pointers: DJGPP Native. (line 42) * GCC and C++: C Plus Plus Expressions. (line 8) * GDB bugs, reporting: Bug Reporting. (line 6) * GDB internal error: Maintenance Commands. (line 136) * gdb module: Basic Python. (line 6) * GDB reference card: Formatting Documentation. (line 6) * GDB startup: Startup. (line 6) * GDB version number: Help. (line 127) * gdb.ini: Startup. (line 66) * gdb.printing: gdb.printing. (line 6) * gdb.prompt: gdb.prompt. (line 6) * gdb.types: gdb.types. (line 6) * gdb.Value: Values From Inferior. (line 6) * GDB/MI development: GDB/MI Development and Front Ends. (line 6) * GDB/MI General Design: GDB/MI General Design. (line 6) * GDB/MI, async records: GDB/MI Async Records. (line 6) * GDB/MI, breakpoint commands: GDB/MI Breakpoint Commands. (line 6) * GDB/MI, compatibility with CLI: GDB/MI Compatibility with CLI. (line 6) * GDB/MI, data manipulation: GDB/MI Data Manipulation. (line 6) * GDB/MI, input syntax: GDB/MI Input Syntax. (line 6) * GDB/MI, its purpose: GDB/MI. (line 9) * GDB/MI, output syntax: GDB/MI Output Syntax. (line 6) * GDB/MI, result records: GDB/MI Result Records. (line 6) * GDB/MI, simple examples: GDB/MI Simple Examples. (line 6) * GDB/MI, stream records: GDB/MI Stream Records. (line 6) * gdbarch debugging info: Debugging Output. (line 26) * GDBHISTFILE, environment variable: Command History. (line 26) * gdbserver, command-line arguments: Server. (line 34) * gdbserver, multiple processes: Server. (line 106) * gdbserver, search path for libthread_db: Server. (line 238) * GDT: DJGPP Native. (line 24) * get thread information block address: General Query Packets. (line 177) * get thread-local storage address, remote request: General Query Packets. (line 146) * gettimeofday, file-i/o system call: gettimeofday. (line 6) * global debugging information directories: Separate Debug Files. (line 6) * GNU C++: C. (line 10) * GNU Emacs: Emacs. (line 6) * GNU Hurd debugging: Hurd Native. (line 6) * GNU/Hurd debug messages: Debugging Output. (line 106) * GNU/Linux LWP debug messages: Debugging Output. (line 127) * Go (programming language): Go. (line 6) * H packet: Packets. (line 197) * handling signals: Signals. (line 27) * hardware breakpoints: Set Breaks. (line 62) * hardware debug registers: Maintenance Commands. (line 323) * hardware watchpoints: Set Watchpoints. (line 31) * hash mark while downloading: Target Commands. (line 99) * heuristic-fence-post (Alpha, MIPS): MIPS. (line 14) * history events: Event Designators. (line 8) * history expansion: History Interaction. (line 6) * history expansion, turn on/off: Command History. (line 53) * history file: Command History. (line 26) * history number: Value History. (line 13) * history of values printed by GDB: Value History. (line 6) * history size: Command History. (line 45) * history substitution: Command History. (line 26) * HISTSIZE, environment variable: Command History. (line 45) * hooks, for commands: Hooks. (line 6) * hooks, post-command: Hooks. (line 11) * hooks, pre-command: Hooks. (line 6) * host character set: Character Sets. (line 6) * Host I/O, remote protocol: Host I/O Packets. (line 6) * how many arguments (user-defined commands): Define. (line 25) * HPPA support: HPPA. (line 6) * I packet: Packets. (line 217) * i packet: Packets. (line 212) * i/o: Input/Output. (line 6) * I/O registers (Atmel AVR): AVR. (line 10) * i386: Remote Stub. (line 57) * i386-stub.c: Remote Stub. (line 57) * IDT: DJGPP Native. (line 24) * ignore count (of breakpoint): Conditions. (line 79) * in-process agent protocol: In-Process Agent Protocol. (line 6) * incomplete type: Symbols. (line 207) * indentation in structure display: Print Settings. (line 315) * index files: Index Files. (line 6) * index section format: Index Section Format. (line 6) * inferior: Inferiors and Programs. (line 13) * inferior debugging info: Debugging Output. (line 112) * inferior events in Python: Events In Python. (line 6) * inferior functions, calling: Calling. (line 6) * inferior tty: Input/Output. (line 44) * inferiors in Python: Inferiors In Python. (line 6) * infinite recursion in user-defined commands: Define. (line 78) * info for known .debug_gdb_scripts-loaded scripts: Maintenance Commands. (line 232) * info for known object files: Maintenance Commands. (line 227) * info proc cmdline: SVR4 Process Information. (line 35) * info proc cwd: SVR4 Process Information. (line 39) * info proc exe: SVR4 Process Information. (line 43) * information about static tracepoint markers: Listing Static Tracepoint Markers. (line 6) * information about tracepoints: Listing Tracepoints. (line 6) * inheritance: Debugging C Plus Plus. (line 25) * init file: Startup. (line 11) * init file name: Startup. (line 66) * initial frame: Frames. (line 12) * initialization file, readline: Readline Init File. (line 6) * inline functions, debugging: Inline Functions. (line 6) * innermost frame: Frames. (line 12) * input syntax for GDB/MI: GDB/MI Input Syntax. (line 6) * installation: Installing GDB. (line 6) * instructions, assembly: Machine Code. (line 36) * integral datatypes, in file-i/o protocol: Integral Datatypes. (line 6) * Intel: Remote Stub. (line 57) * Intel disassembly flavor: Machine Code. (line 132) * interaction, readline: Readline Interaction. (line 6) * internal commands: Maintenance Commands. (line 6) * internal errors, control of GDB behavior: Maintenance Commands. (line 136) * internal GDB breakpoints: Set Breaks. (line 383) * interrupt: Quitting GDB. (line 13) * interrupt debuggee on MS-Windows: Cygwin Native. (line 9) * interrupt remote programs: Remote Configuration. (line 29) * interrupting remote programs: Connecting. (line 78) * interrupting remote targets: Bootstrapping. (line 25) * interrupts (remote protocol): Interrupts. (line 6) * invalid input: Bug Criteria. (line 16) * invoke another interpreter: Interpreters. (line 37) * ipa protocol commands: IPA Protocol Commands. (line 6) * ipa protocol objects: IPA Protocol Objects. (line 6) * isatty, file-i/o system call: isatty. (line 6) * JIT compilation interface: JIT Interface. (line 6) * JIT debug info reader: Custom Debug Info. (line 6) * just-in-time compilation: JIT Interface. (line 6) * just-in-time compilation, debugging messages: Debugging Output. (line 121) * k packet: Packets. (line 221) * kernel crash dump: BSD libkvm Interface. (line 6) * kernel memory image: BSD libkvm Interface. (line 6) * kill ring: Readline Killing Commands. (line 19) * killing text: Readline Killing Commands. (line 6) * languages: Languages. (line 6) * last tracepoint number: Create and Delete Tracepoints. (line 123) * latest breakpoint: Set Breaks. (line 6) * lazy strings in python: Lazy Strings In Python. (line 6) * LDT: DJGPP Native. (line 24) * leaving GDB: Quitting GDB. (line 6) * libkvm: BSD libkvm Interface. (line 6) * library list format, remote protocol <1>: Library List Format for SVR4 Targets. (line 6) * library list format, remote protocol: Library List Format. (line 6) * limit hardware breakpoints and watchpoints: Remote Configuration. (line 72) * limit hardware watchpoints length: Remote Configuration. (line 77) * limit on number of printed array elements: Print Settings. (line 139) * limits, in file-i/o protocol: Limits. (line 6) * linespec: Specify Location. (line 6) * Linux lightweight processes: Debugging Output. (line 127) * list active threads, remote request: General Query Packets. (line 118) * list of supported file-i/o calls: List of Supported Calls. (line 6) * list output in GDB/MI: GDB/MI Output Syntax. (line 117) * list, how many lines to display: List. (line 30) * listing GDB's internal symbol tables: Symbols. (line 367) * listing machine instructions: Machine Code. (line 36) * listing mapped overlays: Overlay Commands. (line 60) * load address, overlay's: How Overlays Work. (line 6) * load shared library: Files. (line 323) * load symbols from memory: Files. (line 162) * local variables: Symbols. (line 251) * locate address: Output Formats. (line 35) * lock scheduler: All-Stop Mode. (line 37) * log output in GDB/MI: GDB/MI Output Syntax. (line 113) * logging file name: Logging Output. (line 13) * logging GDB output: Logging Output. (line 6) * lseek flags, in file-i/o protocol: Lseek Flags. (line 6) * lseek, file-i/o system call: lseek. (line 6) * M packet: Packets. (line 248) * m packet: Packets. (line 228) * M32-EVA target board address: M32R/D. (line 21) * M32R/Chaos debugging: M32R/D. (line 50) * m680x0: Remote Stub. (line 60) * m68k-stub.c: Remote Stub. (line 60) * Mach-O symbols processing: Debugging Output. (line 134) * machine instructions: Machine Code. (line 36) * macro definition, showing: Macros. (line 47) * macro expansion, showing the results of preprocessor: Macros. (line 29) * macros, example of debugging with: Macros. (line 83) * macros, from debug info: Macros. (line 47) * macros, user-defined: Macros. (line 59) * mailing lists: GDB/MI Development and Front Ends. (line 35) * maintenance commands: Maintenance Commands. (line 6) * manual overlay debugging: Overlay Commands. (line 23) * map an overlay: Overlay Commands. (line 30) * mapinfo list, QNX Neutrino: SVR4 Process Information. (line 93) * mapped address: How Overlays Work. (line 6) * mapped overlays: How Overlays Work. (line 6) * markers, static tracepoints: Set Tracepoints. (line 28) * maximum value for offset of closest symbol: Print Settings. (line 70) * member functions: C Plus Plus Expressions. (line 16) * memory address space mappings: SVR4 Process Information. (line 47) * memory map format: Memory Map Format. (line 6) * memory region attributes: Memory Region Attributes. (line 6) * memory tracing: Breakpoints. (line 20) * memory transfer, in file-i/o protocol: Memory Transfer. (line 6) * memory used by commands: Maintenance Commands. (line 337) * memory used for symbol tables: Files. (line 311) * memory, alignment and size of remote accesses: Packets. (line 235) * memory, viewing as typed object: Expressions. (line 43) * mi interpreter: Interpreters. (line 26) * mi1 interpreter: Interpreters. (line 34) * mi2 interpreter: Interpreters. (line 31) * minimal language: Unsupported Languages. (line 6) * Minimal symbols and DLLs: Non-debug DLL Symbols. (line 6) * MIPS addresses, masking: MIPS. (line 86) * MIPS boards: MIPS Embedded. (line 6) * MIPS remote floating point: MIPS Embedded. (line 60) * MIPS stack: MIPS. (line 6) * miscellaneous settings: Other Misc Settings. (line 6) * MMX registers (x86): Registers. (line 71) * mode_t values, in file-i/o protocol: mode_t Values. (line 6) * Modula-2: Summary. (line 29) * Modula-2 built-ins: Built-In Func/Proc. (line 6) * Modula-2 checks: M2 Checks. (line 6) * Modula-2 constants: Built-In Func/Proc. (line 112) * Modula-2 defaults: M2 Defaults. (line 6) * Modula-2 operators: M2 Operators. (line 6) * Modula-2 types: M2 Types. (line 6) * Modula-2, deviations from: Deviations. (line 6) * Modula-2, GDB support: Modula-2. (line 6) * monitor commands, for gdbserver: Server. (line 221) * Motorola 680x0: Remote Stub. (line 60) * MS Windows debugging: Cygwin Native. (line 6) * MS-DOS system info: DJGPP Native. (line 19) * MS-DOS-specific commands: DJGPP Native. (line 6) * multiple locations, breakpoints: Set Breaks. (line 201) * multiple processes: Forks. (line 6) * multiple processes with gdbserver: Server. (line 106) * multiple targets: Active Targets. (line 6) * multiple threads: Threads. (line 6) * multiple threads, backtrace: Backtrace. (line 37) * multiple-symbols menu: Ambiguous Expressions. (line 51) * multiprocess extensions, in remote protocol: General Query Packets. (line 626) * name a thread: Threads. (line 131) * names of symbols: Symbols. (line 14) * namespace in C++: C Plus Plus Expressions. (line 20) * native Cygwin debugging: Cygwin Native. (line 6) * native DJGPP debugging: DJGPP Native. (line 6) * negative breakpoint numbers: Set Breaks. (line 383) * NetROM ROM emulator target: Target Commands. (line 88) * New SYSTAG message: Threads. (line 51) * Newlib OS ABI and its influence on the longjmp handling: ABI. (line 11) * non-member C++ functions, set breakpoint in: Set Breaks. (line 108) * non-stop mode: Non-Stop Mode. (line 6) * non-stop mode, and breakpoint always-inserted: Set Breaks. (line 339) * non-stop mode, and process record and replay: Process Record and Replay. (line 68) * non-stop mode, and set displaced-stepping: Maintenance Commands. (line 85) * non-stop mode, remote request: General Query Packets. (line 253) * noninvasive task options: Hurd Native. (line 73) * notation, readline: Readline Bare Essentials. (line 6) * notational conventions, for GDB/MI: GDB/MI. (line 25) * notification packets: Notification Packets. (line 6) * notify output in GDB/MI: GDB/MI Output Syntax. (line 102) * NULL elements in arrays: Print Settings. (line 306) * number of array elements to print: Print Settings. (line 139) * number representation: Numbers. (line 6) * numbers for breakpoints: Breakpoints. (line 41) * object files, relocatable, reading symbols from: Files. (line 132) * Objective-C: Objective-C. (line 6) * Objective-C, classes and selectors: Symbols. (line 318) * Objective-C, print objects: The Print Command with Objective-C. (line 6) * OBJFILE-gdb.py: objfile-gdb.py file. (line 6) * objfiles in python: Objfiles In Python. (line 6) * observer debugging info: Debugging Output. (line 150) * octal escapes in strings: Print Settings. (line 339) * online documentation: Help. (line 6) * opaque data types: Symbols. (line 330) * open flags, in file-i/o protocol: Open Flags. (line 6) * open, file-i/o system call: open. (line 6) * OpenCL C: OpenCL C. (line 6) * OpenCL C Datatypes: OpenCL C Datatypes. (line 6) * OpenCL C Expressions: OpenCL C Expressions. (line 6) * OpenCL C Operators: OpenCL C Operators. (line 6) * OpenRISC 1000: OpenRISC 1000. (line 6) * OpenRISC 1000 htrace: OpenRISC 1000. (line 58) * operating system information: Operating System Information. (line 6) * operating system information, process list: Process list. (line 6) * optimized code, debugging: Optimized Code. (line 6) * optimized code, wrong values of variables: Variables. (line 94) * optimized out value in Python: Values From Inferior. (line 49) * optimized out, in backtrace: Backtrace. (line 71) * optional debugging messages: Debugging Output. (line 6) * optional warnings: Messages/Warnings. (line 6) * or1k boards: OpenRISC 1000. (line 6) * OS ABI: ABI. (line 11) * OS information: OS Information. (line 6) * out-of-line single-stepping: Maintenance Commands. (line 68) * outermost frame: Frames. (line 12) * output formats: Output Formats. (line 6) * output syntax of GDB/MI: GDB/MI Output Syntax. (line 6) * overlay area: How Overlays Work. (line 6) * overlay example program: Overlay Sample Program. (line 6) * overlays: Overlays. (line 6) * overlays, setting breakpoints in: Overlay Commands. (line 93) * overloaded functions, calling: C Plus Plus Expressions. (line 26) * overloaded functions, overload resolution: Debugging C Plus Plus. (line 54) * overloading in C++: Debugging C Plus Plus. (line 15) * P packet: Packets. (line 276) * p packet: Packets. (line 261) * packet acknowledgment, for GDB remote: Packet Acknowledgment. (line 6) * packet size, remote protocol: General Query Packets. (line 541) * packets, notification: Notification Packets. (line 6) * packets, reporting on stdout: Debugging Output. (line 172) * packets, tracepoint: Tracepoint Packets. (line 6) * page tables display (MS-DOS): DJGPP Native. (line 56) * parameters in python: Parameters In Python. (line 6) * partial symbol dump: Symbols. (line 348) * partial symbol tables, listing GDB's internal: Symbols. (line 367) * Pascal: Summary. (line 35) * Pascal objects, static members display: Print Settings. (line 475) * Pascal support in GDB, limitations: Pascal. (line 6) * pass signals to inferior, remote request: General Query Packets. (line 273) * patching binaries: Patching. (line 6) * patching object files: Files. (line 26) * pause current task (GNU Hurd): Hurd Native. (line 49) * pause current thread (GNU Hurd): Hurd Native. (line 91) * pauses in output: Screen Size. (line 6) * pending breakpoints: Set Breaks. (line 245) * physical address from linear address: DJGPP Native. (line 81) * physname: Debugging Output. (line 43) * pipe, target remote to: Connecting. (line 60) * pipes: Starting. (line 62) * pointer values, in file-i/o protocol: Pointer Values. (line 6) * pointer, finding referent: Print Settings. (line 79) * port rights, GNU Hurd: Hurd Native. (line 85) * port sets, GNU Hurd: Hurd Native. (line 85) * PowerPC architecture: PowerPC. (line 6) * prefix for data files: Data Files. (line 6) * prefix for shared library file names: Files. (line 379) * premature return from system calls: Interrupted System Calls. (line 6) * preprocessor macro expansion, showing the results of: Macros. (line 29) * pretty print arrays: Print Settings. (line 114) * pretty print C++ virtual function tables: Print Settings. (line 486) * pretty-printer commands: Pretty-Printer Commands. (line 6) * print all frame argument values: Print Settings. (line 151) * print an Objective-C object description: The Print Command with Objective-C. (line 11) * print array indexes: Print Settings. (line 124) * print frame argument values for scalars only: Print Settings. (line 151) * print list of auto-loaded canned sequences of commands scripts: objfile-gdb.gdb file. (line 24) * print list of auto-loaded Python scripts: Python Auto-loading. (line 24) * print messages on inferior start and exit: Inferiors and Programs. (line 117) * print messages on thread start and exit: Threads. (line 156) * print settings: Print Settings. (line 6) * print structures in indented form: Print Settings. (line 315) * print/don't print memory addresses: Print Settings. (line 13) * printing byte arrays: Output Formats. (line 60) * printing data: Data. (line 6) * printing frame argument values: Print Settings. (line 151) * printing strings: Output Formats. (line 60) * probe static tracepoint marker: Create and Delete Tracepoints. (line 76) * probing markers, static tracepoints: Set Tracepoints. (line 28) * process detailed status information: SVR4 Process Information. (line 55) * process ID: SVR4 Process Information. (line 19) * process info via /proc: SVR4 Process Information. (line 6) * process list, QNX Neutrino: SVR4 Process Information. (line 89) * process record and replay: Process Record and Replay. (line 6) * process status register: Registers. (line 26) * processes, multiple: Forks. (line 6) * procfs API calls: SVR4 Process Information. (line 68) * profiling GDB: Maintenance Commands. (line 307) * program counter register: Registers. (line 26) * program entry point: Backtrace. (line 93) * programming in python: Python API. (line 6) * progspaces in python: Progspaces In Python. (line 6) * prompt: Prompt. (line 6) * protocol basics, file-i/o: Protocol Basics. (line 6) * protocol, GDB remote serial: Overview. (line 14) * protocol-specific representation of datatypes, in file-i/o protocol: Protocol-specific Representation of Datatypes. (line 6) * python api: Python API. (line 6) * Python architectures: Architectures In Python. (line 6) * Python auto-loading: Python Auto-loading. (line 6) * python commands <1>: Commands In Python. (line 6) * python commands: Python Commands. (line 6) * python convenience functions: Functions In Python. (line 6) * python directory: Python. (line 10) * python exceptions: Exception Handling. (line 6) * python finish breakpoints: Finish Breakpoints in Python. (line 6) * python functions: Basic Python. (line 6) * python module: Basic Python. (line 6) * python modules: Python modules. (line 6) * python pagination: Python API. (line 6) * python parameters: Parameters In Python. (line 6) * python scripting: Python. (line 6) * python stdout: Python API. (line 6) * Python, working with types: Types In Python. (line 6) * python, working with values from inferior: Values From Inferior. (line 6) * Q packet: Packets. (line 289) * q packet: Packets. (line 289) * QAllow packet: General Query Packets. (line 46) * qAttached packet: General Query Packets. (line 1022) * qC packet: General Query Packets. (line 57) * qCRC packet: General Query Packets. (line 68) * QDisableRandomization packet: General Query Packets. (line 88) * qfThreadInfo packet: General Query Packets. (line 118) * qGetTIBAddr packet: General Query Packets. (line 177) * qGetTLSAddr packet: General Query Packets. (line 146) * QNonStop packet: General Query Packets. (line 253) * qOffsets packet: General Query Packets. (line 216) * qP packet: General Query Packets. (line 243) * QPassSignals packet: General Query Packets. (line 273) * QProgramSignals packet: General Query Packets. (line 301) * qRcmd packet: General Query Packets. (line 339) * qSearch memory packet: General Query Packets. (line 364) * QStartNoAckMode packet: General Query Packets. (line 384) * qsThreadInfo packet: General Query Packets. (line 118) * qSupported packet: General Query Packets. (line 399) * qSymbol packet: General Query Packets. (line 708) * qTBuffer packet: Tracepoint Packets. (line 406) * QTBuffer size packet: Tracepoint Packets. (line 419) * QTDisable packet: Tracepoint Packets. (line 215) * QTDisconnected packet: Tracepoint Packets. (line 234) * QTDP packet: Tracepoint Packets. (line 10) * QTDPsrc packet: Tracepoint Packets. (line 96) * QTDV packet: Tracepoint Packets. (line 127) * QTEnable packet: Tracepoint Packets. (line 210) * qTfP packet: Tracepoint Packets. (line 345) * QTFrame packet: Tracepoint Packets. (line 135) * qTfSTM packet: Tracepoint Packets. (line 362) * qTfV packet: Tracepoint Packets. (line 353) * qThreadExtraInfo packet: General Query Packets. (line 752) * QTinit packet: Tracepoint Packets. (line 220) * qTMinFTPILen packet: Tracepoint Packets. (line 174) * QTNotes packet: Tracepoint Packets. (line 424) * qTP packet: Tracepoint Packets. (line 316) * QTro packet: Tracepoint Packets. (line 223) * QTSave packet: Tracepoint Packets. (line 400) * qTsP packet: Tracepoint Packets. (line 346) * qTsSTM packet: Tracepoint Packets. (line 362) * QTStart packet: Tracepoint Packets. (line 201) * qTStatus packet: Tracepoint Packets. (line 240) * qTSTMat packet: Tracepoint Packets. (line 394) * QTStop packet: Tracepoint Packets. (line 207) * qTsV packet: Tracepoint Packets. (line 354) * qTV packet: Tracepoint Packets. (line 328) * query attached, remote request: General Query Packets. (line 1022) * quotes in commands: Completion. (line 57) * quoting Ada internal identifiers: Additions to Ada. (line 76) * quoting names: Symbols. (line 14) * qXfer packet: General Query Packets. (line 790) * R packet: Packets. (line 298) * r packet: Packets. (line 293) * raise exceptions: Set Catchpoints. (line 228) * range checking: Type Checking. (line 45) * ranged breakpoint: PowerPC Embedded. (line 33) * ranges of breakpoints: Breakpoints. (line 48) * Ravenscar Profile: Ravenscar Profile. (line 6) * raw printing: Output Formats. (line 70) * RDI heartbeat: ARM. (line 112) * read special object, remote request: General Query Packets. (line 790) * read, file-i/o system call: read. (line 6) * read-only sections: Files. (line 258) * reading symbols from relocatable object files: Files. (line 132) * reading symbols immediately: Files. (line 90) * readline: Editing. (line 6) * receive rights, GNU Hurd: Hurd Native. (line 85) * recent tracepoint number: Create and Delete Tracepoints. (line 123) * record aggregates (Ada): Omissions from Ada. (line 44) * record mode: Process Record and Replay. (line 19) * record serial communications on file: Remote Configuration. (line 57) * recording a session script: Bug Reporting. (line 104) * recording inferior's execution and replaying it: Process Record and Replay. (line 6) * redirection: Input/Output. (line 6) * reference card: Formatting Documentation. (line 6) * reference declarations: C Plus Plus Expressions. (line 50) * register packet format, MIPS: MIPS Register packet Format. (line 6) * registers: Registers. (line 6) * regular expression: Set Breaks. (line 92) * reloading the overlay table: Overlay Commands. (line 52) * relocatable object files, reading symbols from: Files. (line 132) * remote async notification debugging info: Debugging Output. (line 142) * remote connection without stubs: Server. (line 6) * remote debugging: Remote Debugging. (line 6) * remote memory comparison: Memory. (line 123) * remote monitor prompt: MIPS Embedded. (line 107) * remote packets, enabling and disabling: Remote Configuration. (line 141) * remote programs, interrupting: Connecting. (line 78) * remote protocol debugging: Debugging Output. (line 172) * remote protocol, binary data: Overview. (line 61) * remote protocol, field separator: Overview. (line 53) * remote query requests: General Query Packets. (line 6) * remote serial debugging summary: Debug Session. (line 6) * remote serial debugging, overview: Remote Stub. (line 14) * remote serial protocol: Overview. (line 14) * remote serial stub: Stub Contents. (line 6) * remote serial stub list: Remote Stub. (line 54) * remote serial stub, initialization: Stub Contents. (line 10) * remote serial stub, main routine: Stub Contents. (line 15) * remote stub, example: Remote Stub. (line 6) * remote stub, support routines: Bootstrapping. (line 6) * remote target: Target Commands. (line 58) * remote target, file transfer: File Transfer. (line 6) * remote target, limit break- and watchpoints: Remote Configuration. (line 72) * remote target, limit watchpoints length: Remote Configuration. (line 77) * remote timeout: Remote Configuration. (line 65) * remove actions from a tracepoint: Tracepoint Actions. (line 21) * rename, file-i/o system call: rename. (line 6) * Renesas: Remote Stub. (line 63) * repeated array elements: Print Settings. (line 293) * repeating command sequences: Command Syntax. (line 42) * repeating commands: Command Syntax. (line 21) * replay log events, remote reply: Stop Reply Packets. (line 61) * replay mode: Process Record and Replay. (line 10) * reporting bugs in GDB: GDB Bugs. (line 6) * reprint the last value: Data. (line 23) * reset SDI connection, M32R: M32R/D. (line 44) * response time, MIPS debugging: MIPS. (line 10) * restart: Checkpoint/Restart. (line 6) * restore data from a file: Dump/Restore Files. (line 6) * restrictions on Go expressions: Go. (line 35) * result records in GDB/MI: GDB/MI Result Records. (line 6) * resume threads of multiple processes simultaneously: All-Stop Mode. (line 53) * resuming execution: Continuing and Stepping. (line 6) * retransmit-timeout, MIPS protocol: MIPS Embedded. (line 83) * returning from a function: Returning. (line 6) * reverse execution: Reverse Execution. (line 6) * rewind program state: Checkpoint/Restart. (line 6) * ROM at zero address, RDI: ARM. (line 102) * run to main procedure: Starting. (line 79) * run until specified location: Continuing and Stepping. (line 118) * running: Starting. (line 6) * running and debugging Sparclet programs: Sparclet Execution. (line 6) * running programs backward: Reverse Execution. (line 6) * running VxWorks tasks: VxWorks Attach. (line 6) * running, on Sparclet: Sparclet. (line 28) * S packet: Packets. (line 314) * s packet: Packets. (line 305) * save breakpoints to a file for future sessions: Save Breakpoints. (line 9) * save command history: Command History. (line 36) * save GDB output to a file: Logging Output. (line 6) * save tracepoints for future sessions: save tracepoints. (line 6) * scheduler locking mode: All-Stop Mode. (line 37) * scope: M2 Scope. (line 6) * scripting commands: Command Files. (line 6) * scripting with python: Python. (line 6) * SDS protocol: PowerPC Embedded. (line 83) * search for a thread: Threads. (line 142) * search path for libthread_db: Threads. (line 177) * searching memory: Searching Memory. (line 6) * searching memory, in remote debugging: General Query Packets. (line 364) * searching source files: Search. (line 6) * section offsets, remote request: General Query Packets. (line 216) * segment descriptor tables: DJGPP Native. (line 24) * select Ctrl-C, BREAK or BREAK-g: Remote Configuration. (line 94) * select trace snapshot: tfind. (line 6) * selected frame: Stack. (line 19) * selecting frame silently: Frames. (line 51) * semaphores on static probe points: Static Probe Points. (line 19) * send command to remote monitor: Connecting. (line 105) * send command to simulator: Embedded Processors. (line 9) * send interrupt-sequence on start: Remote Configuration. (line 107) * send PMON command: MIPS Embedded. (line 132) * send rights, GNU Hurd: Hurd Native. (line 85) * sending files to remote systems: File Transfer. (line 6) * separate debug sections: MiniDebugInfo. (line 6) * separate debugging information files: Separate Debug Files. (line 6) * sequence-id, for GDB remote: Overview. (line 29) * serial connections, debugging: Debugging Output. (line 172) * serial line, target remote: Connecting. (line 18) * serial protocol, GDB remote: Overview. (line 14) * server prefix: Server Prefix. (line 6) * server, command prefix: Command History. (line 20) * set ABI for MIPS: MIPS. (line 32) * set breakpoints in many functions: Set Breaks. (line 92) * set breakpoints on all functions: Set Breaks. (line 112) * set fast tracepoint: Create and Delete Tracepoints. (line 51) * set inferior controlling terminal: Input/Output. (line 44) * set static tracepoint: Create and Delete Tracepoints. (line 76) * set tdesc filename: Retrieving Descriptions. (line 18) * set tracepoint: Create and Delete Tracepoints. (line 6) * setting variables: Assignment. (line 6) * setting watchpoints: Set Watchpoints. (line 6) * SH: Remote Stub. (line 63) * sh-stub.c: Remote Stub. (line 63) * shared libraries: Files. (line 281) * shared library events, remote reply: Stop Reply Packets. (line 56) * shell escape: Shell Commands. (line 10) * show all convenience functions: Convenience Funs. (line 35) * show all user variables and functions: Convenience Vars. (line 37) * show last commands: Command History. (line 78) * show tdesc filename: Retrieving Descriptions. (line 25) * signals: Signals. (line 6) * signals the inferior may see, remote request: General Query Packets. (line 301) * SIGQUIT signal, dump core of GDB: Maintenance Commands. (line 111) * simulator, Z8000: Z8000. (line 6) * size of remote memory accesses: Packets. (line 235) * size of screen: Screen Size. (line 6) * skipping over functions and files: Skipping Over Functions and Files. (line 6) * snapshot of a process: Checkpoint/Restart. (line 6) * software watchpoints: Set Watchpoints. (line 31) * source file and line of a symbol: Print Settings. (line 51) * source line and its code address: Machine Code. (line 6) * source path: Source Path. (line 6) * Sparc: Remote Stub. (line 66) * sparc-stub.c: Remote Stub. (line 66) * sparcl-stub.c: Remote Stub. (line 69) * Sparclet: Sparclet. (line 6) * SparcLite: Remote Stub. (line 69) * Special Fortran commands: Special Fortran Commands. (line 6) * specifying location: Specify Location. (line 6) * SPU: SPU. (line 6) * SSE registers (x86): Registers. (line 71) * stack frame: Frames. (line 6) * stack on Alpha: MIPS. (line 6) * stack on MIPS: MIPS. (line 6) * stack pointer register: Registers. (line 26) * stacking targets: Active Targets. (line 6) * standard registers: Registers. (line 26) * start a new trace experiment: Starting and Stopping Trace Experiments. (line 6) * starting: Starting. (line 6) * startup code, and backtrace: Backtrace. (line 93) * stat, file-i/o system call: stat/fstat. (line 6) * static members of C++ objects: Print Settings. (line 464) * static members of Pascal objects: Print Settings. (line 475) * static probe point, SystemTap: Static Probe Points. (line 6) * static tracepoints: Set Tracepoints. (line 28) * static tracepoints, in remote protocol: General Query Packets. (line 675) * static tracepoints, setting: Create and Delete Tracepoints. (line 76) * status of trace data collection: Starting and Stopping Trace Experiments. (line 27) * status output in GDB/MI: GDB/MI Output Syntax. (line 94) * stepping: Continuing and Stepping. (line 6) * stepping into functions with no line info: Continuing and Stepping. (line 93) * stop a running trace experiment: Starting and Stopping Trace Experiments. (line 16) * stop on C++ exceptions: Set Catchpoints. (line 13) * stop reply packets: Stop Reply Packets. (line 6) * stopped threads: Thread Stops. (line 6) * stream records in GDB/MI: GDB/MI Stream Records. (line 6) * string tracing, in remote protocol: General Query Packets. (line 692) * struct gdb_reader_funcs: Writing JIT Debug Info Readers. (line 22) * struct gdb_symbol_callbacks: Writing JIT Debug Info Readers. (line 43) * struct gdb_unwind_callbacks: Writing JIT Debug Info Readers. (line 43) * struct return convention: i386. (line 7) * struct stat, in file-i/o protocol: struct stat. (line 6) * struct timeval, in file-i/o protocol: struct timeval. (line 6) * struct/union returned in registers: i386. (line 7) * structure field name completion: Completion. (line 96) * stub example, remote debugging: Remote Stub. (line 6) * stupid questions: Messages/Warnings. (line 50) * Super-H: Super-H. (line 6) * supported packets, remote query: General Query Packets. (line 399) * switching threads: Threads. (line 6) * switching threads automatically: All-Stop Mode. (line 28) * symbol decoding style, C++: Print Settings. (line 413) * symbol dump: Symbols. (line 348) * symbol from address: Symbols. (line 84) * symbol lookup, remote request: General Query Packets. (line 708) * symbol names: Symbols. (line 14) * symbol table: Files. (line 6) * symbol table creation: Debugging Output. (line 197) * symbol tables in python: Symbol Tables In Python. (line 6) * symbol tables, listing GDB's internal: Symbols. (line 367) * symbol, source file and line: Print Settings. (line 51) * symbols in python: Symbols In Python. (line 6) * symbols, reading from relocatable object files: Files. (line 132) * symbols, reading immediately: Files. (line 90) * synchronize with remote MIPS target: MIPS Embedded. (line 98) * syscall DSO: Files. (line 162) * system calls and thread breakpoints: Interrupted System Calls. (line 6) * system root, alternate: Files. (line 379) * system, file-i/o system call: system. (line 6) * system-wide init file: System-wide configuration. (line 6) * T packet: Packets. (line 329) * t packet: Packets. (line 324) * T packet reply: Stop Reply Packets. (line 22) * tail call frames, debugging: Tail Call Frames. (line 6) * target architecture: Targets. (line 17) * target byte order: Byte Order. (line 6) * target character set: Character Sets. (line 6) * target debugging info: Debugging Output. (line 204) * target descriptions: Target Descriptions. (line 6) * target descriptions, AArch64 features: AArch64 Features. (line 6) * target descriptions, ARM features: ARM Features. (line 6) * target descriptions, i386 features: i386 Features. (line 6) * target descriptions, inclusion: Target Description Format. (line 54) * target descriptions, M68K features: M68K Features. (line 6) * target descriptions, MIPS features: MIPS Features. (line 6) * target descriptions, PowerPC features: PowerPC Features. (line 6) * target descriptions, predefined types: Predefined Target Types. (line 6) * target descriptions, standard features: Standard Target Features. (line 6) * target descriptions, TIC6x features: TIC6x Features. (line 6) * target descriptions, TMS320C6x features: TIC6x Features. (line 6) * target descriptions, XML format: Target Description Format. (line 6) * target output in GDB/MI: GDB/MI Output Syntax. (line 110) * target remote: Connecting. (line 11) * target stack description: Maintenance Commands. (line 252) * task attributes (GNU Hurd): Hurd Native. (line 49) * task breakpoints, in Ada: Ada Tasks. (line 135) * task exception port, GNU Hurd: Hurd Native. (line 68) * task suspend count: Hurd Native. (line 60) * task switching with program using Ravenscar Profile: Ravenscar Profile. (line 10) * TCP port, target remote: Connecting. (line 29) * terminal: Input/Output. (line 6) * Text User Interface: TUI. (line 6) * thread attributes info, remote request: General Query Packets. (line 752) * thread breakpoints: Thread-Specific Breakpoints. (line 10) * thread breakpoints and system calls: Interrupted System Calls. (line 6) * thread default settings, GNU Hurd: Hurd Native. (line 131) * thread identifier (GDB): Threads. (line 63) * thread identifier (system): Threads. (line 51) * thread info (Solaris): Threads. (line 98) * thread information, remote request: General Query Packets. (line 243) * thread list format: Thread List Format. (line 6) * thread number: Threads. (line 63) * thread properties, GNU Hurd: Hurd Native. (line 91) * thread suspend count, GNU Hurd: Hurd Native. (line 110) * THREAD-ID, in remote protocol: Packets. (line 20) * threads and watchpoints: Set Watchpoints. (line 180) * threads in python: Threads In Python. (line 6) * threads of execution: Threads. (line 6) * threads, automatic switching: All-Stop Mode. (line 28) * threads, continuing: Thread Stops. (line 6) * threads, stopped: Thread Stops. (line 6) * time of command execution: Maintenance Commands. (line 344) * timeout for commands: Maintenance Commands. (line 375) * timeout for serial communications: Remote Configuration. (line 65) * timeout, for remote target connection: Remote Configuration. (line 132) * timeout, MIPS protocol: MIPS Embedded. (line 83) * timestampping debugging info: Debugging Output. (line 215) * trace experiment, status of: Starting and Stopping Trace Experiments. (line 27) * trace file format: Trace File Format. (line 6) * trace files: Trace Files. (line 6) * trace state variable value, remote request: Tracepoint Packets. (line 328) * trace state variables: Trace State Variables. (line 6) * traceback: Backtrace. (line 6) * traceframe info format: Traceframe Info Format. (line 6) * tracepoint actions: Tracepoint Actions. (line 6) * tracepoint conditions: Tracepoint Conditions. (line 6) * tracepoint data, display: tdump. (line 6) * tracepoint deletion: Create and Delete Tracepoints. (line 126) * tracepoint number: Create and Delete Tracepoints. (line 123) * tracepoint packets: Tracepoint Packets. (line 6) * tracepoint pass count: Tracepoint Passcounts. (line 6) * tracepoint restrictions: Tracepoint Restrictions. (line 6) * tracepoint status, remote request: Tracepoint Packets. (line 316) * tracepoint variables: Tracepoint Variables. (line 6) * tracepoints: Tracepoints. (line 6) * tracepoints support in gdbserver: Server. (line 257) * trailing underscore, in Fortran symbols: Fortran. (line 9) * translating between character sets: Character Sets. (line 6) * TUI: TUI. (line 6) * TUI commands: TUI Commands. (line 6) * TUI configuration variables: TUI Configuration. (line 6) * TUI key bindings: TUI Keys. (line 6) * TUI single key mode: TUI Single Key Mode. (line 6) * type casting memory: Expressions. (line 43) * type chain of a data type: Maintenance Commands. (line 264) * type checking: Checks. (line 24) * type conversions in C++: C Plus Plus Expressions. (line 26) * type printer: Type Printing API. (line 9) * type printing API for Python: Type Printing API. (line 6) * types in Python: Types In Python. (line 6) * UDP port, target remote: Connecting. (line 49) * union field name completion: Completion. (line 96) * unions in structures, printing: Print Settings. (line 353) * unknown address, locating: Output Formats. (line 35) * unlink, file-i/o system call: unlink. (line 6) * unlinked object files: Files. (line 26) * unload symbols from shared libraries: Files. (line 341) * unmap an overlay: Overlay Commands. (line 39) * unmapped overlays: How Overlays Work. (line 6) * unset tdesc filename: Retrieving Descriptions. (line 21) * unsupported languages: Unsupported Languages. (line 6) * unwind stack in called functions: Calling. (line 35) * unwind stack in called functions with unhandled exceptions: Calling. (line 46) * use only software watchpoints: Set Watchpoints. (line 108) * user-defined command: Define. (line 6) * user-defined macros: Macros. (line 59) * user-defined variables: Convenience Vars. (line 6) * value history: Value History. (line 6) * values from inferior, with Python: Values From Inferior. (line 6) * variable name conflict: Variables. (line 36) * variable object debugging info: Debugging Output. (line 224) * variable objects in GDB/MI: GDB/MI Variable Objects. (line 9) * variable values, wrong: Variables. (line 94) * variables, readline: Readline Init File Syntax. (line 34) * variables, setting: Assignment. (line 16) * vAttach packet: Packets. (line 344) * vCont packet: Packets. (line 364) * vCont? packet: Packets. (line 411) * vector unit: Vector Unit. (line 6) * vector, auxiliary: OS Information. (line 9) * verbose operation: Messages/Warnings. (line 6) * verify remote memory image: Memory. (line 123) * vFile packet: Packets. (line 422) * vFlashDone packet: Packets. (line 465) * vFlashErase packet: Packets. (line 426) * vFlashWrite packet: Packets. (line 443) * virtual functions (C++) display: Print Settings. (line 486) * vKill packet: Packets. (line 473) * vRun packet: Packets. (line 486) * vStopped packet: Packets. (line 503) * VTBL display: Print Settings. (line 486) * VxWorks: VxWorks. (line 6) * watchdog timer: Maintenance Commands. (line 375) * watchpoints: Breakpoints. (line 20) * watchpoints and threads: Set Watchpoints. (line 180) * weak alias functions: Calling. (line 58) * where to look for shared libraries: Files. (line 374) * wild pointer, interpreting: Print Settings. (line 79) * word completion: Completion. (line 6) * working directory: Source Path. (line 108) * working directory (of your program): Working Directory. (line 6) * working language: Languages. (line 13) * write data into object, remote request: General Query Packets. (line 968) * write, file-i/o system call: write. (line 6) * writing a pretty-printer: Writing a Pretty-Printer. (line 6) * writing convenience functions: Functions In Python. (line 6) * writing into corefiles: Patching. (line 6) * writing into executables: Patching. (line 6) * writing JIT debug info readers: Writing JIT Debug Info Readers. (line 6) * wrong values: Variables. (line 94) * x command, default address: Machine Code. (line 30) * X packet: Packets. (line 506) * Xilinx MicroBlaze: MicroBlaze. (line 6) * XInclude: Target Description Format. (line 54) * XMD, Xilinx Microprocessor Debugger: MicroBlaze. (line 6) * XML parser debugging: Debugging Output. (line 232) * yanking text: Readline Killing Commands. (line 6) * z packet: Packets. (line 519) * Z packets: Packets. (line 519) * Z0 packet: Packets. (line 534) * z0 packet: Packets. (line 534) * Z1 packet: Packets. (line 589) * z1 packet: Packets. (line 589) * Z2 packet: Packets. (line 611) * z2 packet: Packets. (line 611) * Z3 packet: Packets. (line 626) * z3 packet: Packets. (line 626) * Z4 packet: Packets. (line 641) * z4 packet: Packets. (line 641) * Z8000: Z8000. (line 6) * Zilog Z8000 simulator: Z8000. (line 6) * {TYPE}: Expressions. (line 43) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/gdb/doc/gdb.info����������������������������������������������������������������������0000644�0001750�0001750�00000047416�12250773371�015020� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo. INFO-DIR-SECTION Software development START-INFO-DIR-ENTRY * Gdb: (gdb). The GNU debugger. END-INFO-DIR-ENTRY Copyright (C) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom." This file documents the GNU debugger GDB. This is the Tenth Edition, of `Debugging with GDB: the GNU Source-Level Debugger' for GDB (GDB) Version 7.6.2. Copyright (C) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom."  Indirect: gdb.info-1: 1649 gdb.info-2: 299880 gdb.info-3: 606496 gdb.info-4: 899730 gdb.info-5: 1197128 gdb.info-6: 1472352 gdb.info-7: 1654758  Tag Table: (Indirect) Node: Top1649 Node: Summary5079 Node: Free Software6952 Node: Free Documentation7693 Node: Contributors12628 Node: Sample Session20722 Node: Invocation27560 Node: Invoking GDB28104 Node: File Options30417 Node: Mode Options33475 Ref: -nx33702 Ref: -nh34791 Node: Startup40889 Ref: Home Directory Init File41440 Ref: Option -init-eval-command41550 Ref: Init File in the Current Directory during Startup41895 Ref: Startup-Footnote-144089 Node: Quitting GDB44198 Node: Shell Commands45095 Node: Logging Output46022 Node: Commands46868 Node: Command Syntax47506 Node: Completion49672 Ref: Completion-Footnote-155036 Node: Help55196 Node: Running60565 Node: Compilation61794 Node: Starting63878 Node: Arguments72803 Node: Environment74073 Node: Working Directory77341 Node: Input/Output78493 Node: Attach80464 Node: Kill Process82931 Node: Inferiors and Programs83912 Node: Threads91157 Ref: set libthread-db-search-path98566 Node: Forks100624 Node: Checkpoint/Restart106934 Ref: Checkpoint/Restart-Footnote-1111463 Node: Stopping111498 Node: Breakpoints112761 Node: Set Breaks116304 Node: Set Watchpoints135037 Node: Set Catchpoints144440 Node: Delete Breaks154950 Node: Disabling156886 Node: Conditions160275 Node: Break Commands165923 Node: Dynamic Printf169145 Node: Save Breakpoints173405 Node: Static Probe Points174580 Node: Error in Breakpoints177267 Node: Breakpoint-related Warnings178003 Node: Continuing and Stepping180330 Node: Skipping Over Functions and Files189716 Node: Signals193288 Ref: extra signal information197718 Node: Thread Stops199221 Node: All-Stop Mode200320 Node: Non-Stop Mode204218 Node: Background Execution207695 Node: Thread-Specific Breakpoints210264 Node: Interrupted System Calls211586 Node: Observer Mode213100 Node: Reverse Execution216539 Ref: Reverse Execution-Footnote-1221166 Ref: Reverse Execution-Footnote-2221793 Node: Process Record and Replay221843 Node: Stack234135 Node: Frames235628 Node: Backtrace238380 Ref: Backtrace-Footnote-1244005 Node: Selection244193 Node: Frame Info247057 Node: Source249051 Node: List250117 Node: Specify Location252779 Node: Edit257383 Ref: Edit-Footnote-1258858 Node: Search259093 Node: Source Path259901 Ref: set substitute-path266268 Node: Machine Code268489 Node: Data275390 Node: Expressions283060 Node: Ambiguous Expressions285152 Node: Variables288386 Node: Arrays294004 Node: Output Formats296535 Ref: Output Formats-Footnote-1299723 Node: Memory299880 Node: Auto Display306034 Node: Print Settings310576 Ref: set print entry-values318156 Node: Pretty Printing329401 Node: Pretty-Printer Introduction329914 Node: Pretty-Printer Example331669 Node: Pretty-Printer Commands332447 Node: Value History334871 Node: Convenience Vars337292 Node: Convenience Funs341874 Node: Registers343055 Ref: Registers-Footnote-1347732 Node: Floating Point Hardware348127 Node: Vector Unit348659 Node: OS Information349046 Ref: linux info os infotypes351069 Node: Memory Region Attributes355269 Node: Dump/Restore Files359939 Node: Core File Generation362244 Node: Character Sets363468 Node: Caching Remote Data369833 Ref: Caching Remote Data-Footnote-1372098 Node: Searching Memory372336 Node: Optimized Code375213 Node: Inline Functions376890 Node: Tail Call Frames379517 Ref: set debug entry-values381657 Node: Macros385731 Ref: Macros-Footnote-1393307 Node: Tracepoints393460 Node: Set Tracepoints395521 Node: Create and Delete Tracepoints398459 Node: Enable and Disable Tracepoints404859 Node: Tracepoint Passcounts406099 Node: Tracepoint Conditions407526 Node: Trace State Variables409220 Node: Tracepoint Actions411410 Node: Listing Tracepoints417715 Node: Listing Static Tracepoint Markers419417 Node: Starting and Stopping Trace Experiments421263 Ref: disconnected tracing423008 Node: Tracepoint Restrictions427388 Node: Analyze Collected Data431158 Node: tfind432463 Node: tdump436885 Node: save tracepoints439400 Node: Tracepoint Variables439896 Node: Trace Files441024 Node: Overlays442482 Node: How Overlays Work443202 Ref: A code overlay445762 Node: Overlay Commands449200 Node: Automatic Overlay Debugging453390 Node: Overlay Sample Program455531 Node: Languages457291 Node: Setting458454 Node: Filenames460156 Node: Manually460967 Node: Automatically462176 Node: Show463237 Node: Checks464559 Node: Type Checking465564 Node: Range Checking467393 Node: Supported Languages469794 Node: C471094 Node: C Operators472058 Node: C Constants476377 Node: C Plus Plus Expressions479258 Node: C Defaults482601 Node: C Checks483269 Node: Debugging C483829 Node: Debugging C Plus Plus484313 Node: Decimal Floating Point487771 Node: D489030 Node: Go489287 Node: Objective-C490381 Node: Method Names in Commands490844 Node: The Print Command with Objective-C492539 Node: OpenCL C493190 Node: OpenCL C Datatypes493465 Node: OpenCL C Expressions493840 Node: OpenCL C Operators494197 Node: Fortran494429 Node: Fortran Operators495151 Node: Fortran Defaults496007 Node: Special Fortran Commands496392 Node: Pascal496898 Node: Modula-2497413 Node: M2 Operators498388 Node: Built-In Func/Proc501387 Node: M2 Constants504248 Node: M2 Types505849 Node: M2 Defaults509068 Node: Deviations509668 Node: M2 Checks510769 Node: M2 Scope511587 Node: GDB/M2512611 Node: Ada513523 Node: Ada Mode Intro514586 Node: Omissions from Ada516496 Node: Additions to Ada520850 Node: Stopping Before Main Program524780 Node: Ada Tasks525309 Node: Ada Tasks and Core Files531722 Node: Ravenscar Profile532640 Node: Ada Glitches533710 Node: Unsupported Languages536504 Node: Symbols537194 Node: Altering554562 Node: Assignment555531 Node: Jumping558636 Node: Signaling560797 Node: Returning561930 Node: Calling565282 Node: Patching568309 Node: GDB Files569386 Node: Files570106 Ref: Shared Libraries582951 Ref: Files-Footnote-1594585 Node: Separate Debug Files594760 Ref: debug-file-directory597867 Node: MiniDebugInfo606496 Node: Index Files608600 Node: Symbol Errors610662 Node: Data Files614275 Node: Targets615231 Node: Active Targets616711 Node: Target Commands617785 Ref: load622058 Node: Byte Order623039 Node: Remote Debugging624016 Node: Connecting625278 Node: File Transfer630218 Node: Server631158 Ref: Monitor Commands for gdbserver641380 Ref: Server-Footnote-1646034 Node: Remote Configuration646154 Ref: set remotebreak647178 Ref: set remote hardware-watchpoint-limit648642 Ref: set remote hardware-breakpoint-limit648642 Ref: set remote hardware-watchpoint-length-limit648868 Ref: set remote exec-file649283 Node: Remote Stub656362 Node: Stub Contents659259 Node: Bootstrapping661366 Node: Debug Session665175 Node: Configurations667217 Node: Native667986 Node: HP-UX668555 Node: BSD libkvm Interface668844 Node: SVR4 Process Information669915 Node: DJGPP Native673719 Node: Cygwin Native680299 Node: Non-debug DLL Symbols684248 Node: Hurd Native688796 Node: Darwin694057 Node: Embedded OS695318 Node: VxWorks695794 Node: VxWorks Connection698011 Node: VxWorks Download698945 Node: VxWorks Attach700680 Node: Embedded Processors701078 Node: ARM702257 Node: M32R/D706378 Node: M68K708080 Node: MicroBlaze708373 Node: MIPS Embedded709823 Node: OpenRISC 1000714761 Node: PowerPC Embedded717630 Node: PA721397 Node: Sparclet721681 Node: Sparclet File723151 Node: Sparclet Connection724031 Node: Sparclet Download724509 Node: Sparclet Execution725558 Node: Sparclite726149 Node: Z8000726524 Node: AVR727908 Node: CRIS728271 Node: Super-H729249 Node: Architectures730309 Node: AArch64730734 Node: i386731141 Node: Alpha731840 Node: MIPS731973 Node: HPPA735866 Node: SPU736385 Node: PowerPC738573 Node: Controlling GDB739291 Node: Prompt740188 Node: Editing741907 Node: Command History742850 Node: Screen Size746254 Node: Numbers748088 Node: ABI750065 Node: Auto-loading753239 Ref: set auto-load off754106 Ref: show auto-load754742 Ref: info auto-load755521 Node: Init File in the Current Directory759102 Ref: set auto-load local-gdbinit759677 Ref: show auto-load local-gdbinit759859 Ref: info auto-load local-gdbinit760023 Node: libthread_db.so.1 file760171 Ref: set auto-load libthread-db761108 Ref: show auto-load libthread-db761239 Ref: info auto-load libthread-db761376 Node: objfile-gdb.gdb file761560 Ref: set auto-load gdb-scripts762169 Ref: show auto-load gdb-scripts762293 Ref: info auto-load gdb-scripts762423 Node: Auto-loading safe path762654 Ref: set auto-load safe-path763958 Ref: show auto-load safe-path764697 Ref: add-auto-load-safe-path764820 Node: Auto-loading verbose mode767714 Ref: set debug auto-load768877 Ref: show debug auto-load768978 Node: Messages/Warnings769100 Ref: confirmation requests770535 Node: Debugging Output771742 Node: Other Misc Settings779576 Node: Extending GDB780605 Node: Sequences782233 Node: Define782828 Node: Hooks786629 Node: Command Files788996 Node: Output794066 Node: Python798999 Node: Python Commands800174 Node: Python API802509 Node: Basic Python804560 Ref: prompt_hook812026 Node: Exception Handling812623 Node: Values From Inferior815119 Node: Types In Python826770 Node: Pretty Printing API835676 Node: Selecting Pretty-Printers839569 Node: Writing a Pretty-Printer841902 Node: Type Printing API847223 Node: Inferiors In Python849829 Node: Events In Python852706 Node: Threads In Python857887 Node: Commands In Python860330 Node: Parameters In Python869516 Node: Functions In Python874977 Node: Progspaces In Python877199 Node: Objfiles In Python878714 Node: Frames In Python880806 Node: Blocks In Python886861 Node: Symbols In Python889666 Node: Symbol Tables In Python896931 Node: Breakpoints In Python899730 Node: Finish Breakpoints in Python906842 Node: Lazy Strings In Python908949 Node: Architectures In Python911184 Node: Python Auto-loading913371 Ref: set auto-load python-scripts914035 Ref: show auto-load python-scripts914135 Ref: info auto-load python-scripts914241 Node: objfile-gdb.py file915410 Ref: set auto-load scripts-directory916584 Ref: with-auto-load-dir916960 Ref: show auto-load scripts-directory917778 Node: dotdebug_gdb_scripts section918107 Node: Which flavor to choose?919628 Node: Python modules921454 Node: gdb.printing921840 Node: gdb.types923254 Node: gdb.prompt926284 Node: Aliases927933 Node: Interpreters930776 Node: TUI932875 Node: TUI Overview933822 Node: TUI Keys936255 Node: TUI Single Key Mode938559 Node: TUI Commands939434 Node: TUI Configuration941818 Node: Emacs943114 Node: GDB/MI948588 Node: GDB/MI General Design950499 Node: Context management953022 Node: Asynchronous and non-stop modes956157 Node: Thread groups958149 Node: GDB/MI Command Syntax960427 Node: GDB/MI Input Syntax960670 Node: GDB/MI Output Syntax962224 Node: GDB/MI Compatibility with CLI965796 Node: GDB/MI Development and Front Ends966533 Node: GDB/MI Output Records968190 Node: GDB/MI Result Records968596 Node: GDB/MI Stream Records969602 Node: GDB/MI Async Records970867 Node: GDB/MI Breakpoint Information980487 Node: GDB/MI Frame Information984439 Node: GDB/MI Thread Information985526 Node: GDB/MI Ada Exception Information986505 Node: GDB/MI Simple Examples986928 Node: GDB/MI Command Description Format989136 Node: GDB/MI Breakpoint Commands990016 Node: GDB/MI Catchpoint Commands1007959 Node: GDB/MI Program Context1009651 Node: GDB/MI Thread Commands1013921 Node: GDB/MI Ada Tasking Commands1017877 Node: GDB/MI Program Execution1020131 Node: GDB/MI Stack Manipulation1031917 Node: GDB/MI Variable Objects1042819 Ref: -var-set-format1052722 Ref: -var-list-children1053840 Ref: -var-update1062187 Ref: -var-set-frozen1065182 Ref: -var-set-update-range1065978 Ref: -var-set-visualizer1066508 Node: GDB/MI Data Manipulation1068005 Node: GDB/MI Tracepoint Commands1087430 Node: GDB/MI Symbol Query1094901 Node: GDB/MI File Commands1095590 Node: GDB/MI Target Manipulation1098886 Node: GDB/MI File Transfer Commands1105108 Node: GDB/MI Miscellaneous Commands1106430 Ref: -interpreter-exec1119022 Node: Annotations1121358 Node: Annotations Overview1122277 Node: Server Prefix1124740 Node: Prompting1125474 Node: Errors1126991 Node: Invalidation1127887 Node: Annotations for Running1128364 Node: Source Annotations1129884 Node: JIT Interface1130809 Node: Declarations1132609 Node: Registering Code1133996 Node: Unregistering Code1134968 Node: Custom Debug Info1135595 Node: Using JIT Debug Info Readers1136891 Node: Writing JIT Debug Info Readers1137906 Node: In-Process Agent1140103 Ref: Control Agent1142046 Node: In-Process Agent Protocol1142913 Node: IPA Protocol Objects1143705 Ref: agent expression object1144707 Ref: tracepoint action object1144913 Ref: tracepoint object1144994 Node: IPA Protocol Commands1147950 Node: GDB Bugs1149405 Node: Bug Criteria1150137 Node: Bug Reporting1151014 Node: Command Line Editing1158637 Node: Introduction and Notation1159289 Node: Readline Interaction1160909 Node: Readline Bare Essentials1162098 Node: Readline Movement Commands1163885 Node: Readline Killing Commands1164848 Node: Readline Arguments1166766 Node: Searching1167808 Node: Readline Init File1169957 Node: Readline Init File Syntax1171108 Node: Conditional Init Constructs1186166 Node: Sample Init File1188697 Node: Bindable Readline Commands1191812 Node: Commands For Moving1192867 Node: Commands For History1193726 Node: Commands For Text1197128 Node: Commands For Killing1199852 Node: Numeric Arguments1201992 Node: Commands For Completion1203129 Node: Keyboard Macros1205096 Node: Miscellaneous Commands1205665 Node: Readline vi Mode1209519 Node: Using History Interactively1210429 Node: History Interaction1210972 Node: Event Designators1212394 Node: Word Designators1213534 Node: Modifiers1215171 Node: In Memoriam1216394 Node: Formatting Documentation1217277 Ref: Formatting Documentation-Footnote-11220598 Node: Installing GDB1220666 Node: Requirements1221238 Ref: Expat1221807 Node: Running Configure1224379 Node: Separate Objdir1227948 Node: Config Names1230844 Node: Configure Options1232293 Node: System-wide configuration1234663 Node: Maintenance Commands1236530 Ref: maint info breakpoints1238184 Node: Remote Protocol1252703 Node: Overview1253357 Ref: Binary Data1255919 Node: Packets1258442 Ref: thread-id syntax1259342 Ref: extended mode1260787 Ref: bc1262508 Ref: bs1262718 Ref: read registers packet1264322 Ref: cycle step packet1266255 Ref: write register packet1268131 Ref: step with signal packet1269127 Ref: vCont packet1270581 Ref: X packet1275555 Ref: insert breakpoint or watchpoint packet1275841 Node: Stop Reply Packets1279878 Node: General Query Packets1284618 Ref: QNonStop1294830 Ref: QPassSignals1295454 Ref: QProgramSignals1296623 Ref: qSearch memory1299099 Ref: QStartNoAckMode1299597 Ref: qSupported1300127 Ref: multiprocess extensions1310300 Ref: install tracepoint in tracing1312329 Ref: qXfer read1315686 Ref: qXfer auxiliary vector read1316180 Ref: qXfer btrace read1316527 Ref: qXfer target description read1317146 Ref: qXfer library list read1317590 Ref: qXfer svr4 library list read1318245 Ref: qXfer memory map read1318880 Ref: qXfer sdata read1319266 Ref: qXfer siginfo read1319730 Ref: qXfer spu read1320126 Ref: qXfer threads read1320649 Ref: qXfer traceframe info read1321051 Ref: qXfer unwind info block1321467 Ref: qXfer fdpic loadmap read1321699 Ref: qXfer osdata read1322114 Ref: qXfer write1323316 Ref: qXfer siginfo write1323873 Ref: qXfer spu write1324269 Ref: General Query Packets-Footnote-11326796 Node: Architecture-Specific Protocol Details1327123 Node: ARM-Specific Protocol Details1327632 Node: ARM Breakpoint Kinds1327880 Node: MIPS-Specific Protocol Details1328212 Node: MIPS Register packet Format1328495 Node: MIPS Breakpoint Kinds1329424 Node: Tracepoint Packets1329843 Ref: QTEnable1338836 Ref: QTDisable1339032 Ref: qTfSTM1344556 Ref: qTsSTM1344556 Ref: qTSTMat1345594 Ref: QTBuffer-size1346741 Node: Host I/O Packets1348711 Node: Interrupts1353329 Node: Notification Packets1355232 Node: Remote Non-Stop1360609 Node: Packet Acknowledgment1362898 Node: Examples1365013 Node: File-I/O Remote Protocol Extension1365639 Node: File-I/O Overview1366101 Node: Protocol Basics1368298 Node: The F Request Packet1370530 Node: The F Reply Packet1371431 Node: The Ctrl-C Message1372349 Node: Console I/O1373978 Node: List of Supported Calls1375195 Node: open1375557 Node: close1378051 Node: read1378433 Node: write1379040 Node: lseek1379807 Node: rename1380685 Node: unlink1382081 Node: stat/fstat1383020 Node: gettimeofday1383907 Node: isatty1384342 Node: system1384938 Node: Protocol-specific Representation of Datatypes1386480 Node: Integral Datatypes1386857 Node: Pointer Values1387664 Node: Memory Transfer1388372 Node: struct stat1388992 Node: struct timeval1391194 Node: Constants1391711 Node: Open Flags1392160 Node: mode_t Values1392501 Node: Errno Values1392993 Node: Lseek Flags1393804 Node: Limits1393989 Node: File-I/O Examples1394349 Node: Library List Format1395465 Node: Library List Format for SVR4 Targets1398248 Node: Memory Map Format1400718 Node: Thread List Format1403295 Node: Traceframe Info Format1404113 Node: Branch Trace Format1405598 Node: Agent Expressions1406944 Node: General Bytecode Design1409765 Node: Bytecode Descriptions1414565 Node: Using Agent Expressions1428001 Node: Varying Target Capabilities1429979 Node: Rationale1431141 Node: Target Descriptions1438527 Node: Retrieving Descriptions1440403 Node: Target Description Format1441488 Node: Predefined Target Types1450537 Node: Standard Target Features1451922 Node: AArch64 Features1453733 Node: ARM Features1454156 Node: i386 Features1455673 Node: MIPS Features1456777 Node: M68K Features1457961 Node: PowerPC Features1458624 Node: TIC6x Features1459931 Node: Operating System Information1460480 Node: Process list1461318 Node: Trace File Format1462380 Node: Index Section Format1464374 Node: Copying1472352 Node: GNU Free Documentation License1509942 Node: Concept Index1535108 Node: Command and Variable Index1654758  End Tag Table ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/gdb/doc/gdbint.texinfo����������������������������������������������������������������0000644�0001750�0001750�00001153243�12250773211�016242� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������\input texinfo @c -*- texinfo -*- @setfilename gdbint.info @include gdb-cfg.texi @settitle @value{GDBN} Internals @setchapternewpage off @dircategory Software development @direntry * Gdb-Internals: (gdbint). The GNU debugger's internals. @end direntry @copying Copyright @copyright{} 1990-2013 Free Software Foundation, Inc. Contributed by Cygnus Solutions. Written by John Gilmore. Second Edition by Stan Shebs. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end copying @ifnottex This file documents the internals of the GNU debugger @value{GDBN}. @insertcopying @end ifnottex @syncodeindex vr fn @titlepage @title @value{GDBN} Internals @subtitle A guide to the internals of the GNU debugger @author John Gilmore @author Cygnus Solutions @author Second Edition: @author Stan Shebs @author Cygnus Solutions @page @tex \def\$#1${{#1}} % Kluge: collect RCS revision info without $...$ \xdef\manvers{\$Revision$} % For use in headers, footers too {\parskip=0pt \hfill Cygnus Solutions\par \hfill \manvers\par \hfill \TeX{}info \texinfoversion\par } @end tex @vskip 0pt plus 1filll @insertcopying @end titlepage @contents @node Top @c Perhaps this should be the title of the document (but only for info, @c not for TeX). Existing GNU manuals seem inconsistent on this point. @top Scope of this Document This document documents the internals of the GNU debugger, @value{GDBN}. It includes description of @value{GDBN}'s key algorithms and operations, as well as the mechanisms that adapt @value{GDBN} to specific hosts and targets. @menu * Summary:: * Overall Structure:: * Algorithms:: * User Interface:: * libgdb:: * Values:: * Stack Frames:: * Symbol Handling:: * Language Support:: * Host Definition:: * Target Architecture Definition:: * Target Descriptions:: * Target Vector Definition:: * Native Debugging:: * Support Libraries:: * Coding Standards:: * Misc Guidelines:: * Porting GDB:: * Versions and Branches:: * Start of New Year Procedure:: * Releasing GDB:: * Testsuite:: * Hints:: * GDB Observers:: @value{GDBN} Currently available observers * GNU Free Documentation License:: The license for this documentation * Concept Index:: * Function and Variable Index:: @end menu @node Summary @chapter Summary @menu * Requirements:: * Contributors:: @end menu @node Requirements @section Requirements @cindex requirements for @value{GDBN} Before diving into the internals, you should understand the formal requirements and other expectations for @value{GDBN}. Although some of these may seem obvious, there have been proposals for @value{GDBN} that have run counter to these requirements. First of all, @value{GDBN} is a debugger. It's not designed to be a front panel for embedded systems. It's not a text editor. It's not a shell. It's not a programming environment. @value{GDBN} is an interactive tool. Although a batch mode is available, @value{GDBN}'s primary role is to interact with a human programmer. @value{GDBN} should be responsive to the user. A programmer hot on the trail of a nasty bug, and operating under a looming deadline, is going to be very impatient of everything, including the response time to debugger commands. @value{GDBN} should be relatively permissive, such as for expressions. While the compiler should be picky (or have the option to be made picky), since source code lives for a long time usually, the programmer doing debugging shouldn't be spending time figuring out to mollify the debugger. @value{GDBN} will be called upon to deal with really large programs. Executable sizes of 50 to 100 megabytes occur regularly, and we've heard reports of programs approaching 1 gigabyte in size. @value{GDBN} should be able to run everywhere. No other debugger is available for even half as many configurations as @value{GDBN} supports. @node Contributors @section Contributors The first edition of this document was written by John Gilmore of Cygnus Solutions. The current second edition was written by Stan Shebs of Cygnus Solutions, who continues to update the manual. Over the years, many others have made additions and changes to this document. This section attempts to record the significant contributors to that effort. One of the virtues of free software is that everyone is free to contribute to it; with regret, we cannot actually acknowledge everyone here. @quotation @emph{Plea:} This section has only been added relatively recently (four years after publication of the second edition). Additions to this section are particularly welcome. If you or your friends (or enemies, to be evenhanded) have been unfairly omitted from this list, we would like to add your names! @end quotation A document such as this relies on being kept up to date by numerous small updates by contributing engineers as they make changes to the code base. The file @file{ChangeLog} in the @value{GDBN} distribution approximates a blow-by-blow account. The most prolific contributors to this important, but low profile task are Andrew Cagney (responsible for over half the entries), Daniel Jacobowitz, Mark Kettenis, Jim Blandy and Eli Zaretskii. Eli Zaretskii and Daniel Jacobowitz wrote the sections documenting watchpoints. Jeremy Bennett updated the sections on initializing a new architecture and register representation, and added the section on Frame Interpretation. @node Overall Structure @chapter Overall Structure @value{GDBN} consists of three major subsystems: user interface, symbol handling (the @dfn{symbol side}), and target system handling (the @dfn{target side}). The user interface consists of several actual interfaces, plus supporting code. The symbol side consists of object file readers, debugging info interpreters, symbol table management, source language expression parsing, type and value printing. The target side consists of execution control, stack frame analysis, and physical target manipulation. The target side/symbol side division is not formal, and there are a number of exceptions. For instance, core file support involves symbolic elements (the basic core file reader is in BFD) and target elements (it supplies the contents of memory and the values of registers). Instead, this division is useful for understanding how the minor subsystems should fit together. @section The Symbol Side The symbolic side of @value{GDBN} can be thought of as ``everything you can do in @value{GDBN} without having a live program running''. For instance, you can look at the types of variables, and evaluate many kinds of expressions. @section The Target Side The target side of @value{GDBN} is the ``bits and bytes manipulator''. Although it may make reference to symbolic info here and there, most of the target side will run with only a stripped executable available---or even no executable at all, in remote debugging cases. Operations such as disassembly, stack frame crawls, and register display, are able to work with no symbolic info at all. In some cases, such as disassembly, @value{GDBN} will use symbolic info to present addresses relative to symbols rather than as raw numbers, but it will work either way. @section Configurations @cindex host @cindex target @dfn{Host} refers to attributes of the system where @value{GDBN} runs. @dfn{Target} refers to the system where the program being debugged executes. In most cases they are the same machine, in which case a third type of @dfn{Native} attributes come into play. Defines and include files needed to build on the host are host support. Examples are tty support, system defined types, host byte order, host float format. These are all calculated by @code{autoconf} when the debugger is built. Defines and information needed to handle the target format are target dependent. Examples are the stack frame format, instruction set, breakpoint instruction, registers, and how to set up and tear down the stack to call a function. Information that is only needed when the host and target are the same, is native dependent. One example is Unix child process support; if the host and target are not the same, calling @code{fork} to start the target process is a bad idea. The various macros needed for finding the registers in the @code{upage}, running @code{ptrace}, and such are all in the native-dependent files. Another example of native-dependent code is support for features that are really part of the target environment, but which require @code{#include} files that are only available on the host system. Core file handling and @code{setjmp} handling are two common cases. When you want to make @value{GDBN} work as the traditional native debugger on a system, you will need to supply both target and native information. @section Source Tree Structure @cindex @value{GDBN} source tree structure The @value{GDBN} source directory has a mostly flat structure---there are only a few subdirectories. A file's name usually gives a hint as to what it does; for example, @file{stabsread.c} reads stabs, @file{dwarf2read.c} reads @sc{DWARF 2}, etc. Files that are related to some common task have names that share common substrings. For example, @file{*-thread.c} files deal with debugging threads on various platforms; @file{*read.c} files deal with reading various kinds of symbol and object files; @file{inf*.c} files deal with direct control of the @dfn{inferior program} (@value{GDBN} parlance for the program being debugged). There are several dozens of files in the @file{*-tdep.c} family. @samp{tdep} stands for @dfn{target-dependent code}---each of these files implements debug support for a specific target architecture (sparc, mips, etc). Usually, only one of these will be used in a specific @value{GDBN} configuration (sometimes two, closely related). Similarly, there are many @file{*-nat.c} files, each one for native debugging on a specific system (e.g., @file{sparc-linux-nat.c} is for native debugging of Sparc machines running the Linux kernel). The few subdirectories of the source tree are: @table @file @item cli Code that implements @dfn{CLI}, the @value{GDBN} Command-Line Interpreter. @xref{User Interface, Command Interpreter}. @item gdbserver Code for the @value{GDBN} remote server. @item gdbtk Code for Insight, the @value{GDBN} TK-based GUI front-end. @item mi The @dfn{GDB/MI}, the @value{GDBN} Machine Interface interpreter. @item signals Target signal translation code. @item tui Code for @dfn{TUI}, the @value{GDBN} Text-mode full-screen User Interface. @xref{User Interface, TUI}. @end table @node Algorithms @chapter Algorithms @cindex algorithms @value{GDBN} uses a number of debugging-specific algorithms. They are often not very complicated, but get lost in the thicket of special cases and real-world issues. This chapter describes the basic algorithms and mentions some of the specific target definitions that they use. @section Prologue Analysis @cindex prologue analysis @cindex call frame information @cindex CFI (call frame information) To produce a backtrace and allow the user to manipulate older frames' variables and arguments, @value{GDBN} needs to find the base addresses of older frames, and discover where those frames' registers have been saved. Since a frame's ``callee-saves'' registers get saved by younger frames if and when they're reused, a frame's registers may be scattered unpredictably across younger frames. This means that changing the value of a register-allocated variable in an older frame may actually entail writing to a save slot in some younger frame. Modern versions of GCC emit Dwarf call frame information (``CFI''), which describes how to find frame base addresses and saved registers. But CFI is not always available, so as a fallback @value{GDBN} uses a technique called @dfn{prologue analysis} to find frame sizes and saved registers. A prologue analyzer disassembles the function's machine code starting from its entry point, and looks for instructions that allocate frame space, save the stack pointer in a frame pointer register, save registers, and so on. Obviously, this can't be done accurately in general, but it's tractable to do well enough to be very helpful. Prologue analysis predates the GNU toolchain's support for CFI; at one time, prologue analysis was the only mechanism @value{GDBN} used for stack unwinding at all, when the function calling conventions didn't specify a fixed frame layout. In the olden days, function prologues were generated by hand-written, target-specific code in GCC, and treated as opaque and untouchable by optimizers. Looking at this code, it was usually straightforward to write a prologue analyzer for @value{GDBN} that would accurately understand all the prologues GCC would generate. However, over time GCC became more aggressive about instruction scheduling, and began to understand more about the semantics of the prologue instructions themselves; in response, @value{GDBN}'s analyzers became more complex and fragile. Keeping the prologue analyzers working as GCC (and the instruction sets themselves) evolved became a substantial task. @cindex @file{prologue-value.c} @cindex abstract interpretation of function prologues @cindex pseudo-evaluation of function prologues To try to address this problem, the code in @file{prologue-value.h} and @file{prologue-value.c} provides a general framework for writing prologue analyzers that are simpler and more robust than ad-hoc analyzers. When we analyze a prologue using the prologue-value framework, we're really doing ``abstract interpretation'' or ``pseudo-evaluation'': running the function's code in simulation, but using conservative approximations of the values registers and memory would hold when the code actually runs. For example, if our function starts with the instruction: @example addi r1, 42 # add 42 to r1 @end example @noindent we don't know exactly what value will be in @code{r1} after executing this instruction, but we do know it'll be 42 greater than its original value. If we then see an instruction like: @example addi r1, 22 # add 22 to r1 @end example @noindent we still don't know what @code{r1's} value is, but again, we can say it is now 64 greater than its original value. If the next instruction were: @example mov r2, r1 # set r2 to r1's value @end example @noindent then we can say that @code{r2's} value is now the original value of @code{r1} plus 64. It's common for prologues to save registers on the stack, so we'll need to track the values of stack frame slots, as well as the registers. So after an instruction like this: @example mov (fp+4), r2 @end example @noindent then we'd know that the stack slot four bytes above the frame pointer holds the original value of @code{r1} plus 64. And so on. Of course, this can only go so far before it gets unreasonable. If we wanted to be able to say anything about the value of @code{r1} after the instruction: @example xor r1, r3 # exclusive-or r1 and r3, place result in r1 @end example @noindent then things would get pretty complex. But remember, we're just doing a conservative approximation; if exclusive-or instructions aren't relevant to prologues, we can just say @code{r1}'s value is now ``unknown''. We can ignore things that are too complex, if that loss of information is acceptable for our application. So when we say ``conservative approximation'' here, what we mean is an approximation that is either accurate, or marked ``unknown'', but never inaccurate. Using this framework, a prologue analyzer is simply an interpreter for machine code, but one that uses conservative approximations for the contents of registers and memory instead of actual values. Starting from the function's entry point, you simulate instructions up to the current PC, or an instruction that you don't know how to simulate. Now you can examine the state of the registers and stack slots you've kept track of. @itemize @bullet @item To see how large your stack frame is, just check the value of the stack pointer register; if it's the original value of the SP minus a constant, then that constant is the stack frame's size. If the SP's value has been marked as ``unknown'', then that means the prologue has done something too complex for us to track, and we don't know the frame size. @item To see where we've saved the previous frame's registers, we just search the values we've tracked --- stack slots, usually, but registers, too, if you want --- for something equal to the register's original value. If the calling conventions suggest a standard place to save a given register, then we can check there first, but really, anything that will get us back the original value will probably work. @end itemize This does take some work. But prologue analyzers aren't quick-and-simple pattern patching to recognize a few fixed prologue forms any more; they're big, hairy functions. Along with inferior function calls, prologue analysis accounts for a substantial portion of the time needed to stabilize a @value{GDBN} port. So it's worthwhile to look for an approach that will be easier to understand and maintain. In the approach described above: @itemize @bullet @item It's easier to see that the analyzer is correct: you just see whether the analyzer properly (albeit conservatively) simulates the effect of each instruction. @item It's easier to extend the analyzer: you can add support for new instructions, and know that you haven't broken anything that wasn't already broken before. @item It's orthogonal: to gather new information, you don't need to complicate the code for each instruction. As long as your domain of conservative values is already detailed enough to tell you what you need, then all the existing instruction simulations are already gathering the right data for you. @end itemize The file @file{prologue-value.h} contains detailed comments explaining the framework and how to use it. @section Breakpoint Handling @cindex breakpoints In general, a breakpoint is a user-designated location in the program where the user wants to regain control if program execution ever reaches that location. There are two main ways to implement breakpoints; either as ``hardware'' breakpoints or as ``software'' breakpoints. @cindex hardware breakpoints @cindex program counter Hardware breakpoints are sometimes available as a builtin debugging features with some chips. Typically these work by having dedicated register into which the breakpoint address may be stored. If the PC (shorthand for @dfn{program counter}) ever matches a value in a breakpoint registers, the CPU raises an exception and reports it to @value{GDBN}. Another possibility is when an emulator is in use; many emulators include circuitry that watches the address lines coming out from the processor, and force it to stop if the address matches a breakpoint's address. A third possibility is that the target already has the ability to do breakpoints somehow; for instance, a ROM monitor may do its own software breakpoints. So although these are not literally ``hardware breakpoints'', from @value{GDBN}'s point of view they work the same; @value{GDBN} need not do anything more than set the breakpoint and wait for something to happen. Since they depend on hardware resources, hardware breakpoints may be limited in number; when the user asks for more, @value{GDBN} will start trying to set software breakpoints. (On some architectures, notably the 32-bit x86 platforms, @value{GDBN} cannot always know whether there's enough hardware resources to insert all the hardware breakpoints and watchpoints. On those platforms, @value{GDBN} prints an error message only when the program being debugged is continued.) @cindex software breakpoints Software breakpoints require @value{GDBN} to do somewhat more work. The basic theory is that @value{GDBN} will replace a program instruction with a trap, illegal divide, or some other instruction that will cause an exception, and then when it's encountered, @value{GDBN} will take the exception and stop the program. When the user says to continue, @value{GDBN} will restore the original instruction, single-step, re-insert the trap, and continue on. Since it literally overwrites the program being tested, the program area must be writable, so this technique won't work on programs in ROM. It can also distort the behavior of programs that examine themselves, although such a situation would be highly unusual. Also, the software breakpoint instruction should be the smallest size of instruction, so it doesn't overwrite an instruction that might be a jump target, and cause disaster when the program jumps into the middle of the breakpoint instruction. (Strictly speaking, the breakpoint must be no larger than the smallest interval between instructions that may be jump targets; perhaps there is an architecture where only even-numbered instructions may jumped to.) Note that it's possible for an instruction set not to have any instructions usable for a software breakpoint, although in practice only the ARC has failed to define such an instruction. Basic breakpoint object handling is in @file{breakpoint.c}. However, much of the interesting breakpoint action is in @file{infrun.c}. @table @code @cindex insert or remove software breakpoint @findex target_remove_breakpoint @findex target_insert_breakpoint @item target_remove_breakpoint (@var{bp_tgt}) @itemx target_insert_breakpoint (@var{bp_tgt}) Insert or remove a software breakpoint at address @code{@var{bp_tgt}->placed_address}. Returns zero for success, non-zero for failure. On input, @var{bp_tgt} contains the address of the breakpoint, and is otherwise initialized to zero. The fields of the @code{struct bp_target_info} pointed to by @var{bp_tgt} are updated to contain other information about the breakpoint on output. The field @code{placed_address} may be updated if the breakpoint was placed at a related address; the field @code{shadow_contents} contains the real contents of the bytes where the breakpoint has been inserted, if reading memory would return the breakpoint instead of the underlying memory; the field @code{shadow_len} is the length of memory cached in @code{shadow_contents}, if any; and the field @code{placed_size} is optionally set and used by the target, if it could differ from @code{shadow_len}. For example, the remote target @samp{Z0} packet does not require shadowing memory, so @code{shadow_len} is left at zero. However, the length reported by @code{gdbarch_breakpoint_from_pc} is cached in @code{placed_size}, so that a matching @samp{z0} packet can be used to remove the breakpoint. @cindex insert or remove hardware breakpoint @findex target_remove_hw_breakpoint @findex target_insert_hw_breakpoint @item target_remove_hw_breakpoint (@var{bp_tgt}) @itemx target_insert_hw_breakpoint (@var{bp_tgt}) Insert or remove a hardware-assisted breakpoint at address @code{@var{bp_tgt}->placed_address}. Returns zero for success, non-zero for failure. See @code{target_insert_breakpoint} for a description of the @code{struct bp_target_info} pointed to by @var{bp_tgt}; the @code{shadow_contents} and @code{shadow_len} members are not used for hardware breakpoints, but @code{placed_size} may be. @end table @section Single Stepping @section Signal Handling @section Thread Handling @section Inferior Function Calls @section Longjmp Support @cindex @code{longjmp} debugging @value{GDBN} has support for figuring out that the target is doing a @code{longjmp} and for stopping at the target of the jump, if we are stepping. This is done with a few specialized internal breakpoints, which are visible in the output of the @samp{maint info breakpoint} command. @findex gdbarch_get_longjmp_target To make this work, you need to define a function called @code{gdbarch_get_longjmp_target}, which will examine the @code{jmp_buf} structure and extract the @code{longjmp} target address. Since @code{jmp_buf} is target specific and typically defined in a target header not available to @value{GDBN}, you will need to determine the offset of the PC manually and return that; many targets define a @code{jb_pc_offset} field in the tdep structure to save the value once calculated. @section Watchpoints @cindex watchpoints Watchpoints are a special kind of breakpoints (@pxref{Algorithms, breakpoints}) which break when data is accessed rather than when some instruction is executed. When you have data which changes without your knowing what code does that, watchpoints are the silver bullet to hunt down and kill such bugs. @cindex hardware watchpoints @cindex software watchpoints Watchpoints can be either hardware-assisted or not; the latter type is known as ``software watchpoints.'' @value{GDBN} always uses hardware-assisted watchpoints if they are available, and falls back on software watchpoints otherwise. Typical situations where @value{GDBN} will use software watchpoints are: @itemize @bullet @item The watched memory region is too large for the underlying hardware watchpoint support. For example, each x86 debug register can watch up to 4 bytes of memory, so trying to watch data structures whose size is more than 16 bytes will cause @value{GDBN} to use software watchpoints. @item The value of the expression to be watched depends on data held in registers (as opposed to memory). @item Too many different watchpoints requested. (On some architectures, this situation is impossible to detect until the debugged program is resumed.) Note that x86 debug registers are used both for hardware breakpoints and for watchpoints, so setting too many hardware breakpoints might cause watchpoint insertion to fail. @item No hardware-assisted watchpoints provided by the target implementation. @end itemize Software watchpoints are very slow, since @value{GDBN} needs to single-step the program being debugged and test the value of the watched expression(s) after each instruction. The rest of this section is mostly irrelevant for software watchpoints. When the inferior stops, @value{GDBN} tries to establish, among other possible reasons, whether it stopped due to a watchpoint being hit. It first uses @code{STOPPED_BY_WATCHPOINT} to see if any watchpoint was hit. If not, all watchpoint checking is skipped. Then @value{GDBN} calls @code{target_stopped_data_address} exactly once. This method returns the address of the watchpoint which triggered, if the target can determine it. If the triggered address is available, @value{GDBN} compares the address returned by this method with each watched memory address in each active watchpoint. For data-read and data-access watchpoints, @value{GDBN} announces every watchpoint that watches the triggered address as being hit. For this reason, data-read and data-access watchpoints @emph{require} that the triggered address be available; if not, read and access watchpoints will never be considered hit. For data-write watchpoints, if the triggered address is available, @value{GDBN} considers only those watchpoints which match that address; otherwise, @value{GDBN} considers all data-write watchpoints. For each data-write watchpoint that @value{GDBN} considers, it evaluates the expression whose value is being watched, and tests whether the watched value has changed. Watchpoints whose watched values have changed are announced as hit. @c FIXME move these to the main lists of target/native defns @value{GDBN} uses several macros and primitives to support hardware watchpoints: @table @code @findex TARGET_CAN_USE_HARDWARE_WATCHPOINT @item TARGET_CAN_USE_HARDWARE_WATCHPOINT (@var{type}, @var{count}, @var{other}) Return the number of hardware watchpoints of type @var{type} that are possible to be set. The value is positive if @var{count} watchpoints of this type can be set, zero if setting watchpoints of this type is not supported, and negative if @var{count} is more than the maximum number of watchpoints of type @var{type} that can be set. @var{other} is non-zero if other types of watchpoints are currently enabled (there are architectures which cannot set watchpoints of different types at the same time). @findex TARGET_REGION_OK_FOR_HW_WATCHPOINT @item TARGET_REGION_OK_FOR_HW_WATCHPOINT (@var{addr}, @var{len}) Return non-zero if hardware watchpoints can be used to watch a region whose address is @var{addr} and whose length in bytes is @var{len}. @cindex insert or remove hardware watchpoint @findex target_insert_watchpoint @findex target_remove_watchpoint @item target_insert_watchpoint (@var{addr}, @var{len}, @var{type}) @itemx target_remove_watchpoint (@var{addr}, @var{len}, @var{type}) Insert or remove a hardware watchpoint starting at @var{addr}, for @var{len} bytes. @var{type} is the watchpoint type, one of the possible values of the enumerated data type @code{target_hw_bp_type}, defined by @file{breakpoint.h} as follows: @smallexample enum target_hw_bp_type @{ hw_write = 0, /* Common (write) HW watchpoint */ hw_read = 1, /* Read HW watchpoint */ hw_access = 2, /* Access (read or write) HW watchpoint */ hw_execute = 3 /* Execute HW breakpoint */ @}; @end smallexample @noindent These two macros should return 0 for success, non-zero for failure. @findex target_stopped_data_address @item target_stopped_data_address (@var{addr_p}) If the inferior has some watchpoint that triggered, place the address associated with the watchpoint at the location pointed to by @var{addr_p} and return non-zero. Otherwise, return zero. This is required for data-read and data-access watchpoints. It is not required for data-write watchpoints, but @value{GDBN} uses it to improve handling of those also. @value{GDBN} will only call this method once per watchpoint stop, immediately after calling @code{STOPPED_BY_WATCHPOINT}. If the target's watchpoint indication is sticky, i.e., stays set after resuming, this method should clear it. For instance, the x86 debug control register has sticky triggered flags. @findex target_watchpoint_addr_within_range @item target_watchpoint_addr_within_range (@var{target}, @var{addr}, @var{start}, @var{length}) Check whether @var{addr} (as returned by @code{target_stopped_data_address}) lies within the hardware-defined watchpoint region described by @var{start} and @var{length}. This only needs to be provided if the granularity of a watchpoint is greater than one byte, i.e., if the watchpoint can also trigger on nearby addresses outside of the watched region. @findex HAVE_STEPPABLE_WATCHPOINT @item HAVE_STEPPABLE_WATCHPOINT If defined to a non-zero value, it is not necessary to disable a watchpoint to step over it. Like @code{gdbarch_have_nonsteppable_watchpoint}, this is usually set when watchpoints trigger at the instruction which will perform an interesting read or write. It should be set if there is a temporary disable bit which allows the processor to step over the interesting instruction without raising the watchpoint exception again. @findex gdbarch_have_nonsteppable_watchpoint @item int gdbarch_have_nonsteppable_watchpoint (@var{gdbarch}) If it returns a non-zero value, @value{GDBN} should disable a watchpoint to step the inferior over it. This is usually set when watchpoints trigger at the instruction which will perform an interesting read or write. @findex HAVE_CONTINUABLE_WATCHPOINT @item HAVE_CONTINUABLE_WATCHPOINT If defined to a non-zero value, it is possible to continue the inferior after a watchpoint has been hit. This is usually set when watchpoints trigger at the instruction following an interesting read or write. @findex STOPPED_BY_WATCHPOINT @item STOPPED_BY_WATCHPOINT (@var{wait_status}) Return non-zero if stopped by a watchpoint. @var{wait_status} is of the type @code{struct target_waitstatus}, defined by @file{target.h}. Normally, this macro is defined to invoke the function pointed to by the @code{to_stopped_by_watchpoint} member of the structure (of the type @code{target_ops}, defined on @file{target.h}) that describes the target-specific operations; @code{to_stopped_by_watchpoint} ignores the @var{wait_status} argument. @value{GDBN} does not require the non-zero value returned by @code{STOPPED_BY_WATCHPOINT} to be 100% correct, so if a target cannot determine for sure whether the inferior stopped due to a watchpoint, it could return non-zero ``just in case''. @end table @subsection Watchpoints and Threads @cindex watchpoints, with threads @value{GDBN} only supports process-wide watchpoints, which trigger in all threads. @value{GDBN} uses the thread ID to make watchpoints act as if they were thread-specific, but it cannot set hardware watchpoints that only trigger in a specific thread. Therefore, even if the target supports threads, per-thread debug registers, and watchpoints which only affect a single thread, it should set the per-thread debug registers for all threads to the same value. On @sc{gnu}/Linux native targets, this is accomplished by using @code{ALL_LWPS} in @code{target_insert_watchpoint} and @code{target_remove_watchpoint} and by using @code{linux_set_new_thread} to register a handler for newly created threads. @value{GDBN}'s @sc{gnu}/Linux support only reports a single event at a time, although multiple events can trigger simultaneously for multi-threaded programs. When multiple events occur, @file{linux-nat.c} queues subsequent events and returns them the next time the program is resumed. This means that @code{STOPPED_BY_WATCHPOINT} and @code{target_stopped_data_address} only need to consult the current thread's state---the thread indicated by @code{inferior_ptid}. If two threads have hit watchpoints simultaneously, those routines will be called a second time for the second thread. @subsection x86 Watchpoints @cindex x86 debug registers @cindex watchpoints, on x86 The 32-bit Intel x86 (a.k.a.@: ia32) processors feature special debug registers designed to facilitate debugging. @value{GDBN} provides a generic library of functions that x86-based ports can use to implement support for watchpoints and hardware-assisted breakpoints. This subsection documents the x86 watchpoint facilities in @value{GDBN}. (At present, the library functions read and write debug registers directly, and are thus only available for native configurations.) To use the generic x86 watchpoint support, a port should do the following: @itemize @bullet @findex I386_USE_GENERIC_WATCHPOINTS @item Define the macro @code{I386_USE_GENERIC_WATCHPOINTS} somewhere in the target-dependent headers. @item Include the @file{config/i386/nm-i386.h} header file @emph{after} defining @code{I386_USE_GENERIC_WATCHPOINTS}. @item Add @file{i386-nat.o} to the value of the Make variable @code{NATDEPFILES} (@pxref{Native Debugging, NATDEPFILES}). @item Provide implementations for the @code{I386_DR_LOW_*} macros described below. Typically, each macro should call a target-specific function which does the real work. @end itemize The x86 watchpoint support works by maintaining mirror images of the debug registers. Values are copied between the mirror images and the real debug registers via a set of macros which each target needs to provide: @table @code @findex I386_DR_LOW_SET_CONTROL @item I386_DR_LOW_SET_CONTROL (@var{val}) Set the Debug Control (DR7) register to the value @var{val}. @findex I386_DR_LOW_SET_ADDR @item I386_DR_LOW_SET_ADDR (@var{idx}, @var{addr}) Put the address @var{addr} into the debug register number @var{idx}. @findex I386_DR_LOW_RESET_ADDR @item I386_DR_LOW_RESET_ADDR (@var{idx}) Reset (i.e.@: zero out) the address stored in the debug register number @var{idx}. @findex I386_DR_LOW_GET_STATUS @item I386_DR_LOW_GET_STATUS Return the value of the Debug Status (DR6) register. This value is used immediately after it is returned by @code{I386_DR_LOW_GET_STATUS}, so as to support per-thread status register values. @end table For each one of the 4 debug registers (whose indices are from 0 to 3) that store addresses, a reference count is maintained by @value{GDBN}, to allow sharing of debug registers by several watchpoints. This allows users to define several watchpoints that watch the same expression, but with different conditions and/or commands, without wasting debug registers which are in short supply. @value{GDBN} maintains the reference counts internally, targets don't have to do anything to use this feature. The x86 debug registers can each watch a region that is 1, 2, or 4 bytes long. The ia32 architecture requires that each watched region be appropriately aligned: 2-byte region on 2-byte boundary, 4-byte region on 4-byte boundary. However, the x86 watchpoint support in @value{GDBN} can watch unaligned regions and regions larger than 4 bytes (up to 16 bytes) by allocating several debug registers to watch a single region. This allocation of several registers per a watched region is also done automatically without target code intervention. The generic x86 watchpoint support provides the following API for the @value{GDBN}'s application code: @table @code @findex i386_region_ok_for_watchpoint @item i386_region_ok_for_watchpoint (@var{addr}, @var{len}) The macro @code{TARGET_REGION_OK_FOR_HW_WATCHPOINT} is set to call this function. It counts the number of debug registers required to watch a given region, and returns a non-zero value if that number is less than 4, the number of debug registers available to x86 processors. @findex i386_stopped_data_address @item i386_stopped_data_address (@var{addr_p}) The target function @code{target_stopped_data_address} is set to call this function. This function examines the breakpoint condition bits in the DR6 Debug Status register, as returned by the @code{I386_DR_LOW_GET_STATUS} macro, and returns the address associated with the first bit that is set in DR6. @findex i386_stopped_by_watchpoint @item i386_stopped_by_watchpoint (void) The macro @code{STOPPED_BY_WATCHPOINT} is set to call this function. The argument passed to @code{STOPPED_BY_WATCHPOINT} is ignored. This function examines the breakpoint condition bits in the DR6 Debug Status register, as returned by the @code{I386_DR_LOW_GET_STATUS} macro, and returns true if any bit is set. Otherwise, false is returned. @findex i386_insert_watchpoint @findex i386_remove_watchpoint @item i386_insert_watchpoint (@var{addr}, @var{len}, @var{type}) @itemx i386_remove_watchpoint (@var{addr}, @var{len}, @var{type}) Insert or remove a watchpoint. The macros @code{target_insert_watchpoint} and @code{target_remove_watchpoint} are set to call these functions. @code{i386_insert_watchpoint} first looks for a debug register which is already set to watch the same region for the same access types; if found, it just increments the reference count of that debug register, thus implementing debug register sharing between watchpoints. If no such register is found, the function looks for a vacant debug register, sets its mirrored value to @var{addr}, sets the mirrored value of DR7 Debug Control register as appropriate for the @var{len} and @var{type} parameters, and then passes the new values of the debug register and DR7 to the inferior by calling @code{I386_DR_LOW_SET_ADDR} and @code{I386_DR_LOW_SET_CONTROL}. If more than one debug register is required to cover the given region, the above process is repeated for each debug register. @code{i386_remove_watchpoint} does the opposite: it resets the address in the mirrored value of the debug register and its read/write and length bits in the mirrored value of DR7, then passes these new values to the inferior via @code{I386_DR_LOW_RESET_ADDR} and @code{I386_DR_LOW_SET_CONTROL}. If a register is shared by several watchpoints, each time a @code{i386_remove_watchpoint} is called, it decrements the reference count, and only calls @code{I386_DR_LOW_RESET_ADDR} and @code{I386_DR_LOW_SET_CONTROL} when the count goes to zero. @findex i386_insert_hw_breakpoint @findex i386_remove_hw_breakpoint @item i386_insert_hw_breakpoint (@var{bp_tgt}) @itemx i386_remove_hw_breakpoint (@var{bp_tgt}) These functions insert and remove hardware-assisted breakpoints. The macros @code{target_insert_hw_breakpoint} and @code{target_remove_hw_breakpoint} are set to call these functions. The argument is a @code{struct bp_target_info *}, as described in the documentation for @code{target_insert_breakpoint}. These functions work like @code{i386_insert_watchpoint} and @code{i386_remove_watchpoint}, respectively, except that they set up the debug registers to watch instruction execution, and each hardware-assisted breakpoint always requires exactly one debug register. @findex i386_cleanup_dregs @item i386_cleanup_dregs (void) This function clears all the reference counts, addresses, and control bits in the mirror images of the debug registers. It doesn't affect the actual debug registers in the inferior process. @end table @noindent @strong{Notes:} @enumerate 1 @item x86 processors support setting watchpoints on I/O reads or writes. However, since no target supports this (as of March 2001), and since @code{enum target_hw_bp_type} doesn't even have an enumeration for I/O watchpoints, this feature is not yet available to @value{GDBN} running on x86. @item x86 processors can enable watchpoints locally, for the current task only, or globally, for all the tasks. For each debug register, there's a bit in the DR7 Debug Control register that determines whether the associated address is watched locally or globally. The current implementation of x86 watchpoint support in @value{GDBN} always sets watchpoints to be locally enabled, since global watchpoints might interfere with the underlying OS and are probably unavailable in many platforms. @end enumerate @section Checkpoints @cindex checkpoints @cindex restart In the abstract, a checkpoint is a point in the execution history of the program, which the user may wish to return to at some later time. Internally, a checkpoint is a saved copy of the program state, including whatever information is required in order to restore the program to that state at a later time. This can be expected to include the state of registers and memory, and may include external state such as the state of open files and devices. There are a number of ways in which checkpoints may be implemented in gdb, e.g.@: as corefiles, as forked processes, and as some opaque method implemented on the target side. A corefile can be used to save an image of target memory and register state, which can in principle be restored later --- but corefiles do not typically include information about external entities such as open files. Currently this method is not implemented in gdb. A forked process can save the state of user memory and registers, as well as some subset of external (kernel) state. This method is used to implement checkpoints on Linux, and in principle might be used on other systems. Some targets, e.g.@: simulators, might have their own built-in method for saving checkpoints, and gdb might be able to take advantage of that capability without necessarily knowing any details of how it is done. @section Observing changes in @value{GDBN} internals @cindex observer pattern interface @cindex notifications about changes in internals In order to function properly, several modules need to be notified when some changes occur in the @value{GDBN} internals. Traditionally, these modules have relied on several paradigms, the most common ones being hooks and gdb-events. Unfortunately, none of these paradigms was versatile enough to become the standard notification mechanism in @value{GDBN}. The fact that they only supported one ``client'' was also a strong limitation. A new paradigm, based on the Observer pattern of the @cite{Design Patterns} book, has therefore been implemented. The goal was to provide a new interface overcoming the issues with the notification mechanisms previously available. This new interface needed to be strongly typed, easy to extend, and versatile enough to be used as the standard interface when adding new notifications. See @ref{GDB Observers} for a brief description of the observers currently implemented in GDB. The rationale for the current implementation is also briefly discussed. @node User Interface @chapter User Interface @value{GDBN} has several user interfaces, of which the traditional command-line interface is perhaps the most familiar. @section Command Interpreter @cindex command interpreter @cindex CLI The command interpreter in @value{GDBN} is fairly simple. It is designed to allow for the set of commands to be augmented dynamically, and also has a recursive subcommand capability, where the first argument to a command may itself direct a lookup on a different command list. For instance, the @samp{set} command just starts a lookup on the @code{setlist} command list, while @samp{set thread} recurses to the @code{set_thread_cmd_list}. @findex add_cmd @findex add_com To add commands in general, use @code{add_cmd}. @code{add_com} adds to the main command list, and should be used for those commands. The usual place to add commands is in the @code{_initialize_@var{xyz}} routines at the ends of most source files. @findex add_setshow_cmd @findex add_setshow_cmd_full To add paired @samp{set} and @samp{show} commands, use @code{add_setshow_cmd} or @code{add_setshow_cmd_full}. The former is a slightly simpler interface which is useful when you don't need to further modify the new command structures, while the latter returns the new command structures for manipulation. @cindex deprecating commands @findex deprecate_cmd Before removing commands from the command set it is a good idea to deprecate them for some time. Use @code{deprecate_cmd} on commands or aliases to set the deprecated flag. @code{deprecate_cmd} takes a @code{struct cmd_list_element} as it's first argument. You can use the return value from @code{add_com} or @code{add_cmd} to deprecate the command immediately after it is created. The first time a command is used the user will be warned and offered a replacement (if one exists). Note that the replacement string passed to @code{deprecate_cmd} should be the full name of the command, i.e., the entire string the user should type at the command line. @anchor{UI-Independent Output} @section UI-Independent Output---the @code{ui_out} Functions @c This section is based on the documentation written by Fernando @c Nasser <fnasser@redhat.com>. @cindex @code{ui_out} functions The @code{ui_out} functions present an abstraction level for the @value{GDBN} output code. They hide the specifics of different user interfaces supported by @value{GDBN}, and thus free the programmer from the need to write several versions of the same code, one each for every UI, to produce output. @subsection Overview and Terminology In general, execution of each @value{GDBN} command produces some sort of output, and can even generate an input request. Output can be generated for the following purposes: @itemize @bullet @item to display a @emph{result} of an operation; @item to convey @emph{info} or produce side-effects of a requested operation; @item to provide a @emph{notification} of an asynchronous event (including progress indication of a prolonged asynchronous operation); @item to display @emph{error messages} (including warnings); @item to show @emph{debug data}; @item to @emph{query} or prompt a user for input (a special case). @end itemize @noindent This section mainly concentrates on how to build result output, although some of it also applies to other kinds of output. Generation of output that displays the results of an operation involves one or more of the following: @itemize @bullet @item output of the actual data @item formatting the output as appropriate for console output, to make it easily readable by humans @item machine oriented formatting--a more terse formatting to allow for easy parsing by programs which read @value{GDBN}'s output @item annotation, whose purpose is to help legacy GUIs to identify interesting parts in the output @end itemize The @code{ui_out} routines take care of the first three aspects. Annotations are provided by separate annotation routines. Note that use of annotations for an interface between a GUI and @value{GDBN} is deprecated. Output can be in the form of a single item, which we call a @dfn{field}; a @dfn{list} consisting of identical fields; a @dfn{tuple} consisting of non-identical fields; or a @dfn{table}, which is a tuple consisting of a header and a body. In a BNF-like form: @table @code @item <table> @expansion{} @code{<header> <body>} @item <header> @expansion{} @code{@{ <column> @}} @item <column> @expansion{} @code{<width> <alignment> <title>} @item <body> @expansion{} @code{@{<row>@}} @end table @subsection General Conventions Most @code{ui_out} routines are of type @code{void}, the exceptions are @code{ui_out_stream_new} (which returns a pointer to the newly created object) and the @code{make_cleanup} routines. The first parameter is always the @code{ui_out} vector object, a pointer to a @code{struct ui_out}. The @var{format} parameter is like in @code{printf} family of functions. When it is present, there must also be a variable list of arguments sufficient used to satisfy the @code{%} specifiers in the supplied format. When a character string argument is not used in a @code{ui_out} function call, a @code{NULL} pointer has to be supplied instead. @subsection Table, Tuple and List Functions @cindex list output functions @cindex table output functions @cindex tuple output functions This section introduces @code{ui_out} routines for building lists, tuples and tables. The routines to output the actual data items (fields) are presented in the next section. To recap: A @dfn{tuple} is a sequence of @dfn{fields}, each field containing information about an object; a @dfn{list} is a sequence of fields where each field describes an identical object. Use the @dfn{table} functions when your output consists of a list of rows (tuples) and the console output should include a heading. Use this even when you are listing just one object but you still want the header. @cindex nesting level in @code{ui_out} functions Tables can not be nested. Tuples and lists can be nested up to a maximum of five levels. The overall structure of the table output code is something like this: @smallexample ui_out_table_begin ui_out_table_header @dots{} ui_out_table_body ui_out_tuple_begin ui_out_field_* @dots{} ui_out_tuple_end @dots{} ui_out_table_end @end smallexample Here is the description of table-, tuple- and list-related @code{ui_out} functions: @deftypefun void ui_out_table_begin (struct ui_out *@var{uiout}, int @var{nbrofcols}, int @var{nr_rows}, const char *@var{tblid}) The function @code{ui_out_table_begin} marks the beginning of the output of a table. It should always be called before any other @code{ui_out} function for a given table. @var{nbrofcols} is the number of columns in the table. @var{nr_rows} is the number of rows in the table. @var{tblid} is an optional string identifying the table. The string pointed to by @var{tblid} is copied by the implementation of @code{ui_out_table_begin}, so the application can free the string if it was @code{malloc}ed. The companion function @code{ui_out_table_end}, described below, marks the end of the table's output. @end deftypefun @deftypefun void ui_out_table_header (struct ui_out *@var{uiout}, int @var{width}, enum ui_align @var{alignment}, const char *@var{colhdr}) @code{ui_out_table_header} provides the header information for a single table column. You call this function several times, one each for every column of the table, after @code{ui_out_table_begin}, but before @code{ui_out_table_body}. The value of @var{width} gives the column width in characters. The value of @var{alignment} is one of @code{left}, @code{center}, and @code{right}, and it specifies how to align the header: left-justify, center, or right-justify it. @var{colhdr} points to a string that specifies the column header; the implementation copies that string, so column header strings in @code{malloc}ed storage can be freed after the call. @end deftypefun @deftypefun void ui_out_table_body (struct ui_out *@var{uiout}) This function delimits the table header from the table body. @end deftypefun @deftypefun void ui_out_table_end (struct ui_out *@var{uiout}) This function signals the end of a table's output. It should be called after the table body has been produced by the list and field output functions. There should be exactly one call to @code{ui_out_table_end} for each call to @code{ui_out_table_begin}, otherwise the @code{ui_out} functions will signal an internal error. @end deftypefun The output of the tuples that represent the table rows must follow the call to @code{ui_out_table_body} and precede the call to @code{ui_out_table_end}. You build a tuple by calling @code{ui_out_tuple_begin} and @code{ui_out_tuple_end}, with suitable calls to functions which actually output fields between them. @deftypefun void ui_out_tuple_begin (struct ui_out *@var{uiout}, const char *@var{id}) This function marks the beginning of a tuple output. @var{id} points to an optional string that identifies the tuple; it is copied by the implementation, and so strings in @code{malloc}ed storage can be freed after the call. @end deftypefun @deftypefun void ui_out_tuple_end (struct ui_out *@var{uiout}) This function signals an end of a tuple output. There should be exactly one call to @code{ui_out_tuple_end} for each call to @code{ui_out_tuple_begin}, otherwise an internal @value{GDBN} error will be signaled. @end deftypefun @deftypefun {struct cleanup *} make_cleanup_ui_out_tuple_begin_end (struct ui_out *@var{uiout}, const char *@var{id}) This function first opens the tuple and then establishes a cleanup (@pxref{Misc Guidelines, Cleanups}) to close the tuple. It provides a convenient and correct implementation of the non-portable@footnote{The function cast is not portable ISO C.} code sequence: @smallexample struct cleanup *old_cleanup; ui_out_tuple_begin (uiout, "..."); old_cleanup = make_cleanup ((void(*)(void *)) ui_out_tuple_end, uiout); @end smallexample @end deftypefun @deftypefun void ui_out_list_begin (struct ui_out *@var{uiout}, const char *@var{id}) This function marks the beginning of a list output. @var{id} points to an optional string that identifies the list; it is copied by the implementation, and so strings in @code{malloc}ed storage can be freed after the call. @end deftypefun @deftypefun void ui_out_list_end (struct ui_out *@var{uiout}) This function signals an end of a list output. There should be exactly one call to @code{ui_out_list_end} for each call to @code{ui_out_list_begin}, otherwise an internal @value{GDBN} error will be signaled. @end deftypefun @deftypefun {struct cleanup *} make_cleanup_ui_out_list_begin_end (struct ui_out *@var{uiout}, const char *@var{id}) Similar to @code{make_cleanup_ui_out_tuple_begin_end}, this function opens a list and then establishes cleanup (@pxref{Misc Guidelines, Cleanups}) that will close the list. @end deftypefun @subsection Item Output Functions @cindex item output functions @cindex field output functions @cindex data output The functions described below produce output for the actual data items, or fields, which contain information about the object. Choose the appropriate function accordingly to your particular needs. @deftypefun void ui_out_field_fmt (struct ui_out *@var{uiout}, char *@var{fldname}, char *@var{format}, ...) This is the most general output function. It produces the representation of the data in the variable-length argument list according to formatting specifications in @var{format}, a @code{printf}-like format string. The optional argument @var{fldname} supplies the name of the field. The data items themselves are supplied as additional arguments after @var{format}. This generic function should be used only when it is not possible to use one of the specialized versions (see below). @end deftypefun @deftypefun void ui_out_field_int (struct ui_out *@var{uiout}, const char *@var{fldname}, int @var{value}) This function outputs a value of an @code{int} variable. It uses the @code{"%d"} output conversion specification. @var{fldname} specifies the name of the field. @end deftypefun @deftypefun void ui_out_field_fmt_int (struct ui_out *@var{uiout}, int @var{width}, enum ui_align @var{alignment}, const char *@var{fldname}, int @var{value}) This function outputs a value of an @code{int} variable. It differs from @code{ui_out_field_int} in that the caller specifies the desired @var{width} and @var{alignment} of the output. @var{fldname} specifies the name of the field. @end deftypefun @deftypefun void ui_out_field_core_addr (struct ui_out *@var{uiout}, const char *@var{fldname}, struct gdbarch *@var{gdbarch}, CORE_ADDR @var{address}) This function outputs an address as appropriate for @var{gdbarch}. @end deftypefun @deftypefun void ui_out_field_string (struct ui_out *@var{uiout}, const char *@var{fldname}, const char *@var{string}) This function outputs a string using the @code{"%s"} conversion specification. @end deftypefun Sometimes, there's a need to compose your output piece by piece using functions that operate on a stream, such as @code{value_print} or @code{fprintf_symbol_filtered}. These functions accept an argument of the type @code{struct ui_file *}, a pointer to a @code{ui_file} object used to store the data stream used for the output. When you use one of these functions, you need a way to pass their results stored in a @code{ui_file} object to the @code{ui_out} functions. To this end, you first create a @code{ui_stream} object by calling @code{ui_out_stream_new}, pass the @code{stream} member of that @code{ui_stream} object to @code{value_print} and similar functions, and finally call @code{ui_out_field_stream} to output the field you constructed. When the @code{ui_stream} object is no longer needed, you should destroy it and free its memory by calling @code{ui_out_stream_delete}. @deftypefun {struct ui_stream *} ui_out_stream_new (struct ui_out *@var{uiout}) This function creates a new @code{ui_stream} object which uses the same output methods as the @code{ui_out} object whose pointer is passed in @var{uiout}. It returns a pointer to the newly created @code{ui_stream} object. @end deftypefun @deftypefun void ui_out_stream_delete (struct ui_stream *@var{streambuf}) This functions destroys a @code{ui_stream} object specified by @var{streambuf}. @end deftypefun @deftypefun void ui_out_field_stream (struct ui_out *@var{uiout}, const char *@var{fieldname}, struct ui_stream *@var{streambuf}) This function consumes all the data accumulated in @code{streambuf->stream} and outputs it like @code{ui_out_field_string} does. After a call to @code{ui_out_field_stream}, the accumulated data no longer exists, but the stream is still valid and may be used for producing more fields. @end deftypefun @strong{Important:} If there is any chance that your code could bail out before completing output generation and reaching the point where @code{ui_out_stream_delete} is called, it is necessary to set up a cleanup, to avoid leaking memory and other resources. Here's a skeleton code to do that: @smallexample struct ui_stream *mybuf = ui_out_stream_new (uiout); struct cleanup *old = make_cleanup (ui_out_stream_delete, mybuf); ... do_cleanups (old); @end smallexample If the function already has the old cleanup chain set (for other kinds of cleanups), you just have to add your cleanup to it: @smallexample mybuf = ui_out_stream_new (uiout); make_cleanup (ui_out_stream_delete, mybuf); @end smallexample Note that with cleanups in place, you should not call @code{ui_out_stream_delete} directly, or you would attempt to free the same buffer twice. @subsection Utility Output Functions @deftypefun void ui_out_field_skip (struct ui_out *@var{uiout}, const char *@var{fldname}) This function skips a field in a table. Use it if you have to leave an empty field without disrupting the table alignment. The argument @var{fldname} specifies a name for the (missing) filed. @end deftypefun @deftypefun void ui_out_text (struct ui_out *@var{uiout}, const char *@var{string}) This function outputs the text in @var{string} in a way that makes it easy to be read by humans. For example, the console implementation of this method filters the text through a built-in pager, to prevent it from scrolling off the visible portion of the screen. Use this function for printing relatively long chunks of text around the actual field data: the text it produces is not aligned according to the table's format. Use @code{ui_out_field_string} to output a string field, and use @code{ui_out_message}, described below, to output short messages. @end deftypefun @deftypefun void ui_out_spaces (struct ui_out *@var{uiout}, int @var{nspaces}) This function outputs @var{nspaces} spaces. It is handy to align the text produced by @code{ui_out_text} with the rest of the table or list. @end deftypefun @deftypefun void ui_out_message (struct ui_out *@var{uiout}, int @var{verbosity}, const char *@var{format}, ...) This function produces a formatted message, provided that the current verbosity level is at least as large as given by @var{verbosity}. The current verbosity level is specified by the user with the @samp{set verbositylevel} command.@footnote{As of this writing (April 2001), setting verbosity level is not yet implemented, and is always returned as zero. So calling @code{ui_out_message} with a @var{verbosity} argument more than zero will cause the message to never be printed.} @end deftypefun @deftypefun void ui_out_wrap_hint (struct ui_out *@var{uiout}, char *@var{indent}) This function gives the console output filter (a paging filter) a hint of where to break lines which are too long. Ignored for all other output consumers. @var{indent}, if non-@code{NULL}, is the string to be printed to indent the wrapped text on the next line; it must remain accessible until the next call to @code{ui_out_wrap_hint}, or until an explicit newline is produced by one of the other functions. If @var{indent} is @code{NULL}, the wrapped text will not be indented. @end deftypefun @deftypefun void ui_out_flush (struct ui_out *@var{uiout}) This function flushes whatever output has been accumulated so far, if the UI buffers output. @end deftypefun @subsection Examples of Use of @code{ui_out} functions @cindex using @code{ui_out} functions @cindex @code{ui_out} functions, usage examples This section gives some practical examples of using the @code{ui_out} functions to generalize the old console-oriented code in @value{GDBN}. The examples all come from functions defined on the @file{breakpoints.c} file. This example, from the @code{breakpoint_1} function, shows how to produce a table. The original code was: @smallexample if (!found_a_breakpoint++) @{ annotate_breakpoints_headers (); annotate_field (0); printf_filtered ("Num "); annotate_field (1); printf_filtered ("Type "); annotate_field (2); printf_filtered ("Disp "); annotate_field (3); printf_filtered ("Enb "); if (addressprint) @{ annotate_field (4); printf_filtered ("Address "); @} annotate_field (5); printf_filtered ("What\n"); annotate_breakpoints_table (); @} @end smallexample Here's the new version: @smallexample nr_printable_breakpoints = @dots{}; if (addressprint) ui_out_table_begin (ui, 6, nr_printable_breakpoints, "BreakpointTable"); else ui_out_table_begin (ui, 5, nr_printable_breakpoints, "BreakpointTable"); if (nr_printable_breakpoints > 0) annotate_breakpoints_headers (); if (nr_printable_breakpoints > 0) annotate_field (0); ui_out_table_header (uiout, 3, ui_left, "number", "Num"); /* 1 */ if (nr_printable_breakpoints > 0) annotate_field (1); ui_out_table_header (uiout, 14, ui_left, "type", "Type"); /* 2 */ if (nr_printable_breakpoints > 0) annotate_field (2); ui_out_table_header (uiout, 4, ui_left, "disp", "Disp"); /* 3 */ if (nr_printable_breakpoints > 0) annotate_field (3); ui_out_table_header (uiout, 3, ui_left, "enabled", "Enb"); /* 4 */ if (addressprint) @{ if (nr_printable_breakpoints > 0) annotate_field (4); if (print_address_bits <= 32) ui_out_table_header (uiout, 10, ui_left, "addr", "Address");/* 5 */ else ui_out_table_header (uiout, 18, ui_left, "addr", "Address");/* 5 */ @} if (nr_printable_breakpoints > 0) annotate_field (5); ui_out_table_header (uiout, 40, ui_noalign, "what", "What"); /* 6 */ ui_out_table_body (uiout); if (nr_printable_breakpoints > 0) annotate_breakpoints_table (); @end smallexample This example, from the @code{print_one_breakpoint} function, shows how to produce the actual data for the table whose structure was defined in the above example. The original code was: @smallexample annotate_record (); annotate_field (0); printf_filtered ("%-3d ", b->number); annotate_field (1); if ((int)b->type > (sizeof(bptypes)/sizeof(bptypes[0])) || ((int) b->type != bptypes[(int) b->type].type)) internal_error ("bptypes table does not describe type #%d.", (int)b->type); printf_filtered ("%-14s ", bptypes[(int)b->type].description); annotate_field (2); printf_filtered ("%-4s ", bpdisps[(int)b->disposition]); annotate_field (3); printf_filtered ("%-3c ", bpenables[(int)b->enable]); @dots{} @end smallexample This is the new version: @smallexample annotate_record (); ui_out_tuple_begin (uiout, "bkpt"); annotate_field (0); ui_out_field_int (uiout, "number", b->number); annotate_field (1); if (((int) b->type > (sizeof (bptypes) / sizeof (bptypes[0]))) || ((int) b->type != bptypes[(int) b->type].type)) internal_error ("bptypes table does not describe type #%d.", (int) b->type); ui_out_field_string (uiout, "type", bptypes[(int)b->type].description); annotate_field (2); ui_out_field_string (uiout, "disp", bpdisps[(int)b->disposition]); annotate_field (3); ui_out_field_fmt (uiout, "enabled", "%c", bpenables[(int)b->enable]); @dots{} @end smallexample This example, also from @code{print_one_breakpoint}, shows how to produce a complicated output field using the @code{print_expression} functions which requires a stream to be passed. It also shows how to automate stream destruction with cleanups. The original code was: @smallexample annotate_field (5); print_expression (b->exp, gdb_stdout); @end smallexample The new version is: @smallexample struct ui_stream *stb = ui_out_stream_new (uiout); struct cleanup *old_chain = make_cleanup_ui_out_stream_delete (stb); ... annotate_field (5); print_expression (b->exp, stb->stream); ui_out_field_stream (uiout, "what", local_stream); @end smallexample This example, also from @code{print_one_breakpoint}, shows how to use @code{ui_out_text} and @code{ui_out_field_string}. The original code was: @smallexample annotate_field (5); if (b->dll_pathname == NULL) printf_filtered ("<any library> "); else printf_filtered ("library \"%s\" ", b->dll_pathname); @end smallexample It became: @smallexample annotate_field (5); if (b->dll_pathname == NULL) @{ ui_out_field_string (uiout, "what", "<any library>"); ui_out_spaces (uiout, 1); @} else @{ ui_out_text (uiout, "library \""); ui_out_field_string (uiout, "what", b->dll_pathname); ui_out_text (uiout, "\" "); @} @end smallexample The following example from @code{print_one_breakpoint} shows how to use @code{ui_out_field_int} and @code{ui_out_spaces}. The original code was: @smallexample annotate_field (5); if (b->forked_inferior_pid != 0) printf_filtered ("process %d ", b->forked_inferior_pid); @end smallexample It became: @smallexample annotate_field (5); if (b->forked_inferior_pid != 0) @{ ui_out_text (uiout, "process "); ui_out_field_int (uiout, "what", b->forked_inferior_pid); ui_out_spaces (uiout, 1); @} @end smallexample Here's an example of using @code{ui_out_field_string}. The original code was: @smallexample annotate_field (5); if (b->exec_pathname != NULL) printf_filtered ("program \"%s\" ", b->exec_pathname); @end smallexample It became: @smallexample annotate_field (5); if (b->exec_pathname != NULL) @{ ui_out_text (uiout, "program \""); ui_out_field_string (uiout, "what", b->exec_pathname); ui_out_text (uiout, "\" "); @} @end smallexample Finally, here's an example of printing an address. The original code: @smallexample annotate_field (4); printf_filtered ("%s ", hex_string_custom ((unsigned long) b->address, 8)); @end smallexample It became: @smallexample annotate_field (4); ui_out_field_core_addr (uiout, "Address", b->address); @end smallexample @section Console Printing @section TUI @node libgdb @chapter libgdb @section libgdb 1.0 @cindex @code{libgdb} @code{libgdb} 1.0 was an abortive project of years ago. The theory was to provide an API to @value{GDBN}'s functionality. @section libgdb 2.0 @cindex @code{libgdb} @code{libgdb} 2.0 is an ongoing effort to update @value{GDBN} so that is better able to support graphical and other environments. Since @code{libgdb} development is on-going, its architecture is still evolving. The following components have so far been identified: @itemize @bullet @item Observer - @file{gdb-events.h}. @item Builder - @file{ui-out.h} @item Event Loop - @file{event-loop.h} @item Library - @file{gdb.h} @end itemize The model that ties these components together is described below. @section The @code{libgdb} Model A client of @code{libgdb} interacts with the library in two ways. @itemize @bullet @item As an observer (using @file{gdb-events}) receiving notifications from @code{libgdb} of any internal state changes (break point changes, run state, etc). @item As a client querying @code{libgdb} (using the @file{ui-out} builder) to obtain various status values from @value{GDBN}. @end itemize Since @code{libgdb} could have multiple clients (e.g., a GUI supporting the existing @value{GDBN} CLI), those clients must co-operate when controlling @code{libgdb}. In particular, a client must ensure that @code{libgdb} is idle (i.e.@: no other client is using @code{libgdb}) before responding to a @file{gdb-event} by making a query. @section CLI support At present @value{GDBN}'s CLI is very much entangled in with the core of @code{libgdb}. Consequently, a client wishing to include the CLI in their interface needs to carefully co-ordinate its own and the CLI's requirements. It is suggested that the client set @code{libgdb} up to be bi-modal (alternate between CLI and client query modes). The notes below sketch out the theory: @itemize @bullet @item The client registers itself as an observer of @code{libgdb}. @item The client create and install @code{cli-out} builder using its own versions of the @code{ui-file} @code{gdb_stderr}, @code{gdb_stdtarg} and @code{gdb_stdout} streams. @item The client creates a separate custom @code{ui-out} builder that is only used while making direct queries to @code{libgdb}. @end itemize When the client receives input intended for the CLI, it simply passes it along. Since the @code{cli-out} builder is installed by default, all the CLI output in response to that command is routed (pronounced rooted) through to the client controlled @code{gdb_stdout} et.@: al.@: streams. At the same time, the client is kept abreast of internal changes by virtue of being a @code{libgdb} observer. The only restriction on the client is that it must wait until @code{libgdb} becomes idle before initiating any queries (using the client's custom builder). @section @code{libgdb} components @subheading Observer - @file{gdb-events.h} @file{gdb-events} provides the client with a very raw mechanism that can be used to implement an observer. At present it only allows for one observer and that observer must, internally, handle the need to delay the processing of any event notifications until after @code{libgdb} has finished the current command. @subheading Builder - @file{ui-out.h} @file{ui-out} provides the infrastructure necessary for a client to create a builder. That builder is then passed down to @code{libgdb} when doing any queries. @subheading Event Loop - @file{event-loop.h} @c There could be an entire section on the event-loop @file{event-loop}, currently non-re-entrant, provides a simple event loop. A client would need to either plug its self into this loop or, implement a new event-loop that @value{GDBN} would use. The event-loop will eventually be made re-entrant. This is so that @value{GDBN} can better handle the problem of some commands blocking instead of returning. @subheading Library - @file{gdb.h} @file{libgdb} is the most obvious component of this system. It provides the query interface. Each function is parameterized by a @code{ui-out} builder. The result of the query is constructed using that builder before the query function returns. @node Values @chapter Values @section Values @cindex values @cindex @code{value} structure @value{GDBN} uses @code{struct value}, or @dfn{values}, as an internal abstraction for the representation of a variety of inferior objects and @value{GDBN} convenience objects. Values have an associated @code{struct type}, that describes a virtual view of the raw data or object stored in or accessed through the value. A value is in addition discriminated by its lvalue-ness, given its @code{enum lval_type} enumeration type: @cindex @code{lval_type} enumeration, for values. @table @code @item @code{not_lval} This value is not an lval. It can't be assigned to. @item @code{lval_memory} This value represents an object in memory. @item @code{lval_register} This value represents an object that lives in a register. @item @code{lval_internalvar} Represents the value of an internal variable. @item @code{lval_internalvar_component} Represents part of a @value{GDBN} internal variable. E.g., a structure field. @cindex computed values @item @code{lval_computed} These are ``computed'' values. They allow creating specialized value objects for specific purposes, all abstracted away from the core value support code. The creator of such a value writes specialized functions to handle the reading and writing to/from the value's backend data, and optionally, a ``copy operator'' and a ``destructor''. Pointers to these functions are stored in a @code{struct lval_funcs} instance (declared in @file{value.h}), and passed to the @code{allocate_computed_value} function, as in the example below. @smallexample static void nil_value_read (struct value *v) @{ /* This callback reads data from some backend, and stores it in V. In this case, we always read null data. You'll want to fill in something more interesting. */ memset (value_contents_all_raw (v), value_offset (v), TYPE_LENGTH (value_type (v))); @} static void nil_value_write (struct value *v, struct value *fromval) @{ /* Takes the data from FROMVAL and stores it in the backend of V. */ to_oblivion (value_contents_all_raw (fromval), value_offset (v), TYPE_LENGTH (value_type (fromval))); @} static struct lval_funcs nil_value_funcs = @{ nil_value_read, nil_value_write @}; struct value * make_nil_value (void) @{ struct type *type; struct value *v; type = make_nils_type (); v = allocate_computed_value (type, &nil_value_funcs, NULL); return v; @} @end smallexample See the implementation of the @code{$_siginfo} convenience variable in @file{infrun.c} as a real example use of lval_computed. @end table @node Stack Frames @chapter Stack Frames @cindex frame @cindex call stack frame A frame is a construct that @value{GDBN} uses to keep track of calling and called functions. @cindex unwind frame @value{GDBN}'s frame model, a fresh design, was implemented with the need to support @sc{dwarf}'s Call Frame Information in mind. In fact, the term ``unwind'' is taken directly from that specification. Developers wishing to learn more about unwinders, are encouraged to read the @sc{dwarf} specification, available from @url{http://www.dwarfstd.org}. @findex frame_register_unwind @findex get_frame_register @value{GDBN}'s model is that you find a frame's registers by ``unwinding'' them from the next younger frame. That is, @samp{get_frame_register} which returns the value of a register in frame #1 (the next-to-youngest frame), is implemented by calling frame #0's @code{frame_register_unwind} (the youngest frame). But then the obvious question is: how do you access the registers of the youngest frame itself? @cindex sentinel frame @findex get_frame_type @vindex SENTINEL_FRAME To answer this question, @value{GDBN} has the @dfn{sentinel} frame, the ``-1st'' frame. Unwinding registers from the sentinel frame gives you the current values of the youngest real frame's registers. If @var{f} is a sentinel frame, then @code{get_frame_type (@var{f}) @equiv{} SENTINEL_FRAME}. @section Selecting an Unwinder @findex frame_unwind_prepend_unwinder @findex frame_unwind_append_unwinder The architecture registers a list of frame unwinders (@code{struct frame_unwind}), using the functions @code{frame_unwind_prepend_unwinder} and @code{frame_unwind_append_unwinder}. Each unwinder includes a sniffer. Whenever @value{GDBN} needs to unwind a frame (to fetch the previous frame's registers or the current frame's ID), it calls registered sniffers in order to find one which recognizes the frame. The first time a sniffer returns non-zero, the corresponding unwinder is assigned to the frame. @section Unwinding the Frame ID @cindex frame ID Every frame has an associated ID, of type @code{struct frame_id}. The ID includes the stack base and function start address for the frame. The ID persists through the entire life of the frame, including while other called frames are running; it is used to locate an appropriate @code{struct frame_info} from the cache. Every time the inferior stops, and at various other times, the frame cache is flushed. Because of this, parts of @value{GDBN} which need to keep track of individual frames cannot use pointers to @code{struct frame_info}. A frame ID provides a stable reference to a frame, even when the unwinder must be run again to generate a new @code{struct frame_info} for the same frame. The frame's unwinder's @code{this_id} method is called to find the ID. Note that this is different from register unwinding, where the next frame's @code{prev_register} is called to unwind this frame's registers. Both stack base and function address are required to identify the frame, because a recursive function has the same function address for two consecutive frames and a leaf function may have the same stack address as its caller. On some platforms, a third address is part of the ID to further disambiguate frames---for instance, on IA-64 the separate register stack address is included in the ID. An invalid frame ID (@code{outer_frame_id}) returned from the @code{this_id} method means to stop unwinding after this frame. @code{null_frame_id} is another invalid frame ID which should be used when there is no frame. For instance, certain breakpoints are attached to a specific frame, and that frame is identified through its frame ID (we use this to implement the "finish" command). Using @code{null_frame_id} as the frame ID for a given breakpoint means that the breakpoint is not specific to any frame. The @code{this_id} method should never return @code{null_frame_id}. @section Unwinding Registers Each unwinder includes a @code{prev_register} method. This method takes a frame, an associated cache pointer, and a register number. It returns a @code{struct value *} describing the requested register, as saved by this frame. This is the value of the register that is current in this frame's caller. The returned value must have the same type as the register. It may have any lvalue type. In most circumstances one of these routines will generate the appropriate value: @table @code @item frame_unwind_got_optimized @findex frame_unwind_got_optimized This register was not saved. @item frame_unwind_got_register @findex frame_unwind_got_register This register was copied into another register in this frame. This is also used for unchanged registers; they are ``copied'' into the same register. @item frame_unwind_got_memory @findex frame_unwind_got_memory This register was saved in memory. @item frame_unwind_got_constant @findex frame_unwind_got_constant This register was not saved, but the unwinder can compute the previous value some other way. @item frame_unwind_got_address @findex frame_unwind_got_address Same as @code{frame_unwind_got_constant}, except that the value is a target address. This is frequently used for the stack pointer, which is not explicitly saved but has a known offset from this frame's stack pointer. For architectures with a flat unified address space, this is generally the same as @code{frame_unwind_got_constant}. @end table @node Symbol Handling @chapter Symbol Handling Symbols are a key part of @value{GDBN}'s operation. Symbols include variables, functions, and types. Symbol information for a large program can be truly massive, and reading of symbol information is one of the major performance bottlenecks in @value{GDBN}; it can take many minutes to process it all. Studies have shown that nearly all the time spent is computational, rather than file reading. One of the ways for @value{GDBN} to provide a good user experience is to start up quickly, taking no more than a few seconds. It is simply not possible to process all of a program's debugging info in that time, and so we attempt to handle symbols incrementally. For instance, we create @dfn{partial symbol tables} consisting of only selected symbols, and only expand them to full symbol tables when necessary. @section Symbol Reading @cindex symbol reading @cindex reading of symbols @cindex symbol files @value{GDBN} reads symbols from @dfn{symbol files}. The usual symbol file is the file containing the program which @value{GDBN} is debugging. @value{GDBN} can be directed to use a different file for symbols (with the @samp{symbol-file} command), and it can also read more symbols via the @samp{add-file} and @samp{load} commands. In addition, it may bring in more symbols while loading shared libraries. @findex find_sym_fns Symbol files are initially opened by code in @file{symfile.c} using the BFD library (@pxref{Support Libraries}). BFD identifies the type of the file by examining its header. @code{find_sym_fns} then uses this identification to locate a set of symbol-reading functions. @findex add_symtab_fns @cindex @code{sym_fns} structure @cindex adding a symbol-reading module Symbol-reading modules identify themselves to @value{GDBN} by calling @code{add_symtab_fns} during their module initialization. The argument to @code{add_symtab_fns} is a @code{struct sym_fns} which contains the name (or name prefix) of the symbol format, the length of the prefix, and pointers to four functions. These functions are called at various times to process symbol files whose identification matches the specified prefix. The functions supplied by each module are: @table @code @item @var{xyz}_symfile_init(struct sym_fns *sf) @cindex secondary symbol file Called from @code{symbol_file_add} when we are about to read a new symbol file. This function should clean up any internal state (possibly resulting from half-read previous files, for example) and prepare to read a new symbol file. Note that the symbol file which we are reading might be a new ``main'' symbol file, or might be a secondary symbol file whose symbols are being added to the existing symbol table. The argument to @code{@var{xyz}_symfile_init} is a newly allocated @code{struct sym_fns} whose @code{bfd} field contains the BFD for the new symbol file being read. Its @code{private} field has been zeroed, and can be modified as desired. Typically, a struct of private information will be @code{malloc}'d, and a pointer to it will be placed in the @code{private} field. There is no result from @code{@var{xyz}_symfile_init}, but it can call @code{error} if it detects an unavoidable problem. @item @var{xyz}_new_init() Called from @code{symbol_file_add} when discarding existing symbols. This function needs only handle the symbol-reading module's internal state; the symbol table data structures visible to the rest of @value{GDBN} will be discarded by @code{symbol_file_add}. It has no arguments and no result. It may be called after @code{@var{xyz}_symfile_init}, if a new symbol table is being read, or may be called alone if all symbols are simply being discarded. @item @var{xyz}_symfile_read(struct sym_fns *sf, CORE_ADDR addr, int mainline) Called from @code{symbol_file_add} to actually read the symbols from a symbol-file into a set of psymtabs or symtabs. @code{sf} points to the @code{struct sym_fns} originally passed to @code{@var{xyz}_sym_init} for possible initialization. @code{addr} is the offset between the file's specified start address and its true address in memory. @code{mainline} is 1 if this is the main symbol table being read, and 0 if a secondary symbol file (e.g., shared library or dynamically loaded file) is being read.@refill @end table In addition, if a symbol-reading module creates psymtabs when @var{xyz}_symfile_read is called, these psymtabs will contain a pointer to a function @code{@var{xyz}_psymtab_to_symtab}, which can be called from any point in the @value{GDBN} symbol-handling code. @table @code @item @var{xyz}_psymtab_to_symtab (struct partial_symtab *pst) Called from @code{psymtab_to_symtab} (or the @code{PSYMTAB_TO_SYMTAB} macro) if the psymtab has not already been read in and had its @code{pst->symtab} pointer set. The argument is the psymtab to be fleshed-out into a symtab. Upon return, @code{pst->readin} should have been set to 1, and @code{pst->symtab} should contain a pointer to the new corresponding symtab, or zero if there were no symbols in that part of the symbol file. @end table @section Partial Symbol Tables @value{GDBN} has three types of symbol tables: @itemize @bullet @cindex full symbol table @cindex symtabs @item Full symbol tables (@dfn{symtabs}). These contain the main information about symbols and addresses. @cindex psymtabs @item Partial symbol tables (@dfn{psymtabs}). These contain enough information to know when to read the corresponding part of the full symbol table. @cindex minimal symbol table @cindex minsymtabs @item Minimal symbol tables (@dfn{msymtabs}). These contain information gleaned from non-debugging symbols. @end itemize @cindex partial symbol table This section describes partial symbol tables. A psymtab is constructed by doing a very quick pass over an executable file's debugging information. Small amounts of information are extracted---enough to identify which parts of the symbol table will need to be re-read and fully digested later, when the user needs the information. The speed of this pass causes @value{GDBN} to start up very quickly. Later, as the detailed rereading occurs, it occurs in small pieces, at various times, and the delay therefrom is mostly invisible to the user. @c (@xref{Symbol Reading}.) The symbols that show up in a file's psymtab should be, roughly, those visible to the debugger's user when the program is not running code from that file. These include external symbols and types, static symbols and types, and @code{enum} values declared at file scope. The psymtab also contains the range of instruction addresses that the full symbol table would represent. @cindex finding a symbol @cindex symbol lookup The idea is that there are only two ways for the user (or much of the code in the debugger) to reference a symbol: @itemize @bullet @findex find_pc_function @findex find_pc_line @item By its address (e.g., execution stops at some address which is inside a function in this file). The address will be noticed to be in the range of this psymtab, and the full symtab will be read in. @code{find_pc_function}, @code{find_pc_line}, and other @code{find_pc_@dots{}} functions handle this. @cindex lookup_symbol @item By its name (e.g., the user asks to print a variable, or set a breakpoint on a function). Global names and file-scope names will be found in the psymtab, which will cause the symtab to be pulled in. Local names will have to be qualified by a global name, or a file-scope name, in which case we will have already read in the symtab as we evaluated the qualifier. Or, a local symbol can be referenced when we are ``in'' a local scope, in which case the first case applies. @code{lookup_symbol} does most of the work here. @end itemize The only reason that psymtabs exist is to cause a symtab to be read in at the right moment. Any symbol that can be elided from a psymtab, while still causing that to happen, should not appear in it. Since psymtabs don't have the idea of scope, you can't put local symbols in them anyway. Psymtabs don't have the idea of the type of a symbol, either, so types need not appear, unless they will be referenced by name. It is a bug for @value{GDBN} to behave one way when only a psymtab has been read, and another way if the corresponding symtab has been read in. Such bugs are typically caused by a psymtab that does not contain all the visible symbols, or which has the wrong instruction address ranges. The psymtab for a particular section of a symbol file (objfile) could be thrown away after the symtab has been read in. The symtab should always be searched before the psymtab, so the psymtab will never be used (in a bug-free environment). Currently, psymtabs are allocated on an obstack, and all the psymbols themselves are allocated in a pair of large arrays on an obstack, so there is little to be gained by trying to free them unless you want to do a lot more work. Whether or not psymtabs are created depends on the objfile's symbol reader. The core of @value{GDBN} hides the details of partial symbols and partial symbol tables behind a set of function pointers known as the @dfn{quick symbol functions}. These are documented in @file{symfile.h}. @section Types @unnumberedsubsec Fundamental Types (e.g., @code{FT_VOID}, @code{FT_BOOLEAN}). @cindex fundamental types These are the fundamental types that @value{GDBN} uses internally. Fundamental types from the various debugging formats (stabs, ELF, etc) are mapped into one of these. They are basically a union of all fundamental types that @value{GDBN} knows about for all the languages that @value{GDBN} knows about. @unnumberedsubsec Type Codes (e.g., @code{TYPE_CODE_PTR}, @code{TYPE_CODE_ARRAY}). @cindex type codes Each time @value{GDBN} builds an internal type, it marks it with one of these types. The type may be a fundamental type, such as @code{TYPE_CODE_INT}, or a derived type, such as @code{TYPE_CODE_PTR} which is a pointer to another type. Typically, several @code{FT_*} types map to one @code{TYPE_CODE_*} type, and are distinguished by other members of the type struct, such as whether the type is signed or unsigned, and how many bits it uses. @unnumberedsubsec Builtin Types (e.g., @code{builtin_type_void}, @code{builtin_type_char}). These are instances of type structs that roughly correspond to fundamental types and are created as global types for @value{GDBN} to use for various ugly historical reasons. We eventually want to eliminate these. Note for example that @code{builtin_type_int} initialized in @file{gdbtypes.c} is basically the same as a @code{TYPE_CODE_INT} type that is initialized in @file{c-lang.c} for an @code{FT_INTEGER} fundamental type. The difference is that the @code{builtin_type} is not associated with any particular objfile, and only one instance exists, while @file{c-lang.c} builds as many @code{TYPE_CODE_INT} types as needed, with each one associated with some particular objfile. @section Object File Formats @cindex object file formats @subsection a.out @cindex @code{a.out} format The @code{a.out} format is the original file format for Unix. It consists of three sections: @code{text}, @code{data}, and @code{bss}, which are for program code, initialized data, and uninitialized data, respectively. The @code{a.out} format is so simple that it doesn't have any reserved place for debugging information. (Hey, the original Unix hackers used @samp{adb}, which is a machine-language debugger!) The only debugging format for @code{a.out} is stabs, which is encoded as a set of normal symbols with distinctive attributes. The basic @code{a.out} reader is in @file{dbxread.c}. @subsection COFF @cindex COFF format The COFF format was introduced with System V Release 3 (SVR3) Unix. COFF files may have multiple sections, each prefixed by a header. The number of sections is limited. The COFF specification includes support for debugging. Although this was a step forward, the debugging information was woefully limited. For instance, it was not possible to represent code that came from an included file. GNU's COFF-using configs often use stabs-type info, encapsulated in special sections. The COFF reader is in @file{coffread.c}. @subsection ECOFF @cindex ECOFF format ECOFF is an extended COFF originally introduced for Mips and Alpha workstations. The basic ECOFF reader is in @file{mipsread.c}. @subsection XCOFF @cindex XCOFF format The IBM RS/6000 running AIX uses an object file format called XCOFF. The COFF sections, symbols, and line numbers are used, but debugging symbols are @code{dbx}-style stabs whose strings are located in the @code{.debug} section (rather than the string table). For more information, see @ref{Top,,,stabs,The Stabs Debugging Format}. The shared library scheme has a clean interface for figuring out what shared libraries are in use, but the catch is that everything which refers to addresses (symbol tables and breakpoints at least) needs to be relocated for both shared libraries and the main executable. At least using the standard mechanism this can only be done once the program has been run (or the core file has been read). @subsection PE @cindex PE-COFF format Windows 95 and NT use the PE (@dfn{Portable Executable}) format for their executables. PE is basically COFF with additional headers. While BFD includes special PE support, @value{GDBN} needs only the basic COFF reader. @subsection ELF @cindex ELF format The ELF format came with System V Release 4 (SVR4) Unix. ELF is similar to COFF in being organized into a number of sections, but it removes many of COFF's limitations. Debugging info may be either stabs encapsulated in ELF sections, or more commonly these days, DWARF. The basic ELF reader is in @file{elfread.c}. @subsection SOM @cindex SOM format SOM is HP's object file and debug format (not to be confused with IBM's SOM, which is a cross-language ABI). The SOM reader is in @file{somread.c}. @section Debugging File Formats This section describes characteristics of debugging information that are independent of the object file format. @subsection stabs @cindex stabs debugging info @code{stabs} started out as special symbols within the @code{a.out} format. Since then, it has been encapsulated into other file formats, such as COFF and ELF. While @file{dbxread.c} does some of the basic stab processing, including for encapsulated versions, @file{stabsread.c} does the real work. @subsection COFF @cindex COFF debugging info The basic COFF definition includes debugging information. The level of support is minimal and non-extensible, and is not often used. @subsection Mips debug (Third Eye) @cindex ECOFF debugging info ECOFF includes a definition of a special debug format. The file @file{mdebugread.c} implements reading for this format. @c mention DWARF 1 as a formerly-supported format @subsection DWARF 2 @cindex DWARF 2 debugging info DWARF 2 is an improved but incompatible version of DWARF 1. The DWARF 2 reader is in @file{dwarf2read.c}. @subsection Compressed DWARF 2 @cindex Compressed DWARF 2 debugging info Compressed DWARF 2 is not technically a separate debugging format, but merely DWARF 2 debug information that has been compressed. In this format, every object-file section holding DWARF 2 debugging information is compressed and prepended with a header. (The section is also typically renamed, so a section called @code{.debug_info} in a DWARF 2 binary would be called @code{.zdebug_info} in a compressed DWARF 2 binary.) The header is 12 bytes long: @itemize @bullet @item 4 bytes: the literal string ``ZLIB'' @item 8 bytes: the uncompressed size of the section, in big-endian byte order. @end itemize The same reader is used for both compressed an normal DWARF 2 info. Section decompression is done in @code{zlib_decompress_section} in @file{dwarf2read.c}. @subsection DWARF 3 @cindex DWARF 3 debugging info DWARF 3 is an improved version of DWARF 2. @subsection SOM @cindex SOM debugging info Like COFF, the SOM definition includes debugging information. @section Adding a New Symbol Reader to @value{GDBN} @cindex adding debugging info reader If you are using an existing object file format (@code{a.out}, COFF, ELF, etc), there is probably little to be done. If you need to add a new object file format, you must first add it to BFD. This is beyond the scope of this document. You must then arrange for the BFD code to provide access to the debugging symbols. Generally @value{GDBN} will have to call swapping routines from BFD and a few other BFD internal routines to locate the debugging information. As much as possible, @value{GDBN} should not depend on the BFD internal data structures. For some targets (e.g., COFF), there is a special transfer vector used to call swapping routines, since the external data structures on various platforms have different sizes and layouts. Specialized routines that will only ever be implemented by one object file format may be called directly. This interface should be described in a file @file{bfd/lib@var{xyz}.h}, which is included by @value{GDBN}. @section Memory Management for Symbol Files Most memory associated with a loaded symbol file is stored on its @code{objfile_obstack}. This includes symbols, types, namespace data, and other information produced by the symbol readers. Because this data lives on the objfile's obstack, it is automatically released when the objfile is unloaded or reloaded. Therefore one objfile must not reference symbol or type data from another objfile; they could be unloaded at different times. User convenience variables, et cetera, have associated types. Normally these types live in the associated objfile. However, when the objfile is unloaded, those types are deep copied to global memory, so that the values of the user variables and history items are not lost. @node Language Support @chapter Language Support @cindex language support @value{GDBN}'s language support is mainly driven by the symbol reader, although it is possible for the user to set the source language manually. @value{GDBN} chooses the source language by looking at the extension of the file recorded in the debug info; @file{.c} means C, @file{.f} means Fortran, etc. It may also use a special-purpose language identifier if the debug format supports it, like with DWARF. @section Adding a Source Language to @value{GDBN} @cindex adding source language To add other languages to @value{GDBN}'s expression parser, follow the following steps: @table @emph @item Create the expression parser. @cindex expression parser This should reside in a file @file{@var{lang}-exp.y}. Routines for building parsed expressions into a @code{union exp_element} list are in @file{parse.c}. @cindex language parser Since we can't depend upon everyone having Bison, and YACC produces parsers that define a bunch of global names, the following lines @strong{must} be included at the top of the YACC parser, to prevent the various parsers from defining the same global names: @smallexample #define yyparse @var{lang}_parse #define yylex @var{lang}_lex #define yyerror @var{lang}_error #define yylval @var{lang}_lval #define yychar @var{lang}_char #define yydebug @var{lang}_debug #define yypact @var{lang}_pact #define yyr1 @var{lang}_r1 #define yyr2 @var{lang}_r2 #define yydef @var{lang}_def #define yychk @var{lang}_chk #define yypgo @var{lang}_pgo #define yyact @var{lang}_act #define yyexca @var{lang}_exca #define yyerrflag @var{lang}_errflag #define yynerrs @var{lang}_nerrs @end smallexample At the bottom of your parser, define a @code{struct language_defn} and initialize it with the right values for your language. Define an @code{initialize_@var{lang}} routine and have it call @samp{add_language(@var{lang}_language_defn)} to tell the rest of @value{GDBN} that your language exists. You'll need some other supporting variables and functions, which will be used via pointers from your @code{@var{lang}_language_defn}. See the declaration of @code{struct language_defn} in @file{language.h}, and the other @file{*-exp.y} files, for more information. @item Add any evaluation routines, if necessary @cindex expression evaluation routines @findex evaluate_subexp @findex prefixify_subexp @findex length_of_subexp If you need new opcodes (that represent the operations of the language), add them to the enumerated type in @file{expression.h}. Add support code for these operations in the @code{evaluate_subexp} function defined in the file @file{eval.c}. Add cases for new opcodes in two functions from @file{parse.c}: @code{prefixify_subexp} and @code{length_of_subexp}. These compute the number of @code{exp_element}s that a given operation takes up. @item Update some existing code Add an enumerated identifier for your language to the enumerated type @code{enum language} in @file{defs.h}. Update the routines in @file{language.c} so your language is included. These routines include type predicates and such, which (in some cases) are language dependent. If your language does not appear in the switch statement, an error is reported. @vindex current_language Also included in @file{language.c} is the code that updates the variable @code{current_language}, and the routines that translate the @code{language_@var{lang}} enumerated identifier into a printable string. @findex _initialize_language Update the function @code{_initialize_language} to include your language. This function picks the default language upon startup, so is dependent upon which languages that @value{GDBN} is built for. @findex allocate_symtab Update @code{allocate_symtab} in @file{symfile.c} and/or symbol-reading code so that the language of each symtab (source file) is set properly. This is used to determine the language to use at each stack frame level. Currently, the language is set based upon the extension of the source file. If the language can be better inferred from the symbol information, please set the language of the symtab in the symbol-reading code. @findex print_subexp @findex op_print_tab Add helper code to @code{print_subexp} (in @file{expprint.c}) to handle any new expression opcodes you have added to @file{expression.h}. Also, add the printed representations of your operators to @code{op_print_tab}. @item Add a place of call @findex parse_exp_1 Add a call to @code{@var{lang}_parse()} and @code{@var{lang}_error} in @code{parse_exp_1} (defined in @file{parse.c}). @item Edit @file{Makefile.in} Add dependencies in @file{Makefile.in}. Make sure you update the macro variables such as @code{HFILES} and @code{OBJS}, otherwise your code may not get linked in, or, worse yet, it may not get @code{tar}red into the distribution! @end table @node Host Definition @chapter Host Definition With the advent of Autoconf, it's rarely necessary to have host definition machinery anymore. The following information is provided, mainly, as an historical reference. @section Adding a New Host @cindex adding a new host @cindex host, adding @value{GDBN}'s host configuration support normally happens via Autoconf. New host-specific definitions should not be needed. Older hosts @value{GDBN} still use the host-specific definitions and files listed below, but these mostly exist for historical reasons, and will eventually disappear. @table @file @item gdb/config/@var{arch}/@var{xyz}.mh This file is a Makefile fragment that once contained both host and native configuration information (@pxref{Native Debugging}) for the machine @var{xyz}. The host configuration information is now handled by Autoconf. Host configuration information included definitions for @code{CC}, @code{SYSV_DEFINE}, @code{XM_CFLAGS}, @code{XM_ADD_FILES}, @code{XM_CLIBS}, @code{XM_CDEPS}, etc.; see @file{Makefile.in}. New host-only configurations do not need this file. @end table (Files named @file{gdb/config/@var{arch}/xm-@var{xyz}.h} were once used to define host-specific macros, but were no longer needed and have all been removed.) @subheading Generic Host Support Files @cindex generic host support There are some ``generic'' versions of routines that can be used by various systems. @table @file @cindex remote debugging support @cindex serial line support @item ser-unix.c This contains serial line support for Unix systems. It is included by default on all Unix-like hosts. @item ser-pipe.c This contains serial pipe support for Unix systems. It is included by default on all Unix-like hosts. @item ser-mingw.c This contains serial line support for 32-bit programs running under Windows using MinGW. @item ser-go32.c This contains serial line support for 32-bit programs running under DOS, using the DJGPP (a.k.a.@: GO32) execution environment. @cindex TCP remote support @item ser-tcp.c This contains generic TCP support using sockets. It is included by default on all Unix-like hosts and with MinGW. @end table @section Host Conditionals When @value{GDBN} is configured and compiled, various macros are defined or left undefined, to control compilation based on the attributes of the host system. While formerly they could be set in host-specific header files, at present they can be changed only by setting @code{CFLAGS} when building, or by editing the source code. These macros and their meanings (or if the meaning is not documented here, then one of the source files where they are used is indicated) are: @ftable @code @item @value{GDBN}INIT_FILENAME The default name of @value{GDBN}'s initialization file (normally @file{.gdbinit}). @item CRLF_SOURCE_FILES @cindex DOS text files Define this if host files use @code{\r\n} rather than @code{\n} as a line terminator. This will cause source file listings to omit @code{\r} characters when printing and it will allow @code{\r\n} line endings of files which are ``sourced'' by gdb. It must be possible to open files in binary mode using @code{O_BINARY} or, for fopen, @code{"rb"}. @item DEFAULT_PROMPT @cindex prompt The default value of the prompt string (normally @code{"(gdb) "}). @item DEV_TTY @cindex terminal device The name of the generic TTY device, defaults to @code{"/dev/tty"}. @item ISATTY Substitute for isatty, if not available. @item FOPEN_RB Define this if binary files are opened the same way as text files. @item PRINTF_HAS_LONG_LONG Define this if the host can handle printing of long long integers via the printf format conversion specifier @code{ll}. This is set by the @code{configure} script. @item LSEEK_NOT_LINEAR Define this if @code{lseek (n)} does not necessarily move to byte number @code{n} in the file. This is only used when reading source files. It is normally faster to define @code{CRLF_SOURCE_FILES} when possible. @item lint Define this to help placate @code{lint} in some situations. @item volatile Define this to override the defaults of @code{__volatile__} or @code{/**/}. @end ftable @node Target Architecture Definition @chapter Target Architecture Definition @cindex target architecture definition @value{GDBN}'s target architecture defines what sort of machine-language programs @value{GDBN} can work with, and how it works with them. The target architecture object is implemented as the C structure @code{struct gdbarch *}. The structure, and its methods, are generated using the Bourne shell script @file{gdbarch.sh}. @menu * OS ABI Variant Handling:: * Initialize New Architecture:: * Registers and Memory:: * Pointers and Addresses:: * Address Classes:: * Register Representation:: * Frame Interpretation:: * Inferior Call Setup:: * Adding support for debugging core files:: * Defining Other Architecture Features:: * Adding a New Target:: @end menu @node OS ABI Variant Handling @section Operating System ABI Variant Handling @cindex OS ABI variants @value{GDBN} provides a mechanism for handling variations in OS ABIs. An OS ABI variant may have influence over any number of variables in the target architecture definition. There are two major components in the OS ABI mechanism: sniffers and handlers. A @dfn{sniffer} examines a file matching a BFD architecture/flavour pair (the architecture may be wildcarded) in an attempt to determine the OS ABI of that file. Sniffers with a wildcarded architecture are considered to be @dfn{generic}, while sniffers for a specific architecture are considered to be @dfn{specific}. A match from a specific sniffer overrides a match from a generic sniffer. Multiple sniffers for an architecture/flavour may exist, in order to differentiate between two different operating systems which use the same basic file format. The OS ABI framework provides a generic sniffer for ELF-format files which examines the @code{EI_OSABI} field of the ELF header, as well as note sections known to be used by several operating systems. @cindex fine-tuning @code{gdbarch} structure A @dfn{handler} is used to fine-tune the @code{gdbarch} structure for the selected OS ABI. There may be only one handler for a given OS ABI for each BFD architecture. The following OS ABI variants are defined in @file{defs.h}: @table @code @findex GDB_OSABI_UNINITIALIZED @item GDB_OSABI_UNINITIALIZED Used for struct gdbarch_info if ABI is still uninitialized. @findex GDB_OSABI_UNKNOWN @item GDB_OSABI_UNKNOWN The ABI of the inferior is unknown. The default @code{gdbarch} settings for the architecture will be used. @findex GDB_OSABI_SVR4 @item GDB_OSABI_SVR4 UNIX System V Release 4. @findex GDB_OSABI_HURD @item GDB_OSABI_HURD GNU using the Hurd kernel. @findex GDB_OSABI_SOLARIS @item GDB_OSABI_SOLARIS Sun Solaris. @findex GDB_OSABI_OSF1 @item GDB_OSABI_OSF1 OSF/1, including Digital UNIX and Compaq Tru64 UNIX. @findex GDB_OSABI_LINUX @item GDB_OSABI_LINUX GNU using the Linux kernel. @findex GDB_OSABI_FREEBSD_AOUT @item GDB_OSABI_FREEBSD_AOUT FreeBSD using the @code{a.out} executable format. @findex GDB_OSABI_FREEBSD_ELF @item GDB_OSABI_FREEBSD_ELF FreeBSD using the ELF executable format. @findex GDB_OSABI_NETBSD_AOUT @item GDB_OSABI_NETBSD_AOUT NetBSD using the @code{a.out} executable format. @findex GDB_OSABI_NETBSD_ELF @item GDB_OSABI_NETBSD_ELF NetBSD using the ELF executable format. @findex GDB_OSABI_OPENBSD_ELF @item GDB_OSABI_OPENBSD_ELF OpenBSD using the ELF executable format. @findex GDB_OSABI_WINCE @item GDB_OSABI_WINCE Windows CE. @findex GDB_OSABI_GO32 @item GDB_OSABI_GO32 DJGPP. @findex GDB_OSABI_IRIX @item GDB_OSABI_IRIX Irix. @findex GDB_OSABI_INTERIX @item GDB_OSABI_INTERIX Interix (Posix layer for MS-Windows systems). @findex GDB_OSABI_HPUX_ELF @item GDB_OSABI_HPUX_ELF HP/UX using the ELF executable format. @findex GDB_OSABI_HPUX_SOM @item GDB_OSABI_HPUX_SOM HP/UX using the SOM executable format. @findex GDB_OSABI_QNXNTO @item GDB_OSABI_QNXNTO QNX Neutrino. @findex GDB_OSABI_CYGWIN @item GDB_OSABI_CYGWIN Cygwin. @findex GDB_OSABI_AIX @item GDB_OSABI_AIX AIX. @end table Here are the functions that make up the OS ABI framework: @deftypefun {const char *} gdbarch_osabi_name (enum gdb_osabi @var{osabi}) Return the name of the OS ABI corresponding to @var{osabi}. @end deftypefun @deftypefun void gdbarch_register_osabi (enum bfd_architecture @var{arch}, unsigned long @var{machine}, enum gdb_osabi @var{osabi}, void (*@var{init_osabi})(struct gdbarch_info @var{info}, struct gdbarch *@var{gdbarch})) Register the OS ABI handler specified by @var{init_osabi} for the architecture, machine type and OS ABI specified by @var{arch}, @var{machine} and @var{osabi}. In most cases, a value of zero for the machine type, which implies the architecture's default machine type, will suffice. @end deftypefun @deftypefun void gdbarch_register_osabi_sniffer (enum bfd_architecture @var{arch}, enum bfd_flavour @var{flavour}, enum gdb_osabi (*@var{sniffer})(bfd *@var{abfd})) Register the OS ABI file sniffer specified by @var{sniffer} for the BFD architecture/flavour pair specified by @var{arch} and @var{flavour}. If @var{arch} is @code{bfd_arch_unknown}, the sniffer is considered to be generic, and is allowed to examine @var{flavour}-flavoured files for any architecture. @end deftypefun @deftypefun {enum gdb_osabi} gdbarch_lookup_osabi (bfd *@var{abfd}) Examine the file described by @var{abfd} to determine its OS ABI. The value @code{GDB_OSABI_UNKNOWN} is returned if the OS ABI cannot be determined. @end deftypefun @deftypefun void gdbarch_init_osabi (struct gdbarch info @var{info}, struct gdbarch *@var{gdbarch}, enum gdb_osabi @var{osabi}) Invoke the OS ABI handler corresponding to @var{osabi} to fine-tune the @code{gdbarch} structure specified by @var{gdbarch}. If a handler corresponding to @var{osabi} has not been registered for @var{gdbarch}'s architecture, a warning will be issued and the debugging session will continue with the defaults already established for @var{gdbarch}. @end deftypefun @deftypefun void generic_elf_osabi_sniff_abi_tag_sections (bfd *@var{abfd}, asection *@var{sect}, void *@var{obj}) Helper routine for ELF file sniffers. Examine the file described by @var{abfd} and look at ABI tag note sections to determine the OS ABI from the note. This function should be called via @code{bfd_map_over_sections}. @end deftypefun @node Initialize New Architecture @section Initializing a New Architecture @menu * How an Architecture is Represented:: * Looking Up an Existing Architecture:: * Creating a New Architecture:: @end menu @node How an Architecture is Represented @subsection How an Architecture is Represented @cindex architecture representation @cindex representation of architecture Each @code{gdbarch} is associated with a single @sc{bfd} architecture, via a @code{bfd_arch_@var{arch}} in the @code{bfd_architecture} enumeration. The @code{gdbarch} is registered by a call to @code{register_gdbarch_init}, usually from the file's @code{_initialize_@var{filename}} routine, which will be automatically called during @value{GDBN} startup. The arguments are a @sc{bfd} architecture constant and an initialization function. @findex _initialize_@var{arch}_tdep @cindex @file{@var{arch}-tdep.c} A @value{GDBN} description for a new architecture, @var{arch} is created by defining a global function @code{_initialize_@var{arch}_tdep}, by convention in the source file @file{@var{arch}-tdep.c}. For example, in the case of the OpenRISC 1000, this function is called @code{_initialize_or1k_tdep} and is found in the file @file{or1k-tdep.c}. @cindex @file{configure.tgt} @cindex @code{gdbarch} @findex gdbarch_register The resulting object files containing the implementation of the @code{_initialize_@var{arch}_tdep} function are specified in the @value{GDBN} @file{configure.tgt} file, which includes a large case statement pattern matching against the @code{--target} option of the @code{configure} script. The new @code{struct gdbarch} is created within the @code{_initialize_@var{arch}_tdep} function by calling @code{gdbarch_register}: @smallexample void gdbarch_register (enum bfd_architecture @var{architecture}, gdbarch_init_ftype *@var{init_func}, gdbarch_dump_tdep_ftype *@var{tdep_dump_func}); @end smallexample The @var{architecture} will identify the unique @sc{bfd} to be associated with this @code{gdbarch}. The @var{init_func} funciton is called to create and return the new @code{struct gdbarch}. The @var{tdep_dump_func} function will dump the target specific details associated with this architecture. For example the function @code{_initialize_or1k_tdep} creates its architecture for 32-bit OpenRISC 1000 architectures by calling: @smallexample gdbarch_register (bfd_arch_or32, or1k_gdbarch_init, or1k_dump_tdep); @end smallexample @node Looking Up an Existing Architecture @subsection Looking Up an Existing Architecture @cindex @code{gdbarch} lookup The initialization function has this prototype: @smallexample static struct gdbarch * @var{arch}_gdbarch_init (struct gdbarch_info @var{info}, struct gdbarch_list *@var{arches}) @end smallexample The @var{info} argument contains parameters used to select the correct architecture, and @var{arches} is a list of architectures which have already been created with the same @code{bfd_arch_@var{arch}} value. The initialization function should first make sure that @var{info} is acceptable, and return @code{NULL} if it is not. Then, it should search through @var{arches} for an exact match to @var{info}, and return one if found. Lastly, if no exact match was found, it should create a new architecture based on @var{info} and return it. @findex gdbarch_list_lookup_by_info @cindex @code{gdbarch_info} The lookup is done using @code{gdbarch_list_lookup_by_info}. It is passed the list of existing architectures, @var{arches}, and the @code{struct gdbarch_info}, @var{info}, and returns the first matching architecture it finds, or @code{NULL} if none are found. If an architecture is found it can be returned as the result from the initialization function, otherwise a new @code{struct gdbach} will need to be created. The struct gdbarch_info has the following components: @smallexample struct gdbarch_info @{ const struct bfd_arch_info *bfd_arch_info; int byte_order; bfd *abfd; struct gdbarch_tdep_info *tdep_info; enum gdb_osabi osabi; const struct target_desc *target_desc; @}; @end smallexample @vindex bfd_arch_info The @code{bfd_arch_info} member holds the key details about the architecture. The @code{byte_order} member is a value in an enumeration indicating the endianism. The @code{abfd} member is a pointer to the full @sc{bfd}, the @code{tdep_info} member is additional custom target specific information, @code{osabi} identifies which (if any) of a number of operating specific ABIs are used by this architecture and the @code{target_desc} member is a set of name-value pairs with information about register usage in this target. When the @code{struct gdbarch} initialization function is called, not all the fields are provided---only those which can be deduced from the @sc{bfd}. The @code{struct gdbarch_info}, @var{info} is used as a look-up key with the list of existing architectures, @var{arches} to see if a suitable architecture already exists. The @var{tdep_info}, @var{osabi} and @var{target_desc} fields may be added before this lookup to refine the search. Only information in @var{info} should be used to choose the new architecture. Historically, @var{info} could be sparse, and defaults would be collected from the first element on @var{arches}. However, @value{GDBN} now fills in @var{info} more thoroughly, so new @code{gdbarch} initialization functions should not take defaults from @var{arches}. @node Creating a New Architecture @subsection Creating a New Architecture @cindex @code{struct gdbarch} creation @findex gdbarch_alloc @cindex @code{gdbarch_tdep} when allocating new @code{gdbarch} If no architecture is found, then a new architecture must be created, by calling @code{gdbarch_alloc} using the supplied @code{@w{struct gdbarch_info}} and any additional custom target specific information in a @code{struct gdbarch_tdep}. The prototype for @code{gdbarch_alloc} is: @smallexample struct gdbarch *gdbarch_alloc (const struct gdbarch_info *@var{info}, struct gdbarch_tdep *@var{tdep}); @end smallexample @cindex @code{set_gdbarch} functions @cindex @code{gdbarch} accessor functions The newly created struct gdbarch must then be populated. Although there are default values, in most cases they are not what is required. For each element, @var{X}, there is are a pair of corresponding accessor functions, one to set the value of that element, @code{set_gdbarch_@var{X}}, the second to either get the value of an element (if it is a variable) or to apply the element (if it is a function), @code{gdbarch_@var{X}}. Note that both accessor functions take a pointer to the @code{@w{struct gdbarch}} as first argument. Populating the new @code{gdbarch} should use the @code{set_gdbarch} functions. The following sections identify the main elements that should be set in this way. This is not the complete list, but represents the functions and elements that must commonly be specified for a new architecture. Many of the functions and variables are described in the header file @file{gdbarch.h}. This is the main work in defining a new architecture. Implementing the set of functions to populate the @code{struct gdbarch}. @cindex @code{gdbarch_tdep} definition @code{struct gdbarch_tdep} is not defined within @value{GDBN}---it is up to the user to define this struct if it is needed to hold custom target information that is not covered by the standard @code{@w{struct gdbarch}}. For example with the OpenRISC 1000 architecture it is used to hold the number of matchpoints available in the target (along with other information). If there is no additional target specific information, it can be set to @code{NULL}. @node Registers and Memory @section Registers and Memory @value{GDBN}'s model of the target machine is rather simple. @value{GDBN} assumes the machine includes a bank of registers and a block of memory. Each register may have a different size. @value{GDBN} does not have a magical way to match up with the compiler's idea of which registers are which; however, it is critical that they do match up accurately. The only way to make this work is to get accurate information about the order that the compiler uses, and to reflect that in the @code{gdbarch_register_name} and related functions. @value{GDBN} can handle big-endian, little-endian, and bi-endian architectures. @node Pointers and Addresses @section Pointers Are Not Always Addresses @cindex pointer representation @cindex address representation @cindex word-addressed machines @cindex separate data and code address spaces @cindex spaces, separate data and code address @cindex address spaces, separate data and code @cindex code pointers, word-addressed @cindex converting between pointers and addresses @cindex D10V addresses On almost all 32-bit architectures, the representation of a pointer is indistinguishable from the representation of some fixed-length number whose value is the byte address of the object pointed to. On such machines, the words ``pointer'' and ``address'' can be used interchangeably. However, architectures with smaller word sizes are often cramped for address space, so they may choose a pointer representation that breaks this identity, and allows a larger code address space. @c D10V is gone from sources - more current example? For example, the Renesas D10V is a 16-bit VLIW processor whose instructions are 32 bits long@footnote{Some D10V instructions are actually pairs of 16-bit sub-instructions. However, since you can't jump into the middle of such a pair, code addresses can only refer to full 32 bit instructions, which is what matters in this explanation.}. If the D10V used ordinary byte addresses to refer to code locations, then the processor would only be able to address 64kb of instructions. However, since instructions must be aligned on four-byte boundaries, the low two bits of any valid instruction's byte address are always zero---byte addresses waste two bits. So instead of byte addresses, the D10V uses word addresses---byte addresses shifted right two bits---to refer to code. Thus, the D10V can use 16-bit words to address 256kb of code space. However, this means that code pointers and data pointers have different forms on the D10V. The 16-bit word @code{0xC020} refers to byte address @code{0xC020} when used as a data address, but refers to byte address @code{0x30080} when used as a code address. (The D10V also uses separate code and data address spaces, which also affects the correspondence between pointers and addresses, but we're going to ignore that here; this example is already too long.) To cope with architectures like this---the D10V is not the only one!---@value{GDBN} tries to distinguish between @dfn{addresses}, which are byte numbers, and @dfn{pointers}, which are the target's representation of an address of a particular type of data. In the example above, @code{0xC020} is the pointer, which refers to one of the addresses @code{0xC020} or @code{0x30080}, depending on the type imposed upon it. @value{GDBN} provides functions for turning a pointer into an address and vice versa, in the appropriate way for the current architecture. Unfortunately, since addresses and pointers are identical on almost all processors, this distinction tends to bit-rot pretty quickly. Thus, each time you port @value{GDBN} to an architecture which does distinguish between pointers and addresses, you'll probably need to clean up some architecture-independent code. Here are functions which convert between pointers and addresses: @deftypefun CORE_ADDR extract_typed_address (void *@var{buf}, struct type *@var{type}) Treat the bytes at @var{buf} as a pointer or reference of type @var{type}, and return the address it represents, in a manner appropriate for the current architecture. This yields an address @value{GDBN} can use to read target memory, disassemble, etc. Note that @var{buf} refers to a buffer in @value{GDBN}'s memory, not the inferior's. For example, if the current architecture is the Intel x86, this function extracts a little-endian integer of the appropriate length from @var{buf} and returns it. However, if the current architecture is the D10V, this function will return a 16-bit integer extracted from @var{buf}, multiplied by four if @var{type} is a pointer to a function. If @var{type} is not a pointer or reference type, then this function will signal an internal error. @end deftypefun @deftypefun CORE_ADDR store_typed_address (void *@var{buf}, struct type *@var{type}, CORE_ADDR @var{addr}) Store the address @var{addr} in @var{buf}, in the proper format for a pointer of type @var{type} in the current architecture. Note that @var{buf} refers to a buffer in @value{GDBN}'s memory, not the inferior's. For example, if the current architecture is the Intel x86, this function stores @var{addr} unmodified as a little-endian integer of the appropriate length in @var{buf}. However, if the current architecture is the D10V, this function divides @var{addr} by four if @var{type} is a pointer to a function, and then stores it in @var{buf}. If @var{type} is not a pointer or reference type, then this function will signal an internal error. @end deftypefun @deftypefun CORE_ADDR value_as_address (struct value *@var{val}) Assuming that @var{val} is a pointer, return the address it represents, as appropriate for the current architecture. This function actually works on integral values, as well as pointers. For pointers, it performs architecture-specific conversions as described above for @code{extract_typed_address}. @end deftypefun @deftypefun CORE_ADDR value_from_pointer (struct type *@var{type}, CORE_ADDR @var{addr}) Create and return a value representing a pointer of type @var{type} to the address @var{addr}, as appropriate for the current architecture. This function performs architecture-specific conversions as described above for @code{store_typed_address}. @end deftypefun Here are two functions which architectures can define to indicate the relationship between pointers and addresses. These have default definitions, appropriate for architectures on which all pointers are simple unsigned byte addresses. @deftypefun CORE_ADDR gdbarch_pointer_to_address (struct gdbarch *@var{gdbarch}, struct type *@var{type}, char *@var{buf}) Assume that @var{buf} holds a pointer of type @var{type}, in the appropriate format for the current architecture. Return the byte address the pointer refers to. This function may safely assume that @var{type} is either a pointer or a C@t{++} reference type. @end deftypefun @deftypefun void gdbarch_address_to_pointer (struct gdbarch *@var{gdbarch}, struct type *@var{type}, char *@var{buf}, CORE_ADDR @var{addr}) Store in @var{buf} a pointer of type @var{type} representing the address @var{addr}, in the appropriate format for the current architecture. This function may safely assume that @var{type} is either a pointer or a C@t{++} reference type. @end deftypefun @node Address Classes @section Address Classes @cindex address classes @cindex DW_AT_byte_size @cindex DW_AT_address_class Sometimes information about different kinds of addresses is available via the debug information. For example, some programming environments define addresses of several different sizes. If the debug information distinguishes these kinds of address classes through either the size info (e.g, @code{DW_AT_byte_size} in @w{DWARF 2}) or through an explicit address class attribute (e.g, @code{DW_AT_address_class} in @w{DWARF 2}), the following macros should be defined in order to disambiguate these types within @value{GDBN} as well as provide the added information to a @value{GDBN} user when printing type expressions. @deftypefun int gdbarch_address_class_type_flags (struct gdbarch *@var{gdbarch}, int @var{byte_size}, int @var{dwarf2_addr_class}) Returns the type flags needed to construct a pointer type whose size is @var{byte_size} and whose address class is @var{dwarf2_addr_class}. This function is normally called from within a symbol reader. See @file{dwarf2read.c}. @end deftypefun @deftypefun {char *} gdbarch_address_class_type_flags_to_name (struct gdbarch *@var{gdbarch}, int @var{type_flags}) Given the type flags representing an address class qualifier, return its name. @end deftypefun @deftypefun int gdbarch_address_class_name_to_type_flags (struct gdbarch *@var{gdbarch}, int @var{name}, int *@var{type_flags_ptr}) Given an address qualifier name, set the @code{int} referenced by @var{type_flags_ptr} to the type flags for that address class qualifier. @end deftypefun Since the need for address classes is rather rare, none of the address class functions are defined by default. Predicate functions are provided to detect when they are defined. Consider a hypothetical architecture in which addresses are normally 32-bits wide, but 16-bit addresses are also supported. Furthermore, suppose that the @w{DWARF 2} information for this architecture simply uses a @code{DW_AT_byte_size} value of 2 to indicate the use of one of these "short" pointers. The following functions could be defined to implement the address class functions: @smallexample somearch_address_class_type_flags (int byte_size, int dwarf2_addr_class) @{ if (byte_size == 2) return TYPE_FLAG_ADDRESS_CLASS_1; else return 0; @} static char * somearch_address_class_type_flags_to_name (int type_flags) @{ if (type_flags & TYPE_FLAG_ADDRESS_CLASS_1) return "short"; else return NULL; @} int somearch_address_class_name_to_type_flags (char *name, int *type_flags_ptr) @{ if (strcmp (name, "short") == 0) @{ *type_flags_ptr = TYPE_FLAG_ADDRESS_CLASS_1; return 1; @} else return 0; @} @end smallexample The qualifier @code{@@short} is used in @value{GDBN}'s type expressions to indicate the presence of one of these ``short'' pointers. For example if the debug information indicates that @code{short_ptr_var} is one of these short pointers, @value{GDBN} might show the following behavior: @smallexample (gdb) ptype short_ptr_var type = int * @@short @end smallexample @node Register Representation @section Register Representation @menu * Raw and Cooked Registers:: * Register Architecture Functions & Variables:: * Register Information Functions:: * Register and Memory Data:: * Register Caching:: @end menu @node Raw and Cooked Registers @subsection Raw and Cooked Registers @cindex raw register representation @cindex cooked register representation @cindex representations, raw and cooked registers @value{GDBN} considers registers to be a set with members numbered linearly from 0 upwards. The first part of that set corresponds to real physical registers, the second part to any @dfn{pseudo-registers}. Pseudo-registers have no independent physical existence, but are useful representations of information within the architecture. For example the OpenRISC 1000 architecture has up to 32 general purpose registers, which are typically represented as 32-bit (or 64-bit) integers. However the GPRs are also used as operands to the floating point operations, and it could be convenient to define a set of pseudo-registers, to show the GPRs represented as floating point values. For any architecture, the implementer will decide on a mapping from hardware to @value{GDBN} register numbers. The registers corresponding to real hardware are referred to as @dfn{raw} registers, the remaining registers are @dfn{pseudo-registers}. The total register set (raw and pseudo) is called the @dfn{cooked} register set. @node Register Architecture Functions & Variables @subsection Functions and Variables Specifying the Register Architecture @cindex @code{gdbarch} register architecture functions These @code{struct gdbarch} functions and variables specify the number and type of registers in the architecture. @deftypefn {Architecture Function} CORE_ADDR read_pc (struct regcache *@var{regcache}) @end deftypefn @deftypefn {Architecture Function} void write_pc (struct regcache *@var{regcache}, CORE_ADDR @var{val}) Read or write the program counter. The default value of both functions is @code{NULL} (no function available). If the program counter is just an ordinary register, it can be specified in @code{struct gdbarch} instead (see @code{pc_regnum} below) and it will be read or written using the standard routines to access registers. This function need only be specified if the program counter is not an ordinary register. Any register information can be obtained using the supplied register cache, @var{regcache}. @xref{Register Caching, , Register Caching}. @end deftypefn @deftypefn {Architecture Function} void pseudo_register_read (struct gdbarch *@var{gdbarch}, struct regcache *@var{regcache}, int @var{regnum}, const gdb_byte *@var{buf}) @end deftypefn @deftypefn {Architecture Function} void pseudo_register_write (struct gdbarch *@var{gdbarch}, struct regcache *@var{regcache}, int @var{regnum}, const gdb_byte *@var{buf}) These functions should be defined if there are any pseudo-registers. The default value is @code{NULL}. @var{regnum} is the number of the register to read or write (which will be a @dfn{cooked} register number) and @var{buf} is the buffer where the value read will be placed, or from which the value to be written will be taken. The value in the buffer may be converted to or from a signed or unsigned integral value using one of the utility functions (@pxref{Register and Memory Data, , Using Different Register and Memory Data Representations}). The access should be for the specified architecture, @var{gdbarch}. Any register information can be obtained using the supplied register cache, @var{regcache}. @xref{Register Caching, , Register Caching}. @end deftypefn @deftypevr {Architecture Variable} int sp_regnum @vindex sp_regnum @cindex stack pointer @cindex @kbd{$sp} This specifies the register holding the stack pointer, which may be a raw or pseudo-register. It defaults to -1 (not defined), but it is an error for it not to be defined. The value of the stack pointer register can be accessed withing @value{GDBN} as the variable @kbd{$sp}. @end deftypevr @deftypevr {Architecture Variable} int pc_regnum @vindex pc_regnum @cindex program counter @cindex @kbd{$pc} This specifies the register holding the program counter, which may be a raw or pseudo-register. It defaults to -1 (not defined). If @code{pc_regnum} is not defined, then the functions @code{read_pc} and @code{write_pc} (see above) must be defined. The value of the program counter (whether defined as a register, or through @code{read_pc} and @code{write_pc}) can be accessed withing @value{GDBN} as the variable @kbd{$pc}. @end deftypevr @deftypevr {Architecture Variable} int ps_regnum @vindex ps_regnum @cindex processor status register @cindex status register @cindex @kbd{$ps} This specifies the register holding the processor status (often called the status register), which may be a raw or pseudo-register. It defaults to -1 (not defined). If defined, the value of this register can be accessed withing @value{GDBN} as the variable @kbd{$ps}. @end deftypevr @deftypevr {Architecture Variable} int fp0_regnum @vindex fp0_regnum @cindex first floating point register This specifies the first floating point register. It defaults to 0. @code{fp0_regnum} is not needed unless the target offers support for floating point. @end deftypevr @node Register Information Functions @subsection Functions Giving Register Information @cindex @code{gdbarch} register information functions These functions return information about registers. @deftypefn {Architecture Function} {const char *} register_name (struct gdbarch *@var{gdbarch}, int @var{regnum}) This function should convert a register number (raw or pseudo) to a register name (as a C @code{const char *}). This is used both to determine the name of a register for output and to work out the meaning of any register names used as input. The function may also return @code{NULL}, to indicate that @var{regnum} is not a valid register. For example with the OpenRISC 1000, @value{GDBN} registers 0-31 are the General Purpose Registers, register 32 is the program counter and register 33 is the supervision register (i.e.@: the processor status register), which map to the strings @code{"gpr00"} through @code{"gpr31"}, @code{"pc"} and @code{"sr"} respectively. This means that the @value{GDBN} command @kbd{print $gpr5} should print the value of the OR1K general purpose register 5@footnote{ @cindex frame pointer @cindex @kbd{$fp} Historically, @value{GDBN} always had a concept of a frame pointer register, which could be accessed via the @value{GDBN} variable, @kbd{$fp}. That concept is now deprecated, recognizing that not all architectures have a frame pointer. However if an architecture does have a frame pointer register, and defines a register or pseudo-register with the name @code{"fp"}, then that register will be used as the value of the @kbd{$fp} variable.}. The default value for this function is @code{NULL}, meaning undefined. It should always be defined. The access should be for the specified architecture, @var{gdbarch}. @end deftypefn @deftypefn {Architecture Function} {struct type *} register_type (struct gdbarch *@var{gdbarch}, int @var{regnum}) Given a register number, this function identifies the type of data it may be holding, specified as a @code{struct type}. @value{GDBN} allows creation of arbitrary types, but a number of built in types are provided (@code{builtin_type_void}, @code{builtin_type_int32} etc), together with functions to derive types from these. Typically the program counter will have a type of ``pointer to function'' (it points to code), the frame pointer and stack pointer will have types of ``pointer to void'' (they point to data on the stack) and all other integer registers will have a type of 32-bit integer or 64-bit integer. This information guides the formatting when displaying register information. The default value is @code{NULL} meaning no information is available to guide formatting when displaying registers. @end deftypefn @deftypefn {Architecture Function} void print_registers_info (struct gdbarch *@var{gdbarch}, struct ui_file *@var{file}, struct frame_info *@var{frame}, int @var{regnum}, int @var{all}) Define this function to print out one or all of the registers for the @value{GDBN} @kbd{info registers} command. The default value is the function @code{default_print_registers_info}, which uses the register type information (see @code{register_type} above) to determine how each register should be printed. Define a custom version of this function for fuller control over how the registers are displayed. The access should be for the specified architecture, @var{gdbarch}, with output to the file specified by the User Interface Independent Output file handle, @var{file} (@pxref{UI-Independent Output, , UI-Independent Output---the @code{ui_out} Functions}). The registers should show their values in the frame specified by @var{frame}. If @var{regnum} is -1 and @var{all} is zero, then all the ``significant'' registers should be shown (the implementer should decide which registers are ``significant''). Otherwise only the value of the register specified by @var{regnum} should be output. If @var{regnum} is -1 and @var{all} is non-zero (true), then the value of all registers should be shown. By default @code{default_print_registers_info} prints one register per line, and if @var{all} is zero omits floating-point registers. @end deftypefn @deftypefn {Architecture Function} void print_float_info (struct gdbarch *@var{gdbarch}, struct ui_file *@var{file}, struct frame_info *@var{frame}, const char *@var{args}) Define this function to provide output about the floating point unit and registers for the @value{GDBN} @kbd{info float} command respectively. The default value is @code{NULL} (not defined), meaning no information will be provided. The @var{gdbarch} and @var{file} and @var{frame} arguments have the same meaning as in the @code{print_registers_info} function above. The string @var{args} contains any supplementary arguments to the @kbd{info float} command. Define this function if the target supports floating point operations. @end deftypefn @deftypefn {Architecture Function} void print_vector_info (struct gdbarch *@var{gdbarch}, struct ui_file *@var{file}, struct frame_info *@var{frame}, const char *@var{args}) Define this function to provide output about the vector unit and registers for the @value{GDBN} @kbd{info vector} command respectively. The default value is @code{NULL} (not defined), meaning no information will be provided. The @var{gdbarch}, @var{file} and @var{frame} arguments have the same meaning as in the @code{print_registers_info} function above. The string @var{args} contains any supplementary arguments to the @kbd{info vector} command. Define this function if the target supports vector operations. @end deftypefn @deftypefn {Architecture Function} int register_reggroup_p (struct gdbarch *@var{gdbarch}, int @var{regnum}, struct reggroup *@var{group}) @value{GDBN} groups registers into different categories (general, vector, floating point etc). This function, given a register, @var{regnum}, and group, @var{group}, returns 1 (true) if the register is in the group and 0 (false) otherwise. The information should be for the specified architecture, @var{gdbarch} The default value is the function @code{default_register_reggroup_p} which will do a reasonable job based on the type of the register (see the function @code{register_type} above), with groups for general purpose registers, floating point registers, vector registers and raw (i.e not pseudo) registers. @end deftypefn @node Register and Memory Data @subsection Using Different Register and Memory Data Representations @cindex register representation @cindex memory representation @cindex representations, register and memory @cindex register data formats, converting @cindex @code{struct value}, converting register contents to Some architectures have different representations of data objects, depending whether the object is held in a register or memory. For example: @itemize @bullet @item The Alpha architecture can represent 32 bit integer values in floating-point registers. @item The x86 architecture supports 80-bit floating-point registers. The @code{long double} data type occupies 96 bits in memory but only 80 bits when stored in a register. @end itemize In general, the register representation of a data type is determined by the architecture, or @value{GDBN}'s interface to the architecture, while the memory representation is determined by the Application Binary Interface. For almost all data types on almost all architectures, the two representations are identical, and no special handling is needed. However, they do occasionally differ. An architecture may define the following @code{struct gdbarch} functions to request conversions between the register and memory representations of a data type: @deftypefn {Architecture Function} int gdbarch_convert_register_p (struct gdbarch *@var{gdbarch}, int @var{reg}) Return non-zero (true) if the representation of a data value stored in this register may be different to the representation of that same data value when stored in memory. The default value is @code{NULL} (undefined). If this function is defined and returns non-zero, the @code{struct gdbarch} functions @code{gdbarch_register_to_value} and @code{gdbarch_value_to_register} (see below) should be used to perform any necessary conversion. If defined, this function should return zero for the register's native type, when no conversion is necessary. @end deftypefn @deftypefn {Architecture Function} void gdbarch_register_to_value (struct gdbarch *@var{gdbarch}, int @var{reg}, struct type *@var{type}, char *@var{from}, char *@var{to}) Convert the value of register number @var{reg} to a data object of type @var{type}. The buffer at @var{from} holds the register's value in raw format; the converted value should be placed in the buffer at @var{to}. @quotation @emph{Note:} @code{gdbarch_register_to_value} and @code{gdbarch_value_to_register} take their @var{reg} and @var{type} arguments in different orders. @end quotation @code{gdbarch_register_to_value} should only be used with registers for which the @code{gdbarch_convert_register_p} function returns a non-zero value. @end deftypefn @deftypefn {Architecture Function} void gdbarch_value_to_register (struct gdbarch *@var{gdbarch}, struct type *@var{type}, int @var{reg}, char *@var{from}, char *@var{to}) Convert a data value of type @var{type} to register number @var{reg}' raw format. @quotation @emph{Note:} @code{gdbarch_register_to_value} and @code{gdbarch_value_to_register} take their @var{reg} and @var{type} arguments in different orders. @end quotation @code{gdbarch_value_to_register} should only be used with registers for which the @code{gdbarch_convert_register_p} function returns a non-zero value. @end deftypefn @node Register Caching @subsection Register Caching @cindex register caching Caching of registers is used, so that the target does not need to be accessed and reanalyzed multiple times for each register in circumstances where the register value cannot have changed. @cindex @code{struct regcache} @value{GDBN} provides @code{struct regcache}, associated with a particular @code{struct gdbarch} to hold the cached values of the raw registers. A set of functions is provided to access both the raw registers (with @code{raw} in their name) and the full set of cooked registers (with @code{cooked} in their name). Functions are provided to ensure the register cache is kept synchronized with the values of the actual registers in the target. Accessing registers through the @code{struct regcache} routines will ensure that the appropriate @code{struct gdbarch} functions are called when necessary to access the underlying target architecture. In general users should use the @dfn{cooked} functions, since these will map to the @dfn{raw} functions automatically as appropriate. @findex regcache_cooked_read @findex regcache_cooked_write @cindex @code{gdb_byte} @findex regcache_cooked_read_signed @findex regcache_cooked_read_unsigned @findex regcache_cooked_write_signed @findex regcache_cooked_write_unsigned The two key functions are @code{regcache_cooked_read} and @code{regcache_cooked_write} which read or write a register from or to a byte buffer (type @code{gdb_byte *}). For convenience the wrapper functions @code{regcache_cooked_read_signed}, @code{regcache_cooked_read_unsigned}, @code{regcache_cooked_write_signed} and @code{regcache_cooked_write_unsigned} are provided, which read or write the value using the buffer and convert to or from an integral value as appropriate. @node Frame Interpretation @section Frame Interpretation @menu * All About Stack Frames:: * Frame Handling Terminology:: * Prologue Caches:: * Functions and Variable to Analyze Frames:: * Functions to Access Frame Data:: * Analyzing Stacks---Frame Sniffers:: @end menu @node All About Stack Frames @subsection All About Stack Frames @value{GDBN} needs to understand the stack on which local (automatic) variables are stored. The area of the stack containing all the local variables for a function invocation is known as the @dfn{stack frame} for that function (or colloquially just as the @dfn{frame}). In turn the function that called the function will have its stack frame, and so on back through the chain of functions that have been called. Almost all architectures have one register dedicated to point to the end of the stack (the @dfn{stack pointer}). Many have a second register which points to the start of the currently active stack frame (the @dfn{frame pointer}). The specific arrangements for an architecture are a key part of the ABI. A diagram helps to explain this. Here is a simple program to compute factorials: @smallexample #include <stdio.h> int fact (int n) @{ if (0 == n) @{ return 1; @} else @{ return n * fact (n - 1); @} @} main () @{ int i; for (i = 0; i < 10; i++) @{ int f = fact (i); printf ("%d! = %d\n", i, f); @} @} @end smallexample Consider the state of the stack when the code reaches line 6 after the main program has called @code{fact@w{ }(3)}. The chain of function calls will be @code{main ()}, @code{fact@w{ }(3)}, @code{fact@w{ }(2)}, @code{@w{fact (1)}} and @code{fact@w{ }(0)}. In this illustration the stack is falling (as used for example by the OpenRISC 1000 ABI). The stack pointer (SP) is at the end of the stack (lowest address) and the frame pointer (FP) is at the highest address in the current stack frame. The following diagram shows how the stack looks. @center @image{stack_frame,14cm} In each stack frame, offset 0 from the stack pointer is the frame pointer of the previous frame and offset 4 (this is illustrating a 32-bit architecture) from the stack pointer is the return address. Local variables are indexed from the frame pointer, with negative indexes. In the function @code{fact}, offset -4 from the frame pointer is the argument @var{n}. In the @code{main} function, offset -4 from the frame pointer is the local variable @var{i} and offset -8 from the frame pointer is the local variable @var{f}@footnote{This is a simplified example for illustrative purposes only. Good optimizing compilers would not put anything on the stack for such simple functions. Indeed they might eliminate the recursion and use of the stack entirely!}. It is very easy to get confused when examining stacks. @value{GDBN} has terminology it uses rigorously throughout. The stack frame of the function currently executing, or where execution stopped is numbered zero. In this example frame #0 is the stack frame of the call to @code{fact@w{ }(0)}. The stack frame of its calling function (@code{fact@w{ }(1)} in this case) is numbered #1 and so on back through the chain of calls. The main @value{GDBN} data structure describing frames is @code{@w{struct frame_info}}. It is not used directly, but only via its accessor functions. @code{frame_info} includes information about the registers in the frame and a pointer to the code of the function with which the frame is associated. The entire stack is represented as a linked list of @code{frame_info} structs. @node Frame Handling Terminology @subsection Frame Handling Terminology It is easy to get confused when referencing stack frames. @value{GDBN} uses some precise terminology. @itemize @bullet @item @cindex THIS frame @cindex stack frame, definition of THIS frame @cindex frame, definition of THIS frame @dfn{THIS} frame is the frame currently under consideration. @item @cindex NEXT frame @cindex stack frame, definition of NEXT frame @cindex frame, definition of NEXT frame The @dfn{NEXT} frame, also sometimes called the inner or newer frame is the frame of the function called by the function of THIS frame. @item @cindex PREVIOUS frame @cindex stack frame, definition of PREVIOUS frame @cindex frame, definition of PREVIOUS frame The @dfn{PREVIOUS} frame, also sometimes called the outer or older frame is the frame of the function which called the function of THIS frame. @end itemize So in the example in the previous section (@pxref{All About Stack Frames, , All About Stack Frames}), if THIS frame is #3 (the call to @code{fact@w{ }(3)}), the NEXT frame is frame #2 (the call to @code{fact@w{ }(2)}) and the PREVIOUS frame is frame #4 (the call to @code{main@w{ }()}). @cindex innermost frame @cindex stack frame, definition of innermost frame @cindex frame, definition of innermost frame The @dfn{innermost} frame is the frame of the current executing function, or where the program stopped, in this example, in the middle of the call to @code{@w{fact (0))}}. It is always numbered frame #0. @cindex base of a frame @cindex stack frame, definition of base of a frame @cindex frame, definition of base of a frame The @dfn{base} of a frame is the address immediately before the start of the NEXT frame. For a stack which grows down in memory (a @dfn{falling} stack) this will be the lowest address and for a stack which grows up in memory (a @dfn{rising} stack) this will be the highest address in the frame. @value{GDBN} functions to analyze the stack are typically given a pointer to the NEXT frame to determine information about THIS frame. Information about THIS frame includes data on where the registers of the PREVIOUS frame are stored in this stack frame. In this example the frame pointer of the PREVIOUS frame is stored at offset 0 from the stack pointer of THIS frame. @cindex unwinding @cindex stack frame, definition of unwinding @cindex frame, definition of unwinding The process whereby a function is given a pointer to the NEXT frame to work out information about THIS frame is referred to as @dfn{unwinding}. The @value{GDBN} functions involved in this typically include unwind in their name. @cindex sniffing @cindex stack frame, definition of sniffing @cindex frame, definition of sniffing The process of analyzing a target to determine the information that should go in struct frame_info is called @dfn{sniffing}. The functions that carry this out are called sniffers and typically include sniffer in their name. More than one sniffer may be required to extract all the information for a particular frame. @cindex sentinel frame @cindex stack frame, definition of sentinel frame @cindex frame, definition of sentinel frame Because so many functions work using the NEXT frame, there is an issue about addressing the innermost frame---it has no NEXT frame. To solve this @value{GDBN} creates a dummy frame #-1, known as the @dfn{sentinel} frame. @node Prologue Caches @subsection Prologue Caches @cindex function prologue @cindex prologue of a function All the frame sniffing functions typically examine the code at the start of the corresponding function, to determine the state of registers. The ABI will save old values and set new values of key registers at the start of each function in what is known as the function @dfn{prologue}. @cindex prologue cache For any particular stack frame this data does not change, so all the standard unwinding functions, in addition to receiving a pointer to the NEXT frame as their first argument, receive a pointer to a @dfn{prologue cache} as their second argument. This can be used to store values associated with a particular frame, for reuse on subsequent calls involving the same frame. It is up to the user to define the structure used (it is a @code{void@w{ }*} pointer) and arrange allocation and deallocation of storage. However for general use, @value{GDBN} provides @code{@w{struct trad_frame_cache}}, with a set of accessor routines. This structure holds the stack and code address of THIS frame, the base address of the frame, a pointer to the struct @code{frame_info} for the NEXT frame and details of where the registers of the PREVIOUS frame may be found in THIS frame. Typically the first time any sniffer function is called with NEXT frame, the prologue sniffer for THIS frame will be @code{NULL}. The sniffer will analyze the frame, allocate a prologue cache structure and populate it. Subsequent calls using the same NEXT frame will pass in this prologue cache, so the data can be returned with no additional analysis. @node Functions and Variable to Analyze Frames @subsection Functions and Variable to Analyze Frames These struct @code{gdbarch} functions and variable should be defined to provide analysis of the stack frame and allow it to be adjusted as required. @deftypefn {Architecture Function} CORE_ADDR skip_prologue (struct gdbarch *@var{gdbarch}, CORE_ADDR @var{pc}) The prologue of a function is the code at the beginning of the function which sets up the stack frame, saves the return address etc. The code representing the behavior of the function starts after the prologue. This function skips past the prologue of a function if the program counter, @var{pc}, is within the prologue of a function. The result is the program counter immediately after the prologue. With modern optimizing compilers, this may be a far from trivial exercise. However the required information may be within the binary as DWARF2 debugging information, making the job much easier. The default value is @code{NULL} (not defined). This function should always be provided, but can take advantage of DWARF2 debugging information, if that is available. @end deftypefn @deftypefn {Architecture Function} int inner_than (CORE_ADDR @var{lhs}, CORE_ADDR @var{rhs}) @findex core_addr_lessthan @findex core_addr_greaterthan Given two frame or stack pointers, return non-zero (true) if the first represents the @dfn{inner} stack frame and 0 (false) otherwise. This is used to determine whether the target has a stack which grows up in memory (rising stack) or grows down in memory (falling stack). @xref{All About Stack Frames, , All About Stack Frames}, for an explanation of @dfn{inner} frames. The default value of this function is @code{NULL} and it should always be defined. However for almost all architectures one of the built-in functions can be used: @code{core_addr_lessthan} (for stacks growing down in memory) or @code{core_addr_greaterthan} (for stacks growing up in memory). @end deftypefn @anchor{frame_align} @deftypefn {Architecture Function} CORE_ADDR frame_align (struct gdbarch *@var{gdbarch}, CORE_ADDR @var{address}) @findex align_down @findex align_up The architecture may have constraints on how its frames are aligned. For example the OpenRISC 1000 ABI requires stack frames to be double-word aligned, but 32-bit versions of the architecture allocate single-word values to the stack. Thus extra padding may be needed at the end of a stack frame. Given a proposed address for the stack pointer, this function returns a suitably aligned address (by expanding the stack frame). The default value is @code{NULL} (undefined). This function should be defined for any architecture where it is possible the stack could become misaligned. The utility functions @code{align_down} (for falling stacks) and @code{align_up} (for rising stacks) will facilitate the implementation of this function. @end deftypefn @deftypevr {Architecture Variable} int frame_red_zone_size Some ABIs reserve space beyond the end of the stack for use by leaf functions without prologue or epilogue or by exception handlers (for example the OpenRISC 1000). This is known as a @dfn{red zone} (AMD terminology). The @sc{amd64} (nee x86-64) ABI documentation refers to the @dfn{red zone} when describing this scratch area. The default value is 0. Set this field if the architecture has such a red zone. The value must be aligned as required by the ABI (see @code{frame_align} above for an explanation of stack frame alignment). @end deftypevr @node Functions to Access Frame Data @subsection Functions to Access Frame Data These functions provide access to key registers and arguments in the stack frame. @deftypefn {Architecture Function} CORE_ADDR unwind_pc (struct gdbarch *@var{gdbarch}, struct frame_info *@var{next_frame}) This function is given a pointer to the NEXT stack frame (@pxref{All About Stack Frames, , All About Stack Frames}, for how frames are represented) and returns the value of the program counter in the PREVIOUS frame (i.e.@: the frame of the function that called THIS one). This is commonly referred to as the @dfn{return address}. The implementation, which must be frame agnostic (work with any frame), is typically no more than: @smallexample ULONGEST pc; pc = frame_unwind_register_unsigned (next_frame, @var{ARCH}_PC_REGNUM); return gdbarch_addr_bits_remove (gdbarch, pc); @end smallexample @end deftypefn @deftypefn {Architecture Function} CORE_ADDR unwind_sp (struct gdbarch *@var{gdbarch}, struct frame_info *@var{next_frame}) This function is given a pointer to the NEXT stack frame (@pxref{All About Stack Frames, , All About Stack Frames} for how frames are represented) and returns the value of the stack pointer in the PREVIOUS frame (i.e.@: the frame of the function that called THIS one). The implementation, which must be frame agnostic (work with any frame), is typically no more than: @smallexample ULONGEST sp; sp = frame_unwind_register_unsigned (next_frame, @var{ARCH}_SP_REGNUM); return gdbarch_addr_bits_remove (gdbarch, sp); @end smallexample @end deftypefn @deftypefn {Architecture Function} int frame_num_args (struct gdbarch *@var{gdbarch}, struct frame_info *@var{this_frame}) This function is given a pointer to THIS stack frame (@pxref{All About Stack Frames, , All About Stack Frames} for how frames are represented), and returns the number of arguments that are being passed, or -1 if not known. The default value is @code{NULL} (undefined), in which case the number of arguments passed on any stack frame is always unknown. For many architectures this will be a suitable default. @end deftypefn @node Analyzing Stacks---Frame Sniffers @subsection Analyzing Stacks---Frame Sniffers When a program stops, @value{GDBN} needs to construct the chain of struct @code{frame_info} representing the state of the stack using appropriate @dfn{sniffers}. Each architecture requires appropriate sniffers, but they do not form entries in @code{@w{struct gdbarch}}, since more than one sniffer may be required and a sniffer may be suitable for more than one @code{@w{struct gdbarch}}. Instead sniffers are associated with architectures using the following functions. @itemize @bullet @item @findex frame_unwind_append_sniffer @code{frame_unwind_append_sniffer} is used to add a new sniffer to analyze THIS frame when given a pointer to the NEXT frame. @item @findex frame_base_append_sniffer @code{frame_base_append_sniffer} is used to add a new sniffer which can determine information about the base of a stack frame. @item @findex frame_base_set_default @code{frame_base_set_default} is used to specify the default base sniffer. @end itemize These functions all take a reference to @code{@w{struct gdbarch}}, so they are associated with a specific architecture. They are usually called in the @code{gdbarch} initialization function, after the @code{gdbarch} struct has been set up. Unless a default has been set, the most recently appended sniffer will be tried first. The main frame unwinding sniffer (as set by @code{frame_unwind_append_sniffer)} returns a structure specifying a set of sniffing functions: @cindex @code{frame_unwind} @smallexample struct frame_unwind @{ enum frame_type type; frame_this_id_ftype *this_id; frame_prev_register_ftype *prev_register; const struct frame_data *unwind_data; frame_sniffer_ftype *sniffer; frame_prev_pc_ftype *prev_pc; frame_dealloc_cache_ftype *dealloc_cache; @}; @end smallexample The @code{type} field indicates the type of frame this sniffer can handle: normal, dummy (@pxref{Functions Creating Dummy Frames, , Functions Creating Dummy Frames}), signal handler or sentinel. Signal handlers sometimes have their own simplified stack structure for efficiency, so may need their own handlers. The @code{unwind_data} field holds additional information which may be relevant to particular types of frame. For example it may hold additional information for signal handler frames. The remaining fields define functions that yield different types of information when given a pointer to the NEXT stack frame. Not all functions need be provided. If an entry is @code{NULL}, the next sniffer will be tried instead. @itemize @bullet @item @code{this_id} determines the stack pointer and function (code entry point) for THIS stack frame. @item @code{prev_register} determines where the values of registers for the PREVIOUS stack frame are stored in THIS stack frame. @item @code{sniffer} takes a look at THIS frame's registers to determine if this is the appropriate unwinder. @item @code{prev_pc} determines the program counter for THIS frame. Only needed if the program counter is not an ordinary register (@pxref{Register Architecture Functions & Variables, , Functions and Variables Specifying the Register Architecture}). @item @code{dealloc_cache} frees any additional memory associated with the prologue cache for this frame (@pxref{Prologue Caches, , Prologue Caches}). @end itemize In general it is only the @code{this_id} and @code{prev_register} fields that need be defined for custom sniffers. The frame base sniffer is much simpler. It is a @code{@w{struct frame_base}}, which refers to the corresponding @code{frame_unwind} struct and whose fields refer to functions yielding various addresses within the frame. @cindex @code{frame_base} @smallexample struct frame_base @{ const struct frame_unwind *unwind; frame_this_base_ftype *this_base; frame_this_locals_ftype *this_locals; frame_this_args_ftype *this_args; @}; @end smallexample All the functions referred to take a pointer to the NEXT frame as argument. The function referred to by @code{this_base} returns the base address of THIS frame, the function referred to by @code{this_locals} returns the base address of local variables in THIS frame and the function referred to by @code{this_args} returns the base address of the function arguments in this frame. As described above, the base address of a frame is the address immediately before the start of the NEXT frame. For a falling stack, this is the lowest address in the frame and for a rising stack it is the highest address in the frame. For most architectures the same address is also the base address for local variables and arguments, in which case the same function can be used for all three entries@footnote{It is worth noting that if it cannot be determined in any other way (for example by there being a register with the name @code{"fp"}), then the result of the @code{this_base} function will be used as the value of the frame pointer variable @kbd{$fp} in @value{GDBN}. This is very often not correct (for example with the OpenRISC 1000, this value is the stack pointer, @kbd{$sp}). In this case a register (raw or pseudo) with the name @code{"fp"} should be defined. It will be used in preference as the value of @kbd{$fp}.}. @node Inferior Call Setup @section Inferior Call Setup @cindex calls to the inferior @menu * About Dummy Frames:: * Functions Creating Dummy Frames:: @end menu @node About Dummy Frames @subsection About Dummy Frames @cindex dummy frames @value{GDBN} can call functions in the target code (for example by using the @kbd{call} or @kbd{print} commands). These functions may be breakpointed, and it is essential that if a function does hit a breakpoint, commands like @kbd{backtrace} work correctly. This is achieved by making the stack look as though the function had been called from the point where @value{GDBN} had previously stopped. This requires that @value{GDBN} can set up stack frames appropriate for such function calls. @node Functions Creating Dummy Frames @subsection Functions Creating Dummy Frames The following functions provide the functionality to set up such @dfn{dummy} stack frames. @deftypefn {Architecture Function} CORE_ADDR push_dummy_call (struct gdbarch *@var{gdbarch}, struct value *@var{function}, struct regcache *@var{regcache}, CORE_ADDR @var{bp_addr}, int @var{nargs}, struct value **@var{args}, CORE_ADDR @var{sp}, int @var{struct_return}, CORE_ADDR @var{struct_addr}) This function sets up a dummy stack frame for the function about to be called. @code{push_dummy_call} is given the arguments to be passed and must copy them into registers or push them on to the stack as appropriate for the ABI. @var{function} is a pointer to the function that will be called and @var{regcache} the register cache from which values should be obtained. @var{bp_addr} is the address to which the function should return (which is breakpointed, so @value{GDBN} can regain control, hence the name). @var{nargs} is the number of arguments to pass and @var{args} an array containing the argument values. @var{struct_return} is non-zero (true) if the function returns a structure, and if so @var{struct_addr} is the address in which the structure should be returned. After calling this function, @value{GDBN} will pass control to the target at the address of the function, which will find the stack and registers set up just as expected. The default value of this function is @code{NULL} (undefined). If the function is not defined, then @value{GDBN} will not allow the user to call functions within the target being debugged. @end deftypefn @deftypefn {Architecture Function} {struct frame_id} unwind_dummy_id (struct gdbarch *@var{gdbarch}, struct frame_info *@var{next_frame}) This is the inverse of @code{push_dummy_call} which restores the stack pointer and program counter after a call to evaluate a function using a dummy stack frame. The result is a @code{@w{struct frame_id}}, which contains the value of the stack pointer and program counter to be used. The NEXT frame pointer is provided as argument, @var{next_frame}. THIS frame is the frame of the dummy function, which can be unwound, to yield the required stack pointer and program counter from the PREVIOUS frame. The default value is @code{NULL} (undefined). If @code{push_dummy_call} is defined, then this function should also be defined. @end deftypefn @deftypefn {Architecture Function} CORE_ADDR push_dummy_code (struct gdbarch *@var{gdbarch}, CORE_ADDR @var{sp}, CORE_ADDR @var{funaddr}, struct value **@var{args}, int @var{nargs}, struct type *@var{value_type}, CORE_ADDR *@var{real_pc}, CORE_ADDR *@var{bp_addr}, struct regcache *@var{regcache}) If this function is not defined (its default value is @code{NULL}), a dummy call will use the entry point of the currently loaded code on the target as its return address. A temporary breakpoint will be set there, so the location must be writable and have room for a breakpoint. It is possible that this default is not suitable. It might not be writable (in ROM possibly), or the ABI might require code to be executed on return from a call to unwind the stack before the breakpoint is encountered. If either of these is the case, then push_dummy_code should be defined to push an instruction sequence onto the end of the stack to which the dummy call should return. The arguments are essentially the same as those to @code{push_dummy_call}. However the function is provided with the type of the function result, @var{value_type}, @var{bp_addr} is used to return a value (the address at which the breakpoint instruction should be inserted) and @var{real pc} is used to specify the resume address when starting the call sequence. The function should return the updated innermost stack address. @quotation @emph{Note:} This does require that code in the stack can be executed. Some Harvard architectures may not allow this. @end quotation @end deftypefn @node Adding support for debugging core files @section Adding support for debugging core files @cindex core files The prerequisite for adding core file support in @value{GDBN} is to have core file support in BFD. Once BFD support is available, writing the apropriate @code{regset_from_core_section} architecture function should be all that is needed in order to add support for core files in @value{GDBN}. @node Defining Other Architecture Features @section Defining Other Architecture Features This section describes other functions and values in @code{gdbarch}, together with some useful macros, that you can use to define the target architecture. @table @code @item CORE_ADDR gdbarch_addr_bits_remove (@var{gdbarch}, @var{addr}) @findex gdbarch_addr_bits_remove If a raw machine instruction address includes any bits that are not really part of the address, then this function is used to zero those bits in @var{addr}. This is only used for addresses of instructions, and even then not in all contexts. For example, the two low-order bits of the PC on the Hewlett-Packard PA 2.0 architecture contain the privilege level of the corresponding instruction. Since instructions must always be aligned on four-byte boundaries, the processor masks out these bits to generate the actual address of the instruction. @code{gdbarch_addr_bits_remove} would then for example look like that: @smallexample arch_addr_bits_remove (CORE_ADDR addr) @{ return (addr &= ~0x3); @} @end smallexample @item int address_class_name_to_type_flags (@var{gdbarch}, @var{name}, @var{type_flags_ptr}) @findex address_class_name_to_type_flags If @var{name} is a valid address class qualifier name, set the @code{int} referenced by @var{type_flags_ptr} to the mask representing the qualifier and return 1. If @var{name} is not a valid address class qualifier name, return 0. The value for @var{type_flags_ptr} should be one of @code{TYPE_FLAG_ADDRESS_CLASS_1}, @code{TYPE_FLAG_ADDRESS_CLASS_2}, or possibly some combination of these values or'd together. @xref{Target Architecture Definition, , Address Classes}. @item int address_class_name_to_type_flags_p (@var{gdbarch}) @findex address_class_name_to_type_flags_p Predicate which indicates whether @code{address_class_name_to_type_flags} has been defined. @item int gdbarch_address_class_type_flags (@var{gdbarch}, @var{byte_size}, @var{dwarf2_addr_class}) @findex gdbarch_address_class_type_flags Given a pointers byte size (as described by the debug information) and the possible @code{DW_AT_address_class} value, return the type flags used by @value{GDBN} to represent this address class. The value returned should be one of @code{TYPE_FLAG_ADDRESS_CLASS_1}, @code{TYPE_FLAG_ADDRESS_CLASS_2}, or possibly some combination of these values or'd together. @xref{Target Architecture Definition, , Address Classes}. @item int gdbarch_address_class_type_flags_p (@var{gdbarch}) @findex gdbarch_address_class_type_flags_p Predicate which indicates whether @code{gdbarch_address_class_type_flags_p} has been defined. @item const char *gdbarch_address_class_type_flags_to_name (@var{gdbarch}, @var{type_flags}) @findex gdbarch_address_class_type_flags_to_name Return the name of the address class qualifier associated with the type flags given by @var{type_flags}. @item int gdbarch_address_class_type_flags_to_name_p (@var{gdbarch}) @findex gdbarch_address_class_type_flags_to_name_p Predicate which indicates whether @code{gdbarch_address_class_type_flags_to_name} has been defined. @xref{Target Architecture Definition, , Address Classes}. @item void gdbarch_address_to_pointer (@var{gdbarch}, @var{type}, @var{buf}, @var{addr}) @findex gdbarch_address_to_pointer Store in @var{buf} a pointer of type @var{type} representing the address @var{addr}, in the appropriate format for the current architecture. This function may safely assume that @var{type} is either a pointer or a C@t{++} reference type. @xref{Target Architecture Definition, , Pointers Are Not Always Addresses}. @item int gdbarch_believe_pcc_promotion (@var{gdbarch}) @findex gdbarch_believe_pcc_promotion Used to notify if the compiler promotes a @code{short} or @code{char} parameter to an @code{int}, but still reports the parameter as its original type, rather than the promoted type. @item gdbarch_bits_big_endian (@var{gdbarch}) @findex gdbarch_bits_big_endian This is used if the numbering of bits in the targets does @strong{not} match the endianism of the target byte order. A value of 1 means that the bits are numbered in a big-endian bit order, 0 means little-endian. @item set_gdbarch_bits_big_endian (@var{gdbarch}, @var{bits_big_endian}) @findex set_gdbarch_bits_big_endian Calling set_gdbarch_bits_big_endian with a value of 1 indicates that the bits in the target are numbered in a big-endian bit order, 0 indicates little-endian. @item BREAKPOINT @findex BREAKPOINT This is the character array initializer for the bit pattern to put into memory where a breakpoint is set. Although it's common to use a trap instruction for a breakpoint, it's not required; for instance, the bit pattern could be an invalid instruction. The breakpoint must be no longer than the shortest instruction of the architecture. @code{BREAKPOINT} has been deprecated in favor of @code{gdbarch_breakpoint_from_pc}. @item BIG_BREAKPOINT @itemx LITTLE_BREAKPOINT @findex LITTLE_BREAKPOINT @findex BIG_BREAKPOINT Similar to BREAKPOINT, but used for bi-endian targets. @code{BIG_BREAKPOINT} and @code{LITTLE_BREAKPOINT} have been deprecated in favor of @code{gdbarch_breakpoint_from_pc}. @item const gdb_byte *gdbarch_breakpoint_from_pc (@var{gdbarch}, @var{pcptr}, @var{lenptr}) @findex gdbarch_breakpoint_from_pc @anchor{gdbarch_breakpoint_from_pc} Use the program counter to determine the contents and size of a breakpoint instruction. It returns a pointer to a static string of bytes that encode a breakpoint instruction, stores the length of the string to @code{*@var{lenptr}}, and adjusts the program counter (if necessary) to point to the actual memory location where the breakpoint should be inserted. On input, the program counter (@code{*@var{pcptr}} is the encoded inferior's PC register. If software breakpoints are supported, the function sets this argument to the PC's plain address. If software breakpoints are not supported, the function returns NULL instead of the encoded breakpoint instruction. Although it is common to use a trap instruction for a breakpoint, it's not required; for instance, the bit pattern could be an invalid instruction. The breakpoint must be no longer than the shortest instruction of the architecture. Provided breakpoint bytes can be also used by @code{bp_loc_is_permanent} to detect permanent breakpoints. @code{gdbarch_breakpoint_from_pc} should return an unchanged memory copy if it was called for a location with permanent breakpoint as some architectures use breakpoint instructions containing arbitrary parameter value. Replaces all the other @var{BREAKPOINT} macros. @item int gdbarch_memory_insert_breakpoint (@var{gdbarch}, @var{bp_tgt}) @itemx gdbarch_memory_remove_breakpoint (@var{gdbarch}, @var{bp_tgt}) @findex gdbarch_memory_remove_breakpoint @findex gdbarch_memory_insert_breakpoint Insert or remove memory based breakpoints. Reasonable defaults (@code{default_memory_insert_breakpoint} and @code{default_memory_remove_breakpoint} respectively) have been provided so that it is not necessary to set these for most architectures. Architectures which may want to set @code{gdbarch_memory_insert_breakpoint} and @code{gdbarch_memory_remove_breakpoint} will likely have instructions that are oddly sized or are not stored in a conventional manner. It may also be desirable (from an efficiency standpoint) to define custom breakpoint insertion and removal routines if @code{gdbarch_breakpoint_from_pc} needs to read the target's memory for some reason. @item CORE_ADDR gdbarch_adjust_breakpoint_address (@var{gdbarch}, @var{bpaddr}) @findex gdbarch_adjust_breakpoint_address @cindex breakpoint address adjusted Given an address at which a breakpoint is desired, return a breakpoint address adjusted to account for architectural constraints on breakpoint placement. This method is not needed by most targets. The FR-V target (see @file{frv-tdep.c}) requires this method. The FR-V is a VLIW architecture in which a number of RISC-like instructions are grouped (packed) together into an aggregate instruction or instruction bundle. When the processor executes one of these bundles, the component instructions are executed in parallel. In the course of optimization, the compiler may group instructions from distinct source statements into the same bundle. The line number information associated with one of the latter statements will likely refer to some instruction other than the first one in the bundle. So, if the user attempts to place a breakpoint on one of these latter statements, @value{GDBN} must be careful to @emph{not} place the break instruction on any instruction other than the first one in the bundle. (Remember though that the instructions within a bundle execute in parallel, so the @emph{first} instruction is the instruction at the lowest address and has nothing to do with execution order.) The FR-V's @code{gdbarch_adjust_breakpoint_address} method will adjust a breakpoint's address by scanning backwards for the beginning of the bundle, returning the address of the bundle. Since the adjustment of a breakpoint may significantly alter a user's expectation, @value{GDBN} prints a warning when an adjusted breakpoint is initially set and each time that that breakpoint is hit. @item int gdbarch_call_dummy_location (@var{gdbarch}) @findex gdbarch_call_dummy_location See the file @file{inferior.h}. This method has been replaced by @code{gdbarch_push_dummy_code} (@pxref{gdbarch_push_dummy_code}). @item int gdbarch_cannot_fetch_register (@var{gdbarch}, @var{regum}) @findex gdbarch_cannot_fetch_register This function should return nonzero if @var{regno} cannot be fetched from an inferior process. @item int gdbarch_cannot_store_register (@var{gdbarch}, @var{regnum}) @findex gdbarch_cannot_store_register This function should return nonzero if @var{regno} should not be written to the target. This is often the case for program counters, status words, and other special registers. This function returns 0 as default so that @value{GDBN} will assume that all registers may be written. @item int gdbarch_convert_register_p (@var{gdbarch}, @var{regnum}, struct type *@var{type}) @findex gdbarch_convert_register_p Return non-zero if register @var{regnum} represents data values of type @var{type} in a non-standard form. @xref{Target Architecture Definition, , Using Different Register and Memory Data Representations}. @item int gdbarch_fp0_regnum (@var{gdbarch}) @findex gdbarch_fp0_regnum This function returns the number of the first floating point register, if the machine has such registers. Otherwise, it returns -1. @item CORE_ADDR gdbarch_decr_pc_after_break (@var{gdbarch}) @findex gdbarch_decr_pc_after_break This function shall return the amount by which to decrement the PC after the program encounters a breakpoint. This is often the number of bytes in @code{BREAKPOINT}, though not always. For most targets this value will be 0. @item DISABLE_UNSETTABLE_BREAK (@var{addr}) @findex DISABLE_UNSETTABLE_BREAK If defined, this should evaluate to 1 if @var{addr} is in a shared library in which breakpoints cannot be set and so should be disabled. @item int gdbarch_dwarf2_reg_to_regnum (@var{gdbarch}, @var{dwarf2_regnr}) @findex gdbarch_dwarf2_reg_to_regnum Convert DWARF2 register number @var{dwarf2_regnr} into @value{GDBN} regnum. If not defined, no conversion will be performed. @item int gdbarch_ecoff_reg_to_regnum (@var{gdbarch}, @var{ecoff_regnr}) @findex gdbarch_ecoff_reg_to_regnum Convert ECOFF register number @var{ecoff_regnr} into @value{GDBN} regnum. If not defined, no conversion will be performed. @item GCC_COMPILED_FLAG_SYMBOL @itemx GCC2_COMPILED_FLAG_SYMBOL @findex GCC2_COMPILED_FLAG_SYMBOL @findex GCC_COMPILED_FLAG_SYMBOL If defined, these are the names of the symbols that @value{GDBN} will look for to detect that GCC compiled the file. The default symbols are @code{gcc_compiled.} and @code{gcc2_compiled.}, respectively. (Currently only defined for the Delta 68.) @item gdbarch_get_longjmp_target @findex gdbarch_get_longjmp_target This function determines the target PC address that @code{longjmp} will jump to, assuming that we have just stopped at a @code{longjmp} breakpoint. It takes a @code{CORE_ADDR *} as argument, and stores the target PC value through this pointer. It examines the current state of the machine as needed, typically by using a manually-determined offset into the @code{jmp_buf}. (While we might like to get the offset from the target's @file{jmpbuf.h}, that header file cannot be assumed to be available when building a cross-debugger.) @item DEPRECATED_IBM6000_TARGET @findex DEPRECATED_IBM6000_TARGET Shows that we are configured for an IBM RS/6000 system. This conditional should be eliminated (FIXME) and replaced by feature-specific macros. It was introduced in haste and we are repenting at leisure. @item I386_USE_GENERIC_WATCHPOINTS An x86-based target can define this to use the generic x86 watchpoint support; see @ref{Algorithms, I386_USE_GENERIC_WATCHPOINTS}. @item gdbarch_in_function_epilogue_p (@var{gdbarch}, @var{addr}) @findex gdbarch_in_function_epilogue_p Returns non-zero if the given @var{addr} is in the epilogue of a function. The epilogue of a function is defined as the part of a function where the stack frame of the function already has been destroyed up to the final `return from function call' instruction. @item int gdbarch_in_solib_return_trampoline (@var{gdbarch}, @var{pc}, @var{name}) @findex gdbarch_in_solib_return_trampoline Define this function to return nonzero if the program is stopped in the trampoline that returns from a shared library. @item target_so_ops.in_dynsym_resolve_code (@var{pc}) @findex in_dynsym_resolve_code Define this to return nonzero if the program is stopped in the dynamic linker. @item SKIP_SOLIB_RESOLVER (@var{pc}) @findex SKIP_SOLIB_RESOLVER Define this to evaluate to the (nonzero) address at which execution should continue to get past the dynamic linker's symbol resolution function. A zero value indicates that it is not important or necessary to set a breakpoint to get through the dynamic linker and that single stepping will suffice. @item CORE_ADDR gdbarch_integer_to_address (@var{gdbarch}, @var{type}, @var{buf}) @findex gdbarch_integer_to_address @cindex converting integers to addresses Define this when the architecture needs to handle non-pointer to address conversions specially. Converts that value to an address according to the current architectures conventions. @emph{Pragmatics: When the user copies a well defined expression from their source code and passes it, as a parameter, to @value{GDBN}'s @code{print} command, they should get the same value as would have been computed by the target program. Any deviation from this rule can cause major confusion and annoyance, and needs to be justified carefully. In other words, @value{GDBN} doesn't really have the freedom to do these conversions in clever and useful ways. It has, however, been pointed out that users aren't complaining about how @value{GDBN} casts integers to pointers; they are complaining that they can't take an address from a disassembly listing and give it to @code{x/i}. Adding an architecture method like @code{gdbarch_integer_to_address} certainly makes it possible for @value{GDBN} to ``get it right'' in all circumstances.} @xref{Target Architecture Definition, , Pointers Are Not Always Addresses}. @item CORE_ADDR gdbarch_pointer_to_address (@var{gdbarch}, @var{type}, @var{buf}) @findex gdbarch_pointer_to_address Assume that @var{buf} holds a pointer of type @var{type}, in the appropriate format for the current architecture. Return the byte address the pointer refers to. @xref{Target Architecture Definition, , Pointers Are Not Always Addresses}. @item void gdbarch_register_to_value(@var{gdbarch}, @var{frame}, @var{regnum}, @var{type}, @var{fur}) @findex gdbarch_register_to_value Convert the raw contents of register @var{regnum} into a value of type @var{type}. @xref{Target Architecture Definition, , Using Different Register and Memory Data Representations}. @item REGISTER_CONVERT_TO_VIRTUAL(@var{reg}, @var{type}, @var{from}, @var{to}) @findex REGISTER_CONVERT_TO_VIRTUAL Convert the value of register @var{reg} from its raw form to its virtual form. @xref{Target Architecture Definition, , Raw and Virtual Register Representations}. @item REGISTER_CONVERT_TO_RAW(@var{type}, @var{reg}, @var{from}, @var{to}) @findex REGISTER_CONVERT_TO_RAW Convert the value of register @var{reg} from its virtual form to its raw form. @xref{Target Architecture Definition, , Raw and Virtual Register Representations}. @item const struct regset *regset_from_core_section (struct gdbarch * @var{gdbarch}, const char * @var{sect_name}, size_t @var{sect_size}) @findex regset_from_core_section Return the appropriate register set for a core file section with name @var{sect_name} and size @var{sect_size}. @item SOFTWARE_SINGLE_STEP_P() @findex SOFTWARE_SINGLE_STEP_P Define this as 1 if the target does not have a hardware single-step mechanism. The macro @code{SOFTWARE_SINGLE_STEP} must also be defined. @item SOFTWARE_SINGLE_STEP(@var{signal}, @var{insert_breakpoints_p}) @findex SOFTWARE_SINGLE_STEP A function that inserts or removes (depending on @var{insert_breakpoints_p}) breakpoints at each possible destinations of the next instruction. See @file{sparc-tdep.c} and @file{rs6000-tdep.c} for examples. @item set_gdbarch_sofun_address_maybe_missing (@var{gdbarch}, @var{set}) @findex set_gdbarch_sofun_address_maybe_missing Somebody clever observed that, the more actual addresses you have in the debug information, the more time the linker has to spend relocating them. So whenever there's some other way the debugger could find the address it needs, you should omit it from the debug info, to make linking faster. Calling @code{set_gdbarch_sofun_address_maybe_missing} with a non-zero argument @var{set} indicates that a particular set of hacks of this sort are in use, affecting @code{N_SO} and @code{N_FUN} entries in stabs-format debugging information. @code{N_SO} stabs mark the beginning and ending addresses of compilation units in the text segment. @code{N_FUN} stabs mark the starts and ends of functions. In this case, @value{GDBN} assumes two things: @itemize @bullet @item @code{N_FUN} stabs have an address of zero. Instead of using those addresses, you should find the address where the function starts by taking the function name from the stab, and then looking that up in the minsyms (the linker/assembler symbol table). In other words, the stab has the name, and the linker/assembler symbol table is the only place that carries the address. @item @code{N_SO} stabs have an address of zero, too. You just look at the @code{N_FUN} stabs that appear before and after the @code{N_SO} stab, and guess the starting and ending addresses of the compilation unit from them. @end itemize @item int gdbarch_stabs_argument_has_addr (@var{gdbarch}, @var{type}) @findex gdbarch_stabs_argument_has_addr @anchor{gdbarch_stabs_argument_has_addr} Define this function to return nonzero if a function argument of type @var{type} is passed by reference instead of value. @item CORE_ADDR gdbarch_push_dummy_call (@var{gdbarch}, @var{function}, @var{regcache}, @var{bp_addr}, @var{nargs}, @var{args}, @var{sp}, @var{struct_return}, @var{struct_addr}) @findex gdbarch_push_dummy_call @anchor{gdbarch_push_dummy_call} Define this to push the dummy frame's call to the inferior function onto the stack. In addition to pushing @var{nargs}, the code should push @var{struct_addr} (when @var{struct_return} is non-zero), and the return address (@var{bp_addr}, in inferior's PC register encoding). @var{function} is a pointer to a @code{struct value}; on architectures that use function descriptors, this contains the function descriptor value. Returns the updated top-of-stack pointer. @item CORE_ADDR gdbarch_push_dummy_code (@var{gdbarch}, @var{sp}, @var{funaddr}, @var{using_gcc}, @var{args}, @var{nargs}, @var{value_type}, @var{real_pc}, @var{bp_addr}, @var{regcache}) @findex gdbarch_push_dummy_code @anchor{gdbarch_push_dummy_code} Given a stack based call dummy, push the instruction sequence (including space for a breakpoint) to which the called function should return. Set @var{bp_addr} to the address at which the breakpoint instruction should be inserted (in inferior's PC register encoding), @var{real_pc} to the resume address when starting the call sequence, and return the updated inner-most stack address. By default, the stack is grown sufficient to hold a frame-aligned (@pxref{frame_align}) breakpoint, @var{bp_addr} is set to the address reserved for that breakpoint (in inferior's PC register encoding), and @var{real_pc} set to @var{funaddr}. This method replaces @w{@code{gdbarch_call_dummy_location (@var{gdbarch})}}. @item int gdbarch_sdb_reg_to_regnum (@var{gdbarch}, @var{sdb_regnr}) @findex gdbarch_sdb_reg_to_regnum Use this function to convert sdb register @var{sdb_regnr} into @value{GDBN} regnum. If not defined, no conversion will be done. @item enum return_value_convention gdbarch_return_value (struct gdbarch *@var{gdbarch}, struct type *@var{valtype}, struct regcache *@var{regcache}, void *@var{readbuf}, const void *@var{writebuf}) @findex gdbarch_return_value @anchor{gdbarch_return_value} Given a function with a return-value of type @var{rettype}, return which return-value convention that function would use. @value{GDBN} currently recognizes two function return-value conventions: @code{RETURN_VALUE_REGISTER_CONVENTION} where the return value is found in registers; and @code{RETURN_VALUE_STRUCT_CONVENTION} where the return value is found in memory and the address of that memory location is passed in as the function's first parameter. If the register convention is being used, and @var{writebuf} is non-@code{NULL}, also copy the return-value in @var{writebuf} into @var{regcache}. If the register convention is being used, and @var{readbuf} is non-@code{NULL}, also copy the return value from @var{regcache} into @var{readbuf} (@var{regcache} contains a copy of the registers from the just returned function). @emph{Maintainer note: This method replaces separate predicate, extract, store methods. By having only one method, the logic needed to determine the return-value convention need only be implemented in one place. If @value{GDBN} were written in an @sc{oo} language, this method would instead return an object that knew how to perform the register return-value extract and store.} @emph{Maintainer note: This method does not take a @var{gcc_p} parameter, and such a parameter should not be added. If an architecture that requires per-compiler or per-function information be identified, then the replacement of @var{rettype} with @code{struct value} @var{function} should be pursued.} @emph{Maintainer note: The @var{regcache} parameter limits this methods to the inner most frame. While replacing @var{regcache} with a @code{struct frame_info} @var{frame} parameter would remove that limitation there has yet to be a demonstrated need for such a change.} @item void gdbarch_skip_permanent_breakpoint (@var{gdbarch}, @var{regcache}) @findex gdbarch_skip_permanent_breakpoint Advance the inferior's PC past a permanent breakpoint. @value{GDBN} normally steps over a breakpoint by removing it, stepping one instruction, and re-inserting the breakpoint. However, permanent breakpoints are hardwired into the inferior, and can't be removed, so this strategy doesn't work. Calling @code{gdbarch_skip_permanent_breakpoint} adjusts the processor's state so that execution will resume just after the breakpoint. This function does the right thing even when the breakpoint is in the delay slot of a branch or jump. @item CORE_ADDR gdbarch_skip_trampoline_code (@var{gdbarch}, @var{frame}, @var{pc}) @findex gdbarch_skip_trampoline_code If the target machine has trampoline code that sits between callers and the functions being called, then define this function to return a new PC that is at the start of the real function. @item int gdbarch_deprecated_fp_regnum (@var{gdbarch}) @findex gdbarch_deprecated_fp_regnum If the frame pointer is in a register, use this function to return the number of that register. @item int gdbarch_stab_reg_to_regnum (@var{gdbarch}, @var{stab_regnr}) @findex gdbarch_stab_reg_to_regnum Use this function to convert stab register @var{stab_regnr} into @value{GDBN} regnum. If not defined, no conversion will be done. @item TARGET_CHAR_BIT @findex TARGET_CHAR_BIT Number of bits in a char; defaults to 8. @item int gdbarch_char_signed (@var{gdbarch}) @findex gdbarch_char_signed Non-zero if @code{char} is normally signed on this architecture; zero if it should be unsigned. The ISO C standard requires the compiler to treat @code{char} as equivalent to either @code{signed char} or @code{unsigned char}; any character in the standard execution set is supposed to be positive. Most compilers treat @code{char} as signed, but @code{char} is unsigned on the IBM S/390, RS6000, and PowerPC targets. @item int gdbarch_double_bit (@var{gdbarch}) @findex gdbarch_double_bit Number of bits in a double float; defaults to @w{@code{8 * TARGET_CHAR_BIT}}. @item int gdbarch_float_bit (@var{gdbarch}) @findex gdbarch_float_bit Number of bits in a float; defaults to @w{@code{4 * TARGET_CHAR_BIT}}. @item int gdbarch_int_bit (@var{gdbarch}) @findex gdbarch_int_bit Number of bits in an integer; defaults to @w{@code{4 * TARGET_CHAR_BIT}}. @item int gdbarch_long_bit (@var{gdbarch}) @findex gdbarch_long_bit Number of bits in a long integer; defaults to @w{@code{4 * TARGET_CHAR_BIT}}. @item int gdbarch_long_double_bit (@var{gdbarch}) @findex gdbarch_long_double_bit Number of bits in a long double float; defaults to @w{@code{2 * gdbarch_double_bit (@var{gdbarch})}}. @item int gdbarch_long_long_bit (@var{gdbarch}) @findex gdbarch_long_long_bit Number of bits in a long long integer; defaults to @w{@code{2 * gdbarch_long_bit (@var{gdbarch})}}. @item int gdbarch_ptr_bit (@var{gdbarch}) @findex gdbarch_ptr_bit Number of bits in a pointer; defaults to @w{@code{gdbarch_int_bit (@var{gdbarch})}}. @item int gdbarch_short_bit (@var{gdbarch}) @findex gdbarch_short_bit Number of bits in a short integer; defaults to @w{@code{2 * TARGET_CHAR_BIT}}. @item void gdbarch_virtual_frame_pointer (@var{gdbarch}, @var{pc}, @var{frame_regnum}, @var{frame_offset}) @findex gdbarch_virtual_frame_pointer Returns a @code{(@var{register}, @var{offset})} pair representing the virtual frame pointer in use at the code address @var{pc}. If virtual frame pointers are not used, a default definition simply returns @code{gdbarch_deprecated_fp_regnum} (or @code{gdbarch_sp_regnum}, if no frame pointer is defined), with an offset of zero. @c need to explain virtual frame pointers, they are recorded in agent @c expressions for tracepoints @item TARGET_HAS_HARDWARE_WATCHPOINTS If non-zero, the target has support for hardware-assisted watchpoints. @xref{Algorithms, watchpoints}, for more details and other related macros. @item int gdbarch_print_insn (@var{gdbarch}, @var{vma}, @var{info}) @findex gdbarch_print_insn This is the function used by @value{GDBN} to print an assembly instruction. It prints the instruction at address @var{vma} in debugged memory and returns the length of the instruction, in bytes. This usually points to a function in the @code{opcodes} library (@pxref{Support Libraries, ,Opcodes}). @var{info} is a structure (of type @code{disassemble_info}) defined in the header file @file{include/dis-asm.h}, and used to pass information to the instruction decoding routine. @item frame_id gdbarch_dummy_id (@var{gdbarch}, @var{frame}) @findex gdbarch_dummy_id @anchor{gdbarch_dummy_id} Given @var{frame} return a @w{@code{struct frame_id}} that uniquely identifies an inferior function call's dummy frame. The value returned must match the dummy frame stack value previously saved by @code{call_function_by_hand}. @item void gdbarch_value_to_register (@var{gdbarch}, @var{frame}, @var{type}, @var{buf}) @findex gdbarch_value_to_register Convert a value of type @var{type} into the raw contents of a register. @xref{Target Architecture Definition, , Using Different Register and Memory Data Representations}. @end table Motorola M68K target conditionals. @ftable @code @item BPT_VECTOR Define this to be the 4-bit location of the breakpoint trap vector. If not defined, it will default to @code{0xf}. @item REMOTE_BPT_VECTOR Defaults to @code{1}. @end ftable @node Adding a New Target @section Adding a New Target @cindex adding a target The following files add a target to @value{GDBN}: @table @file @cindex target dependent files @item gdb/@var{ttt}-tdep.c Contains any miscellaneous code required for this target machine. On some machines it doesn't exist at all. @item gdb/@var{arch}-tdep.c @itemx gdb/@var{arch}-tdep.h This is required to describe the basic layout of the target machine's processor chip (registers, stack, etc.). It can be shared among many targets that use the same processor architecture. @end table (Target header files such as @file{gdb/config/@var{arch}/tm-@var{ttt}.h}, @file{gdb/config/@var{arch}/tm-@var{arch}.h}, and @file{config/tm-@var{os}.h} are no longer used.) @findex _initialize_@var{arch}_tdep A @value{GDBN} description for a new architecture, arch is created by defining a global function @code{_initialize_@var{arch}_tdep}, by convention in the source file @file{@var{arch}-tdep.c}. For example, in the case of the OpenRISC 1000, this function is called @code{_initialize_or1k_tdep} and is found in the file @file{or1k-tdep.c}. The object file resulting from compiling this source file, which will contain the implementation of the @code{_initialize_@var{arch}_tdep} function is specified in the @value{GDBN} @file{configure.tgt} file, which includes a large case statement pattern matching against the @code{--target} option of the @kbd{configure} script. @quotation @emph{Note:} If the architecture requires multiple source files, the corresponding binaries should be included in @file{configure.tgt}. However if there are header files, the dependencies on these will not be picked up from the entries in @file{configure.tgt}. The @file{Makefile.in} file will need extending to show these dependencies. @end quotation @findex gdbarch_register A new struct gdbarch, defining the new architecture, is created within the @code{_initialize_@var{arch}_tdep} function by calling @code{gdbarch_register}: @smallexample void gdbarch_register (enum bfd_architecture architecture, gdbarch_init_ftype *init_func, gdbarch_dump_tdep_ftype *tdep_dump_func); @end smallexample This function has been described fully in an earlier section. @xref{How an Architecture is Represented, , How an Architecture is Represented}. The new @code{@w{struct gdbarch}} should contain implementations of the necessary functions (described in the previous sections) to describe the basic layout of the target machine's processor chip (registers, stack, etc.). It can be shared among many targets that use the same processor architecture. @node Target Descriptions @chapter Target Descriptions @cindex target descriptions The target architecture definition (@pxref{Target Architecture Definition}) contains @value{GDBN}'s hard-coded knowledge about an architecture. For some platforms, it is handy to have more flexible knowledge about a specific instance of the architecture---for instance, a processor or development board. @dfn{Target descriptions} provide a mechanism for the user to tell @value{GDBN} more about what their target supports, or for the target to tell @value{GDBN} directly. For details on writing, automatically supplying, and manually selecting target descriptions, see @ref{Target Descriptions, , , gdb, Debugging with @value{GDBN}}. This section will cover some related topics about the @value{GDBN} internals. @menu * Target Descriptions Implementation:: * Adding Target Described Register Support:: @end menu @node Target Descriptions Implementation @section Target Descriptions Implementation @cindex target descriptions, implementation Before @value{GDBN} connects to a new target, or runs a new program on an existing target, it discards any existing target description and reverts to a default gdbarch. Then, after connecting, it looks for a new target description by calling @code{target_find_description}. A description may come from a user specified file (XML), the remote @samp{qXfer:features:read} packet (also XML), or from any custom @code{to_read_description} routine in the target vector. For instance, the remote target supports guessing whether a MIPS target is 32-bit or 64-bit based on the size of the @samp{g} packet. If any target description is found, @value{GDBN} creates a new gdbarch incorporating the description by calling @code{gdbarch_update_p}. Any @samp{<architecture>} element is handled first, to determine which architecture's gdbarch initialization routine is called to create the new architecture. Then the initialization routine is called, and has a chance to adjust the constructed architecture based on the contents of the target description. For instance, it can recognize any properties set by a @code{to_read_description} routine. Also see @ref{Adding Target Described Register Support}. @node Adding Target Described Register Support @section Adding Target Described Register Support @cindex target descriptions, adding register support Target descriptions can report additional registers specific to an instance of the target. But it takes a little work in the architecture specific routines to support this. A target description must either have no registers or a complete set---this avoids complexity in trying to merge standard registers with the target defined registers. It is the architecture's responsibility to validate that a description with registers has everything it needs. To keep architecture code simple, the same mechanism is used to assign fixed internal register numbers to standard registers. If @code{tdesc_has_registers} returns 1, the description contains registers. The architecture's @code{gdbarch_init} routine should: @itemize @bullet @item Call @code{tdesc_data_alloc} to allocate storage, early, before searching for a matching gdbarch or allocating a new one. @item Use @code{tdesc_find_feature} to locate standard features by name. @item Use @code{tdesc_numbered_register} and @code{tdesc_numbered_register_choices} to locate the expected registers in the standard features. @item Return @code{NULL} if a required feature is missing, or if any standard feature is missing expected registers. This will produce a warning that the description was incomplete. @item Free the allocated data before returning, unless @code{tdesc_use_registers} is called. @item Call @code{set_gdbarch_num_regs} as usual, with a number higher than any fixed number passed to @code{tdesc_numbered_register}. @item Call @code{tdesc_use_registers} after creating a new gdbarch, before returning it. @end itemize After @code{tdesc_use_registers} has been called, the architecture's @code{register_name}, @code{register_type}, and @code{register_reggroup_p} routines will not be called; that information will be taken from the target description. @code{num_regs} may be increased to account for any additional registers in the description. Pseudo-registers require some extra care: @itemize @bullet @item Using @code{tdesc_numbered_register} allows the architecture to give constant register numbers to standard architectural registers, e.g.@: as an @code{enum} in @file{@var{arch}-tdep.h}. But because pseudo-registers are always numbered above @code{num_regs}, which may be increased by the description, constant numbers can not be used for pseudos. They must be numbered relative to @code{num_regs} instead. @item The description will not describe pseudo-registers, so the architecture must call @code{set_tdesc_pseudo_register_name}, @code{set_tdesc_pseudo_register_type}, and @code{set_tdesc_pseudo_register_reggroup_p} to supply routines describing pseudo registers. These routines will be passed internal register numbers, so the same routines used for the gdbarch equivalents are usually suitable. @end itemize @node Target Vector Definition @chapter Target Vector Definition @cindex target vector The target vector defines the interface between @value{GDBN}'s abstract handling of target systems, and the nitty-gritty code that actually exercises control over a process or a serial port. @value{GDBN} includes some 30-40 different target vectors; however, each configuration of @value{GDBN} includes only a few of them. @menu * Managing Execution State:: * Existing Targets:: @end menu @node Managing Execution State @section Managing Execution State @cindex execution state A target vector can be completely inactive (not pushed on the target stack), active but not running (pushed, but not connected to a fully manifested inferior), or completely active (pushed, with an accessible inferior). Most targets are only completely inactive or completely active, but some support persistent connections to a target even when the target has exited or not yet started. For example, connecting to the simulator using @code{target sim} does not create a running program. Neither registers nor memory are accessible until @code{run}. Similarly, after @code{kill}, the program can not continue executing. But in both cases @value{GDBN} remains connected to the simulator, and target-specific commands are directed to the simulator. A target which only supports complete activation should push itself onto the stack in its @code{to_open} routine (by calling @code{push_target}), and unpush itself from the stack in its @code{to_mourn_inferior} routine (by calling @code{unpush_target}). A target which supports both partial and complete activation should still call @code{push_target} in @code{to_open}, but not call @code{unpush_target} in @code{to_mourn_inferior}. Instead, it should call either @code{target_mark_running} or @code{target_mark_exited} in its @code{to_open}, depending on whether the target is fully active after connection. It should also call @code{target_mark_running} any time the inferior becomes fully active (e.g.@: in @code{to_create_inferior} and @code{to_attach}), and @code{target_mark_exited} when the inferior becomes inactive (in @code{to_mourn_inferior}). The target should also make sure to call @code{target_mourn_inferior} from its @code{to_kill}, to return the target to inactive state. @node Existing Targets @section Existing Targets @cindex targets @subsection File Targets Both executables and core files have target vectors. @subsection Standard Protocol and Remote Stubs @value{GDBN}'s file @file{remote.c} talks a serial protocol to code that runs in the target system. @value{GDBN} provides several sample @dfn{stubs} that can be integrated into target programs or operating systems for this purpose; they are named @file{@var{cpu}-stub.c}. Many operating systems, embedded targets, emulators, and simulators already have a @value{GDBN} stub built into them, and maintenance of the remote protocol must be careful to preserve compatibility. The @value{GDBN} user's manual describes how to put such a stub into your target code. What follows is a discussion of integrating the SPARC stub into a complicated operating system (rather than a simple program), by Stu Grossman, the author of this stub. The trap handling code in the stub assumes the following upon entry to @code{trap_low}: @enumerate @item %l1 and %l2 contain pc and npc respectively at the time of the trap; @item traps are disabled; @item you are in the correct trap window. @end enumerate As long as your trap handler can guarantee those conditions, then there is no reason why you shouldn't be able to ``share'' traps with the stub. The stub has no requirement that it be jumped to directly from the hardware trap vector. That is why it calls @code{exceptionHandler()}, which is provided by the external environment. For instance, this could set up the hardware traps to actually execute code which calls the stub first, and then transfers to its own trap handler. For the most point, there probably won't be much of an issue with ``sharing'' traps, as the traps we use are usually not used by the kernel, and often indicate unrecoverable error conditions. Anyway, this is all controlled by a table, and is trivial to modify. The most important trap for us is for @code{ta 1}. Without that, we can't single step or do breakpoints. Everything else is unnecessary for the proper operation of the debugger/stub. From reading the stub, it's probably not obvious how breakpoints work. They are simply done by deposit/examine operations from @value{GDBN}. @subsection ROM Monitor Interface @subsection Custom Protocols @subsection Transport Layer @subsection Builtin Simulator @node Native Debugging @chapter Native Debugging @cindex native debugging Several files control @value{GDBN}'s configuration for native support: @table @file @vindex NATDEPFILES @item gdb/config/@var{arch}/@var{xyz}.mh Specifies Makefile fragments needed by a @emph{native} configuration on machine @var{xyz}. In particular, this lists the required native-dependent object files, by defining @samp{NATDEPFILES=@dots{}}. Also specifies the header file which describes native support on @var{xyz}, by defining @samp{NAT_FILE= nm-@var{xyz}.h}. You can also define @samp{NAT_CFLAGS}, @samp{NAT_ADD_FILES}, @samp{NAT_CLIBS}, @samp{NAT_CDEPS}, @samp{NAT_GENERATED_FILES}, etc.; see @file{Makefile.in}. @emph{Maintainer's note: The @file{.mh} suffix is because this file originally contained @file{Makefile} fragments for hosting @value{GDBN} on machine @var{xyz}. While the file is no longer used for this purpose, the @file{.mh} suffix remains. Perhaps someone will eventually rename these fragments so that they have a @file{.mn} suffix.} @item gdb/config/@var{arch}/nm-@var{xyz}.h (@file{nm.h} is a link to this file, created by @code{configure}). Contains C macro definitions describing the native system environment, such as child process control and core file support. @item gdb/@var{xyz}-nat.c Contains any miscellaneous C code required for this native support of this machine. On some machines it doesn't exist at all. @end table There are some ``generic'' versions of routines that can be used by various systems. These can be customized in various ways by macros defined in your @file{nm-@var{xyz}.h} file. If these routines work for the @var{xyz} host, you can just include the generic file's name (with @samp{.o}, not @samp{.c}) in @code{NATDEPFILES}. Otherwise, if your machine needs custom support routines, you will need to write routines that perform the same functions as the generic file. Put them into @file{@var{xyz}-nat.c}, and put @file{@var{xyz}-nat.o} into @code{NATDEPFILES}. @table @file @item inftarg.c This contains the @emph{target_ops vector} that supports Unix child processes on systems which use ptrace and wait to control the child. @item procfs.c This contains the @emph{target_ops vector} that supports Unix child processes on systems which use /proc to control the child. @item fork-child.c This does the low-level grunge that uses Unix system calls to do a ``fork and exec'' to start up a child process. @item infptrace.c This is the low level interface to inferior processes for systems using the Unix @code{ptrace} call in a vanilla way. @end table @section ptrace @section /proc @section win32 @section shared libraries @section Native Conditionals @cindex native conditionals When @value{GDBN} is configured and compiled, various macros are defined or left undefined, to control compilation when the host and target systems are the same. These macros should be defined (or left undefined) in @file{nm-@var{system}.h}. @table @code @item I386_USE_GENERIC_WATCHPOINTS An x86-based machine can define this to use the generic x86 watchpoint support; see @ref{Algorithms, I386_USE_GENERIC_WATCHPOINTS}. @item SOLIB_ADD (@var{filename}, @var{from_tty}, @var{targ}, @var{readsyms}) @findex SOLIB_ADD Define this to expand into an expression that will cause the symbols in @var{filename} to be added to @value{GDBN}'s symbol table. If @var{readsyms} is zero symbols are not read but any necessary low level processing for @var{filename} is still done. @item SOLIB_CREATE_INFERIOR_HOOK @findex SOLIB_CREATE_INFERIOR_HOOK Define this to expand into any shared-library-relocation code that you want to be run just after the child process has been forked. @item START_INFERIOR_TRAPS_EXPECTED @findex START_INFERIOR_TRAPS_EXPECTED When starting an inferior, @value{GDBN} normally expects to trap twice; once when the shell execs, and once when the program itself execs. If the actual number of traps is something other than 2, then define this macro to expand into the number expected. @end table @node Support Libraries @chapter Support Libraries @section BFD @cindex BFD library BFD provides support for @value{GDBN} in several ways: @table @emph @item identifying executable and core files BFD will identify a variety of file types, including a.out, coff, and several variants thereof, as well as several kinds of core files. @item access to sections of files BFD parses the file headers to determine the names, virtual addresses, sizes, and file locations of all the various named sections in files (such as the text section or the data section). @value{GDBN} simply calls BFD to read or write section @var{x} at byte offset @var{y} for length @var{z}. @item specialized core file support BFD provides routines to determine the failing command name stored in a core file, the signal with which the program failed, and whether a core file matches (i.e.@: could be a core dump of) a particular executable file. @item locating the symbol information @value{GDBN} uses an internal interface of BFD to determine where to find the symbol information in an executable file or symbol-file. @value{GDBN} itself handles the reading of symbols, since BFD does not ``understand'' debug symbols, but @value{GDBN} uses BFD's cached information to find the symbols, string table, etc. @end table @section opcodes @cindex opcodes library The opcodes library provides @value{GDBN}'s disassembler. (It's a separate library because it's also used in binutils, for @file{objdump}). @section readline @cindex readline library The @code{readline} library provides a set of functions for use by applications that allow users to edit command lines as they are typed in. @section libiberty @cindex @code{libiberty} library The @code{libiberty} library provides a set of functions and features that integrate and improve on functionality found in modern operating systems. Broadly speaking, such features can be divided into three groups: supplemental functions (functions that may be missing in some environments and operating systems), replacement functions (providing a uniform and easier to use interface for commonly used standard functions), and extensions (which provide additional functionality beyond standard functions). @value{GDBN} uses various features provided by the @code{libiberty} library, for instance the C@t{++} demangler, the @acronym{IEEE} floating format support functions, the input options parser @samp{getopt}, the @samp{obstack} extension, and other functions. @subsection @code{obstacks} in @value{GDBN} @cindex @code{obstacks} The obstack mechanism provides a convenient way to allocate and free chunks of memory. Each obstack is a pool of memory that is managed like a stack. Objects (of any nature, size and alignment) are allocated and freed in a @acronym{LIFO} fashion on an obstack (see @code{libiberty}'s documentation for a more detailed explanation of @code{obstacks}). The most noticeable use of the @code{obstacks} in @value{GDBN} is in object files. There is an obstack associated with each internal representation of an object file. Lots of things get allocated on these @code{obstacks}: dictionary entries, blocks, blockvectors, symbols, minimal symbols, types, vectors of fundamental types, class fields of types, object files section lists, object files section offset lists, line tables, symbol tables, partial symbol tables, string tables, symbol table private data, macros tables, debug information sections and entries, import and export lists (som), unwind information (hppa), dwarf2 location expressions data. Plus various strings such as directory names strings, debug format strings, names of types. An essential and convenient property of all data on @code{obstacks} is that memory for it gets allocated (with @code{obstack_alloc}) at various times during a debugging session, but it is released all at once using the @code{obstack_free} function. The @code{obstack_free} function takes a pointer to where in the stack it must start the deletion from (much like the cleanup chains have a pointer to where to start the cleanups). Because of the stack like structure of the @code{obstacks}, this allows to free only a top portion of the obstack. There are a few instances in @value{GDBN} where such thing happens. Calls to @code{obstack_free} are done after some local data is allocated to the obstack. Only the local data is deleted from the obstack. Of course this assumes that nothing between the @code{obstack_alloc} and the @code{obstack_free} allocates anything else on the same obstack. For this reason it is best and safest to use temporary @code{obstacks}. Releasing the whole obstack is also not safe per se. It is safe only under the condition that we know the @code{obstacks} memory is no longer needed. In @value{GDBN} we get rid of the @code{obstacks} only when we get rid of the whole objfile(s), for instance upon reading a new symbol file. @section gnu-regex @cindex regular expressions library Regex conditionals. @table @code @item C_ALLOCA @item NFAILURES @item RE_NREGS @item SIGN_EXTEND_CHAR @item SWITCH_ENUM_BUG @item SYNTAX_TABLE @item Sword @item sparc @end table @section Array Containers @cindex Array Containers @cindex VEC Often it is necessary to manipulate a dynamic array of a set of objects. C forces some bookkeeping on this, which can get cumbersome and repetitive. The @file{vec.h} file contains macros for defining and using a typesafe vector type. The functions defined will be inlined when compiling, and so the abstraction cost should be zero. Domain checks are added to detect programming errors. An example use would be an array of symbols or section information. The array can be grown as symbols are read in (or preallocated), and the accessor macros provided keep care of all the necessary bookkeeping. Because the arrays are type safe, there is no danger of accidentally mixing up the contents. Think of these as C++ templates, but implemented in C. Because of the different behavior of structure objects, scalar objects and of pointers, there are three flavors of vector, one for each of these variants. Both the structure object and pointer variants pass pointers to objects around --- in the former case the pointers are stored into the vector and in the latter case the pointers are dereferenced and the objects copied into the vector. The scalar object variant is suitable for @code{int}-like objects, and the vector elements are returned by value. There are both @code{index} and @code{iterate} accessors. The iterator returns a boolean iteration condition and updates the iteration variable passed by reference. Because the iterator will be inlined, the address-of can be optimized away. The vectors are implemented using the trailing array idiom, thus they are not resizeable without changing the address of the vector object itself. This means you cannot have variables or fields of vector type --- always use a pointer to a vector. The one exception is the final field of a structure, which could be a vector type. You will have to use the @code{embedded_size} & @code{embedded_init} calls to create such objects, and they will probably not be resizeable (so don't use the @dfn{safe} allocation variants). The trailing array idiom is used (rather than a pointer to an array of data), because, if we allow @code{NULL} to also represent an empty vector, empty vectors occupy minimal space in the structure containing them. Each operation that increases the number of active elements is available in @dfn{quick} and @dfn{safe} variants. The former presumes that there is sufficient allocated space for the operation to succeed (it dies if there is not). The latter will reallocate the vector, if needed. Reallocation causes an exponential increase in vector size. If you know you will be adding N elements, it would be more efficient to use the reserve operation before adding the elements with the @dfn{quick} operation. This will ensure there are at least as many elements as you ask for, it will exponentially increase if there are too few spare slots. If you want reserve a specific number of slots, but do not want the exponential increase (for instance, you know this is the last allocation), use a negative number for reservation. You can also create a vector of a specific size from the get go. You should prefer the push and pop operations, as they append and remove from the end of the vector. If you need to remove several items in one go, use the truncate operation. The insert and remove operations allow you to change elements in the middle of the vector. There are two remove operations, one which preserves the element ordering @code{ordered_remove}, and one which does not @code{unordered_remove}. The latter function copies the end element into the removed slot, rather than invoke a memmove operation. The @code{lower_bound} function will determine where to place an item in the array using insert that will maintain sorted order. If you need to directly manipulate a vector, then the @code{address} accessor will return the address of the start of the vector. Also the @code{space} predicate will tell you whether there is spare capacity in the vector. You will not normally need to use these two functions. Vector types are defined using a @code{DEF_VEC_@{O,P,I@}(@var{typename})} macro. Variables of vector type are declared using a @code{VEC(@var{typename})} macro. The characters @code{O}, @code{P} and @code{I} indicate whether @var{typename} is an object (@code{O}), pointer (@code{P}) or integral (@code{I}) type. Be careful to pick the correct one, as you'll get an awkward and inefficient API if you use the wrong one. There is a check, which results in a compile-time warning, for the @code{P} and @code{I} versions, but there is no check for the @code{O} versions, as that is not possible in plain C. An example of their use would be, @smallexample DEF_VEC_P(tree); // non-managed tree vector. struct my_struct @{ VEC(tree) *v; // A (pointer to) a vector of tree pointers. @}; struct my_struct *s; if (VEC_length(tree, s->v)) @{ we have some contents @} VEC_safe_push(tree, s->v, decl); // append some decl onto the end for (ix = 0; VEC_iterate(tree, s->v, ix, elt); ix++) @{ do something with elt @} @end smallexample The @file{vec.h} file provides details on how to invoke the various accessors provided. They are enumerated here: @table @code @item VEC_length Return the number of items in the array, @item VEC_empty Return true if the array has no elements. @item VEC_last @itemx VEC_index Return the last or arbitrary item in the array. @item VEC_iterate Access an array element and indicate whether the array has been traversed. @item VEC_alloc @itemx VEC_free Create and destroy an array. @item VEC_embedded_size @itemx VEC_embedded_init Helpers for embedding an array as the final element of another struct. @item VEC_copy Duplicate an array. @item VEC_space Return the amount of free space in an array. @item VEC_reserve Ensure a certain amount of free space. @item VEC_quick_push @itemx VEC_safe_push Append to an array, either assuming the space is available, or making sure that it is. @item VEC_pop Remove the last item from an array. @item VEC_truncate Remove several items from the end of an array. @item VEC_safe_grow Add several items to the end of an array. @item VEC_replace Overwrite an item in the array. @item VEC_quick_insert @itemx VEC_safe_insert Insert an item into the middle of the array. Either the space must already exist, or the space is created. @item VEC_ordered_remove @itemx VEC_unordered_remove Remove an item from the array, preserving order or not. @item VEC_block_remove Remove a set of items from the array. @item VEC_address Provide the address of the first element. @item VEC_lower_bound Binary search the array. @end table @section include @node Coding Standards @chapter Coding Standards @cindex coding standards @section @value{GDBN} C Coding Standards @value{GDBN} follows the GNU coding standards, as described in @file{etc/standards.texi}. This file is also available for anonymous FTP from GNU archive sites. @value{GDBN} takes a strict interpretation of the standard; in general, when the GNU standard recommends a practice but does not require it, @value{GDBN} requires it. @value{GDBN} follows an additional set of coding standards specific to @value{GDBN}, as described in the following sections. @subsection ISO C @value{GDBN} assumes an ISO/IEC 9899:1990 (a.k.a.@: ISO C90) compliant compiler. @value{GDBN} does not assume an ISO C or POSIX compliant C library. @subsection Formatting @cindex source code formatting The standard GNU recommendations for formatting must be followed strictly. Any @value{GDBN}-specific deviation from GNU recomendations is described below. A function declaration should not have its name in column zero. A function definition should have its name in column zero. @smallexample /* Declaration */ static void foo (void); /* Definition */ void foo (void) @{ @} @end smallexample @emph{Pragmatics: This simplifies scripting. Function definitions can be found using @samp{^function-name}.} There must be a space between a function or macro name and the opening parenthesis of its argument list (except for macro definitions, as required by C). There must not be a space after an open paren/bracket or before a close paren/bracket. While additional whitespace is generally helpful for reading, do not use more than one blank line to separate blocks, and avoid adding whitespace after the end of a program line (as of 1/99, some 600 lines had whitespace after the semicolon). Excess whitespace causes difficulties for @code{diff} and @code{patch} utilities. Pointers are declared using the traditional K&R C style: @smallexample void *foo; @end smallexample @noindent and not: @smallexample void * foo; void* foo; @end smallexample In addition, whitespace around casts and unary operators should follow the following guidelines: @multitable @columnfractions .2 .2 .8 @item Use... @tab ...instead of @tab @item @code{!x} @tab @code{! x} @item @code{~x} @tab @code{~ x} @item @code{-x} @tab @code{- x} @tab (unary minus) @item @code{(foo) x} @tab @code{(foo)x} @tab (cast) @item @code{*x} @tab @code{* x} @tab (pointer dereference) @end multitable Any two or more lines in code should be wrapped in braces, even if they are comments, as they look like separate statements: @smallexample if (i) @{ /* Return success. */ return 0; @} @end smallexample @noindent and not: @smallexample if (i) /* Return success. */ return 0; @end smallexample @subsection Comments @cindex comment formatting The standard GNU requirements on comments must be followed strictly. Block comments must appear in the following form, with no @code{/*}- or @code{*/}-only lines, and no leading @code{*}: @smallexample /* Wait for control to return from inferior to debugger. If inferior gets a signal, we may decide to start it up again instead of returning. That is why there is a loop in this function. When this function actually returns it means the inferior should be left stopped and @value{GDBN} should read more commands. */ @end smallexample (Note that this format is encouraged by Emacs; tabbing for a multi-line comment works correctly, and @kbd{M-q} fills the block consistently.) Put a blank line between the block comments preceding function or variable definitions, and the definition itself. In general, put function-body comments on lines by themselves, rather than trying to fit them into the 20 characters left at the end of a line, since either the comment or the code will inevitably get longer than will fit, and then somebody will have to move it anyhow. @subsection C Usage @cindex C data types Code must not depend on the sizes of C data types, the format of the host's floating point numbers, the alignment of anything, or the order of evaluation of expressions. @cindex function usage Use functions freely. There are only a handful of compute-bound areas in @value{GDBN} that might be affected by the overhead of a function call, mainly in symbol reading. Most of @value{GDBN}'s performance is limited by the target interface (whether serial line or system call). However, use functions with moderation. A thousand one-line functions are just as hard to understand as a single thousand-line function. @emph{Macros are bad, M'kay.} (But if you have to use a macro, make sure that the macro arguments are protected with parentheses.) @cindex types Declarations like @samp{struct foo *} should be used in preference to declarations like @samp{typedef struct foo @{ @dots{} @} *foo_ptr}. Zero constant (@code{0}) is not interchangeable with a null pointer constant (@code{NULL}) anywhere. @sc{gcc} does not give a warning for such interchange. Specifically: @multitable @columnfractions .2 .5 @item incorrect @tab @code{if (pointervar) @{@}} @item incorrect @tab @code{if (!pointervar) @{@}} @item incorrect @tab @code{if (pointervar != 0) @{@}} @item incorrect @tab @code{if (pointervar == 0) @{@}} @item correct @tab @code{if (pointervar != NULL) @{@}} @item correct @tab @code{if (pointervar == NULL) @{@}} @end multitable @subsection Function Prototypes @cindex function prototypes Prototypes must be used when both @emph{declaring} and @emph{defining} a function. Prototypes for @value{GDBN} functions must include both the argument type and name, with the name matching that used in the actual function definition. All external functions should have a declaration in a header file that callers include, that declaration should use the @code{extern} modifier. The only exception concerns @code{_initialize_*} functions, which must be external so that @file{init.c} construction works, but shouldn't be visible to random source files. Where a source file needs a forward declaration of a static function, that declaration must appear in a block near the top of the source file. @subsection File Names Any file used when building the core of @value{GDBN} must be in lower case. Any file used when building the core of @value{GDBN} must be 8.3 unique. These requirements apply to both source and generated files. @emph{Pragmatics: The core of @value{GDBN} must be buildable on many platforms including DJGPP and MacOS/HFS. Every time an unfriendly file is introduced to the build process both @file{Makefile.in} and @file{configure.in} need to be modified accordingly. Compare the convoluted conversion process needed to transform @file{COPYING} into @file{copying.c} with the conversion needed to transform @file{version.in} into @file{version.c}.} Any file non 8.3 compliant file (that is not used when building the core of @value{GDBN}) must be added to @file{gdb/config/djgpp/fnchange.lst}. @emph{Pragmatics: This is clearly a compromise.} When @value{GDBN} has a local version of a system header file (ex @file{string.h}) the file name based on the POSIX header prefixed with @file{gdb_} (@file{gdb_string.h}). These headers should be relatively independent: they should use only macros defined by @file{configure}, the compiler, or the host; they should include only system headers; they should refer only to system types. They may be shared between multiple programs, e.g.@: @value{GDBN} and @sc{gdbserver}. For other files @samp{-} is used as the separator. @subsection Include Files A @file{.c} file should include @file{defs.h} first. A @file{.c} file should directly include the @code{.h} file of every declaration and/or definition it directly refers to. It cannot rely on indirect inclusion. A @file{.h} file should directly include the @code{.h} file of every declaration and/or definition it directly refers to. It cannot rely on indirect inclusion. Exception: The file @file{defs.h} does not need to be directly included. An external declaration should only appear in one include file. An external declaration should never appear in a @code{.c} file. Exception: a declaration for the @code{_initialize} function that pacifies @option{-Wmissing-declaration}. A @code{typedef} definition should only appear in one include file. An opaque @code{struct} declaration can appear in multiple @file{.h} files. Where possible, a @file{.h} file should use an opaque @code{struct} declaration instead of an include. All @file{.h} files should be wrapped in: @smallexample #ifndef INCLUDE_FILE_NAME_H #define INCLUDE_FILE_NAME_H header body #endif @end smallexample @section @value{GDBN} Python Coding Standards @value{GDBN} follows the published @code{Python} coding standards in @uref{http://www.python.org/dev/peps/pep-0008/, @code{PEP008}}. In addition, the guidelines in the @uref{http://google-styleguide.googlecode.com/svn/trunk/pyguide.html, Google Python Style Guide} are also followed where they do not conflict with @code{PEP008}. @subsection @value{GDBN}-specific exceptions There are a few exceptions to the published standards. They exist mainly for consistency with the @code{C} standards. @c It is expected that there are a few more exceptions, @c so we use itemize here. @itemize @bullet @item Use @code{FIXME} instead of @code{TODO}. @end itemize @node Misc Guidelines @chapter Misc Guidelines This chapter covers topics that are lower-level than the major algorithms of @value{GDBN}. @section Cleanups @cindex cleanups Cleanups are a structured way to deal with things that need to be done later. When your code does something (e.g., @code{xmalloc} some memory, or @code{open} a file) that needs to be undone later (e.g., @code{xfree} the memory or @code{close} the file), it can make a cleanup. The cleanup will be done at some future point: when the command is finished and control returns to the top level; when an error occurs and the stack is unwound; or when your code decides it's time to explicitly perform cleanups. Alternatively you can elect to discard the cleanups you created. Syntax: @table @code @item struct cleanup *@var{old_chain}; Declare a variable which will hold a cleanup chain handle. @findex make_cleanup @item @var{old_chain} = make_cleanup (@var{function}, @var{arg}); Make a cleanup which will cause @var{function} to be called with @var{arg} (a @code{char *}) later. The result, @var{old_chain}, is a handle that can later be passed to @code{do_cleanups} or @code{discard_cleanups}. Unless you are going to call @code{do_cleanups} or @code{discard_cleanups}, you can ignore the result from @code{make_cleanup}. @findex do_cleanups @item do_cleanups (@var{old_chain}); Do all cleanups added to the chain since the corresponding @code{make_cleanup} call was made. @findex discard_cleanups @item discard_cleanups (@var{old_chain}); Same as @code{do_cleanups} except that it just removes the cleanups from the chain and does not call the specified functions. @end table Cleanups are implemented as a chain. The handle returned by @code{make_cleanups} includes the cleanup passed to the call and any later cleanups appended to the chain (but not yet discarded or performed). E.g.: @smallexample make_cleanup (a, 0); @{ struct cleanup *old = make_cleanup (b, 0); make_cleanup (c, 0) ... do_cleanups (old); @} @end smallexample @noindent will call @code{c()} and @code{b()} but will not call @code{a()}. The cleanup that calls @code{a()} will remain in the cleanup chain, and will be done later unless otherwise discarded.@refill Your function should explicitly do or discard the cleanups it creates. Failing to do this leads to non-deterministic behavior since the caller will arbitrarily do or discard your functions cleanups. This need leads to two common cleanup styles. The first style is try/finally. Before it exits, your code-block calls @code{do_cleanups} with the old cleanup chain and thus ensures that your code-block's cleanups are always performed. For instance, the following code-segment avoids a memory leak problem (even when @code{error} is called and a forced stack unwind occurs) by ensuring that the @code{xfree} will always be called: @smallexample struct cleanup *old = make_cleanup (null_cleanup, 0); data = xmalloc (sizeof blah); make_cleanup (xfree, data); ... blah blah ... do_cleanups (old); @end smallexample The second style is try/except. Before it exits, your code-block calls @code{discard_cleanups} with the old cleanup chain and thus ensures that any created cleanups are not performed. For instance, the following code segment, ensures that the file will be closed but only if there is an error: @smallexample FILE *file = fopen ("afile", "r"); struct cleanup *old = make_cleanup (close_file, file); ... blah blah ... discard_cleanups (old); return file; @end smallexample Some functions, e.g., @code{fputs_filtered()} or @code{error()}, specify that they ``should not be called when cleanups are not in place''. This means that any actions you need to reverse in the case of an error or interruption must be on the cleanup chain before you call these functions, since they might never return to your code (they @samp{longjmp} instead). @section Per-architecture module data @cindex per-architecture module data @cindex multi-arch data @cindex data-pointer, per-architecture/per-module The multi-arch framework includes a mechanism for adding module specific per-architecture data-pointers to the @code{struct gdbarch} architecture object. A module registers one or more per-architecture data-pointers using: @deftypefn {Architecture Function} {struct gdbarch_data *} gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *@var{pre_init}) @var{pre_init} is used to, on-demand, allocate an initial value for a per-architecture data-pointer using the architecture's obstack (passed in as a parameter). Since @var{pre_init} can be called during architecture creation, it is not parameterized with the architecture. and must not call modules that use per-architecture data. @end deftypefn @deftypefn {Architecture Function} {struct gdbarch_data *} gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *@var{post_init}) @var{post_init} is used to obtain an initial value for a per-architecture data-pointer @emph{after}. Since @var{post_init} is always called after architecture creation, it both receives the fully initialized architecture and is free to call modules that use per-architecture data (care needs to be taken to ensure that those other modules do not try to call back to this module as that will create in cycles in the initialization call graph). @end deftypefn These functions return a @code{struct gdbarch_data} that is used to identify the per-architecture data-pointer added for that module. The per-architecture data-pointer is accessed using the function: @deftypefn {Architecture Function} {void *} gdbarch_data (struct gdbarch *@var{gdbarch}, struct gdbarch_data *@var{data_handle}) Given the architecture @var{arch} and module data handle @var{data_handle} (returned by @code{gdbarch_data_register_pre_init} or @code{gdbarch_data_register_post_init}), this function returns the current value of the per-architecture data-pointer. If the data pointer is @code{NULL}, it is first initialized by calling the corresponding @var{pre_init} or @var{post_init} method. @end deftypefn The examples below assume the following definitions: @smallexample struct nozel @{ int total; @}; static struct gdbarch_data *nozel_handle; @end smallexample A module can extend the architecture vector, adding additional per-architecture data, using the @var{pre_init} method. The module's per-architecture data is then initialized during architecture creation. In the below, the module's per-architecture @emph{nozel} is added. An architecture can specify its nozel by calling @code{set_gdbarch_nozel} from @code{gdbarch_init}. @smallexample static void * nozel_pre_init (struct obstack *obstack) @{ struct nozel *data = OBSTACK_ZALLOC (obstack, struct nozel); return data; @} @end smallexample @smallexample extern void set_gdbarch_nozel (struct gdbarch *gdbarch, int total) @{ struct nozel *data = gdbarch_data (gdbarch, nozel_handle); data->total = nozel; @} @end smallexample A module can on-demand create architecture dependent data structures using @code{post_init}. In the below, the nozel's total is computed on-demand by @code{nozel_post_init} using information obtained from the architecture. @smallexample static void * nozel_post_init (struct gdbarch *gdbarch) @{ struct nozel *data = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct nozel); nozel->total = gdbarch@dots{} (gdbarch); return data; @} @end smallexample @smallexample extern int nozel_total (struct gdbarch *gdbarch) @{ struct nozel *data = gdbarch_data (gdbarch, nozel_handle); return data->total; @} @end smallexample @section Wrapping Output Lines @cindex line wrap in output @findex wrap_here Output that goes through @code{printf_filtered} or @code{fputs_filtered} or @code{fputs_demangled} needs only to have calls to @code{wrap_here} added in places that would be good breaking points. The utility routines will take care of actually wrapping if the line width is exceeded. The argument to @code{wrap_here} is an indentation string which is printed @emph{only} if the line breaks there. This argument is saved away and used later. It must remain valid until the next call to @code{wrap_here} or until a newline has been printed through the @code{*_filtered} functions. Don't pass in a local variable and then return! It is usually best to call @code{wrap_here} after printing a comma or space. If you call it before printing a space, make sure that your indentation properly accounts for the leading space that will print if the line wraps there. Any function or set of functions that produce filtered output must finish by printing a newline, to flush the wrap buffer, before switching to unfiltered (@code{printf}) output. Symbol reading routines that print warnings are a good example. @section Memory Management @value{GDBN} does not use the functions @code{malloc}, @code{realloc}, @code{calloc}, @code{free} and @code{asprintf}. @value{GDBN} uses the functions @code{xmalloc}, @code{xrealloc} and @code{xcalloc} when allocating memory. Unlike @code{malloc} et.al.@: these functions do not return when the memory pool is empty. Instead, they unwind the stack using cleanups. These functions return @code{NULL} when requested to allocate a chunk of memory of size zero. @emph{Pragmatics: By using these functions, the need to check every memory allocation is removed. These functions provide portable behavior.} @value{GDBN} does not use the function @code{free}. @value{GDBN} uses the function @code{xfree} to return memory to the memory pool. Consistent with ISO-C, this function ignores a request to free a @code{NULL} pointer. @emph{Pragmatics: On some systems @code{free} fails when passed a @code{NULL} pointer.} @value{GDBN} can use the non-portable function @code{alloca} for the allocation of small temporary values (such as strings). @emph{Pragmatics: This function is very non-portable. Some systems restrict the memory being allocated to no more than a few kilobytes.} @value{GDBN} uses the string function @code{xstrdup} and the print function @code{xstrprintf}. @emph{Pragmatics: @code{asprintf} and @code{strdup} can fail. Print functions such as @code{sprintf} are very prone to buffer overflow errors.} @section Compiler Warnings @cindex compiler warnings With few exceptions, developers should avoid the configuration option @samp{--disable-werror} when building @value{GDBN}. The exceptions are listed in the file @file{gdb/MAINTAINERS}. The default, when building with @sc{gcc}, is @samp{--enable-werror}. This option causes @value{GDBN} (when built using GCC) to be compiled with a carefully selected list of compiler warning flags. Any warnings from those flags are treated as errors. The current list of warning flags includes: @table @samp @item -Wall Recommended @sc{gcc} warnings. @item -Wdeclaration-after-statement @sc{gcc} 3.x (and later) and @sc{c99} allow declarations mixed with code, but @sc{gcc} 2.x and @sc{c89} do not. @item -Wpointer-arith @item -Wformat-nonliteral Non-literal format strings, with a few exceptions, are bugs - they might contain unintended user-supplied format specifiers. Since @value{GDBN} uses the @code{format printf} attribute on all @code{printf} like functions this checks not just @code{printf} calls but also calls to functions such as @code{fprintf_unfiltered}. @item -Wno-pointer-sign In version 4.0, GCC began warning about pointer argument passing or assignment even when the source and destination differed only in signedness. However, most @value{GDBN} code doesn't distinguish carefully between @code{char} and @code{unsigned char}. In early 2006 the @value{GDBN} developers decided correcting these warnings wasn't worth the time it would take. @item -Wno-unused-parameter Due to the way that @value{GDBN} is implemented many functions have unused parameters. Consequently this warning is avoided. The macro @code{ATTRIBUTE_UNUSED} is not used as it leads to false negatives --- it is not an error to have @code{ATTRIBUTE_UNUSED} on a parameter that is being used. @item -Wno-unused @itemx -Wno-switch @itemx -Wno-char-subscripts These are warnings which might be useful for @value{GDBN}, but are currently too noisy to enable with @samp{-Werror}. @end table @section Internal Error Recovery During its execution, @value{GDBN} can encounter two types of errors. User errors and internal errors. User errors include not only a user entering an incorrect command but also problems arising from corrupt object files and system errors when interacting with the target. Internal errors include situations where @value{GDBN} has detected, at run time, a corrupt or erroneous situation. When reporting an internal error, @value{GDBN} uses @code{internal_error} and @code{gdb_assert}. @value{GDBN} must not call @code{abort} or @code{assert}. @emph{Pragmatics: There is no @code{internal_warning} function. Either the code detected a user error, recovered from it and issued a @code{warning} or the code failed to correctly recover from the user error and issued an @code{internal_error}.} @section Command Names GDB U/I commands are written @samp{foo-bar}, not @samp{foo_bar}. @section Clean Design and Portable Implementation @cindex design In addition to getting the syntax right, there's the little question of semantics. Some things are done in certain ways in @value{GDBN} because long experience has shown that the more obvious ways caused various kinds of trouble. @cindex assumptions about targets You can't assume the byte order of anything that comes from a target (including @var{value}s, object files, and instructions). Such things must be byte-swapped using @code{SWAP_TARGET_AND_HOST} in @value{GDBN}, or one of the swap routines defined in @file{bfd.h}, such as @code{bfd_get_32}. You can't assume that you know what interface is being used to talk to the target system. All references to the target must go through the current @code{target_ops} vector. You can't assume that the host and target machines are the same machine (except in the ``native'' support modules). In particular, you can't assume that the target machine's header files will be available on the host machine. Target code must bring along its own header files -- written from scratch or explicitly donated by their owner, to avoid copyright problems. @cindex portability Insertion of new @code{#ifdef}'s will be frowned upon. It's much better to write the code portably than to conditionalize it for various systems. @cindex system dependencies New @code{#ifdef}'s which test for specific compilers or manufacturers or operating systems are unacceptable. All @code{#ifdef}'s should test for features. The information about which configurations contain which features should be segregated into the configuration files. Experience has proven far too often that a feature unique to one particular system often creeps into other systems; and that a conditional based on some predefined macro for your current system will become worthless over time, as new versions of your system come out that behave differently with regard to this feature. Adding code that handles specific architectures, operating systems, target interfaces, or hosts, is not acceptable in generic code. @cindex portable file name handling @cindex file names, portability One particularly notorious area where system dependencies tend to creep in is handling of file names. The mainline @value{GDBN} code assumes Posix semantics of file names: absolute file names begin with a forward slash @file{/}, slashes are used to separate leading directories, case-sensitive file names. These assumptions are not necessarily true on non-Posix systems such as MS-Windows. To avoid system-dependent code where you need to take apart or construct a file name, use the following portable macros: @table @code @findex HAVE_DOS_BASED_FILE_SYSTEM @item HAVE_DOS_BASED_FILE_SYSTEM This preprocessing symbol is defined to a non-zero value on hosts whose filesystems belong to the MS-DOS/MS-Windows family. Use this symbol to write conditional code which should only be compiled for such hosts. @findex IS_DIR_SEPARATOR @item IS_DIR_SEPARATOR (@var{c}) Evaluates to a non-zero value if @var{c} is a directory separator character. On Unix and GNU/Linux systems, only a slash @file{/} is such a character, but on Windows, both @file{/} and @file{\} will pass. @findex IS_ABSOLUTE_PATH @item IS_ABSOLUTE_PATH (@var{file}) Evaluates to a non-zero value if @var{file} is an absolute file name. For Unix and GNU/Linux hosts, a name which begins with a slash @file{/} is absolute. On DOS and Windows, @file{d:/foo} and @file{x:\bar} are also absolute file names. @findex FILENAME_CMP @item FILENAME_CMP (@var{f1}, @var{f2}) Calls a function which compares file names @var{f1} and @var{f2} as appropriate for the underlying host filesystem. For Posix systems, this simply calls @code{strcmp}; on case-insensitive filesystems it will call @code{strcasecmp} instead. @findex DIRNAME_SEPARATOR @item DIRNAME_SEPARATOR Evaluates to a character which separates directories in @code{PATH}-style lists, typically held in environment variables. This character is @samp{:} on Unix, @samp{;} on DOS and Windows. @findex SLASH_STRING @item SLASH_STRING This evaluates to a constant string you should use to produce an absolute filename from leading directories and the file's basename. @code{SLASH_STRING} is @code{"/"} on most systems, but might be @code{"\\"} for some Windows-based ports. @end table In addition to using these macros, be sure to use portable library functions whenever possible. For example, to extract a directory or a basename part from a file name, use the @code{dirname} and @code{basename} library functions (available in @code{libiberty} for platforms which don't provide them), instead of searching for a slash with @code{strrchr}. Another way to generalize @value{GDBN} along a particular interface is with an attribute struct. For example, @value{GDBN} has been generalized to handle multiple kinds of remote interfaces---not by @code{#ifdef}s everywhere, but by defining the @code{target_ops} structure and having a current target (as well as a stack of targets below it, for memory references). Whenever something needs to be done that depends on which remote interface we are using, a flag in the current target_ops structure is tested (e.g., @code{target_has_stack}), or a function is called through a pointer in the current target_ops structure. In this way, when a new remote interface is added, only one module needs to be touched---the one that actually implements the new remote interface. Other examples of attribute-structs are BFD access to multiple kinds of object file formats, or @value{GDBN}'s access to multiple source languages. Please avoid duplicating code. For example, in @value{GDBN} 3.x all the code interfacing between @code{ptrace} and the rest of @value{GDBN} was duplicated in @file{*-dep.c}, and so changing something was very painful. In @value{GDBN} 4.x, these have all been consolidated into @file{infptrace.c}. @file{infptrace.c} can deal with variations between systems the same way any system-independent file would (hooks, @code{#if defined}, etc.), and machines which are radically different don't need to use @file{infptrace.c} at all. All debugging code must be controllable using the @samp{set debug @var{module}} command. Do not use @code{printf} to print trace messages. Use @code{fprintf_unfiltered(gdb_stdlog, ...}. Do not use @code{#ifdef DEBUG}. @node Porting GDB @chapter Porting @value{GDBN} @cindex porting to new machines Most of the work in making @value{GDBN} compile on a new machine is in specifying the configuration of the machine. Porting a new architecture to @value{GDBN} can be broken into a number of steps. @itemize @bullet @item Ensure a @sc{bfd} exists for executables of the target architecture in the @file{bfd} directory. If one does not exist, create one by modifying an existing similar one. @item Implement a disassembler for the target architecture in the @file{opcodes} directory. @item Define the target architecture in the @file{gdb} directory (@pxref{Adding a New Target, , Adding a New Target}). Add the pattern for the new target to @file{configure.tgt} with the names of the files that contain the code. By convention the target architecture definition for an architecture @var{arch} is placed in @file{@var{arch}-tdep.c}. Within @file{@var{arch}-tdep.c} define the function @code{_initialize_@var{arch}_tdep} which calls @code{gdbarch_register} to create the new @code{@w{struct gdbarch}} for the architecture. @item If a new remote target is needed, consider adding a new remote target by defining a function @code{_initialize_remote_@var{arch}}. However if at all possible use the @value{GDBN} @emph{Remote Serial Protocol} for this and implement the server side protocol independently with the target. @item If desired implement a simulator in the @file{sim} directory. This should create the library @file{libsim.a} implementing the interface in @file{remote-sim.h} (found in the @file{include} directory). @item Build and test. If desired, lobby the @sc{gdb} steering group to have the new port included in the main distribution! @item Add a description of the new architecture to the main @value{GDBN} user guide (@pxref{Configuration Specific Information, , Configuration Specific Information, gdb, Debugging with @value{GDBN}}). @end itemize @node Versions and Branches @chapter Versions and Branches @section Versions @value{GDBN}'s version is determined by the file @file{gdb/version.in} and takes one of the following forms: @table @asis @item @var{major}.@var{minor} @itemx @var{major}.@var{minor}.@var{patchlevel} an official release (e.g., 6.2 or 6.2.1) @item @var{major}.@var{minor}.@var{patchlevel}.@var{YYYY}@var{MM}@var{DD} a snapshot taken at @var{YYYY}-@var{MM}-@var{DD}-gmt (e.g., 6.1.50.20020302, 6.1.90.20020304, or 6.1.0.20020308) @item @var{major}.@var{minor}.@var{patchlevel}.@var{YYYY}@var{MM}@var{DD}-cvs a @sc{cvs} check out drawn on @var{YYYY}-@var{MM}-@var{DD} (e.g., 6.1.50.20020302-cvs, 6.1.90.20020304-cvs, or 6.1.0.20020308-cvs) @item @var{major}.@var{minor}.@var{patchlevel}.@var{YYYY}@var{MM}@var{DD} (@var{vendor}) a vendor specific release of @value{GDBN}, that while based on@* @var{major}.@var{minor}.@var{patchlevel}.@var{YYYY}@var{MM}@var{DD}, may include additional changes @end table @value{GDBN}'s mainline uses the @var{major} and @var{minor} version numbers from the most recent release branch, with a @var{patchlevel} of 50. At the time each new release branch is created, the mainline's @var{major} and @var{minor} version numbers are updated. @value{GDBN}'s release branch is similar. When the branch is cut, the @var{patchlevel} is changed from 50 to 90. As draft releases are drawn from the branch, the @var{patchlevel} is incremented. Once the first release (@var{major}.@var{minor}) has been made, the @var{patchlevel} is set to 0 and updates have an incremented @var{patchlevel}. For snapshots, and @sc{cvs} check outs, it is also possible to identify the @sc{cvs} origin: @table @asis @item @var{major}.@var{minor}.50.@var{YYYY}@var{MM}@var{DD} drawn from the @sc{head} of mainline @sc{cvs} (e.g., 6.1.50.20020302) @item @var{major}.@var{minor}.90.@var{YYYY}@var{MM}@var{DD} @itemx @var{major}.@var{minor}.91.@var{YYYY}@var{MM}@var{DD} @dots{} drawn from a release branch prior to the release (e.g., 6.1.90.20020304) @item @var{major}.@var{minor}.0.@var{YYYY}@var{MM}@var{DD} @itemx @var{major}.@var{minor}.1.@var{YYYY}@var{MM}@var{DD} @dots{} drawn from a release branch after the release (e.g., 6.2.0.20020308) @end table If the previous @value{GDBN} version is 6.1 and the current version is 6.2, then, substituting 6 for @var{major} and 1 or 2 for @var{minor}, here's an illustration of a typical sequence: @smallexample <HEAD> | 6.1.50.20020302-cvs | +--------------------------. | <gdb_6_2-branch> | | 6.2.50.20020303-cvs 6.1.90 (draft #1) | | 6.2.50.20020304-cvs 6.1.90.20020304-cvs | | 6.2.50.20020305-cvs 6.1.91 (draft #2) | | 6.2.50.20020306-cvs 6.1.91.20020306-cvs | | 6.2.50.20020307-cvs 6.2 (release) | | 6.2.50.20020308-cvs 6.2.0.20020308-cvs | | 6.2.50.20020309-cvs 6.2.1 (update) | | 6.2.50.20020310-cvs <branch closed> | 6.2.50.20020311-cvs | +--------------------------. | <gdb_6_3-branch> | | 6.3.50.20020312-cvs 6.2.90 (draft #1) | | @end smallexample @section Release Branches @cindex Release Branches @value{GDBN} draws a release series (6.2, 6.2.1, @dots{}) from a single release branch, and identifies that branch using the @sc{cvs} branch tags: @smallexample gdb_@var{major}_@var{minor}-@var{YYYY}@var{MM}@var{DD}-branchpoint gdb_@var{major}_@var{minor}-branch gdb_@var{major}_@var{minor}-@var{YYYY}@var{MM}@var{DD}-release @end smallexample @emph{Pragmatics: To help identify the date at which a branch or release is made, both the branchpoint and release tags include the date that they are cut (@var{YYYY}@var{MM}@var{DD}) in the tag. The branch tag, denoting the head of the branch, does not need this.} @section Vendor Branches @cindex vendor branches To avoid version conflicts, vendors are expected to modify the file @file{gdb/version.in} to include a vendor unique alphabetic identifier (an official @value{GDBN} release never uses alphabetic characters in its version identifier). E.g., @samp{6.2widgit2}, or @samp{6.2 (Widgit Inc Patch 2)}. @section Experimental Branches @cindex experimental branches @subsection Guidelines @value{GDBN} permits the creation of branches, cut from the @sc{cvs} repository, for experimental development. Branches make it possible for developers to share preliminary work, and maintainers to examine significant new developments. The following are a set of guidelines for creating such branches: @table @emph @item a branch has an owner The owner can set further policy for a branch, but may not change the ground rules. In particular, they can set a policy for commits (be it adding more reviewers or deciding who can commit). @item all commits are posted All changes committed to a branch shall also be posted to @email{gdb-patches@@sourceware.org, the @value{GDBN} patches mailing list}. While commentary on such changes are encouraged, people should remember that the changes only apply to a branch. @item all commits are covered by an assignment This ensures that all changes belong to the Free Software Foundation, and avoids the possibility that the branch may become contaminated. @item a branch is focused A focused branch has a single objective or goal, and does not contain unnecessary or irrelevant changes. Cleanups, where identified, being be pushed into the mainline as soon as possible. @item a branch tracks mainline This keeps the level of divergence under control. It also keeps the pressure on developers to push cleanups and other stuff into the mainline. @item a branch shall contain the entire @value{GDBN} module The @value{GDBN} module @code{gdb} should be specified when creating a branch (branches of individual files should be avoided). @xref{Tags}. @item a branch shall be branded using @file{version.in} The file @file{gdb/version.in} shall be modified so that it identifies the branch @var{owner} and branch @var{name}, e.g., @samp{6.2.50.20030303_owner_name} or @samp{6.2 (Owner Name)}. @end table @subsection Tags @anchor{Tags} To simplify the identification of @value{GDBN} branches, the following branch tagging convention is strongly recommended: @table @code @item @var{owner}_@var{name}-@var{YYYYMMDD}-branchpoint @itemx @var{owner}_@var{name}-@var{YYYYMMDD}-branch The branch point and corresponding branch tag. @var{YYYYMMDD} is the date that the branch was created. A branch is created using the sequence: @anchor{experimental branch tags} @smallexample cvs rtag @var{owner}_@var{name}-@var{YYYYMMDD}-branchpoint gdb cvs rtag -b -r @var{owner}_@var{name}-@var{YYYYMMDD}-branchpoint \ @var{owner}_@var{name}-@var{YYYYMMDD}-branch gdb @end smallexample @item @var{owner}_@var{name}-@var{yyyymmdd}-mergepoint The tagged point, on the mainline, that was used when merging the branch on @var{yyyymmdd}. To merge in all changes since the branch was cut, use a command sequence like: @smallexample cvs rtag @var{owner}_@var{name}-@var{yyyymmdd}-mergepoint gdb cvs update \ -j@var{owner}_@var{name}-@var{YYYYMMDD}-branchpoint -j@var{owner}_@var{name}-@var{yyyymmdd}-mergepoint @end smallexample @noindent Similar sequences can be used to just merge in changes since the last merge. @end table @noindent For further information on @sc{cvs}, see @uref{http://www.gnu.org/software/cvs/, Concurrent Versions System}. @node Start of New Year Procedure @chapter Start of New Year Procedure @cindex new year procedure At the start of each new year, the following actions should be performed: @itemize @bullet @item Rotate the ChangeLog file The current @file{ChangeLog} file should be renamed into @file{ChangeLog-YYYY} where YYYY is the year that has just passed. A new @file{ChangeLog} file should be created, and its contents should contain a reference to the previous ChangeLog. The following should also be preserved at the end of the new ChangeLog, in order to provide the appropriate settings when editing this file with Emacs: @smallexample Local Variables: mode: change-log left-margin: 8 fill-column: 74 version-control: never coding: utf-8 End: @end smallexample @item Add an entry for the newly created ChangeLog file (@file{ChangeLog-YYYY}) in @file{gdb/config/djgpp/fnchange.lst}. @item Update the copyright year in the startup message Update the copyright year in: @itemize @bullet @item file @file{top.c}, function @code{print_gdb_version} @item file @file{gdbserver/server.c}, function @code{gdbserver_version} @item file @file{gdbserver/gdbreplay.c}, function @code{gdbreplay_version} @end itemize @item Run the @file{copyright.py} Python script to add the new year in the copyright notices of most source files. This script has been tested with Python 2.6 and 2.7. @end itemize @node Releasing GDB @chapter Releasing @value{GDBN} @cindex making a new release of gdb @section Branch Commit Policy The branch commit policy is pretty slack. @value{GDBN} releases 5.0, 5.1 and 5.2 all used the below: @itemize @bullet @item The @file{gdb/MAINTAINERS} file still holds. @item Don't fix something on the branch unless/until it is also fixed in the trunk. If this isn't possible, mentioning it in the @file{gdb/PROBLEMS} file is better than committing a hack. @item When considering a patch for the branch, suggested criteria include: Does it fix a build? Does it fix the sequence @kbd{break main; run} when debugging a static binary? @item The further a change is from the core of @value{GDBN}, the less likely the change will worry anyone (e.g., target specific code). @item Only post a proposal to change the core of @value{GDBN} after you've sent individual bribes to all the people listed in the @file{MAINTAINERS} file @t{;-)} @end itemize @emph{Pragmatics: Provided updates are restricted to non-core functionality there is little chance that a broken change will be fatal. This means that changes such as adding a new architectures or (within reason) support for a new host are considered acceptable.} @section Obsoleting code Before anything else, poke the other developers (and around the source code) to see if there is anything that can be removed from @value{GDBN} (an old target, an unused file). Obsolete code is identified by adding an @code{OBSOLETE} prefix to every line. Doing this means that it is easy to identify something that has been obsoleted when greping through the sources. The process is done in stages --- this is mainly to ensure that the wider @value{GDBN} community has a reasonable opportunity to respond. Remember, everything on the Internet takes a week. @enumerate @item Post the proposal on @email{gdb@@sourceware.org, the GDB mailing list} Creating a bug report to track the task's state, is also highly recommended. @item Wait a week or so. @item Post the proposal on @email{gdb-announce@@sourceware.org, the GDB Announcement mailing list}. @item Wait a week or so. @item Go through and edit all relevant files and lines so that they are prefixed with the word @code{OBSOLETE}. @item Wait until the next GDB version, containing this obsolete code, has been released. @item Remove the obsolete code. @end enumerate @noindent @emph{Maintainer note: While removing old code is regrettable it is hopefully better for @value{GDBN}'s long term development. Firstly it helps the developers by removing code that is either no longer relevant or simply wrong. Secondly since it removes any history associated with the file (effectively clearing the slate) the developer has a much freer hand when it comes to fixing broken files.} @section Before the Branch The most important objective at this stage is to find and fix simple changes that become a pain to track once the branch is created. For instance, configuration problems that stop @value{GDBN} from even building. If you can't get the problem fixed, document it in the @file{gdb/PROBLEMS} file. @subheading Prompt for @file{gdb/NEWS} People always forget. Send a post reminding them but also if you know something interesting happened add it yourself. The @code{schedule} script will mention this in its e-mail. @subheading Review @file{gdb/README} Grab one of the nightly snapshots and then walk through the @file{gdb/README} looking for anything that can be improved. The @code{schedule} script will mention this in its e-mail. @subheading Refresh any imported files. A number of files are taken from external repositories. They include: @itemize @bullet @item @file{texinfo/texinfo.tex} @item @file{config.guess} et.@: al.@: (see the top-level @file{MAINTAINERS} file) @item @file{etc/standards.texi}, @file{etc/make-stds.texi} @end itemize @subheading Check the ARI @uref{http://sourceware.org/gdb/ari,,A.R.I.} is an @code{awk} script (Awk Regression Index ;-) that checks for a number of errors and coding conventions. The checks include things like using @code{malloc} instead of @code{xmalloc} and file naming problems. There shouldn't be any regressions. @subsection Review the bug data base Close anything obviously fixed. @subsection Check all cross targets build The targets are listed in @file{gdb/MAINTAINERS}. @section Cut the Branch @subheading Create the branch @smallexample $ u=5.1 $ v=5.2 $ V=`echo $v | sed 's/\./_/g'` $ D=`date -u +%Y-%m-%d` $ echo $u $V $D 5.1 5_2 2002-03-03 $ echo cvs -f -d :ext:sourceware.org:/cvs/src rtag \ -D $D-gmt gdb_$V-$D-branchpoint insight cvs -f -d :ext:sourceware.org:/cvs/src rtag -D 2002-03-03-gmt gdb_5_2-2002-03-03-branchpoint insight $ ^echo ^^ ... $ echo cvs -f -d :ext:sourceware.org:/cvs/src rtag \ -b -r gdb_$V-$D-branchpoint gdb_$V-branch insight cvs -f -d :ext:sourceware.org:/cvs/src rtag \ -b -r gdb_5_2-2002-03-03-branchpoint gdb_5_2-branch insight $ ^echo ^^ ... $ @end smallexample @itemize @bullet @item By using @kbd{-D YYYY-MM-DD-gmt}, the branch is forced to an exact date/time. @item The trunk is first tagged so that the branch point can easily be found. @item Insight, which includes @value{GDBN}, is tagged at the same time. @item @file{version.in} gets bumped to avoid version number conflicts. @item The reading of @file{.cvsrc} is disabled using @file{-f}. @end itemize @subheading Update @file{version.in} @smallexample $ u=5.1 $ v=5.2 $ V=`echo $v | sed 's/\./_/g'` $ echo $u $v$V 5.1 5_2 $ cd /tmp $ echo cvs -f -d :ext:sourceware.org:/cvs/src co \ -r gdb_$V-branch src/gdb/version.in cvs -f -d :ext:sourceware.org:/cvs/src co -r gdb_5_2-branch src/gdb/version.in $ ^echo ^^ U src/gdb/version.in $ cd src/gdb $ echo $u.90-0000-00-00-cvs > version.in $ cat version.in 5.1.90-0000-00-00-cvs $ cvs -f commit version.in @end smallexample @itemize @bullet @item @file{0000-00-00} is used as a date to pump prime the version.in update mechanism. @item @file{.90} and the previous branch version are used as fairly arbitrary initial branch version number. @end itemize @subheading Update the web and news pages Something? @subheading Tweak cron to track the new branch The file @file{gdbadmin/cron/crontab} contains gdbadmin's cron table. This file needs to be updated so that: @itemize @bullet @item A daily timestamp is added to the file @file{version.in}. @item The new branch is included in the snapshot process. @end itemize @noindent See the file @file{gdbadmin/cron/README} for how to install the updated cron table. The file @file{gdbadmin/ss/README} should also be reviewed to reflect any changes. That file is copied to both the branch/ and current/ snapshot directories. @subheading Update the NEWS and README files The @file{NEWS} file needs to be updated so that on the branch it refers to @emph{changes in the current release} while on the trunk it also refers to @emph{changes since the current release}. The @file{README} file needs to be updated so that it refers to the current release. @subheading Post the branch info Send an announcement to the mailing lists: @itemize @bullet @item @email{gdb-announce@@sourceware.org, GDB Announcement mailing list} @item @email{gdb@@sourceware.org, GDB Discussion mailing list} and @email{gdb-testers@@sourceware.org, GDB Testers mailing list} @end itemize @emph{Pragmatics: The branch creation is sent to the announce list to ensure that people people not subscribed to the higher volume discussion list are alerted.} The announcement should include: @itemize @bullet @item The branch tag. @item How to check out the branch using CVS. @item The date/number of weeks until the release. @item The branch commit policy still holds. @end itemize @section Stabilize the branch Something goes here. @section Create a Release The process of creating and then making available a release is broken down into a number of stages. The first part addresses the technical process of creating a releasable tar ball. The later stages address the process of releasing that tar ball. When making a release candidate just the first section is needed. @subsection Create a release candidate The objective at this stage is to create a set of tar balls that can be made available as a formal release (or as a less formal release candidate). @subsubheading Freeze the branch Send out an e-mail notifying everyone that the branch is frozen to @email{gdb-patches@@sourceware.org}. @subsubheading Establish a few defaults. @smallexample $ b=gdb_5_2-branch $ v=5.2 $ t=/sourceware/snapshot-tmp/gdbadmin-tmp $ echo $t/$b/$v /sourceware/snapshot-tmp/gdbadmin-tmp/gdb_5_2-branch/5.2 $ mkdir -p $t/$b/$v $ cd $t/$b/$v $ pwd /sourceware/snapshot-tmp/gdbadmin-tmp/gdb_5_2-branch/5.2 $ which autoconf /home/gdbadmin/bin/autoconf $ @end smallexample @noindent Notes: @itemize @bullet @item Check the @code{autoconf} version carefully. You want to be using the version documented in the toplevel @file{README-maintainer-mode} file. It is very unlikely that the version of @code{autoconf} installed in system directories (e.g., @file{/usr/bin/autoconf}) is correct. @end itemize @subsubheading Check out the relevant modules: @smallexample $ for m in gdb insight do ( mkdir -p $m && cd $m && cvs -q -f -d /cvs/src co -P -r $b $m ) done $ @end smallexample @noindent Note: @itemize @bullet @item The reading of @file{.cvsrc} is disabled (@file{-f}) so that there isn't any confusion between what is written here and what your local @code{cvs} really does. @end itemize @subsubheading Update relevant files. @table @file @item gdb/NEWS Major releases get their comments added as part of the mainline. Minor releases should probably mention any significant bugs that were fixed. Don't forget to include the @file{ChangeLog} entry. @smallexample $ emacs gdb/src/gdb/NEWS ... c-x 4 a ... c-x c-s c-x c-c $ cp gdb/src/gdb/NEWS insight/src/gdb/NEWS $ cp gdb/src/gdb/ChangeLog insight/src/gdb/ChangeLog @end smallexample @item gdb/README You'll need to update: @itemize @bullet @item The version. @item The update date. @item Who did it. @end itemize @smallexample $ emacs gdb/src/gdb/README ... c-x 4 a ... c-x c-s c-x c-c $ cp gdb/src/gdb/README insight/src/gdb/README $ cp gdb/src/gdb/ChangeLog insight/src/gdb/ChangeLog @end smallexample @emph{Maintainer note: Hopefully the @file{README} file was reviewed before the initial branch was cut so just a simple substitute is needed to get it updated.} @emph{Maintainer note: Other projects generate @file{README} and @file{INSTALL} from the core documentation. This might be worth pursuing.} @item gdb/version.in @smallexample $ echo $v > gdb/src/gdb/version.in $ cat gdb/src/gdb/version.in 5.2 $ emacs gdb/src/gdb/version.in ... c-x 4 a ... Bump to version ... c-x c-s c-x c-c $ cp gdb/src/gdb/version.in insight/src/gdb/version.in $ cp gdb/src/gdb/ChangeLog insight/src/gdb/ChangeLog @end smallexample @end table @subsubheading Do the dirty work This is identical to the process used to create the daily snapshot. @smallexample $ for m in gdb insight do ( cd $m/src && gmake -f src-release $m.tar ) done @end smallexample If the top level source directory does not have @file{src-release} (@value{GDBN} version 5.3.1 or earlier), try these commands instead: @smallexample $ for m in gdb insight do ( cd $m/src && gmake -f Makefile.in $m.tar ) done @end smallexample @subsubheading Check the source files You're looking for files that have mysteriously disappeared. @kbd{distclean} has the habit of deleting files it shouldn't. Watch out for the @file{version.in} update @kbd{cronjob}. @smallexample $ ( cd gdb/src && cvs -f -q -n update ) M djunpack.bat ? gdb-5.1.91.tar ? proto-toplev @dots{} lots of generated files @dots{} M gdb/ChangeLog M gdb/NEWS M gdb/README M gdb/version.in @dots{} lots of generated files @dots{} $ @end smallexample @noindent @emph{Don't worry about the @file{gdb.info-??} or @file{gdb/p-exp.tab.c}. They were generated (and yes @file{gdb.info-1} was also generated only something strange with CVS means that they didn't get suppressed). Fixing it would be nice though.} @subsubheading Create compressed versions of the release @smallexample $ cp */src/*.tar . $ cp */src/*.bz2 . $ ls -F gdb/ gdb-5.2.tar insight/ insight-5.2.tar $ for m in gdb insight do bzip2 -v -9 -c $m-$v.tar > $m-$v.tar.bz2 gzip -v -9 -c $m-$v.tar > $m-$v.tar.gz done $ @end smallexample @noindent Note: @itemize @bullet @item A pipe such as @kbd{bunzip2 < xxx.bz2 | gzip -9 > xxx.gz} is not since, in that mode, @code{gzip} does not know the name of the file and, hence, can not include it in the compressed file. This is also why the release process runs @code{tar} and @code{bzip2} as separate passes. @end itemize @subsection Sanity check the tar ball Pick a popular machine (Solaris/PPC?) and try the build on that. @smallexample $ bunzip2 < gdb-5.2.tar.bz2 | tar xpf - $ cd gdb-5.2 $ ./configure $ make @dots{} $ ./gdb/gdb ./gdb/gdb GNU gdb 5.2 @dots{} (gdb) b main Breakpoint 1 at 0x80732bc: file main.c, line 734. (gdb) run Starting program: /tmp/gdb-5.2/gdb/gdb Breakpoint 1, main (argc=1, argv=0xbffff8b4) at main.c:734 734 catch_errors (captured_main, &args, "", RETURN_MASK_ALL); (gdb) print args $1 = @{argc = 136426532, argv = 0x821b7f0@} (gdb) @end smallexample @subsection Make a release candidate available If this is a release candidate then the only remaining steps are: @enumerate @item Commit @file{version.in} and @file{ChangeLog} @item Tweak @file{version.in} (and @file{ChangeLog} to read @var{L}.@var{M}.@var{N}-0000-00-00-cvs so that the version update process can restart. @item Make the release candidate available in @uref{ftp://sourceware.org/pub/gdb/snapshots/branch} @item Notify the relevant mailing lists ( @email{gdb@@sourceware.org} and @email{gdb-testers@@sourceware.org} that the candidate is available. @end enumerate @subsection Make a formal release available (And you thought all that was required was to post an e-mail.) @subsubheading Install on sware Copy the new files to both the release and the old release directory: @smallexample $ cp *.bz2 *.gz ~ftp/pub/gdb/old-releases/ $ cp *.bz2 *.gz ~ftp/pub/gdb/releases @end smallexample @noindent Clean up the releases directory so that only the most recent releases are available (e.g.@: keep 5.2 and 5.2.1 but remove 5.1): @smallexample $ cd ~ftp/pub/gdb/releases $ rm @dots{} @end smallexample @noindent Update the file @file{README} and @file{.message} in the releases directory: @smallexample $ vi README @dots{} $ rm -f .message $ ln README .message @end smallexample @subsubheading Update the web pages. @table @file @item htdocs/download/ANNOUNCEMENT This file, which is posted as the official announcement, includes: @itemize @bullet @item General announcement. @item News. If making an @var{M}.@var{N}.1 release, retain the news from earlier @var{M}.@var{N} release. @item Errata. @end itemize @item htdocs/index.html @itemx htdocs/news/index.html @itemx htdocs/download/index.html These files include: @itemize @bullet @item Announcement of the most recent release. @item News entry (remember to update both the top level and the news directory). @end itemize These pages also need to be regenerate using @code{index.sh}. @item download/onlinedocs/ You need to find the magic command that is used to generate the online docs from the @file{.tar.bz2}. The best way is to look in the output from one of the nightly @code{cron} jobs and then just edit accordingly. Something like: @smallexample $ ~/ss/update-web-docs \ ~ftp/pub/gdb/releases/gdb-5.2.tar.bz2 \ $PWD/www \ /www/sourceware/htdocs/gdb/download/onlinedocs \ gdb @end smallexample @item download/ari/ Just like the online documentation. Something like: @smallexample $ /bin/sh ~/ss/update-web-ari \ ~ftp/pub/gdb/releases/gdb-5.2.tar.bz2 \ $PWD/www \ /www/sourceware/htdocs/gdb/download/ari \ gdb @end smallexample @end table @subsubheading Shadow the pages onto gnu Something goes here. @subsubheading Install the @value{GDBN} tar ball on GNU At the time of writing, the GNU machine was @kbd{gnudist.gnu.org} in @file{~ftp/gnu/gdb}. @subsubheading Make the @file{ANNOUNCEMENT} Post the @file{ANNOUNCEMENT} file you created above to: @itemize @bullet @item @email{gdb-announce@@sourceware.org, GDB Announcement mailing list} @item @email{info-gnu@@gnu.org, General GNU Announcement list} (but delay it a day or so to let things get out) @item @email{bug-gdb@@gnu.org, GDB Bug Report mailing list} @end itemize @subsection Cleanup The release is out but you're still not finished. @subsubheading Commit outstanding changes In particular you'll need to commit any changes to: @itemize @bullet @item @file{gdb/ChangeLog} @item @file{gdb/version.in} @item @file{gdb/NEWS} @item @file{gdb/README} @end itemize @subsubheading Tag the release Something like: @smallexample $ d=`date -u +%Y-%m-%d` $ echo $d 2002-01-24 $ ( cd insight/src/gdb && cvs -f -q update ) $ ( cd insight/src && cvs -f -q tag gdb_5_2-$d-release ) @end smallexample Insight is used since that contains more of the release than @value{GDBN}. @subsubheading Mention the release on the trunk Just put something in the @file{ChangeLog} so that the trunk also indicates when the release was made. @subsubheading Restart @file{gdb/version.in} If @file{gdb/version.in} does not contain an ISO date such as @kbd{2002-01-24} then the daily @code{cronjob} won't update it. Having committed all the release changes it can be set to @file{5.2.0_0000-00-00-cvs} which will restart things (yes the @kbd{_} is important - it affects the snapshot process). Don't forget the @file{ChangeLog}. @subsubheading Merge into trunk The files committed to the branch may also need changes merged into the trunk. @subsubheading Revise the release schedule Post a revised release schedule to @email{gdb@@sourceware.org, GDB Discussion List} with an updated announcement. The schedule can be generated by running: @smallexample $ ~/ss/schedule `date +%s` schedule @end smallexample @noindent The first parameter is approximate date/time in seconds (from the epoch) of the most recent release. Also update the schedule @code{cronjob}. @section Post release Remove any @code{OBSOLETE} code. @node Testsuite @chapter Testsuite @cindex test suite The testsuite is an important component of the @value{GDBN} package. While it is always worthwhile to encourage user testing, in practice this is rarely sufficient; users typically use only a small subset of the available commands, and it has proven all too common for a change to cause a significant regression that went unnoticed for some time. The @value{GDBN} testsuite uses the DejaGNU testing framework. The tests themselves are calls to various @code{Tcl} procs; the framework runs all the procs and summarizes the passes and fails. @section Using the Testsuite @cindex running the test suite To run the testsuite, simply go to the @value{GDBN} object directory (or to the testsuite's objdir) and type @code{make check}. This just sets up some environment variables and invokes DejaGNU's @code{runtest} script. While the testsuite is running, you'll get mentions of which test file is in use, and a mention of any unexpected passes or fails. When the testsuite is finished, you'll get a summary that looks like this: @smallexample === gdb Summary === # of expected passes 6016 # of unexpected failures 58 # of unexpected successes 5 # of expected failures 183 # of unresolved testcases 3 # of untested testcases 5 @end smallexample To run a specific test script, type: @example make check RUNTESTFLAGS='@var{tests}' @end example where @var{tests} is a list of test script file names, separated by spaces. If you use GNU make, you can use its @option{-j} option to run the testsuite in parallel. This can greatly reduce the amount of time it takes for the testsuite to run. In this case, if you set @code{RUNTESTFLAGS} then, by default, the tests will be run serially even under @option{-j}. You can override this and force a parallel run by setting the @code{make} variable @code{FORCE_PARALLEL} to any non-empty value. Note that the parallel @kbd{make check} assumes that you want to run the entire testsuite, so it is not compatible with some dejagnu options, like @option{--directory}. The ideal test run consists of expected passes only; however, reality conspires to keep us from this ideal. Unexpected failures indicate real problems, whether in @value{GDBN} or in the testsuite. Expected failures are still failures, but ones which have been decided are too hard to deal with at the time; for instance, a test case might work everywhere except on AIX, and there is no prospect of the AIX case being fixed in the near future. Expected failures should not be added lightly, since you may be masking serious bugs in @value{GDBN}. Unexpected successes are expected fails that are passing for some reason, while unresolved and untested cases often indicate some minor catastrophe, such as the compiler being unable to deal with a test program. When making any significant change to @value{GDBN}, you should run the testsuite before and after the change, to confirm that there are no regressions. Note that truly complete testing would require that you run the testsuite with all supported configurations and a variety of compilers; however this is more than really necessary. In many cases testing with a single configuration is sufficient. Other useful options are to test one big-endian (Sparc) and one little-endian (x86) host, a cross config with a builtin simulator (powerpc-eabi, mips-elf), or a 64-bit host (Alpha). If you add new functionality to @value{GDBN}, please consider adding tests for it as well; this way future @value{GDBN} hackers can detect and fix their changes that break the functionality you added. Similarly, if you fix a bug that was not previously reported as a test failure, please add a test case for it. Some cases are extremely difficult to test, such as code that handles host OS failures or bugs in particular versions of compilers, and it's OK not to try to write tests for all of those. DejaGNU supports separate build, host, and target machines. However, some @value{GDBN} test scripts do not work if the build machine and the host machine are not the same. In such an environment, these scripts will give a result of ``UNRESOLVED'', like this: @smallexample UNRESOLVED: gdb.base/example.exp: This test script does not work on a remote host. @end smallexample @section Testsuite Parameters Several variables exist to modify the behavior of the testsuite. @itemize @bullet @item @code{TRANSCRIPT} Sometimes it is convenient to get a transcript of the commands which the testsuite sends to @value{GDBN}. For example, if @value{GDBN} crashes during testing, a transcript can be used to more easily reconstruct the failure when running @value{GDBN} under @value{GDBN}. You can instruct the @value{GDBN} testsuite to write transcripts by setting the DejaGNU variable @code{TRANSCRIPT} (to any value) before invoking @code{runtest} or @kbd{make check}. The transcripts will be written into DejaGNU's output directory. One transcript will be made for each invocation of @value{GDBN}; they will be named @file{transcript.@var{n}}, where @var{n} is an integer. The first line of the transcript file will show how @value{GDBN} was invoked; each subsequent line is a command sent as input to @value{GDBN}. @smallexample make check RUNTESTFLAGS=TRANSCRIPT=y @end smallexample Note that the transcript is not always complete. In particular, tests of completion can yield partial command lines. @item @code{GDB} Sometimes one wishes to test a different @value{GDBN} than the one in the build directory. For example, one may wish to run the testsuite on @file{/usr/bin/gdb}. @smallexample make check RUNTESTFLAGS=GDB=/usr/bin/gdb @end smallexample @item @code{GDBSERVER} When testing a different @value{GDBN}, it is often useful to also test a different gdbserver. @smallexample make check RUNTESTFLAGS="GDB=/usr/bin/gdb GDBSERVER=/usr/bin/gdbserver" @end smallexample @item @code{INTERNAL_GDBFLAGS} When running the testsuite normally one doesn't want whatever is in @file{~/.gdbinit} to interfere with the tests, therefore the test harness passes @option{-nx} to @value{GDBN}. One also doesn't want any windowed version of @value{GDBN}, e.g., @samp{gdb -tui}, to run. This is achieved via @code{INTERNAL_GDBFLAGS}. @smallexample set INTERNAL_GDBFLAGS "-nw -nx" @end smallexample This is all well and good, except when testing an installed @value{GDBN} that has been configured with @option{--with-system-gdbinit}. Here one does not want @file{~/.gdbinit} loaded but one may want the system @file{.gdbinit} file loaded. This can be achieved by pointing @code{$HOME} at a directory without a @file{.gdbinit} and by overriding @code{INTERNAL_GDBFLAGS} and removing @option{-nx}. @smallexample cd testsuite HOME=`pwd` runtest \ GDB=/usr/bin/gdb \ GDBSERVER=/usr/bin/gdbserver \ INTERNAL_GDBFLAGS=-nw @end smallexample @end itemize There are two ways to run the testsuite and pass additional parameters to DejaGnu. The first is with @kbd{make check} and specifying the makefile variable @samp{RUNTESTFLAGS}. @smallexample make check RUNTESTFLAGS=TRANSCRIPT=y @end smallexample The second is to cd to the @file{testsuite} directory and invoke the DejaGnu @command{runtest} command directly. @smallexample cd testsuite make site.exp runtest TRANSCRIPT=y @end smallexample @section Testsuite Configuration @cindex Testsuite Configuration It is possible to adjust the behavior of the testsuite by defining the global variables listed below, either in a @file{site.exp} file, or in a board file. @itemize @bullet @item @code{gdb_test_timeout} Defining this variable changes the default timeout duration used during communication with @value{GDBN}. More specifically, the global variable used during testing is @code{timeout}, but this variable gets reset to @code{gdb_test_timeout} at the beginning of each testcase, making sure that any local change to @code{timeout} in a testcase does not affect subsequent testcases. This global variable comes in handy when the debugger is slower than normal due to the testing environment, triggering unexpected @code{TIMEOUT} test failures. Examples include when testing on a remote machine, or against a system where communications are slow. If not specifically defined, this variable gets automatically defined to the same value as @code{timeout} during the testsuite initialization. The default value of the timeout is defined in the file @file{gdb/testsuite/config/unix.exp} that is part of the @value{GDBN} test suite@footnote{If you are using a board file, it could override the test-suite default; search the board file for "timeout".}. @end itemize @section Testsuite Organization @cindex test suite organization The testsuite is entirely contained in @file{gdb/testsuite}. While the testsuite includes some makefiles and configury, these are very minimal, and used for little besides cleaning up, since the tests themselves handle the compilation of the programs that @value{GDBN} will run. The file @file{testsuite/lib/gdb.exp} contains common utility procs useful for all @value{GDBN} tests, while the directory @file{testsuite/config} contains configuration-specific files, typically used for special-purpose definitions of procs like @code{gdb_load} and @code{gdb_start}. The tests themselves are to be found in @file{testsuite/gdb.*} and subdirectories of those. The names of the test files must always end with @file{.exp}. DejaGNU collects the test files by wildcarding in the test directories, so both subdirectories and individual files get chosen and run in alphabetical order. The following table lists the main types of subdirectories and what they are for. Since DejaGNU finds test files no matter where they are located, and since each test file sets up its own compilation and execution environment, this organization is simply for convenience and intelligibility. @table @file @item gdb.base This is the base testsuite. The tests in it should apply to all configurations of @value{GDBN} (but generic native-only tests may live here). The test programs should be in the subset of C that is valid K&R, ANSI/ISO, and C@t{++} (@code{#ifdef}s are allowed if necessary, for instance for prototypes). @item gdb.@var{lang} Language-specific tests for any language @var{lang} besides C. Examples are @file{gdb.cp} and @file{gdb.java}. @item gdb.@var{platform} Non-portable tests. The tests are specific to a specific configuration (host or target), such as HP-UX or eCos. Example is @file{gdb.hp}, for HP-UX. @item gdb.@var{compiler} Tests specific to a particular compiler. As of this writing (June 1999), there aren't currently any groups of tests in this category that couldn't just as sensibly be made platform-specific, but one could imagine a @file{gdb.gcc}, for tests of @value{GDBN}'s handling of GCC extensions. @item gdb.@var{subsystem} Tests that exercise a specific @value{GDBN} subsystem in more depth. For instance, @file{gdb.disasm} exercises various disassemblers, while @file{gdb.stabs} tests pathways through the stabs symbol reader. @end table @section Writing Tests @cindex writing tests In many areas, the @value{GDBN} tests are already quite comprehensive; you should be able to copy existing tests to handle new cases. You should try to use @code{gdb_test} whenever possible, since it includes cases to handle all the unexpected errors that might happen. However, it doesn't cost anything to add new test procedures; for instance, @file{gdb.base/exprs.exp} defines a @code{test_expr} that calls @code{gdb_test} multiple times. Only use @code{send_gdb} and @code{gdb_expect} when absolutely necessary. Even if @value{GDBN} has several valid responses to a command, you can use @code{gdb_test_multiple}. Like @code{gdb_test}, @code{gdb_test_multiple} recognizes internal errors and unexpected prompts. Do not write tests which expect a literal tab character from @value{GDBN}. On some operating systems (e.g.@: OpenBSD) the TTY layer expands tabs to spaces, so by the time @value{GDBN}'s output reaches expect the tab is gone. The source language programs do @emph{not} need to be in a consistent style. Since @value{GDBN} is used to debug programs written in many different styles, it's worth having a mix of styles in the testsuite; for instance, some @value{GDBN} bugs involving the display of source lines would never manifest themselves if the programs used GNU coding style uniformly. Some testcase results need more detailed explanation: @table @code @item KFAIL Known problem of @value{GDBN} itself. You must specify the @value{GDBN} bug report number like in these sample tests: @smallexample kfail "gdb/13392" "continue to marker 2" @end smallexample or @smallexample setup_kfail gdb/13392 "*-*-*" kfail "continue to marker 2" @end smallexample @item XFAIL Known problem of environment. This typically includes @value{NGCC} but it includes also many other system components which cannot be fixed in the @value{GDBN} project. Sample test with sanity check not knowing the specific cause of the problem: @smallexample # On x86_64 it is commonly about 4MB. if @{$stub_size > 25000000@} @{ xfail "stub size $stub_size is too large" return @} @end smallexample You should provide bug report number for the failing component of the environment, if such bug report is available: @smallexample if @{[test_compiler_info @{gcc-[0-3]-*@}] || [test_compiler_info @{gcc-4-[0-5]-*@}]@} @{ setup_xfail "gcc/46955" *-*-* @} gdb_test "python print ttype.template_argument(2)" "&C::c" @end smallexample @end table @section Board settings In @value{GDBN} testsuite, the tests can be configured or customized in the board file by means of @dfn{Board Settings}. Each setting should be consulted by test cases that depend on the corresponding feature. Here are the supported board settings: @table @code @item gdb,cannot_call_functions The board does not support inferior call, that is, invoking inferior functions in @value{GDBN}. @item gdb,can_reverse The board supports reverse execution. @item gdb,no_hardware_watchpoints The board does not support hardware watchpoints. @item gdb,nofileio @value{GDBN} is unable to intercept target file operations in remote and perform them on the host. @item gdb,noinferiorio The board is unable to provide I/O capability to the inferior. @c @item gdb,noresults @c NEED DOCUMENT. @item gdb,nosignals The board does not support signals. @item gdb,skip_huge_test Skip time-consuming tests on the board with slow connection. @item gdb,skip_float_tests Skip tests related to float points on target board. @item gdb,use_precord The board supports process record. @item gdb_server_prog The location of GDBserver. If GDBserver somewhere other than its default location is used in test, specify the location of GDBserver in this variable. The location is a file name of GDBserver that can be either absolute or relative to testsuite subdirectory in build directory. @item in_proc_agent The location of in-process agent. If in-process agent other than its default location is used in test, specify the location of in-process agent in this variable. The location is a file name of in-process agent that can be either absolute or relative to testsuite subdirectory in build directory. @item noargs @value{GDBN} does not support argument passing for inferior. @item no_long_long The board does not support type @code{long long}. @c @item use_cygmon @c NEED DOCUMENT. @item use_gdb_stub The tests are running with gdb stub. @end table @node Hints @chapter Hints Check the @file{README} file, it often has useful information that does not appear anywhere else in the directory. @menu * Getting Started:: Getting started working on @value{GDBN} * Debugging GDB:: Debugging @value{GDBN} with itself @end menu @node Getting Started @section Getting Started @value{GDBN} is a large and complicated program, and if you first starting to work on it, it can be hard to know where to start. Fortunately, if you know how to go about it, there are ways to figure out what is going on. This manual, the @value{GDBN} Internals manual, has information which applies generally to many parts of @value{GDBN}. Information about particular functions or data structures are located in comments with those functions or data structures. If you run across a function or a global variable which does not have a comment correctly explaining what is does, this can be thought of as a bug in @value{GDBN}; feel free to submit a bug report, with a suggested comment if you can figure out what the comment should say. If you find a comment which is actually wrong, be especially sure to report that. Comments explaining the function of macros defined in host, target, or native dependent files can be in several places. Sometimes they are repeated every place the macro is defined. Sometimes they are where the macro is used. Sometimes there is a header file which supplies a default definition of the macro, and the comment is there. This manual also documents all the available macros. @c (@pxref{Host Conditionals}, @pxref{Target @c Conditionals}, @pxref{Native Conditionals}, and @pxref{Obsolete @c Conditionals}) Start with the header files. Once you have some idea of how @value{GDBN}'s internal symbol tables are stored (see @file{symtab.h}, @file{gdbtypes.h}), you will find it much easier to understand the code which uses and creates those symbol tables. You may wish to process the information you are getting somehow, to enhance your understanding of it. Summarize it, translate it to another language, add some (perhaps trivial or non-useful) feature to @value{GDBN}, use the code to predict what a test case would do and write the test case and verify your prediction, etc. If you are reading code and your eyes are starting to glaze over, this is a sign you need to use a more active approach. Once you have a part of @value{GDBN} to start with, you can find more specifically the part you are looking for by stepping through each function with the @code{next} command. Do not use @code{step} or you will quickly get distracted; when the function you are stepping through calls another function try only to get a big-picture understanding (perhaps using the comment at the beginning of the function being called) of what it does. This way you can identify which of the functions being called by the function you are stepping through is the one which you are interested in. You may need to examine the data structures generated at each stage, with reference to the comments in the header files explaining what the data structures are supposed to look like. Of course, this same technique can be used if you are just reading the code, rather than actually stepping through it. The same general principle applies---when the code you are looking at calls something else, just try to understand generally what the code being called does, rather than worrying about all its details. @cindex command implementation A good place to start when tracking down some particular area is with a command which invokes that feature. Suppose you want to know how single-stepping works. As a @value{GDBN} user, you know that the @code{step} command invokes single-stepping. The command is invoked via command tables (see @file{command.h}); by convention the function which actually performs the command is formed by taking the name of the command and adding @samp{_command}, or in the case of an @code{info} subcommand, @samp{_info}. For example, the @code{step} command invokes the @code{step_command} function and the @code{info display} command invokes @code{display_info}. When this convention is not followed, you might have to use @code{grep} or @kbd{M-x tags-search} in emacs, or run @value{GDBN} on itself and set a breakpoint in @code{execute_command}. @cindex @code{bug-gdb} mailing list If all of the above fail, it may be appropriate to ask for information on @code{bug-gdb}. But @emph{never} post a generic question like ``I was wondering if anyone could give me some tips about understanding @value{GDBN}''---if we had some magic secret we would put it in this manual. Suggestions for improving the manual are always welcome, of course. @node Debugging GDB @section Debugging @value{GDBN} with itself @cindex debugging @value{GDBN} If @value{GDBN} is limping on your machine, this is the preferred way to get it fully functional. Be warned that in some ancient Unix systems, like Ultrix 4.2, a program can't be running in one process while it is being debugged in another. Rather than typing the command @kbd{@w{./gdb ./gdb}}, which works on Suns and such, you can copy @file{gdb} to @file{gdb2} and then type @kbd{@w{./gdb ./gdb2}}. When you run @value{GDBN} in the @value{GDBN} source directory, it will read @file{gdb-gdb.gdb} file (plus possibly @file{gdb-gdb.py} file) that sets up some simple things to make debugging gdb easier. The @code{info} command, when executed without a subcommand in a @value{GDBN} being debugged by gdb, will pop you back up to the top level gdb. See @file{gdb-gdb.gdb} for details. If you use emacs, you will probably want to do a @code{make TAGS} after you configure your distribution; this will put the machine dependent routines for your local machine where they will be accessed first by @kbd{M-.} Also, make sure that you've either compiled @value{GDBN} with your local cc, or have run @code{fixincludes} if you are compiling with gcc. @section Submitting Patches @cindex submitting patches Thanks for thinking of offering your changes back to the community of @value{GDBN} users. In general we like to get well designed enhancements. Thanks also for checking in advance about the best way to transfer the changes. The @value{GDBN} maintainers will only install ``cleanly designed'' patches. This manual summarizes what we believe to be clean design for @value{GDBN}. If the maintainers don't have time to put the patch in when it arrives, or if there is any question about a patch, it goes into a large queue with everyone else's patches and bug reports. @cindex legal papers for code contributions The legal issue is that to incorporate substantial changes requires a copyright assignment from you and/or your employer, granting ownership of the changes to the Free Software Foundation. You can get the standard documents for doing this by sending mail to @code{gnu@@gnu.org} and asking for it. We recommend that people write in "All programs owned by the Free Software Foundation" as "NAME OF PROGRAM", so that changes in many programs (not just @value{GDBN}, but GAS, Emacs, GCC, etc) can be contributed with only one piece of legalese pushed through the bureaucracy and filed with the FSF. We can't start merging changes until this paperwork is received by the FSF (their rules, which we follow since we maintain it for them). Technically, the easiest way to receive changes is to receive each feature as a small context diff or unidiff, suitable for @code{patch}. Each message sent to me should include the changes to C code and header files for a single feature, plus @file{ChangeLog} entries for each directory where files were modified, and diffs for any changes needed to the manuals (@file{gdb/doc/gdb.texinfo} or @file{gdb/doc/gdbint.texinfo}). If there are a lot of changes for a single feature, they can be split down into multiple messages. In this way, if we read and like the feature, we can add it to the sources with a single patch command, do some testing, and check it in. If you leave out the @file{ChangeLog}, we have to write one. If you leave out the doc, we have to puzzle out what needs documenting. Etc., etc. The reason to send each change in a separate message is that we will not install some of the changes. They'll be returned to you with questions or comments. If we're doing our job correctly, the message back to you will say what you have to fix in order to make the change acceptable. The reason to have separate messages for separate features is so that the acceptable changes can be installed while one or more changes are being reworked. If multiple features are sent in a single message, we tend to not put in the effort to sort out the acceptable changes from the unacceptable, so none of the features get installed until all are acceptable. If this sounds painful or authoritarian, well, it is. But we get a lot of bug reports and a lot of patches, and many of them don't get installed because we don't have the time to finish the job that the bug reporter or the contributor could have done. Patches that arrive complete, working, and well designed, tend to get installed on the day they arrive. The others go into a queue and get installed as time permits, which, since the maintainers have many demands to meet, may not be for quite some time. Please send patches directly to @email{gdb-patches@@sourceware.org, the @value{GDBN} maintainers}. @section Build Script @cindex build script The script @file{gdb_buildall.sh} builds @value{GDBN} with flag @option{--enable-targets=all} set. This builds @value{GDBN} with all supported targets activated. This helps testing @value{GDBN} when doing changes that affect more than one architecture and is much faster than using @file{gdb_mbuild.sh}. After building @value{GDBN} the script checks which architectures are supported and then switches the current architecture to each of those to get information about the architecture. The test results are stored in log files in the directory the script was called from. @include observer.texi @node GNU Free Documentation License @appendix GNU Free Documentation License @include fdl.texi @node Concept Index @unnumbered Concept Index @printindex cp @node Function and Variable Index @unnumbered Function and Variable Index @printindex fn @bye �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/gdb/doc/stack_frame.eps���������������������������������������������������������������0000644�0001750�0001750�00000651472�12250770607�016401� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������%!PS-Adobe-3.0 EPSF-3.0 %%Creator: GIMP PostScript file plugin V 1.17 by Peter Kirchgessner %%Title: stack_frame.eps %%CreationDate: Thu Sep 18 14:32:58 2008 %%DocumentData: Clean7Bit %%LanguageLevel: 2 %%Pages: 1 %%BoundingBox: 14 14 735 503 %%EndComments %%BeginProlog % Use own dictionary to avoid conflicts 10 dict begin %%EndProlog %%Page: 1 1 % Translate for offset 14.173228346456694 14.173228346456694 translate % Translate to begin of first scanline 0 488 translate 720 -488 scale % Image geometry 900 610 8 % Transformation matrix [ 900 0 0 610 0 0 ] % Strings to hold RGB-samples per scanline /rstr 900 string def /gstr 900 string def /bstr 900 string def {currentfile /ASCII85Decode filter /RunLengthDecode filter rstr readstring pop} {currentfile /ASCII85Decode filter /RunLengthDecode filter gstr readstring pop} {currentfile /ASCII85Decode filter /RunLengthDecode filter bstr readstring pop} true 3 %%BeginData: 216923 ASCII Bytes colorimage JcC<$o`+s7JcE@^s3#unJcC<$eGk%~> JcC<$o`+s7JcE@^s3#unJcC<$eGk%~> JcC<$o`+s7JcE@^s3#unJcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcC<$o`+qRJcE@^s#bl4JcC<$eGk%~> JcDVI!Kccts8P34s1A=24QZSDORIc#JcC<$o)F4~> JcDVI!Kccts8P34s1A=24QZSDORIc#JcC<$o)F4~> JcDVI!Kccts8P34s1A=24QZSDORIc#JcC<$o)F4~> JcDYJ!q-\NdJs5/JcE@^s#fHD!q-\NJcC<$JcG<@J,~> JcDYJ!q-\NdJs5/JcE@^s#fHD!q-\NJcC<$JcG<@J,~> JcDYJ!q-\NdJs5/JcE@^s#fHD!q-\NJcC<$JcG<@J,~> JcDYJ"+U@_n'_794G!OEs8P4Drr[cO&FY2MJcC<$oDa=~> JcDYJ"+U@_n'_794G!OEs8P4Drr[cO&FY2MJcC<$oDa=~> JcDYJ"+U@_n'_794G!OEs8P4Drr[cO&FY2MJcC<$oDa=~> JcD\K"Rcm%!.`Mts#bl4]DqmnkPk\R&-)]\JcC<$JcG?AJ,~> JcD\K"Rcm%!.`Mts#bl4]DqmnkPk\R&-)]\JcC<$JcG?AJ,~> JcD\K"Rcm%!.`Mts#bl4]DqmnkPk\R&-)]\JcC<$JcG?AJ,~> JcD\K!.b%K!>+_Ks8P34s1A=24Ql_EJGoNL&FY2MJcC<$o`'F~> JcD\K!.b%K!>+_Ks8P34s1A=24Ql_EJGoNL&FY2MJcC<$o`'F~> JcD\K!.b%K!>+_Ks8P34s1A=24Ql_EJGoNL&FY2MJcC<$o`'F~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> JcDVIs#e^/s#bl4]Dqmnk5PMA!2Y8HJcC<$o)F4~> q#:@O!VcWpEe48&s8P4/s8P34s1A=24QcYFi;f^*s+13$s762?~> q#:@O!VcWpEe48&s8P4/s8P34s1A=24QcYFi;f^*s+13$s762?~> q#:@O!VcWpEe48&s8P4/s8P34s1A=24QcYFi;f^*s+13$s762?~> p\tTF!!'CD_niE_![`Ku]DqmndJs5/JcE@^s#fHD!oX-UJcC<$JcG<@J,~> p\tTF!!'CD_niE_![`Ku]DqmndJs5/JcE@^s#fHD!oX-UJcC<$JcG<@J,~> p\tTF!!'CD_niE_![`Ku]DqmndJs5/JcE@^s#fHD!oX-UJcC<$JcG<@J,~> p\t?p!!)?_rrSPfgO]C;s8P4/s8P34s1A=24QcYFi;f^*s+13$s762?~> p\t?p!!)?_rrSPfgO]C;s8P4/s8P34s1A=24QcYFi;f^*s+13$s762?~> p\t?p!!)?_rrSPfgO]C;s8P4/s8P34s1A=24QcYFi;f^*s+13$s762?~> pAb-m!:0O^!B?*js1JC34OO3/4G!OEs8P4DrrV-ZV1JYts+14@s*t~> pAb-m!:0O^!B?*js1JC34OO3/4G!OEs8P4DrrV-ZV1JYts+14@s*t~> pAb-m!:0O^!B?*js1JC34OO3/4G!OEs8P4DrrV-ZV1JYts+14@s*t~> pAb-m!:0O^!MX@\s1JC34OO3/4G!OEs8P4DrrV-ZV1JYts+14@s*t~> pAb-m!:0O^!MX@\s1JC34OO3/4G!OEs8P4DrrV-ZV1JYts+14@s*t~> pAb-m!:0O^!MX@\s1JC34OO3/4G!OEs8P4DrrV-ZV1JYts+14@s*t~> pAb-m''oStquHcsrr<#[YYG2a^,-+5rr321;]5iP5G.oS&[R!K!:-^R$kHG$oS,%*'lNaCrs#r$% gF>*oR[&5s8P4/s8P34s1A=24QcYFi;f^*s+13$s762?~> pAb-m''oStquHcsrr<#[YYG2a^,-+5rr321;]5iP5G.oS&[R!K!:-^R$kHG$oS,%*'lNaCrs#r$% gF>*oR[&5s8P4/s8P34s1A=24QcYFi;f^*s+13$s762?~> pAb-m''oStquHcsrr<#[YYG2a^,-+5rr321;]5iP5G.oS&[R!K!:-^R$kHG$oS,%*'lNaCrs#r$% gF>*oR[&5s8P4/s8P34s1A=24QcYFi;f^*s+13$s762?~> pAb-m"RH*fh#RBQ'1*oD!/_Uc";Ch8FT?(9qp7A(HiF$WM/rXs3a:;.CB,q1DVjqn!,;E3#_E5: kkD=r3;J.*oDehQdJs5/JcE@^s#fHD!oX-UJcC<$JcG<@J,~> pAb-m"RH*fh#RBQ'1*oD!/_Uc";Ch8FT?(9qp7A(HiF$WM/rXs3a:;.CB,q1DVjqn!,;E3#_E5: kkD=r3;J.*oDehQdJs5/JcE@^s#fHD!oX-UJcC<$JcG<@J,~> pAb-m"RH*fh#RBQ'1*oD!/_Uc";Ch8FT?(9qp7A(HiF$WM/rXs3a:;.CB,q1DVjqn!,;E3#_E5: kkD=r3;J.*oDehQdJs5/JcE@^s#fHD!oX-UJcC<$JcG<@J,~> pAb-m"RH'L;#pImrr<?fmJk_ds5!_fqu6TsblARXs8N'!PQ(RahZ*YYrr3&E!$M:@!knY_rVlqY !1/9:oDehQdJs5/JcE@^s#fHD!o*dPJcC<$JcG<@J,~> pAb-m"RH'L;#pImrr<?fmJk_ds5!_fqu6TsblARXs8N'!PQ(RahZ*YYrr3&E!$M:@!knY_rVlqY !1/9:oDehQdJs5/JcE@^s#fHD!o*dPJcC<$JcG<@J,~> pAb-m"RH'L;#pImrr<?fmJk_ds5!_fqu6TsblARXs8N'!PQ(RahZ*YYrr3&E!$M:@!knY_rVlqY !1/9:oDehQdJs5/JcE@^s#fHD!o*dPJcC<$JcG<@J,~> pAashqZ$Qq!93qV!o=)lrVlrb!!<)urr<&brr3&c!!)ut!nRDdrr2smq#CCsJcG?As#e^/s#bl4 ]Dqmnk5PM2!2Y8HJcC<$o)F4~> pAashqZ$Qq!93qV!o=)lrVlrb!!<)urr<&brr3&c!!)ut!nRDdrr2smq#CCsJcG?As#e^/s#bl4 ]Dqmnk5PM2!2Y8HJcC<$o)F4~> pAashqZ$Qq!93qV!o=)lrVlrb!!<)urr<&brr3&c!!)ut!nRDdrr2smq#CCsJcG?As#e^/s#bl4 ]Dqmnk5PM2!2Y8HJcC<$o)F4~> pAb-m"RH*T?i^''rr<&bqu6rgr;ZZH[Z(7er;Zcs!:0Xa!p]gdrVlrN!#,A3!YbY#JcG*:s#e^/ s#bl4]Dqmnk5PM2!2Y8HJcC<$o)F4~> pAb-m"RH*T?i^''rr<&bqu6rgr;ZZH[Z(7er;Zcs!:0Xa!p]gdrVlrN!#,A3!YbY#JcG*:s#e^/ s#bl4]Dqmnk5PM2!2Y8HJcC<$o)F4~> pAb-m"RH*T?i^''rr<&bqu6rgr;ZZH[Z(7er;Zcs!:0Xa!p]gdrVlrN!#,A3!YbY#JcG*:s#e^/ s#bl4]Dqmnk5PM2!2Y8HJcC<$o)F4~> pAb-m"RH*fj8f&Vrr<&bqu6r`J2[]H5$\-gr;Zcs!:0Xa!p]gdrVlrN!#,A3!WiAZJcG*:s#e^/ s#bl4]Dqmnk5PM2!2Y8HJcC<$o)F4~> pAb-m"RH*fj8f&Vrr<&bqu6r`J2[]H5$\-gr;Zcs!:0Xa!p]gdrVlrN!#,A3!WiAZJcG*:s#e^/ s#bl4]Dqmnk5PM2!2Y8HJcC<$o)F4~> pAb-m"RH*fj8f&Vrr<&bqu6r`J2[]H5$\-gr;Zcs!:0Xa!p]gdrVlrN!#,A3!WiAZJcG*:s#e^/ s#bl4]Dqmnk5PM2!2Y8HJcC<$o)F4~> pAb-m"RH*frW)fprr<&br;R)>%Ln9Ns8VBb!;uls!!)?arrVKd!<)p!f)QK`rrNf5_1DXQs8P4/ s8P34s1A=24QcYFdK$+ps+13$s762?~> pAb-m"RH*frW)fprr<&br;R)>%Ln9Ns8VBb!;uls!!)?arrVKd!<)p!f)QK`rrNf5_1DXQs8P4/ s8P34s1A=24QcYFdK$+ps+13$s762?~> pAb-m"RH*frW)fprr<&br;R)>%Ln9Ns8VBb!;uls!!)?arrVKd!<)p!f)QK`rrNf5_1DXQs8P4/ s8P34s1A=24QcYFdK$+ps+13$s762?~> pAb-m!:0@Yrr<&br;QgI!4)S'!p]gdr;Zcs!:0Xa!p]gdrVlrN!#,A3!_`TAr;QfspOWA9s8P4/ s8P34s1A=24QcYFdK$+ps+13$s762?~> pAb-m!:0@Yrr<&br;QgI!4)S'!p]gdr;Zcs!:0Xa!p]gdrVlrN!#,A3!_`TAr;QfspOWA9s8P4/ s8P34s1A=24QcYFdK$+ps+13$s762?~> pAb-m!:0@Yrr<&br;QgI!4)S'!p]gdr;Zcs!:0Xa!p]gdrVlrN!#,A3!_`TAr;QfspOWA9s8P4/ s8P34s1A=24QcYFdK$+ps+13$s762?~> p\t?o!!)<Yrr`3"!:'L^!XSk_rr3-#N;rtWrr3*"!!)?arr_Nd!<2ut!nI>brr3)9!>Xu"rrI%a JcG?As#e^/s#bl4]Dqmnk5PM2!2Y8HJcC<$o)F4~> p\t?o!!)<Yrr`3"!:'L^!XSk_rr3-#N;rtWrr3*"!!)?arr_Nd!<2ut!nI>brr3)9!>Xu"rrI%a JcG?As#e^/s#bl4]Dqmnk5PM2!2Y8HJcC<$o)F4~> p\t?o!!)<Yrr`3"!:'L^!XSk_rr3-#N;rtWrr3*"!!)?arr_Nd!<2ut!nI>brr3)9!>Xu"rrI%a JcG?As#e^/s#bl4]Dqmnk5PM2!2Y8HJcC<$o)F4~> q#:Ns]Dqr8rqQKq`rH+Lr;R+5!)i(MX>NKa!5&71"31BA\,QC0[K$<Trr3(q!!_B\rs4Sb1WfIA <CHM2s7?9j4OO3/4G!OEs8P4DrrUUKV1JYts+14@s*t~> q#:Ns]Dqr8rqQKq`rH+Lr;R+5!)i(MX>NKa!5&71"31BA\,QC0[K$<Trr3(q!!_B\rs4Sb1WfIA <CHM2s7?9j4OO3/4G!OEs8P4DrrUUKV1JYts+14@s*t~> q#:Ns]Dqr8rqQKq`rH+Lr;R+5!)i(MX>NKa!5&71"31BA\,QC0[K$<Trr3(q!!_B\rs4Sb1WfIA <CHM2s7?9j4OO3/4G!OEs8P4DrrUUKV1JYts+14@s*t~> q#:=Er;ZgJq>UIL!WE'!./j/Uq03h])HOEK[3Gi$s"jcU!!u!l>lap*!aYghrVus#8,iMm^IJe; ,DuALs763i4OO3/4G!OEs8P4DrrUUKV1JYts+14@s*t~> q#:=Er;ZgJq>UIL!WE'!./j/Uq03h])HOEK[3Gi$s"jcU!!u!l>lap*!aYghrVus#8,iMm^IJe; ,DuALs763i4OO3/4G!OEs8P4DrrUUKV1JYts+14@s*t~> q#:=Er;ZgJq>UIL!WE'!./j/Uq03h])HOEK[3Gi$s"jcU!!u!l>lap*!aYghrVus#8,iMm^IJe; ,DuALs763i4OO3/4G!OEs8P4DrrUUKV1JYts+14@s*t~> JcDVIs#ej3!5JO5s#bl4]Dqmnk5PM2!2Y8HJcC<$o)F4~> JcDVIs#ej3!5JO5s#bl4]Dqmnk5PM2!2Y8HJcC<$o)F4~> JcDVIs#ej3!5JO5s#bl4]Dqmnk5PM2!2Y8HJcC<$o)F4~> JcDVIs#ej3"TUg&s#`Dps1A=24QcYFdK$+ps+13$s762?~> JcDVIs#ej3"TUg&s#`Dps1A=24QcYFdK$+ps+13$s762?~> JcDVIs#ej3"TUg&s#`Dps1A=24QcYFdK$+ps+13$s762?~> JcDVIs#f'9"o6fUMf32+!!5D;4G!OEs8P4DrrUUKV1JYts+14@s*t~> JcDVIs#f'9"o6fUMf32+!!5D;4G!OEs8P4DrrUUKV1JYts+14@s*t~> JcDVIs#f'9"o6fUMf32+!!5D;4G!OEs8P4DrrUUKV1JYts+14@s*t~> JcDVIs#f3="S/sC2$<gX!>$=O!!5D;4G!OEs8P4DrrUUKV1JYts+14@s*t~> JcDVIs#f3="S/sC2$<gX!>$=O!!5D;4G!OEs8P4DrrUUKV1JYts+14@s*t~> JcDVIs#f3="S/sC2$<gX!>$=O!!5D;4G!OEs8P4DrrUUKV1JYts+14@s*t~> JcDVIs#f<@')Jh1#656-JuHrbs8N'a^]-DYJcE@^s#fHD!n%(FJcC<$JcG<@J,~> JcDVIs#f<@')Jh1#656-JuHrbs8N'a^]-DYJcE@^s#fHD!n%(FJcC<$JcG<@J,~> JcDVIs#f<@')Jh1#656-JuHrbs8N'a^]-DYJcE@^s#fHD!n%(FJcC<$JcG<@J,~> JcDVIs#fBB#Np4F!%iuIr;-En^]+954G!OEs8P4DrrUUKV1JYts+14@s*t~> JcDVIs#fBB#Np4F!%iuIr;-En^]+954G!OEs8P4DrrUUKV1JYts+14@s*t~> JcDVIs#fBB#Np4F!%iuIr;-En^]+954G!OEs8P4DrrUUKV1JYts+14@s*t~> r;ZjWrr2otci!hD0AQR1fq_7Al[f)ns8P4DrrqS(#n1Uno)J_PJcE@^s#fHD!n%(FJcFp5!nL38 Y5\S&DPr'cjo9i~> r;ZjWrr2otci!hD0AQR1fq_7Al[f)ns8P4DrrqS(#n1Uno)J_PJcE@^s#fHD!n%(FJcFp5!nL38 Y5\S&DPr'cjo9i~> r;ZjWrr2otci!hD0AQR1fq_7Al[f)ns8P4DrrqS(#n1Uno)J_PJcE@^s#fHD!n%(FJcFp5!nL38 Y5\S&DPr'cjo9i~> "oXkj$36Ilrri+=!3?+SrrcUl!!)>9s53kV4QueKq18n]GO+bus#bl4]Dqmnk5PM2!2[7+!q[d? nG`RYOAPEG"lNDq!Yh-hrrVYN;#1+ne._nWo)Ad`-!0U9!q24IeGfWu#Q^QKs5s?3~> "oXkj$36Ilrri+=!3?+SrrcUl!!)>9s53kV4QueKq18n]GO+bus#bl4]Dqmnk5PM2!2[7+!q[d? nG`RYOAPEG"lNDq!Yh-hrrVYN;#1+ne._nWo)Ad`-!0U9!q24IeGfWu#Q^QKs5s?3~> "oXkj$36Ilrri+=!3?+SrrcUl!!)>9s53kV4QueKq18n]GO+bus#bl4]Dqmnk5PM2!2[7+!q[d? nG`RYOAPEG"lNDq!Yh-hrrVYN;#1+ne._nWo)Ad`-!0U9!q24IeGfWu#Q^QKs5s?3~> #63*RLB%qOrVlrD!;tOMrr<&bJcFX-s#fQG"N`4rA*`R_s#bl4]Dqmnk5PM2!2[7+!m1KJnG`R- !!)Ng#5onL""#(AlMgq'!!)lq"7732L%50EaoD\9rrU(<!7UrMYlY'EJcFp5J,~> #63*RLB%qOrVlrD!;tOMrr<&bJcFX-s#fQG"N`4rA*`R_s#bl4]Dqmnk5PM2!2[7+!m1KJnG`R- !!)Ng#5onL""#(AlMgq'!!)lq"7732L%50EaoD\9rrU(<!7UrMYlY'EJcFp5J,~> #63*RLB%qOrVlrD!;tOMrr<&bJcFX-s#fQG"N`4rA*`R_s#bl4]Dqmnk5PM2!2[7+!m1KJnG`R- !!)Ng#5onL""#(AlMgq'!!)lq"7732L%50EaoD\9rrU(<!7UrMYlY'EJcFp5J,~> #63-SqC2JOrVloI"5*YR!!)>9s53kV4R<"Mrdk1r^$Pe!4G!OEs8P4DrrUUKV7HU-q+Q,(rrU(< !:^!jdJs9hkPkV$!!)lq!abpunG`Rc9R?4.!lG!<df0Dl!$_/gs60K5~> #63-SqC2JOrVloI"5*YR!!)>9s53kV4R<"Mrdk1r^$Pe!4G!OEs8P4DrrUUKV7HU-q+Q,(rrU(< !:^!jdJs9hkPkV$!!)lq!abpunG`Rc9R?4.!lG!<df0Dl!$_/gs60K5~> #63-SqC2JOrVloI"5*YR!!)>9s53kV4R<"Mrdk1r^$Pe!4G!OEs8P4DrrUUKV7HU-q+Q,(rrU(< !:^!jdJs9hkPkV$!!)lq!abpunG`Rc9R?4.!lG!<df0Dl!$_/gs60K5~> #QN6Ts1n[8_#F?7df\8&rr<&bJcFX-s#fZJ"S#7f@J9$es#bl4]Dqmnk5PM2!2[=-!*B+!r;Qs$ $dq'>-+s6Wq#L$d!lG!<r;R#]A0qNb,'3ATrrqb,*Wum/rr;corr3)Q!Wq'Grr?.!!;uj$!"749 "XUh\s7lZ\rrrH2dQ.OX]^l()o+_7jJcFs6J,~> #QN6Ts1n[8_#F?7df\8&rr<&bJcFX-s#fZJ"S#7f@J9$es#bl4]Dqmnk5PM2!2[=-!*B+!r;Qs$ $dq'>-+s6Wq#L$d!lG!<r;R#]A0qNb,'3ATrrqb,*Wum/rr;corr3)Q!Wq'Grr?.!!;uj$!"749 "XUh\s7lZ\rrrH2dQ.OX]^l()o+_7jJcFs6J,~> #QN6Ts1n[8_#F?7df\8&rr<&bJcFX-s#fZJ"S#7f@J9$es#bl4]Dqmnk5PM2!2[=-!*B+!r;Qs$ $dq'>-+s6Wq#L$d!lG!<r;R#]A0qNb,'3ATrrqb,*Wum/rr;corr3)Q!Wq'Grr?.!!;uj$!"749 "XUh\s7lZ\rrrH2dQ.OX]^l()o+_7jJcFs6J,~> &-()\s8QF+.f02Fdf]XM_u0Q;li7"Fr;Zi`rr3S:J3!\rX@!C,=69(/0F/D2pAP$k!!^hp.L-St mem(h[m^f3-$f.^rs7_j:&sUo1^IuMs8Dut4RN.Ni@+qpl2UcGJcE@^s#fHD!n%(F]Di"U.j4lm r;R6,!Yl+T!#GJ3s!oTC!!*!Kp&G%B![.ODr[\$K&@2?P-l)d_>Q=`j,ldul('+@6s!n-o!!*!K rr3%E!(l_\"EZ.;!!)rs%KHPF$kNCSqu?[H.j4lmr[[=7#64f?$kNCSqssagG5sINs60K5~> &-()\s8QF+.f02Fdf]XM_u0Q;li7"Fr;Zi`rr3S:J3!\rX@!C,=69(/0F/D2pAP$k!!^hp.L-St mem(h[m^f3-$f.^rs7_j:&sUo1^IuMs8Dut4RN.Ni@+qpl2UcGJcE@^s#fHD!n%(F]Di"U.j4lm r;R6,!Yl+T!#GJ3s!oTC!!*!Kp&G%B![.ODr[\$K&@2?P-l)d_>Q=`j,ldul('+@6s!n-o!!*!K rr3%E!(l_\"EZ.;!!)rs%KHPF$kNCSqu?[H.j4lmr[[=7#64f?$kNCSqssagG5sINs60K5~> &-()\s8QF+.f02Fdf]XM_u0Q;li7"Fr;Zi`rr3S:J3!\rX@!C,=69(/0F/D2pAP$k!!^hp.L-St mem(h[m^f3-$f.^rs7_j:&sUo1^IuMs8Dut4RN.Ni@+qpl2UcGJcE@^s#fHD!n%(F]Di"U.j4lm r;R6,!Yl+T!#GJ3s!oTC!!*!Kp&G%B![.ODr[\$K&@2?P-l)d_>Q=`j,ldul('+@6s!n-o!!*!K rr3%E!(l_\"EZ.;!!)rs%KHPF$kNCSqu?[H.j4lmr[[=7#64f?$kNCSqssagG5sINs60K5~> %0+cYs8V?s!/LUSdf]RK"1S=2li-nerjr.1li-nrM/rXs3a:;.CB,q1DVjqn!,;E3rr<9AOm2Fp !%[^@rtBtfM<O]='KGpgs$@q1!/_Uc";?@drVum[mf*CG+:uERs8P34s1A=24QcYFdK$,SrrU(< !;uls!!OS0f`2$"rVlr:!!)Tiq#LHp&FJ`^s8H("%0-?H!$Bnos3giF!lG!<qu6^S!0QaM!lG!< r;Zcs"X<-_!!(FFrrU(<!9jI_!!OS0f`2$"o)Ag0!!2YAs69Q6~> %0+cYs8V?s!/LUSdf]RK"1S=2li-nerjr.1li-nrM/rXs3a:;.CB,q1DVjqn!,;E3rr<9AOm2Fp !%[^@rtBtfM<O]='KGpgs$@q1!/_Uc";?@drVum[mf*CG+:uERs8P34s1A=24QcYFdK$,SrrU(< !;uls!!OS0f`2$"rVlr:!!)Tiq#LHp&FJ`^s8H("%0-?H!$Bnos3giF!lG!<qu6^S!0QaM!lG!< r;Zcs"X<-_!!(FFrrU(<!9jI_!!OS0f`2$"o)Ag0!!2YAs69Q6~> %0+cYs8V?s!/LUSdf]RK"1S=2li-nerjr.1li-nrM/rXs3a:;.CB,q1DVjqn!,;E3rr<9AOm2Fp !%[^@rtBtfM<O]='KGpgs$@q1!/_Uc";?@drVum[mf*CG+:uERs8P34s1A=24QcYFdK$,SrrU(< !;uls!!OS0f`2$"rVlr:!!)Tiq#LHp&FJ`^s8H("%0-?H!$Bnos3giF!lG!<qu6^S!0QaM!lG!< r;Zcs"X<-_!!(FFrrU(<!9jI_!!OS0f`2$"o)Ag0!!2YAs69Q6~> !rp^Orr31k!".Zadf]RK"8r3"li$hcrVurar;Zcs!0dE^"5a(YXoA>%blAmbs8N'!f_tgT?3#KT s1SJ]rVlqY!13Zarr<0amJk_dJcG]Ks#fcM"5=k1c0,-,4G!OEs8P4DrrUUKZ+9l9_Z0]7s8N'& ZN'n(!6"j9!lG!<nG`R-!!)or$d!'B//8-bs8O/@S,!!b_Z0]6rrNZ1\F9G!_Z0]7s8N'&ZN'n( !6"j9!lG!<kl:Y_"g\1-!!'t.rr_Zh!76;sl2Q8~> !rp^Orr31k!".Zadf]RK"8r3"li$hcrVurar;Zcs!0dE^"5a(YXoA>%blAmbs8N'!f_tgT?3#KT s1SJ]rVlqY!13Zarr<0amJk_dJcG]Ks#fcM"5=k1c0,-,4G!OEs8P4DrrUUKZ+9l9_Z0]7s8N'& ZN'n(!6"j9!lG!<nG`R-!!)or$d!'B//8-bs8O/@S,!!b_Z0]6rrNZ1\F9G!_Z0]7s8N'&ZN'n( !6"j9!lG!<kl:Y_"g\1-!!'t.rr_Zh!76;sl2Q8~> !rp^Orr31k!".Zadf]RK"8r3"li$hcrVurar;Zcs!0dE^"5a(YXoA>%blAmbs8N'!f_tgT?3#KT s1SJ]rVlqY!13Zarr<0amJk_dJcG]Ks#fcM"5=k1c0,-,4G!OEs8P4DrrUUKZ+9l9_Z0]7s8N'& ZN'n(!6"j9!lG!<nG`R-!!)or$d!'B//8-bs8O/@S,!!b_Z0]6rrNZ1\F9G!_Z0]7s8N'&ZN'n( !6"j9!lG!<kl:Y_"g\1-!!'t.rr_Zh!76;sl2Q8~> !rp^Orr33%3<2eRdf]OJrr<&br;Zcs!:0R_rr<&brr3&c!!)ut!nRDdrVult!:0U`"i:6as8Pgh !!$."s8N'!idq.*s8P4Nrr_O0(!l%Bs#bl4]Dqmnk5PM2!49<:!lG!<r;Zcs"iLB?!!'q8rrU(< !:^!i_Z0]7rrJbnqZ-Zr!X&M<q#:E5!!)or!WrG<n,EI,!!)rsrr<5?s8N'!_u9T:_Z0]#s8N'& _uK`:!5nC-"8`&uaFXBUs*t~> !rp^Orr33%3<2eRdf]OJrr<&br;Zcs!:0R_rr<&brr3&c!!)ut!nRDdrVult!:0U`"i:6as8Pgh !!$."s8N'!idq.*s8P4Nrr_O0(!l%Bs#bl4]Dqmnk5PM2!49<:!lG!<r;Zcs"iLB?!!'q8rrU(< !:^!i_Z0]7rrJbnqZ-Zr!X&M<q#:E5!!)or!WrG<n,EI,!!)rsrr<5?s8N'!_u9T:_Z0]#s8N'& _uK`:!5nC-"8`&uaFXBUs*t~> !rp^Orr33%3<2eRdf]OJrr<&br;Zcs!:0R_rr<&brr3&c!!)ut!nRDdrVult!:0U`"i:6as8Pgh !!$."s8N'!idq.*s8P4Nrr_O0(!l%Bs#bl4]Dqmnk5PM2!49<:!lG!<r;Zcs"iLB?!!'q8rrU(< !:^!i_Z0]7rrJbnqZ-Zr!X&M<q#:E5!!)or!WrG<n,EI,!!)rsrr<5?s8N'!_u9T:_Z0]#s8N'& _uK`:!5nC-"8`&uaFXBUs*t~> !rp^OrVm&J"9>[T"8r3!!!)?_s8N'!lhpe_!!)?arrVKd!<)p!f)QK_s8N'!li$hgn,NI_rtGJ! pAb-m!:,49q>^IWnc&^a2[[djs8P34s1A=24QcYFdK$YbrrU(<!;uls!!U:?rr<&:rVlu;!!*#g rrU(<!;uj*)ZXO=s*F_Gs8N`4S,!!c_Z0]9r;Qg2!35Mf!lG!<r;Zcs"iLB?!!'q8rr^.=!<26_ rr<5?s8N'!_t*g0l2Uh<JcG!7J,~> !rp^OrVm&J"9>[T"8r3!!!)?_s8N'!lhpe_!!)?arrVKd!<)p!f)QK_s8N'!li$hgn,NI_rtGJ! pAb-m!:,49q>^IWnc&^a2[[djs8P34s1A=24QcYFdK$YbrrU(<!;uls!!U:?rr<&:rVlu;!!*#g rrU(<!;uj*)ZXO=s*F_Gs8N`4S,!!c_Z0]9r;Qg2!35Mf!lG!<r;Zcs"iLB?!!'q8rr^.=!<26_ rr<5?s8N'!_t*g0l2Uh<JcG!7J,~> !rp^OrVm&J"9>[T"8r3!!!)?_s8N'!lhpe_!!)?arrVKd!<)p!f)QK_s8N'!li$hgn,NI_rtGJ! pAb-m!:,49q>^IWnc&^a2[[djs8P34s1A=24QcYFdK$YbrrU(<!;uls!!U:?rr<&:rVlu;!!*#g rrU(<!;uj*)ZXO=s*F_Gs8N`4S,!!c_Z0]9r;Qg2!35Mf!lG!<r;Zcs"iLB?!!'q8rr^.=!<26_ rr<5?s8N'!_t*g0l2Uh<JcG!7J,~> !rp^Or;Qn?!$92`r;Zcs!:0R_rr<&br;Zcs!:0Xa!p]gdrVlrN!#,>2rr<&brVm-!!!)Qh!W_-O s8N'!l[f*3s8P4Prr`6r"0pqes#bl4]Dqmnk5PM2!49<:!lG!<r;Zcs"iLB?!!'q8rrpUH!7:cC oD\m0!!)rs&-i33s3Mqi!<<'t!$Bnos4.&I"j?rHd/X"BrrP@aG45G4_Z0]7s8N'&_uK`:!5nd8 "j?rHd/X"/s8N'&_uK`:!5nC-"1eI@rIP"5s*t~> !rp^Or;Qn?!$92`r;Zcs!:0R_rr<&br;Zcs!:0Xa!p]gdrVlrN!#,>2rr<&brVm-!!!)Qh!W_-O s8N'!l[f*3s8P4Prr`6r"0pqes#bl4]Dqmnk5PM2!49<:!lG!<r;Zcs"iLB?!!'q8rrpUH!7:cC oD\m0!!)rs&-i33s3Mqi!<<'t!$Bnos4.&I"j?rHd/X"BrrP@aG45G4_Z0]7s8N'&_uK`:!5nd8 "j?rHd/X"/s8N'&_uK`:!5nC-"1eI@rIP"5s*t~> !rp^Or;Qn?!$92`r;Zcs!:0R_rr<&br;Zcs!:0Xa!p]gdrVlrN!#,>2rr<&brVm-!!!)Qh!W_-O s8N'!l[f*3s8P4Prr`6r"0pqes#bl4]Dqmnk5PM2!49<:!lG!<r;Zcs"iLB?!!'q8rrpUH!7:cC oD\m0!!)rs&-i33s3Mqi!<<'t!$Bnos4.&I"j?rHd/X"BrrP@aG45G4_Z0]7s8N'&_uK`:!5nd8 "j?rHd/X"/s8N'&_uK`:!5nC-"1eI@rIP"5s*t~> !rp^Or;Qok)urS5r;Zcs!:0R_rr<&br;Zcs!:0Xa!p]gdrVlrN!#,>2rr<&brVm,b!!rT(&cfcA s8N'!l[f*3s8P4PrrS)YPiMcE4>MIU]0lZT4QcYF`;m9Ws8OSN+TMNA/-#YL!!U:?rr<&:rVm&o% fcn`$M49!_Z0]7rt%U!"![jd!!*'!dgH-W,o-LYrrr'+!!t"[rr3(V!$hL6s8OSN+TMNA/-#YL! !U:?rr<&:rVm&o%fcn`$L@`l!!U:?rr<&:o)Ac)!*4[Nkl6/~> !rp^Or;Qok)urS5r;Zcs!:0R_rr<&br;Zcs!:0Xa!p]gdrVlrN!#,>2rr<&brVm,b!!rT(&cfcA s8N'!l[f*3s8P4PrrS)YPiMcE4>MIU]0lZT4QcYF`;m9Ws8OSN+TMNA/-#YL!!U:?rr<&:rVm&o% fcn`$M49!_Z0]7rt%U!"![jd!!*'!dgH-W,o-LYrrr'+!!t"[rr3(V!$hL6s8OSN+TMNA/-#YL! !U:?rr<&:rVm&o%fcn`$L@`l!!U:?rr<&:o)Ac)!*4[Nkl6/~> !rp^Or;Qok)urS5r;Zcs!:0R_rr<&br;Zcs!:0Xa!p]gdrVlrN!#,>2rr<&brVm,b!!rT(&cfcA s8N'!l[f*3s8P4PrrS)YPiMcE4>MIU]0lZT4QcYF`;m9Ws8OSN+TMNA/-#YL!!U:?rr<&:rVm&o% fcn`$M49!_Z0]7rt%U!"![jd!!*'!dgH-W,o-LYrrr'+!!t"[rr3(V!$hL6s8OSN+TMNA/-#YL! !U:?rr<&:rVm&o%fcn`$L@`l!!U:?rr<&:o)Ac)!*4[Nkl6/~> !rp^Oqu6c"!!!-!rrN3$kPYA[!!)?_s8N'!li-nclMpq`rrUdP'E.t2!!)*Yrs,Y+6i[0[!.=_E !WMils8N'!l_4=\mu0"3r;ZgjirB$@oD\m8#$Bmb!B`,g7(Yhf1-F_!!lG#F]Dq[,s8W*!"iLB? !!'q7rrg(k"UQsUrrU(<!;uj%iBme`Cq0NGrr3/O;A0*H;#C7q^G,lu1B.:Ul3RHio)JLcs8W*! "iLB?!!'q7rrg(k"UQsMs8N'&_uK`:!5nF."6Ksk_h%jOs*t~> !rp^Oqu6c"!!!-!rrN3$kPYA[!!)?_s8N'!li-nclMpq`rrUdP'E.t2!!)*Yrs,Y+6i[0[!.=_E !WMils8N'!l_4=\mu0"3r;ZgjirB$@oD\m8#$Bmb!B`,g7(Yhf1-F_!!lG#F]Dq[,s8W*!"iLB? !!'q7rrg(k"UQsUrrU(<!;uj%iBme`Cq0NGrr3/O;A0*H;#C7q^G,lu1B.:Ul3RHio)JLcs8W*! "iLB?!!'q7rrg(k"UQsMs8N'&_uK`:!5nF."6Ksk_h%jOs*t~> !rp^Oqu6c"!!!-!rrN3$kPYA[!!)?_s8N'!li-nclMpq`rrUdP'E.t2!!)*Yrs,Y+6i[0[!.=_E !WMils8N'!l_4=\mu0"3r;ZgjirB$@oD\m8#$Bmb!B`,g7(Yhf1-F_!!lG#F]Dq[,s8W*!"iLB? !!'q7rrg(k"UQsUrrU(<!;uj%iBme`Cq0NGrr3/O;A0*H;#C7q^G,lu1B.:Ul3RHio)JLcs8W*! "iLB?!!'q7rrg(k"UQsMs8N'&_uK`:!5nF."6Ksk_h%jOs*t~> !rpLGqYpUh!!E0!!ZqEZrr3-"G5qX.rVm!!!!)?arr_Nd!<2ut!nI>brVult!20;j#XSNrs8Tk8 ($to!!H3;`rr`3"!:$<Y!S\Cd!!#[Os8P4Rrr_j=+n4Lks#bl4]Dqmnk5PM#!47=Wl2Lj=!#k4) rrQ$t;h=u3s*t~> !rpLGqYpUh!!E0!!ZqEZrr3-"G5qX.rVm!!!!)?arr_Nd!<2ut!nI>brVult!20;j#XSNrs8Tk8 ($to!!H3;`rr`3"!:$<Y!S\Cd!!#[Os8P4Rrr_j=+n4Lks#bl4]Dqmnk5PM#!47=Wl2Lj=!#k4) rrQ$t;h=u3s*t~> !rpLGqYpUh!!E0!!ZqEZrr3-"G5qX.rVm!!!!)?arr_Nd!<2ut!nI>brVult!20;j#XSNrs8Tk8 ($to!!H3;`rr`3"!:$<Y!S\Cd!!#[Os8P4Rrr_j=+n4Lks#bl4]Dqmnk5PM#!47=Wl2Lj=!#k4) rrQ$t;h=u3s*t~> "T*TIX8Mnq!o=4cr;R.[!&ra,ZT!42!3Q8"rr^:A!4Vt-"1A10dJj.JUAtMVrr36(,:&lQjC/+# rVm._!AhjndoAg/rr3)@!!'O'rrc1!7*P2Ws8P4RrrR0Ca5R'u4G!OEs8P4DrrU(<["88Arri6d !'U"Wrr[`N+mad[kPp&~> "T*TIX8Mnq!o=4cr;R.[!&ra,ZT!42!3Q8"rr^:A!4Vt-"1A10dJj.JUAtMVrr36(,:&lQjC/+# rVm._!AhjndoAg/rr3)@!!'O'rrc1!7*P2Ws8P4RrrR0Ca5R'u4G!OEs8P4DrrU(<["88Arri6d !'U"Wrr[`N+mad[kPp&~> "T*TIX8Mnq!o=4cr;R.[!&ra,ZT!42!3Q8"rr^:A!4Vt-"1A10dJj.JUAtMVrr36(,:&lQjC/+# rVm._!AhjndoAg/rr3)@!!'O'rrc1!7*P2Ws8P4RrrR0Ca5R'u4G!OEs8P4DrrU(<["88Arri6d !'U"Wrr[`N+mad[kPp&~> quHWo!JCRQrs/LS)[.?sfDkdLs8N*V!WE'*6N:<l!!!(+s#p>]$j&s!rrAPK@i5J"P5bCZ#/<Y= "=&g$rr3!Q!WE'!.&6eD#QXGMs8P4SrrULLFQ!3!4G!OEs8P4DrrU(<_h%jOrr_dJ!1C"i"4.)f g4B:ds*t~> quHWo!JCRQrs/LS)[.?sfDkdLs8N*V!WE'*6N:<l!!!(+s#p>]$j&s!rrAPK@i5J"P5bCZ#/<Y= "=&g$rr3!Q!WE'!.&6eD#QXGMs8P4SrrULLFQ!3!4G!OEs8P4DrrU(<_h%jOrr_dJ!1C"i"4.)f g4B:ds*t~> quHWo!JCRQrs/LS)[.?sfDkdLs8N*V!WE'*6N:<l!!!(+s#p>]$j&s!rrAPK@i5J"P5bCZ#/<Y= "=&g$rr3!Q!WE'!.&6eD#QXGMs8P4SrrULLFQ!3!4G!OEs8P4DrrU(<_h%jOrr_dJ!1C"i"4.)f g4B:ds*t~> JcF'rrrCdQ!Cf3Frr`3X*qS=is#bl4]Dqmnk5PM#!5jBfkPkSSS?2_kXl+d1jo9i~> JcF'rrrCdQ!Cf3Frr`3X*qS=is#bl4]Dqmnk5PM#!5jBfkPkSSS?2_kXl+d1jo9i~> JcF'rrrCdQ!Cf3Frr`3X*qS=is#bl4]Dqmnk5PM#!5jBfkPkSSS?2_kXl+d1jo9i~> JcF'rrrCdQ!D>QKrrSemZJY]^4Lb=lFU32Is8P4DrrU(<_h%i=s+14@s*t~> JcF'rrrCdQ!D>QKrrSemZJY]^4Lb=lFU32Is8P4DrrU(<_h%i=s+14@s*t~> JcF'rrrCdQ!D>QKrrSemZJY]^4Lb=lFU32Is8P4DrrU(<_h%i=s+14@s*t~> JcF'rrrCdQ!D>QLrrVs;7Ge(E4Lb=l#65(_rs,_u(]t!gC#QW&s#fHD!l4lSJcC<$JcG<@J,~> JcF'rrrCdQ!D>QLrrVs;7Ge(E4Lb=l#65(_rs,_u(]t!gC#QW&s#fHD!l4lSJcC<$JcG<@J,~> JcF'rrrCdQ!D>QLrrVs;7Ge(E4Lb=l#65(_rs,_u(]t!gC#QW&s#fHD!l4lSJcC<$JcG<@J,~> JcF'rrrCdQ!D>KJrrSAbbMN:!4Lb=lEX-^=rr?F'!!*bf])Vdmk5PLi!5l>H"S6RQ"Fl"&JcEOc J,~> JcF'rrrCdQ!D>KJrrSAbbMN:!4Lb=lEX-^=rr?F'!!*bf])Vdmk5PLi!5l>H"S6RQ"Fl"&JcEOc J,~> JcF'rrrCdQ!D>KJrrSAbbMN:!4Lb=lEX-^=rr?F'!!*bf])Vdmk5PLi!5l>H"S6RQ"Fl"&JcEOc J,~> JcF'rrrCdQ!D>$>rrVm1<8ITS4H'4FOFF:HY<r9iBtF?E4QcYFZiJ"RrrcX.!$%8Ts+13cs*t~> JcF'rrrCdQ!D>$>rrVm1<8ITS4H'4FOFF:HY<r9iBtF?E4QcYFZiJ"RrrcX.!$%8Ts+13cs*t~> JcF'rrrCdQ!D>$>rrVm1<8ITS4H'4FOFF:HY<r9iBtF?E4QcYFZiJ"RrrcX.!$%8Ts+13cs*t~> JcF'rrrCdQ!E^rKrrSJffA6K,4M(OmA,H>Urr_Zh!(a^$s#fHD!jhsF\GlU@!.0:sJcEIaJ,~> JcF'rrrCdQ!E^rKrrSJffA6K,4M(OmA,H>Urr_Zh!(a^$s#fHD!jhsF\GlU@!.0:sJcEIaJ,~> JcF'rrrCdQ!E^rKrrSJffA6K,4M(OmA,H>Urr_Zh!(a^$s#fHD!jhsF\GlU@!.0:sJcEIaJ,~> JcF'rrrCdQ!EpfFrrW-E;V_<P4M(OmA,H>rs7jM!rr_!U!,/tDs#fHD!jhsK\GuR/!5a<eJcEIa J,~> JcF'rrrCdQ!EpfFrrW-E;V_<P4M(OmA,H>rs7jM!rr_!U!,/tDs#fHD!jhsK\GuR/!5a<eJcEIa J,~> JcF'rrrCdQ!EpfFrrW-E;V_<P4M(OmA,H>rs7jM!rr_!U!,/tDs#fHD!jhsK\GuR/!5a<eJcEIa J,~> JcF'rrrCdQ!F6cBrrT5$a5$^p4M(OrgV^oc!!)Ngp]0ja#OTFCQ6ZG?f"1n]4QcYFZiJObrr`3" !5sHgJcEIaJ,~> JcF'rrrCdQ!F6cBrrT5$a5$^p4M(OrgV^oc!!)Ngp]0ja#OTFCQ6ZG?f"1n]4QcYFZiJObrr`3" !5sHgJcEIaJ,~> JcF'rrrCdQ!F6cBrrT5$a5$^p4M(OrgV^oc!!)Ngp]0ja#OTFCQ6ZG?f"1n]4QcYFZiJObrr`3" !5sHgJcEIaJ,~> JcF'rrrCdQ!GNVNrrG5Fg].:9\,QLs!!)Ngp]0ja!3c>$!=>d:s8P4DrrT5$d^oG]q3q?ah1>TW s1\M`~> JcF'rrrCdQ!GNVNrrG5Fg].:9\,QLs!!)Ngp]0ja!3c>$!=>d:s8P4DrrT5$d^oG]q3q?ah1>TW s1\M`~> JcF'rrrCdQ!GNVNrrG5Fg].:9\,QLs!!)Ngp]0ja!3c>$!=>d:s8P4DrrT5$d^oG]q3q?ah1>TW s1\M`~> JcF'rrrCdQ!GN,ArrU^NW8%@P4Lb=l6N@,<rrB8"!!-*q]Dqmnk5PLZ!7JLZ"FgCO*K>XMJcEF` J,~> JcF'rrrCdQ!GN,ArrU^NW8%@P4Lb=l6N@,<rrB8"!!-*q]Dqmnk5PLZ!7JLZ"FgCO*K>XMJcEF` J,~> JcF'rrrCdQ!GN,ArrU^NW8%@P4Lb=l6N@,<rrB8"!!-*q]Dqmnk5PLZ!7JLZ"FgCO*K>XMJcEF` J,~> JcF'rrrCdQ!HJ_IrrR0Sq:krL4Lb=l6N@,Us7jM#rs&Gg\3'`kLV*Td4QcYFV#]GcrreT2!![Xu s+13`s*t~> JcF'rrrCdQ!HJ_IrrR0Sq:krL4Lb=l6N@,Us7jM#rs&Gg\3'`kLV*Td4QcYFV#]GcrreT2!![Xu s+13`s*t~> JcF'rrrCdQ!HJ_IrrR0Sq:krL4Lb=l6N@,Us7jM#rs&Gg\3'`kLV*Td4QcYFV#]GcrreT2!![Xu s+13`s*t~> JcF'rrrCdQ!Ik+HrrW!1ESCHm4Lb=l6N@,Us7cT\rr_Wg!(sm's#fHD!hfVQ\c2c1!!(o-s+13a s*t~> JcF'rrrCdQ!Ik+HrrW!1ESCHm4Lb=l6N@,Us7cT\rr_Wg!(sm's#fHD!hfVQ\c2c1!!(o-s+13a s*t~> JcF'rrrCdQ!Ik+HrrW!1ESCHm4Lb=l6N@,Us7cT\rr_Wg!(sm's#fHD!hfVQ\c2c1!!(o-s+13a s*t~> JcF'rrrCdQ!fd9Nr;Qi!!7fg's#ddj!^cqfnGi7`m/I15!!$?;s8P4DrrSJdiOSsjq>^N7JcC<$ ^Ai]~> JcF'rrrCdQ!fd9Nr;Qi!!7fg's#ddj!^cqfnGi7`m/I15!!$?;s8P4DrrSJdiOSsjq>^N7JcC<$ ^Ai]~> JcF'rrrCdQ!fd9Nr;Qi!!7fg's#ddj!^cqfnGi7`m/I15!!$?;s8P4DrrSJdiOSsjq>^N7JcC<$ ^Ai]~> JcF'rrrCdQ!h98Mr;Qdr/_U1(4M(Rl_ZDXp!<0mjrs=sp^V[@-'`\6B]Dqmnk5PLK!:%)orr<&: JcC<$^Ai]~> JcF'rrrCdQ!h98Mr;Qdr/_U1(4M(Rl_ZDXp!<0mjrs=sp^V[@-'`\6B]Dqmnk5PLK!:%)orr<&: JcC<$^Ai]~> JcF'rrrCdQ!h98Mr;Qdr/_U1(4M(Rl_ZDXp!<0mjrs=sp^V[@-'`\6B]Dqmnk5PLK!:%)orr<&: JcC<$^Ai]~> JcF'rrrCdQ!il=NrVlri$%pq2s#dmmp]0(Kq>^NuK=_*_4QcYFQ2pEarrN3$^k)N:s1\M`~> JcF'rrrCdQ!il=NrVlri$%pq2s#dmmp]0(Kq>^NuK=_*_4QcYFQ2pEarrN3$^k)N:s1\M`~> JcF'rrrCdQ!il=NrVlri$%pq2s#dmmp]0(Kq>^NuK=_*_4QcYFQ2pEarrN3$^k)N:s1\M`~> JcF'rrrCdQ!kA<MrVlqq!8?-+s#dmmp]0(K#8I4=";*J3f"(h\4QcYFL]HqSrrNr9FFjICs1\M`~> JcF'rrrCdQ!kA<MrVlqq!8?-+s#dmmp]0(K#8I4=";*J3f"(h\4QcYFL]HqSrrNr9FFjICs1\M`~> JcF'rrrCdQ!kA<MrVlqq!8?-+s#dmmp]0(K#8I4=";*J3f"(h\4QcYFL]HqSrrNr9FFjICs1\M`~> JcF'rrrCdQ!lk;MrVlmq/_L+'4G!OEs8P4DrrRrUoXOo(C]FGUQ%Asds1nYb~> JcF'rrrCdQ!lk;MrVlmq/_L+'4G!OEs8P4DrrRrUoXOo(C]FGUQ%Asds1nYb~> JcF'rrrCdQ!lk;MrVlmq/_L+'4G!OEs8P4DrrRrUoXOo(C]FGUQ%Asds1nYb~> JcF'rrrCdQ!nI@Mrr3&p%!^G)s#bl4]Dqmnk5PI;!4Vt2pN@V\It@WNs1nYb~> JcF'rrrCdQ!nI@Mrr3&p%!^G)s#bl4]Dqmnk5PI;!4Vt2pN@V\It@WNs1nYb~> JcF'rrrCdQ!nI@Mrr3&p%!^G)s#bl4]Dqmnk5PI;!4Vt2pN@V\It@WNs1nYb~> JcF'rrrCdQ!p'ENrr3&1!5mIhs#bl4]Dqmnk5PI2!.k0$s+14?s*t~> JcF'rrrCdQ!p'ENrr3&1!5mIhs#bl4]Dqmnk5PI2!.k0$s+14?s*t~> JcF'rrrCdQ!p'ENrr3&1!5mIhs#bl4]Dqmnk5PI2!.k0$s+14?s*t~> JcF'rrrCdQ!rE%Lrr3%?')^D^s#bl4]Dqmnk5PI,!.k0$s+14?s*t~> JcF'rrrCdQ!rE%Lrr3%?')^D^s#bl4]Dqmnk5PI,!.k0$s+14?s*t~> JcF'rrrCdQ!rE%Lrr3%?')^D^s#bl4]Dqmnk5PI,!.k0$s+14?s*t~> JcF'rrrCaP!?#MKrrFTNfDkk5JcE@^s#fHD!I,*7rrUbJmB6HjrbeWbs1SG_~> JcF'rrrCaP!?#MKrrFTNfDkk5JcE@^s#fHD!I,*7rrUbJmB6HjrbeWbs1SG_~> JcF'rrrCaP!?#MKrrFTNfDkk5JcE@^s#fHD!I,*7rrUbJmB6HjrbeWbs1SG_~> JcF'rrrCaP"uT$Qs6B]LfDkk5JcE@^s#fHD!GN1BrrVg==8Dk"i)UNn'V#($"4S"bU9=Lud0KcF mf*F]E#f(2JcF=$J,~> JcF'rrrCaP"uT$Qs6B]LfDkk5JcE@^s#fHD!GN1BrrVg==8Dk"i)UNn'V#($"4S"bU9=Lud0KcF mf*F]E#f(2JcF=$J,~> JcF'rrrCaP"uT$Qs6B]LfDkk5JcE@^s#fHD!GN1BrrVg==8Dk"i)UNn'V#($"4S"bU9=Lud0KcF mf*F]E#f(2JcF=$J,~> JcF'rrrCaP##I#Rs0)LLfDkk5JcE@^s#fHD!Fm1HrrU=C#Q"H)r?hRI-6@g=rr_X2!/:"D#5*<f "rLq8_Z'_C!X-@.rrcX.!$%8Ts474#~> JcF'rrrCaP##I#Rs0)LLfDkk5JcE@^s#fHD!Fm1HrrU=C#Q"H)r?hRI-6@g=rr_X2!/:"D#5*<f "rLq8_Z'_C!X-@.rrcX.!$%8Ts474#~> JcF'rrrCaP##I#Rs0)LLfDkk5JcE@^s#fHD!Fm1HrrU=C#Q"H)r?hRI-6@g=rr_X2!/:"D#5*<f "rLq8_Z'_C!X-@.rrcX.!$%8Ts474#~> JcF'rrrCaP#&G%Ss)\eLfDkk5JcE@^s#fHD!EpkHrrW!iHM[XDdJs9hqu6_)!(c\\#l?ab"![pK -M,+S"*FSfp[J1a%fgs-s4%(!~> JcF'rrrCaP#&G%Ss)\eLfDkk5JcE@^s#fHD!EpkHrrW!iHM[XDdJs9hqu6_)!(c\\#l?ab"![pK -M,+S"*FSfp[J1a%fgs-s4%(!~> JcF'rrrCaP#&G%Ss)\eLfDkk5JcE@^s#fHD!EpkHrrW!iHM[XDdJs9hqu6_)!(c\\#l?ab"![pK -M,+S"*FSfp[J1a%fgs-s4%(!~> JcF'rrrCaP"bm$Ps#<O"s8P34s1A=24QcYE:G&ID!*B+!qYpW7!!)or"5!YVg%,.KR/d`Fs4.h` L=lM1!"749"XUhPrr_j-!1!'Rrr<&9JcF7"J,~> JcF'rrrCaP"bm$Ps#<O"s8P34s1A=24QcYE:G&ID!*B+!qYpW7!!)or"5!YVg%,.KR/d`Fs4.h` L=lM1!"749"XUhPrr_j-!1!'Rrr<&9JcF7"J,~> JcF'rrrCaP"bm$Ps#<O"s8P34s1A=24QcYE:G&ID!*B+!qYpW7!!)or"5!YVg%,.KR/d`Fs4.h` L=lM1!"749"XUhPrr_j-!1!'Rrr<&9JcF7"J,~> JcF'rrrCaP"el"Po`g'"s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4QcYE8NWgL"EZ.;!!)rss!n-o !!*!Krr3%E!(l_\#XAB2s8VFB!&iL0#64f?$kNCSqssagG5sJirr`3"!5sHgeGk%~> JcF'rrrCaP"el"Po`g'"s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4QcYE8NWgL"EZ.;!!)rss!n-o !!*!Krr3%E!(l_\#XAB2s8VFB!&iL0#64f?$kNCSqssagG5sJirr`3"!5sHgeGk%~> JcF'rrrCaP"el"Po`g'"s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4QcYE8NWgL"EZ.;!!)rss!n-o !!*!Krr3%E!(l_\#XAB2s8VFB!&iL0#64f?$kNCSqssagG5sJirr`3"!5sHgeGk%~> JcF'rrrCaP"hXiP^];.#s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4QcYE4@,eC!lG!<r;ZQmrr3$V !0QgO#SI->s1]KQ!"\f'q#LHpq#L*frr<3HkLfh8dIR;>_Z0`.oD\shRfEHEJcF7"J,~> JcF'rrrCaP"hXiP^];.#s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4QcYE4@,eC!lG!<r;ZQmrr3$V !0QgO#SI->s1]KQ!"\f'q#LHpq#L*frr<3HkLfh8dIR;>_Z0`.oD\shRfEHEJcF7"J,~> JcF'rrrCaP"hXiP^];.#s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4QcYE4@,eC!lG!<r;ZQmrr3$V !0QgO#SI->s1]KQ!"\f'q#LHpq#L*frr<3HkLfh8dIR;>_Z0`.oD\shRfEHEJcF7"J,~> JcF'rrrCaP"l00RKEh,#s8P34s1A=24QcYE1eXYE!lG!<qYpW7!!)or!Y,4?nc&js!5*X[23\(D pAaq=s8VmFp&G$l"g\1-!!'t.rr_Zh!7:B<"FgCO*K>XMe,Op~> JcF'rrrCaP"l00RKEh,#s8P34s1A=24QcYE1eXYE!lG!<qYpW7!!)or!Y,4?nc&js!5*X[23\(D pAaq=s8VmFp&G$l"g\1-!!'t.rr_Zh!7:B<"FgCO*K>XMe,Op~> JcF'rrrCaP"l00RKEh,#s8P34s1A=24QcYE1eXYE!lG!<qYpW7!!)or!Y,4?nc&js!5*X[23\(D pAaq=s8VmFp&G$l"g\1-!!'t.rr_Zh!7:B<"FgCO*K>XMe,Op~> JcF'rrrCaP"T/IN8N,-!s#bl4]Dqmnk5PH6<i#`s_Z0]5rrU(<!;lct!s$.,rs0)7)[_Q%YlGEh s8N'&_uK`:!5nC-"8`&uaRoK8Pp-24GCfeCs*t~> JcF'rrrCaP"T/IN8N,-!s#bl4]Dqmnk5PH6<i#`s_Z0]5rrU(<!;lct!s$.,rs0)7)[_Q%YlGEh s8N'&_uK`:!5nC-"8`&uaRoK8Pp-24GCfeCs*t~> JcF'rrrCaP"T/IN8N,-!s#bl4]Dqmnk5PH6<i#`s_Z0]5rrU(<!;lct!s$.,rs0)7)[_Q%YlGEh s8N'&_uK`:!5nC-"8`&uaRoK8Pp-24GCfeCs*t~> JcF'rrrC^O""[FhB@[%^4G!OEs8P4DrrF3HV#LM6!!)lq!lG!<qu6^1!35Sh#W)N3h#ICu!'p8X q()LFq().<rr<5?s8N'!_t*g0l2Uh<o)Afj!!(o-s4%(!~> JcF'rrrC^O""[FhB@[%^4G!OEs8P4DrrF3HV#LM6!!)lq!lG!<qu6^1!35Sh#W)N3h#ICu!'p8X q()LFq().<rr<5?s8N'!_t*g0l2Uh<o)Afj!!(o-s4%(!~> JcF'rrrC^O""[FhB@[%^4G!OEs8P4DrrF3HV#LM6!!)lq!lG!<qu6^1!35Sh#W)N3h#ICu!'p8X q()LFq().<rr<5?s8N'!_t*g0l2Uh<o)Afj!!(o-s4%(!~> JcF'rrrC^O"&UQKPL]^54G!OEs8P4DrrF!OV#LM6!!)lq!lG!<qu6^]!-[o4#_N*jf`0D2!1NW] q#LHpq#L*frr<5?s8N'!_t*g0\c<0;o)Agg!!'uhs4%(!~> JcF'rrrC^O"&UQKPL]^54G!OEs8P4DrrF!OV#LM6!!)lq!lG!<qu6^]!-[o4#_N*jf`0D2!1NW] q#LHpq#L*frr<5?s8N'!_t*g0\c<0;o)Agg!!'uhs4%(!~> JcF'rrrC^O"&UQKPL]^54G!OEs8P4DrrF!OV#LM6!!)lq!lG!<qu6^]!-[o4#_N*jf`0D2!1NW] q#LHpq#L*frr<5?s8N'!_t*g0\c<0;o)Agg!!'uhs4%(!~> JcF'rrrC^O"*t.O^"*/_4Lb=pfO#^(#UQ8"rrmlT'Kq-5\c;[lk5PGmEMid9.fpjo!<+MIrrU(< !;lcuL]A\!o)B!d,6.ik!rtO_f`1sO"iLB?!!'q-rrQj6<q-.h!!'ofs4%(!~> JcF'rrrC^O"*t.O^"*/_4Lb=pfO#^(#UQ8"rrmlT'Kq-5\c;[lk5PGmEMid9.fpjo!<+MIrrU(< !;lcuL]A\!o)B!d,6.ik!rtO_f`1sO"iLB?!!'q-rrQj6<q-.h!!'ofs4%(!~> JcF'rrrC^O"*t.O^"*/_4Lb=pfO#^(#UQ8"rrmlT'Kq-5\c;[lk5PGmEMid9.fpjo!<+MIrrU(< !;lcuL]A\!o)B!d,6.ik!rtO_f`1sO"iLB?!!'q-rrQj6<q-.h!!'ofs4%(!~> JcF'rrrC^O"/u8#lIGq74LkClcj]gP!.W`&!.XqI!=bs<s8P4DrrE1MVZ6GlrVlr:!!)or"6p0m WU]umk?o&/,CK19s8N'&_uK`:!5nF."6Ksk_sm[-!<Bods4%(!~> JcF'rrrC^O"/u8#lIGq74LkClcj]gP!.W`&!.XqI!=bs<s8P4DrrE1MVZ6GlrVlr:!!)or"6p0m WU]umk?o&/,CK19s8N'&_uK`:!5nF."6Ksk_sm[-!<Bods4%(!~> JcF'rrrC^O"/u8#lIGq74LkClcj]gP!.W`&!.XqI!=bs<s8P4DrrE1MVZ6GlrVlr:!!)or"6p0m WU]umk?o&/,CK19s8N'&_uK`:!5nF."6Ksk_sm[-!<Bods4%(!~> JcF'rrrC^O!nmVaeGoP2\Gle,!!$-2]q`Bsrs.MtVdou3"3\=Vs#fKE!q?8NOT,E9!#k4)rrQ$t ;t'_f('&H-s4%(!~> JcF'rrrC^O!nmVaeGoP2\Gle,!!$-2]q`Bsrs.MtVdou3"3\=Vs#fKE!q?8NOT,E9!#k4)rrQ$t ;t'_f('&H-s4%(!~> JcF'rrrC^O!nmVaeGoP2\Gle,!!$-2]q`Bsrs.MtVdou3"3\=Vs#fKE!q?8NOT,E9!#k4)rrQ$t ;t'_f('&H-s4%(!~> JcF'rrrC^O!rW3BeGoP2\GlXA!$hKkrr]J*!+NS?s#fKE!oF!MOT,I]63'1AXoAKQ!$U^trrd-< !$.>Us474#~> JcF'rrrC^O!rW3BeGoP2\GlXA!$hKkrr]J*!+NS?s#fKE!oF!MOT,I]63'1AXoAKQ!$U^trrd-< !$.>Us474#~> JcF'rrrC^O!rW3BeGoP2\GlXA!$hKkrr]J*!+NS?s#fKE!oF!MOT,I]63'1AXoAKQ!$U^trrd-< !$.>Us474#~> JcF'rrrC[N!<aFms8P3ks8N'!6dbo9p&G(c]DqmnkPkV0!3_I`"7\2JRBHPlciP->mf*FaFrpg9 JcF=$J,~> JcF'rrrC[N!<aFms8P3ks8N'!6dbo9p&G(c]DqmnkPkV0!3_I`"7\2JRBHPlciP->mf*FaFrpg9 JcF=$J,~> JcF'rrrC[N!<aFms8P3ks8N'!6dbo9p&G(c]DqmnkPkV0!3_I`"7\2JRBHPlciP->mf*FaFrpg9 JcF=$J,~> JcF'rrrC^O"6TXjrRLrJ4M1Xm_uB]:2#Y>`s7jM!rrhe2!!%>Ws8P4ErrTn7^Q/<po:2o^!Nk:2 s1SG_~> JcF'rrrC^O"6TXjrRLrJ4M1Xm_uB]:2#Y>`s7jM!rrhe2!!%>Ws8P4ErrTn7^Q/<po:2o^!Nk:2 s1SG_~> JcF'rrrC^O"6TXjrRLrJ4M1Xm_uB]:2#Y>`s7jM!rrhe2!!%>Ws8P4ErrTn7^Q/<po:2o^!Nk:2 s1SG_~> JcF'rrrC^O"24a8dFJ9s4M1Xf!;$6c!:Tpf6i?uc)sP!7s#fKE!j2OMJcC<$JcG9?J,~> JcF'rrrC^O"24a8dFJ9s4M1Xf!;$6c!:Tpf6i?uc)sP!7s#fKE!j2OMJcC<$JcG9?J,~> JcF'rrrC^O"24a8dFJ9s4M1Xf!;$6c!:Tpf6i?uc)sP!7s#fKE!j2OMJcC<$JcG9?J,~> JcF'rrrC^O".oPnQdu-94M1Xf!;$6c!:Tpk6N@*&AECE&s#fKE!hKDNJcC<$JcG9?J,~> JcF'rrrC^O".oPnQdu-94M1Xf!;$6c!:Tpk6N@*&AECE&s#fKE!hKDNJcC<$JcG9?J,~> JcF'rrrC^O".oPnQdu-94M1Xf!;$6c!:Tpk6N@*&AECE&s#fKE!hKDNJcC<$JcG9?J,~> JcF'rrrC^O"+LFu>h/lS4LkFk!!#C9rrPOf!4W".4Ql_GN<&O#s8;lumuU@ss+14Gs*t~> JcF'rrrC^O"+LFu>h/lS4LkFk!!#C9rrPOf!4W".4Ql_GN<&O#s8;lumuU@ss+14Gs*t~> JcF'rrrC^O"+LFu>h/lS4LkFk!!#C9rrPOf!4W".4Ql_GN<&O#s8;lumuU@ss+14Gs*t~> JcF'rrrC^O"(33[*nC;j4LkFk!!#CTs7jM#rrPOf!4W".4Ql_FI05'#qu6`8!!(LJ"QaS0!5jBf XT*e~> JcF'rrrC^O"(33[*nC;j4LkFk!!#CTs7jM#rrPOf!4W".4Ql_FI05'#qu6`8!!(LJ"QaS0!5jBf XT*e~> JcF'rrrC^O"(33[*nC;j4LkFk!!#CTs7jM#rrPOf!4W".4Ql_FI05'#qu6`8!!(LJ"QaS0!5jBf XT*e~> JcF'rrrC^O"@>;O!7oa$s#dgkrr<$dn,N._UAt6UkPkQu'S6;]rrU(<!7h)NlY-V'!!'ofs/c6N~> JcF'rrrC^O"@>;O!7oa$s#dgkrr<$dn,N._UAt6UkPkQu'S6;]rrU(<!7h)NlY-V'!!'ofs/c6N~> JcF'rrrC^O"@>;O!7oa$s#dgkrr<$dn,N._UAt6UkPkQu'S6;]rrU(<!7h)NlY-V'!!'ofs/c6N~> JcF'rrrC^O"<q.="-;%5s#dgkrr<$dn,N._UAt6UkPkQ\/s-);!!1Y9"rsH<rrq:_&I:4trr;co s8W*!"iLB?!!'q9rso)1ej'EZV#UGp$dq'>-+rpN#42^<RK*?*qu6_>#^(^up](3m!s00+Xo/2& WB^so$9QZ8J,~> JcF'rrrC^O"<q.="-;%5s#dgkrr<$dn,N._UAt6UkPkQ\/s-);!!1Y9"rsH<rrq:_&I:4trr;co s8W*!"iLB?!!'q9rso)1ej'EZV#UGp$dq'>-+rpN#42^<RK*?*qu6_>#^(^up](3m!s00+Xo/2& WB^so$9QZ8J,~> JcF'rrrC^O"<q.="-;%5s#dgkrr<$dn,N._UAt6UkPkQ\/s-);!!1Y9"rsH<rrq:_&I:4trr;co s8W*!"iLB?!!'q9rso)1ej'EZV#UGp$dq'>-+rpN#42^<RK*?*qu6_>#^(^up](3m!s00+Xo/2& WB^so$9QZ8J,~> JcF'rrrCaP"oSXQs#3L"s8P3ks8N'!6e),<O:i1g\GuRkkPkQ?8s')Q!#6=S)ZU'!s5b$s&g%)R Z2ahS.j4lmr[\$Krr<5?s8N'!_uB]9!"KhL)ZU'!rr<*8$kNCSqt9sm_YO33!5n^6!XA]3fDbmC G,,*;!!OMp$ig9lrr31?!!!TY$NSTSJ,~> JcF'rrrCaP"oSXQs#3L"s8P3ks8N'!6e),<O:i1g\GuRkkPkQ?8s')Q!#6=S)ZU'!s5b$s&g%)R Z2ahS.j4lmr[\$Krr<5?s8N'!_uB]9!"KhL)ZU'!rr<*8$kNCSqt9sm_YO33!5n^6!XA]3fDbmC G,,*;!!OMp$ig9lrr31?!!!TY$NSTSJ,~> JcF'rrrCaP"oSXQs#3L"s8P3ks8N'!6e),<O:i1g\GuRkkPkQ?8s')Q!#6=S)ZU'!s5b$s&g%)R Z2ahS.j4lmr[\$Krr<5?s8N'!_uB]9!"KhL)ZU'!rr<*8$kNCSqt9sm_YO33!5n^6!XA]3fDbmC G,,*;!!OMp$ig9lrr31?!!!TY$NSTSJ,~> JcGNF!p=Rur;QiYFSXtsrrCaP#35cQs*k@KfDkk5\GuR/!(599!t,)/$b66:4Ql_F(MJp1rr<NI fDRH)RK%%&@f-1n!&slV!lG!<r;Zcs"iLB?!!'q9s8N'/)V=pC!1Eie!$^UZ!!(F;s8N'!_u'H8 F9csArr`7g)ZZZ5rr<SIs7p"%*rl8L!!A\gs89^\s*t~> JcGNF!p=Rur;QiYFSXtsrrCaP#35cQs*k@KfDkk5\GuR/!(599!t,)/$b66:4Ql_F(MJp1rr<NI fDRH)RK%%&@f-1n!&slV!lG!<r;Zcs"iLB?!!'q9s8N'/)V=pC!1Eie!$^UZ!!(F;s8N'!_u'H8 F9csArr`7g)ZZZ5rr<SIs7p"%*rl8L!!A\gs89^\s*t~> JcGNF!p=Rur;QiYFSXtsrrCaP#35cQs*k@KfDkk5\GuR/!(599!t,)/$b66:4Ql_F(MJp1rr<NI fDRH)RK%%&@f-1n!&slV!lG!<r;Zcs"iLB?!!'q9s8N'/)V=pC!1Eie!$^UZ!!(F;s8N'!_u'H8 F9csArr`7g)ZZZ5rr<SIs7p"%*rl8L!!A\gs89^\s*t~> T)Sk7#^>2+"6(I(>5eI(o-=<'p>l8R!87AV`;mLLd/^<#s8P3ks8N'!6e),<O:Vtc\GuRkkl1_[ !JHR7rr<P3s8S?cY5]RD+"Jif!!iK&!lG!<r;Zcs"iLB?!!'q9s8N'/Y5eNe=0DQ'!4)Y(!!'t. s8N'!_pSJe`[VGu)5I63!"-XDs1879s8Pjp@Eeb%~> T)Sk7#^>2+"6(I(>5eI(o-=<'p>l8R!87AV`;mLLd/^<#s8P3ks8N'!6e),<O:Vtc\GuRkkl1_[ !JHR7rr<P3s8S?cY5]RD+"Jif!!iK&!lG!<r;Zcs"iLB?!!'q9s8N'/Y5eNe=0DQ'!4)Y(!!'t. s8N'!_pSJe`[VGu)5I63!"-XDs1879s8Pjp@Eeb%~> T)Sk7#^>2+"6(I(>5eI(o-=<'p>l8R!87AV`;mLLd/^<#s8P3ks8N'!6e),<O:Vtc\GuRkkl1_[ !JHR7rr<P3s8S?cY5]RD+"Jif!!iK&!lG!<r;Zcs"iLB?!!'q9s8N'/Y5eNe=0DQ'!4)Y(!!'t. s8N'!_pSJe`[VGu)5I63!"-XDs1879s8Pjp@Eeb%~> i;X#W!o*b8!9a.W".oPnldPk8#65(grrha9!#3lZrre>^!(m.Ns8N)Prs#M(ec5Xr=kE]R4G!OE s8P4FrrV!VU6,ET!!'q6rr<6"!!!&urrU(<!;uls!!U:?rr<&:rr;uu!5n^6rr<5?s8N'!_t*j- !!'pcrrVO5')hk2"0!IEbP_D?!"-XDp/D#Os8No9XN^]p~> i;X#W!o*b8!9a.W".oPnldPk8#65(grrha9!#3lZrre>^!(m.Ns8N)Prs#M(ec5Xr=kE]R4G!OE s8P4FrrV!VU6,ET!!'q6rr<6"!!!&urrU(<!;uls!!U:?rr<&:rr;uu!5n^6rr<5?s8N'!_t*j- !!'pcrrVO5')hk2"0!IEbP_D?!"-XDp/D#Os8No9XN^]p~> i;X#W!o*b8!9a.W".oPnldPk8#65(grrha9!#3lZrre>^!(m.Ns8N)Prs#M(ec5Xr=kE]R4G!OE s8P4FrrV!VU6,ET!!'q6rr<6"!!!&urrU(<!;uls!!U:?rr<&:rr;uu!5n^6rr<5?s8N'!_t*j- !!'pcrrVO5')hk2"0!IEbP_D?!"-XDp/D#Os8No9XN^]p~> i;X#9!Vuc6#laZ""P!k[!:/,6!ceNfi;WmN!!U@<rr[?C!.Eu/rrCaP#F#5Qs8RETpt5WH4G!OE s8P4FrrTt9^6&Bp!!'q6rrNf5ZM=G%_Z0]9rVult"iLB9!!'q9s8N'!_u'K6!!U:?rr<&:o)J^i !5n^6!l99Jh#@TWN#Ms$!",];!8IGOrr<BL.16+[_>jN<!5QhYJ,~> i;X#9!Vuc6#laZ""P!k[!:/,6!ceNfi;WmN!!U@<rr[?C!.Eu/rrCaP#F#5Qs8RETpt5WH4G!OE s8P4FrrTt9^6&Bp!!'q6rrNf5ZM=G%_Z0]9rVult"iLB9!!'q9s8N'!_u'K6!!U:?rr<&:o)J^i !5n^6!l99Jh#@TWN#Ms$!",];!8IGOrr<BL.16+[_>jN<!5QhYJ,~> i;X#9!Vuc6#laZ""P!k[!:/,6!ceNfi;WmN!!U@<rr[?C!.Eu/rrCaP#F#5Qs8RETpt5WH4G!OE s8P4FrrTt9^6&Bp!!'q6rrNf5ZM=G%_Z0]9rVult"iLB9!!'q9s8N'!_u'K6!!U:?rr<&:o)J^i !5n^6!l99Jh#@TWN#Ms$!",];!8IGOrr<BL.16+[_>jN<!5QhYJ,~> i;Wtm)ZTi6-i*cGodb"^!:-lh"/#VoLACiPq_J3Tdc^W3huFkPrs+&Tr;ZfA!3t2Vs#bl4]Dqmn kl1^[!8EV8rr<&:qu6mr!'0BFs7u!Zrt!<R!7:cCs8NH,Y5`JA!5ng9rr<&:qu?Zr"iLB?!!'q- s8N'!_u0N:r<r[$gA_<IBGLRcU]:;n!s9EDd/O%H%03WVs*t~> i;Wtm)ZTi6-i*cGodb"^!:-lh"/#VoLACiPq_J3Tdc^W3huFkPrs+&Tr;ZfA!3t2Vs#bl4]Dqmn kl1^[!8EV8rr<&:qu6mr!'0BFs7u!Zrt!<R!7:cCs8NH,Y5`JA!5ng9rr<&:qu?Zr"iLB?!!'q- s8N'!_u0N:r<r[$gA_<IBGLRcU]:;n!s9EDd/O%H%03WVs*t~> i;Wtm)ZTi6-i*cGodb"^!:-lh"/#VoLACiPq_J3Tdc^W3huFkPrs+&Tr;ZfA!3t2Vs#bl4]Dqmn kl1^[!8EV8rr<&:qu6mr!'0BFs7u!Zrt!<R!7:cCs8NH,Y5`JA!5ng9rr<&:qu?Zr"iLB?!!'q- s8N'!_u0N:r<r[$gA_<IBGLRcU]:;n!s9EDd/O%H%03WVs*t~> i;WtM3WK,68,</g@Q+&_!:0+Rrr<[i9F"2V9a3,ss7_^M*!QWk?eG>W!+Yp,r;Zcs#*ZYZ"rM^c nG`Xf*WRAZq#:H6!!#p[rrRiRAD-t`D%usK!A%4&s8P34s1A=24QueHL'%.3s8N'!_u'H=cNsRU -QiSBrVmE$%fcn`$NL-"!$=Z1$NS*Ds8N'!_u'K6!!U:?rr<&:p&G"5rr<*;+!:I]!]C#bf`)$- 4ohAXrr<&:qYpUU!,BaXJ,~> i;WtM3WK,68,</g@Q+&_!:0+Rrr<[i9F"2V9a3,ss7_^M*!QWk?eG>W!+Yp,r;Zcs#*ZYZ"rM^c nG`Xf*WRAZq#:H6!!#p[rrRiRAD-t`D%usK!A%4&s8P34s1A=24QueHL'%.3s8N'!_u'H=cNsRU -QiSBrVmE$%fcn`$NL-"!$=Z1$NS*Ds8N'!_u'K6!!U:?rr<&:p&G"5rr<*;+!:I]!]C#bf`)$- 4ohAXrr<&:qYpUU!,BaXJ,~> i;WtM3WK,68,</g@Q+&_!:0+Rrr<[i9F"2V9a3,ss7_^M*!QWk?eG>W!+Yp,r;Zcs#*ZYZ"rM^c nG`Xf*WRAZq#:H6!!#p[rrRiRAD-t`D%usK!A%4&s8P34s1A=24QueHL'%.3s8N'!_u'H=cNsRU -QiSBrVmE$%fcn`$NL-"!$=Z1$NS*Ds8N'!_u'K6!!U:?rr<&:p&G"5rr<*;+!:I]!]C#bf`)$- 4ohAXrr<&:qYpUU!,BaXJ,~> i;Wt-=TAD6BDVW4UCc;^!!)?Rs8N'+)@-<C.L?(T7/tm8!!*P]rr2t.quHZprr<'e!rW*!M=CNI XoJH_pAY4S!!;?Jrr^US"5)<,!ELTHrrS2blIl4;4G!OEs8P4FrrHFLO8o4[!5n[5#0opT!YRT$ r;R8A0a.k=s8V">"<jF-!5ng9rr<&:qu?Zr"iLB?!!'q0s7lZnrrV'X%bCX[`2!A4!!'q5rs+Pa "fVJ$qmk,SJ,~> i;Wt-=TAD6BDVW4UCc;^!!)?Rs8N'+)@-<C.L?(T7/tm8!!*P]rr2t.quHZprr<'e!rW*!M=CNI XoJH_pAY4S!!;?Jrr^US"5)<,!ELTHrrS2blIl4;4G!OEs8P4FrrHFLO8o4[!5n[5#0opT!YRT$ r;R8A0a.k=s8V">"<jF-!5ng9rr<&:qu?Zr"iLB?!!'q0s7lZnrrV'X%bCX[`2!A4!!'q5rs+Pa "fVJ$qmk,SJ,~> i;Wt-=TAD6BDVW4UCc;^!!)?Rs8N'+)@-<C.L?(T7/tm8!!*P]rr2t.quHZprr<'e!rW*!M=CNI XoJH_pAY4S!!;?Jrr^US"5)<,!ELTHrrS2blIl4;4G!OEs8P4FrrHFLO8o4[!5n[5#0opT!YRT$ r;R8A0a.k=s8V">"<jF-!5ng9rr<&:qu?Zr"iLB?!!'q0s7lZnrrV'X%bCX[`2!A4!!'q5rs+Pa "fVJ$qmk,SJ,~> irA`QrVm,T%'BR0!!)?Rs8Duubl.SP_`7]+s5."D[D8Xg!!$m8rrq/p___>nr;Z`r"Upij!WXV; rrZO,!9<eQ"-<K_SEg+V^)$cef`(t>55kK_lNW@%s8P34s1A=24QueG1eWE"^Ae81!)A+Fp](6n !5n[5#PgF]!#$^d!7Cgs~> irA`QrVm,T%'BR0!!)?Rs8Duubl.SP_`7]+s5."D[D8Xg!!$m8rrq/p___>nr;Z`r"Upij!WXV; rrZO,!9<eQ"-<K_SEg+V^)$cef`(t>55kK_lNW@%s8P34s1A=24QueG1eWE"^Ae81!)A+Fp](6n !5n[5#PgF]!#$^d!7Cgs~> irA`QrVm,T%'BR0!!)?Rs8Duubl.SP_`7]+s5."D[D8Xg!!$m8rrq/p___>nr;Z`r"Upij!WXV; rrZO,!9<eQ"-<K_SEg+V^)$cef`(t>55kK_lNW@%s8P34s1A=24QueG1eWE"^Ae81!)A+Fp](6n !5n[5#PgF]!#$^d!7Cgs~> i;Ws*V#UH9Yl+M&pF^:]s8N'!lgOlR!!k(S!!">F6N@,_rr\qp!(d"e!^cqfr;Zcs"p2=7s"j]Z nG`P=!$(\3"3plHC@(s(k?J#f6ho=6!A@@KrrH+Lg&M(7JcE@^s#fQG!r`RNJcEOc"I'T#%b-(0 p](6n!5nX4#5<g(#mDVgdJn^~> i;Ws*V#UH9Yl+M&pF^:]s8N'!lgOlR!!k(S!!">F6N@,_rr\qp!(d"e!^cqfr;Zcs"p2=7s"j]Z nG`P=!$(\3"3plHC@(s(k?J#f6ho=6!A@@KrrH+Lg&M(7JcE@^s#fQG!r`RNJcEOc"I'T#%b-(0 p](6n!5nX4#5<g(#mDVgdJn^~> i;Ws*V#UH9Yl+M&pF^:]s8N'!lgOlR!!k(S!!">F6N@,_rr\qp!(d"e!^cqfr;Zcs"p2=7s"j]Z nG`P=!$(\3"3plHC@(s(k?J#f6ho=6!A@@KrrH+Lg&M(7JcE@^s#fQG!r`RNJcEOc"I'T#%b-(0 p](6n!5nX4#5<g(#mDVgdJn^~> i;Wrg^An09b5D8@AMX&[s8N'!lgOlR!"MBr!!#Cd6N@,ds5.`F$iL&*6i6lb6N@,as8N'!5lUcb 6N@,UrrNW03q`LTnGiPcmf*LjQ4O$&LABI$!?#JHrrTb3]\<Dc4G!OEs8P4GrrUgQVh+l`rr[ih >1nK,[/YX~> i;Wrg^An09b5D8@AMX&[s8N'!lgOlR!"MBr!!#Cd6N@,ds5.`F$iL&*6i6lb6N@,as8N'!5lUcb 6N@,UrrNW03q`LTnGiPcmf*LjQ4O$&LABI$!?#JHrrTb3]\<Dc4G!OEs8P4GrrUgQVh+l`rr[ih >1nK,[/YX~> i;Wrg^An09b5D8@AMX&[s8N'!lgOlR!"MBr!!#Cd6N@,ds5.`F$iL&*6i6lb6N@,as8N'!5lUcb 6N@,UrrNW03q`LTnGiPcmf*LjQ4O$&LABI$!?#JHrrTb3]\<Dc4G!OEs8P4GrrUgQVh+l`rr[ih >1nK,[/YX~> iVs,R!8.>8!9F+Y!i?I_rVult!:0+Rrr<Eorr<$ds$Hbds2,6@!!#C`rrPOf!;uls!!#CcrrPOf !:^!i!rtRYrr`,u!(lYZ"mA,M!)28"rrE=Or;Qit/4\Fos#bl4]Dqmnl2LgZ!8N/*JcC<$n,In~> iVs,R!8.>8!9F+Y!i?I_rVult!:0+Rrr<Eorr<$ds$Hbds2,6@!!#C`rrPOf!;uls!!#CcrrPOf !:^!i!rtRYrr`,u!(lYZ"mA,M!)28"rrE=Or;Qit/4\Fos#bl4]Dqmnl2LgZ!8N/*JcC<$n,In~> iVs,R!8.>8!9F+Y!i?I_rVult!:0+Rrr<Eorr<$ds$Hbds2,6@!!#C`rrPOf!;uls!!#CcrrPOf !:^!i!rtRYrr`,u!(lYZ"mA,M!)28"rrE=Or;Qit/4\Fos#bl4]Dqmnl2LgZ!8N/*JcC<$n,In~> iVs,:!:p07!rW#s!=c"*s8N'!lgOlR!#%a"!!#Cd6N@,d1B7Gr\ANgs!(6Y`!^cqfr;Zcs!(6bc !^cqfnG`P%!%mmD"76'g=mu@m3rf>aeGfUB!/g[R!hfYDg])X`/=F3Oo9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6 o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl /3N1s!G`F$s+13$s6fo;~> iVs,:!:p07!rW#s!=c"*s8N'!lgOlR!#%a"!!#Cd6N@,d1B7Gr\ANgs!(6Y`!^cqfr;Zcs!(6bc !^cqfnG`P%!%mmD"76'g=mu@m3rf>aeGfUB!/g[R!hfYDg])X`/=F3Oo9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6 o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl /3N1s!G`F$s+13$s6fo;~> iVs,:!:p07!rW#s!=c"*s8N'!lgOlR!#%a"!!#Cd6N@,d1B7Gr\ANgs!(6Y`!^cqfr;Zcs!(6bc !^cqfnG`P%!%mmD"76'g=mu@m3rf>aeGfUB!/g[R!hfYDg])X`/=F3Oo9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6 o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl /3N1s!G`F$s+13$s6fo;~> j8\iRrr;Zl!#tJ.rr<Hprr<$ds$HbdrriB\rr3(J!!#C`rrPOf!;uls!!#CcrrPOf!:^!j2#mmW pAY66!!%T=rrY=_!NafN!p9QLqu6`n).)(tHorsJ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H ]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@-b?s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1KsGl2Lc9<.Y(# s+14<s*t~> j8\iRrr;Zl!#tJ.rr<Hprr<$ds$HbdrriB\rr3(J!!#C`rrPOf!;uls!!#CcrrPOf!:^!j2#mmW pAY66!!%T=rrY=_!NafN!p9QLqu6`n).)(tHorsJ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H ]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@-b?s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1KsGl2Lc9<.Y(# s+14<s*t~> j8\iRrr;Zl!#tJ.rr<Hprr<$ds$HbdrriB\rr3(J!!#C`rrPOf!;uls!!#CcrrPOf!:^!j2#mmW pAY66!!%T=rrY=_!NafN!p9QLqu6`n).)(tHorsJ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H ]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@-b?s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1KsGl2Lc9<.Y(# s+14<s*t~> iVs(D4TGG58G3#_!!)?Rs8N'06iR,d6iTLR!<3u<#ai)'rVupcrr;u8!]0lWrknd9rr<$drr3$e !!)Ng")n5?]Cu7,JcGebn,ERU5QCdXhU_].g&RuGrrS)]g>)`.4G!OEs8P4HrrV6]R\TlcIfgTr jamG_s3^js~> iVs(D4TGG58G3#_!!)?Rs8N'06iR,d6iTLR!<3u<#ai)'rVupcrr;u8!]0lWrknd9rr<$drr3$e !!)Ng")n5?]Cu7,JcGebn,ERU5QCdXhU_].g&RuGrrS)]g>)`.4G!OEs8P4HrrV6]R\TlcIfgTr jamG_s3^js~> iVs(D4TGG58G3#_!!)?Rs8N'06iR,d6iTLR!<3u<#ai)'rVupcrr;u8!]0lWrknd9rr<$drr3$e !!)Ng")n5?]Cu7,JcGebn,ERU5QCdXhU_].g&RuGrrS)]g>)`.4G!OEs8P4HrrV6]R\TlcIfgTr jamG_s3^js~> iVs(!?2sq4CA%W,!!)?Rs8N'+6iR,d6iTLR!<7HE!!?'u!(6bcp]1?orr<$drr3$e!!)Ng"3(<@ >5/%"rZhI^rU0[irg+/r$&/3-rrUIGZMOS&nJ#'[s8P34s1A=24R2qJRfVKCrrnZ2!!"SLJcC<$ df4g~> iVs(!?2sq4CA%W,!!)?Rs8N'+6iR,d6iTLR!<7HE!!?'u!(6bcp]1?orr<$drr3$e!!)Ng"3(<@ >5/%"rZhI^rU0[irg+/r$&/3-rrUIGZMOS&nJ#'[s8P34s1A=24R2qJRfVKCrrnZ2!!"SLJcC<$ df4g~> iVs(!?2sq4CA%W,!!)?Rs8N'+6iR,d6iTLR!<7HE!!?'u!(6bcp]1?orr<$drr3$e!!)Ng"3(<@ >5/%"rZhI^rU0[irg+/r$&/3-rrUIGZMOS&nJ#'[s8P34s1A=24R2qJRfVKCrrnZ2!!"SLJcC<$ df4g~> iVs'SIfKF4N:m5N!!)?Rs8N'46iR,d6iTLR!<;qD)?_CFqu?^arr;`ns8W*!!(6bc!^cqfn,EJM !!CgIrr]"r!0$7D"mB1l!(-J6rrU":^\Rm2O9*Y_s8P34s1A=24R2qI76.%@"0DP'eq*jPs3gpt~> iVs'SIfKF4N:m5N!!)?Rs8N'46iR,d6iTLR!<;qD)?_CFqu?^arr;`ns8W*!!(6bc!^cqfn,EJM !!CgIrr]"r!0$7D"mB1l!(-J6rrU":^\Rm2O9*Y_s8P34s1A=24R2qI76.%@"0DP'eq*jPs3gpt~> iVs'SIfKF4N:m5N!!)?Rs8N'46iR,d6iTLR!<;qD)?_CFqu?^arr;`ns8W*!!(6bc!^cqfn,EJM !!CgIrr]"r!0$7D"mB1l!(-J6rrU":^\Rm2O9*Y_s8P34s1A=24R2qI76.%@"0DP'eq*jPs3gpt~> iVs'0TE"p3XnD_o!!)>hrrgCE!':&SrrhU(!$h4%rr]tO!,gKi!jhsOq>UNk+%Y5fs#bl4]Dqmn li.%J"-oPZ"8r3"`.@r>s3gpt~> iVs'0TE"p3XnD_o!!)>hrrgCE!':&SrrhU(!$h4%rr]tO!,gKi!jhsOq>UNk+%Y5fs#bl4]Dqmn li.%J"-oPZ"8r3"`.@r>s3gpt~> iVs'0TE"p3XnD_o!!)>hrrgCE!':&SrrhU(!$h4%rr]tO!,gKi!jhsOq>UNk+%Y5fs#bl4]Dqmn li.%J"-oPZ"8r3"`.@r>s3gpt~> ir95]#J^<7!mgQ>rr<&bYQ"]P!!$j4rri-`!!U=(rr^XT"4u9,!i5nLq#:Df!4Uhbs#bl4]Dqmn li.$4%.9bfrr<&6JcC<$df4g~> ir95]#J^<7!mgQ>rr<&bYQ"]P!!$j4rri-`!!U=(rr^XT"4u9,!i5nLq#:Df!4Uhbs#bl4]Dqmn li.$4%.9bfrr<&6JcC<$df4g~> ir95]#J^<7!mgQ>rr<&bYQ"]P!!$j4rri-`!!U=(rr^XT"4u9,!i5nLq#:Df!4Uhbs#bl4]Dqmn li.$4%.9bfrr<&6JcC<$df4g~> JcGTH"T;:"!."PC"Sb[k!M/?P!e^P`gA_5A!9O"U"8jkupYZ#N4G!OEs8P4JrrVNuDP$k1)ut!S JcC<$e,Op~> JcGTH"T;:"!."PC"Sb[k!M/?P!e^P`gA_5A!9O"U"8jkupYZ#N4G!OEs8P4JrrVNuDP$k1)ut!S JcC<$e,Op~> JcGTH"T;:"!."PC"Sb[k!M/?P!e^P`gA_5A!9O"U"8jkupYZ#N4G!OEs8P4JrrVNuDP$k1)ut!S JcC<$e,Op~> JcGQG"8PjuWr;r"qc3ffjSo;?!$9ko!fR-Kp\t<:!dii)s#bl4]Dqmnm/I-$#i_HU"1^)c!.k0$ s3q!u~> JcGQG"8PjuWr;r"qc3ffjSo;?!$9ko!fR-Kp\t<:!dii)s#bl4]Dqmnm/I-$#i_HU"1^)c!.k0$ s3q!u~> JcGQG"8PjuWr;r"qc3ffjSo;?!$9ko!fR-Kp\t<:!dii)s#bl4]Dqmnm/I-$#i_HU"1^)c!.k0$ s3q!u~> JcGNF!WC1<rrN&?irB#YgA_50!;Z?g!bqtli;`g>JcE@^s#f]K!kAA\Sc8ef&csG3s+14!s*t~> JcGNF!WC1<rrN&?irB#YgA_50!;Z?g!bqtli;`g>JcE@^s#f]K!kAA\Sc8ef&csG3s+14!s*t~> JcGNF!WC1<rrN&?irB#YgA_50!;Z?g!bqtli;`g>JcE@^s#f]K!kAA\Sc8ef&csG3s+14!s*t~> JcF'rrrCdQ!Ik+Brr_^,3W.k9s#bl4]Dqmnmf*CC'JT6OrrNu:P_&jcs3gpt~> JcF'rrrCdQ!Ik+Brr_^,3W.k9s#bl4]Dqmnmf*CC'JT6OrrNu:P_&jcs3gpt~> JcF'rrrCdQ!Ik+Brr_^,3W.k9s#bl4]Dqmnmf*CC'JT6OrrNu:P_&jcs3gpt~> JcF'rrrCdQ!I+h@rrT8%JDpP.4G!OEs8P4Mrr^di(#>D[rr<&9JcC<$df4g~> JcF'rrrCdQ!I+h@rrT8%JDpP.4G!OEs8P4Mrr^di(#>D[rr<&9JcC<$df4g~> JcF'rrrCdQ!I+h@rrT8%JDpP.4G!OEs8P4Mrr^di(#>D[rr<&9JcC<$df4g~> JcF'rrrCdQ!HSeCrrQ[4`o@$u4G!OEs8P4Orri=k$lRTbs8N'!_h%i=s3gpt~> JcF'rrrCdQ!HSeCrrQ[4`o@$u4G!OEs8P4Orri=k$lRTbs8N'!_h%i=s3gpt~> JcF'rrrCdQ!HSeCrrQ[4`o@$u4G!OEs8P4Orri=k$lRTbs8N'!_h%i=s3gpt~> JcF'rrrCdQ!GN5=rr_m?+S"Lls#ctS"7V\Gn=]g]4S/RVpo6+M8EZKB"8`&u`I\&?s3gpt~> JcF'rrrCdQ!GN5=rr_m?+S"Lls#ctS"7V\Gn=]g]4S/RVpo6+M8EZKB"8`&u`I\&?s3gpt~> JcF'rrrCdQ!GN5=rr_m?+S"Lls#ctS"7V\Gn=]g]4S/RVpo6+M8EZKB"8`&u`I\&?s3gpt~> JcF'rrrCdQ!G<JErr^FK;#]PUs#d"T"n!Q7!$^p+s8P4Vrs8#6V1M>K!&h3Prr](t!8E))JcF0u J,~> JcF'rrrCdQ!G<JErr^FK;#]PUs#d"T"n!Q7!$^p+s8P4Vrs8#6V1M>K!&h3Prr](t!8E))JcF0u J,~> JcF'rrrCdQ!G<JErr^FK;#]PUs#d"T"n!Q7!$^p+s8P4Vrs8#6V1M>K!&h3Prr](t!8E))JcF0u J,~> JcF'rrrCdQ!EpT8rrSAaHK>,+4JDcTR/I!b.A900&-50br\FX++V>"Z!!<<\H.&,\"I1/2!&]?- JcF-tJ,~> JcF'rrrCdQ!EpT8rrSAaHK>,+4JDcTR/I!b.A900&-50br\FX++V>"Z!!<<\H.&,\"I1/2!&]?- JcF-tJ,~> JcF'rrrCdQ!EpT8rrSAaHK>,+4JDcTR/I!b.A900&-50br\FX++V>"Z!!<<\H.&,\"I1/2!&]?- JcF-tJ,~> JcF'rrrCdQ!Eq)ErrQj7V<.aW4JDcTRf*3d.A900&H,!&8QB58GETDgq3M$`IfgQrk^ibbs3^js~> JcF'rrrCdQ!Eq)ErrQj7V<.aW4JDcTRf*3d.A900&H,!&8QB58GETDgq3M$`IfgQrk^ibbs3^js~> JcF'rrrCdQ!Eq)ErrQj7V<.aW4JDcTRf*3d.A900&H,!&8QB58GETDgq3M$`IfgQrk^ibbs3^js~> JcF'rrrCdQ!Eq)Err`'`$HVB0s#d"T"n*W8!$^p+s8P34s+13$s4%(!~> JcF'rrrCdQ!Eq)Err`'`$HVB0s#d"T"n*W8!$^p+s8P34s+13$s4%(!~> JcF'rrrCdQ!Eq)Err`'`$HVB0s#d"T"n*W8!$^p+s8P34s+13$s4%(!~> JcF'rrrCdQ!Eq)Drr_O3(";@Gs#ctS"7V_In=]g]4G!N`s+14"s*t~> JcF'rrrCdQ!Eq)Drr_O3(";@Gs#ctS"7V_In=]g]4G!N`s+14"s*t~> JcF'rrrCdQ!Eq)Drr_O3(";@Gs#ctS"7V_In=]g]4G!N`s+14"s*t~> JcF'rrrCdQ!DG*5rr_!q(u+9Ss#bl4]DqmnJcC<$JcF7"J,~> JcF'rrrCdQ!DG*5rr_!q(u+9Ss#bl4]DqmnJcC<$JcF7"J,~> JcF'rrrCdQ!DG*5rr_!q(u+9Ss#bl4]DqmnJcC<$JcF7"J,~> JcF'rrrCdQ!D>$3rr^jf*8g#\s#bl4]DqmnJcGcM!)*7jg]%EJE#f(2JcCK)J,~> JcF'rrrCdQ!D>$3rr^jf*8g#\s#bl4]DqmnJcGcM!)*7jg]%EJE#f(2JcCK)J,~> JcF'rrrCdQ!D>$3rr^jf*8g#\s#bl4]DqmnJcGcM!)*7jg]%EJE#f(2JcCK)J,~> JcF'rrrCdQ!D>$2rr^X],N%eds#bl4]DqmnJcGcM"DTG1!!(dR"C;'.*0l*TLAuc~> JcF'rrrCdQ!D>$2rr^X],N%eds#bl4]DqmnJcGcM"DTG1!!(dR"C;'.*0l*TLAuc~> JcF'rrrCdQ!D>$2rr^X],N%eds#bl4]DqmnJcGcM"DTG1!!(dR"C;'.*0l*TLAuc~> JcF'rrrCdQ!D>$1rr^CV(shOJs#bl4]DqmnJcG]K!lG!<g]%<c!.0:sK`?Q~> JcF'rrrCdQ!D>$1rr^CV(shOJs#bl4]DqmnJcG]K!lG!<g]%<c!.0:sK`?Q~> JcF'rrrCdQ!D>$1rr^CV(shOJs#bl4]DqmnJcG]K!lG!<g]%<c!.0:sK`?Q~> JcF'rrrCdQ!D>*2rr^go%D;'-s#bl4]DqmnM#RY9=V1orYl+M&_Z0]7rs&.D-3aVqOT#1_hcUNs 1pHNMrr<&9JcCE'J,~> JcF'rrrCdQ!D>*2rr^go%D;'-s#bl4]DqmnM#RY9=V1orYl+M&_Z0]7rs&.D-3aVqOT#1_hcUNs 1pHNMrr<&9JcCE'J,~> JcF'rrrCdQ!D>*2rr^go%D;'-s#bl4]DqmnM#RY9=V1orYl+M&_Z0]7rs&.D-3aVqOT#1_hcUNs 1pHNMrr<&9JcCE'J,~> JcF'rrrCdQ!D>Q>rr_@8#,U_es#bl4]DqmnM>mhB(B>'i!!';&rrU(<!;uj$9E5,>+pM]Zrs.X% !"p@R!3u.q"8r3"`.@rAs*t~> JcF'rrrCdQ!D>Q>rr_@8#,U_es#bl4]DqmnM>mhB(B>'i!!';&rrU(<!;uj$9E5,>+pM]Zrs.X% !"p@R!3u.q"8r3"`.@rAs*t~> JcF'rrrCdQ!D>Q>rr_@8#,U_es#bl4]DqmnM>mhB(B>'i!!';&rrU(<!;uj$9E5,>+pM]Zrs.X% !"p@R!3u.q"8r3"`.@rAs*t~> JcF'rrrCdQ!D>Q=rrhgW!I"A/s8P34s1A=24Gj(CCB.i@s-WjGrVlr:!!)rs"pP((s8Vu\rr34= !+Pj*R/f2<rri.e!!(i+s+LE&~> JcF'rrrCdQ!D>Q=rrhgW!I"A/s8P34s1A=24Gj(CCB.i@s-WjGrVlr:!!)rs"pP((s8Vu\rr34= !+Pj*R/f2<rri.e!!(i+s+LE&~> JcF'rrrCdQ!D>Q=rrhgW!I"A/s8P34s1A=24Gj(CCB.i@s-WjGrVlr:!!)rs"pP((s8Vu\rr34= !+Pj*R/f2<rri.e!!(i+s+LE&~> JcF'rrrCdQ!D>Q<rri18!'TN7s8P34s1A=24Gj(C*rmB5.jY0#rVlr:!!)rs"@<)ATBQ4Q#9Npf .k;nG#PJ*"IfKHhNIh+^s*t~> JcF'rrrCdQ!D>Q<rri18!'TN7s8P34s1A=24Gj(C*rmB5.jY0#rVlr:!!)rs"@<)ATBQ4Q#9Npf .k;nG#PJ*"IfKHhNIh+^s*t~> JcF'rrrCdQ!D>Q<rri18!'TN7s8P34s1A=24Gj(C*rmB5.jY0#rVlr:!!)rs"@<)ATBQ4Q#9Npf .k;nG#PJ*"IfKHhNIh+^s*t~> JcF'rrrCdQ!D>Q:rr]80(r#P?s#bl4]DqmnM>mPZqZ$TsrVlr:!!)rs#4?1=!!,4#rr2s%qZ$Ts p&>/[+ohgkJcCB&J,~> JcF'rrrCdQ!D>Q:rr]80(r#P?s#bl4]DqmnM>mPZqZ$TsrVlr:!!)rs#4?1=!!,4#rr2s%qZ$Ts p&>/[+ohgkJcCB&J,~> JcF'rrrCdQ!D>Q:rr]80(r#P?s#bl4]DqmnM>mPZqZ$TsrVlr:!!)rs#4?1=!!,4#rr2s%qZ$Ts p&>/[+ohgkJcCB&J,~> JcF'rrrCdQ!C]-3rrgq)"+'_5s8P34s1A=24Gj(>&cf64rrU(<!;c^&rQ/FI$0qQj&cf6*rr]2" !8iA-K`?Q~> JcF'rrrCdQ!C]-3rrgq)"+'_5s8P34s1A=24Gj(>&cf64rrU(<!;c^&rQ/FI$0qQj&cf6*rr]2" !8iA-K`?Q~> JcF'rrrCdQ!C]-3rrgq)"+'_5s8P34s1A=24Gj(>&cf64rrU(<!;c^&rQ/FI$0qQj&cf6*rr]2" !8iA-K`?Q~> JcF'rrrCdQs#f?A"SHO3.)kiYs#bl4]DqmnM>mfU!'0BFs7u!ZrrU(<!;uj/_YX<4gAh5ts8Pgo 3U?_Fq<RYP"8Vut`I\&Bs*t~> JcF'rrrCdQs#f?A"SHO3.)kiYs#bl4]DqmnM>mfU!'0BFs7u!ZrrU(<!;uj/_YX<4gAh5ts8Pgo 3U?_Fq<RYP"8Vut`I\&Bs*t~> JcF'rrrCdQs#f?A"SHO3.)kiYs#bl4]DqmnM>mfU!'0BFs7u!ZrrU(<!;uj/_YX<4gAh5ts8Pgo 3U?_Fq<RYP"8Vut`I\&Bs*t~> JcF'rrrCdQs#f9?"N)PfDY3Z&HorsJ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@-b?s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6 o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1KsGM>n(3#lk/W+9d8ps!oTC !!*!Ks8NZ2"sG;s!$V.;s3CuO"t(MsJ+EX>!!'ofs+LE&~> JcF'rrrCdQs#f9?"N)PfDY3Z&HorsJ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@-b?s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6 o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1KsGM>n(3#lk/W+9d8ps!oTC !!*!Ks8NZ2"sG;s!$V.;s3CuO"t(MsJ+EX>!!'ofs+LE&~> JcF'rrrCdQs#f9?"N)PfDY3Z&HorsJ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@-b?s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6 o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1KsGM>n(3#lk/W+9d8ps!oTC !!*!Ks8NZ2"sG;s!$V.;s3CuO"t(MsJ+EX>!!'ofs+LE&~> JcF'rrrCdQs#f6>"nm-C*iAr3s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4Ga"Cc:nlP&j*H"s7lZp rru(9"p5lVj8Ju^c:nlP&j*GjrrN3$^k)N=s*t~> JcF'rrrCdQs#f6>"nm-C*iAr3s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4Ga"Cc:nlP&j*H"s7lZp rru(9"p5lVj8Ju^c:nlP&j*GjrrN3$^k)N=s*t~> JcF'rrrCdQs#f6>"nm-C*iAr3s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4Ga"Cc:nlP&j*H"s7lZp rru(9"p5lVj8Ju^c:nlP&j*GjrrN3$^k)N=s*t~> JcF'rrrCdQs#f0<"O97435>:hs#bl4]DqmnJcF7"!YtcXJcCE'J,~> JcF'rrrCdQs#f0<"O97435>:hs#bl4]DqmnJcF7"!YtcXJcCE'J,~> JcF'rrrCdQs#f0<"O97435>:hs#bl4]DqmnJcF7"!YtcXJcCE'J,~> JcF'rrrCdQs#f*:"L0EV;:k^Fs#bl4]DqmnJcF7""De&<*L23ULAuc~> JcF'rrrCdQs#f*:"L0EV;:k^Fs#bl4]DqmnJcF7""De&<*L23ULAuc~> JcF'rrrCdQs#f*:"L0EV;:k^Fs#bl4]DqmnJcF7""De&<*L23ULAuc~> JcF'rrrCdQs#f'9"oFQ%"B`qIs8P34s1A=24G!O^rri(>*s7"Ds+^Q(~> JcF'rrrCdQs#f'9"oFQ%"B`qIs8P34s1A=24G!O^rri(>*s7"Ds+^Q(~> JcF'rrrCdQs#f'9"oFQ%"B`qIs8P34s1A=24G!O^rri(>*s7"Ds+^Q(~> JcF'rrrCdQ!Cf3)rsA=Y*rn^>s8P2DJcE@^s#bl4JcC<$eGk%~> JcF'rrrCdQ!Cf3)rsA=Y*rn^>s8P2DJcE@^s#bl4JcC<$eGk%~> JcF'rrrCdQ!Cf3)rsA=Y*rn^>s8P2DJcE@^s#bl4JcC<$eGk%~> JcF'rrrCdQ!D>Q,rs/Fr0E<ep3';cl]DqmnJcC<$JcF7"J,~> JcF'rrrCdQ!D>Q,rs/Fr0E<ep3';cl]DqmnJcC<$JcF7"J,~> JcF'rrrCdQ!D>Q,rs/Fr0E<ep3';cl]DqmnJcC<$JcF7"J,~> JcF'rrrCdQ!D>Q*rs/P57fi`,_#Aob^&S*pJcC<$g]%?+;!kdm!rd)8ao?k~> JcF'rrrCdQ!D>Q*rs/P57fi`,_#Aob^&S*pJcC<$g]%?+;!kdm!rd)8ao?k~> JcF'rrrCdQ!D>Q*rs/P57fi`,_#Aob^&S*pJcC<$g]%?+;!kdm!rd)8ao?k~> JcF'rrrCdQ!D>K%rs%F(#QQ*#d"253s8P34s53hXmuUAZrrEfcn,ERL<YPTLS*L"TmuUBArr^ab !2@"'"47ATT?@1a~> JcF'rrrCdQ!D>K%rs%F(#QQ*#d"253s8P34s53hXmuUAZrrEfcn,ERL<YPTLS*L"TmuUBArr^ab !2@"'"47ATT?@1a~> JcF'rrrCdQ!D>K%rs%F(#QQ*#d"253s8P34s53hXmuUAZrrEfcn,ERL<YPTLS*L"TmuUBArr^ab !2@"'"47ATT?@1a~> JcF'rrrCdQ!D>#ls8P1d_-dZO+E"gfJcEXfs#bl4hu<bq!!'h7#KTp0/P4elh"1OMr?hRI-6@g) rrU(<!;c]tm2uC_b5VV+E!cT_o)Afs!X-?_s*t~> JcF'rrrCdQ!D>#ls8P1d_-dZO+E"gfJcEXfs#bl4hu<bq!!'h7#KTp0/P4elh"1OMr?hRI-6@g) rrU(<!;c]tm2uC_b5VV+E!cT_o)Afs!X-?_s*t~> JcF'rrrCdQ!D>#ls8P1d_-dZO+E"gfJcEXfs#bl4hu<bq!!'h7#KTp0/P4elh"1OMr?hRI-6@g) rrU(<!;c]tm2uC_b5VV+E!cT_o)Afs!X-?_s*t~> JcF'rrrCdQ!E^r$s8P4]rs88!?kiYP=J+?!s2P*=4G!OirrU(<!5SU>NXQR>+q#$YoD\p@!!(.( rrU(<!;c]s?N<X?rrVM##Q=]'_t!a/FT<W[bl<1~> JcF'rrrCdQ!E^r$s8P4]rs88!?kiYP=J+?!s2P*=4G!OirrU(<!5SU>NXQR>+q#$YoD\p@!!(.( rrU(<!;c]s?N<X?rrVM##Q=]'_t!a/FT<W[bl<1~> JcF'rrrCdQ!E^r$s8P4]rs88!?kiYP=J+?!s2P*=4G!OirrU(<!5SU>NXQR>+q#$YoD\p@!!(.( rrU(<!;c]s?N<X?rrVM##Q=]'_t!a/FT<W[bl<1~> JcF'rrrCdQ!Epess8P4ZrsJ\AFsd7i)-2pIrIP!ls8P34s7H<q!!1Y9"rsH<rrq:_&I:4trr;co s8W*!"iLB?!!'q9rso)1ej'EZV#UGp$dq'>-+rmM"oo%Z3X$hBoD]!R/cYl7m.1/X_Z0]7rs.Oo -3j\uF7]D2"mg+J":R0es7lZorr^mT!nm/E"oo%Z3X$hBiVs,L#p,N8!5n@,"7m6-Q2CR_F9m$> s*t~> JcF'rrrCdQ!Epess8P4ZrsJ\AFsd7i)-2pIrIP!ls8P34s7H<q!!1Y9"rsH<rrq:_&I:4trr;co s8W*!"iLB?!!'q9rso)1ej'EZV#UGp$dq'>-+rmM"oo%Z3X$hBoD]!R/cYl7m.1/X_Z0]7rs.Oo -3j\uF7]D2"mg+J":R0es7lZorr^mT!nm/E"oo%Z3X$hBiVs,L#p,N8!5n@,"7m6-Q2CR_F9m$> s*t~> JcF'rrrCdQ!Epess8P4ZrsJ\AFsd7i)-2pIrIP!ls8P34s7H<q!!1Y9"rsH<rrq:_&I:4trr;co s8W*!"iLB?!!'q9rso)1ej'EZV#UGp$dq'>-+rmM"oo%Z3X$hBoD]!R/cYl7m.1/X_Z0]7rs.Oo -3j\uF7]D2"mg+J":R0es7lZorr^mT!nm/E"oo%Z3X$hBiVs,L#p,N8!5n@,"7m6-Q2CR_F9m$> s*t~> JcF'rrrCdQ!F6bos8P4VrsRe\B.3i]&4:E,b4U>cd/X,.JcGBBrr<cN"WIFFhuDdS!"p@R!3uS( .k;bC!<+MKs8N'&_uK`:!5ng9rr<NG"WIFFhu<ZX'atWR(Ame)#64f?$kNCSqt9soNXQR=+U\pY p&G%B![.ODr[\$K&@2?P-l)d_>Q=`j,ldul('+@6s!n-o!!*!Krr3%E!(l_\#64f?$kNCSqr.PY _YO33!5n=+!d=W$qu6^&!"%3UJ,~> JcF'rrrCdQ!F6bos8P4VrsRe\B.3i]&4:E,b4U>cd/X,.JcGBBrr<cN"WIFFhuDdS!"p@R!3uS( .k;bC!<+MKs8N'&_uK`:!5ng9rr<NG"WIFFhu<ZX'atWR(Ame)#64f?$kNCSqt9soNXQR=+U\pY p&G%B![.ODr[\$K&@2?P-l)d_>Q=`j,ldul('+@6s!n-o!!*!Krr3%E!(l_\#64f?$kNCSqr.PY _YO33!5n=+!d=W$qu6^&!"%3UJ,~> JcF'rrrCdQ!F6bos8P4VrsRe\B.3i]&4:E,b4U>cd/X,.JcGBBrr<cN"WIFFhuDdS!"p@R!3uS( .k;bC!<+MKs8N'&_uK`:!5ng9rr<NG"WIFFhu<ZX'atWR(Ame)#64f?$kNCSqt9soNXQR=+U\pY p&G%B![.ODr[\$K&@2?P-l)d_>Q=`j,ldul('+@6s!n-o!!*!Krr3%E!(l_\#64f?$kNCSqr.PY _YO33!5n=+!d=W$qu6^&!"%3UJ,~> JcF'rrrCdQ!GNV*rrBh5s8P4Rrsn=tEBOj5!!4EEI@\%*pq6V/n<fX5T`>$SU&P/Bn(.O=!"Kq! rA"A@s(_UDqu<&a2uWaX_Z0]7s8N'&_uK`:!5ng9rr<NIfDRH)RK!6e,3RVZ!7CK>rr<3HkLfh8 dImMEa&V@U8`!+pp&Fgfs8NYtl2Ue_<r`[/s)7r[g&M*#r;Qi9!!)or!]0n>nc/Uh"X<-_!!(F' s8N'!_sm[._Z0`.r;Qh?#BeSsJ,~> JcF'rrrCdQ!GNV*rrBh5s8P4Rrsn=tEBOj5!!4EEI@\%*pq6V/n<fX5T`>$SU&P/Bn(.O=!"Kq! rA"A@s(_UDqu<&a2uWaX_Z0]7s8N'&_uK`:!5ng9rr<NIfDRH)RK!6e,3RVZ!7CK>rr<3HkLfh8 dImMEa&V@U8`!+pp&Fgfs8NYtl2Ue_<r`[/s)7r[g&M*#r;Qi9!!)or!]0n>nc/Uh"X<-_!!(F' s8N'!_sm[._Z0`.r;Qh?#BeSsJ,~> JcF'rrrCdQ!GNV*rrBh5s8P4Rrsn=tEBOj5!!4EEI@\%*pq6V/n<fX5T`>$SU&P/Bn(.O=!"Kq! rA"A@s(_UDqu<&a2uWaX_Z0]7s8N'&_uK`:!5ng9rr<NIfDRH)RK!6e,3RVZ!7CK>rr<3HkLfh8 dImMEa&V@U8`!+pp&Fgfs8NYtl2Ue_<r`[/s)7r[g&M*#r;Qi9!!)or!]0n>nc/Uh"X<-_!!(F' s8N'!_sm[._Z0`.r;Qh?#BeSsJ,~> JcF'rrrCdQ!GN+qrriBf^]-DYn,ERN[>8!=#6"T1!?*t#F,-0a^!GX-aSuG3+ohTen=fm^4JDcW LCf")f`1sO%^,j3Puk-g*rmB5.jY0#rVlr:!!)rsrr<5?s8N'!_uB]9!"Q13s-6Zgrr<&)s8Duu `:a01!!T\.rVur:o)A_)/b&cA_Z0]6rsQq^3@kmF!<<'@!1Wc`!lG!<qu6^-!4_S!rr<5.s8Duu `:X*-/+ET=!!'q+rr_Zh!79!jJ,~> JcF'rrrCdQ!GN+qrriBf^]-DYn,ERN[>8!=#6"T1!?*t#F,-0a^!GX-aSuG3+ohTen=fm^4JDcW LCf")f`1sO%^,j3Puk-g*rmB5.jY0#rVlr:!!)rsrr<5?s8N'!_uB]9!"Q13s-6Zgrr<&)s8Duu `:a01!!T\.rVur:o)A_)/b&cA_Z0]6rsQq^3@kmF!<<'@!1Wc`!lG!<qu6^-!4_S!rr<5.s8Duu `:X*-/+ET=!!'q+rr_Zh!79!jJ,~> JcF'rrrCdQ!GN+qrriBf^]-DYn,ERN[>8!=#6"T1!?*t#F,-0a^!GX-aSuG3+ohTen=fm^4JDcW LCf")f`1sO%^,j3Puk-g*rmB5.jY0#rVlr:!!)rsrr<5?s8N'!_uB]9!"Q13s-6Zgrr<&)s8Duu `:a01!!T\.rVur:o)A_)/b&cA_Z0]6rsQq^3@kmF!<<'@!1Wc`!lG!<qu6^-!4_S!rr<5.s8Duu `:X*-/+ET=!!'q+rr_Zh!79!jJ,~> JcF'rrrCdQ!HJ_+rs&J]_4cBm?iC$,5V5+`rs8P^_kVls7jn`@!!rf@&KN&>/i,:KdR4'ar;Zhd U&Y-Tbl8p]jj_2[YH"@cQ\^HDGA(2\:I[<"/LW"p*>K4u$k*IK#6kD/"U+u.!"a\LgAh0Q!5n^6 !!W6"!!3&u!lG!<r;Zcs"iLB?!!'q9s8N'!_u'K6!!U:?rr<&:p&G$l"iLB?!!'porrU(<!;uit TE4ois8N-'!5J=/!lG!<qu6^"!5S.)rr<5?s8N'!_t=!,!:^$g!!'q+rr`,u!6EFbJ,~> JcF'rrrCdQ!HJ_+rs&J]_4cBm?iC$,5V5+`rs8P^_kVls7jn`@!!rf@&KN&>/i,:KdR4'ar;Zhd U&Y-Tbl8p]jj_2[YH"@cQ\^HDGA(2\:I[<"/LW"p*>K4u$k*IK#6kD/"U+u.!"a\LgAh0Q!5n^6 !!W6"!!3&u!lG!<r;Zcs"iLB?!!'q9s8N'!_u'K6!!U:?rr<&:p&G$l"iLB?!!'porrU(<!;uit TE4ois8N-'!5J=/!lG!<qu6^"!5S.)rr<5?s8N'!_t=!,!:^$g!!'q+rr`,u!6EFbJ,~> JcF'rrrCdQ!HJ_+rs&J]_4cBm?iC$,5V5+`rs8P^_kVls7jn`@!!rf@&KN&>/i,:KdR4'ar;Zhd U&Y-Tbl8p]jj_2[YH"@cQ\^HDGA(2\:I[<"/LW"p*>K4u$k*IK#6kD/"U+u.!"a\LgAh0Q!5n^6 !!W6"!!3&u!lG!<r;Zcs"iLB?!!'q9s8N'!_u'K6!!U:?rr<&:p&G$l"iLB?!!'porrU(<!;uit TE4ois8N-'!5J=/!lG!<qu6^"!5S.)rr<5?s8N'!_t=!,!:^$g!!'q+rr`,u!6EFbJ,~> JcF'rrrCdQ!Ik+-rri,-JOpLR!!36<,5qQD5V5+WrsneceAAG^NI,bZAn"b?;:%]2.K'5HR\Bc] 4P9ZAqVB#bMJcZl3[kpPi;ilY!!<-%r<*<.!rr<4J+)+krr<&:qu6^1!4)D""2b*=rr)ls!!U:? q#CE4rr;uu!5n^6rr<5?s8N'!_tF'0!!U:?rr<&:hu<bq!!)rs$l]1Zmf.V6!<<'4!1Wc`"2b*= rquct&ces%s8N'&_uK`:!5m[nrr<&:nG`UU!!(aNrrU#akgf]`~> JcF'rrrCdQ!Ik+-rri,-JOpLR!!36<,5qQD5V5+WrsneceAAG^NI,bZAn"b?;:%]2.K'5HR\Bc] 4P9ZAqVB#bMJcZl3[kpPi;ilY!!<-%r<*<.!rr<4J+)+krr<&:qu6^1!4)D""2b*=rr)ls!!U:? q#CE4rr;uu!5n^6rr<5?s8N'!_tF'0!!U:?rr<&:hu<bq!!)rs$l]1Zmf.V6!<<'4!1Wc`"2b*= rquct&ces%s8N'&_uK`:!5m[nrr<&:nG`UU!!(aNrrU#akgf]`~> JcF'rrrCdQ!Ik+-rri,-JOpLR!!36<,5qQD5V5+WrsneceAAG^NI,bZAn"b?;:%]2.K'5HR\Bc] 4P9ZAqVB#bMJcZl3[kpPi;ilY!!<-%r<*<.!rr<4J+)+krr<&:qu6^1!4)D""2b*=rr)ls!!U:? q#CE4rr;uu!5n^6rr<5?s8N'!_tF'0!!U:?rr<&:hu<bq!!)rs$l]1Zmf.V6!<<'4!1Wc`"2b*= rquct&ces%s8N'&_uK`:!5m[nrr<&:nG`UU!!(aNrrU#akgf]`~> JcF'rrrCdQ!fd9NjSondW`]f3"ugFj^"rPbrr>=!s#`E;rrqj8!!"54U&Y-ThZ!fWd%,2N,mF5I $kFR>794&GM3<3j2\,fe'FcH^@sa*$P%-!C!!b>_I%e!qjm_pB",@G;n(@[?!!'q6rs):!3U?_F q<S"Z&'P"Rd/X"CrsJh0s)A#=_uB]9!!'q6s8N'&_uK`:!5nL0rr<5?s8N'!_r(Iq_Z0]7rt#D8 V>nmd!!*'!;ZIoms8UXIrrpUH!7:cCrr3$`!-[o4rr<5?s8N'!_qtFn!!'q+rr]h4%/p/)"8rW. :=]Ap~> JcF'rrrCdQ!fd9NjSondW`]f3"ugFj^"rPbrr>=!s#`E;rrqj8!!"54U&Y-ThZ!fWd%,2N,mF5I $kFR>794&GM3<3j2\,fe'FcH^@sa*$P%-!C!!b>_I%e!qjm_pB",@G;n(@[?!!'q6rs):!3U?_F q<S"Z&'P"Rd/X"CrsJh0s)A#=_uB]9!!'q6s8N'&_uK`:!5nL0rr<5?s8N'!_r(Iq_Z0]7rt#D8 V>nmd!!*'!;ZIoms8UXIrrpUH!7:cCrr3$`!-[o4rr<5?s8N'!_qtFn!!'q+rr]h4%/p/)"8rW. :=]Ap~> JcF'rrrCdQ!fd9NjSondW`]f3"ugFj^"rPbrr>=!s#`E;rrqj8!!"54U&Y-ThZ!fWd%,2N,mF5I $kFR>794&GM3<3j2\,fe'FcH^@sa*$P%-!C!!b>_I%e!qjm_pB",@G;n(@[?!!'q6rs):!3U?_F q<S"Z&'P"Rd/X"CrsJh0s)A#=_uB]9!!'q6s8N'&_uK`:!5nL0rr<5?s8N'!_r(Iq_Z0]7rt#D8 V>nmd!!*'!;ZIoms8UXIrrpUH!7:cCrr3$`!-[o4rr<5?s8N'!_qtFn!!'q+rr]h4%/p/)"8rW. :=]Ap~> JcF'rrrCdQ!h98Mk5P\AEXr-tH,TLRrrBh5s8P3Srr_bYRdd!Ms#f<@%e[;P2@'9_%Q%==U;#:Q r;R,`P=,QS#<H^g_!M%"#lV/#!<u)XankB(!RpMgs8N'!_u'H=cNsRU-QiSBrVmE$%fcn`$NL-" !$=Z1$NS*Ds8N'!_u'K6!!U:?rr<&:p&G$l"iLB?!!'porrU(<!;uj.70!E7!ZM+>s8UOU!!4G^ !;uj#oa_$/-OTkQ",Hq%rpp*h!!U:?rr<&:iW&m!rr<*;+!:(R!b_R7qu6^U!"%3UJ,~> JcF'rrrCdQ!h98Mk5P\AEXr-tH,TLRrrBh5s8P3Srr_bYRdd!Ms#f<@%e[;P2@'9_%Q%==U;#:Q r;R,`P=,QS#<H^g_!M%"#lV/#!<u)XankB(!RpMgs8N'!_u'H=cNsRU-QiSBrVmE$%fcn`$NL-" !$=Z1$NS*Ds8N'!_u'K6!!U:?rr<&:p&G$l"iLB?!!'porrU(<!;uj.70!E7!ZM+>s8UOU!!4G^ !;uj#oa_$/-OTkQ",Hq%rpp*h!!U:?rr<&:iW&m!rr<*;+!:(R!b_R7qu6^U!"%3UJ,~> JcF'rrrCdQ!h98Mk5P\AEXr-tH,TLRrrBh5s8P3Srr_bYRdd!Ms#f<@%e[;P2@'9_%Q%==U;#:Q r;R,`P=,QS#<H^g_!M%"#lV/#!<u)XankB(!RpMgs8N'!_u'H=cNsRU-QiSBrVmE$%fcn`$NL-" !$=Z1$NS*Ds8N'!_u'K6!!U:?rr<&:p&G$l"iLB?!!'porrU(<!;uj.70!E7!ZM+>s8UOU!!4G^ !;uj#oa_$/-OTkQ",Hq%rpp*h!!U:?rr<&:iW&m!rr<*;+!:(R!b_R7qu6^U!"%3UJ,~> JcF'rrrCdQ!il=Nkl1h,9EGlOe+*J<4G!OEs8P4CrsA%\6j<W%8UR]"p\tNsZ:G#u4,ClNq>UW2 .f_Aun[ni$!!'q5rs$bC&HWS,Zi'h5^G,lu1B7C449Qh#7KC@*s8N'!_u'K6!!U:?rr<&:p&G$l "iLB?!!'porrU(<!;uj%iBme`Cq0NGrr3/O;A0*H;#C7q^G,lu1B.:Ul3RHio)J^i"iLB?!!'pq s7lZdrr_Bk!5n^6!oEtfec1.~> JcF'rrrCdQ!il=Nkl1h,9EGlOe+*J<4G!OEs8P4CrsA%\6j<W%8UR]"p\tNsZ:G#u4,ClNq>UW2 .f_Aun[ni$!!'q5rs$bC&HWS,Zi'h5^G,lu1B7C449Qh#7KC@*s8N'!_u'K6!!U:?rr<&:p&G$l "iLB?!!'porrU(<!;uj%iBme`Cq0NGrr3/O;A0*H;#C7q^G,lu1B.:Ul3RHio)J^i"iLB?!!'pq s7lZdrr_Bk!5n^6!oEtfec1.~> JcF'rrrCdQ!il=Nkl1h,9EGlOe+*J<4G!OEs8P4CrsA%\6j<W%8UR]"p\tNsZ:G#u4,ClNq>UW2 .f_Aun[ni$!!'q5rs$bC&HWS,Zi'h5^G,lu1B7C449Qh#7KC@*s8N'!_u'K6!!U:?rr<&:p&G$l "iLB?!!'porrU(<!;uj%iBme`Cq0NGrr3/O;A0*H;#C7q^G,lu1B.:Ul3RHio)J^i"iLB?!!'pq s7lZdrr_Bk!5n^6!oEtfec1.~> JcF'rrrCdQ!kA<MlMh%B=TKe<p@&%]4G!OEs8P4Frs8V69*GAYKZO)ars&:`*rn3glM(;]mSs6= ]n-3Wrr[oS)XOm3!`8qrqYpVm!)D)EJ,~> JcF'rrrCdQ!kA<MlMh%B=TKe<p@&%]4G!OEs8P4Frs8V69*GAYKZO)ars&:`*rn3glM(;]mSs6= ]n-3Wrr[oS)XOm3!`8qrqYpVm!)D)EJ,~> JcF'rrrCdQ!kA<MlMh%B=TKe<p@&%]4G!OEs8P4Frs8V69*GAYKZO)ars&:`*rn3glM(;]mSs6= ]n-3Wrr[oS)XOm3!`8qrqYpVm!)D)EJ,~> JcF'rrrCdQ!lk;Mm/I7dJHcgKq<e4^4G!OEs8P4Hrs&@k.KD/_j7<3QW[%UDcLq2?d3ApYqgnd? rri6d!'U"arr[`N+mf.,"I'T#%b0&/J,~> JcF'rrrCdQ!lk;Mm/I7dJHcgKq<e4^4G!OEs8P4Hrs&@k.KD/_j7<3QW[%UDcLq2?d3ApYqgnd? rri6d!'U"arr[`N+mf.,"I'T#%b0&/J,~> JcF'rrrCdQ!lk;Mm/I7dJHcgKq<e4^4G!OEs8P4Hrs&@k.KD/_j7<3QW[%UDcLq2?d3ApYqgnd? rri6d!'U"arr[`N+mf.,"I'T#%b0&/J,~> JcF'rrrCdQ!nI@MmJd=>1]V+Uli6uIJcE@^s#fWI"Lfi\9"siq"RT.g4id3p"2P?cb(9S`rr_dJ !1C@s"4.)fgACmPJeqVDeGk%~> JcF'rrrCdQ!nI@MmJd=>1]V+Uli6uIJcE@^s#fWI"Lfi\9"siq"RT.g4id3p"2P?cb(9S`rr_dJ !1C@s"4.)fgACmPJeqVDeGk%~> JcF'rrrCdQ!nI@MmJd=>1]V+Uli6uIJcE@^s#fWI"Lfi\9"siq"RT.g4id3p"2P?cb(9S`rr_dJ !1C@s"4.)fgACmPJeqVDeGk%~> JcF'rrrCdQ!p'ENmf*Bc#T:#6s8P34s1A=24RN.Omo'3@^[V7+`Z,8Frq-3maU]lbJcD5>!V;hi rrK7[ao?k~> JcF'rrrCdQ!p'ENmf*Bc#T:#6s8P34s1A=24RN.Omo'3@^[V7+`Z,8Frq-3maU]lbJcD5>!V;hi rrK7[ao?k~> JcF'rrrCdQ!p'ENmf*Bc#T:#6s8P34s1A=24RN.Omo'3@^[V7+`Z,8Frq-3maU]lbJcD5>!V;hi rrK7[ao?k~> JcF'rrrCdQ!rE%LnG`XjHN?G!kl:ZFJcE@^s#f`L"NMShOo=eL"1&=]eFW\BitWj#JcC<$PQ-.~> JcF'rrrCdQ!rE%LnG`XjHN?G!kl:ZFJcE@^s#f`L"NMShOo=eL"1&=]eFW\BitWj#JcC<$PQ-.~> JcF'rrrCdQ!rE%LnG`XjHN?G!kl:ZFJcE@^s#f`L"NMShOo=eL"1&=]eFW\BitWj#JcC<$PQ-.~> JcF'rrrCaP!?#M>rri4$!+u)js8P34s1A=24R`:PZjA&'n,EKg"Z>T:rr`0_&)2[8JcCo5J,~> JcF'rrrCaP!?#M>rri4$!+u)js8P34s1A=24R`:PZjA&'n,EKg"Z>T:rr`0_&)2[8JcCo5J,~> JcF'rrrCaP!?#M>rri4$!+u)js8P34s1A=24R`:PZjA&'n,EKg"Z>T:rr`0_&)2[8JcCo5J,~> JcF'rrrCaP!B!L?rr`*s!/]h;s#bl4]DqmnnG`Tj"uP]8rr^=H5P"CF!eLEN`r?0k!ubP.JcC<$ dJn^~> JcF'rrrCaP!B!L?rr`*s!/]h;s#bl4]DqmnnG`Tj"uP]8rr^=H5P"CF!eLEN`r?0k!ubP.JcC<$ dJn^~> JcF'rrrCaP!B!L?rr`*s!/]h;s#bl4]DqmnnG`Tj"uP]8rr^=H5P"CF!eLEN`r?0k!ubP.JcC<$ dJn^~> JcF'r!XJesgA_1M0_>;Hr)3WWjT#6BJcE@^s#fiO"3(O.naHJ[h%_4(o)AdN$=_!S"dL52!%e,# s+13us*t~> JcF'r!XJesgA_1M0_>;Hr)3WWjT#6BJcE@^s#fiO"3(O.naHJ[h%_4(o)AdN$=_!S"dL52!%e,# s+13us*t~> JcF'r!XJesgA_1M0_>;Hr)3WWjT#6BJcE@^s#fiO"3(O.naHJ[h%_4(o)AdN$=_!S"dL52!%e,# s+13us*t~> JcF'r"B#4db4+3d!GiMBrrQm7OQ6B@4G!OEs8P4Prr_9r-1LC'"8t=rg[Y:F>n?5<rr]A'!7l`$ JcF0uJ,~> JcF'r"B#4db4+3d!GiMBrrQm7OQ6B@4G!OEs8P4Prr_9r-1LC'"8t=rg[Y:F>n?5<rr]A'!7l`$ JcF0uJ,~> JcF'r"B#4db4+3d!GiMBrrQm7OQ6B@4G!OEs8P4Prr_9r-1LC'"8t=rg[Y:F>n?5<rr]A'!7l`$ JcF0uJ,~> JcF'r!S\Fe!!#[NrrRoTq"=XgPlQ'gs8P34s1A=24S&LR7M"5@rrSDbWq$)jeH(QErr`3"!5sHg JcF0uJ,~> JcF'r!S\Fe!!#[NrrRoTq"=XgPlQ'gs8P34s1A=24S&LR7M"5@rrSDbWq$)jeH(QErr`3"!5sHg JcF0uJ,~> JcF'r!S\Fe!!#[NrrRoTq"=XgPlQ'gs8P34s1A=24S&LR7M"5@rrSDbWq$)jeH(QErr`3"!5sHg JcF0uJ,~> JcF$q"7V@.&,cJ.9B#mPU&a!Brr]q::B'8Q!B`,g7(Yhf1-G1.!hfUemf*@K$rQNo!bE8E_>jN8 !5F*bJcF0uJ,~> JcF$q"7V@.&,cJ.9B#mPU&a!Brr]q::B'8Q!B`,g7(Yhf1-G1.!hfUemf*@K$rQNo!bE8E_>jN8 !5F*bJcF0uJ,~> JcF$q"7V@.&,cJ.9B#mPU&a!Brr]q::B'8Q!B`,g7(Yhf1-G1.!hfUemf*@K$rQNo!bE8E_>jN8 !5F*bJcF0uJ,~> JcF$q"3t[.$N0r)9B#mP]E#hCrr_U+/G8!%!B`,g7(Yhf1-G4/"8!<srpKdfB+F+prrVKmK>@Kh )ut!SJcC<$e,Op~> JcF$q"3t[.$N0r)9B#mP]E#hCrr_U+/G8!%!B`,g7(Yhf1-G4/"8!<srpKdfB+F+prrVKmK>@Kh )ut!SJcC<$e,Op~> JcF$q"3t[.$N0r)9B#mP]E#hCrr_U+/G8!%!B`,g7(Yhf1-G4/"8!<srpKdfB+F+prrVKmK>@Kh )ut!SJcC<$e,Op~> JcF'r!N#tq!!#[NrrV!VU\Oikr_<dLi;`g>JcE@^s#frR!fR98mf*@E"b?+B!eUgF_#FMI0E;*( s+14!s*t~> JcF'r!N#tq!!#[NrrV!VU\Oikr_<dLi;`g>JcE@^s#frR!fR98mf*@E"b?+B!eUgF_#FMI0E;*( s+14!s*t~> JcF'r!N#tq!!#[NrrV!VU\Oikr_<dLi;`g>JcE@^s#frR!fR98mf*@E"b?+B!eUgF_#FMI0E;*( s+14!s*t~> JcF'r">'V#g@a8$!rN7Lq#:Dg!1)OBs#bl4]Dqmnp&>*e(L-;,!au`3nG`M6>eg:@U_3_VJcC<$ e,Op~> JcF'r">'V#g@a8$!rN7Lq#:Dg!1)OBs#bl4]Dqmnp&>*e(L-;,!au`3nG`M6>eg:@U_3_VJcC<$ e,Op~> JcF'r">'V#g@a8$!rN7Lq#:Dg!1)OBs#bl4]Dqmnp&>*e(L-;,!au`3nG`M6>eg:@U_3_VJcC<$ e,Op~> JcF'rrrC^O!A%7HrrVO%7c+1F4G!OEs8P4SrrShofC&Y?mKnU:rrU@DZbQMA(BB\Ns+13us*t~> JcF'rrrC^O!A%7HrrVO%7c+1F4G!OEs8P4SrrShofC&Y?mKnU:rrU@DZbQMA(BB\Ns+13us*t~> JcF'rrrC^O!A%7HrrVO%7c+1F4G!OEs8P4SrrShofC&Y?mKnU:rrU@DZbQMA(BB\Ns+13us*t~> JcF'rrrC^O!DtKFrrQ^:gYVu14G!OEs8P4SrrG;LmJd6L#3kXW!d,(M^]4<6!5a<eJcF0uJ,~> JcF'rrrC^O!DtKFrrQ^:gYVu14G!OEs8P4SrrG;LmJd6L#3kXW!d,(M^]4<6!5a<eJcF0uJ,~> JcF'rrrC^O!DtKFrrQ^:gYVu14G!OEs8P4SrrG;LmJd6L#3kXW!d,(M^]4<6!5a<eJcF0uJ,~> JcF'rrrC^O!dY.Mqu6`C!J9/-s#bl4]DqmnpAY3K!Mf&^!@q.<rrF6M^An35!5jBfJcF0uJ,~> JcF'rrrC^O!dY.Mqu6`C!J9/-s#bl4]DqmnpAY3K!Mf&^!@q.<rrF6M^An35!5jBfJcF0uJ,~> JcF'rrrC^O!dY.Mqu6`C!J9/-s#bl4]DqmnpAY3K!Mf&^!@q.<rrF6M^An35!5jBfJcF0uJ,~> JcF'rrrC^O!iZ1Nqu6^g+8F[ls#c5>#HpZ8!s^)ciOT!g4SJdVJdD&;rrU7A\+'D!f)V_`rr`,u !6'NhJcF0uJ,~> JcF'rrrC^O!iZ1Nqu6^g+8F[ls#c5>#HpZ8!s^)ciOT!g4SJdVJdD&;rrU7A\+'D!f)V_`rr`,u !6'NhJcF0uJ,~> JcF'rrrC^O!iZ1Nqu6^g+8F[ls#c5>#HpZ8!s^)ciOT!g4SJdVJdD&;rrU7A\+'D!f)V_`rr`,u !6'NhJcF0uJ,~> JcF'rrrC^O!nmXNr;Qi4!2&'Hs#c5>!+5U'!>F5!s8P4TrrG&JmJd63&,G_p!gEcO^]+D4!!(c) s+13us*t~> JcF'rrrC^O!nmXNr;Qi4!2&'Hs#c5>!+5U'!>F5!s8P4TrrG&JmJd63&,G_p!gEcO^]+D4!!(c) s+13us*t~> JcF'rrrC^O!nmXNr;Qi4!2&'Hs#c5>!+5U'!>F5!s8P4TrrG&JmJd63&,G_p!gEcO^]+D4!!(c) s+13us*t~> JcF'rrrC^O!rWRMr;Qg^.fA*%s#c5>#`sM:^op**!,9%Es#g&U!pp&OmJd27=RZ7j:,'K`"I1/2 !&]?-JcF-tJ,~> JcF'rrrC^O!rWRMr;Qg^.fA*%s#c5>#`sM:^op**!,9%Es#g&U!pp&OmJd27=RZ7j:,'K`"I1/2 !&]?-JcF-tJ,~> JcF'rrrC^O!rWRMr;Qg^.fA*%s#c5>#`sM:^op**!,9%Es#g&U!pp&OmJd27=RZ7j:,'K`"I1/2 !&]?-JcF-tJ,~> JcF'rrrC[N!B`dKrrU4@WS@IQ4M1Xn!!\Y!3<g=IrRLoMmJm5X])Vdmp\t;n!8$Z=!nRFOnG`Rf% s5Ve"FgLk@-E1AJcF-tJ,~> JcF'rrrC[N!B`dKrrU4@WS@IQ4M1Xn!!\Y!3<g=IrRLoMmJm5X])Vdmp\t;n!8$Z=!nRFOnG`Rf% s5Ve"FgLk@-E1AJcF-tJ,~> JcF'rrrC[N!B`dKrrU4@WS@IQ4M1Xn!!\Y!3<g=IrRLoMmJm5X])Vdmp\t;n!8$Z=!nRFOnG`Rf% s5Ve"FgLk@-E1AJcF-tJ,~> JcF'rrrC[N!cehMrr3$t,lQKts#dpnrr<'e!rW*!M=U]A_sRI+gAh4e])Vdmp\t;5')q>!!fd?N nG`R<!3LhPJcCZ.J,~> JcF'rrrC[N!cehMrr3$t,lQKts#dpnrr<'e!rW*!M=U]A_sRI+gAh4e])Vdmp\t;5')q>!!fd?N nG`R<!3LhPJcCZ.J,~> JcF'rrrC[N!cehMrr3$t,lQKts#dpnrr<'e!rW*!M=U]A_sRI+gAh4e])Vdmp\t;5')q>!!fd?N nG`R<!3LhPJcCZ.J,~> JcF'rrrC[N#H\!Rs8UjUQ.l9<4M1Xm!!Ne"SH8d=o)JIbnc&j]_nME^!"RSks8P4UrrG)KmJd2` 0CSoBSH.W"s+13.s*t~> JcF'rrrC[N#H\!Rs8UjUQ.l9<4M1Xm!!Ne"SH8d=o)JIbnc&j]_nME^!"RSks8P4UrrG)KmJd2` 0CSoBSH.W"s+13.s*t~> JcF'rrrC[N#H\!Rs8UjUQ.l9<4M1Xm!!Ne"SH8d=o)JIbnc&j]_nME^!"RSks8P4UrrG)KmJd2` 0CSoBSH.W"s+13.s*t~> JcF'rrrC[N#Nu/Ss8R9Tp=fQH4M1Xn!!WM7s8OnU"nM]g!:g'hYPeG%$*(Q9s#g)V!r3+Nmf*@f 'Q!7<!GN@$s+13-s*t~> JcF'rrrC[N#Nu/Ss8R9Tp=fQH4M1Xn!!WM7s8OnU"nM]g!:g'hYPeG%$*(Q9s#g)V!r3+Nmf*@f 'Q!7<!GN@$s+13-s*t~> JcF'rrrC[N#Nu/Ss8R9Tp=fQH4M1Xn!!WM7s8OnU"nM]g!:g'hYPeG%$*(Q9s#g)V!r3+Nmf*@f 'Q!7<!GN@$s+13-s*t~> JcF'rrrCXM"XI@QqA4#%s8P3ns8N'!5lUcb6N@,>rrB8"!!-*q]Dqmnq#:ED!3GVg!n@:Mn,EDF 9@NnDIfgTrjamG_s1SG_~> JcF'rrrCXM"XI@QqA4#%s8P3ns8N'!5lUcb6N@,>rrB8"!!-*q]Dqmnq#:ED!3GVg!n@:Mn,EDF 9@NnDIfgTrjamG_s1SG_~> JcF'rrrCXM"XI@QqA4#%s8P3ns8N'!5lUcb6N@,>rrB8"!!-*q]Dqmnq#:ED!3GVg!n@:Mn,EDF 9@NnDIfgTrjamG_s1SG_~> JcF'rrrCXM"_&PQX8p]%s8P3ns8N'!6iR)e6N@,Ws7jM#rs&Gg\3'`kLV*Td4S\pXWW:Q:rrSYi j7*'MqZ_MurrnZ2!!"SLJcC<$^Ai]~> JcF'rrrCXM"_&PQX8p]%s8P3ns8N'!6iR)e6N@,Ws7jM#rs&Gg\3'`kLV*Td4S\pXWW:Q:rrSYi j7*'MqZ_MurrnZ2!!"SLJcC<$^Ai]~> JcF'rrrCXM"_&PQX8p]%s8P3ns8N'!6iR)e6N@,Ws7jM#rs&Gg\3'`kLV*Td4S\pXWW:Q:rrSYi j7*'MqZ_MurrnZ2!!"SLJcC<$^Ai]~> JcF'rrrCXM"K;CP9/YB%s#dpnrr<$drr3$e!!)Tip]0[\"76'g9"Y-'4S\pXJcto;rrHpNn,EI@ !2n6E"0DP'eq*jPs1\M`~> JcF'rrrCXM"K;CP9/YB%s#dpnrr<$drr3$e!!)Tip]0[\"76'g9"Y-'4S\pXJcto;rrHpNn,EI@ !2n6E"0DP'eq*jPs1\M`~> JcF'rrrCXM"K;CP9/YB%s#dpnrr<$drr3$e!!)Tip]0[\"76'g9"Y-'4S\pXJcto;rrHpNn,EI@ !2n6E"0DP'eq*jPs1\M`~> JcF'rrrCXM"RQ;F"cV+6s#dpnrr<$drr3$e!!)Tip]0[\"3plH?G$7;4S\pW=XEJ8!B`d=rrTA( dF%srr;Zi9JcC<$^Ai]~> JcF'rrrCXM"RQ;F"cV+6s#dpnrr<$drr3$e!!)Tip]0[\"3plH?G$7;4S\pW=XEJ8!B`d=rrTA( dF%srr;Zi9JcC<$^Ai]~> JcF'rrrCXM"RQ;F"cV+6s#dpnrr<$drr3$e!!)Tip]0[\"3plH?G$7;4S\pW=XEJ8!B`d=rrTA( dF%srr;Zi9JcC<$^Ai]~> JcF'rrrCUL"#hb3iRn214M1Xn!!#CcrrPOf!8@GZQ*A$?[!rej!4KN>s#g)V!BN[;rrW0/F79,1 L'.1ss8N'!^OcE9s1\M`~> JcF'rrrCUL"#hb3iRn214M1Xn!!#CcrrPOf!8@GZQ*A$?[!rej!4KN>s#g)V!BN[;rrW0/F79,1 L'.1ss8N'!^OcE9s1\M`~> JcF'rrrCUL"#hb3iRn214M1Xn!!#CcrrPOf!8@GZQ*A$?[!rej!4KN>s#g)V!BN[;rrW0/F79,1 L'.1ss8N'!^OcE9s1\M`~> JcF'rrrCUL!e181fDkk5]Dqm2!(6bc!^cqfgAh!L!<[tcs8P4VrrF-Lmf*@C!2Ar^!F-kqrrX5@ EVY1cJcELbJ,~> JcF'rrrCUL!e181fDkk5]Dqm2!(6bc!^cqfgAh!L!<[tcs8P4VrrF-Lmf*@C!2Ar^!F-kqrrX5@ EVY1cJcELbJ,~> JcF'rrrCUL!e181fDkk5]Dqm2!(6bc!^cqfgAh!L!<[tcs8P4VrrF-Lmf*@C!2Ar^!F-kqrrX5@ EVY1cJcELbJ,~> JcF'rrrCUL!lt@FfDkk5]Dqm2!(6bc!^cqfgA_Bm!!!-61iq6Ys8P4WrrW'"JF<F=ZN/5<rrFuN ci4*X0E;*(s+13bs*t~> JcF'rrrCUL!lt@FfDkk5]Dqm2!(6bc!^cqfgA_Bm!!!-61iq6Ys8P4WrrW'"JF<F=ZN/5<rrFuN ci4*X0E;*(s+13bs*t~> JcF'rrrCUL!lt@FfDkk5]Dqm2!(6bc!^cqfgA_Bm!!!-61iq6Ys8P4WrrW'"JF<F=ZN/5<rrFuN ci4*X0E;*(s+13bs*t~> JcF'rrrCUL!jr"ufDkk5JcE@^s#g,W!oX-Nmf*?M!:TCV!>B:qrr]&0![iR!JcELbJ,~> JcF'rrrCUL!jr"ufDkk5JcE@^s#g,W!oX-Nmf*?M!:TCV!>B:qrr]&0![iR!JcELbJ,~> JcF'rrrCUL!jr"ufDkk5JcE@^s#g,W!oX-Nmf*?M!:TCV!>B:qrr]&0![iR!JcELbJ,~> JcF'rrrCUL")eJTpt5WH4G!OEs8P4WrrU=C[-mqpCD?7;!qQDMci4%_!0i'7JcEIaJ,~> JcF'rrrCUL")eJTpt5WH4G!OEs8P4WrrU=C[-mqpCD?7;!qQDMci4%_!0i'7JcEIaJ,~> JcF'rrrCUL")eJTpt5WH4G!OEs8P4WrrU=C[-mqpCD?7;!qQDMci4%_!0i'7JcEIaJ,~> JcF'rrrCUL""Hb?Z.T*V4G!OEs8P4WrrTV/amT0083-/=!n74Nci="F!5a<eJcEIaJ,~> JcF'rrrCUL""Hb?Z.T*V4G!OEs8P4WrrTV/amT0083-/=!n74Nci="F!5a<eJcEIaJ,~> JcF'rrrCUL""Hb?Z.T*V4G!OEs8P4WrrTV/amT0083-/=!n74Nci="F!5a<eJcEIaJ,~> JcF'rrrCXM"QBEO/6(:%s#bl4]Dqmnq>UMh!8R#B!@(h;rrTP-aj:"e!!'ofs+13as*t~> JcF'rrrCXM"QBEO/6(:%s#bl4]Dqmnq>UMh!8R#B!@(h;rrTP-aj:"e!!'ofs+13as*t~> JcF'rrrCXM"QBEO/6(:%s#bl4]Dqmnq>UMh!8R#B!@(h;rrTP-aj:"e!!'ofs+13as*t~> JcF'rrrCXM"e>YPNX"e%s8P34s1A=24Sf!YNWAY=rrW0(Hggt9PlU*rrr`,u!6'NhJcEIaJ,~> JcF'rrrCXM"e>YPNX"e%s8P34s1A=24Sf!YNWAY=rrW0(Hggt9PlU*rrr`,u!6'NhJcEIaJ,~> JcF'rrrCXM"e>YPNX"e%s8P34s1A=24Sf!YNWAY=rrW0(Hggt9PlU*rrr`,u!6'NhJcEIaJ,~> JcF'rrrCXM"]m/QlNW@%s8P34s1A=24Sf!XHNW^9!pBWMn,EE5#g`MQV#UMMJcC<$^Ai]~> JcF'rrrCXM"]m/QlNW@%s8P34s1A=24Sf!XHNW^9!pBWMn,EE5#g`MQV#UMMJcC<$^Ai]~> JcF'rrrCXM"]m/QlNW@%s8P34s1A=24Sf!XHNW^9!pBWMn,EE5#g`MQV#UMMJcC<$^Ai]~> JcF'rrrCXM"WV(Qs&CQ%s8P34s1A=24Sf!XE"DC:!mL_Mn,EDr,16DnPp-2.21bdYs1SG_~> JcF'rrrCXM"WV(Qs&CQ%s8P34s1A=24Sf!XE"DC:!mL_Mn,EDr,16DnPp-2.21bdYs1SG_~> JcF'rrrCXM"WV(Qs&CQ%s8P34s1A=24Sf!XE"DC:!mL_Mn,EDr,16DnPp-2.21bdYs1SG_~> JcF'rrrC[N#O)5Ss8TY1]\<Dc4G!OEs8P4WrrHaOmf*?p!6aj2!C\uqrrdfR).;ZZs+13`s*t~> JcF'rrrC[N#O)5Ss8TY1]\<Dc4G!OEs8P4WrrHaOmf*?p!6aj2!C\uqrrdfR).;ZZs+13`s*t~> JcF'rrrC[N#O)5Ss8TY1]\<Dc4G!OEs8P4WrrHaOmf*?p!6aj2!C\uqrrdfR).;ZZs+13`s*t~> JcF'rrrC[N#IXWRs8W'L8)""C4G!OEs8P4WrrH:Lmf*?U!9`hN!A@?%s+13+s*t~> JcF'rrrC[N#IXWRs8W'L8)""C4G!OEs8P4WrrH:Lmf*?U!9`hN!A@?%s+13+s*t~> JcF'rrrC[N#IXWRs8W'L8)""C4G!OEs8P4WrrH:Lmf*?U!9`hN!A@?%s+13+s*t~> JcF'rrrC[N!eUXMrr3%n!Rog'HorsJ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@-b?s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6 o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1KsGq>UIj0CJiAIK]W<rrEmM JcC<$M#Vu~> JcF'rrrC[N!eUXMrr3%n!Rog'HorsJ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@-b?s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6 o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1KsGq>UIj0CJiAIK]W<rrEmM JcC<$M#Vu~> JcF'rrrC[N!eUXMrr3%n!Rog'HorsJ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@-b?s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6 o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1KsGq>UIj0CJiAIK]W<rrEmM JcC<$M#Vu~> JcF'rrrC[N!DtNKrrW!6?JGL-4=lo6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H ]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lR8!5P]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]du;ArrGPNmf*<%([qA*qZ28! s+13+s*t~> JcF'rrrC[N!DtNKrrW!6?JGL-4=lo6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H ]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lR8!5P]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]du;ArrGPNmf*<%([qA*qZ28! s+13+s*t~> JcF'rrrC[N!DtNKrrW!6?JGL-4=lo6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H ]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lR8!5P]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]du;ArrGPNmf*<%([qA*qZ28! s+13+s*t~> JcF'rrrC[N!?P\IrrS)]g>)`.4G!OEs8P4WrrG2Omf*;f.I[9<joCp&s+13+s*t~> JcF'rrrC[N!?P\IrrS)]g>)`.4G!OEs8P4WrrG2Omf*;f.I[9<joCp&s+13+s*t~> JcF'rrrC[N!?P\IrrS)]g>)`.4G!OEs8P4WrrG2Omf*;f.I[9<joCp&s+13+s*t~> JcF'rrrC^O!p]iNr;Qig'Na)is#bl4]Dqmnq>UII;==Gb69jr=!mq"MJcC<$M#Vu~> JcF'rrrC^O!p]iNr;Qig'Na)is#bl4]Dqmnq>UII;==Gb69jr=!mq"MJcC<$M#Vu~> JcF'rrrC^O!p]iNr;Qig'Na)is#bl4]Dqmnq>UII;==Gb69jr=!mq"MJcC<$M#Vu~> JcGNF!p=RunG`RMFSYD*rrC^O!kSHNqu6_Z!RBO$s#bl4]Dqmnq>UI>>42Ck/lM0<!knZLJcC<$ M#Vu~> JcGNF!p=RunG`RMFSYD*rrC^O!kSHNqu6_Z!RBO$s#bl4]Dqmnq>UI>>42Ck/lM0<!knZLJcC<$ M#Vu~> JcGNF!p=RunG`RMFSYD*rrC^O!kSHNqu6_Z!RBO$s#bl4]Dqmnq>UI>>42Ck/lM0<!knZLJcC<$ M#Vu~> [f6Qa?QTFW-)9Q$!T1ZWrr_7(!*\pm"S3l=6h^$LrrC^O!g`oNqu6`m+%Y5fs#bl4]Dqmnq>UI5 C$u!%).`49!j)INJcC<$M#Vu~> [f6Qa?QTFW-)9Q$!T1ZWrr_7(!*\pm"S3l=6h^$LrrC^O!g`oNqu6`m+%Y5fs#bl4]Dqmnq>UI5 C$u!%).`49!j)INJcC<$M#Vu~> [f6Qa?QTFW-)9Q$!T1ZWrr_7(!*\pm"S3l=6h^$LrrC^O!g`oNqu6`m+%Y5fs#bl4]Dqmnq>UI5 C$u!%).`49!j)INJcC<$M#Vu~> hu<oV!o*b8!9a7Z#.$`0"!219mJd46%/^)*J*$\3*rn[orrha9!#3l\rs,_u(]t!gC#Ssh"HEH^ 8cA2ZrrC^O!HSbHrrSem\)./b4G!OEs8P4WrrEXLmf*:mGjkY6RfMQ$s+13+s*t~> hu<oV!o*b8!9a7Z#.$`0"!219mJd46%/^)*J*$\3*rn[orrha9!#3l\rs,_u(]t!gC#Ssh"HEH^ 8cA2ZrrC^O!HSbHrrSem\)./b4G!OEs8P4WrrEXLmf*:mGjkY6RfMQ$s+13+s*t~> hu<oV!o*b8!9a7Z#.$`0"!219mJd46%/^)*J*$\3*rn[orrha9!#3l\rs,_u(]t!gC#Ssh"HEH^ 8cA2ZrrC^O!HSbHrrSem\)./b4G!OEs8P4WrrEXLmf*:mGjkY6RfMQ$s+13+s*t~> hu<o8!Vuc6#lac%#_="ro'M\L&C0_D#>5$s=Lc&>^ubUr!!#CPrrYgm"i^H?!+5U'!>F5brr[?C !.FD;rrC^O!DY?Err`0R,PU*qs#bl4]Dqmnq>UI+GjkY6q#H3=rrS#WpOW?qs+p]*~> hu<o8!Vuc6#lac%#_="ro'M\L&C0_D#>5$s=Lc&>^ubUr!!#CPrrYgm"i^H?!+5U'!>F5brr[?C !.FD;rrC^O!DY?Err`0R,PU*qs#bl4]Dqmnq>UI+GjkY6q#H3=rrS#WpOW?qs+p]*~> hu<o8!Vuc6#lac%#_="ro'M\L&C0_D#>5$s=Lc&>^ubUr!!#CPrrYgm"i^H?!+5U'!>F5brr[?C !.FD;rrC^O!DY?Err`0R,PU*qs#bl4]Dqmnq>UI+GjkY6q#H3=rrS#WpOW?qs+p]*~> hu<kl)ZTi6-iEuGcj\e0rrSSg2t$\J%fdjRiW&oX!(6,Q"/#VoLA_&WOFF:HY<r9iC&@o5q_J3T ddmG<!8.;P.TZ?E!m(LjhuE^=JcE@^s#g,W!==#>rrVQfPOJMPFU<X!JcCN*J,~> hu<kl)ZTi6-iEuGcj\e0rrSSg2t$\J%fdjRiW&oX!(6,Q"/#VoLA_&WOFF:HY<r9iC&@o5q_J3T ddmG<!8.;P.TZ?E!m(LjhuE^=JcE@^s#g,W!==#>rrVQfPOJMPFU<X!JcCN*J,~> hu<kl)ZTi6-iEuGcj\e0rrSSg2t$\J%fdjRiW&oX!(6,Q"/#VoLA_&WOFF:HY<r9iC&@o5q_J3T ddmG<!8.;P.TZ?E!m(LjhuE^=JcE@^s#g,W!==#>rrVQfPOJMPFU<X!JcCN*J,~> hu<kL3WK,68,WAfG@g^P"7Q9jo^Dh[!!#C`rs8@_9,n-@+^`n"rs%4m,R4Gh7K3>]!:g'lqAoV[ q=jmkmJm5XqYpZ8!!#pfs8N)PrrW-)H2%=?C'WAKs8P34s1A=24Sf!X!-mu4!oX-On,EDu)hJ$? s+gW)~> hu<kL3WK,68,WAfG@g^P"7Q9jo^Dh[!!#C`rs8@_9,n-@+^`n"rs%4m,R4Gh7K3>]!:g'lqAoV[ q=jmkmJm5XqYpZ8!!#pfs8N)PrrW-)H2%=?C'WAKs8P34s1A=24Sf!X!-mu4!oX-On,EDu)hJ$? s+gW)~> hu<kL3WK,68,WAfG@g^P"7Q9jo^Dh[!!#C`rs8@_9,n-@+^`n"rs%4m,R4Gh7K3>]!:g'lqAoV[ q=jmkmJm5XqYpZ8!!#pfs8N)PrrW-)H2%=?C'WAKs8P34s1A=24Sf!X!-mu4!oX-On,EDu)hJ$? s+gW)~> hu<k,=TAD6BDhc1gYVl."7Q9qr:9me_uB]:2#Y>lrrC[I!!*P]rr3#!$2X`%s7ZN`rr]D(!0?jR "5<eUB_hZ12uj$Co`#!;!$g1s!oX-Mp\t?a(chNQs8P34s1A=24Sf!X!.F>9!n..Ln,EDk.=qMM s+gW)~> hu<k,=TAD6BDhc1gYVl."7Q9qr:9me_uB]:2#Y>lrrC[I!!*P]rr3#!$2X`%s7ZN`rr]D(!0?jR "5<eUB_hZ12uj$Co`#!;!$g1s!oX-Mp\t?a(chNQs8P34s1A=24Sf!X!.F>9!n..Ln,EDk.=qMM s+gW)~> hu<k,=TAD6BDhc1gYVl."7Q9qr:9me_uB]:2#Y>lrrC[I!!*P]rr3#!$2X`%s7ZN`rr]D(!0?jR "5<eUB_hZ12uj$Co`#!;!$g1s!oX-Mp\t?a(chNQs8P34s1A=24Sf!X!.F>9!n..Ln,EDk.=qMM s+gW)~> iW&WPp\t;]!,D'(pAk6n']3)X[D8Xg!!$m9s4.DT#BmYhPY1rTrkna9!&XYlnc&\s!!)'Urs.r/ ^6U#E%bCIU"-<K_SFumakpHIbg&D,f!5eI0!iuBPiW&p?JcE@^s#g,W!<@oDrrU4@[I=+r9/M5" JcCN*J,~> iW&WPp\t;]!,D'(pAk6n']3)X[D8Xg!!$m9s4.DT#BmYhPY1rTrkna9!&XYlnc&\s!!)'Urs.r/ ^6U#E%bCIU"-<K_SFumakpHIbg&D,f!5eI0!iuBPiW&p?JcE@^s#g,W!<@oDrrU4@[I=+r9/M5" JcCN*J,~> iW&WPp\t;]!,D'(pAk6n']3)X[D8Xg!!$m9s4.DT#BmYhPY1rTrkna9!&XYlnc&\s!!)'Urs.r/ ^6U#E%bCIU"-<K_SFumakpHIbg&D,f!5eI0!iuBPiW&p?JcE@^s#g,W!<@oDrrU4@[I=+r9/M5" JcCN*J,~> hu<j)V#UH9Yk\5%qr!YF?MF!ipAk$h$)%>!8H8]t!!'4rs8N'!6gamT.0(@`rrB8$!!*D+q#:HA !!$d.rrr.b*WRqig&D,H!8[>J!b2>PirB$@JcE@^s#g/X!rDtQn,EI%!5n:*s$))7JcCN*J,~> hu<j)V#UH9Yk\5%qr!YF?MF!ipAk$h$)%>!8H8]t!!'4rs8N'!6gamT.0(@`rrB8$!!*D+q#:HA !!$d.rrr.b*WRqig&D,H!8[>J!b2>PirB$@JcE@^s#g/X!rDtQn,EI%!5n:*s$))7JcCN*J,~> hu<j)V#UH9Yk\5%qr!YF?MF!ipAk$h$)%>!8H8]t!!'4rs8N'!6gamT.0(@`rrB8$!!*D+q#:HA !!$d.rrr.b*WRqig&D,H!8[>J!b2>PirB$@JcE@^s#g/X!rDtQn,EI%!5n:*s$))7JcCN*J,~> hu<if^An09b5)&@QN.!d?et,Lrr<$dqYpZTD^u4o!!Pairu;"_p&G$l!(6/R!Y#,jq>UGuqZ$Xs q>1*nnGiPcq>UZdK,+Fe53gf#!f6pNp&>-d-6Vj=s8P3Srr_bXRIHmLs#g/X!q62Fn,EHo!7:37 !AmH#s+13*s*t~> hu<if^An09b5)&@QN.!d?et,Lrr<$dqYpZTD^u4o!!Pairu;"_p&G$l!(6/R!Y#,jq>UGuqZ$Xs q>1*nnGiPcq>UZdK,+Fe53gf#!f6pNp&>-d-6Vj=s8P3Srr_bXRIHmLs#g/X!q62Fn,EHo!7:37 !AmH#s+13*s*t~> hu<if^An09b5)&@QN.!d?et,Lrr<$dqYpZTD^u4o!!Pairu;"_p&G$l!(6/R!Y#,jq>UGuqZ$Xs q>1*nnGiPcq>UZdK,+Fe53gf#!f6pNp&>-d-6Vj=s8P3Srr_bXRIHmLs#g/X!q62Fn,EHo!7:37 !AmH#s+13*s*t~> i;X#Q!8.>8!9EnS"Rs6$"G?.Brr<$dqu6]7$i0i,6i[/i!'g/Vrr<$dmJd4i!'g5X#6!nu49,A: qYpZp!!#Ufrs/4A$ig8`Vu50H!HAV@rr^FK;#]PUs#d"T"n!Q7!$^p+s8P4XrrVZiMXUQHV#]9= rrFQNJcC<$L];l~> i;X#Q!8.>8!9EnS"Rs6$"G?.Brr<$dqu6]7$i0i,6i[/i!'g/Vrr<$dmJd4i!'g5X#6!nu49,A: qYpZp!!#Ufrs/4A$ig8`Vu50H!HAV@rr^FK;#]PUs#d"T"n!Q7!$^p+s8P4XrrVZiMXUQHV#]9= rrFQNJcC<$L];l~> i;X#Q!8.>8!9EnS"Rs6$"G?.Brr<$dqu6]7$i0i,6i[/i!'g/Vrr<$dmJd4i!'g5X#6!nu49,A: qYpZp!!#Ufrs/4A$ig8`Vu50H!HAV@rr^FK;#]PUs#d"T"n!Q7!$^p+s8P4XrrVZiMXUQHV#]9= rrFQNJcC<$L];l~> i;X#9!:p07!rV`k"9)7"Rd^:V!!#C`rsggb!HP]fJ,fR:s8NZ2,5)!9!!#CRrrNc4/bK&Fm/R,Y qYpZb!!$1!rrbOd!(joSrrH7Lo)AcT!.*`+s#d"T!1<]b!%FU0rt,/t!(Qrf"&JtQ@/OU:C&E/` Jr#ARRAaWrWPm6Dn+6P[*b0d$JcCN*J,~> i;X#9!:p07!rV`k"9)7"Rd^:V!!#C`rsggb!HP]fJ,fR:s8NZ2,5)!9!!#CRrrNc4/bK&Fm/R,Y qYpZb!!$1!rrbOd!(joSrrH7Lo)AcT!.*`+s#d"T!1<]b!%FU0rt,/t!(Qrf"&JtQ@/OU:C&E/` Jr#ARRAaWrWPm6Dn+6P[*b0d$JcCN*J,~> i;X#9!:p07!rV`k"9)7"Rd^:V!!#C`rsggb!HP]fJ,fR:s8NZ2,5)!9!!#CRrrNc4/bK&Fm/R,Y qYpZb!!$1!rrbOd!(joSrrH7Lo)AcT!.*`+s#d"T!1<]b!%FU0rt,/t!(Qrf"&JtQ@/OU:C&E/` Jr#ARRAaWrWPm6Dn+6P[*b0d$JcCN*J,~> irA`Qp&>*:!%%+6rr<$dqu6^$!&jiV$%)^Q6i[0T!!'4rrrN9&0CAcA2#mmWp&>->!!$@%rr^4? !.k%I"?ukd7_[CP!CB$@rrQj7V<.aW4JDcTRf*3d.A900&-+lj1BJa#'`K9V)uC3I!V-3s%im2d >^)=5a5m7"!=s(!s+13*s*t~> irA`Qp&>*:!%%+6rr<$dqu6^$!&jiV$%)^Q6i[0T!!'4rrrN9&0CAcA2#mmWp&>->!!$@%rr^4? !.k%I"?ukd7_[CP!CB$@rrQj7V<.aW4JDcTRf*3d.A900&-+lj1BJa#'`K9V)uC3I!V-3s%im2d >^)=5a5m7"!=s(!s+13*s*t~> irA`Qp&>*:!%%+6rr<$dqu6^$!&jiV$%)^Q6i[0T!!'4rrrN9&0CAcA2#mmWp&>->!!$@%rr^4? !.k%I"?ukd7_[CP!CB$@rrQj7V<.aW4JDcTRf*3d.A900&-+lj1BJa#'`K9V)uC3I!V-3s%im2d >^)=5a5m7"!=s(!s+13*s*t~> i;WtC4TGG58GrJhhdt.2rrV9^#4MTl!!#C`rrj>A#ai)'rW!<ns8T5%!!d\W]95kbrrsPF!.r"p NUd#NDu]mMqu6tfYeS&^Ih_q`[eg"+JcGebqu6ooGRXWQ1T10&rrFNKnc&^e641frs8P3Trrqj8 !!"54U&Y-TqYpWU!1*9W')1h]h;)cFa1JCBNdu.[<B_Z7r;[!45]?g6q18Qss+p]*~> i;WtC4TGG58GrJhhdt.2rrV9^#4MTl!!#C`rrj>A#ai)'rW!<ns8T5%!!d\W]95kbrrsPF!.r"p NUd#NDu]mMqu6tfYeS&^Ih_q`[eg"+JcGebqu6ooGRXWQ1T10&rrFNKnc&^e641frs8P3Trrqj8 !!"54U&Y-TqYpWU!1*9W')1h]h;)cFa1JCBNdu.[<B_Z7r;[!45]?g6q18Qss+p]*~> i;WtC4TGG58GrJhhdt.2rrV9^#4MTl!!#C`rrj>A#ai)'rW!<ns8T5%!!d\W]95kbrrsPF!.r"p NUd#NDu]mMqu6tfYeS&^Ih_q`[eg"+JcGebqu6ooGRXWQ1T10&rrFNKnc&^e641frs8P3Trrqj8 !!"54U&Y-TqYpWU!1*9W')1h]h;)cFa1JCBNdu.[<B_Z7r;[!45]?g6q18Qss+p]*~> i;Wsu?2sq4CAe)5M?$!?rrTM,0(8i?!!#C`rr@HE!!?'u!(6bc!,_Q4qu6YLqZ-0d"3(<@>5S?r !!*1SqYp]t,QJb]q>UZdKbsdi4mL]"!>08>rr_O3(";@Gs#ctS"7V_In=]g]4So'Zi;f24rrI3N p&>Hee$YZa5S*nq$;$<=JcC<$MuS;~> i;Wsu?2sq4CAe)5M?$!?rrTM,0(8i?!!#C`rr@HE!!?'u!(6bc!,_Q4qu6YLqZ-0d"3(<@>5S?r !!*1SqYp]t,QJb]q>UZdKbsdi4mL]"!>08>rr_O3(";@Gs#ctS"7V_In=]g]4So'Zi;f24rrI3N p&>Hee$YZa5S*nq$;$<=JcC<$MuS;~> i;Wsu?2sq4CAe)5M?$!?rrTM,0(8i?!!#C`rr@HE!!?'u!(6bc!,_Q4qu6YLqZ-0d"3(<@>5S?r !!*1SqYp]t,QJb]q>UZdKbsdi4mL]"!>08>rr_O3(";@Gs#ctS"7V_In=]g]4So'Zi;f24rrI3N p&>Hee$YZa5S*nq$;$<=JcC<$MuS;~> i;WsRIfKF4N;W\Xf*;?$rVluo0`\'=s8N'!6i6liqg9:b-B%d%!(6_b#-pl;":Hf!qu6m"Ot[1E )b0>s"$$>`f)5OQ'`\4:&N"R[q>UPl!!%uOrrr1c*WRnhgA_6N!/0h@"5=e4gZ\\;4G!OEs8P4X rrV-ZQLFhSBGp:=$17e*Ho2!-6)FIZrrUbJmJd+erbeWbs+14;s*t~> i;WsRIfKF4N;W\Xf*;?$rVluo0`\'=s8N'!6i6liqg9:b-B%d%!(6_b#-pl;":Hf!qu6m"Ot[1E )b0>s"$$>`f)5OQ'`\4:&N"R[q>UPl!!%uOrrr1c*WRnhgA_6N!/0h@"5=e4gZ\\;4G!OEs8P4X rrV-ZQLFhSBGp:=$17e*Ho2!-6)FIZrrUbJmJd+erbeWbs+14;s*t~> i;WsRIfKF4N;W\Xf*;?$rVluo0`\'=s8N'!6i6liqg9:b-B%d%!(6_b#-pl;":Hf!qu6m"Ot[1E )b0>s"$$>`f)5OQ'`\4:&N"R[q>UPl!!%uOrrr1c*WRnhgA_6N!/0h@"5=e4gZ\\;4G!OEs8P4X rrV-ZQLFhSBGp:=$17e*Ho2!-6)FIZrrUbJmJd+erbeWbs+14;s*t~> i;Ws/TE"p3Xo&,)Zk+(SoCKRN!emr["NUWE3rJFG"R6g(,PLd0"6h36K\HG-l2[(:rr^jf*8g#\ s#bl4]DqmnqYpWU!1**R!EpW7rsRccScA`VR6CTmQM\T"!q[d?n,EL>'EFm,rr^XS!M=rCJcG0< J,~> i;Ws/TE"p3Xo&,)Zk+(SoCKRN!emr["NUWE3rJFG"R6g(,PLd0"6h36K\HG-l2[(:rr^jf*8g#\ s#bl4]DqmnqYpWU!1**R!EpW7rsRccScA`VR6CTmQM\T"!q[d?n,EL>'EFm,rr^XS!M=rCJcG0< J,~> i;Ws/TE"p3Xo&,)Zk+(SoCKRN!emr["NUWE3rJFG"R6g(,PLd0"6h36K\HG-l2[(:rr^jf*8g#\ s#bl4]DqmnqYpWU!1**R!EpW7rsRccScA`VR6CTmQM\T"!q[d?n,EL>'EFm,rr^XS!M=rCJcG0< J,~> iVs,\#J^<7!mg`C#O$Lg$O%SVb-:mJHiO._n,EOd5l_),o)Ad:!$g4t!o!^MmJd:9&gQ<!s8P34 s1A=24So'Zi;f24rrH:Tn,EI=!3#hq"O0dD/BGd0!m1KJnG`UX+97,nrr]M-"MoZhJcG3=J,~> iVs,\#J^<7!mg`C#O$Lg$O%SVb-:mJHiO._n,EOd5l_),o)Ad:!$g4t!o!^MmJd:9&gQ<!s8P34 s1A=24So'Zi;f24rrH:Tn,EI=!3#hq"O0dD/BGd0!m1KJnG`UX+97,nrr]M-"MoZhJcG3=J,~> iVs,\#J^<7!mg`C#O$Lg$O%SVb-:mJHiO._n,EOd5l_),o)Ad:!$g4t!o!^MmJd:9&gQ<!s8P34 s1A=24So'Zi;f24rrH:Tn,EI=!3#hq"O0dD/BGd0!m1KJnG`UX+97,nrr]M-"MoZhJcG3=J,~> JcGTH"T;:"!.",7"Sb[k!M/`[rrCdQ!mCYMm/I11&fAs\s8P34s1A=24So'Zi;f24rrGnIn,EI3 !4;V&"2,r`O2_,#q+Q,(rrQO-8G`>gFT<W[JcC<$nGe"~> JcGTH"T;:"!.",7"Sb[k!M/`[rrCdQ!mCYMm/I11&fAs\s8P34s1A=24So'Zi;f24rrGnIn,EI3 !4;V&"2,r`O2_,#q+Q,(rrQO-8G`>gFT<W[JcC<$nGe"~> JcGTH"T;:"!.",7"Sb[k!M/`[rrCdQ!mCYMm/I11&fAs\s8P34s1A=24So'Zi;f24rrGnIn,EI3 !4;V&"2,r`O2_,#q+Q,(rrQO-8G`>gFT<W[JcC<$nGe"~> JcGQG"8PjuWq$)kqc3ffn,NCfgA_5f!5e(%"4eP']^5[u4G!OEs8P4XrrV-ZQLFhS9/H&:!l"`P q>UQe;uh-trtGGEFpk-0&B"PJiaaA@"X8$Zs8Q1!!;uj$!"749"XUh[rr^mT!nmGM"7m6-Q%Asd s7$&=~> JcGQG"8PjuWq$)kqc3ffn,NCfgA_5f!5e(%"4eP']^5[u4G!OEs8P4XrrV-ZQLFhS9/H&:!l"`P q>UQe;uh-trtGGEFpk-0&B"PJiaaA@"X8$Zs8Q1!!;uj$!"749"XUh[rr^mT!nmGM"7m6-Q%Asd s7$&=~> JcGQG"8PjuWq$)kqc3ffn,NCfgA_5f!5e(%"4eP']^5[u4G!OEs8P4XrrV-ZQLFhS9/H&:!l"`P q>UQe;uh-trtGGEFpk-0&B"PJiaaA@"X8$Zs8Q1!!;uj$!"749"XUh[rr^mT!nmGM"7m6-Q%Asd s7$&=~> JcGNF!WC10rrN&?mf3:egA_5W!7C*3"6D->V="<_4G!OEs8P4XrrV-ZQLFhS90D\C!jhsPq#:Hq B`O"Grtk_<*WQKf!*]F&ZN(ah('">=s8R0k+TMN?rs&N*'atWR(An+2!dF]:q#:D>!&T9,JcG6> J,~> JcGNF!WC10rrN&?mf3:egA_5W!7C*3"6D->V="<_4G!OEs8P4XrrV-ZQLFhS90D\C!jhsPq#:Hq B`O"Grtk_<*WQKf!*]F&ZN(ah('">=s8R0k+TMN?rs&N*'atWR(An+2!dF]:q#:D>!&T9,JcG6> J,~> JcGNF!WC10rrN&?mf3:egA_5W!7C*3"6D->V="<_4G!OEs8P4XrrV-ZQLFhS90D\C!jhsPq#:Hq B`O"Grtk_<*WQKf!*]F&ZN(ah('">=s8R0k+TMN?rs&N*'atWR(An+2!dF]:q#:D>!&T9,JcG6> J,~> JcF'rrrCdQ!hKDMl2LnU5ll0+n,NDMJcE@^s#g/X!oX-Fn,NDMn,EHc!8$uF"9)I+]\`\g!"X#K !-&!&s8VKNs8W("!"Ai+!lG!<r;Zcs"X<-_!!(FGrrP"WOneqY_Z0`.JcC<$nc++~> JcF'rrrCdQ!hKDMl2LnU5ll0+n,NDMJcE@^s#g/X!oX-Fn,NDMn,EHc!8$uF"9)I+]\`\g!"X#K !-&!&s8VKNs8W("!"Ai+!lG!<r;Zcs"X<-_!!(FGrrP"WOneqY_Z0`.JcC<$nc++~> JcF'rrrCdQ!hKDMl2LnU5ll0+n,NDMJcE@^s#g/X!oX-Fn,NDMn,EHc!8$uF"9)I+]\`\g!"X#K !-&!&s8VKNs8W("!"Ai+!lG!<r;Zcs"X<-_!!(FGrrP"WOneqY_Z0`.JcC<$nc++~> JcF'rrrCdQ!fm?Mkl1e^D#c`^nGiMNJcE@^s#g/X!oX-Hn,EDN7IU6XU]BBIrr_pH,kp3rrr<4X !!%cS49#6aa_3[c'`\74rrU(<!;uls!!T\.rVur:rr3$0!4_h("7?-hd"24Js7-,>~> JcF'rrrCdQ!fm?Mkl1e^D#c`^nGiMNJcE@^s#g/X!oX-Hn,EDN7IU6XU]BBIrr_pH,kp3rrr<4X !!%cS49#6aa_3[c'`\74rrU(<!;uls!!T\.rVur:rr3$0!4_h("7?-hd"24Js7-,>~> JcF'rrrCdQ!fm?Mkl1e^D#c`^nGiMNJcE@^s#g/X!oX-Hn,EDN7IU6XU]BBIrr_pH,kp3rrr<4X !!%cS49#6aa_3[c'`\74rrU(<!;uls!!T\.rVur:rr3$0!4_h("7?-hd"24Js7-,>~> JcF'rrrCdQ!f$dNk5PO`$lH_Ks8P34s1A=24So'Zi;f_CrrG,Qn,EHT!9*VN!ltFuhuE]V$&8K\ LB'F9s.BDi!<)p!_Z0]7s8N'&_uK`:!5ng9!WrG<q#:Hn!!()ks+14?s*t~> JcF'rrrCdQ!f$dNk5PO`$lH_Ks8P34s1A=24So'Zi;f_CrrG,Qn,EHT!9*VN!ltFuhuE]V$&8K\ LB'F9s.BDi!<)p!_Z0]7s8N'&_uK`:!5ng9!WrG<q#:Hn!!()ks+14?s*t~> JcF'rrrCdQ!f$dNk5PO`$lH_Ks8P34s1A=24So'Zi;f_CrrG,Qn,EHT!9*VN!ltFuhuE]V$&8K\ LB'F9s.BDi!<)p!_Z0]7s8N'&_uK`:!5ng9!WrG<q#:Hn!!()ks+14?s*t~> JcF'rrrCdQ!Ib%0rrgq)"+'_5s8P34s1A=24So'Zi;f_CrrF]En,EHT!:KLZ!acc;i;`fW%u1,b LB'F9ru1rNmf.V6!<)p!_Z0]7s8N'&_uK`:!5ng9!YPL5q#:H]!!(`(s+14?s*t~> JcF'rrrCdQ!Ib%0rrgq)"+'_5s8P34s1A=24So'Zi;f_CrrF]En,EHT!:KLZ!acc;i;`fW%u1,b LB'F9ru1rNmf.V6!<)p!_Z0]7s8N'&_uK`:!5ng9!YPL5q#:H]!!(`(s+14?s*t~> JcF'rrrCdQ!Ib%0rrgq)"+'_5s8P34s1A=24So'Zi;f_CrrF]En,EHT!:KLZ!acc;i;`fW%u1,b LB'F9ru1rNmf.V6!<)p!_Z0]7s8N'&_uK`:!5ng9!YPL5q#:H]!!(`(s+14?s*t~> JcF'rrrCdQ!I+t3rri"1![u%[s8P34s1A=24So'Zi;f_CrrF]Qn,EHK!:]X\!nRLFi;`fW%u1,b LB'F9rs&P#s3Mqi!<)p!_Z0]7s8N'&_uK`:!5ng9!^6U-q#:H-!"AgWs+14?s*t~> JcF'rrrCdQ!I+t3rri"1![u%[s8P34s1A=24So'Zi;f_CrrF]Qn,EHK!:]X\!nRLFi;`fW%u1,b LB'F9rs&P#s3Mqi!<)p!_Z0]7s8N'&_uK`:!5ng9!^6U-q#:H-!"AgWs+14?s*t~> JcF'rrrCdQ!I+t3rri"1![u%[s8P34s1A=24So'Zi;f_CrrF]Qn,EHK!:]X\!nRLFi;`fW%u1,b LB'F9rs&P#s3Mqi!<)p!_Z0]7s8N'&_uK`:!5ng9!^6U-q#:H-!"AgWs+14?s*t~> JcF'rrrCdQ!GrA+rrg4d!cIZ(s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4So'Zi;f_CrrFHMn,EHE !;?$a!C/m-s8N'7LB%=0!'C5\70!E7!ZM+>s8OT"+TMNA/-#YL!!U:?rr<&:rr3(V!$hL=rrQj6 <e::%s7$&=~> JcF'rrrCdQ!GrA+rrg4d!cIZ(s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4So'Zi;f_CrrFHMn,EHE !;?$a!C/m-s8N'7LB%=0!'C5\70!E7!ZM+>s8OT"+TMNA/-#YL!!U:?rr<&:rr3(V!$hL=rrQj6 <e::%s7$&=~> JcF'rrrCdQ!GrA+rrg4d!cIZ(s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4So'Zi;f_CrrFHMn,EHE !;?$a!C/m-s8N'7LB%=0!'C5\70!E7!ZM+>s8OT"+TMNA/-#YL!!U:?rr<&:rr3(V!$hL=rrQj6 <e::%s7$&=~> JcF'rrrCdQ!GNM2rrr+?"<OH>q#>_(/=F3Oo9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H ]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\l RIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl/3Ne/!oX-Un,ED0>OVRm K`L]D!h'/LiW&oX&Vg>dLB'F9s5?<L'Pt;[!<<)p!<<*!!!U:?rr<&:rr3)c#lpt$rr_Bk!5jBf JcG6>J,~> JcF'rrrCdQ!GNM2rrr+?"<OH>q#>_(/=F3Oo9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H ]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\l RIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl/3Ne/!oX-Un,ED0>OVRm K`L]D!h'/LiW&oX&Vg>dLB'F9s5?<L'Pt;[!<<)p!<<*!!!U:?rr<&:rr3)c#lpt$rr_Bk!5jBf JcG6>J,~> JcF'rrrCdQ!GNM2rrr+?"<OH>q#>_(/=F3Oo9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H ]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\l RIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl/3Ne/!oX-Un,ED0>OVRm K`L]D!h'/LiW&oX&Vg>dLB'F9s5?<L'Pt;[!<<)p!<<*!!!U:?rr<&:rr3)c#lpt$rr_Bk!5jBf JcG6>J,~> JcF'rrrCdQ!F-]&rrgV4!'%ahs8P34s1A=24So'Zi;f_CrrF0Tn,EE5!:p-kirGUYrr[oS)XRA$ !`8qrJcC<$n,In~> JcF'rrrCdQ!F-]&rrgV4!'%ahs8P34s1A=24So'Zi;f_CrrF0Tn,EE5!:p-kirGUYrr[oS)XRA$ !`8qrJcC<$n,In~> JcF'rrrCdQ!F-]&rrgV4!'%ahs8P34s1A=24So'Zi;f_CrrF0Tn,EE5!:p-kirGUYrr[oS)XRA$ !`8qrJcC<$n,In~> JcF'rrrCdQ!Eq#/rrfSV!)_AFs8P34s1A=24So'Zi;f_CrrEgJn,EE5%e9Q".9F"Y"T1Rd4n\dR "+L:om",1fs6ou<~> JcF'rrrCdQ!Eq#/rrfSV!)_AFs8P34s1A=24So'Zi;f_CrrEgJn,EE5%e9Q".9F"Y"T1Rd4n\dR "+L:om",1fs6ou<~> JcF'rrrCdQ!Eq#/rrfSV!)_AFs8P34s1A=24So'Zi;f_CrrEgJn,EE5%e9Q".9F"Y"T1Rd4n\dR "+L:om",1fs6ou<~> JcF'rrrCdQ!Eq)0rrr:b(^*scrVum[JcE@^s#g/X!oX-Un,ED!D=@K*D@c:;!FR"Xrr_dJ!1Eid "4.)fg4B9Ts6fo;~> JcF'rrrCdQ!Eq)0rrr:b(^*scrVum[JcE@^s#g/X!oX-Un,ED!D=@K*D@c:;!FR"Xrr_dJ!1Eid "4.)fg4B9Ts6fo;~> JcF'rrrCdQ!Eq)0rrr:b(^*scrVum[JcE@^s#g/X!oX-Un,ED!D=@K*D@c:;!FR"Xrr_dJ!1Eid "4.)fg4B9Ts6fo;~> JcF'rrrCdQ!EUl+rsA=Y*rn^>s8P2DJcE@^s#g/X!oX-Un,ED!GjkY5Bbp7=!g<WL[f6C"SG`Bf Xl+d1JcG-;J,~> JcF'rrrCdQ!EUl+rsA=Y*rn^>s8P2DJcE@^s#g/X!oX-Un,ED!GjkY5Bbp7=!g<WL[f6C"SG`Bf Xl+d1JcG-;J,~> JcF'rrrCdQ!EUl+rsA=Y*rn^>s8P2DJcE@^s#g/X!oX-Un,ED!GjkY5Bbp7=!g<WL[f6C"SG`Bf Xl+d1JcG-;J,~> JcF'rrrCdQ!D>#rrs/Fr0E<ep3';cl]DqmnqYpWU!2]/a!<RN7rrH^Qnc&[*!5F*bJcD/<J,~> JcF'rrrCdQ!D>#rrs/Fr0E<ep3';cl]DqmnqYpWU!2]/a!<RN7rrH^Qnc&[*!5F*bJcD/<J,~> JcF'rrrCdQ!D>#rrs/Fr0E<ep3';cl]DqmnqYpWU!2]/a!<RN7rrH^Qnc&[*!5F*bJcD/<J,~> JcF'rrrCdQ!D>#prs/P57fi`,_#Aob^&S*pqYpWU!2]/a!<@B5rrH:Enc&[I!24uDJcD/<J,~> JcF'rrrCdQ!D>#prs/P57fi`,_#Aob^&S*pqYpWU!2]/a!<@B5rrH:Enc&[I!24uDJcD/<J,~> JcF'rrrCdQ!D>#prs/P57fi`,_#Aob^&S*pqYpWU!2]/a!<@B5rrH:Enc&[I!24uDJcD/<J,~> JcF'rrrCdQ!D>#mrs%F(#QQ*#d"253s8P4XrrV-ZV=4Eb!-mu4!Eq&ErrW$!J`$J1o5G]QIt@WN s1nYb~> JcF'rrrCdQ!D>#mrs%F(#QQ*#d"253s8P4XrrV-ZV=4Eb!-mu4!Eq&ErrW$!J`$J1o5G]QIt@WN s1nYb~> JcF'rrrCdQ!D>#mrs%F(#QQ*#d"253s8P4XrrV-ZV=4Eb!-mu4!Eq&ErrW$!J`$J1o5G]QIt@WN s1nYb~> JcF'rrrCdQ!D>)ns8P1d_-dZO+E"gfJcEXfs#g/X!oX-Un,ECgIII1::G))9!?G\-rrcX.!$%8T s+13cs*t~> JcF'rrrCdQ!D>)ns8P1d_-dZO+E"gfJcEXfs#g/X!oX-Un,ECgIII1::G))9!?G\-rrcX.!$%8T s+13cs*t~> JcF'rrrCdQ!D>)ns8P1d_-dZO+E"gfJcEXfs#g/X!oX-Un,ECgIII1::G))9!?G\-rrcX.!$%8T s+13cs*t~> JcF'rrrCdQ!D>Q&s8P4]rs88!?kiYP=J+?!s2P*=4So'Zh>jD@rrE+Tn,ED]2":MG4@J*,!Y59X JcC<$^Ai]~> JcF'rrrCdQ!D>Q&s8P4]rs88!?kiYP=J+?!s2P*=4So'Zh>jD@rrE+Tn,ED]2":MG4@J*,!Y59X JcC<$^Ai]~> JcF'rrrCdQ!D>Q&s8P4]rs88!?kiYP=J+?!s2P*=4So'Zh>jD@rrE+Tn,ED]2":MG4@J*,!Y59X JcC<$^Ai]~> JcF'rrrCdQ!D>Q&s8P4ZrsJ\AFsd7i)-2pIrIP!ls8P4XrrUUKV=4Eb!/L%C!Co9ArrH1IhuE]V !5a<eJcEIaJ,~> JcF'rrrCdQ!D>Q&s8P4ZrsJ\AFsd7i)-2pIrIP!ls8P4XrrUUKV=4Eb!/L%C!Co9ArrH1IhuE]V !5a<eJcEIaJ,~> JcF'rrrCdQ!D>Q&s8P4ZrsJ\AFsd7i)-2pIrIP!ls8P4XrrUUKV=4Eb!/L%C!Co9ArrH1IhuE]V !5a<eJcEIaJ,~> JcF'rrrCdQ!D>Q&s8P4VrsRe\B.3i]&4:E,b4U>cd/X,.qYpWF!2]/a!<@oDs8P4NrrHgLi;WoX !!'rgs+13as*t~> JcF'rrrCdQ!D>Q&s8P4VrsRe\B.3i]&4:E,b4U>cd/X,.qYpWF!2]/a!<@oDs8P4NrrHgLi;WoX !!'rgs+13as*t~> JcF'rrrCdQ!D>Q&s8P4VrsRe\B.3i]&4:E,b4U>cd/X,.qYpWF!2]/a!<@oDs8P4NrrHgLi;WoX !!'rgs+13as*t~> JcF'rrrCdQ!D5K)rrBh5s8P4Rrsn=tEBOj5!!4EEI@\%*pq6V/n<fX5T`>$SqYpWF!2]2b!rDtQ n,EDN9CVr^GR3:."SnMe!8W5+JcEIaJ,~> JcF'rrrCdQ!D5K)rrBh5s8P4Rrsn=tEBOj5!!4EEI@\%*pq6V/n<fX5T`>$SqYpWF!2]2b!rDtQ n,EDN9CVr^GR3:."SnMe!8W5+JcEIaJ,~> JcF'rrrCdQ!D5K)rrBh5s8P4Rrsn=tEBOj5!!4EEI@\%*pq6V/n<fX5T`>$SqYpWF!2]2b!rDtQ n,EDN9CVr^GR3:."SnMe!8W5+JcEIaJ,~> JcF'rrrCdQs#ej3"TUg&s#`F4rrqDiLfuD8rW!<,)ECo@LRG3Vcf"B8rrqg7!!"54U&Y-TqYpWF !2]2b!q62Fn,EDB9CVr_L&h&0rrdfO!$.&Ms+13`s*t~> JcF'rrrCdQs#ej3"TUg&s#`F4rrqDiLfuD8rW!<,)ECo@LRG3Vcf"B8rrqg7!!"54U&Y-TqYpWF !2]2b!q62Fn,EDB9CVr_L&h&0rrdfO!$.&Ms+13`s*t~> JcF'rrrCdQs#ej3"TUg&s#`F4rrqDiLfuD8rW!<,)ECo@LRG3Vcf"B8rrqg7!!"54U&Y-TqYpWF !2]2b!q62Fn,EDB9CVr_L&h&0rrdfO!$.&Ms+13`s*t~> JcF'rrrCdQs#f*:#6*StTn$f`rW!!b/Ni=u#lN]"UP*5L-joeN#mCnQ*?l[[1G_;E6i\\7!!&I] s8P4XrrUUKV==Kdn,S74rrF]EnG`QS!:&VE"I1/2#'YXuJcEF`J,~> JcF'rrrCdQs#f*:#6*StTn$f`rW!!b/Ni=u#lN]"UP*5L-joeN#mCnQ*?l[[1G_;E6i\\7!!&I] s8P4XrrUUKV==Kdn,S74rrF]EnG`QS!:&VE"I1/2#'YXuJcEF`J,~> JcF'rrrCdQs#f*:#6*StTn$f`rW!!b/Ni=u#lN]"UP*5L-joeN#mCnQ*?l[[1G_;E6i\\7!!&I] s8P4XrrUUKV==Kdn,S74rrF]EnG`QS!:&VE"I1/2#'YXuJcEF`J,~> JcF'rrrCdQs#f6>"SfNY8J;"&!Ws2^rW!!b/Ni"l%eo,8_Q]YlHZWk3@T?E*cpRj_r;ZhdU&Y-T qYpWF!2]2b!q62Fn,ED?;"4JdUB'*.rr]2"!8iA-JcEIaJ,~> JcF'rrrCdQs#f6>"SfNY8J;"&!Ws2^rW!!b/Ni"l%eo,8_Q]YlHZWk3@T?E*cpRj_r;ZhdU&Y-T qYpWF!2]2b!q62Fn,ED?;"4JdUB'*.rr]2"!8iA-JcEIaJ,~> JcF'rrrCdQs#f6>"SfNY8J;"&!Ws2^rW!!b/Ni"l%eo,8_Q]YlHZWk3@T?E*cpRj_r;ZhdU&Y-T qYpWF!2]2b!q62Fn,ED?;"4JdUB'*.rr]2"!8iA-JcEIaJ,~> JcF'rrrCdQs#f?A'D8A.%KH\lDOnJsqZ$Qq5em=]4JDcYmih`3,4M<+s#g/X!n%(FnG`RZ!/^1E !A.LErrTG*cJed*q>^N7JcC<$^Ai]~> JcF'rrrCdQs#f?A'D8A.%KH\lDOnJsqZ$Qq5em=]4JDcYmih`3,4M<+s#g/X!n%(FnG`RZ!/^1E !A.LErrTG*cJed*q>^N7JcC<$^Ai]~> JcF'rrrCdQs#f?A'D8A.%KH\lDOnJsqZ$Qq5em=]4JDcYmih`3,4M<+s#g/X!n%(FnG`RZ!/^1E !A.LErrTG*cJed*q>^N7JcC<$^Ai]~> JcF'rrrCdQs#fEC#Ma>1!%3'1q"api^]+954J;]Vn<oa7T`>$SqYpWF!2]2b!q62Un,ED?>4DOn ZiJ#%s8N'!_h%i=s1\M`~> JcF'rrrCdQs#fEC#Ma>1!%3'1q"api^]+954J;]Vn<oa7T`>$SqYpWF!2]2b!q62Un,ED?>4DOn ZiJ#%s8N'!_h%i=s1\M`~> JcF'rrrCdQs#fEC#Ma>1!%3'1q"api^]+954J;]Vn<oa7T`>$SqYpWF!2]2b!q62Un,ED?>4DOn ZiJ#%s8N'!_h%i=s1\M`~> JcF'rrrCdQ!C/d1rrpG:!Y]e,nc/VOJcE@^s#g/X!n%(FnG`RZ!1**R!@:q=rrU":_r1Or!<Bod s+13as*t~> JcF'rrrCdQ!C/d1rrpG:!Y]e,nc/VOJcE@^s#g/X!n%(FnG`RZ!1**R!@:q=rrU":_r1Or!<Bod s+13as*t~> JcF'rrrCdQ!C/d1rrpG:!Y]e,nc/VOJcE@^s#g/X!n%(FnG`RZ!1**R!@:q=rrU":_r1Or!<Bod s+13as*t~> JcF'rrrCdQ!D>Q>rrq.[!@43/n,NDMJcE@^s#g/X!n%(FnG`RZ!1**R!?PG6rrU(<^>T"m('&H- s+13as*t~> JcF'rrrCdQ!D>Q>rrq.[!@43/n,NDMJcE@^s#g/X!n%(FnG`RZ!1**R!?PG6rrU(<^>T"m('&H- s+13as*t~> JcF'rrrCdQ!D>Q>rrq.[!@43/n,NDMJcE@^s#g/X!n%(FnG`RZ!1**R!?PG6rrU(<^>T"m('&H- s+13as*t~> JcF'rrrCdQ!D>Q@rrr:N"r**nmJm2KJcE@^s#g/X!n%(FnG`RY!1**R!?PG6rrU(<[,CreC]FGU Q%Asds1nYb~> JcF'rrrCdQ!D>Q@rrr:N"r**nmJm2KJcE@^s#g/X!n%(FnG`RY!1**R!?PG6rrU(<[,CreC]FGU Q%Asds1nYb~> JcF'rrrCdQ!D>Q@rrr:N"r**nmJm2KJcE@^s#g/X!n%(FnG`RY!1**R!?PG6rrU(<[,CreC]FGU Q%Asds1nYb~> JcF'rrrCdQ!D>E=rrgk/!+kWbs8P34s1A=24So'ZdK$-5rrV-ZQLFhS*bFj@!mUeQi;WrSFrpg9 JcC<$_#Jo~> JcF'rrrCdQ!D>E=rrgk/!+kWbs8P34s1A=24So'ZdK$-5rrV-ZQLFhS*bFj@!mUeQi;WrSFrpg9 JcC<$_#Jo~> JcF'rrrCdQ!D>E=rrgk/!+kWbs8P34s1A=24So'ZdK$-5rrV-ZQLFhS*bFj@!mUeQi;WrSFrpg9 JcC<$_#Jo~> JcF'rrrCdQ!DP05rr])')78Z.s#bl4]DqmnqYpWF!2o>d!oX-Fn,ED0C%2-(dK$P's+13=s*t~> JcF'rrrCdQ!DP05rr])')78Z.s#bl4]DqmnqYpWF!2o>d!oX-Fn,ED0C%2-(dK$P's+13=s*t~> JcF'rrrCdQ!DP05rr])')78Z.s#bl4]DqmnqYpWF!2o>d!oX-Fn,ED0C%2-(dK$P's+13=s*t~> JcF'rrrCdQ!Eq)Drri=J!C?)9s8P34s1A=24So'ZdK$ZDrrV-ZQLFhS*bk-D!n%(FJcC<$Rf@m~> JcF'rrrCdQ!Eq)Drri=J!C?)9s8P34s1A=24So'ZdK$ZDrrV-ZQLFhS*bk-D!n%(FJcC<$Rf@m~> JcF'rrrCdQ!Eq)Drri=J!C?)9s8P34s1A=24So'ZdK$ZDrrV-ZQLFhS*bk-D!n%(FJcC<$Rf@m~> JcF'rrrCdQ!EpQ6rri4$!+u)js8P34s1A=24So'ZdK$ZDrrV-ZQLFhS&S^b7!n%(FJcC<$Rf@m~> JcF'rrrCdQ!EpQ6rri4$!+u)js8P34s1A=24So'ZdK$ZDrrV-ZQLFhS&S^b7!n%(FJcC<$Rf@m~> JcF'rrrCdQ!EpQ6rri4$!+u)js8P34s1A=24So'ZdK$ZDrrV-ZQLFhS&S^b7!n%(FJcC<$Rf@m~> JcF'rrrCdQ!GEPErr`*s!/]h;s#bl4]DqmnqYpWF!4;7q!oX-Fn,ED!C%2-(ec;PkrrVg==7H4k muUB.rrVg==+UC(s*t~> JcF'rrrCdQ!GEPErr`*s!/]h;s#bl4]DqmnqYpWF!4;7q!oX-Fn,ED!C%2-(ec;PkrrVg==7H4k muUB.rrVg==+UC(s*t~> JcF'rrrCdQ!GEPErr`*s!/]h;s#bl4]DqmnqYpWF!4;7q!oX-Fn,ED!C%2-(ec;PkrrVg==7H4k muUB.rrVg==+UC(s*t~> JcF'rrrCdQ!GN2;rr`0t!KZ=As#bl4]DqmnqYpWF!4;7q!oX-Fn,ED!C@M6)i;f_!rrU=C#Oq`p _Z0]!rrU=C#D)o-s*t~> JcF'rrrCdQ!GN2;rr`0t!KZ=As#bl4]DqmnqYpWF!4;7q!oX-Fn,ED!C@M6)i;f_!rrU=C#Oq`p _Z0]!rrU=C#D)o-s*t~> JcF'rrrCdQ!GN2;rr`0t!KZ=As#bl4]DqmnqYpWF!4;7q!oX-Fn,ED!C@M6)i;f_!rrU=C#Oq`p _Z0]!rrU=C#D)o-s*t~> JcF'r">'Uuf_"#"!HS_@rrQm7OQ6B@4G!OEs8P4XrrUUK[.+(si;f24rrEXTnG`RK!2[s?!r5N9 nG`R-!!)0]!r5N9JcCB&J,~> JcF'r">'Uuf_"#"!HS_@rrQm7OQ6B@4G!OEs8P4XrrUUK[.+(si;f24rrEXTnG`RK!2[s?!r5N9 nG`R-!!)0]!r5N9JcCB&J,~> JcF'r">'Uuf_"#"!HS_@rrQm7OQ6B@4G!OEs8P4XrrUUK[.+(si;f24rrEXTnG`RK!2[s?!r5N9 nG`R-!!)0]!r5N9JcCB&J,~> JcF'r!N-(s!!#[OrrRcPqt0miPlQ'gs8P34s1A=24So'ZdK$ZDrrV-ZQLFhS%s[UD!oX-Uci3uH r;ccq"oo%Z3X$hBrr;coli-rdr;c]o!d"]jJcC`0J,~> JcF'r!N-(s!!#[OrrRcPqt0miPlQ'gs8P34s1A=24So'ZdK$ZDrrV-ZQLFhS%s[UD!oX-Uci3uH r;ccq"oo%Z3X$hBrr;coli-rdr;c]o!d"]jJcC`0J,~> JcF'r!N-(s!!#[OrrRcPqt0miPlQ'gs8P34s1A=24So'ZdK$ZDrrV-ZQLFhS%s[UD!oX-Uci3uH r;ccq"oo%Z3X$hBrr;coli-rdr;c]o!d"]jJcC`0J,~> JcF$q"4(g3$iL&*9B,sQP5sqArr]q::B'8Q!B`,g7(Yhf1-GF5!n%(UnG`RK!1**R!=O/ArrV-Z V9f/EF=SL7!;uj,!!3lD&-*LCs8OT"+TMNA/*m3<F=SL7!;c]s#65']s,I&/~> JcF$q"4(g3$iL&*9B,sQP5sqArr]q::B'8Q!B`,g7(Yhf1-GF5!n%(UnG`RK!1**R!=O/ArrV-Z V9f/EF=SL7!;uj,!!3lD&-*LCs8OT"+TMNA/*m3<F=SL7!;c]s#65']s,I&/~> JcF$q"4(g3$iL&*9B,sQP5sqArr]q::B'8Q!B`,g7(Yhf1-GF5!n%(UnG`RK!1**R!=O/ArrV-Z V9f/EF=SL7!;uj,!!3lD&-*LCs8OT"+TMNA/*m3<F=SL7!;c]s#65']s,I&/~> JcF$q"3t[.$N0r)9B,sQU]B-Brr_U+/G8!%!B`,g7(Yhf1-GF5!n%(UnG`RK!1**R!<@B6rrV-Z V9T#A_Z0]7s8N'&,3RVZ!7CcF!lG!<k5PM#!!)lq!d"ZiJcC`0J,~> JcF$q"3t[.$N0r)9B,sQU]B-Brr_U+/G8!%!B`,g7(Yhf1-GF5!n%(UnG`RK!1**R!<@B6rrV-Z V9T#A_Z0]7s8N'&,3RVZ!7CcF!lG!<k5PM#!!)lq!d"ZiJcC`0J,~> JcF$q"3t[.$N0r)9B,sQU]B-Brr_U+/G8!%!B`,g7(Yhf1-GF5!n%(UnG`RK!1**R!<@B6rrV-Z V9T#A_Z0]7s8N'&,3RVZ!7CcF!lG!<k5PM#!!)lq!d"ZiJcC`0J,~> JcF'r!N#tq!!#[OrrTV/anPf;r_<dLi;`g>JcE@^s#g/X!n%(UnG`RK!1**R!<@B6rrV-ZV9T#A _Z0]7s8N'&ZN'n(!6"j9!lG!<k5PM#!!%TMKE$H~> JcF'r!N#tq!!#[OrrTV/anPf;r_<dLi;`g>JcE@^s#g/X!n%(UnG`RK!1**R!<@B6rrV-ZV9T#A _Z0]7s8N'&ZN'n(!6"j9!lG!<k5PM#!!%TMKE$H~> JcF'r!N#tq!!#[OrrTV/anPf;r_<dLi;`g>JcE@^s#g/X!n%(UnG`RK!1**R!<@B6rrV-ZV9T#A _Z0]7s8N'&ZN'n(!6"j9!lG!<k5PM#!!%TMKE$H~> JcF'r">'V#g@a;%!lk;Op\t;f!1)OBs#bl4]DqmnqYpWF!4;7q!oX-Fn,ECgJ+3I>i;f_!rrU(< !;uls!!U:?rr<&:rVlr:!!)0]!lG!<JcCB&J,~> JcF'r">'V#g@a;%!lk;Op\t;f!1)OBs#bl4]DqmnqYpWF!4;7q!oX-Fn,ECgJ+3I>i;f_!rrU(< !;uls!!U:?rr<&:rVlr:!!)0]!lG!<JcCB&J,~> JcF'r">'V#g@a;%!lk;Op\t;f!1)OBs#bl4]DqmnqYpWF!4;7q!oX-Fn,ECgJ+3I>i;f_!rrU(< !;uls!!U:?rr<&:rVlr:!!)0]!lG!<JcCB&J,~> JcF'rrrCdQ!nRFNq#:E^'h7'[s#bl4]DqmnqYpWF!4;7q!oX-Fn,ECgL[b<Fi;f_!rrU(<!;uls !!U:?rr<&:rVlu;!!*#]rrU(<!;c]s_0kHts,I&/~> JcF'rrrCdQ!nRFNq#:E^'h7'[s#bl4]DqmnqYpWF!4;7q!oX-Fn,ECgL[b<Fi;f_!rrU(<!;uls !!U:?rr<&:rVlu;!!*#]rrU(<!;c]s_0kHts,I&/~> JcF'rrrCdQ!nRFNq#:E^'h7'[s#bl4]DqmnqYpWF!4;7q!oX-Fn,ECgL[b<Fi;f_!rrU(<!;uls !!U:?rr<&:rVlu;!!*#]rrU(<!;c]s_0kHts,I&/~> JcF'rrrCdQ!pTcLq#:D+#i"59s#bl4]DqmnqYpWF!4;7q!oX-Fn,ECgL[b<Fi;f_!rrU(<!;uls !!U:?rr<&:rVm&F!!(CGqs"+^_Z0]6rr`3.!)A+FNW4M~> JcF'rrrCdQ!pTcLq#:D+#i"59s#bl4]DqmnqYpWF!4;7q!oX-Fn,ECgL[b<Fi;f_!rrU(<!;uls !!U:?rr<&:rVm&F!!(CGqs"+^_Z0]6rr`3.!)A+FNW4M~> JcF'rrrCdQ!pTcLq#:D+#i"59s#bl4]DqmnqYpWF!4;7q!oX-Fn,ECgL[b<Fi;f_!rrU(<!;uls !!U:?rr<&:rVm&F!!(CGqs"+^_Z0]6rr`3.!)A+FNW4M~> JcF'rrrCaP!=F#GrrUIHK&-J,4G!OEs8P4XrrURJ[.+(si;f\CrrVinL[b<Fi;f_#s8OSN+TMNA /-#YL!!U:?rr<&:rVm&o%fcn`$L@`l.fpjo!<+MIrrP(Y$%`,9s*t~> JcF'rrrCaP!=F#GrrUIHK&-J,4G!OEs8P4XrrURJ[.+(si;f\CrrVinL[b<Fi;f_#s8OSN+TMNA /-#YL!!U:?rr<&:rVm&o%fcn`$L@`l.fpjo!<+MIrrP(Y$%`,9s*t~> JcF'rrrCaP!=F#GrrUIHK&-J,4G!OEs8P4XrrURJ[.+(si;f\CrrVinL[b<Fi;f_#s8OSN+TMNA /-#YL!!U:?rr<&:rVm&o%fcn`$L@`l.fpjo!<+MIrrP(Y$%`,9s*t~> JcF'rrrCaP!@_(FrrP_5ptbuM4Gs.C^ekdK(g5A!s8P4XrrU(<[.+(si;f_DrrVZiL[b<Fi;f7k s7lZps8N'&_uK`:!5na7"MZYp#r:iHq#LBn!oEtfJcC`0J,~> JcF'rrrCaP!@_(FrrP_5ptbuM4Gs.C^ekdK(g5A!s8P4XrrU(<[.+(si;f_DrrVZiL[b<Fi;f7k s7lZps8N'&_uK`:!5na7"MZYp#r:iHq#LBn!oEtfJcC`0J,~> JcF'rrrCaP!@_(FrrP_5ptbuM4Gs.C^ekdK(g5A!s8P4XrrU(<[.+(si;f_DrrVZiL[b<Fi;f7k s7lZps8N'&_uK`:!5na7"MZYp#r:iHq#LBn!oEtfJcC`0J,~> JcF'rrrCaP!D,3GrrTn7TA9JH4H0:@ra>U'!=R2as8P4XrrU(<[.+(si;f_DrrVZiL[b<Fi;f1+ rrStr:4`G)s*t~> JcF'rrrCaP!D,3GrrTn7TA9JH4H0:@ra>U'!=R2as8P4XrrU(<[.+(si;f_DrrVZiL[b<Fi;f1+ rrStr:4`G)s*t~> JcF'rrrCaP!D,3GrrTn7TA9JH4H0:@ra>U'!=R2as8P4XrrU(<[.+(si;f_DrrVZiL[b<Fi;f1+ rrStr:4`G)s*t~> JcF'rrrCaP!GNAHrrPA6r7q>P4H'4FIK2^3\m#.78\4s%4So'Z_Z7(5rrV-ZV==Kdn,S75rrV-Z QBV=OPS=*-e:IXZs*t~> JcF'rrrCaP!GNAHrrPA6r7q>P4H'4FIK2^3\m#.78\4s%4So'Z_Z7(5rrV-ZV==Kdn,S75rrV-Z QBV=OPS=*-e:IXZs*t~> JcF'rrrCaP!GNAHrrPA6r7q>P4H'4FIK2^3\m#.78\4s%4So'Z_Z7(5rrV-ZV==Kdn,S75rrV-Z QBV=OPS=*-e:IXZs*t~> JcF'rrrCaP!f6pNr;Qi=!3+`Qs#dpnrr<7e]/^'4Hi;[u!WK;%rr`3B!"QU?s#g/X!lG#FnG`RK !2]2b!q62FnG`RK!1&iK"+h=mfn'0^s*t~> JcF'rrrCaP!f6pNr;Qi=!3+`Qs#dpnrr<7e]/^'4Hi;[u!WK;%rr`3B!"QU?s#g/X!lG#FnG`RK !2]2b!q62FnG`RK!1&iK"+h=mfn'0^s*t~> JcF'rrrCaP!f6pNr;Qi=!3+`Qs#dpnrr<7e]/^'4Hi;[u!WK;%rr`3B!"QU?s#g/X!lG#FnG`RK !2]2b!q62FnG`RK!1&iK"+h=mfn'0^s*t~> JcF'rrrCaP!iZ1Nr;Qgr,lQKts#dpnrr<'e!rW*!M=U]A_sIC)49,Yus8P4XrrU(<[.+(si;f_D rrVZiL[b<Fi;f0ps+13=s*t~> JcF'rrrCaP!iZ1Nr;Qgr,lQKts#dpnrr<'e!rW*!M=U]A_sIC)49,Yus8P4XrrU(<[.+(si;f_D rrVZiL[b<Fi;f0ps+13=s*t~> JcF'rrrCaP!iZ1Nr;Qgr,lQKts#dpnrr<'e!rW*!M=U]A_sIC)49,Yus8P4XrrU(<[.+(si;f_D rrVZiL[b<Fi;f0ps+13=s*t~> JcF'rrrCaP!m(GNrVlrS!gVL>s#dpnrW!*1R[jK[-h@<4!:Bdgoa_$\])VdmqYpW7!4;7q!oX-U nG`RZ!/L(D!oX-FJcC<$Rf@m~> JcF'rrrCaP!m(GNrVlrS!gVL>s#dpnrW!*1R[jK[-h@<4!:Bdgoa_$\])VdmqYpW7!4;7q!oX-U nG`RZ!/L(D!oX-FJcC<$Rf@m~> JcF'rrrCaP!m(GNrVlrS!gVL>s#dpnrW!*1R[jK[-h@<4!:Bdgoa_$\])VdmqYpW7!4;7q!oX-U nG`RZ!/L(D!oX-FJcC<$Rf@m~> JcF'rrrCaP!qHAOrVlqC&barYs#dpnrr<6)\GuRc!!Vrnp]0^]"*aeGQb*4s4So'Z_Z7(5rrV-Z V==Kdn,S75rrV-ZQ@]'es-it<~> JcF'rrrCaP!qHAOrVlqC&barYs#dpnrr<6)\GuRc!!Vrnp]0^]"*aeGQb*4s4So'Z_Z7(5rrV-Z V==Kdn,S75rrV-ZQ@]'es-it<~> JcF'rrrCaP!qHAOrVlqC&barYs#dpnrr<6)\GuRc!!Vrnp]0^]"*aeGQb*4s4So'Z_Z7(5rrV-Z V==Kdn,S75rrV-ZQ@]'es-it<~> JcF'rrrC^O!?keKrrW$5D;"sh4M1Xn!!#:`rrPOf!7q/QXoSM]qmuh-4So'Z_Z7.7rrV-ZV==Kd n,S75rrV-ZQ@]'es-it<~> JcF'rrrC^O!?keKrrW$5D;"sh4M1Xn!!#:`rrPOf!7q/QXoSM]qmuh-4So'Z_Z7.7rrV-ZV==Kd n,S75rrV-ZQ@]'es-it<~> JcF'rrrC^O!?keKrrW$5D;"sh4M1Xn!!#:`rrPOf!7q/QXoSM]qmuh-4So'Z_Z7.7rrV-ZV==Kd n,S75rrV-ZQ@]'es-it<~> JcF'rrrC^O!DY?JrrT8%db4[#4M1Xn!!#CcrrPOf!:p0b_sdU.]EeKZjgkEk4So'Z_Z7UDrrV-Z V==Kdn,S75rrV-ZQ@]'es-it<~> JcF'rrrC^O!DY?JrrT8%db4[#4M1Xn!!#CcrrPOf!:p0b_sdU.]EeKZjgkEk4So'Z_Z7UDrrV-Z V==Kdn,S75rrV-ZQ@]'es-it<~> JcF'rrrC^O!DY?JrrT8%db4[#4M1Xn!!#CcrrPOf!:p0b_sdU.]EeKZjgkEk4So'Z_Z7UDrrV-Z V==Kdn,S75rrV-ZQ@]'es-it<~> JcF'rrrC^O#(?gQs8P_Lf`1t6]Dqm2!(6bc!^cqfo)JIbnG`X&#ll('\GuRkqYpW*!5n=+!oX-U nG`RZ!/L(D!oX-FJcC<$Rf@m~> JcF'rrrC^O#(?gQs8P_Lf`1t6]Dqm2!(6bc!^cqfo)JIbnG`X&#ll('\GuRkqYpW*!5n=+!oX-U nG`RZ!/L(D!oX-FJcC<$Rf@m~> JcF'rrrC^O#(?gQs8P_Lf`1t6]Dqm2!(6bc!^cqfo)JIbnG`X&#ll('\GuRkqYpW*!5n=+!oX-U nG`RZ!/L(D!oX-FJcC<$Rf@m~> JcF'rrrC^O#.=NRs6TuKf`1t6]Dqm2!(6bc!^cqfo)JIbnc&a$#QQ11\,ZIjqYpW(!6js4!oX-U nG`RZ!/L(D!oX-FJcC<$Rf@m~> JcF'rrrC^O#.=NRs6TuKf`1t6]Dqm2!(6bc!^cqfo)JIbnc&a$#QQ11\,ZIjqYpW(!6js4!oX-U nG`RZ!/L(D!oX-FJcC<$Rf@m~> JcF'rrrC^O#.=NRs6TuKf`1t6]Dqm2!(6bc!^cqfo)JIbnc&a$#QQ11\,ZIjqYpW(!6js4!oX-U nG`RZ!/L(D!oX-FJcC<$Rf@m~> JcF'rrrC^O#42GQs-s,Kf`1t6]Dqm2!(6bc!^cqfgA_;_#6576r56/Hs#g/X!j;UPnG`RK!2]2b !q62FnG`RK!1&39JcD2=J,~> JcF'rrrC^O#42GQs-s,Kf`1t6]Dqm2!(6bc!^cqfgA_;_#6576r56/Hs#g/X!j;UPnG`RK!2]2b !q62FnG`RK!1&39JcD2=J,~> JcF'rrrC^O#42GQs-s,Kf`1t6]Dqm2!(6bc!^cqfgA_;_#6576r56/Hs#g/X!j;UPnG`RK!2]2b !q62FnG`RK!1&39JcD2=J,~> JcF'rrrC[N"=I=O760!"s#dpnrr<$drr3$e!!(aQ!!`2u]DqmnqYpVn!7UH;!oX-UnG`RZ!/L(D !pK]NJcC<$Rf@m~> JcF'rrrC[N"=I=O760!"s#dpnrr<$drr3$e!!(aQ!!`2u]DqmnqYpVn!7UH;!oX-UnG`RZ!/L(D !pK]NJcC<$Rf@m~> JcF'rrrC[N"=I=O760!"s#dpnrr<$drr3$e!!(aQ!!`2u]DqmnqYpVn!7UH;!oX-UnG`RZ!/L(D !pK]NJcC<$Rf@m~> JcF'rrrC[N"CrME#DC_/s#dpnrr<$drr3$e!!(aQpAhi*s#g/X!i5nUnG`RK!2]2b!q62FnG`RZ !1&39JcD2=J,~> JcF'rrrC[N"CrME#DC_/s#dpnrr<$drr3$e!!(aQpAhi*s#g/X!i5nUnG`RK!2]2b!q62FnG`RZ !1&39JcD2=J,~> JcF'rrrC[N"CrME#DC_/s#dpnrr<$drr3$e!!(aQpAhi*s#g/X!i5nUnG`RK!2]2b!q62FnG`RZ !1&39JcD2=J,~> JcF'rrrC[N"K2<f!6Wpns#bl4]DqmnqYpVb!9*GI!oX-UnG`RZ!/L(D!q62IJcC<$Rf@m~> JcF'rrrC[N"K2<f!6Wpns#bl4]DqmnqYpVb!9*GI!oX-UnG`RZ!/L(D!q62IJcC<$Rf@m~> JcF'rrrC[N"K2<f!6Wpns#bl4]DqmnqYpVb!9*GI!oX-UnG`RZ!/L(D!q62IJcC<$Rf@m~> JcF'rrrC[N"R?+S')gG^s#bl4]DqmnqYpV_!:'(R!oX-UnG`RZ!06RK!qH>HJcC<$Rf@m~> JcF'rrrC[N"R?+S')gG^s#bl4]DqmnqYpV_!:'(R!oX-UnG`RZ!06RK!qH>HJcC<$Rf@m~> JcF'rrrC[N"R?+S')gG^s#bl4]DqmnqYpV_!:'(R!oX-UnG`RZ!06RK!qH>HJcC<$Rf@m~> JcF'rrrCXM!](9ef)Pb4JcE@^s#g/X!g*KPnG`RK!2]2b!q62Un,ECgLOoJVs-it<~> JcF'rrrCXM!](9ef)Pb4JcE@^s#g/X!g*KPnG`RK!2]2b!q62Un,ECgLOoJVs-it<~> JcF'rrrCXM!](9ef)Pb4JcE@^s#g/X!g*KPnG`RK!2]2b!q62Un,ECgLOoJVs-it<~> JcF'rrrCXM!c\4+f)Pb4JcE@^s#g/X!f$dGnG`RK!2]2b!q62Un,ECgJV!iPs-it<~> JcF'rrrCXM!c\4+f)Pb4JcE@^s#g/X!f$dGnG`RK!2]2b!q62Un,ECgJV!iPs-it<~> JcF'rrrCXM!c\4+f)Pb4JcE@^s#g/X!f$dGnG`RK!2]2b!q62Un,ECgJV!iPs-it<~> JcF'rrrCXM!eC?>f)Pb4JcE@^s#g/X!J^[DrrV-ZV==Kdn,SdCrrE4HJcC<$Rf@m~> JcF'rrrCXM!eC?>f)Pb4JcE@^s#g/X!J^[DrrV-ZV==Kdn,SdCrrE4HJcC<$Rf@m~> JcF'rrrCXM!eC?>f)Pb4JcE@^s#g/X!J^[DrrV-ZV==Kdn,SdCrrE4HJcC<$Rf@m~> JcF'rrrCXM!`oS0f)Pb4JcE@^s#g/X!IFh8rrV-ZV==Kdn,SdCrrEXMJcC<$Rf@m~> JcF'rrrCXM!`oS0f)Pb4JcE@^s#g/X!IFh8rrV-ZV==Kdn,SdCrrEXMJcC<$Rf@m~> JcF'rrrCXM!`oS0f)Pb4JcE@^s#g/X!IFh8rrV-ZV==Kdn,SdCrrEXMJcC<$Rf@m~> JcF'rrrCXM!urs(pXfHF4G!OEs8P4XrrI?Mn,EIJ!2]2b!q62Un,ED-B7^)6s-it<~> JcF'rrrCXM!urs(pXfHF4G!OEs8P4XrrI?Mn,EIJ!2]2b!q62Un,ED-B7^)6s-it<~> JcF'rrrCXM!urs(pXfHF4G!OEs8P4XrrI?Mn,EIJ!2]2b!q62Un,ED-B7^)6s-it<~> JcF'rrrC[N"R,o9!2eBJs#bl4]DqmnqYpS3'^u&'i;f_DrrVZiQLFhS-!Gm"JcD2=J,~> JcF'rrrC[N"R,o9!2eBJs#bl4]DqmnqYpS3'^u&'i;f_DrrVZiQLFhS-!Gm"JcD2=J,~> JcF'rrrC[N"R,o9!2eBJs#bl4]DqmnqYpS3'^u&'i;f_DrrVZiQLFhS-!Gm"JcD2=J,~> JcF'rrrC[N"L\<O4%7d$s#bl4]DqmnqYpS$,ObX6i;f_DrrVZiQLFhS/l.&uJcD2=J,~> JcF'rrrC[N"L\<O4%7d$s#bl4]DqmnqYpS$,ObX6i;f_DrrVZiQLFhS/l.&uJcD2=J,~> JcF'rrrC[N"L\<O4%7d$s#bl4]DqmnqYpS$,ObX6i;f_DrrVZiQLFhS/l.&uJcD2=J,~> JcF'rrrC[N"bQsPSH@^$s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4So'Y:,25;!oX-UnG`RZ!1**R !B`f%s+13=s*t~> JcF'rrrC[N"bQsPSH@^$s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4So'Y:,25;!oX-UnG`RZ!1**R !B`f%s+13=s*t~> JcF'rrrC[N"bQsPSH@^$s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4So'Y:,25;!oX-UnG`RZ!1**R !B`f%s+13=s*t~> JcF'rrrC[N"]6rQo*orss*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4So'Y5X4`;!oX-UnG`RZ!1**R !DG>PrrUbJm=G;3rrW1;VpkZr~> JcF'rrrC[N"]6rQo*orss*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4So'Y5X4`;!oX-UnG`RZ!1**R !DG>PrrUbJm=G;3rrW1;VpkZr~> JcF'rrrC[N"]6rQo*orss*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4So'Y5X4`;!oX-UnG`RZ!1**R !DG>PrrUbJm=G;3rrW1;VpkZr~> JcF'rrrC[N"s.4Qs)/J?g&M(7JcE@^s#g/X!A[I>rrV-ZV==Kdn,SdCrrHRLbl7k)<YPTLS*BqT e._nWo)Ad`-!.JR!q[d?WrE.m-!/t'"47ATTC2^^o5G]QJ*d2c~> JcF'rrrC[N"s.4Qs)/J?g&M(7JcE@^s#g/X!A[I>rrV-ZV==Kdn,SdCrrHRLbl7k)<YPTLS*BqT e._nWo)Ad`-!.JR!q[d?WrE.m-!/t'"47ATTC2^^o5G]QJ*d2c~> JcF'rrrC[N"s.4Qs)/J?g&M(7JcE@^s#g/X!A[I>rrV-ZV==Kdn,SdCrrHRLbl7k)<YPTLS*BqT e._nWo)Ad`-!.JR!q[d?WrE.m-!/t'"47ATTC2^^o5G]QJ*d2c~> JcF'rrrC^O#O;ASs8V$\P1fm84G!OEs8P4XrrF'Kn,EIJ!2]2b!q62Un,EE5#gNARr?hRI-6@g) rr_X2!/9tC!m1KJh>[]PHQr_3Aa&%O!m1KJh>[W>E!cT_r;QuoHQr_3Aa&%O!m1KJh>[S^!X-@. rrcX.!$%9js*t~> JcF'rrrC^O#O;ASs8V$\P1fm84G!OEs8P4XrrF'Kn,EIJ!2]2b!q62Un,EE5#gNARr?hRI-6@g) rr_X2!/9tC!m1KJh>[]PHQr_3Aa&%O!m1KJh>[W>E!cT_r;QuoHQr_3Aa&%O!m1KJh>[S^!X-@. rrcX.!$%9js*t~> JcF'rrrC^O#O;ASs8V$\P1fm84G!OEs8P4XrrF'Kn,EIJ!2]2b!q62Un,EE5#gNARr?hRI-6@g) rr_X2!/9tC!m1KJh>[]PHQr_3Aa&%O!m1KJh>[W>E!cT_r;QuoHQr_3Aa&%O!m1KJh>[S^!X-@. rrcX.!$%9js*t~> JcGNF!p=RunG`RMFSYD*rrC^O!kSHNrr3%#*r=Ujs#bl4]Dqmnqu6`s"b#k>!o*dPnG`RZ!1**R !fd9NcMn!p!!(.(rrQO-8FZW\q+Q+krs8Kb!!=GK!%.<qrrW!iHL:_5W9!XO!paP*rVur9rVm0# 4TGR/"99e?i;WlS9R>Lo"*FSfp[J1a%fgtAs*t~> JcGNF!p=RunG`RMFSYD*rrC^O!kSHNrr3%#*r=Ujs#bl4]Dqmnqu6`s"b#k>!o*dPnG`RZ!1**R !fd9NcMn!p!!(.(rrQO-8FZW\q+Q+krs8Kb!!=GK!%.<qrrW!iHL:_5W9!XO!paP*rVur9rVm0# 4TGR/"99e?i;WlS9R>Lo"*FSfp[J1a%fgtAs*t~> JcGNF!p=RunG`RMFSYD*rrC^O!kSHNrr3%#*r=Ujs#bl4]Dqmnqu6`s"b#k>!o*dPnG`RZ!1**R !fd9NcMn!p!!(.(rrQO-8FZW\q+Q+krs8Kb!!=GK!%.<qrrW!iHL:_5W9!XO!paP*rVur9rVm0# 4TGR/"99e?i;WlS9R>Lo"*FSfp[J1a%fgtAs*t~> [f6Qa?QTFW-)9Q$!T1ZWrr_7(!*\pm"S3l=6h^$LrrC^O!g`oNrr3&E!LDI>s#bl4]Dqmnqu6`_ !0lsP!n%(FnG`RZ!1**R!i>tNcMms`!!)or#3fnE"Vk%grr30&!S0L?*2NT6"5!YVg%,.C=8`-U rs5"m%atC.'**dZrrR9JFn5P4=8`-frri:C!%7O7rs%is*h!'/_u9T@R/d`Fs4.h`L@kKIF9m$[ rr?.!!;ZZp!!'q5s8N'!_t!a/o+_7jnGiLg!5e%$J,~> [f6Qa?QTFW-)9Q$!T1ZWrr_7(!*\pm"S3l=6h^$LrrC^O!g`oNrr3&E!LDI>s#bl4]Dqmnqu6`_ !0lsP!n%(FnG`RZ!1**R!i>tNcMms`!!)or#3fnE"Vk%grr30&!S0L?*2NT6"5!YVg%,.C=8`-U rs5"m%atC.'**dZrrR9JFn5P4=8`-frri:C!%7O7rs%is*h!'/_u9T@R/d`Fs4.h`L@kKIF9m$[ rr?.!!;ZZp!!'q5s8N'!_t!a/o+_7jnGiLg!5e%$J,~> [f6Qa?QTFW-)9Q$!T1ZWrr_7(!*\pm"S3l=6h^$LrrC^O!g`oNrr3&E!LDI>s#bl4]Dqmnqu6`_ !0lsP!n%(FnG`RZ!1**R!i>tNcMms`!!)or#3fnE"Vk%grr30&!S0L?*2NT6"5!YVg%,.C=8`-U rs5"m%atC.'**dZrrR9JFn5P4=8`-frri:C!%7O7rs%is*h!'/_u9T@R/d`Fs4.h`L@kKIF9m$[ rr?.!!;ZZp!!'q5s8N'!_t!a/o+_7jnGiLg!5e%$J,~> hu<oV!o*b8!9a7Z#,sfs"=J]lmJd46%/^)*J*$\3*rn[orrha9!#3l[rs$89'Ef7UeGK7KNW9&N rUKpf!8.;PEt8-J!`9j-g].:9JcE@^s#g2Y!mq"Mn,EI;!2]2b!q62Un,EI4!41&Ps!n-o!!*!K s8No"*rlKk#lkIfs8N'!(^1iY"lK@[GQ:>*rrdEo+TMN!rs1jiF8u:,1]TH+rrNE*$1e*!F=SL7 !:^!knk9#nZh48$_YO33!5nd8#XAB2s8VFB!&jKL!XA]3o)Ai7.j4lmq>^Hp!5n[5rr<&:nG`Q6 !&X6G"8r3"`9RAQ~> hu<oV!o*b8!9a7Z#,sfs"=J]lmJd46%/^)*J*$\3*rn[orrha9!#3l[rs$89'Ef7UeGK7KNW9&N rUKpf!8.;PEt8-J!`9j-g].:9JcE@^s#g2Y!mq"Mn,EI;!2]2b!q62Un,EI4!41&Ps!n-o!!*!K s8No"*rlKk#lkIfs8N'!(^1iY"lK@[GQ:>*rrdEo+TMN!rs1jiF8u:,1]TH+rrNE*$1e*!F=SL7 !:^!knk9#nZh48$_YO33!5nd8#XAB2s8VFB!&jKL!XA]3o)Ai7.j4lmq>^Hp!5n[5rr<&:nG`Q6 !&X6G"8r3"`9RAQ~> hu<oV!o*b8!9a7Z#,sfs"=J]lmJd46%/^)*J*$\3*rn[orrha9!#3l[rs$89'Ef7UeGK7KNW9&N rUKpf!8.;PEt8-J!`9j-g].:9JcE@^s#g2Y!mq"Mn,EI;!2]2b!q62Un,EI4!41&Ps!n-o!!*!K s8No"*rlKk#lkIfs8N'!(^1iY"lK@[GQ:>*rrdEo+TMN!rs1jiF8u:,1]TH+rrNE*$1e*!F=SL7 !:^!knk9#nZh48$_YO33!5nd8#XAB2s8VFB!&jKL!XA]3o)Ai7.j4lmq>^Hp!5n[5rr<&:nG`Q6 !&X6G"8r3"`9RAQ~> hu<o8!Vuc6#laf&$3"9sbPL19!&3s2rs)0s!*HbEUVQ!krr<$dli.&Y!!U@@rrN+,qZ$X)cMRVD F8u;hnc/Uhf`(tI0`:qPeH:KZs8P34s1A=24T#-[X8p`<rrUUKV==Kdn,SdCrrVcmMU;D!!<<'8 C&faGs6VN@=o\L%!#jJf1'!aBs"j_<n,EI,!!)Tiq#L*f#SI->s1]KQ!"\`%!d"ZinG`R-!!)Qh "PtX/-J.berr<&:rVm-9!3Q:9)ZTjKo`"u7#BfP9!lG!<q>^Hp!5n[5rr<&:nG`U.!!2Z^rri.e !!(j?s*t~> hu<o8!Vuc6#laf&$3"9sbPL19!&3s2rs)0s!*HbEUVQ!krr<$dli.&Y!!U@@rrN+,qZ$X)cMRVD F8u;hnc/Uhf`(tI0`:qPeH:KZs8P34s1A=24T#-[X8p`<rrUUKV==Kdn,SdCrrVcmMU;D!!<<'8 C&faGs6VN@=o\L%!#jJf1'!aBs"j_<n,EI,!!)Tiq#L*f#SI->s1]KQ!"\`%!d"ZinG`R-!!)Qh "PtX/-J.berr<&:rVm-9!3Q:9)ZTjKo`"u7#BfP9!lG!<q>^Hp!5n[5rr<&:nG`U.!!2Z^rri.e !!(j?s*t~> hu<o8!Vuc6#laf&$3"9sbPL19!&3s2rs)0s!*HbEUVQ!krr<$dli.&Y!!U@@rrN+,qZ$X)cMRVD F8u;hnc/Uhf`(tI0`:qPeH:KZs8P34s1A=24T#-[X8p`<rrUUKV==Kdn,SdCrrVcmMU;D!!<<'8 C&faGs6VN@=o\L%!#jJf1'!aBs"j_<n,EI,!!)Tiq#L*f#SI->s1]KQ!"\`%!d"ZinG`R-!!)Qh "PtX/-J.berr<&:rVm-9!3Q:9)ZTjKo`"u7#BfP9!lG!<q>^Hp!5n[5rr<&:nG`U.!!2Z^rri.e !!(j?s*t~> hu<kl)ZTi6-iEuGS2gEErrQa3E:3`.%fdjRiW&oX!(6,Q"/#VoLA_&WIK2^3\m#.78c/Mjq_J3T ddmG<!8.;P.TZHH!auT$h#IC:JcE@^s#g2Y!eUXOn,EI;!2]2b!q62Umf*;/@a=uT_Z0]7rrO/? T`4s'U];21rr<&%s8S?cY5eM3!4_Lt!lG!<o)JM9p&>:"!5*X[23\(Di;Wkr!!)Ti"MbZN9(;<L rr<&:rVm-*!5*X[23\(Di;Wkr!!)rsp](<op]0pc"7?-hd.I>@IfKHhNTpIn~> hu<kl)ZTi6-iEuGS2gEErrQa3E:3`.%fdjRiW&oX!(6,Q"/#VoLA_&WIK2^3\m#.78c/Mjq_J3T ddmG<!8.;P.TZHH!auT$h#IC:JcE@^s#g2Y!eUXOn,EI;!2]2b!q62Umf*;/@a=uT_Z0]7rrO/? T`4s'U];21rr<&%s8S?cY5eM3!4_Lt!lG!<o)JM9p&>:"!5*X[23\(Di;Wkr!!)Ti"MbZN9(;<L rr<&:rVm-*!5*X[23\(Di;Wkr!!)rsp](<op]0pc"7?-hd.I>@IfKHhNTpIn~> hu<kl)ZTi6-iEuGS2gEErrQa3E:3`.%fdjRiW&oX!(6,Q"/#VoLA_&WIK2^3\m#.78c/Mjq_J3T ddmG<!8.;P.TZHH!auT$h#IC:JcE@^s#g2Y!eUXOn,EI;!2]2b!q62Umf*;/@a=uT_Z0]7rrO/? T`4s'U];21rr<&%s8S?cY5eM3!4_Lt!lG!<o)JM9p&>:"!5*X[23\(Di;Wkr!!)Ti"MbZN9(;<L rr<&:rVm-*!5*X[23\(Di;Wkr!!)rsp](<op]0pc"7?-hd.I>@IfKHhNTpIn~> hu<kL3WK,68,WAf0t[A`!n@8cmf3:e!(6Y`#ksNU*!QWk?eG;V#2<l<#6Yl4rr;]mnc&ag*WRAZ r;QfsYQ"P(r?)(MqYpZ8!!#pfs8N)PrrW-)H2IUCj:#/Gs8P34s1A=24T#-Z=XWY;!n%(FnG`RU !1*'Q!D>;qrrU(<!;uiu"9?7:rs-:="onT&!5n[5!WrG<n,EI,!!(mU#S$hR$B4nf!#"5i!lG!< oD\sl5l_,/mf3:e!5nd8#S$hR$B4nf!#"5i!lG!<r;ZaHrr<$Br[S!Kr[\!K!$V=loD\pi!!(+4 rreT2!![Z3s*t~> hu<kL3WK,68,WAf0t[A`!n@8cmf3:e!(6Y`#ksNU*!QWk?eG;V#2<l<#6Yl4rr;]mnc&ag*WRAZ r;QfsYQ"P(r?)(MqYpZ8!!#pfs8N)PrrW-)H2IUCj:#/Gs8P34s1A=24T#-Z=XWY;!n%(FnG`RU !1*'Q!D>;qrrU(<!;uiu"9?7:rs-:="onT&!5n[5!WrG<n,EI,!!(mU#S$hR$B4nf!#"5i!lG!< oD\sl5l_,/mf3:e!5nd8#S$hR$B4nf!#"5i!lG!<r;ZaHrr<$Br[S!Kr[\!K!$V=loD\pi!!(+4 rreT2!![Z3s*t~> hu<kL3WK,68,WAf0t[A`!n@8cmf3:e!(6Y`#ksNU*!QWk?eG;V#2<l<#6Yl4rr;]mnc&ag*WRAZ r;QfsYQ"P(r?)(MqYpZ8!!#pfs8N)PrrW-)H2IUCj:#/Gs8P34s1A=24T#-Z=XWY;!n%(FnG`RU !1*'Q!D>;qrrU(<!;uiu"9?7:rs-:="onT&!5n[5!WrG<n,EI,!!(mU#S$hR$B4nf!#"5i!lG!< oD\sl5l_,/mf3:e!5nd8#S$hR$B4nf!#"5i!lG!<r;ZaHrr<$Br[S!Kr[\!K!$V=loD\pi!!(+4 rreT2!![Z3s*t~> hu<k,=TAD6BDhc1"nVZl"8Vutnac_Z_uB]:2#Y>lrrC[I!!*P]rr3#!$2X`%s7ZN`rr]D(!0?gQ !^$Ggq>UOV!!;?UrrUFF,ME(ui;fGFrrS2\\D@2b4G!OEs8P4YrrF'Nmf*@:!2]2b!oX-Fmf*?K "7=G7!lG!<r;Qg5!2BJm#G(o:s8N'!_tsB7&ces#rrU(<!:p0c/+roJ1]T&]s8R9C5kP'X_0kJ9 rrU(<!:p-mq-a7.U@8-^!!'q8rs1F]/):1)G5so#rrU#akj\TR_Z0]4s8N'!_tsE5!!'q+rr_Nd !8@#D"/l2"hs15l~> hu<k,=TAD6BDhc1"nVZl"8Vutnac_Z_uB]:2#Y>lrrC[I!!*P]rr3#!$2X`%s7ZN`rr]D(!0?gQ !^$Ggq>UOV!!;?UrrUFF,ME(ui;fGFrrS2\\D@2b4G!OEs8P4YrrF'Nmf*@:!2]2b!oX-Fmf*?K "7=G7!lG!<r;Qg5!2BJm#G(o:s8N'!_tsB7&ces#rrU(<!:p0c/+roJ1]T&]s8R9C5kP'X_0kJ9 rrU(<!:p-mq-a7.U@8-^!!'q8rs1F]/):1)G5so#rrU#akj\TR_Z0]4s8N'!_tsE5!!'q+rr_Nd !8@#D"/l2"hs15l~> hu<k,=TAD6BDhc1"nVZl"8Vutnac_Z_uB]:2#Y>lrrC[I!!*P]rr3#!$2X`%s7ZN`rr]D(!0?gQ !^$Ggq>UOV!!;?UrrUFF,ME(ui;fGFrrS2\\D@2b4G!OEs8P4YrrF'Nmf*@:!2]2b!oX-Fmf*?K "7=G7!lG!<r;Qg5!2BJm#G(o:s8N'!_tsB7&ces#rrU(<!:p0c/+roJ1]T&]s8R9C5kP'X_0kJ9 rrU(<!:p-mq-a7.U@8-^!!'q8rs1F]/):1)G5so#rrU#akj\TR_Z0]4s8N'!_tsE5!!'q+rr_Nd !8@#D"/l2"hs15l~> iW&WPrr3!6qu$Hrl2Uk]o)JFas8Nej>*HA0VC;KFD?'Xe#65!P\[n"trr;u8rr<$UrPS1*"'km, j7`KToa_$\q>UPY!!&P^rr_L5!/9,+!knZOqYpZp0I-8Is8P34s1A=24T,3\e,ZK9rrUUKV==Kd i;f23rrU^NWR(SG_Z0]7rs_p-/F!3".faDcrr<&:qYpU\!-[i2!lG!<o)JLcp&>;M!#+#bdglGI p&>-m$ij&lrrU(<!:^!kMuj!#r:0ge!!'q8rs45W'A3?6%fi'krr`3.!)E%`!lG!<q>^Hp!5n[5 rr<&:nG`U%!"Ahsrr`)t!6+7'J,~> iW&WPrr3!6qu$Hrl2Uk]o)JFas8Nej>*HA0VC;KFD?'Xe#65!P\[n"trr;u8rr<$UrPS1*"'km, j7`KToa_$\q>UPY!!&P^rr_L5!/9,+!knZOqYpZp0I-8Is8P34s1A=24T,3\e,ZK9rrUUKV==Kd i;f23rrU^NWR(SG_Z0]7rs_p-/F!3".faDcrr<&:qYpU\!-[i2!lG!<o)JLcp&>;M!#+#bdglGI p&>-m$ij&lrrU(<!:^!kMuj!#r:0ge!!'q8rs45W'A3?6%fi'krr`3.!)E%`!lG!<q>^Hp!5n[5 rr<&:nG`U%!"Ahsrr`)t!6+7'J,~> iW&WPrr3!6qu$Hrl2Uk]o)JFas8Nej>*HA0VC;KFD?'Xe#65!P\[n"trr;u8rr<$UrPS1*"'km, j7`KToa_$\q>UPY!!&P^rr_L5!/9,+!knZOqYpZp0I-8Is8P34s1A=24T,3\e,ZK9rrUUKV==Kd i;f23rrU^NWR(SG_Z0]7rs_p-/F!3".faDcrr<&:qYpU\!-[i2!lG!<o)JLcp&>;M!#+#bdglGI p&>-m$ij&lrrU(<!:^!kMuj!#r:0ge!!'q8rs45W'A3?6%fi'krr`3.!)E%`!lG!<q>^Hp!5n[5 rr<&:nG`U%!"Ahsrr`)t!6+7'J,~> hu<j)V#UH9YkA"tWrOgCs7ZNhrs>A!!(d.i?iU21pAb-m!(6/R!\"*hp&>,=!!&A]rr^OH!,D9. "o"E+!&=9%rrShnh>.'PaTH55s8P34s1A=24T,3\E=_[/rrUUKV==Kdi;f22rrF6Gci4'a!!)rs% Fkje#:9ZU+mT+-!!'q5rr\&W,Q@96s!n-o!!*!KiVs2S,6.ik!rtO_o`"tN!"&5rs!n-o!!*!Ko )Aj$%KK#np&G"5rr<KF+!:O_nfn,;,6Ip0r:L!j2?4'Ss8OSN+TMNA/,]GI!!'q5s8N'!_sm[-B E2*&s8N'!_s78P~> hu<j)V#UH9YkA"tWrOgCs7ZNhrs>A!!(d.i?iU21pAb-m!(6/R!\"*hp&>,=!!&A]rr^OH!,D9. "o"E+!&=9%rrShnh>.'PaTH55s8P34s1A=24T,3\E=_[/rrUUKV==Kdi;f22rrF6Gci4'a!!)rs% Fkje#:9ZU+mT+-!!'q5rr\&W,Q@96s!n-o!!*!KiVs2S,6.ik!rtO_o`"tN!"&5rs!n-o!!*!Ko )Aj$%KK#np&G"5rr<KF+!:O_nfn,;,6Ip0r:L!j2?4'Ss8OSN+TMNA/,]GI!!'q5s8N'!_sm[-B E2*&s8N'!_s78P~> hu<j)V#UH9YkA"tWrOgCs7ZNhrs>A!!(d.i?iU21pAb-m!(6/R!\"*hp&>,=!!&A]rr^OH!,D9. "o"E+!&=9%rrShnh>.'PaTH55s8P34s1A=24T,3\E=_[/rrUUKV==Kdi;f22rrF6Gci4'a!!)rs% Fkje#:9ZU+mT+-!!'q5rr\&W,Q@96s!n-o!!*!KiVs2S,6.ik!rtO_o`"tN!"&5rs!n-o!!*!Ko )Aj$%KK#np&G"5rr<KF+!:O_nfn,;,6Ip0r:L!j2?4'Ss8OSN+TMNA/,]GI!!'q5s8N'!_sm[-B E2*&s8N'!_s78P~> hu<if^An09b4bi;rAFY@mf3:e!(6V_"5e#I$iL&/6i[0+!$_+9rr<$dmJd4s!'9iR"Khb*2uEFN "7Z?k;#1+qm=Q/S!']]#rrS#WpA"XhHiUD.s8P3Srr_bXRIHmLs#g8[!mq<tmJd79!2]2b!oX-F mJd6C#3+#0!lG!<qu6lM;\T?TD!M$"rr<&:qYpZ_#lpsqs7lZQrs%Xo('Pq1p%/1bhZ+/Ws7lZb rrUarHM%75!<3!&k?o&/,CK1UrrV'X%eBYq!8meYjpM1,nG`Oj!5Rn"J,~> hu<if^An09b4bi;rAFY@mf3:e!(6V_"5e#I$iL&/6i[0+!$_+9rr<$dmJd4s!'9iR"Khb*2uEFN "7Z?k;#1+qm=Q/S!']]#rrS#WpA"XhHiUD.s8P3Srr_bXRIHmLs#g8[!mq<tmJd79!2]2b!oX-F mJd6C#3+#0!lG!<qu6lM;\T?TD!M$"rr<&:qYpZ_#lpsqs7lZQrs%Xo('Pq1p%/1bhZ+/Ws7lZb rrUarHM%75!<3!&k?o&/,CK1UrrV'X%eBYq!8meYjpM1,nG`Oj!5Rn"J,~> hu<if^An09b4bi;rAFY@mf3:e!(6V_"5e#I$iL&/6i[0+!$_+9rr<$dmJd4s!'9iR"Khb*2uEFN "7Z?k;#1+qm=Q/S!']]#rrS#WpA"XhHiUD.s8P3Srr_bXRIHmLs#g8[!mq<tmJd79!2]2b!oX-F mJd6C#3+#0!lG!<qu6lM;\T?TD!M$"rr<&:qYpZ_#lpsqs7lZQrs%Xo('Pq1p%/1bhZ+/Ws7lZb rrUarHM%75!<3!&k?o&/,CK1UrrV'X%eBYq!8meYjpM1,nG`Oj!5Rn"J,~> i;X#Q!8.>8!9EkR",6e8qsOLa!!#C`rrL"Fq>^[ds8N6&5P>'V!!#CRrrN9&5PP0\]EeKZjnSiX qZ$Ufqu6ooGROQP1T10&rrI*Lp\t?m3"tB2s8P3Trrqg7!!"54U&Y-Ts8N6!ZPjhMmJd79!2]2b !oX-FmJd7V%rS]Q",$Xmm'ZipU]=0CrrD]?rrStr:<<G:;#jP`rrNr9FR&mV~> i;X#Q!8.>8!9EkR",6e8qsOLa!!#C`rrL"Fq>^[ds8N6&5P>'V!!#CRrrN9&5PP0\]EeKZjnSiX qZ$Ufqu6ooGROQP1T10&rrI*Lp\t?m3"tB2s8P3Trrqg7!!"54U&Y-Ts8N6!ZPjhMmJd79!2]2b !oX-FmJd7V%rS]Q",$Xmm'ZipU]=0CrrD]?rrStr:<<G:;#jP`rrNr9FR&mV~> i;X#Q!8.>8!9EkR",6e8qsOLa!!#C`rrL"Fq>^[ds8N6&5P>'V!!#CRrrN9&5PP0\]EeKZjnSiX qZ$Ufqu6ooGROQP1T10&rrI*Lp\t?m3"tB2s8P3Trrqg7!!"54U&Y-Ts8N6!ZPjhMmJd79!2]2b !oX-FmJd7V%rS]Q",$Xmm'ZipU]=0CrrD]?rrStr:<<G:;#jP`rrNr9FR&mV~> i;X#9!:p07!rVfm"0DVUkjAEM!!#C`rsggb!HP]fJ,fR:s8NZ2,5)!9!!#CRrrNc4/bo>K\d8?Y h=ppOm/R,hqu6d`!!#U)eGfPP-MIHAh@;^EiW&p?U&P+[r;ZgHTg\nl"Zn4E!&E-lrrUUKV==Kd i;f21rrRHJ_mB@Gr'CBHosk#)PS=*-e?&ZQPS=*-eB.^mIfLYYn,EN,!!"%)m/MS~> i;X#9!:p07!rVfm"0DVUkjAEM!!#C`rsggb!HP]fJ,fR:s8NZ2,5)!9!!#CRrrNc4/bo>K\d8?Y h=ppOm/R,hqu6d`!!#U)eGfPP-MIHAh@;^EiW&p?U&P+[r;ZgHTg\nl"Zn4E!&E-lrrUUKV==Kd i;f21rrRHJ_mB@Gr'CBHosk#)PS=*-e?&ZQPS=*-eB.^mIfLYYn,EN,!!"%)m/MS~> i;X#9!:p07!rVfm"0DVUkjAEM!!#C`rsggb!HP]fJ,fR:s8NZ2,5)!9!!#CRrrNc4/bo>K\d8?Y h=ppOm/R,hqu6d`!!#U)eGfPP-MIHAh@;^EiW&p?U&P+[r;ZgHTg\nl"Zn4E!&E-lrrUUKV==Kd i;f21rrRHJ_mB@Gr'CBHosk#)PS=*-e?&ZQPS=*-eB.^mIfLYYn,EN,!!"%)m/MS~> irA`Qq>UQ'#"A%Js8N'!6i6lb"TUI[rs=&Q!(6ed70!=kpAY0r!&*a>"#U&`q>1*o[g2s[iqEBS `;fmhqu6d`!!#L&eGfP95P>$XWW?Pes8P3TrrAMd!!"IA7/mf$6reHBrTjIbdK$-5rrV-ZQL+VR oHtC)Zi:-t1]WrRrr[ih>1otV"+h=mfua6rciP->mf*FaFrpg9m/MS~> irA`Qq>UQ'#"A%Js8N'!6i6lb"TUI[rs=&Q!(6ed70!=kpAY0r!&*a>"#U&`q>1*o[g2s[iqEBS `;fmhqu6d`!!#L&eGfP95P>$XWW?Pes8P3TrrAMd!!"IA7/mf$6reHBrTjIbdK$-5rrV-ZQL+VR oHtC)Zi:-t1]WrRrr[ih>1otV"+h=mfua6rciP->mf*FaFrpg9m/MS~> irA`Qq>UQ'#"A%Js8N'!6i6lb"TUI[rs=&Q!(6ed70!=kpAY0r!&*a>"#U&`q>1*o[g2s[iqEBS `;fmhqu6d`!!#L&eGfP95P>$XWW?Pes8P3TrrAMd!!"IA7/mf$6reHBrTjIbdK$-5rrV-ZQL+VR oHtC)Zi:-t1]WrRrr[ih>1otV"+h=mfua6rciP->mf*FaFrpg9m/MS~> i;WtC4TGG58GN2eUBPZ8li6tb!(6Y`"WIFIR($2s!"20os/l>%#BmVhP"bcQ"s3gFK#"gSnc&]1 !!'Y.rrf\6!"Q%,_tsB8JcGebqu6ooGRXWQ1T10&rrFNKo`"uD!/ok:s#d"T"n*W8!$^p+s8P4D rrUUKV==Kdi;f20rr_!m&[A\B!V;h4s.KAmXl.\.J,~> i;WtC4TGG58GN2eUBPZ8li6tb!(6Y`"WIFIR($2s!"20os/l>%#BmVhP"bcQ"s3gFK#"gSnc&]1 !!'Y.rrf\6!"Q%,_tsB8JcGebqu6ooGRXWQ1T10&rrFNKo`"uD!/ok:s#d"T"n*W8!$^p+s8P4D rrUUKV==Kdi;f20rr_!m&[A\B!V;h4s.KAmXl.\.J,~> i;WtC4TGG58GN2eUBPZ8li6tb!(6Y`"WIFIR($2s!"20os/l>%#BmVhP"bcQ"s3gFK#"gSnc&]1 !!'Y.rrf\6!"Q%,_tsB8JcGebqu6ooGRXWQ1T10&rrFNKo`"uD!/ok:s#d"T"n*W8!$^p+s8P4D rrUUKV==Kdi;f20rr_!m&[A\B!V;h4s.KAmXl.\.J,~> i;Wsu?2sq4CARr4rd5*MrVlmZhs^UF!!#C`rr@HE!!?'u!(6bc!,_Q4qu6YLqZ-0d"3(<@>5S=" #5A2qrri<H!#kh3rs%kE(]XP!lIc+;&T@=A"9)C)Z/bla4J;]Vn<oa7T`>$Sk5PM2!2]2b!oX-F lMh%G2ZQ=Wrp]pge*hkfJcE1YJ,~> i;Wsu?2sq4CARr4rd5*MrVlmZhs^UF!!#C`rr@HE!!?'u!(6bc!,_Q4qu6YLqZ-0d"3(<@>5S=" #5A2qrri<H!#kh3rs%kE(]XP!lIc+;&T@=A"9)C)Z/bla4J;]Vn<oa7T`>$Sk5PM2!2]2b!oX-F lMh%G2ZQ=Wrp]pge*hkfJcE1YJ,~> i;Wsu?2sq4CARr4rd5*MrVlmZhs^UF!!#C`rr@HE!!?'u!(6bc!,_Q4qu6YLqZ-0d"3(<@>5S=" #5A2qrri<H!#kh3rs%kE(]XP!lIc+;&T@=A"9)C)Z/bla4J;]Vn<oa7T`>$Sk5PM2!2]2b!oX-F lMh%G2ZQ=Wrp]pge*hkfJcE1YJ,~> i;WsRIfKF4N;NVWoM@-jrVlo_)".G(!!#C`rsARM)?_CFqu?^arVm)-9,7X</T1Ic#6'c>#m2,9 nG`SN!!CgMs7ZNjrr]"r!0$XO"o+K,!&43%rrW#sK_,3Gof!)cjT#6BJcE@^s#fHD!n%(FnG`RK !1)mL$2^GO!#&.g[ak!Brr\#fJFA'hao;Fn;!m3@!rd)8QiDR~> i;WsRIfKF4N;NVWoM@-jrVlo_)".G(!!#C`rsARM)?_CFqu?^arVm)-9,7X</T1Ic#6'c>#m2,9 nG`SN!!CgMs7ZNjrr]"r!0$XO"o+K,!&43%rrW#sK_,3Gof!)cjT#6BJcE@^s#fHD!n%(FnG`RK !1)mL$2^GO!#&.g[ak!Brr\#fJFA'hao;Fn;!m3@!rd)8QiDR~> i;WsRIfKF4N;NVWoM@-jrVlo_)".G(!!#C`rsARM)?_CFqu?^arVm)-9,7X</T1Ic#6'c>#m2,9 nG`SN!!CgMs7ZNjrr]"r!0$XO"o+K,!&43%rrW#sK_,3Gof!)cjT#6BJcE@^s#fHD!n%(FnG`RK !1)mL$2^GO!#&.g[ak!Brr\#fJFA'hao;Fn;!m3@!rd)8QiDR~> i;Ws/TE"p3Xo/2$i@b0Sr?hXn$U(fq"NUWE3rJFG"R6g(,PLd0"6h36K\HG-l2[(>rr_^D$GY^& s#bl4]Dqmnk5PM2!2]2b!oX-Fk5PP!DD2.k!!<]K+u8sM"WIFA&:j6&rrVg==7H4kmuUB#rrq=] 'ESu<hu<l<<YPTLS*L"TmuUBArr^ab!2B&a!q[d?o)Ag>#Q^Qbs*t~> i;Ws/TE"p3Xo/2$i@b0Sr?hXn$U(fq"NUWE3rJFG"R6g(,PLd0"6h36K\HG-l2[(>rr_^D$GY^& s#bl4]Dqmnk5PM2!2]2b!oX-Fk5PP!DD2.k!!<]K+u8sM"WIFA&:j6&rrVg==7H4kmuUB#rrq=] 'ESu<hu<l<<YPTLS*L"TmuUBArr^ab!2B&a!q[d?o)Ag>#Q^Qbs*t~> i;Ws/TE"p3Xo/2$i@b0Sr?hXn$U(fq"NUWE3rJFG"R6g(,PLd0"6h36K\HG-l2[(>rr_^D$GY^& s#bl4]Dqmnk5PM2!2]2b!oX-Fk5PP!DD2.k!!<]K+u8sM"WIFA&:j6&rrVg==7H4kmuUB#rrq=] 'ESu<hu<l<<YPTLS*L"TmuUBArr^ab!2B&a!q[d?o)Ag>#Q^Qbs*t~> iVs,\#J^<7!mgfE!.XbD!,Sq?"+1(KD"%B,q*=ua`:Ep0c2]*CrrUpTU[e?dl7<@_k5YHDJcE@^ s#fHD!n%(FnG`RK!1)[F#Ood6NHAc9;>il_8H)Tm/H>b^J+)(j!m1KJnG`R-!!(gS#5onL""#(A i;X#[-NF5q*eWbX!lG!<qYpZb+97,crrU=C#P%frYlY'ERK%d~> iVs,\#J^<7!mgfE!.XbD!,Sq?"+1(KD"%B,q*=ua`:Ep0c2]*CrrUpTU[e?dl7<@_k5YHDJcE@^ s#fHD!n%(FnG`RK!1)[F#Ood6NHAc9;>il_8H)Tm/H>b^J+)(j!m1KJnG`R-!!(gS#5onL""#(A i;X#[-NF5q*eWbX!lG!<qYpZb+97,crrU=C#P%frYlY'ERK%d~> iVs,\#J^<7!mgfE!.XbD!,Sq?"+1(KD"%B,q*=ua`:Ep0c2]*CrrUpTU[e?dl7<@_k5YHDJcE@^ s#fHD!n%(FnG`RK!1)[F#Ood6NHAc9;>il_8H)Tm/H>b^J+)(j!m1KJnG`R-!!(gS#5onL""#(A i;X#[-NF5q*eWbX!lG!<qYpZb+97,crrU=C#P%frYlY'ERK%d~> JcGTH"T;:"!.",7"Sb[k!M/`[rrCdQ!mCYMnG`UR-4@3Ds8P34s1A=24QcYFdK$-5rrV-ZQIGj9 LCet(fDbpJ9R?4.!lG!<h#@K)!!(-srr^[L!6OF(!lG!<qYpV(!(cVZ!r5N9nG`T5!$_0+s*t~> JcGTH"T;:"!.",7"Sb[k!M/`[rrCdQ!mCYMnG`UR-4@3Ds8P34s1A=24QcYFdK$-5rrV-ZQIGj9 LCet(fDbpJ9R?4.!lG!<h#@K)!!(-srr^[L!6OF(!lG!<qYpV(!(cVZ!r5N9nG`T5!$_0+s*t~> JcGTH"T;:"!.",7"Sb[k!M/`[rrCdQ!mCYMnG`UR-4@3Ds8P34s1A=24QcYFdK$-5rrV-ZQIGj9 LCet(fDbpJ9R?4.!lG!<h#@K)!!(-srr^[L!6OF(!lG!<qYpV(!(cVZ!r5N9nG`T5!$_0+s*t~> JcGQG"8PjuWq$)kqc3ffn,NCfgA_5f!5e4)"6hZGSEU"Q4G!OEs8P4DrrUUKV==Kdi;f1mrrLU; fDbhPr;ccq"oo%Z3X$hBrr;cohu<bq!!(gS!lG!<r;R#]A0qNb,'3ATrrqb,*Wum/rr;corr3)Q !Wq'Grr?.!!:^!jo+_7jqu6_>#^)pBJ,~> JcGQG"8PjuWq$)kqc3ffn,NCfgA_5f!5e4)"6hZGSEU"Q4G!OEs8P4DrrUUKV==Kdi;f1mrrLU; fDbhPr;ccq"oo%Z3X$hBrr;cohu<bq!!(gS!lG!<r;R#]A0qNb,'3ATrrqb,*Wum/rr;corr3)Q !Wq'Grr?.!!:^!jo+_7jqu6_>#^)pBJ,~> JcGQG"8PjuWq$)kqc3ffn,NCfgA_5f!5e4)"6hZGSEU"Q4G!OEs8P4DrrUUKV==Kdi;f1mrrLU; fDbhPr;ccq"oo%Z3X$hBrr;cohu<bq!!(gS!lG!<r;R#]A0qNb,'3ATrrqb,*Wum/rr;corr3)Q !Wq'Grr?.!!:^!jo+_7jqu6_>#^)pBJ,~> JcGNF!WC10rrN&?mf3:egA_5W!7C67"7o(aJa*474G!OEs8P4DrrUUKV==Kdi;f1ArrdEo+TMN? rsf#1'atWR(An.3.k;bC!<+M-s8OSN+TMNA/)gO..fpjo!<+MKrt)L:(+9pu!*fL'm3M`6,SgCZ s8OSN+TMNA/,oPMGQ:>*rrdEo+TMN2rrRBE2#I:S#65(*s*t~> JcGNF!WC10rrN&?mf3:egA_5W!7C67"7o(aJa*474G!OEs8P4DrrUUKV==Kdi;f1ArrdEo+TMN? rsf#1'atWR(An.3.k;bC!<+M-s8OSN+TMNA/)gO..fpjo!<+MKrt)L:(+9pu!*fL'm3M`6,SgCZ s8OSN+TMNA/,oPMGQ:>*rrdEo+TMN2rrRBE2#I:S#65(*s*t~> JcGNF!WC10rrN&?mf3:egA_5W!7C67"7o(aJa*474G!OEs8P4DrrUUKV==Kdi;f1ArrdEo+TMN? rsf#1'atWR(An.3.k;bC!<+M-s8OSN+TMNA/)gO..fpjo!<+MKrt)L:(+9pu!*fL'm3M`6,SgCZ s8OSN+TMNA/,oPMGQ:>*rrdEo+TMN2rrRBE2#I:S#65(*s*t~> JcF'rrrCdQ!hKDMmJd=d@/s<tli6uIJcE@^s#fHD!n%(FnG`RK!1'J]!lG!<r;Zcs"X<-_!!(FF rrU(<!8dbO!;6Bf!;6Bf!<<'1mHOZNr`9(.s8R$<+5-\odes+H_Z0]6rrP"WOmi;O_Z0]*rr^.= !V60g!d"ZiU]5i~> JcF'rrrCdQ!hKDMmJd=d@/s<tli6uIJcE@^s#fHD!n%(FnG`RK!1'J]!lG!<r;Zcs"X<-_!!(FF rrU(<!8dbO!;6Bf!;6Bf!<<'1mHOZNr`9(.s8R$<+5-\odes+H_Z0]6rrP"WOmi;O_Z0]*rr^.= !V60g!d"ZiU]5i~> JcF'rrrCdQ!hKDMmJd=d@/s<tli6uIJcE@^s#fHD!n%(FnG`RK!1'J]!lG!<r;Zcs"X<-_!!(FF rrU(<!8dbO!;6Bf!;6Bf!<<'1mHOZNr`9(.s8R$<+5-\odes+H_Z0]6rrP"WOmi;O_Z0]*rr^.= !V60g!d"ZiU]5i~> JcF'rrrCdQ!fm?Mli.'I"XVU`s8P34s1A=24QcYFdK$QArrV-ZR\g#c_Z0]7s8N'&ZN'n(!6"j9 !lG!<h#@Gn!!)Tiq()(:!lG!<qu7&GBK7UY!!*'!*rqf*rrU(<!;lct%KO$-rrU(<!:TpimJm76 S,\!~> JcF'rrrCdQ!fm?Mli.'I"XVU`s8P34s1A=24QcYFdK$QArrV-ZR\g#c_Z0]7s8N'&ZN'n(!6"j9 !lG!<h#@Gn!!)Tiq()(:!lG!<qu7&GBK7UY!!*'!*rqf*rrU(<!;lct%KO$-rrU(<!:TpimJm76 S,\!~> JcF'rrrCdQ!fm?Mli.'I"XVU`s8P34s1A=24QcYFdK$QArrV-ZR\g#c_Z0]7s8N'&ZN'n(!6"j9 !lG!<h#@Gn!!)Tiq()(:!lG!<qu7&GBK7UY!!*'!*rqf*rrU(<!;lct%KO$-rrU(<!:TpimJm76 S,\!~> JcF'rrrCdQ!f$dNlMgt,*"&>*s8P34s1A=24QcYFdK$ZDrrV-ZV5=1n_Z0]7s8N'&_uK`:!5nd8 !lG!<h#@Gn!!(gS!lG!<r;Qej!W)lsrrN<'^\Ig1_Z0]6rrN9&_!h:)_Z0]*rr`,u!6CZ0J,~> JcF'rrrCdQ!f$dNlMgt,*"&>*s8P34s1A=24QcYFdK$ZDrrV-ZV5=1n_Z0]7s8N'&_uK`:!5nd8 !lG!<h#@Gn!!(gS!lG!<r;Qej!W)lsrrN<'^\Ig1_Z0]6rrN9&_!h:)_Z0]*rr`,u!6CZ0J,~> JcF'rrrCdQ!f$dNlMgt,*"&>*s8P34s1A=24QcYFdK$ZDrrV-ZV5=1n_Z0]7s8N'&_uK`:!5nd8 !lG!<h#@Gn!!(gS!lG!<r;Qej!W)lsrrN<'^\Ig1_Z0]6rrN9&_!h:)_Z0]*rr`,u!6CZ0J,~> JcF'rrrCdQ!Ib%4rrhUV!)VkIs8P34s1A=24QcYFdK$ZDrrV-ZV5=1n_Z0]7s8N'&_uK`:!5nd8 "2b*=rn[SU_Z0]-s7n2:rrU(<!;uj*)ZXO=s*F_Gs8N`4S,!!c_Z0]9r;Qg2!35Mf!lG!<n,ELT !!(aNrrU#akbJ0.~> JcF'rrrCdQ!Ib%4rrhUV!)VkIs8P34s1A=24QcYFdK$ZDrrV-ZV5=1n_Z0]7s8N'&_uK`:!5nd8 "2b*=rn[SU_Z0]-s7n2:rrU(<!;uj*)ZXO=s*F_Gs8N`4S,!!c_Z0]9r;Qg2!35Mf!lG!<n,ELT !!(aNrrU#akbJ0.~> JcF'rrrCdQ!Ib%4rrhUV!)VkIs8P34s1A=24QcYFdK$ZDrrV-ZV5=1n_Z0]7s8N'&_uK`:!5nd8 "2b*=rn[SU_Z0]-s7n2:rrU(<!;uj*)ZXO=s*F_Gs8N`4S,!!c_Z0]9r;Qg2!35Mf!lG!<n,ELT !!(aNrrU#akbJ0.~> JcF'rrrCdQ!I+t7rri=c$k]3&s8P34s1A=24QcYFdK$ZDrrV-ZV5=1n_Z0]7s8N'&_uK`:!5nd8 "j?rHd/X"#rrU(<!:p0c!;$3l_Z0]7rt#D8V>nmd!!*'!;ZIoms8UXIrrpUH!7:cCrr3$`!-[i2 !lG!<n,EL$!"Ai)rr`3.!)B<hJ,~> JcF'rrrCdQ!I+t7rri=c$k]3&s8P34s1A=24QcYFdK$ZDrrV-ZV5=1n_Z0]7s8N'&_uK`:!5nd8 "j?rHd/X"#rrU(<!:p0c!;$3l_Z0]7rt#D8V>nmd!!*'!;ZIoms8UXIrrpUH!7:cCrr3$`!-[i2 !lG!<n,EL$!"Ai)rr`3.!)B<hJ,~> JcF'rrrCdQ!I+t7rri=c$k]3&s8P34s1A=24QcYFdK$ZDrrV-ZV5=1n_Z0]7s8N'&_uK`:!5nd8 "j?rHd/X"#rrU(<!:p0c!;$3l_Z0]7rt#D8V>nmd!!*'!;ZIoms8UXIrrpUH!7:cCrr3$`!-[i2 !lG!<n,EL$!"Ai)rr`3.!)B<hJ,~> JcF'rrrCdQ!GrA/rrh4J!(l,>s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4QcYF`;m:7rrV-ZV5O@n .fpjo!<+MKs8N'&_uK`:!5nd8"n`B+#q$);rrU(<!8RSU_Z0]7rt%U!"![jd!!*'!dgH-W,o-LY rrr'+!!t"[rr3(V!$hL6s8OSN+TMNA/+W]ABE2*1rrP(Y$)@NN~> JcF'rrrCdQ!GrA/rrh4J!(l,>s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4QcYF`;m:7rrV-ZV5O@n .fpjo!<+MKs8N'&_uK`:!5nd8"n`B+#q$);rrU(<!8RSU_Z0]7rt%U!"![jd!!*'!dgH-W,o-LY rrr'+!!t"[rr3(V!$hL6s8OSN+TMNA/+W]ABE2*1rrP(Y$)@NN~> JcF'rrrCdQ!GrA/rrh4J!(l,>s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4QcYF`;m:7rrV-ZV5O@n .fpjo!<+MKs8N'&_uK`:!5nd8"n`B+#q$);rrU(<!8RSU_Z0]7rt%U!"![jd!!*'!dgH-W,o-LY rrr'+!!t"[rr3(V!$hL6s8OSN+TMNA/+W]ABE2*1rrP(Y$)@NN~> JcF'rrrCdQ!GNM6rrrCk'*`OHo`';$/=F3Oo9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H ]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\l RIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl/3N(p!lG#FnG`RK!2ZUn q#LHprr<5?s8N'!_u0N;^G,lu1>i*5_Z0\lrrU(<!;uj%iBme`Cq0NGrr3/O;A0*H;#C7q^G,lu 1B.:Ul3RHio)JLcoD\pT$NS*ArrV'X%\s&S~> JcF'rrrCdQ!GNM6rrrCk'*`OHo`';$/=F3Oo9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H ]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\l RIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl/3N(p!lG#FnG`RK!2ZUn q#LHprr<5?s8N'!_u0N;^G,lu1>i*5_Z0\lrrU(<!;uj%iBme`Cq0NGrr3/O;A0*H;#C7q^G,lu 1B.:Ul3RHio)JLcoD\pT$NS*ArrV'X%\s&S~> JcF'rrrCdQ!GNM6rrrCk'*`OHo`';$/=F3Oo9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H ]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\l RIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl/3N(p!lG#FnG`RK!2ZUn q#LHprr<5?s8N'!_u0N;^G,lu1>i*5_Z0\lrrU(<!;uj%iBme`Cq0NGrr3/O;A0*H;#C7q^G,lu 1B.:Ul3RHio)JLcoD\pT$NS*ArrV'X%\s&S~> JcF'rrrCdQ!F-]*rrqk4"r*@"pAb.TJcE@^s#fHD!lG#FnG`RK!2Y8HRK!AB!#k4[rrQ$t;u6Lq U]=/bs*t~> JcF'rrrCdQ!F-]*rrqk4"r*@"pAb.TJcE@^s#fHD!lG#FnG`RK!2Y8HRK!AB!#k4[rrQ$t;u6Lq U]=/bs*t~> JcF'rrrCdQ!F-]*rrqk4"r*@"pAb.TJcE@^s#fHD!lG#FnG`RK!2Y8HRK!AB!#k4[rrQ$t;u6Lq U]=/bs*t~> JcF'rrrCdQ!Eq#3rrq.S!%=Q;q#C@VJcE@^s#fHD!lG#FnG`RK!2Y8HRK!Ef63'1Ahu<e.!$U_, rreQ#!"RMRs*t~> JcF'rrrCdQ!Eq#3rrq.S!%=Q;q#C@VJcE@^s#fHD!lG#FnG`RK!2Y8HRK!Ef63'1Ahu<e.!$U_, rreQ#!"RMRs*t~> JcF'rrrCdQ!Eq#3rrq.S!%=Q;q#C@VJcE@^s#fHD!lG#FnG`RK!2Y8HRK!Ef63'1Ahu<e.!$U_, rreQ#!"RMRs*t~> JcF'rrrCdQ!Eq)3rrp81!$@EtqZ$RXJcE@^s#fHD!lG#UnG`RK!2Y8HR/[9Y1]Ws%rr^UL)VY)g "+h=mfqSLs~> JcF'rrrCdQ!Eq)3rrp81!$@EtqZ$RXJcE@^s#fHD!lG#UnG`RK!2Y8HR/[9Y1]Ws%rr^UL)VY)g "+h=mfqSLs~> JcF'rrrCdQ!Eq)3rrp81!$@EtqZ$RXJcE@^s#fHD!lG#UnG`RK!2Y8HR/[9Y1]Ws%rr^UL)VY)g "+h=mfqSLs~> JcF'rrrCdQ!EUl.rrpYH!Z$FOr;ZdZJcE@^s#fHD!lG#UnG`RK!2Y8HQi@*XSDO8HXl,QGJ,~> JcF'rrrCdQ!EUl.rrpYH!Z$FOr;ZdZJcE@^s#fHD!lG#UnG`RK!2Y8HQi@*XSDO8HXl,QGJ,~> JcF'rrrCdQ!EUl.rrpYH!Z$FOr;ZdZJcE@^s#fHD!lG#UnG`RK!2Y8HQi@*XSDO8HXl,QGJ,~> JcF'rrrCdQ!D>#ursIFh#mF26rVum[4G!OEs8P4DrrU(<_sm[-i;f^*s+13)s*t~> JcF'rrrCdQ!D>#ursIFh#mF26rVum[4G!OEs8P4DrrU(<_sm[-i;f^*s+13)s*t~> JcF'rrrCdQ!D>#ursIFh#mF26rVum[4G!OEs8P4DrrU(<_sm[-i;f^*s+13)s*t~> JcF'rrrCdQ!D>#srs8(W/H?iBeiZ'Gs1A=24QcYF_#VCBrrV-ZV1J[0rrUbJm=G;GrrW1;Vt'e;~> JcF'rrrCdQ!D>#srs8(W/H?iBeiZ'Gs1A=24QcYF_#VCBrrV-ZV1J[0rrUbJm=G;GrrW1;Vt'e;~> JcF'rrrCdQ!D>#srs8(W/H?iBeiZ'Gs1A=24QcYF_#VCBrrV-ZV1J[0rrUbJm=G;GrrW1;Vt'e;~> JcF'rrrCdQ!D>#prs$PT$igVUd=M>1s8P4DrrTP-_sm[-i;f^:rrVg==7H4kmuUBArrq=]'ESu< rVluL'EFm!s8N*!_uB`9rsI+."Xq7fs2+n#rVc`u])ViKrVult!5m^o$ICO3.)Q#a_ZDt!rVm,7 !!'q:6NF%Qs8N*!_uB`#rrVg==69Gci)UNn'V"gr"47ATTCW#4~> JcF'rrrCdQ!D>#prs$PT$igVUd=M>1s8P4DrrTP-_sm[-i;f^:rrVg==7H4kmuUBArrq=]'ESu< rVluL'EFm!s8N*!_uB`9rsI+."Xq7fs2+n#rVc`u])ViKrVult!5m^o$ICO3.)Q#a_ZDt!rVm,7 !!'q:6NF%Qs8N*!_uB`#rrVg==69Gci)UNn'V"gr"47ATTCW#4~> JcF'rrrCdQ!D>#prs$PT$igVUd=M>1s8P4DrrTP-_sm[-i;f^:rrVg==7H4kmuUBArrq=]'ESu< rVluL'EFm!s8N*!_uB`9rsI+."Xq7fs2+n#rVc`u])ViKrVult!5m^o$ICO3.)Q#a_ZDt!rVm,7 !!'q:6NF%Qs8N*!_uB`#rrVg==69Gci)UNn'V"gr"47ATTCW#4~> JcF'rrrCdQ!D>)prs84p'E\=\GJ*[$s1n[74QcYFZiJ#5rrV-ZV31cZaoD\9rrU(<!;c^"r?hRI -6@g=rr_X2!/:"DrrE):rrE&u#qZhT'.!VJ+:d<,rr]k5!5nd8rr<&:hu=!7'Bp/Us7%3Ahu*KZ ])ViKs0D\an,NCfs24j:kl1_,!!hZd#5onL""#(Ap&>-!!X-@2s*t~> JcF'rrrCdQ!D>)prs84p'E\=\GJ*[$s1n[74QcYFZiJ#5rrV-ZV31cZaoD\9rrU(<!;c^"r?hRI -6@g=rr_X2!/:"DrrE):rrE&u#qZhT'.!VJ+:d<,rr]k5!5nd8rr<&:hu=!7'Bp/Us7%3Ahu*KZ ])ViKs0D\an,NCfs24j:kl1_,!!hZd#5onL""#(Ap&>-!!X-@2s*t~> JcF'rrrCdQ!D>)prs84p'E\=\GJ*[$s1n[74QcYFZiJ#5rrV-ZV31cZaoD\9rrU(<!;c^"r?hRI -6@g=rr_X2!/:"DrrE):rrE&u#qZhT'.!VJ+:d<,rr]k5!5nd8rr<&:hu=!7'Bp/Us7%3Ahu*KZ ])ViKs0D\an,NCfs24j:kl1_,!!hZd#5onL""#(Ap&>-!!X-@2s*t~> JcF'rrrCdQ!D>Q&rsCkLY?VP;#Xa<er.4mds8P4DrrTP-_sm[-i;f^:rrW!iHLUq9_Z0]5rr^[L !6P-<!abpunc/Uhs24j:rr36,'^?>9s'>\uqu6c1!!'q8s8N'!_r(J"";L,7#6/!0T_n`p])ViK s8F;Ea70-/!<9t:!9jFaq+Q+srr^[L!6Od2"*FSfp[nK9~> JcF'rrrCdQ!D>Q&rsCkLY?VP;#Xa<er.4mds8P4DrrTP-_sm[-i;f^:rrW!iHLUq9_Z0]5rr^[L !6P-<!abpunc/Uhs24j:rr36,'^?>9s'>\uqu6c1!!'q8s8N'!_r(J"";L,7#6/!0T_n`p])ViK s8F;Ea70-/!<9t:!9jFaq+Q+srr^[L!6Od2"*FSfp[nK9~> JcF'rrrCdQ!D>Q&rsCkLY?VP;#Xa<er.4mds8P4DrrTP-_sm[-i;f^:rrW!iHLUq9_Z0]5rr^[L !6P-<!abpunc/Uhs24j:rr36,'^?>9s'>\uqu6c1!!'q8s8N'!_r(J"";L,7#6/!0T_n`p])ViK s8F;Ea70-/!<9t:!9jFaq+Q+srr^[L!6Od2"*FSfp[nK9~> JcF'rrrCdQ!D>Q&s8P4]rsJV?J33u8%nV2SjamHQs8P4DrrTP-aRK32i;f^Ps8N'%Z<.GMLAh,Y !!1Y9"rsH=s&].!r;Qs$$dq'>-+s6Wq#LBn!lG!<qu6cN!Wq'Fs8N*!_uB`9rr=hR!!>Wi!)rms #N/u-";:b8_u9W8!!'porr=hR!!>Wi!)rms%,bM2";:b8_uKb$!*B't"oo%Z3X$hBrVults24j: lMgicr;c![!lG!<nG`U^'`aNrrrR9JFoD>j~> JcF'rrrCdQ!D>Q&s8P4]rsJV?J33u8%nV2SjamHQs8P4DrrTP-aRK32i;f^Ps8N'%Z<.GMLAh,Y !!1Y9"rsH=s&].!r;Qs$$dq'>-+s6Wq#LBn!lG!<qu6cN!Wq'Fs8N*!_uB`9rr=hR!!>Wi!)rms #N/u-";:b8_u9W8!!'porr=hR!!>Wi!)rms%,bM2";:b8_uKb$!*B't"oo%Z3X$hBrVults24j: lMgicr;c![!lG!<nG`U^'`aNrrrR9JFoD>j~> JcF'rrrCdQ!D>Q&s8P4]rsJV?J33u8%nV2SjamHQs8P4DrrTP-aRK32i;f^Ps8N'%Z<.GMLAh,Y !!1Y9"rsH=s&].!r;Qs$$dq'>-+s6Wq#LBn!lG!<qu6cN!Wq'Fs8N*!_uB`9rr=hR!!>Wi!)rms #N/u-";:b8_u9W8!!'porr=hR!!>Wi!)rms%,bM2";:b8_uKb$!*B't"oo%Z3X$hBrVults24j: lMgicr;c![!lG!<nG`U^'`aNrrrR9JFoD>j~> JcF'rrrCdQ!D>Q&s8P4Yrs\M-F#O@)!#eXcYLiT$s3CZE4QcYFZiJPDrrV-ZV5O@n!!O/@*rl;8 rr;uu$Q'$d!!V9[F=SL7!;uj,!!3lD&-*LCs8OT"+TMNA/-#YL.fpjo!<+MJrrREF8a$*dfMXD2 bn:r^s8V'o!!jq[!!'q8s8N'!_r(J2fMXD2bn:r^s8V'o!!jq[!!'q:s7?j*ir&f]!!3lD&-*LC iVs%&.j4lmkl:Z5![.ODr[[R>!d=W$qu6^&!"&W(J,~> JcF'rrrCdQ!D>Q&s8P4Yrs\M-F#O@)!#eXcYLiT$s3CZE4QcYFZiJPDrrV-ZV5O@n!!O/@*rl;8 rr;uu$Q'$d!!V9[F=SL7!;uj,!!3lD&-*LCs8OT"+TMNA/-#YL.fpjo!<+MJrrREF8a$*dfMXD2 bn:r^s8V'o!!jq[!!'q8s8N'!_r(J2fMXD2bn:r^s8V'o!!jq[!!'q:s7?j*ir&f]!!3lD&-*LC iVs%&.j4lmkl:Z5![.ODr[[R>!d=W$qu6^&!"&W(J,~> JcF'rrrCdQ!D>Q&s8P4Yrs\M-F#O@)!#eXcYLiT$s3CZE4QcYFZiJPDrrV-ZV5O@n!!O/@*rl;8 rr;uu$Q'$d!!V9[F=SL7!;uj,!!3lD&-*LCs8OT"+TMNA/-#YL.fpjo!<+MJrrREF8a$*dfMXD2 bn:r^s8V'o!!jq[!!'q8s8N'!_r(J2fMXD2bn:r^s8V'o!!jq[!!'q:s7?j*ir&f]!!3lD&-*LC iVs%&.j4lmkl:Z5![.ODr[[R>!d=W$qu6^&!"&W(J,~> JcF'rrrCdQ!D5K)rrBh5s8P4Urt"tOR:S)V!!!-I966N7fCZWRs88Mhs#fHD!il=LnG`RA!2ZUn rr<3/_>e*I4oYK]!!O:mrA"A@rr3&;!!)rsrr<3HkLfh8dJa(H_Z0]7s7lZorrP"WOlZNEr^6dt rr376!%@(2])ViKrVult!5nF.q#L!c"9([h\c2U7@fRq@s1872_uBZ;F9$L^s8N'&,3RVZ!7B^( !lG!<kl:GYo)Ag0!!2ZgrrR9IFoD>j~> JcF'rrrCdQ!D5K)rrBh5s8P4Urt"tOR:S)V!!!-I966N7fCZWRs88Mhs#fHD!il=LnG`RA!2ZUn rr<3/_>e*I4oYK]!!O:mrA"A@rr3&;!!)rsrr<3HkLfh8dJa(H_Z0]7s7lZorrP"WOlZNEr^6dt rr376!%@(2])ViKrVult!5nF.q#L!c"9([h\c2U7@fRq@s1872_uBZ;F9$L^s8N'&,3RVZ!7B^( !lG!<kl:GYo)Ag0!!2ZgrrR9IFoD>j~> JcF'rrrCdQ!D5K)rrBh5s8P4Urt"tOR:S)V!!!-I966N7fCZWRs88Mhs#fHD!il=LnG`RA!2ZUn rr<3/_>e*I4oYK]!!O:mrA"A@rr3&;!!)rsrr<3HkLfh8dJa(H_Z0]7s7lZorrP"WOlZNEr^6dt rr376!%@(2])ViKrVult!5nF.q#L!c"9([h\c2U7@fRq@s1872_uBZ;F9$L^s8N'&,3RVZ!7B^( !lG!<kl:GYo)Ag0!!2ZgrrR9IFoD>j~> JcF'rrrCdQs#ej3"TUg&s#`F7rs&5CW.J20%fHA9%OskQH'4l*^Wt['rQ"p?J-ua9T`>$Sk5PLZ !7LB:!n%(FVuQbs"aL(IZN(L7s8N'&Y5eNe=0DQ&!lG!<r;Zcs"g\1-!!'t9rrU(<!;c]s_Z0]6 rrNZ1\E*YkNrX%qrs0SEScA`%!!'q8s8N'!_t3p(/+W]ANrX%qrs0SEScA`%!!'q9rr_3^&bQ&% rr<5.s8Duu`8CRr_Z0]!rrU(<!:TpimJm76p&BO~> JcF'rrrCdQs#ej3"TUg&s#`F7rs&5CW.J20%fHA9%OskQH'4l*^Wt['rQ"p?J-ua9T`>$Sk5PLZ !7LB:!n%(FVuQbs"aL(IZN(L7s8N'&Y5eNe=0DQ&!lG!<r;Zcs"g\1-!!'t9rrU(<!;c]s_Z0]6 rrNZ1\E*YkNrX%qrs0SEScA`%!!'q8s8N'!_t3p(/+W]ANrX%qrs0SEScA`%!!'q9rr_3^&bQ&% rr<5.s8Duu`8CRr_Z0]!rrU(<!:TpimJm76p&BO~> JcF'rrrCdQs#ej3"TUg&s#`F7rs&5CW.J20%fHA9%OskQH'4l*^Wt['rQ"p?J-ua9T`>$Sk5PLZ !7LB:!n%(FVuQbs"aL(IZN(L7s8N'&Y5eNe=0DQ&!lG!<r;Zcs"g\1-!!'t9rrU(<!;c]s_Z0]6 rrNZ1\E*YkNrX%qrs0SEScA`%!!'q8s8N'!_t3p(/+W]ANrX%qrs0SEScA`%!!'q9rr_3^&bQ&% rr<5.s8Duu`8CRr_Z0]!rrU(<!:TpimJm76p&BO~> JcF'rrrCdQs#f*:#6*StTn$f`rW!!b/NiA!#j0""N,Vi\+U@fC"Uu%b+sJE61B9bi6i]"@!!'^+ s8P4DrrT"si:-aJdK$,As8N'&KE(te!!N<$rr<&:q>UN6!!)rsrr<5?s8N'!_u9T:_Z0]5rrU(< !;lct!s$-urt*Wb)cdIU8`KpR_#OGH!!'q8s8N'!_qk>(dg-mn%gbhf"9?7;s1872_u9T:<</<_ s8N'&_uK`:!5m^o!lG!<k5PM#!!)Kf"8`&uaS#R`~> JcF'rrrCdQs#f*:#6*StTn$f`rW!!b/NiA!#j0""N,Vi\+U@fC"Uu%b+sJE61B9bi6i]"@!!'^+ s8P4DrrT"si:-aJdK$,As8N'&KE(te!!N<$rr<&:q>UN6!!)rsrr<5?s8N'!_u9T:_Z0]5rrU(< !;lct!s$-urt*Wb)cdIU8`KpR_#OGH!!'q8s8N'!_qk>(dg-mn%gbhf"9?7;s1872_u9T:<</<_ s8N'&_uK`:!5m^o!lG!<k5PM#!!)Kf"8`&uaS#R`~> JcF'rrrCdQs#f*:#6*StTn$f`rW!!b/NiA!#j0""N,Vi\+U@fC"Uu%b+sJE61B9bi6i]"@!!'^+ s8P4DrrT"si:-aJdK$,As8N'&KE(te!!N<$rr<&:q>UN6!!)rsrr<5?s8N'!_u9T:_Z0]5rrU(< !;lct!s$-urt*Wb)cdIU8`KpR_#OGH!!'q8s8N'!_qk>(dg-mn%gbhf"9?7;s1872_u9T:<</<_ s8N'&_uK`:!5m^o!lG!<k5PM#!!)Kf"8`&uaS#R`~> JcF'rrrCdQs#f6>"SfNY8J;"&!Ws2^rW!!b/Ni%m$guiq^9=2lJobO9Ac>[09@-',-N*oENM6CP 4QcYFT`F'@rrUUKV5O@n!!S#Ts.'-/rr;uu!5nX4!lG!<r;Zcs"iLB?!!'q8rr^.=!<2lq!lG!< qu6^1!352]&c"'`0`Vdt!*'I.ZiC'/!!'q8s8N'!_t3p(/+iiRq(Dn+!"feC<=Jr7s8T8&!5nd8 "2t6frr2rt!!U:?rr<&:oD\phR@F'CrrU(<!;c]tqO*iLnc&[.!!)Kf"6ojdgALsP_0kJFs*t~> JcF'rrrCdQs#f6>"SfNY8J;"&!Ws2^rW!!b/Ni%m$guiq^9=2lJobO9Ac>[09@-',-N*oENM6CP 4QcYFT`F'@rrUUKV5O@n!!S#Ts.'-/rr;uu!5nX4!lG!<r;Zcs"iLB?!!'q8rr^.=!<2lq!lG!< qu6^1!352]&c"'`0`Vdt!*'I.ZiC'/!!'q8s8N'!_t3p(/+iiRq(Dn+!"feC<=Jr7s8T8&!5nd8 "2t6frr2rt!!U:?rr<&:oD\phR@F'CrrU(<!;c]tqO*iLnc&[.!!)Kf"6ojdgALsP_0kJFs*t~> JcF'rrrCdQs#f6>"SfNY8J;"&!Ws2^rW!!b/Ni%m$guiq^9=2lJobO9Ac>[09@-',-N*oENM6CP 4QcYFT`F'@rrUUKV5O@n!!S#Ts.'-/rr;uu!5nX4!lG!<r;Zcs"iLB?!!'q8rr^.=!<2lq!lG!< qu6^1!352]&c"'`0`Vdt!*'I.ZiC'/!!'q8s8N'!_t3p(/+iiRq(Dn+!"feC<=Jr7s8T8&!5nd8 "2t6frr2rt!!U:?rr<&:oD\phR@F'CrrU(<!;c]tqO*iLnc&[.!!)Kf"6ojdgALsP_0kJFs*t~> JcF'rrrCdQs#f?A'D8A.%KH\lDOnJsqZ$Qq5em=]4JDcYaoMJB!mIA<s#fHD!gWiFnG`R<!2ZUn rr<4Ts6_H=@K-<,!!'q4rrU(<!;uls!!U:?rr<&:rVm&F!!(CGqu-Nr_Z0]6rrP@aG38f:F9%(I !9N;B/Na#?s4SLo!5nd8!dIK:oDeUdo`#MF!/E**jlHIo49/agg)^4o_u0N92#t&`s8N'&_uK`: !5nF."-NWaC@V<*_Z0]5rr\Da!,D'(!lG!<n,EL$!"Ai)rr`3.!)ELmJ,~> JcF'rrrCdQs#f?A'D8A.%KH\lDOnJsqZ$Qq5em=]4JDcYaoMJB!mIA<s#fHD!gWiFnG`R<!2ZUn rr<4Ts6_H=@K-<,!!'q4rrU(<!;uls!!U:?rr<&:rVm&F!!(CGqu-Nr_Z0]6rrP@aG38f:F9%(I !9N;B/Na#?s4SLo!5nd8!dIK:oDeUdo`#MF!/E**jlHIo49/agg)^4o_u0N92#t&`s8N'&_uK`: !5nF."-NWaC@V<*_Z0]5rr\Da!,D'(!lG!<n,EL$!"Ai)rr`3.!)ELmJ,~> JcF'rrrCdQs#f?A'D8A.%KH\lDOnJsqZ$Qq5em=]4JDcYaoMJB!mIA<s#fHD!gWiFnG`R<!2ZUn rr<4Ts6_H=@K-<,!!'q4rrU(<!;uls!!U:?rr<&:rVm&F!!(CGqu-Nr_Z0]6rrP@aG38f:F9%(I !9N;B/Na#?s4SLo!5nd8!dIK:oDeUdo`#MF!/E**jlHIo49/agg)^4o_u0N92#t&`s8N'&_uK`: !5nF."-NWaC@V<*_Z0]5rr\Da!,D'(!lG!<n,EL$!"Ai)rr`3.!)ELmJ,~> JcF'rrrCdQs#fEC#Ma>1!%3'1q"api^]+954J;]VU+7aiT`>$Sk5PLK!:'(R!n%(FVuQbs"U6=^ !"n&ds8N'!_u'K6.fpjo!<+MKs8N'&_uK`:!5nd8"n`B+#q$)YrrU(<!;lcuL]A\!kl2:1!^6K\ !7&dgAYoG-*X3Yc!5nd8!X8YJhu=>(!^6K\!7&dgAYoG-*X3Yc!5na7!i>rdrr;uu"iLB?!!'q. rr]Y0!"SW#s!n-o!!*!KrVlu-!<<W"rrU(<!:TphBE2*1rrP(Y$2smS~> JcF'rrrCdQs#fEC#Ma>1!%3'1q"api^]+954J;]VU+7aiT`>$Sk5PLK!:'(R!n%(FVuQbs"U6=^ !"n&ds8N'!_u'K6.fpjo!<+MKs8N'&_uK`:!5nd8"n`B+#q$)YrrU(<!;lcuL]A\!kl2:1!^6K\ !7&dgAYoG-*X3Yc!5nd8!X8YJhu=>(!^6K\!7&dgAYoG-*X3Yc!5na7!i>rdrr;uu"iLB?!!'q. rr]Y0!"SW#s!n-o!!*!KrVlu-!<<W"rrU(<!:TphBE2*1rrP(Y$2smS~> JcF'rrrCdQs#fEC#Ma>1!%3'1q"api^]+954J;]VU+7aiT`>$Sk5PLK!:'(R!n%(FVuQbs"U6=^ !"n&ds8N'!_u'K6.fpjo!<+MKs8N'&_uK`:!5nd8"n`B+#q$)YrrU(<!;lcuL]A\!kl2:1!^6K\ !7&dgAYoG-*X3Yc!5nd8!X8YJhu=>(!^6K\!7&dgAYoG-*X3Yc!5na7!i>rdrr;uu"iLB?!!'q. rr]Y0!"SW#s!n-o!!*!KrVlu-!<<W"rrU(<!:TphBE2*1rrP(Y$2smS~> JcF'rrrCdQ!C/d1rrpG:!Y]e,nc/VOJcE@^s#fHD!gWiUnG`R<!2ZUnrr<04";4\erVult!5n^6 q#LHprr<5?s8N'!_u0N;^G,lu1B%4S_Z0]6rr_Nm!3,5_'CQqOhuDY)#Rt)/s,@p%8)F:H_u9T: <%%=rrtFiA%c@<F7L0H/nGeId#=mYO!5na7%Jq(EeGoOK!5nj:!!'q-rrQX0%eK_r!;uiu@K6o. rrU(<!:^!jjpM1,qu6`T!"Su-J,~> JcF'rrrCdQ!C/d1rrpG:!Y]e,nc/VOJcE@^s#fHD!gWiUnG`R<!2ZUnrr<04";4\erVult!5n^6 q#LHprr<5?s8N'!_u0N;^G,lu1B%4S_Z0]6rr_Nm!3,5_'CQqOhuDY)#Rt)/s,@p%8)F:H_u9T: <%%=rrtFiA%c@<F7L0H/nGeId#=mYO!5na7%Jq(EeGoOK!5nj:!!'q-rrQX0%eK_r!;uiu@K6o. rrU(<!:^!jjpM1,qu6`T!"Su-J,~> JcF'rrrCdQ!C/d1rrpG:!Y]e,nc/VOJcE@^s#fHD!gWiUnG`R<!2ZUnrr<04";4\erVult!5n^6 q#LHprr<5?s8N'!_u0N;^G,lu1B%4S_Z0]6rr_Nm!3,5_'CQqOhuDY)#Rt)/s,@p%8)F:H_u9T: <%%=rrtFiA%c@<F7L0H/nGeId#=mYO!5na7%Jq(EeGoOK!5nj:!!'q-rrQX0%eK_r!;uiu@K6o. rrU(<!:^!jjpM1,qu6`T!"Su-J,~> JcF'rrrCdQ!D>Q>rrq.[!@43/n,NDMJcE@^s#fHD!f-jGnG`R<!2ZUnrr<%O`r?-o!#k3grrRoT AEj*rmlUSMkPkYQ49/C;rrQ$t;u6LqU]=0gs*t~> JcF'rrrCdQ!D>Q>rrq.[!@43/n,NDMJcE@^s#fHD!f-jGnG`R<!2ZUnrr<%O`r?-o!#k3grrRoT AEj*rmlUSMkPkYQ49/C;rrQ$t;u6LqU]=0gs*t~> JcF'rrrCdQ!D>Q>rrq.[!@43/n,NDMJcE@^s#fHD!f-jGnG`R<!2ZUnrr<%O`r?-o!#k3grrRoT AEj*rmlUSMkPkYQ49/C;rrQ$t;u6LqU]=0gs*t~> JcF'rrrCdQ!D>Q@rrr:N"r**nmJm2KJcE@^s#fHD!f$dJnG`R<!2ZUnrr<%O`r?2>63'1AQ2^sR $4,t`rraVP!#jbYrraVP!#jbOrr[`N+mf.,"I'T#%b1IWJ,~> JcF'rrrCdQ!D>Q@rrr:N"r**nmJm2KJcE@^s#fHD!f$dJnG`R<!2ZUnrr<%O`r?2>63'1AQ2^sR $4,t`rraVP!#jbYrraVP!#jbOrr[`N+mf.,"I'T#%b1IWJ,~> JcF'rrrCdQ!D>Q@rrr:N"r**nmJm2KJcE@^s#fHD!f$dJnG`R<!2ZUnrr<%O`r?2>63'1AQ2^sR $4,t`rraVP!#jbYrraVP!#jbOrr[`N+mf.,"I'T#%b1IWJ,~> JcF'rrrCdQ!D>E=rrgk/!+kWbs8P34s1A=24QcYELB-fC!n%(FVuQbs!/&8j"7\2JR=YD8rrWNT FR/,i!sg;sle_XDciP->qu6bM(L#Mis*t~> JcF'rrrCdQ!D>E=rrgk/!+kWbs8P34s1A=24QcYELB-fC!n%(FVuQbs!/&8j"7\2JR=YD8rrWNT FR/,i!sg;sle_XDciP->qu6bM(L#Mis*t~> JcF'rrrCdQ!D>E=rrgk/!+kWbs8P34s1A=24QcYELB-fC!n%(FVuQbs!/&8j"7\2JR=YD8rrWNT FR/,i!sg;sle_XDciP->qu6bM(L#Mis*t~> JcF'rrrCdQ!DP05rr])')78Z.s#bl4]Dqmnk5PI2!:TphdK$+ps6'C_o:1C3[/U0/i:6ht~> JcF'rrrCdQ!DP05rr])')78Z.s#bl4]Dqmnk5PI2!:TphdK$+ps6'C_o:1C3[/U0/i:6ht~> JcF'rrrCdQ!DP05rr])')78Z.s#bl4]Dqmnk5PI2!:TphdK$+ps6'C_o:1C3[/U0/i:6ht~> JcF'rrrCdQ!Eq)Drri=J!C?)9s8P34s1A=24QcYEGQ@44!n%(FJcC<$LAuc~> JcF'rrrCdQ!Eq)Drri=J!C?)9s8P34s1A=24QcYEGQ@44!n%(FJcC<$LAuc~> JcF'rrrCdQ!Eq)Drri=J!C?)9s8P34s1A=24QcYEGQ@44!n%(FJcC<$LAuc~> JcF'rrrCdQ!EpQ6rri4$!+u)js8P34s1A=24QcYEGRj3B!n%(FJcC<$LAuc~> JcF'rrrCdQ!EpQ6rri4$!+u)js8P34s1A=24QcYEGRj3B!n%(FJcC<$LAuc~> JcF'rrrCdQ!EpQ6rri4$!+u)js8P34s1A=24QcYEGRj3B!n%(FJcC<$LAuc~> JcF'rrrCdQ!GEPErr`*s!/]h;s#bl4]Dqmnk5PHr'(>i%dK$,UrrdfR)IMTWs+13ts*t~> JcF'rrrCdQ!GEPErr`*s!/]h;s#bl4]Dqmnk5PHr'(>i%dK$,UrrdfR)IMTWs+13ts*t~> JcF'rrrCdQ!GEPErr`*s!/]h;s#bl4]Dqmnk5PHr'(>i%dK$,UrrdfR)IMTWs+13ts*t~> JcF'rrrCdQ!GN2;rr`0t!KZ=As#bl4]Dqmnk5PHl*q0+1dK$,UrrnZ2!!"SLJcC<$df4g~> JcF'rrrCdQ!GN2;rr`0t!KZ=As#bl4]Dqmnk5PHl*q0+1dK$,UrrnZ2!!"SLJcC<$df4g~> JcF'rrrCdQ!GN2;rr`0t!KZ=As#bl4]Dqmnk5PHl*q0+1dK$,UrrnZ2!!"SLJcC<$df4g~> JcF'r">'Uuf_"#"!HS_@rrQm7OQ6B@4G!OEs8P4DrrH:Nn,EI;!2[7+"0DP'eq*jPs3gpt~> JcF'r">'Uuf_"#"!HS_@rrQm7OQ6B@4G!OEs8P4DrrH:Nn,EI;!2[7+"0DP'eq*jPs3gpt~> JcF'r">'Uuf_"#"!HS_@rrQm7OQ6B@4G!OEs8P4DrrH:Nn,EI;!2[7+"0DP'eq*jPs3gpt~> JcF'r!N-(s!!#[OrrRcPqt0miPlQ'gs8P34s1A=24QcYE:G)&8!n%(J\c2d1!!'rgs+13us*t~> JcF'r!N-(s!!#[OrrRcPqt0miPlQ'gs8P34s1A=24QcYE:G)&8!n%(J\c2d1!!'rgs+13us*t~> JcF'r!N-(s!!#[OrrRcPqt0miPlQ'gs8P34s1A=24QcYE:G)&8!n%(J\c2d1!!'rgs+13us*t~> JcF$q"4(g3$iL&*9B,sQP5sqArr]q::B'8Q!B`,g7(Yhf1-F_!!D,BArrUUK[(-/9!!'cbs+13u s*t~> JcF$q"4(g3$iL&*9B,sQP5sqArr]q::B'8Q!B`,g7(Yhf1-F_!!D,BArrUUK[(-/9!!'cbs+13u s*t~> JcF$q"4(g3$iL&*9B,sQP5sqArr]q::B'8Q!B`,g7(Yhf1-F_!!D,BArrUUK[(-/9!!'cbs+13u s*t~> JcF$q"3t[.$N0r)9B,sQU]B-Brr_U+/G8!%!B`,g7(Yhf1-F_!!B`[:rrUUK[(-,<)ut!SJcC<$ e,Op~> JcF$q"3t[.$N0r)9B,sQU]B-Brr_U+/G8!%!B`,g7(Yhf1-F_!!B`[:rrUUK[(-,<)ut!SJcC<$ e,Op~> JcF$q"3t[.$N0r)9B,sQU]B-Brr_U+/G8!%!B`,g7(Yhf1-F_!!B`[:rrUUK[(-,<)ut!SJcC<$ e,Op~> JcF'r!N#tq!!#[OrrTV/anPf;r_<dLi;`g>JcE@^s#fHD!AmI<rrUUK[(-,<\M+!`JcC<$e,Op~> JcF'r!N#tq!!#[OrrTV/anPf;r_<dLi;`g>JcE@^s#fHD!AmI<rrUUK[(-,<\M+!`JcC<$e,Op~> JcF'r!N#tq!!#[OrrTV/anPf;r_<dLi;`g>JcE@^s#fHD!AmI<rrUUK[(-,<\M+!`JcC<$e,Op~> JcF'r">'V#g@a;%!lk;Op\t;f!1)OBs#bl4]Dqmnk5PH6<q$%idK$Yarr]&0![iR!JcF4!J,~> JcF'r">'V#g@a;%!lk;Op\t;f!1)OBs#bl4]Dqmnk5PH6<q$%idK$Yarr]&0![iR!JcF4!J,~> JcF'r">'V#g@a;%!lk;Op\t;f!1)OBs#bl4]Dqmnk5PH6<q$%idK$Yarr]&0![iR!JcF4!J,~> JcF'rrrCdQ!nRFNq#:E^'h7'[s#bl4]Dqmnk5PH(>jq[odK$YarrNu:P_&jcs3gpt~> JcF'rrrCdQ!nRFNq#:E^'h7'[s#bl4]Dqmnk5PH(>jq[odK$YarrNu:P_&jcs3gpt~> JcF'rrrCdQ!nRFNq#:E^'h7'[s#bl4]Dqmnk5PH(>jq[odK$YarrNu:P_&jcs3gpt~> JcF'rrrCdQ!pTcLq#:D+#i"59s#bl4]Dqmnk5PH"C%)''dK$Yas8N'!_L_`<s3gpt~> JcF'rrrCdQ!pTcLq#:D+#i"59s#bl4]Dqmnk5PH"C%)''dK$Yas8N'!_L_`<s3gpt~> JcF'rrrCdQ!pTcLq#:D+#i"59s#bl4]Dqmnk5PH"C%)''dK$Yas8N'!_L_`<s3gpt~> JcF'rrrCaP!=F#GrrUIHK&-J,4G!OEs8P4DrrEXMn,EI;!4999rr<&:JcC<$df4g~> JcF'rrrCaP!=F#GrrUIHK&-J,4G!OEs8P4DrrEXMn,EI;!4999rr<&:JcC<$df4g~> JcF'rrrCaP!=F#GrrUIHK&-J,4G!OEs8P4DrrEXMn,EI;!4999rr<&:JcC<$df4g~> JcF'rrrCaP!@_(FrrP_5ptbuM4Ga">ZR>eR\GuRkk5PG`Idd:<dK$Ybrr`,u!6'NhJcF0uJ,~> JcF'rrrCaP!@_(FrrP_5ptbuM4Ga">ZR>eR\GuRkk5PG`Idd:<dK$Ybrr`,u!6'NhJcF0uJ,~> JcF'rrrCaP!@_(FrrP_5ptbuM4Ga">ZR>eR\GuRkk5PG`Idd:<dK$Ybrr`,u!6'NhJcF0uJ,~> JcF'rrrCaP!D,3GrrTn7TA9JH4Gs.>cU.R1\GuRkkPkVR!06OJ!n%(U\c2c.!!(c)s+13us*t~> JcF'rrrCaP!D,3GrrTn7TA9JH4Gs.>cU.R1\GuRkkPkVR!06OJ!n%(U\c2c.!!(c)s+13us*t~> JcF'rrrCaP!D,3GrrTn7TA9JH4Gs.>cU.R1\GuRkkPkVR!06OJ!n%(U\c2c.!!(c)s+13us*t~> JcF'rrrCaP!GNAHrrPA6r7q>P4H'4D_u]o>$NL1:s8P4ErrV'XTC;d]dK$YdrreT2!!"m-s+13t s*t~> JcF'rrrCaP!GNAHrrPA6r7q>P4H'4D_u]o>$NL1:s8P4ErrV'XTC;d]dK$YdrreT2!!"m-s+13t s*t~> JcF'rrrCaP!GNAHrrPA6r7q>P4H'4D_u]o>$NL1:s8P4ErrV'XTC;d]dK$YdrreT2!!"m-s+13t s*t~> JcF'rrrCaP!f6pNr;Qi=!3+`Qs#dpnrr<7e]/^'4Hi;[u#5Joga?oq-\GuRkkPkV0!3bkk!n%(U ]Di"`!uYM1JcC<$dJn^~> JcF'rrrCaP!f6pNr;Qi=!3+`Qs#dpnrr<7e]/^'4Hi;[u#5Joga?oq-\GuRkkPkV0!3bkk!n%(U ]Di"`!uYM1JcC<$dJn^~> JcF'rrrCaP!f6pNr;Qi=!3+`Qs#dpnrr<7e]/^'4Hi;[u#5Joga?oq-\GuRkkPkV0!3bkk!n%(U ]Di"`!uYM1JcC<$dJn^~> JcF'rrrCaP!iZ1Nr;Qgr,lQKts#dpnrr<'e!rW*!M=U]A_t!a1bPhH.!!'P/s#fKE!knZLn,EI; !47=WJcCK)J,~> JcF'rrrCaP!iZ1Nr;Qgr,lQKts#dpnrr<'e!rW*!M=U]A_t!a1bPhH.!!'P/s#fKE!knZLn,EI; !47=WJcCK)J,~> JcF'rrrCaP!iZ1Nr;Qgr,lQKts#dpnrr<'e!rW*!M=U]A_t!a1bPhH.!!'P/s#fKE!knZLn,EI; !47=WJcCK)J,~> JcF'rrrCaP!m(GNrVlrS!gVL>s#dpnrW!*1R[jK[-h@<4!:Kjg6N@+rs8P4ErrT>'d-pu9dK$Y* s+13)s*t~> JcF'rrrCaP!m(GNrVlrS!gVL>s#dpnrW!*1R[jK[-h@<4!:Kjg6N@+rs8P4ErrT>'d-pu9dK$Y* s+13)s*t~> JcF'rrrCaP!m(GNrVlrS!gVL>s#dpnrW!*1R[jK[-h@<4!:Kjg6N@+rs8P4ErrT>'d-pu9dK$Y* s+13)s*t~> JcF'rrrCaP!qHAOrVlqC&barYs#dpnrr<6)\GuRc!!Vrnp]0a^!^cqf\GuRkkPkUT!9*DH!n%(U JcC<$LAuc~> JcF'rrrCaP!qHAOrVlqC&barYs#dpnrr<6)\GuRc!!Vrnp]0a^!^cqf\GuRkkPkUT!9*DH!n%(U JcC<$LAuc~> JcF'rrrCaP!qHAOrVlqC&barYs#dpnrr<6)\GuRc!!Vrnp]0a^!^cqf\GuRkkPkUT!9*DH!n%(U JcC<$LAuc~> JcF'rrrC^O!?keKrrW$5D;"sh4M1Xn!!#:`rrPOf!7q/O6N@+rs8P4ErrS/[o'cS[dK$Z#rrdfR )IMTWs+13`s*t~> JcF'rrrC^O!?keKrrW$5D;"sh4M1Xn!!#:`rrPOf!7q/O6N@+rs8P4ErrS/[o'cS[dK$Z#rrdfR )IMTWs+13`s*t~> JcF'rrrC^O!?keKrrW$5D;"sh4M1Xn!!#:`rrPOf!7q/O6N@+rs8P4ErrS/[o'cS[dK$Z#rrdfR )IMTWs+13`s*t~> JcF'rrrC^O!DY?JrrT8%db4[#4M1Xn!!#CcrrPOf!:p0b_s[O+6N@+rs8P4ErrINMmf*@:!4:)P "dL52!%e,#s+13as*t~> JcF'rrrC^O!DY?JrrT8%db4[#4M1Xn!!#CcrrPOf!:p0b_s[O+6N@+rs8P4ErrINMmf*@:!4:)P "dL52!%e,#s+13as*t~> JcF'rrrC^O!DY?JrrT8%db4[#4M1Xn!!#CcrrPOf!:p0b_s[O+6N@+rs8P4ErrINMmf*@:!4:)P "dL52!%e,#s+13as*t~> JcF'rrrC^O#(?gQs8P_Lf`1t6]Dqm2!(6bc!^cqfo)JIbmf*>U!!'P/s#fKE!G`D;rrU.>[*AUQ XT/@PJcC<$^Ai]~> JcF'rrrC^O#(?gQs8P_Lf`1t6]Dqm2!(6bc!^cqfo)JIbmf*>U!!'P/s#fKE!G`D;rrU.>[*AUQ XT/@PJcC<$^Ai]~> JcF'rrrC^O#(?gQs8P_Lf`1t6]Dqm2!(6bc!^cqfo)JIbmf*>U!!'P/s#fKE!G`D;rrU.>[*AUQ XT/@PJcC<$^Ai]~> JcF'rrrC^O#.=NRs6TuKf`1t6]Dqm2!(6bc!^cqfo)JIbmf*>U!!'P/s#fKE!E(Q<rrU(<[*AUQ r;Zi9JcC<$^Ai]~> JcF'rrrC^O#.=NRs6TuKf`1t6]Dqm2!(6bc!^cqfo)JIbmf*>U!!'P/s#fKE!E(Q<rrU(<[*AUQ r;Zi9JcC<$^Ai]~> JcF'rrrC^O#.=NRs6TuKf`1t6]Dqm2!(6bc!^cqfo)JIbmf*>U!!'P/s#fKE!E(Q<rrU(<[*AUQ r;Zi9JcC<$^Ai]~> JcF'rrrC^O#42GQs-s,Kf`1t6]Dqm2!(6bc!^cqfg&M&X!\XNRrj06:s#fKE!B!L;rrU(<[*8RM !!'cbs+13as*t~> JcF'rrrC^O#42GQs-s,Kf`1t6]Dqm2!(6bc!^cqfg&M&X!\XNRrj06:s#fKE!B!L;rrU(<[*8RM !!'cbs+13as*t~> JcF'rrrC^O#42GQs-s,Kf`1t6]Dqm2!(6bc!^cqfg&M&X!\XNRrj06:s#fKE!B!L;rrU(<[*8RM !!'cbs+13as*t~> JcF'rrrC[N"=I=O760!"s#dpnrr<$drr3$e!!(^Pp].r+s#fKE!>fG;rrU(<[*8OP)ut!SJcC<$ ^]/f~> JcF'rrrC[N"=I=O760!"s#dpnrr<$drr3$e!!(^Pp].r+s#fKE!>fG;rrU(<[*8OP)ut!SJcC<$ ^]/f~> JcF'rrrC[N"=I=O760!"s#dpnrr<$drr3$e!!(^Pp].r+s#fKE!>fG;rrU(<[*8OP)ut!SJcC<$ ^]/f~> JcF'rrrC[N"CrME#DC_/s#dpnrr<$drr3$e!!(^Pp].r+s#fNF!r2kMmf*@+!49uM"1^)c!.k0$ s1eSa~> JcF'rrrC[N"CrME#DC_/s#dpnrr<$drr3$e!!(^Pp].r+s#fNF!r2kMmf*@+!49uM"1^)c!.k0$ s1eSa~> JcF'rrrC[N"CrME#DC_/s#dpnrr<$drr3$e!!(^Pp].r+s#fNF!r2kMmf*@+!49uM"1^)c!.k0$ s1eSa~> JcF'rrrC[N"K2<f!6Wpns#bl4]Dqmnkl1_?!2Ao]!lG#Fbl7d@&csG3s+13bs*t~> JcF'rrrC[N"K2<f!6Wpns#bl4]Dqmnkl1_?!2Ao]!lG#Fbl7d@&csG3s+13bs*t~> JcF'rrrC[N"K2<f!6Wpns#bl4]Dqmnkl1_?!2Ao]!lG#Fbl7d@&csG3s+13bs*t~> JcF'rrrC[N"R?+S')gG^s#bl4]Dqmnkl1_"!5@n$!lG#Fbl7_\!0i'7JcEIaJ,~> JcF'rrrC[N"R?+S')gG^s#bl4]Dqmnkl1_"!5@n$!lG#Fbl7_\!0i'7JcEIaJ,~> JcF'rrrC[N"R?+S')gG^s#bl4]Dqmnkl1_"!5@n$!lG#Fbl7_\!0i'7JcEIaJ,~> JcF'rrrCXM!](9ef)Pb4JcE@^s#fNF!i,hNmf*@+!49uMrr<&9JcC<$^Ai]~> JcF'rrrCXM!](9ef)Pb4JcE@^s#fNF!i,hNmf*@+!49uMrr<&9JcC<$^Ai]~> JcF'rrrCXM!](9ef)Pb4JcE@^s#fNF!i,hNmf*@+!49uMrr<&9JcC<$^Ai]~> JcF'rrrCXM!c\4+f)Pb4JcE@^s#fNF!epdOmf*@+!49uMrr<&:JcC<$^Ai]~> JcF'rrrCXM!c\4+f)Pb4JcE@^s#fNF!epdOmf*@+!49uMrr<&:JcC<$^Ai]~> JcF'rrrCXM!c\4+f)Pb4JcE@^s#fNF!epdOmf*@+!49uMrr<&:JcC<$^Ai]~> JcF'rrrCXM!eC?>f)Pb4JcE@^s#fNF!F?r:rrU(<[*AUQqZ$W8JcC<$^Ai]~> JcF'rrrCXM!eC?>f)Pb4JcE@^s#fNF!F?r:rrU(<[*AUQqZ$W8JcC<$^Ai]~> JcF'rrrCXM!eC?>f)Pb4JcE@^s#fNF!F?r:rrU(<[*AUQqZ$W8JcC<$^Ai]~> JcF'rrrCXM!`oS0f)Pb4JcE@^s#fNF!AmI:rrU(<\]t-VV#UMMJcC<$^Ai]~> JcF'rrrCXM!`oS0f)Pb4JcE@^s#fNF!AmI:rrU(<\]t-VV#UMMJcC<$^Ai]~> JcF'rrrCXM!`oS0f)Pb4JcE@^s#fNF!AmI:rrU(<\]t-VV#UMMJcC<$^Ai]~> JcF'rrrCXM!urs(pXfHF4G!OEs8P4GrrW0-G4#;2_Z7U#rreT2!!"m-s+13`s*t~> JcF'rrrCXM!urs(pXfHF4G!OEs8P4GrrW0-G4#;2_Z7U#rreT2!!"m-s+13`s*t~> JcF'rrrCXM!urs(pXfHF4G!OEs8P4GrrW0-G4#;2_Z7U#rreT2!!"m-s+13`s*t~> JcF'rrrC[N"R,o9!2eBJs#bl4]Dqmnl2Lh;!2o5a!lG#Uci4,t!uYM1JcC<$^&NT~> JcF'rrrC[N"R,o9!2eBJs#bl4]Dqmnl2Lh;!2o5a!lG#Uci4,t!uYM1JcC<$^&NT~> JcF'rrrC[N"R,o9!2eBJs#bl4]Dqmnl2Lh;!2o5a!lG#Uci4,t!uYM1JcC<$^&NT~> JcF'rrrC[N"L\<O4%7d$s#bl4]Dqmnl2LgZ!8QuA!kJBLJcC<$LAuc~> JcF'rrrC[N"L\<O4%7d$s#bl4]Dqmnl2LgZ!8QuA!kJBLJcC<$LAuc~> JcF'rrrC[N"L\<O4%7d$s#bl4]Dqmnl2LgZ!8QuA!kJBLJcC<$LAuc~> JcF'rrrC[N"bQsPSH@^$s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4R)kHCDH49!jhsFJcC<$LAuc~> JcF'rrrC[N"bQsPSH@^$s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4R)kHCDH49!jhsFJcC<$LAuc~> JcF'rrrC[N"bQsPSH@^$s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4R)kHCDH49!jhsFJcC<$LAuc~> JcF'rrrC[N"]6rQo*orss*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4R)kH/QD*:!jhsFJcC<$LAuc~> JcF'rrrC[N"]6rQo*orss*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4R)kH/QD*:!jhsFJcC<$LAuc~> JcF'rrrC[N"]6rQo*orss*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4R)kH/QD*:!jhsFJcC<$LAuc~> JcF'rrrC[N"s.4Qs)/J?g&M(7JcE@^s#fTH!os?Mm/I-o!7-5rJcCK)J,~> JcF'rrrC[N"s.4Qs)/J?g&M(7JcE@^s#fTH!os?Mm/I-o!7-5rJcCK)J,~> JcF'rrrC[N"s.4Qs)/J?g&M(7JcE@^s#fTH!os?Mm/I-o!7-5rJcCK)J,~> JcF'rrrC^O#O;ASs8V$\P1fm84G!OEs8P4HrrSYjiU$RGZiJO*s+13)s*t~> JcF'rrrC^O#O;ASs8V$\P1fm84G!OEs8P4HrrSYjiU$RGZiJO*s+13)s*t~> JcF'rrrC^O#O;ASs8V$\P1fm84G!OEs8P4HrrSYjiU$RGZiJO*s+13)s*t~> JcGNF!p=RunG`RMFSYD*rrC^O!kSHNrr3%#*r=Ujs#bl4]DqmnlMglR3U?\HZN/F)s+13)s*t~> JcGNF!p=RunG`RMFSYD*rrC^O!kSHNrr3%#*r=Ujs#bl4]DqmnlMglR3U?\HZN/F)s+13)s*t~> JcGNF!p=RunG`RMFSYD*rrC^O!kSHNrr3%#*r=Ujs#bl4]DqmnlMglR3U?\HZN/F)s+13)s*t~> [f6Qa?QTFW-)9Q$!T1ZWrr_7(!*\pm"S3l=6h^$LrrC^O!g`oNrr3&E!LDI>s#bl4]Dqmnli.%J "-r3P!i5nFJcC<$LAuc~> [f6Qa?QTFW-)9Q$!T1ZWrr_7(!*\pm"S3l=6h^$LrrC^O!g`oNrr3&E!LDI>s#bl4]Dqmnli.%J "-r3P!i5nFJcC<$LAuc~> [f6Qa?QTFW-)9Q$!T1ZWrr_7(!*\pm"S3l=6h^$LrrC^O!g`oNrr3&E!LDI>s#bl4]Dqmnli.%J "-r3P!i5nFJcC<$LAuc~> hu<oV!o*b8!9a4Y"4CNWlg+QOcj]gP!.X,1!ZqD0li.+U,leY-qu6c)-ia8Drre>^!(m.Zs8N)O rrI0Nr;Qgq)>)\`s#bl4]Dqmnli.$4%.<H]!i5nFJcC<$LAuc~> hu<oV!o*b8!9a4Y"4CNWlg+QOcj]gP!.X,1!ZqD0li.+U,leY-qu6c)-ia8Drre>^!(m.Zs8N)O rrI0Nr;Qgq)>)\`s#bl4]Dqmnli.$4%.<H]!i5nFJcC<$LAuc~> hu<oV!o*b8!9a4Y"4CNWlg+QOcj]gP!.X,1!ZqD0li.+U,leY-qu6c)-ia8Drre>^!(m.Zs8N)O rrI0Nr;Qgq)>)\`s#bl4]Dqmnli.$4%.<H]!i5nFJcC<$LAuc~> hu<o8!Vuc6#lac%!J;Tq!!)?Nrs)0s!*HbEUVQ!krr<$dli.&Y!!U@>rrLG4r;cZn"*=MCII[@; !8.;P:,)VG!n@C+g].:9JcE@^s#fZJ!pgJ9lMgp^!7l`$JcCK)J,~> hu<o8!Vuc6#lac%!J;Tq!!)?Nrs)0s!*HbEUVQ!krr<$dli.&Y!!U@>rrLG4r;cZn"*=MCII[@; !8.;P:,)VG!n@C+g].:9JcE@^s#fZJ!pgJ9lMgp^!7l`$JcCK)J,~> hu<o8!Vuc6#lac%!J;Tq!!)?Nrs)0s!*HbEUVQ!krr<$dli.&Y!!U@>rrLG4r;cZn"*=MCII[@; !8.;P:,)VG!n@C+g].:9JcE@^s#fZJ!pgJ9lMgp^!7l`$JcCK)J,~> hu<kl)ZTi6-i<oI\t>Sp!:/tN!tPAVro*nW!!#CQrr\no!/CFO#/gQC!=Jl-q>UTp1B7R+o)J^i f`(t%<r;mu@1MGTs8P34s1A=24RE(LBaE_`rrT"siIV#[s+^Q(~> hu<kl)ZTi6-i<oI\t>Sp!:/tN!tPAVro*nW!!#CQrr\no!/CFO#/gQC!=Jl-q>UTp1B7R+o)J^i f`(t%<r;mu@1MGTs8P34s1A=24RE(LBaE_`rrT"siIV#[s+^Q(~> hu<kl)ZTi6-i<oI\t>Sp!:/tN!tPAVro*nW!!#CQrr\no!/CFO#/gQC!=Jl-q>UTp1B7R+o)J^i f`(t%<r;mu@1MGTs8P34s1A=24RE(LBaE_`rrT"siIV#[s+^Q(~> hu<kL3WK,68,3,a!!)?Ns8N'!6i6lhpQJ5i"pZ;Yf_kaRgM.u=";jT,s7ZN`rri0>!$V19rs&94 1WVo`!;QQr_Z0[7o)J^ig&D-P#^Q=I!osblh#IC:JcE@^s#f]K!kAA\l2Lg]!9&M/JcCK)J,~> hu<kL3WK,68,3,a!!)?Ns8N'!6i6lhpQJ5i"pZ;Yf_kaRgM.u=";jT,s7ZN`rri0>!$V19rs&94 1WVo`!;QQr_Z0[7o)J^ig&D-P#^Q=I!osblh#IC:JcE@^s#f]K!kAA\l2Lg]!9&M/JcCK)J,~> hu<kL3WK,68,3,a!!)?Ns8N'!6i6lhpQJ5i"pZ;Yf_kaRgM.u=";jT,s7ZN`rri0>!$V19rs&94 1WVo`!;QQr_Z0[7o)J^ig&D-P#^Q=I!osblh#IC:JcE@^s#f]K!kAA\l2Lg]!9&M/JcCK)J,~> hu<k,=TAD6BDDN,!!)?Qs8Kq9!!"kS_uK`:fD5IJ%G:[[!NHJ'!<3#m!:g'kXoJH_qYp`BrVo4b !;HKq2uj$Co`#!;!$g1s!oX-MqYpVW!4^kbs#bl4]Dqmnmf*CC'JT7FrrS_kiIV#[s+^Q(~> hu<k,=TAD6BDDN,!!)?Qs8Kq9!!"kS_uK`:fD5IJ%G:[[!NHJ'!<3#m!:g'kXoJH_qYp`BrVo4b !;HKq2uj$Co`#!;!$g1s!oX-MqYpVW!4^kbs#bl4]Dqmnmf*CC'JT7FrrS_kiIV#[s+^Q(~> hu<k,=TAD6BDDN,!!)?Qs8Kq9!!"kS_uK`:fD5IJ%G:[[!NHJ'!<3#m!:g'kXoJH_qYp`BrVo4b !;HKq2uj$Co`#!;!$g1s!oX-MqYpVW!4^kbs#bl4]Dqmnmf*CC'JT7FrrS_kiIV#[s+^Q(~> iW&WPqZ$Qq!:0(QpAk6n']3)X[D8Xg!!$m9s4.DT#BmYhPY1rTrkna9!&XYlnc&\s!!)'RrrPOf !;HKqO8o9Np&>-Y-NJkRrrTn7_YX97q_08fhZ*U<JcE@^s#fcM"4\;)h<=k?Q2olps+13)s*t~> iW&WPqZ$Qq!:0(QpAk6n']3)X[D8Xg!!$m9s4.DT#BmYhPY1rTrkna9!&XYlnc&\s!!)'RrrPOf !;HKqO8o9Np&>-Y-NJkRrrTn7_YX97q_08fhZ*U<JcE@^s#fcM"4\;)h<=k?Q2olps+13)s*t~> iW&WPqZ$Qq!:0(QpAk6n']3)X[D8Xg!!$m9s4.DT#BmYhPY1rTrkna9!&XYlnc&\s!!)'RrrPOf !;HKqO8o9Np&>-Y-NJkRrrTn7_YX97q_08fhZ*U<JcE@^s#fcM"4\;)h<=k?Q2olps+13)s*t~> hu<j)V#UH9Yk\7u!!)?Qs7ZNhrs>A!!(d.i?iU21pAb-m!(6/R!\"*hpAY1]!!)cn"3plHCA7`3 pR*'&1&0H%!h]PLq>UN<")-Qks#bl4]Dqmnnc&akS.$:ckPkUL!9&M/JcCK)J,~> hu<j)V#UH9Yk\7u!!)?Qs7ZNhrs>A!!(d.i?iU21pAb-m!(6/R!\"*hpAY1]!!)cn"3plHCA7`3 pR*'&1&0H%!h]PLq>UN<")-Qks#bl4]Dqmnnc&akS.$:ckPkUL!9&M/JcCK)J,~> hu<j)V#UH9Yk\7u!!)?Qs7ZNhrs>A!!(d.i?iU21pAb-m!(6/R!\"*hpAY1]!!)cn"3plHCA7`3 pR*'&1&0H%!h]PLq>UN<")-Qks#bl4]Dqmnnc&akS.$:ckPkUL!9&M/JcCK)J,~> hu<if^An09b4u#:!!)?Ns8N'!6i-fbhet"Qr;[!gs8O&=,5)!9!!#CRrrNW03qiRT6N@,\rr_ck !)WLk#47$Y!!#4Jf`)#0!;?3f!dk!PhuE^=T`5,`R$mH:s8P4Qrrr1t1B9u/k5PLK!:5::JcCK) J,~> hu<if^An09b4u#:!!)?Ns8N'!6i-fbhet"Qr;[!gs8O&=,5)!9!!#CRrrNW03qiRT6N@,\rr_ck !)WLk#47$Y!!#4Jf`)#0!;?3f!dk!PhuE^=T`5,`R$mH:s8P4Qrrr1t1B9u/k5PLK!:5::JcCK) J,~> hu<if^An09b4u#:!!)?Ns8N'!6i-fbhet"Qr;[!gs8O&=,5)!9!!#CRrrNW03qiRT6N@,\rr_ck !)WLk#47$Y!!#4Jf`)#0!;?3f!dk!PhuE^=T`5,`R$mH:s8P4Qrrr1t1B9u/k5PLK!:5::JcCK) J,~> i;X#Q!8.>8!9EqTrr<&bli6tb!(6Y`!Q,<A!!PairriBep&G$l!(6/R!WrEepAY1]!!)cn"8`&u 8c/MmolplF!&LPNfDbkk%eou*q`#8Mi;`g>U&P;a+ohTen=fm^4S\p^mE)2V9+1eY[,h5gQ2pE* s+13)s*t~> i;X#Q!8.>8!9EqTrr<&bli6tb!(6Y`!Q,<A!!PairriBep&G$l!(6/R!WrEepAY1]!!)cn"8`&u 8c/MmolplF!&LPNfDbkk%eou*q`#8Mi;`g>U&P;a+ohTen=fm^4S\p^mE)2V9+1eY[,h5gQ2pE* s+13)s*t~> i;X#Q!8.>8!9EqTrr<&bli6tb!(6Y`!Q,<A!!PairriBep&G$l!(6/R!WrEepAY1]!!)cn"8`&u 8c/MmolplF!&LPNfDbkk%eou*q`#8Mi;`g>U&P;a+ohTen=fm^4S\p^mE)2V9+1eY[,h5gQ2pE* s+13)s*t~> i;X#9!:p07!rVinrr<&bli6tb!(6Y`%Pn(cEk'#;!!#Cdrt,5Tp&G$l!(6/R!YGDapAY1]!!)cn "76'g=o84%56([T^=</`=XNkB"5XMNq;MAR4JDcTR/I!b.A900&-50br\FX++V>"Z!!<<\H.(^P !gWiUJcC<$LAuc~> i;X#9!:p07!rVinrr<&bli6tb!(6Y`%Pn(cEk'#;!!#Cdrt,5Tp&G$l!(6/R!YGDapAY1]!!)cn "76'g=o84%56([T^=</`=XNkB"5XMNq;MAR4JDcTR/I!b.A900&-50br\FX++V>"Z!!<<\H.(^P !gWiUJcC<$LAuc~> i;X#9!:p07!rVinrr<&bli6tb!(6Y`%Pn(cEk'#;!!#Cdrt,5Tp&G$l!(6/R!YGDapAY1]!!)cn "76'g=o84%56([T^=</`=XNkB"5XMNq;MAR4JDcTR/I!b.A900&-50br\FX++V>"Z!!<<\H.(^P !gWiUJcC<$LAuc~> irA`Qq>^Hp!:/tNrr<$dqu6^$!&jiV$%)^Q6i[0T!!'4rrrN9&0CAcA2#mmWp\t:^!!)cn"2t6? Jc#HM56([Q^=</`69k/C!ic90iW&p?U&P+]r;ZgHTg\nlrBpo_<FT`fP.'*?hu<b5!:YR>VuHkn ]=Yt3s5a31~> irA`Qq>^Hp!:/tNrr<$dqu6^$!&jiV$%)^Q6i[0T!!'4rrrN9&0CAcA2#mmWp\t:^!!)cn"2t6? Jc#HM56([Q^=</`69k/C!ic90iW&p?U&P+]r;ZgHTg\nlrBpo_<FT`fP.'*?hu<b5!:YR>VuHkn ]=Yt3s5a31~> irA`Qq>^Hp!:/tNrr<$dqu6^$!&jiV$%)^Q6i[0T!!'4rrrN9&0CAcA2#mmWp\t:^!!)cn"2t6? Jc#HM56([Q^=</`69k/C!ic90iW&p?U&P+]r;ZgHTg\nlrBpo_<FT`fP.'*?hu<b5!:YR>VuHkn ]=Yt3s5a31~> i;WtC4TGG58GE/a!!)?Ns8N'!6i6le)ZU/2[oiV0$UasoXoJG,G.>/I9`+ho*rl:m^p]6mrr[3? !5&+-rj)YZ!!*#)qYpYL!!'b1rs/4A%0-AaVu50H!@V"@rrR`OMrOd:4JDcYmih`3,4M<+s#ea0 !f$dFJcDYJ"5s4[*eF@Ps*t~> i;WtC4TGG58GE/a!!)?Ns8N'!6i6le)ZU/2[oiV0$UasoXoJG,G.>/I9`+ho*rl:m^p]6mrr[3? !5&+-rj)YZ!!*#)qYpYL!!'b1rs/4A%0-AaVu50H!@V"@rrR`OMrOd:4JDcYmih`3,4M<+s#ea0 !f$dFJcDYJ"5s4[*eF@Ps*t~> i;WtC4TGG58GE/a!!)?Ns8N'!6i6le)ZU/2[oiV0$UasoXoJG,G.>/I9`+ho*rl:m^p]6mrr[3? !5&+-rj)YZ!!*#)qYpYL!!'b1rs/4A%0-AaVu50H!@V"@rrR`OMrOd:4JDcYmih`3,4M<+s#ea0 !f$dFJcDYJ"5s4[*eF@Ps*t~> i;Wsu?2sq4CA7c.!!)?Ns8N'!6i6l`I/EsH;#gS`rr2t8q>gEm!/14Lnc&^2!!$4!s7cTkrri<H !#kh3rs%kE(]XP!lIc+;&T@=A"9)C)Z/bla4J;]Vn<oa7T`>$Sdf0B(!<.QLVuHkX!!"'ks5a31~> i;Wsu?2sq4CA7c.!!)?Ns8N'!6i6l`I/EsH;#gS`rr2t8q>gEm!/14Lnc&^2!!$4!s7cTkrri<H !#kh3rs%kE(]XP!lIc+;&T@=A"9)C)Z/bla4J;]Vn<oa7T`>$Sdf0B(!<.QLVuHkX!!"'ks5a31~> i;Wsu?2sq4CA7c.!!)?Ns8N'!6i6l`I/EsH;#gS`rr2t8q>gEm!/14Lnc&^2!!$4!s7cTkrri<H !#kh3rs%kE(]XP!lIc+;&T@=A"9)C)Z/bla4J;]Vn<oa7T`>$Sdf0B(!<.QLVuHkX!!"'ks5a31~> i;WsRIfKF4N;3DTr;Zi_li6tb!(6Y`$2])g"=B')!!#Cbrs#c%('G!sDYsG<rfSrA!uj`!rrY7] "4mALp]13k"/>hrN;!8TpmE0'0_jB%!r;nMoD\pc2[6hRs8P34s1A=24OX61I/niuVZ-bW!!"'k s5a31~> i;WsRIfKF4N;3DTr;Zi_li6tb!(6Y`$2])g"=B')!!#Cbrs#c%('G!sDYsG<rfSrA!uj`!rrY7] "4mALp]13k"/>hrN;!8TpmE0'0_jB%!r;nMoD\pc2[6hRs8P34s1A=24OX61I/niuVZ-bW!!"'k s5a31~> i;WsRIfKF4N;3DTr;Zi_li6tb!(6Y`$2])g"=B')!!#Cbrs#c%('G!sDYsG<rfSrA!uj`!rrY7] "4mALp]13k"/>hrN;!8TpmE0'0_jB%!r;nMoD\pc2[6hRs8P34s1A=24OX61I/niuVZ-bW!!"'k s5a31~> i;Ws/TE"p3Xn_nu`;fnPYQ"aH!WY:Zmf*FT(]YfSo`#$X-ieqSrrVHcPk+hVmk>*`jo>?CJcE@^ s#ea0!I+g"s/,eui;`j!JcFg2J,~> i;Ws/TE"p3Xn_nu`;fnPYQ"aH!WY:Zmf*FT(]YfSo`#$X-ieqSrrVHcPk+hVmk>*`jo>?CJcE@^ s#ea0!I+g"s/,eui;`j!JcFg2J,~> i;Ws/TE"p3Xn_nu`;fnPYQ"aH!WY:Zmf*FT(]YfSo`#$X-ieqSrrVHcPk+hVmk>*`jo>?CJcE@^ s#ea0!I+g"s/,eui;`j!JcFg2J,~> iVs,\#J^<7!mg`C#?)*5!!!$0Bs@U>HiO._n,EOd5l_),o)Ad:!$g4t!o!^Mnc&^V/.BM[s8P34 s1A=24OX61FUs''VZ-bW!!"'ks5a31~> iVs,\#J^<7!mg`C#?)*5!!!$0Bs@U>HiO._n,EOd5l_),o)Ad:!$g4t!o!^Mnc&^V/.BM[s8P34 s1A=24OX61FUs''VZ-bW!!"'ks5a31~> iVs,\#J^<7!mg`C#?)*5!!!$0Bs@U>HiO._n,EOd5l_),o)Ad:!$g4t!o!^Mnc&^V/.BM[s8P34 s1A=24OX61FUs''VZ-bW!!"'ks5a31~> JcGTH"T;:"!.",7"Sb[k!M/`[rrCdQ!mCYMnG`UR-4@3Ds8P34s1A=24OX61Bb,dpVZ-bW!!"'k s5a31~> JcGTH"T;:"!.",7"Sb[k!M/`[rrCdQ!mCYMnG`UR-4@3Ds8P34s1A=24OX61Bb,dpVZ-bW!!"'k s5a31~> JcGTH"T;:"!.",7"Sb[k!M/`[rrCdQ!mCYMnG`UR-4@3Ds8P34s1A=24OX61Bb,dpVZ-bW!!"'k s5a31~> JcGQG"8PjuWq$)kqc3ffn,NCfgA_5f!5e4)"6hZGSEU"Q4G!OEs8P40rrHgSJcDVI"5s4[*eF@P s*t~> JcGQG"8PjuWq$)kqc3ffn,NCfgA_5f!5e4)"6hZGSEU"Q4G!OEs8P40rrHgSJcDVI"5s4[*eF@P s*t~> JcGQG"8PjuWq$)kqc3ffn,NCfgA_5f!5e4)"6hZGSEU"Q4G!OEs8P40rrHgSJcDVI"5s4[*eF@P s*t~> JcGNF!WC10rrN&?mf3:egA_5W!7C67"7o(aJa*474G!OEs8P40rrHIJJcDVI"5s4[*eF@Ps*t~> JcGNF!WC10rrN&?mf3:egA_5W!7C67"7o(aJa*474G!OEs8P40rrHIJJcDVI"5s4[*eF@Ps*t~> JcGNF!WC10rrN&?mf3:egA_5W!7C67"7o(aJa*474G!OEs8P40rrHIJJcDVI"5s4[*eF@Ps*t~> JcF'rrrCdQ!hKDMmJd=d@/s<tli6uIJcE@^s#ea0!Epe#s/,eui;`j!JcFg2J,~> JcF'rrrCdQ!hKDMmJd=d@/s<tli6uIJcE@^s#ea0!Epe#s/,eui;`j!JcFg2J,~> JcF'rrrCdQ!hKDMmJd=d@/s<tli6uIJcE@^s#ea0!Epe#s/,eui;`j!JcFg2J,~> JcF'rrrCdQ!fm?Mli.'I"XVU`s8P34s1A=24OX61="T"'VZ-bW!!"'ks5a31~> JcF'rrrCdQ!fm?Mli.'I"XVU`s8P34s1A=24OX61="T"'VZ-bW!!"'ks5a31~> JcF'rrrCdQ!fm?Mli.'I"XVU`s8P34s1A=24OX61="T"'VZ-bW!!"'ks5a31~> JcF'rrrCdQ!f$dNlMgt,*"&>*s8P34s1A=24OX619.b_pVZ-bW!!"'ks5a31~> JcF'rrrCdQ!f$dNlMgt,*"&>*s8P34s1A=24OX619.b_pVZ-bW!!"'ks5a31~> JcF'rrrCdQ!f$dNlMgt,*"&>*s8P34s1A=24OX619.b_pVZ-bW!!"'ks5a31~> JcF'rrrCdQ!Ib%4rrhUV!)VkIs8P34s1A=24OX61907_)VZ-bW!!"'ks5a31~> JcF'rrrCdQ!Ib%4rrhUV!)VkIs8P34s1A=24OX61907_)VZ-bW!!"'ks5a31~> JcF'rrrCdQ!Ib%4rrhUV!)VkIs8P34s1A=24OX61907_)VZ-bW!!"'ks5a31~> JcF'rrrCdQ!I+t7rri=c$k]3&s8P34s1A=24OX615s0_uVZ-bW!!"'ks5a31~> JcF'rrrCdQ!I+t7rri=c$k]3&s8P34s1A=24OX615s0_uVZ-bW!!"'ks5a31~> JcF'rrrCdQ!I+t7rri=c$k]3&s8P34s1A=24OX615s0_uVZ-bW!!"'ks5a31~> JcF'rrrCdQ!GrA/rrh4J!(l,>s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4OX614@=]"VZ-bW!!"'k s5a31~> JcF'rrrCdQ!GrA/rrh4J!(l,>s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4OX614@=]"VZ-bW!!"'k s5a31~> JcF'rrrCdQ!GrA/rrh4J!(l,>s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4OX614@=]"VZ-bW!!"'k s5a31~> JcF'rrrCdQ!GNM6rrrCk'*`OHo`';$/=F3Oo9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H ]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\l RIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl/3MA\!BEf(s/,eui;`j! JcFg2J,~> JcF'rrrCdQ!GNM6rrrCk'*`OHo`';$/=F3Oo9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H ]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\l RIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl/3MA\!BEf(s/,eui;`j! JcFg2J,~> JcF'rrrCdQ!GNM6rrrCk'*`OHo`';$/=F3Oo9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H ]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\l RIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl/3MA\!BEf(s/,eui;`j! JcFg2J,~> JcF'rrrCdQ!F-]*rrqk4"r*@"pAb.TJcE@^s#ea0!A-rqs/,eui;`j!JcFg2J,~> JcF'rrrCdQ!F-]*rrqk4"r*@"pAb.TJcE@^s#ea0!A-rqs/,eui;`j!JcFg2J,~> JcF'rrrCdQ!F-]*rrqk4"r*@"pAb.TJcE@^s#ea0!A-rqs/,eui;`j!JcFg2J,~> JcF'rrrCdQ!Eq#3rrq.S!%=Q;q#C@VJcE@^s#ea0!A.H*s/,eui;`j!JcFg2J,~> JcF'rrrCdQ!Eq#3rrq.S!%=Q;q#C@VJcE@^s#ea0!A.H*s/,eui;`j!JcFg2J,~> JcF'rrrCdQ!Eq#3rrq.S!%=Q;q#C@VJcE@^s#ea0!A.H*s/,eui;`j!JcFg2J,~> JcF'rrrCdQ!Eq)3rrp81!$@EtqZ$RXJcE@^s#ea0!?t]us/,eui;`j!JcFg2J,~> JcF'rrrCdQ!Eq)3rrp81!$@EtqZ$RXJcE@^s#ea0!?t]us/,eui;`j!JcFg2J,~> JcF'rrrCdQ!Eq)3rrp81!$@EtqZ$RXJcE@^s#ea0!?t]us/,eui;`j!JcFg2J,~> JcF'rrrCdQ!EUl.rrpYH!Z$FOr;ZdZJcE@^s#ea0!?P[#s/,eui;`j!JcFg2J,~> JcF'rrrCdQ!EUl.rrpYH!Z$FOr;ZdZJcE@^s#ea0!?P[#s/,eui;`j!JcFg2J,~> JcF'rrrCdQ!EUl.rrpYH!Z$FOr;ZdZJcE@^s#ea0!?P[#s/,eui;`j!JcFg2J,~> JcF'rrrCdQ!D>#ursIFh#mF26rVum[4G!OEs8P40rrEsNJcDVI"5s4[*eF@Ps*t~> JcF'rrrCdQ!D>#ursIFh#mF26rVum[4G!OEs8P40rrEsNJcDVI"5s4[*eF@Ps*t~> JcF'rrrCdQ!D>#ursIFh#mF26rVum[4G!OEs8P40rrEsNJcDVI"5s4[*eF@Ps*t~> JcF'rrrCdQ!D>#srs8(W/H?iBeiZ'Gs1A=24OX61%<[7%VZ-bW!!"'ks5a31~> JcF'rrrCdQ!D>#srs8(W/H?iBeiZ'Gs1A=24OX61%<[7%VZ-bW!!"'ks5a31~> JcF'rrrCdQ!D>#srs8(W/H?iBeiZ'Gs1A=24OX61%<[7%VZ-bW!!"'ks5a31~> JcF'rrrCdQ!D>#prs$PT$igVUd=M>1s8P40rrE+Mci<e@!e:7Mr;Zp')GI2_s6K[ei;`j!JcFg2 J,~> JcF'rrrCdQ!D>#prs$PT$igVUd=M>1s8P40rrE+Mci<e@!e:7Mr;Zp')GI2_s6K[ei;`j!JcFg2 J,~> JcF'rrrCdQ!D>#prs$PT$igVUd=M>1s8P40rrE+Mci<e@!e:7Mr;Zp')GI2_s6K[ei;`j!JcFg2 J,~> JcF'rrrCdQ!D>)prs84p'E\=\GJ*[$s1n[74Oa<3nc4Tos7lWrJ,fQE!!$5Ss6Tafi;`j!JcFg2 J,~> JcF'rrrCdQ!D>)prs84p'E\=\GJ*[$s1n[74Oa<3nc4Tos7lWrJ,fQE!!$5Ss6Tafi;`j!JcFg2 J,~> JcF'rrrCdQ!D>)prs84p'E\=\GJ*[$s1n[74Oa<3nc4Tos7lWrJ,fQE!!$5Ss6Tafi;`j!JcFg2 J,~> JcF'rrrCdQ!D>Q&rsCkLY?VP;#Xa<er.4mds8P41rrV?`QI#U2!!"kR_[PN(rr<$U_n:g>!!''N s6]ggi;`j!JcFg2J,~> JcF'rrrCdQ!D>Q&rsCkLY?VP;#Xa<er.4mds8P41rrV?`QI#U2!!"kR_[PN(rr<$U_n:g>!!''N s6]ggi;`j!JcFg2J,~> JcF'rrrCdQ!D>Q&rsCkLY?VP;#Xa<er.4mds8P41rrV?`QI#U2!!"kR_[PN(rr<$U_n:g>!!''N s6]ggi;`j!JcFg2J,~> JcF'rrrCdQ!D>Q&s8P4]rsJV?J33u8%nV2SjamHQs8P41rrUsUV9f2A!!#C^s8N'!6iR)f]`8%: JcG-;"5s4[*eF@Ps*t~> JcF'rrrCdQ!D>Q&s8P4]rsJV?J33u8%nV2SjamHQs8P41rrUsUV9f2A!!#C^s8N'!6iR)f]`8%: JcG-;"5s4[*eF@Ps*t~> JcF'rrrCdQ!D>Q&s8P4]rsJV?J33u8%nV2SjamHQs8P41rrUsUV9f2A!!#C^s8N'!6iR)f]`8%: JcG-;"5s4[*eF@Ps*t~> JcF'rrrCdQ!D>Q&s8P4Yrs\M-F#O@)!#eXcYLiT$s3CZE4T>?]rMS<J!mq"Pci="F!(6S^rr<$d rr3)s!!#WBs6]ggi;`j!JcFg2J,~> JcF'rrrCdQ!D>Q&s8P4Yrs\M-F#O@)!#eXcYLiT$s3CZE4T>?]rMS<J!mq"Pci="F!(6S^rr<$d rr3)s!!#WBs6]ggi;`j!JcFg2J,~> JcF'rrrCdQ!D>Q&s8P4Yrs\M-F#O@)!#eXcYLiT$s3CZE4T>?]rMS<J!mq"Pci="F!(6S^rr<$d rr3)s!!#WBs6]ggi;`j!JcFg2J,~> JcF'rrrCdQ!D5K%s8P4Urt"tOR:S)V!!!-I966N7fCZZS"7V\Gn=]g]4TGE_^*Wj4rrU(<]?gNW !!#C^s8N'!6iR)fbQ%WWJcG-;"5s4[*eF@Ps*t~> JcF'rrrCdQ!D5K%s8P4Urt"tOR:S)V!!!-I966N7fCZZS"7V\Gn=]g]4TGE_^*Wj4rrU(<]?gNW !!#C^s8N'!6iR)fbQ%WWJcG-;"5s4[*eF@Ps*t~> JcF'rrrCdQ!D5K%s8P4Urt"tOR:S)V!!!-I966N7fCZZS"7V\Gn=]g]4TGE_^*Wj4rrU(<]?gNW !!#C^s8N'!6iR)fbQ%WWJcG-;"5s4[*eF@Ps*t~> JcF'rrrCdQs#e^/s#flP#5?EAJm'u@r;[69.R[TgP+f+pcJ@peaSuG3+ohTen=fm^49XV5'*&p& rrTY0`m=\\!<3#u!!bmkq8+N[!5=$amJd:I!!"'ks5a31~> JcF'rrrCdQs#e^/s#flP#5?EAJm'u@r;[69.R[TgP+f+pcJ@peaSuG3+ohTen=fm^49XV5'*&p& rrTY0`m=\\!<3#u!!bmkq8+N[!5=$amJd:I!!"'ks5a31~> JcF'rrrCdQs#e^/s#flP#5?EAJm'u@r;[69.R[TgP+f+pcJ@peaSuG3+ohTen=fm^49XV5'*&p& rrTY0`m=\\!<3#u!!bmkq8+N[!5=$amJd:I!!"'ks5a31~> JcF'rrrCdQs#e^/s#fWI#j0""N,Vi\+U@fC"Uu%b+sJE61B9bi6i\\7!!&I]rrtLu('+C8#M;EG /c[l]6ib^6s7lZos7lWp@tF[Hrr_3[!$6^kjSs`~> JcF'rrrCdQs#e^/s#fWI#j0""N,Vi\+U@fC"Uu%b+sJE61B9bi6i\\7!!&I]rrtLu('+C8#M;EG /c[l]6ib^6s7lZos7lWp@tF[Hrr_3[!$6^kjSs`~> JcF'rrrCdQs#e^/s#fWI#j0""N,Vi\+U@fC"Uu%b+sJE61B9bi6i\\7!!&I]rrtLu('+C8#M;EG /c[l]6ib^6s7lZos7lWp@tF[Hrr_3[!$6^kjSs`~> JcF'rrrCdQs#e^/s#f<@$guiq^9=2lJobO9Ac>[09@-',.K'5HR\B`c3YW>1!!!8V6ink=4Olh" e,97G!!"kR_uB]5!!4C1rdk+9rr_3[!$6^kjSs`~> JcF'rrrCdQs#e^/s#f<@$guiq^9=2lJobO9Ac>[09@-',.K'5HR\B`c3YW>1!!!8V6ink=4Olh" e,97G!!"kR_uB]5!!4C1rdk+9rr_3[!$6^kjSs`~> JcF'rrrCdQs#e^/s#f<@$guiq^9=2lJobO9Ac>[09@-',.K'5HR\B`c3YW>1!!!8V6ink=4Olh" e,97G!!"kR_uB]5!!4C1rdk+9rr_3[!$6^kjSs`~> JcF'rrrCdQs#e^/s#d"T"n*W8!$^p+s8P1aiC=O]);+rjQ2p6ss8N'!6i$c^!!>'qbN4<Tl2LkE !!"'ks5a31~> JcF'rrrCdQs#e^/s#d"T"n*W8!$^p+s8P1aiC=O]);+rjQ2p6ss8N'!6i$c^!!>'qbN4<Tl2LkE !!"'ks5a31~> JcF'rrrCdQs#e^/s#d"T"n*W8!$^p+s8P1aiC=O]);+rjQ2p6ss8N'!6i$c^!!>'qbN4<Tl2LkE !!"'ks5a31~> JcF'rrrCdQs#e^/s#ctS"7V_In=]g]4TGE_^*Wj4rrRrUp<Wd=!!#C^s8N'!6\5:"rr_3[!$6^k jSs`~> JcF'rrrCdQs#e^/s#ctS"7V_In=]g]4TGE_^*Wj4rrRrUp<Wd=!!#C^s8N'!6\5:"rr_3[!$6^k jSs`~> JcF'rrrCdQs#e^/s#ctS"7V_In=]g]4TGE_^*Wj4rrRrUp<Wd=!!#C^s8N'!6\5:"rr_3[!$6^k jSs`~> JcF'rrrCdQ!C/cps8P34s1A=24T>?]rMS<J!IOsos8N'!6i$c^!!#B;s5s=`i;`j!JcFg2J,~> JcF'rrrCdQ!C/cps8P34s1A=24T>?]rMS<J!IOsos8N'!6i$c^!!#B;s5s=`i;`j!JcFg2J,~> JcF'rrrCdQ!C/cps8P34s1A=24T>?]rMS<J!IOsos8N'!6i$c^!!#B;s5s=`i;`j!JcFg2J,~> JcF'rrrCdQ!D>Q&s8P34s1A=24Oa<2E=^@prr<$dq>^Hp!(2>;k5PPB!!"'ks5a31~> JcF'rrrCdQ!D>Q&s8P34s1A=24Oa<2E=^@prr<$dq>^Hp!(2>;k5PPB!!"'ks5a31~> JcF'rrrCdQ!D>Q&s8P34s1A=24Oa<2E=^@prr<$dq>^Hp!(2>;k5PPB!!"'ks5a31~> JcF'rrrCdQ!D>Q&s8P34s1A=24Oa<2AfT+rrr<$dq>^Hp!(2>;k5PPB!!"'ks5a31~> JcF'rrrCdQ!D>Q&s8P34s1A=24Oa<2AfT+rrr<$dq>^Hp!(2>;k5PPB!!"'ks5a31~> JcF'rrrCdQ!D>Q&s8P34s1A=24Oa<2AfT+rrr<$dq>^Hp!(2>;k5PPB!!"'ks5a31~> JcF'rrrCdQ!D>E"s8P34s1A=24Oa<2=!rS!V>gYV!!"'ks5a31~> JcF'rrrCdQ!D>E"s8P34s1A=24Oa<2=!rS!V>gYV!!"'ks5a31~> JcF'rrrCdQ!D>E"s8P34s1A=24Oa<2=!rS!V>gYV!!"'ks5a31~> JcF'rrrCdQ!DP/ns8P34s1A=24Oa<27QH&"V>gYV!!"'ks5a31~> JcF'rrrCdQ!DP/ns8P34s1A=24Oa<27QH&"V>gYV!!"'ks5a31~> JcF'rrrCdQ!DP/ns8P34s1A=24Oa<27QH&"V>gYV!!"'ks5a31~> JcF'rrrCdQ!Eq)&s8P34s1A=24Oa<21e`K#V>gYV!!"'ks5a31~> JcF'rrrCdQ!Eq)&s8P34s1A=24Oa<21e`K#V>gYV!!"'ks5a31~> JcF'rrrCdQ!Eq)&s8P34s1A=24Oa<21e`K#V>gYV!!"'ks5a31~> JcF'rrrCdQ!EpPls8P34s1A=24Oa<2,%#p$V>gYV!!"'ks5a31~> JcF'rrrCdQ!EpPls8P34s1A=24Oa<2,%#p$V>gYV!!"'ks5a31~> JcF'rrrCdQ!EpPls8P34s1A=24Oa<2,%#p$V>gYV!!"'ks5a31~> JcF'rrrCdQ!GEP%s8P34s1A=24Oa<2%WR("V>gYV!!"'ks5a31~> JcF'rrrCdQ!GEP%s8P34s1A=24Oa<2%WR("V>gYV!!"'ks5a31~> JcF'rrrCdQ!GEP%s8P34s1A=24Oa<2%WR("V>gYV!!"'ks5a31~> JcF'rrrCdQ!GN1os8P34s1A=24OjB4qZ)5!s/#_ti;`j!JcFg2J,~> JcF'rrrCdQ!GN1os8P34s1A=24OjB4qZ)5!s/#_ti;`j!JcFg2J,~> JcF'rrrCdQ!GN1os8P34s1A=24OjB4qZ)5!s/#_ti;`j!JcFg2J,~> JcF'r">'Uuf_"#"!HS^ts8P34s1A=24OjB4kl@!"s/#_ti;`j!JcFg2J,~> JcF'r">'Uuf_"#"!HS^ts8P34s1A=24OjB4kl@!"s/#_ti;`j!JcFg2J,~> JcF'r">'Uuf_"#"!HS^ts8P34s1A=24OjB4kl@!"s/#_ti;`j!JcFg2J,~> JcF'r!N-(s!!#[OrrRcPqpPNE4G!OEs8P42rrUdPWe(2Hrr_3[!$6^kjSs`~> JcF'r!N-(s!!#[OrrRcPqpPNE4G!OEs8P42rrUdPWe(2Hrr_3[!$6^kjSs`~> JcF'r!N-(s!!#[OrrRcPqpPNE4G!OEs8P42rrUdPWe(2Hrr_3[!$6^kjSs`~> JcF$q"4(g3$iL&*9B,sQP5spsrrG5;JOI+<!AZderrTk6^k)N^rr_3[!$6^kjSs`~> JcF$q"4(g3$iL&*9B,sQP5spsrrG5;JOI+<!AZderrTk6^k)N^rr_3[!$6^kjSs`~> JcF$q"4(g3$iL&*9B,sQP5spsrrG5;JOI+<!AZderrTk6^k)N^rr_3[!$6^kjSs`~> JcF$q"3t[.$N0r)9B,sQU]B,srrG5;JOI+<!AZderrT%tfn'1"rr_3[!$6^kjSs`~> JcF$q"3t[.$N0r)9B,sQU]B,srrG5;JOI+<!AZderrT%tfn'1"rr_3[!$6^kjSs`~> JcF$q"3t[.$N0r)9B,sQU]B,srrG5;JOI+<!AZderrT%tfn'1"rr_3[!$6^kjSs`~> JcF'r!N#tq!!#[OrrTV/ajU4h4G!OEs8P42rrS2\nU^_:rr_3[!$6^kjSs`~> JcF'r!N#tq!!#[OrrTV/ajU4h4G!OEs8P42rrS2\nU^_:rr_3[!$6^kjSs`~> JcF'r!N#tq!!#[OrrTV/ajU4h4G!OEs8P42rrS2\nU^_:rr_3[!$6^kjSs`~> JcF'r">'V#g@a;%!lk;Odf9>0JcE@^s#eg2!He^"s.oYsi;`j!JcFg2J,~> JcF'r">'V#g@a;%!lk;Odf9>0JcE@^s#eg2!He^"s.oYsi;`j!JcFg2J,~> JcF'r">'V#g@a;%!lk;Odf9>0JcE@^s#eg2!He^"s.oYsi;`j!JcFg2J,~> JcF'rrrCdQ!nRFNdf9>0JcE@^s#eg2!FI%%s.oYsi;`j!JcFg2J,~> JcF'rrrCdQ!nRFNdf9>0JcE@^s#eg2!FI%%s.oYsi;`j!JcFg2J,~> JcF'rrrCdQ!nRFNdf9>0JcE@^s#eg2!FI%%s.oYsi;`j!JcFg2J,~> JcF'rrrCdQ!pTcLdf9>0JcE@^s#eg2!C]&#s.oYsi;`j!JcFg2J,~> JcF'rrrCdQ!pTcLdf9>0JcE@^s#eg2!C]&#s.oYsi;`j!JcFg2J,~> JcF'rrrCdQ!pTcLdf9>0JcE@^s#eg2!C]&#s.oYsi;`j!JcFg2J,~> JcF'rrrCaP!=F"us8P34s1A=24OjB3.9M0$V#LPU!!"'ks5a31~> JcF'rrrCaP!=F"us8P34s1A=24OjB3.9M0$V#LPU!!"'ks5a31~> JcF'rrrCaP!=F"us8P34s1A=24OjB3.9M0$V#LPU!!"'ks5a31~> JcF'rrrCaP!@_'ts8P3<rs%P"+U/WXaL_EO4OjB3$$_%$V#LPU!!"'ks5a31~> JcF'rrrCaP!@_'ts8P3<rs%P"+U/WXaL_EO4OjB3$$_%$V#LPU!!"'ks5a31~> JcF'rrrCaP!@_'ts8P3<rs%P"+U/WXaL_EO4OjB3$$_%$V#LPU!!"'ks5a31~> JcF'rrrCaP!D,2ts8P3=rrL7Rqu?a"V7Zd-4OsH5k5^m#s.oYsi;`j!JcFg2J,~> JcF'rrrCaP!D,2ts8P3=rrL7Rqu?a"V7Zd-4OsH5k5^m#s.oYsi;`j!JcFg2J,~> JcF'rrrCaP!D,2ts8P3=rrL7Rqu?a"V7Zd-4OsH5k5^m#s.oYsi;`j!JcFg2J,~> JcF'rrrCaP!GN@us8P3>rsJE@!!@PYJHc)\jLkNm4OsH5`rNQ!s.oYsi;`j!JcFg2J,~> JcF'rrrCaP!GN@us8P3>rsJE@!!@PYJHc)\jLkNm4OsH5`rNQ!s.oYsi;`j!JcFg2J,~> JcF'rrrCaP!GN@us8P3>rsJE@!!@PYJHc)\jLkNm4OsH5`rNQ!s.oYsi;`j!JcFg2J,~> JcF'rrrCaP!f6pNe,TG1]Dqm2#*ZYZ"rM^cgA_8B!!%KIrr\;^!.hf_s#ej3!iH%LJcDPG"5s4[ *eF@Ps*t~> JcF'rrrCaP!f6pNe,TG1]Dqm2#*ZYZ"rM^cgA_8B!!%KIrr\;^!.hf_s#ej3!iH%LJcDPG"5s4[ *eF@Ps*t~> JcF'rrrCaP!f6pNe,TG1]Dqm2#*ZYZ"rM^cgA_8B!!%KIrr\;^!.hf_s#ej3!iH%LJcDPG"5s4[ *eF@Ps*t~> JcF'rrrCaP!iZ1Ne,TG1]Dqm2!CHqe!!%lHs7jM&rsD?u!pfmdqJQ?64M:^o4OsH5LB@1#s.oYs i;`j!JcFg2J,~> JcF'rrrCaP!iZ1Ne,TG1]Dqm2!CHqe!!%lHs7jM&rsD?u!pfmdqJQ?64M:^o4OsH5LB@1#s.oYs i;`j!JcFg2J,~> JcF'rrrCaP!iZ1Ne,TG1]Dqm2!CHqe!!%lHs7jM&rsD?u!pfmdqJQ?64M:^o4OsH5LB@1#s.oYs i;`j!JcFg2J,~> JcF'rrrCaP!m(GNe,TG1]Dqj1"Upij!WXV=s7cTbrrsDB-NF,#2#[IT'YOJG4OsH4?Qaq"U]1GT !!"'ks5a31~> JcF'rrrCaP!m(GNe,TG1]Dqj1"Upij!WXV=s7cTbrrsDB-NF,#2#[IT'YOJG4OsH4?Qaq"U]1GT !!"'ks5a31~> JcF'rrrCaP!m(GNe,TG1]Dqj1"Upij!WXV=s7cTbrrsDB-NF,#2#[IT'YOJG4OsH4?Qaq"U]1GT !!"'ks5a31~> JcF'rrrCaP!qHAOe,TG1]Dqm2"p2=7s"j]Zo)JIbo)B%%!'U@V$ih_'!!Bn6s#ej3!B3W%s.fSr i;`j!JcFg2J,~> JcF'rrrCaP!qHAOe,TG1]Dqm2"p2=7s"j]Zo)JIbo)B%%!'U@V$ih_'!!Bn6s#ej3!B3W%s.fSr i;`j!JcFg2J,~> JcF'rrrCaP!qHAOe,TG1]Dqm2"p2=7s"j]Zo)JIbo)B%%!'U@V$ih_'!!Bn6s#ej3!B3W%s.fSr i;`j!JcFg2J,~> JcF'rrrC^O!?kdus8P3ns8N'!5lUcb6N@,?rsAi.2d?=`EVDTr#e^3;4OsH4%WR("U]1GT!!"'k s5a31~> JcF'rrrC^O!?kdus8P3ns8N'!5lUcb6N@,?rsAi.2d?=`EVDTr#e^3;4OsH4%WR("U]1GT!!"'k s5a31~> JcF'rrrC^O!?kdus8P3ns8N'!5lUcb6N@,?rsAi.2d?=`EVDTr#e^3;4OsH4%WR("U]1GT!!"'k s5a31~> JcF'rrrC^O!DY>ts8P3ns8N'!6iR)e6N@,Ws7jM&rr<`3!!XR]s8ODG*5)=O4P'N6irGO!s.fSr i;`j!JcFg2J,~> JcF'rrrC^O!DY>ts8P3ns8N'!6iR)e6N@,Ws7jM&rr<`3!!XR]s8ODG*5)=O4P'N6irGO!s.fSr i;`j!JcFg2J,~> JcF'rrrC^O!DY>ts8P3ns8N'!6iR)e6N@,Ws7jM&rr<`3!!XR]s8ODG*5)=O4P'N6irGO!s.fSr i;`j!JcFg2J,~> JcF'rrrC^O!e(CMeGoP2]Dqm2!(6bc!^cqfo)JIbo)B%W!!$?rs8VBd!(sp(s#em4!kSHNJcDMF "5s4[*eF@Ps*t~> JcF'rrrC^O!e(CMeGoP2]Dqm2!(6bc!^cqfo)JIbo)B%W!!$?rs8VBd!(sp(s#em4!kSHNJcDMF "5s4[*eF@Ps*t~> JcF'rrrC^O!e(CMeGoP2]Dqm2!(6bc!^cqfo)JIbo)B%W!!$?rs8VBd!(sp(s#em4!kSHNJcDMF "5s4[*eF@Ps*t~> JcF'rrrC^O!k&*NeGoP2]Dqm2!(6bc!^cqfo)JIbo)AfC!!&&Yrr[ZL!1:G!s#em4!f-sMJcDMF "5s4[*eF@Ps*t~> JcF'rrrC^O!k&*NeGoP2]Dqm2!(6bc!^cqfo)JIbo)AfC!!&&Yrr[ZL!1:G!s#em4!f-sMJcDMF "5s4[*eF@Ps*t~> JcF'rrrC^O!k&*NeGoP2]Dqm2!(6bc!^cqfo)JIbo)AfC!!&&Yrr[ZL!1:G!s#em4!f-sMJcDMF "5s4[*eF@Ps*t~> JcF'rrrC^O!pp#MeGoP2]Dqm2!(6bc!^cqfgA_NB$igN`]6XPZ*q[,Fs#em4!E:V$s.]Mqi;`j! JcFg2J,~> JcF'rrrC^O!pp#MeGoP2]Dqm2!(6bc!^cqfgA_NB$igN`]6XPZ*q[,Fs#em4!E:V$s.]Mqi;`j! JcFg2J,~> JcF'rrrC^O!pp#MeGoP2]Dqm2!(6bc!^cqfgA_NB$igN`]6XPZ*q[,Fs#em4!E:V$s.]Mqi;`j! JcFg2J,~> JcF'rrrC[N!@M"!s8P3ns8N'!6iR)e6N@,>rrJu!qu?a/b.I]R4P'N5+(9a#UAk>S!!"'ks5a31~> JcF'rrrC[N!@M"!s8P3ns8N'!6iR)e6N@,>rrJu!qu?a/b.I]R4P'N5+(9a#UAk>S!!"'ks5a31~> JcF'rrrC[N!@M"!s8P3ns8N'!6iR)e6N@,>rrJu!qu?a/b.I]R4P'N5+(9a#UAk>S!!"'ks5a31~> JcF'rrrC[N!G!2"s8P3ns8N'!6iR)e6N@,=rs$M>'*]RojLYBk4P0T7kl@!"s.]Mqi;`j!JcFg2 J,~> JcF'rrrC[N!G!2"s8P3ns8N'!6iR)e6N@,=rs$M>'*]RojLYBk4P0T7kl@!"s.]Mqi;`j!JcFg2 J,~> JcF'rrrC[N!G!2"s8P3ns8N'!6iR)e6N@,=rs$M>'*]RojLYBk4P0T7kl@!"s.]Mqi;`j!JcFg2 J,~> JcF'rrrC[N!iQ+Mec5Y3JcE@^s#ep5!jD[MJcDJE"5s4[*eF@Ps*t~> JcF'rrrC[N!iQ+Mec5Y3JcE@^s#ep5!jD[MJcDJE"5s4[*eF@Ps*t~> JcF'rrrC[N!iQ+Mec5Y3JcE@^s#ep5!jD[MJcDJE"5s4[*eF@Ps*t~> JcF'rrrC[N!p]oNec5Y3JcE@^s#ep5!cA\MJcDJE"5s4[*eF@Ps*t~> JcF'rrrC[N!p]oNec5Y3JcE@^s#ep5!cA\MJcDJE"5s4[*eF@Ps*t~> JcF'rrrC[N!p]oNec5Y3JcE@^s#ep5!cA\MJcDJE"5s4[*eF@Ps*t~> JcF'rrrCXM!AdI#s8P34s1A=24P0T6.oh0#U&P5R!!"'ks5a31~> JcF'rrrCXM!AdI#s8P34s1A=24P0T6.oh0#U&P5R!!"'ks5a31~> JcF'rrrCXM!AdI#s8P34s1A=24P0T6.oh0#U&P5R!!"'ks5a31~> JcF'rrrCXM!e1RMf)Pb4JcE@^s#es6!p0KMJcDGD"5s4[*eF@Ps*t~> JcF'rrrCXM!e1RMf)Pb4JcE@^s#es6!p0KMJcDGD"5s4[*eF@Ps*t~> JcF'rrrCXM!e1RMf)Pb4JcE@^s#es6!p0KMJcDGD"5s4[*eF@Ps*t~> JcF'rrrCXM!n%(Nf)Pb4JcE@^s#es6!hTMNJcDGD"5s4[*eF@Ps*t~> JcF'rrrCXM!n%(Nf)Pb4JcE@^s#es6!hTMNJcDGD"5s4[*eF@Ps*t~> JcF'rrrCXM!n%(Nf)Pb4JcE@^s#es6!hTMNJcDGD"5s4[*eF@Ps*t~> JcF'rrrCUL!@D"$s8P34s1A=24P9Z78N)/"T`5,Q!!"'ks5a31~> JcF'rrrCUL!@D"$s8P34s1A=24P9Z78N)/"T`5,Q!!"'ks5a31~> JcF'rrrCUL!@D"$s8P34s1A=24P9Z78N)/"T`5,Q!!"'ks5a31~> JcF'rrrCUL!dP:MfDkk5JcE@^s#f!7!p^#MJcDDC"5s4[*eF@Ps*t~> JcF'rrrCUL!dP:MfDkk5JcE@^s#f!7!p^#MJcDDC"5s4[*eF@Ps*t~> JcF'rrrCUL!dP:MfDkk5JcE@^s#f!7!p^#MJcDDC"5s4[*eF@Ps*t~> JcF'rrrCUL!n[LMfDkk5JcE@^s#f!7!gs,NJcDDC"5s4[*eF@Ps*t~> JcF'rrrCUL!n[LMfDkk5JcE@^s#f!7!gs,NJcDDC"5s4[*eF@Ps*t~> JcF'rrrCUL!n[LMfDkk5JcE@^s#f!7!gs,NJcDDC"5s4[*eF@Ps*t~> JcF'rrrCRK!BWa%s8P34s1A=24PB`80h6fpTDo#P!!"'ks5a31~> JcF'rrrCRK!BWa%s8P34s1A=24PB`80h6fpTDo#P!!"'ks5a31~> JcF'rrrCRK!BWa%s8P34s1A=24PB`80h6fpTDo#P!!"'ks5a31~> JcF'rrrCRK!hBDMf`-=]/=F3Oo9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl/3MYd!l"`FJcDAB"5s4[*eF@Ps*t~> JcF'rrrCRK!hBDMf`-=]/=F3Oo9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl/3MYd!l"`FJcDAB"5s4[*eF@Ps*t~> JcF'rrrCRK!hBDMf`-=]/=F3Oo9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl/3MYd!l"`FJcDAB"5s4[*eF@Ps*t~> JcF'rrrCRK!qQkGf`-=]/=F3Oo9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl/3MYd!_t6EJcDAB"5s4[*eF@Ps*t~> JcF'rrrCRK!qQkGf`-=]/=F3Oo9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl/3MYd!_t6EJcDAB"5s4[*eF@Ps*t~> JcF'rrrCRK!qQkGf`-=]/=F3Oo9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YH9_8:tRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHl/3MYd!_t6EJcDAB"5s4[*eF@Ps*t~> JcF'rrrCOJ!cJYAg&M(7JcE@^s#f'9!lP,.JcD>A"5s4[*eF@Ps*t~> JcF'rrrCOJ!cJYAg&M(7JcE@^s#f'9!lP,.JcD>A"5s4[*eF@Ps*t~> JcF'rrrCOJ!cJYAg&M(7JcE@^s#f'9!lP,.JcD>A"5s4[*eF@Ps*t~> JcF'rrrCOJ!oX9Fg&M(7JcE@^s#f*:"9(2*qLS[<rr_3[!$6^kjSs`~> JcF'rrrCOJ!oX9Fg&M(7JcE@^s#f*:"9(2*qLS[<rr_3[!$6^kjSs`~> JcF'rrrCOJ!oX9Fg&M(7JcE@^s#f*:"9(2*qLS[<rr_3[!$6^kjSs`~> JcGNF!p=RunG`RMFSYD*rrCLI!`gB=gAh18JcE@^s#f*:!h01pJcD;@"5s4[*eF@Ps*t~> JcGNF!p=RunG`RMFSYD*rrCLI!`gB=gAh18JcE@^s#f*:!h01pJcD;@"5s4[*eF@Ps*t~> JcGNF!p=RunG`RMFSYD*rrCLI!`gB=gAh18JcE@^s#f*:!h01pJcD;@"5s4[*eF@Ps*t~> [f6Qa?QTFW-)9Q$!T1ZWrr_7(!*\pm"S3l=6h^$LrrCLI!mLb3gAh18JcE@^s#f-;!n[oRJcD8? "5s4[*eF@Ps*t~> [f6Qa?QTFW-)9Q$!T1ZWrr_7(!*\pm"S3l=6h^$LrrCLI!mLb3gAh18JcE@^s#f-;!n[oRJcD8? "5s4[*eF@Ps*t~> [f6Qa?QTFW-)9Q$!T1ZWrr_7(!*\pm"S3l=6h^$LrrCLI!mLb3gAh18JcE@^s#f-;!n[oRJcD8? "5s4[*eF@Ps*t~> i;X#W!o*b8!9a:[#4H[W";th6li."4%/^)*J*$\3*rn[orrha9!#3lZrs%P"+U/WXaSc&@NW9&N rUKpf!7CfJ;&T#\s8P34s1A=24Pp)?p+[BHJcD8?"5s4[*eF@Ps*t~> i;X#W!o*b8!9a:[#4H[W";th6li."4%/^)*J*$\3*rn[orrha9!#3lZrs%P"+U/WXaSc&@NW9&N rUKpf!7CfJ;&T#\s8P34s1A=24Pp)?p+[BHJcD8?"5s4[*eF@Ps*t~> i;X#W!o*b8!9a:[#4H[W";th6li."4%/^)*J*$\3*rn[orrha9!#3lZrs%P"+U/WXaSc&@NW9&N rUKpf!7CfJ;&T#\s8P34s1A=24Pp)?p+[BHJcD8?"5s4[*eF@Ps*t~> i;X#9!Vuc6#laf&#j!<M]D9T")W'i\#>5$s=Lc&>^ubUr!!#CPrrYgm"i^E>!QkuO!!*1ur;Qk@ !!%H;s8N)HrrU^QK\QP,4G!OEs8P4=rr`'i"1Wp^S,WTL!!"'ks5a31~> i;X#9!Vuc6#laf&#j!<M]D9T")W'i\#>5$s=Lc&>^ubUr!!#CPrrYgm"i^E>!QkuO!!*1ur;Qk@ !!%H;s8N)HrrU^QK\QP,4G!OEs8P4=rr`'i"1Wp^S,WTL!!"'ks5a31~> i;X#9!Vuc6#laf&#j!<M]D9T")W'i\#>5$s=Lc&>^ubUr!!#CPrrYgm"i^E>!QkuO!!*1ur;Qk@ !!%H;s8N)HrrU^QK\QP,4G!OEs8P4=rr`'i"1Wp^S,WTL!!"'ks5a31~> i;Wtm)ZTi6-iEuG63,(*rrV![47)tL%fdjRiW&oX!(6,Q"/#VoLA_&YocF/9HFeY3!"%`brri3T !!La@s8N)GrrQU=k1p":4G!OEs8P4>rr`*r!LnZ?Rf<KK!!"'ks5a31~> i;Wtm)ZTi6-iEuG63,(*rrV![47)tL%fdjRiW&oX!(6,Q"/#VoLA_&YocF/9HFeY3!"%`brri3T !!La@s8N)GrrQU=k1p":4G!OEs8P4>rr`*r!LnZ?Rf<KK!!"'ks5a31~> i;Wtm)ZTi6-iEuG63,(*rrV![47)tL%fdjRiW&oX!(6,Q"/#VoLA_&YocF/9HFeY3!"%`brri3T !!La@s8N)GrrQU=k1p":4G!OEs8P4>rr`*r!LnZ?Rf<KK!!"'ks5a31~> i;WtM3WK,68,`Gh^ApIqrrQ4$]^>b!!!#C`rs8@_9,n-@+^`n"rs%4m,R4Gh7K3>]!:g'lqAoV[ q>C6pQiI,8rr3(]!!%TJrr^.=!)iCfrrCFG!osblh#IC:JcE@^s#f9?"6MZGOFdG"rr_3[!$6^k jSs`~> i;WtM3WK,68,`Gh^ApIqrrQ4$]^>b!!!#C`rs8@_9,n-@+^`n"rs%4m,R4Gh7K3>]!:g'lqAoV[ q>C6pQiI,8rr3(]!!%TJrr^.=!)iCfrrCFG!osblh#IC:JcE@^s#f9?"6MZGOFdG"rr_3[!$6^k jSs`~> i;WtM3WK,68,`Gh^ApIqrrQ4$]^>b!!!#C`rs8@_9,n-@+^`n"rs%4m,R4Gh7K3>]!:g'lqAoV[ q>C6pQiI,8rr3(]!!%TJrr^.=!)iCfrrCFG!osblh#IC:JcE@^s#f9?"6MZGOFdG"rr_3[!$6^k jSs`~> i;Wt-=TAD6BDqi3B)mY`rrSnp@dsEs_uB]:2#Y>lrrC[I!!*P]rr3#!$2X`%s7ZN`rr]D(!0@$W $;(:"li7"]DZBc"qu6aX!!;?UrrUFF,L?AkNW?TFs8P34s1A=24Q?ACZPj7RJcD,;"5s4[*eF@P s*t~> i;Wt-=TAD6BDqi3B)mY`rrSnp@dsEs_uB]:2#Y>lrrC[I!!*P]rr3#!$2X`%s7ZN`rr]D(!0@$W $;(:"li7"]DZBc"qu6aX!!;?UrrUFF,L?AkNW?TFs8P34s1A=24Q?ACZPj7RJcD,;"5s4[*eF@P s*t~> i;Wt-=TAD6BDqi3B)mY`rrSnp@dsEs_uB]:2#Y>lrrC[I!!*P]rr3#!$2X`%s7ZN`rr]D(!0@$W $;(:"li7"]DZBc"qu6aX!!;?UrrUFF,L?AkNW?TFs8P34s1A=24Q?ACZPj7RJcD,;"5s4[*eF@P s*t~> irA`Qs8N-T!42V'!n.,rnGi4_s8Nej>*HA0VC;KFD?'Xe#65!P\[n"trr;u8rr<$UrPS1*"'km, j88i\)ZV5bs4]C0!!!`1rr\>_!1``^"6h05L!Tc$q_08fhZ*U<JcE@^s#fBB"P??I1t@0WQi@0H !!"'ks5a31~> irA`Qs8N-T!42V'!n.,rnGi4_s8Nej>*HA0VC;KFD?'Xe#65!P\[n"trr;u8rr<$UrPS1*"'km, j88i\)ZV5bs4]C0!!!`1rr\>_!1``^"6h05L!Tc$q_08fhZ*U<JcE@^s#fBB"P??I1t@0WQi@0H !!"'ks5a31~> irA`Qs8N-T!42V'!n.,rnGi4_s8Nej>*HA0VC;KFD?'Xe#65!P\[n"trr;u8rr<$UrPS1*"'km, j88i\)ZV5bs4]C0!!!`1rr\>_!1``^"6h05L!Tc$q_08fhZ*U<JcE@^s#fBB"P??I1t@0WQi@0H !!"'ks5a31~> i;Ws*V#UH9Yl4S'&HL>Yrr_]i"o[ukpAk$h$)%>!8H8]t!!'4rs8N'!6gamT.0(@arsAu24o_5b !%B5p"8i*#c2[iZp\tEkR2u>_ps/m@aTH55s8P34s1A=24Ql_KqR90#'q>/Qs-EZei;`j!JcFg2 J,~> i;Ws*V#UH9Yl4S'&HL>Yrr_]i"o[ukpAk$h$)%>!8H8]t!!'4rs8N'!6gamT.0(@arsAu24o_5b !%B5p"8i*#c2[iZp\tEkR2u>_ps/m@aTH55s8P34s1A=24Ql_KqR90#'q>/Qs-EZei;`j!JcFg2 J,~> i;Ws*V#UH9Yl4S'&HL>Yrr_]i"o[ukpAk$h$)%>!8H8]t!!'4rs8N'!6gamT.0(@arsAu24o_5b !%B5p"8i*#c2[iZp\tEkR2u>_ps/m@aTH55s8P34s1A=24Ql_KqR90#'q>/Qs-EZei;`j!JcFg2 J,~> i;Wrg^An09b5M>A!s%?Yrr`0!!:oRXrr<$dqYpZTD^u4o!!Pairu;"_p&G$l!(6/R!Y#,jqYpm) !&n-_!HIis!!rK%"7Z?k;#1+qm=Q/S!']\lrrRQJYi#K\4J;]Vn<fX5T`>$Sli.7heXfnT!%aW6 JcCu7"5s4[*eF@Ps*t~> i;Wrg^An09b5M>A!s%?Yrr`0!!:oRXrr<$dqYpZTD^u4o!!Pairu;"_p&G$l!(6/R!Y#,jqYpm) !&n-_!HIis!!rK%"7Z?k;#1+qm=Q/S!']\lrrRQJYi#K\4J;]Vn<fX5T`>$Sli.7heXfnT!%aW6 JcCu7"5s4[*eF@Ps*t~> i;Wrg^An09b5M>A!s%?Yrr`0!!:oRXrr<$dqYpZTD^u4o!!Pairu;"_p&G$l!(6/R!Y#,jqYpm) !&n-_!HIis!!rK%"7Z?k;#1+qm=Q/S!']\lrrRQJYi#K\4J;]Vn<fX5T`>$Sli.7heXfnT!%aW6 JcCu7"5s4[*eF@Ps*t~> iVs,R!8.>8!9F+Y!WrGdr;Qlr!!)TXs8N'!6i6la_[H;@"[i=i"TUd[s8N'!6gamT!rtR^rr<`3 !!XR]s8ODG*;fa<qZ$Ufqu6ooGROQP1T1/orr`-X'BJ*Os#d"T"n!Q7!$^p+s8P4QrseS`e%DK1 @6+o!!%)m.JcCl4"5s4[*eF@Ps*t~> iVs,R!8.>8!9F+Y!WrGdr;Qlr!!)TXs8N'!6i6la_[H;@"[i=i"TUd[s8N'!6gamT!rtR^rr<`3 !!XR]s8ODG*;fa<qZ$Ufqu6ooGROQP1T1/orr`-X'BJ*Os#d"T"n!Q7!$^p+s8P4QrseS`e%DK1 @6+o!!%)m.JcCl4"5s4[*eF@Ps*t~> iVs,R!8.>8!9F+Y!WrGdr;Qlr!!)TXs8N'!6i6la_[H;@"[i=i"TUd[s8N'!6gamT!rtR^rr<`3 !!XR]s8ODG*;fa<qZ$Ufqu6ooGROQP1T1/orr`-X'BJ*Os#d"T"n!Q7!$^p+s8P4QrseS`e%DK1 @6+o!!%)m.JcCl4"5s4[*eF@Ps*t~> iVs,:!:p07!rW#s!YGFgr;Qie!!DWgrr<$dqu7-^!!.,M_gh^e6i[/u!$_+9rr<$dmJd5"!%n'I $98(d?Ln-rlN.&Yqu6cc!!$1!rrbOd!(joFrr_*f4o+(:s#d"T!1<]b!%FU0rt,2u!':$6">D#> &IA76"Tfc7EiJ#Ks,R*]i;`j!JcFg2J,~> iVs,:!:p07!rW#s!YGFgr;Qie!!DWgrr<$dqu7-^!!.,M_gh^e6i[/u!$_+9rr<$dmJd5"!%n'I $98(d?Ln-rlN.&Yqu6cc!!$1!rrbOd!(joFrr_*f4o+(:s#d"T!1<]b!%FU0rt,2u!':$6">D#> &IA76"Tfc7EiJ#Ks,R*]i;`j!JcFg2J,~> iVs,:!:p07!rW#s!YGFgr;Qie!!DWgrr<$dqu7-^!!.,M_gh^e6i[/u!$_+9rr<$dmJd5"!%n'I $98(d?Ln-rlN.&Yqu6cc!!$1!rrbOd!(joFrr_*f4o+(:s#d"T!1<]b!%FU0rt,2u!':$6">D#> &IA76"Tfc7EiJ#Ks,R*]i;`j!JcFg2J,~> j8\iRrr3$T!5e[6!n%&qmJm1d!(6Y`!X/Q^rr3:P!!#Cds$ZnfYP.tt!rt"ArrY+Y#Pn8s"+^FP NrK%\I/j87qu6c;!!%TIrrbOd!(O]BrrT2$@H%7d4JDcTRf*3d.A900&Ged'79*N'DKg\gQEA'Y pjrI%rr_3[!$6^kjSs`~> j8\iRrr3$T!5e[6!n%&qmJm1d!(6Y`!X/Q^rr3:P!!#Cds$ZnfYP.tt!rt"ArrY+Y#Pn8s"+^FP NrK%\I/j87qu6c;!!%TIrrbOd!(O]BrrT2$@H%7d4JDcTRf*3d.A900&Ged'79*N'DKg\gQEA'Y pjrI%rr_3[!$6^kjSs`~> j8\iRrr3$T!5e[6!n%&qmJm1d!(6Y`!X/Q^rr3:P!!#Cds$ZnfYP.tt!rt"ArrY+Y#Pn8s"+^FP NrK%\I/j87qu6c;!!%TIrrbOd!(O]BrrT2$@H%7d4JDcTRf*3d.A900&Ged'79*N'DKg\gQEA'Y pjrI%rr_3[!$6^kjSs`~> iVs(D4TGG58GrJhB`OLtrrSnp@."!o!!#C`rrj>A#ai)'rW!<ns8T5%!!d\W]95kbrrsPF!.r"p NUd#NDu]mMqu7#c$igN`]6XPZ*q]@0"+gLQ^AIp8olpoG!&LPNaSu<m!/ok:s#d"T"n*W8!$^p+ s8P34s+14Crr_3[!$6^kjSs`~> iVs(D4TGG58GrJhB`OLtrrSnp@."!o!!#C`rrj>A#ai)'rW!<ns8T5%!!d\W]95kbrrsPF!.r"p NUd#NDu]mMqu7#c$igN`]6XPZ*q]@0"+gLQ^AIp8olpoG!&LPNaSu<m!/ok:s#d"T"n*W8!$^p+ s8P34s+14Crr_3[!$6^kjSs`~> iVs(D4TGG58GrJhB`OLtrrSnp@."!o!!#C`rrj>A#ai)'rW!<ns8T5%!!d\W]95kbrrsPF!.r"p NUd#NDu]mMqu7#c$igN`]6XPZ*q]@0"+gLQ^AIp8olpoG!&LPNaSu<m!/ok:s#d"T"n*W8!$^p+ s8P34s+14Crr_3[!$6^kjSs`~> iVs(!?2sq4CAe)5_#R7.rrQ7%^[;($!!#C`rr@HE!!?'u!(6bc!,_Q4qu6YLqZ-0d"3(<@>5J7" V??_r!>*ENrri<H!#kh3rs%kE(]XP!lH0&.r`B9-j8]-AT`5,`R@<W<s8P34s+14Crr_3[!$6^k jSs`~> iVs(!?2sq4CAe)5_#R7.rrQ7%^[;($!!#C`rr@HE!!?'u!(6bc!,_Q4qu6YLqZ-0d"3(<@>5J7" V??_r!>*ENrri<H!#kh3rs%kE(]XP!lH0&.r`B9-j8]-AT`5,`R@<W<s8P34s+14Crr_3[!$6^k jSs`~> iVs(!?2sq4CAe)5_#R7.rrQ7%^[;($!!#C`rr@HE!!?'u!(6bc!,_Q4qu6YLqZ-0d"3(<@>5J7" V??_r!>*ENrri<H!#kh3rs%kE(]XP!lH0&.r`B9-j8]-AT`5,`R@<W<s8P34s+14Crr_3[!$6^k jSs`~> iVs'SIfKF4N;NVV63GO4rrU^S8F6BV!!#C`rsARM)?_CFqu?^arVm)-9,7X</T1Ic#6'c>#m2,9 nG`SN!!CgKrs$M>'*]RojSJlYUAt:QpAY<kR2u>^prWO<of!)cjT#6BJcE@^s#bl4JcGEC"5s4[ *eF@Ps*t~> iVs'SIfKF4N;NVV63GO4rrU^S8F6BV!!#C`rsARM)?_CFqu?^arVm)-9,7X</T1Ic#6'c>#m2,9 nG`SN!!CgKrs$M>'*]RojSJlYUAt:QpAY<kR2u>^prWO<of!)cjT#6BJcE@^s#bl4JcGEC"5s4[ *eF@Ps*t~> iVs'SIfKF4N;NVV63GO4rrU^S8F6BV!!#C`rsARM)?_CFqu?^arVm)-9,7X</T1Ic#6'c>#m2,9 nG`SN!!CgKrs$M>'*]RojSJlYUAt:QpAY<kR2u>^prWO<of!)cjT#6BJcE@^s#bl4JcGEC"5s4[ *eF@Ps*t~> iVs'0TE"p3Xo&,(iuT2Rpq@dtkck'ia8u?&r9jRfl50LGp@S@ekpQObaSuA20FGSVs8P34s1A=2 4G!N`s7QBoi;`j!JcFg2J,~> iVs'0TE"p3Xo&,(iuT2Rpq@dtkck'ia8u?&r9jRfl50LGp@S@ekpQObaSuA20FGSVs8P34s1A=2 4G!N`s7QBoi;`j!JcFg2J,~> iVs'0TE"p3Xo&,(iuT2Rpq@dtkck'ia8u?&r9jRfl50LGp@S@ekpQObaSuA20FGSVs8P34s1A=2 4G!N`s7QBoi;`j!JcFg2J,~> ir95]#J^<7!mg`C#3oqA"X/*[Y5\TO!!$j(rri-`!!U=3rrUIG,KKfdl7<@_k5YHDJcE@^s#bl4 JcGEC"5s4[*eF@Ps*t~> ir95]#J^<7!mg`C#3oqA"X/*[Y5\TO!!$j(rri-`!!U=3rrUIG,KKfdl7<@_k5YHDJcE@^s#bl4 JcGEC"5s4[*eF@Ps*t~> ir95]#J^<7!mg`C#3oqA"X/*[Y5\TO!!$j(rri-`!!U=3rrUIG,KKfdl7<@_k5YHDJcE@^s#bl4 JcGEC"5s4[*eF@Ps*t~> JcGTH"T;:"!.",7"Sb[k!M/`[rrC(="6V!=[-.Jh4G!OEs8P34s+14Crr_3[!$6^kjSs`~> JcGTH"T;:"!.",7"Sb[k!M/`[rrC(="6V!=[-.Jh4G!OEs8P34s+14Crr_3[!$6^kjSs`~> JcGTH"T;:"!.",7"Sb[k!M/`[rrC(="6V!=[-.Jh4G!OEs8P34s+14Crr_3[!$6^kjSs`~> JcGQG"8PjuWq$)kqc3ffn,NCf`W$&)2$BH5s8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcGQG"8PjuWq$)kqc3ffn,NCf`W$&)2$BH5s8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcGQG"8PjuWq$)kqc3ffn,NCf`W$&)2$BH5s8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcGNF!WC10rrN&?mf3:e`;]r28H=>+s8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcGNF!WC10rrN&?mf3:e`;]r28H=>+s8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcGNF!WC10rrN&?mf3:e`;]r28H=>+s8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcF'rrrBt:"T)U-<UoDTs#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrBt:"T)U-<UoDTs#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrBt:"T)U-<UoDTs#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrBn8"-*O2dd7#64G!OEs8P34s+14Crr_3[!$6^kjSs`~> JcF'rrrBn8"-*O2dd7#64G!OEs8P34s+14Crr_3[!$6^kjSs`~> JcF'rrrBn8"-*O2dd7#64G!OEs8P34s+14Crr_3[!$6^kjSs`~> JcF'rrrBk7"32AgTC)[Y4G!OEs8P34s+14Crr_3[!$6^kjSs`~> JcF'rrrBk7"32AgTC)[Y4G!OEs8P34s+14Crr_3[!$6^kjSs`~> JcF'rrrBk7"32AgTC)[Y4G!OEs8P34s+14Crr_3[!$6^kjSs`~> JcF'rrrBh6"R8GV;!7<Is#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrBh6"R8GV;!7<Is#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrBh6"R8GV;!7<Is#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrBe5"TFVo&Y\^os#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrBe5"TFVo&Y\^os#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrBe5"TFVo&Y\^os#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB_3"Q)WJ8`91>HorsJ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\l RIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@-b?s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1KsGJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB_3"Q)WJ8`91>HorsJ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\l RIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@-b?s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1KsGJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB_3"Q)WJ8`91>HorsJ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\l RIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6 s7;YHoDcLl^&R\lRIgHlRD&XlR@-b?s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$< s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1KsGJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB\2"oau)#'98*s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4G!N`s7QBoi;`j!JcFg2J,~> JcF'rrrB\2"oau)#'98*s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4G!N`s7QBoi;`j!JcFg2J,~> JcF'rrrB\2"oau)#'98*s*Qp[RD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@3[H]pZS6o9l"?oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcKT4G!N`s7QBoi;`j!JcFg2J,~> JcF'rrrBV0"n-L:'UARhs8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcF'rrrBV0"n-L:'UARhs8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcF'rrrBV0"n-L:'UARhs8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcF'rrrBP."kulS.&$M4s8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcF'rrrBP."kulS.&$M4s8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcF'rrrBP."kulS.&$M4s8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcF'rrrBJ,"i<e1+-ZBos8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcF'rrrBJ,"i<e1+-ZBos8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcF'rrrBJ,"i<e1+-ZBos8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcF'rrrBD*"jL!J(5(fJs8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcF'rrrBD*"jL!J(5(fJs8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcF'rrrBD*"jL!J(5(fJs8P34s1A=24G!N`s7QBoi;`j!JcFg2J,~> JcF'rrrB>($JAnq"];]+s8P2DJcE@^s#bl4JcGEC"5s4[*eF@Ps*t~> JcF'rrrB>($JAnq"];]+s8P2DJcE@^s#bl4JcGEC"5s4[*eF@Ps*t~> JcF'rrrB>($JAnq"];]+s8P2DJcE@^s#bl4JcGEC"5s4[*eF@Ps*t~> JcF'rrrB8&#k*s/!$6[A4?S2p]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB8&#k*s/!$6[A4?S2p]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB8&#k*s/!$6[A4?S2p]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB/##0:<`!"'dpJcEC_s#ckP#O?[i%0@.rJH#TI!!<BC9WNaEm/I1H!!"'ks5a31~> JcF'rrrB/##0:<`!"'dpJcEC_s#ckP#O?[i%0@.rJH#TI!!<BC9WNaEm/I1H!!"'ks5a31~> JcF'rrrB/##0:<`!"'dpJcEC_s#ckP#O?[i%0@.rJH#TI!!<BC9WNaEm/I1H!!"'ks5a31~> JcF'rrrB)!#kOu/!rsTj]_@!W_#OEsT)SiG)>aC649#9U!!$5Ss6]ggi;`j!JcFg2J,~> JcF'rrrB)!#kOu/!rsTj]_@!W_#OEsT)SiG)>aC649#9U!!$5Ss6]ggi;`j!JcFg2J,~> JcF'rrrB)!#kOu/!rsTj]_@!W_#OEsT)SiG)>aC649#9U!!$5Ss6]ggi;`j!JcFg2J,~> JcF'rrrB"t$9UAQ>Rg`>6\WVZJcE[gs#cnQ#YY3uB=#FWKmNaurr<9\_n:g>!!''Ns6fmhi;`j! JcFg2J,~> JcF'rrrB"t$9UAQ>Rg`>6\WVZJcE[gs#cnQ#YY3uB=#FWKmNaurr<9\_n:g>!!''Ns6fmhi;`j! JcFg2J,~> JcF'rrrB"t$9UAQ>Rg`>6\WVZJcE[gs#cnQ#YY3uB=#FWKmNaurr<9\_n:g>!!''Ns6fmhi;`j! JcFg2J,~> JcF'rrrB"ts#g>]$MqYj49Y]q8U[l*JcEgks#cnQ!Xeucq#C?o!(6bc"2+[7>ClhBrr_3[!$6^k jSs`~> JcF'rrrB"ts#g>]$MqYj49Y]q8U[l*JcEgks#cnQ!Xeucq#C?o!(6bc"2+[7>ClhBrr_3[!$6^k jSs`~> JcF'rrrB"ts#g>]$MqYj49Y]q8U[l*JcEgks#cnQ!Xeucq#C?o!(6bc"2+[7>ClhBrr_3[!$6^k jSs`~> JcF'rrrB"ts#g2Y%.goK2[BB`)Gc!hfD1!tcN!o,rr3#tVka7o%fd'Zq>^Hp!(6bc"8Vut8qI$1 rr_3[!$6^kjSs`~> JcF'rrrB"ts#g2Y%.goK2[BB`)Gc!hfD1!tcN!o,rr3#tVka7o%fd'Zq>^Hp!(6bc"8Vut8qI$1 rr_3[!$6^kjSs`~> JcF'rrrB"ts#g2Y%.goK2[BB`)Gc!hfD1!tcN!o,rr3#tVka7o%fd'Zq>^Hp!(6bc"8Vut8qI$1 rr_3[!$6^kjSs`~> JcF'rrrB"ts#g&U&,OS>AMF>g!!FQ?F.'_noXb&)n<fX5T`>$Ss8N/7-30h@#$q90!D9<ar;Zcs !(6bc"3^`FBn?<Prr_3[!$6^kjSs`~> JcF'rrrB"ts#g&U&,OS>AMF>g!!FQ?F.'_noXb&)n<fX5T`>$Ss8N/7-30h@#$q90!D9<ar;Zcs !(6bc"3^`FBn?<Prr_3[!$6^kjSs`~> JcF'rrrB"ts#g&U&,OS>AMF>g!!FQ?F.'_noXb&)n<fX5T`>$Ss8N/7-30h@#$q90!D9<ar;Zcs !(6bc"3^`FBn?<Prr_3[!$6^kjSs`~> JcF'rrrB"ts#flP#5?EAJm'u@r;[69.R[TgP+f+pcJ@peaSuG3+ohTen=fm^49XV5'*&oFrrMOI r;Zm0GOkb5rr<9ks7sM[!!'`as6fmhi;`j!JcFg2J,~> JcF'rrrB"ts#flP#5?EAJm'u@r;[69.R[TgP+f+pcJ@peaSuG3+ohTen=fm^49XV5'*&oFrrMOI r;Zm0GOkb5rr<9ks7sM[!!'`as6fmhi;`j!JcFg2J,~> JcF'rrrB"ts#flP#5?EAJm'u@r;[69.R[TgP+f+pcJ@peaSuG3+ohTen=fm^49XV5'*&oFrrMOI r;Zm0GOkb5rr<9ks7sM[!!'`as6fmhi;`j!JcFg2J,~> JcF'rrrB"ts#fWI#j0""N,Vi\+U@fC"Uu%b+sJE61B9bi6i\\7!!&I]rrtLu('+C8#H:)ke,0.I rM2OVrW!$Qo)Jac!!$M[s6]ggi;`j!JcFg2J,~> JcF'rrrB"ts#fWI#j0""N,Vi\+U@fC"Uu%b+sJE61B9bi6i\\7!!&I]rrtLu('+C8#H:)ke,0.I rM2OVrW!$Qo)Jac!!$M[s6]ggi;`j!JcFg2J,~> JcF'rrrB"ts#fWI#j0""N,Vi\+U@fC"Uu%b+sJE61B9bi6i\\7!!&I]rrtLu('+C8#H:)ke,0.I rM2OVrW!$Qo)Jac!!$M[s6]ggi;`j!JcFg2J,~> JcF'rrrB"ts#f<@$guiq^9=2lJobO9Ac>[09@-',.K'5HR\B`c3YW>1!!!8'6ib^2rs.G/$ig9Y s8Vrr![F!0JcG-;"5s4[*eF@Ps*t~> JcF'rrrB"ts#f<@$guiq^9=2lJobO9Ac>[09@-',.K'5HR\B`c3YW>1!!!8'6ib^2rs.G/$ig9Y s8Vrr![F!0JcG-;"5s4[*eF@Ps*t~> JcF'rrrB"ts#f<@$guiq^9=2lJobO9Ac>[09@-',.K'5HR\B`c3YW>1!!!8'6ib^2rs.G/$ig9Y s8Vrr![F!0JcG-;"5s4[*eF@Ps*t~> JcF'rrrB"ts#d"T"n*W8!$^p+s8P1aiC=O])4gd8`rH*4s8N'!1rIMuJcG$8"5s4[*eF@Ps*t~> JcF'rrrB"ts#d"T"n*W8!$^p+s8P1aiC=O])4gd8`rH*4s8N'!1rIMuJcG$8"5s4[*eF@Ps*t~> JcF'rrrB"ts#d"T"n*W8!$^p+s8P1aiC=O])4gd8`rH*4s8N'!1rIMuJcG$8"5s4[*eF@Ps*t~> JcF'rrrB"ts#ctS"7V_In=]g]4TGE_^*WiNrs7fg!*oR(!!#B;s6'Cai;`j!JcFg2J,~> JcF'rrrB"ts#ctS"7V_In=]g]4TGE_^*WiNrs7fg!*oR(!!#B;s6'Cai;`j!JcFg2J,~> JcF'rrrB"ts#ctS"7V_In=]g]4TGE_^*WiNrs7fg!*oR(!!#B;s6'Cai;`j!JcFg2J,~> JcF'rrrB"ts#bl4]Dqmnrr3#tVka8%*b(PK^n3=]!3H5#!!#B;s6'Cai;`j!JcFg2J,~> JcF'rrrB"ts#bl4]Dqmnrr3#tVka8%*b(PK^n3=]!3H5#!!#B;s6'Cai;`j!JcFg2J,~> JcF'rrrB"ts#bl4]Dqmnrr3#tVka8%*b(PK^n3=]!3H5#!!#B;s6'Cai;`j!JcFg2J,~> JcF'rrrB"ts#bl4]DqmnT)\Td!+5a*rr<$dJcFp5"5s4[*eF@Ps*t~> JcF'rrrB"ts#bl4]DqmnT)\Td!+5a*rr<$dJcFp5"5s4[*eF@Ps*t~> JcF'rrrB"ts#bl4]DqmnT)\Td!+5a*rr<$dJcFp5"5s4[*eF@Ps*t~> JcF'rrrB"ts#bl4]DqmnT)T%/2&$/s)GRF6s8N'!6\5:#rr_3[!$6^kjSs`~> JcF'rrrB"ts#bl4]DqmnT)T%/2&$/s)GRF6s8N'!6\5:#rr_3[!$6^kjSs`~> JcF'rrrB"ts#bl4]DqmnT)T%/2&$/s)GRF6s8N'!6\5:#rr_3[!$6^kjSs`~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'rrrB"ts#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'r">'Uuf^u6Es#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'r">'Uuf^u6Es#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'r">'Uuf^u6Es#bl4]DqmnJcC<$p&>-Q!!"'ks5a31~> JcF'r!N-(s!!#ZrrrG5?JXO-<!B*&ks+14Crr_3[!$6^kjSs`~> JcF'r!N-(s!!#ZrrrG5?JXO-<!B*&ks+14Crr_3[!$6^kjSs`~> JcF'r!N-(s!!#ZrrrG5?JXO-<!B*&ks+14Crr_3[!$6^kjSs`~> JcF$q"4(g3$iL&*9<eEs4>)0b])Vja4G!N`s8)a$BE/J^*?"nX"9';B!">cVs6BW7~> JcF$q"4(g3$iL&*9<eEs4>)0b])Vja4G!N`s8)a$BE/J^*?"nX"9';B!">cVs6BW7~> JcF$q"4(g3$iL&*9<eEs4>)0b])Vja4G!N`s8)a$BE/J^*?"nX"9';B!">cVs6BW7~> JcF$q"3kO+$N0r)9<eEs4?J,^]C#\]4G!N`s8)`qfCT%CqLS\3s*t~> JcF$q"3kO+$N0r)9<eEr4FmLC!!#-4s+14HrrC[C!!)kHs6BW7~> JcF$q"3kO+$N0r)9<eEr4FmLC!!#-4s+14HrrC[C!!)kHs6BW7~> JcF'r!M]bn!!#Zrs8P34s1A=24G!N`s7uZqD?9J3!4[U[l2Q8~> JcF'r!M]bn!!#Zrrr>04!4`(04G!N`s7uZqD?9J3!4[U[l2Q8~> JcF'r!M]bn!!#Zrrr>04!4`(04G!N`s7uZqD?9J3!4[U[l2Q8~> JcF'r"=aD"g@_NHs#bl4]DqmnJcC<$q>UNb&d%n0!<YrFs60K5~> JcF'r"=aD"g@_NH!'Gf4\GuUlJcC<$q>UNb&d%n0!<YrFs60K5~> JcF'r"=aD"g@_NH!'Gf4\GuUlJcC<$q>UNb&d%n0!<YrFs60K5~> JcF'rrrB"ts#eX-!@7dD!!<NTCZXp_"Q?7P!UKIZ!S%5G!!%\Ps8P34s+14FrrAA\!!*5VJcFs6 J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$q#:>[q#CEug4B:fs*t~> JcF'rrrB"t!'Gf4\GuUlJcC<$q#:>[q#CEug4B:fs*t~> JcF'rrrB"ts#eU,"3CNC\GjMO]5drgh<k4FGrl!+lh:>dAH564mJ[(bG5rBBWrN)]JcC<$q#:En /-GeM!<I7ms6'E4~> JcF'rrrB"t!'Gf4\GuUlJcC<$q#:En/-GeM!<I7ms6'E4~> JcF'rrrB"t!'Gf4\GuUlJcC<$q#:En/-GeM!<I7ms6'E4~> JcF'rrrB"ts#eU,"8r3"lhpbaIK310s8N'!lhCD\lNhP/rr^.?!3`C%s#bl4JcGKE!5A@2!Wj&* JcFp5J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$p\t6-qu?d"'CgYRkPp&~> JcF'rrrB"t!'Gf4\GuUlJcC<$p\t6-qu?d"'CgYRkPp&~> JcF'rrrB"ts#eR+rr<&br;QlV!!`>es8N'!lhCD\JiEZ,rr_j:!+2])s#bl4JcGHD!E0'u!!&L> s5s?3~> JcF'rrrB"t!'Gf4\GuUlJcC<$pAY.l!rW*!Rt:V%s*t~> JcF'rrrB"t!'Gf4\GuUlJcC<$pAY.l!rW*!Rt:V%s*t~> JcF'rrrB"ts#eR+rr<&br;Qlq!!)KSs8N'!lhCD[a3X\`"(VBQnYlKf4G!N`s7ZHsh?Er["#0\) s5s?3~> JcF'rrrB"t!'Gf4\GuUlJcC<$pAY?R"onW*0`?S&k5Tr~> JcF'rrrB"t!'Gf4\GuUlJcC<$pAY?R"onW*0`?S&k5Tr~> JcF'rrrB"ts#eR+rr<&br;Ql\!"T#-rs#r$%gF>*o_e^pUG)ie>hK)WlgauWZiC-AqYpcE=Vq5S 9YUK*$aG1B!UJ<J+9ig5r;?R![m^f3-$f.1s8P34s+14Crrd]L!!0rfs5j92~> JcF'rrrB"t!'Gf4\GuUlJcC<$p&>/B!!!&:JcFj3J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$p&>/B!!!&:JcFj3J,~> JcF'rrrB"ts#eR+rr<&br;QhV!+Gm,#_E5:kkD=r3;NRR$%)_Mh=RE]!!)?Urr_R(!-%f7#ati_ de_B]!/^^T$_)bK!+e1!p>8(7FT)4FJd%"ppTYDlq9o<C4G!N`s7QBoo)\nnJcFg2J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$p&>-c!WZ;Qs5a31~> JcF'rrrB"t!'Gf4\GuUlJcC<$p&>-c!WZ;Qs5a31~> JcF'rrrB"ts#eR+rr<Mos8W&^Pm8Ans8Te5IJs0ON<#=Fs2Y3tr;Q]uX8i7do)Aej!%I[>rr^FH .eirB"8a_P`Voi:!!.*<rr3&B!#>M5!knY_rVlqY!12.6s#bl4JcGBB!i#bSJcFg2J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$o`"uf!9&M/jSs`~> JcF'rrrB"t!'Gf4\GuUlJcC<$o`"uf!9&M/jSs`~> JcF'rrrB"ts#eR+qZ$^#+)0s<rr>dh!!QL)s&]8mrVlum!!)?Vrr\tq"jHiC!`]5kr;Qhk!)idq rr<&brVlr^!!3*!!)<7h!*I\Ls#bl4JcGBB!WK6Qs5X-0~> JcF'rrrB"t!'Gf4\GuUlJcC<$o`"skY(?W5s*t~> JcF'rrrB"t!'Gf4\GuUlJcC<$o`"skY(?W5s*t~> JcF'rrrB"ts#eR+rr<2fr_*<2qu6^3!:0F[!Z;!hr;Zcs!:0:W"6'gkK),EJ(')tarrUjR(B+:5 !!)?`rrVKd!<3!"'EIIBs8P34s+13$s4%(!~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"ts#eR+rr<5gs6Uj-U&=ol!W_-QrrN9&kPYA[!!)?Xrri<f!&jcQrrq]frrW8br;Qi\ !!E3"rr<&brVlrb!!*#u!WiAZbQ%T)JcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"ts#eR+rr<8hs8U(A#KcrE!YPLLq#:C-!87;Mrr<&bp&>,U!"%<Urs%s&eGg<bg\h'Q d/Y!]s8N'!li$hblMpqarrNf5_9;lY4G!N`s+14"s*t~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"ts#eR+rr<&brr3(Y!#k#!rrPjoI/O!KrqHHm70'7`s8N'!lh:>\ed)8>qu6k>.0'<J !3#hq!g<UarVult!:0U`!p]gdrr3$n!.=_E!WMiAs8P34s+13$s4%(!~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"ts#eU,"9&9#li-nkr_*;Oq#CB0!>Xu"rs*Igs8T%u55tQ]"/c,!lhCD^q_J4?rqud% W<%YOs2P1&rr2p"pa?3crr3*"!!)<_rrVHc!<3!#^]>2:rVln:HIDin4G!N`s+14"s*t~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"ts#eU,"N:?@\GlL-&+(D<:ZMKTN<(iWq9r>3p&=su;#k7men7YV!3c+krsX>V&EEfj rU%@/!W_*Vrs4A[<nd>o7KJSKrr^^M!4i(."1/%.f)G[TN<(iWq9r>3p!Wm?4G!N`s+14"s*t~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"ts#eX-!#tk:!%7aF%E8MN!13`c^IJe;,DuBsrs&:H)[A*crquilrr<2r!!#(Xrs#r( '*AtG_u9T@3ro<]!=o&-+T;?A!B:#X#/<Y="=&g$dJs5/JcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"ts#bl4]DqmnJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"ts#bl4]DqmnJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"ts#bl4]DqmnJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"ts#bl4]DqmnJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"ts#bl4]DqmnJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"ts#bl4]DqmnJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"ts#bl4]DqmnJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"ts#bl4]DqmnJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"t!'Gf4\GuUlJcC<$JcF7"J,~> JcF'rrrB"ts#bl4]DqmnJcDtS!?hLB!!NK:-;Bs&qu6[r5goZ5<'\Y,"fjQf$;Kc^s*t~> JcF'rrrB"t!'Gf4\GuUlJcDtS!?hLB!!NK:-;Bs&qu6[r5goZ5<'\Y,"fjQf$;Kc^s*t~> JcF'rrrB"t!'Gf4\GuUlJcDtS!?hLB!!NK:-;Bs&qu6[r5goZ5<'\Y,"fjQf$;Kc^s*t~> JcF'rrrB"ts#bl4]DqmnJcDqR$dSeQ\AuY+Ti2":bl%JB#QXMOrrN!&qu6^'!;+P9#+#=Zk=5N8 VZ2/~> JcF'rrrB"t!'Gf4\GuUlJcDqR$dSeQ\AuY+Ti2":bl%JB#QXMOrrN!&qu6^'!;+P9#+#=Zk=5N8 VZ2/~> JcF'rrrB"t!'Gf4\GuUlJcDqR$dSeQ\AuY+Ti2":bl%JB#QXMOrrN!&qu6^'!;+P9#+#=Zk=5N8 VZ2/~> JcF'rrrB"ts#bl4]DqmnJcDqR"9&9#lhpbb]aYJ%rVlnBB%m7c`W5o9!I&/#rs/N<!;HNlb5/"8 J,~> JcF'rrrB"t!'Gf4\GuUlJcDqR"9&9#lhpbb]aYJ%rVlnBB%m7c`W5o9!I&/#rs/N<!;HNlb5/"8 J,~> JcF'rrrB"t!'Gf4\GuUlJcDqR"9&9#lhpbb]aYJ%rVlnBB%m7c`W5o9!I&/#rs/N<!;HNlb5/"8 J,~> JcF'rrrB>("eBXqZI8CEs8P34s8W*+pXcj=F]iC6W6"2Ds8P34s/uD%!!)?^rr]P,0E'H$!EK3> rrVTg!29FC~> JcF'rrrB>("eBXqZI8CErr>04!;um(#Tk]V1H.3B(]q_X!'Gi4Y5eM%!:0O^"0qn[rRLoK<WL,= !q$$gU&TW~> JcF'rrrB>("eBXqZI8CErr>04!;um(#Tk]V1H.3B(]q_X!'Gi4Y5eM%!:0O^"0qn[rRLoK<WL,= !q$$gU&TW~> JcF'rrrB>(%G\%BC.]rs2,u_"[FOu.ru1[c\X@_G3?TY<Aqm5%[?Yl51E@u>ClGI>m*Pe44G!O8 s8N'!lh^V_7f]R@rr_k7!!("<!p]gdU&TW~> JcF'rrrB>($f%h@C.]rs2,u^\%>Fj!%jEMT,T%^pAqm5%[?Yl51)V/b0.S"Hc2[i,JcDnQrr<&b qYpUe!34ZN"7pU7!6+s>lMppYs*t~> JcF'rrrB>($f%h@C.]rs2,u^\%>Fj!%jEMT,T%^pAqm5%[?Yl51)V/b0.S"Hc2[i,JcDnQrr<&b qYpUe!34ZN"7pU7!6+s>lMppYs*t~> JcF'rrrB)!%d;!4LhK=-+#d8FQatfERf<oph7]A+><<rR6tCtH`9%!krsnVJZB9-(0cho@DN:mF nC[d@4G!O8s8N'!lh^VpV>sBkoY+Q3li7"HYYG2a^,-+5rr32371TSKH1_%7#1-Tn";=PMrr2s) qZ$g"oY+Q3li$hfbukkc'26.=rsQ)]3W\QtAKV0sI/N[;#0g9f!u"ABrVu`pU]5i~> JcF'rrrB)!%-Yd2LhK-u'ceJ>&cn9u%0@4d,p3sE5\,PD`9%!krs\JHZB9-(//K9P-6<WH!!#-4 s/uD%!!)?]rtD70:B0t#>QX6ks5gI[!:.?U#]BYA#.I#3"snQer;QuJ>T*_Y:<*;5!"&N&"on5/ >QX6irs$_N(]tFF^A\'>Z%"e8ldfVi"rr$gp&>6@=Vq5S9YUK*qZ*DkJ,~> JcF'rrrB)!%-Yd2LhK-u'ceJ>&cn9u%0@4d,p3sE5\,PD`9%!krs\JHZB9-(//K9P-6<WH!!#-4 s/uD%!!)?]rtD70:B0t#>QX6ks5gI[!:.?U#]BYA#.I#3"snQer;QuJ>T*_Y:<*;5!"&N&"on5/ >QX6irs$_N(]tFF^A\'>Z%"e8ldfVi"rr$gp&>6@=Vq5S9YUK*qZ*DkJ,~> JcF'rrrAen%d(a+KOdIs+?NeSS%IGNWrEV,hnPe5?9TPX5[],9_;Y@SrsnPFY`<Tq/KQWDEKRQT o&0QJ4G!O8s8N'!lh^W&h>e8iNun?%li6uO,6._$(eOoEs8RZSM<O]='KGpfrs5.u6-]5E-3L"A rrVKd!<)p#Nun?%li-niRKGq*qU.h5M>mM_RtC\@AN@3mh`h*_pAYDe"%1N5dRF4nrVlrb!!&_m J,~> JcF'rrrAen$g,F(KOQt\&fM`("f),,"r84!'H&i9J>'g<rT4%fnBeD"DFc#e)B^%5!Sm_U4G!O8 s8N'!lh^W&h>e8iNun?%li6uO,6._$(eOoEs8RZSM<O]='KGpfrs5.u6-]5E-3L"ArrVKd!<)p# Nun?%li-niRKGq*qU.h5M>mM_RtC\@AN@3mh`h*_pAYDe"%1N5dRF4nrVlrb!!&_mJ,~> JcF'rrrAen$g,F(KOQt\&fM`("f),,"r84!'H&i9J>'g<rT4%fnBeD"DFc#e)B^%5!Sm_U4G!O8 s8N'!lh^W&h>e8iNun?%li6uO,6._$(eOoEs8RZSM<O]='KGpfrs5.u6-]5E-3L"ArrVKd!<)p# Nun?%li-niRKGq*qU.h5M>mM_RtC\@AN@3mh`h*_pAYDe"%1N5dRF4nrVlrb!!&_mJ,~> JcF'rrrAPg&,kP+U4Qi@,U#9UI\4C4qmue<rSteiJmpth+[04^T>0:\ec--GbcHb>9Ih/?;fe/1 eb85,s#bl4Y5eM%!:0L]#k\/tq#C?o!:0U`rr<<emJk_ds1SJ]rVm._!13`cbl]Nlrr3&C!#,A3 !p]gdqu?Zr#4)<hb6'6grr3)t0*0&js8N'"EW,n:!m1KXp\t?=""O'Err`-O!QG'<!p]gdU&TW~> JcF'rrrAPg$iT,'U4HE%((_2p$*jO=$PjNj'e`R:T>0:\ec-$DbcHb;5T^RR)&!27!!#-4s/uD% !!)?]rs88t!;QTo!!)?`s8N')4RN1!eGm5_IJs0ON<#=Fs31Wsq#:9pb5`4TrrVKd!;lfr!!_ch s2tKop\t0pq_%uhrVult!HJ);rrU=C(&._1b6'6grr3)t0*0&krrVKd!29FC~> JcF'rrrAPg$iT,'U4HE%((_2p$*jO=$PjNj'e`R:T>0:\ec-$DbcHb;5T^RR)&!27!!#-4s/uD% !!)?]rs88t!;QTo!!)?`s8N')4RN1!eGm5_IJs0ON<#=Fs31Wsq#:9pb5`4TrrVKd!;lfr!!_ch s2tKop\t0pq_%uhrVult!HJ);rrU=C(&._1b6'6grr3)t0*0&krrVKd!29FC~> j8T>Z!o*b8!9`qQ"4CNWl\GN?!0dEnqqo/\IpP;_,=#XeTu#^cb5W"Oji!sJA4.^d4'R'$]A*/# rsn>9W/,+X-m(BLGF,ejp[J4_4G!O8s8N'!lh^Veq#CEas8N'!li$k`!!)$Vrr>dh!!QL)s&K,i r;Qe:?iL',lMpq^s8N'&li6ub!1j&f!h]NkrVult!:0U`!p9Oap\t:p!1j&f!h]Nkrr3&c!!&_m J,~> j8T>Z!o*b8!9`qQ"4CNWl\GN?!0dEjqqo/\G>'Fu%M0$L_>jrF%2'0`-q\TN]A*/#rsJ&5W/"Y: )%RAn$0qQk4G!O8s8N'!lh^Veq#CEas8N'!li$k`!!)$Vrr>dh!!QL)s&K,ir;Qe:?iL',lMpq^ s8N'&li6ub!1j&f!h]NkrVult!:0U`!p9Oap\t:p!1j&f!h]Nkrr3&c!!&_mJ,~> j8T>Z!o*b8!9`qQ"4CNWl\GN?!0dEjqqo/\G>'Fu%M0$L_>jrF%2'0`-q\TN]A*/#rsJ&5W/"Y: )%RAn$0qQk4G!O8s8N'!lh^Veq#CEas8N'!li$k`!!)$Vrr>dh!!QL)s&K,ir;Qe:?iL',lMpq^ s8N'&li6ub!1j&f!h]NkrVult!:0U`!p9Oap\t:p!1j&f!h]Nkrr3&c!!&_mJ,~> j8T><!Vuc6#laJr!J;Tq!!)>?s8N(Wrt"t^]q'RW4<Ge8A;$bsjo3s5%d;!4LhK=-*]I/GRCV#G [Jpa!`hnK&7OB6<=aHRLg\LXEs#bl4Y5eM%!:0L]#j;6nrVult!:0U`rr<&br;Qg4!:0F[!Ytde p\t<\!!)orrr<5gs8Ni7fDPXMf`2fds8N'!li$hblMpqZrrNr9fDPXMf`2ferrVKd!29FC~> j8T><!Vuc6#laJr!J;Tq!!)>?s8N(WrsJVY]pWV%,7Y(h"4.#T":P_K+?sM)\_6bcrsIo.VLDDr 'FbQ\!V69k4G!O8s8N'!lh^VekPtkds8N'!li$k`!!)?_rrNl7lhLJ](')q[rrVKd!;lfr!!V]g rtYUdr;QiO!#GP5rr<&brVlrb!!)cn!Ytdfr;QiO!#GS6!p]gdU&TW~> j8T><!Vuc6#laJr!J;Tq!!)>?s8N(WrsJVY]pWV%,7Y(h"4.#T":P_K+?sM)\_6bcrsIo.VLDDr 'FbQ\!V69k4G!O8s8N'!lh^VekPtkds8N'!li$k`!!)?_rrNl7lhLJ](')q[rrVKd!;lfr!!V]g rtYUdr;QiO!#GP5rr<&brVlrb!!)cn!Ytdfr;QiO!#GS6!p]gdU&TW~> j8T:p)ZTi6-hI?A\t>Sp!:,F?rr@]O%f"_fR<_pq+=9QiL8MuQkl2.Zb,U>68h(l><HXS7eb5m? ')gk.U4Qi@,U#9UI@\(-qYrZ?JcDnQrr<&bqYpW/!&X]Trr<&brVult!:0R_!WiAZq#:Bu!9a+V !p]gdqu?Zr"mc3g!s%Q_rrV<_"9&9"!!)?`rrVKd!;HKp!s%Q_rrV<_"9/<%lMppYs*t~> j8T:p)ZTi6-hI?A\t>Sp!:,F?rr@]O$2E2`M-MtZ$O?pm!!ri9$Q:m*L:,S*VZ.#%j27I+7OAZR $3U,)!'Gi4Y5eM%!:0L]!kSFhrr;uu!:0U`rr<&br;Qg"!8mSO!X&Mdp\t<\!!)orrr<5gs8N0$ kktG^jo>M^s8N'!li$hblMpqZrrN9&kktG^jo>M_rrVKd!29FC~> j8T:p)ZTi6-hI?A\t>Sp!:,F?rr@]O$2E2`M-MtZ$O?pm!!ri9$Q:m*L:,S*VZ.#%j27I+7OAZR $3U,)!'Gi4Y5eM%!:0L]!kSFhrr;uu!:0U`rr<&br;Qg"!8mSO!X&Mdp\t<\!!)orrr<5gs8N0$ kktG^jo>M^s8N'!li$hblMpqZrrN9&kktG^jo>M_rrVKd!29FC~> j8T:P3WK,68+?QY!!)>@rrVcl%"\HUrsneT\!M;=2'"/=C5T%6lM1Ahm`qtqDG;](0i;qRZdeW5 rt#%d_4cBe5Tq9a(P&3qiV\9,ZiC%*!:0L]!cS-nrr;uu!:0U`rr<&br;Qg2!5\I1!Z;!fp\t<\ !!)orrr<5gs8Nl8g\h'Qd/Y!]s8N'!li$hblMpqZrrNu:g\h'Qd/Y!^rrVKd!29FC~> j8T:P3WK,68+?QY!!)>@rrVcl%"\HUrsAGOXEdSn'aFmCmJmOo"pbno9R!JcoToLfr8GGQ@65P> #6booTu#^cJcE(Vrr<&bqYpV9!/:FPrr<&brVult!:0R_!YPLLq#:C5!7^cC!p]gdqu?Zr"mc3g (BE4frrURJ(]FC6!!)?`rrVKd!;HKp(BE4frrURJ(]OF9lMppYs*t~> j8T:P3WK,68+?QY!!)>@rrVcl%"\HUrsAGOXEdSn'aFmCmJmOo"pbno9R!JcoToLfr8GGQ@65P> #6booTu#^cJcE(Vrr<&bqYpV9!/:FPrr<&brVult!:0R_!YPLLq#:C5!7^cC!p]gdqu?Zr"mc3g (BE4frrURJ(]FC6!!)?`rrVKd!;HKp(BE4frrURJ(]OF9lMppYs*t~> j8T:0=TAD6BCPs$!!)>@rrR'<<It2Artb7VZ]fH/1EJ&?Ck-G"0-2cBDih3Mn:prNqVANLI9erY ,XPt$JcE4Zrr<&bqu6cb&J"1,s8N'!li$k`!!)?_rrPjoI/O!KrqHHm>6'i`rrD]jrrVKd!;lfr !!V]gs&K,ur;Qh^!*0!trr<&brVlrb!!)cn!`f<"r;Qh^!*0$u!p]gdU&TW~> j8T:0=TAD6BCPs$!!)>@rrR'<<It2Ars88CQt\l4&-W+4!!iW0%jOARQH\iQrsS\Z[%2VN4<Yt: @ZQ*?\,ZI.!:0O^"7-U0m/I%b!!)?`s8N'!lhpba9E9J<rs&Jss8Q:'P5G7Zo`"jllMpq^s8N'& li6uc!3#hq!g<UarVult!:0U`!p]gdp\t:q!3#hq!g<Uarr3&c!!&_mJ,~> j8T:0=TAD6BCPs$!!)>@rrR'<<It2Ars88CQt\l4&-W+4!!iW0%jOARQH\iQrsS\Z[%2VN4<Yt: @ZQ*?\,ZI.!:0O^"7-U0m/I%b!!)?`s8N'!lhpba9E9J<rs&Jss8Q:'P5G7Zo`"jllMpq^s8N'& li6uc!3#hq!g<UarVult!:0U`!p]gdp\t:q!3#hq!g<Uarr3&c!!&_mJ,~> jo>&To)J^i!:,OB"S$C1#L]mW"eBXqZI8B]rs&&BZBhT9m_So1pXcj=F]iC6W6"2=rr`)O]<6_b \,ZI.!:0R_"8l!rSc/Tg!!)?arr`3"!:'L^"2FpPm/?qhDgMH`d0:Z\rVm/G,4bd6nGiRar;Zcs #4)<h`r\@%rr3)q-j%Nirr`6#!:'O_!pTacp\t?9!^$D\rr`$E!m1HA!pTacU&TW~> jo>&To)J^i!:,OB"S$C1#L]mW"eBXqZI8B]rs&#+LLZ"Im_So1pWo1<5pe<aIB_kMrr`)O]<6_b \,ZI.!:0R_"8l!rSc/Tg!!)?arr`3"!:'L^"2FpPm/?qhDgMH`d0:Z\rVm/G,4bd6nGiRar;Zcs #4)<h`r\@%rr3)q-j%Nirr`6#!:'O_!pTacp\t?9!^$D\rr`$E!m1HA!pTacU&TW~> jo>&To)J^i!:,OB"S$C1#L]mW"eBXqZI8B]rs&#+LLZ"Im_So1pWo1<5pe<aIB_kMrr`)O]<6_b \,ZI.!:0R_"8l!rSc/Tg!!)?arr`3"!:'L^"2FpPm/?qhDgMH`d0:Z\rVm/G,4bd6nGiRar;Zcs #4)<h`r\@%rr3)q-j%Nirr`6#!:'O_!pTacp\t?9!^$D\rr`$E!m1HA!pTacU&TW~> j8T9-V#UH9Yjh\m!!)>Drrq>%%KH[4Yl>0fXGUab.NUHI<dhC+p58kgpt<3GH!*-M-:VU%Vo6!. F]1(:.njc<XN^$^s+14JrsS&k!:0[bqV%f/",m-X"5j.Zci3qH`rH+Lqu6q]!AhjndoAg/rr38! ">Rmki.<&irVm3H!1*>[S,_CH!71ZE#_rC\gA&r_!K[3Z"4I5M\c)O1ZiC*Wp\tMS!*7hKc:.hq rVlu0!!(E@s*t~> j8T9-V#UH9Yjh\m!!)>Drrq>%%KH[4Yl>0fXGUab.NUHI<ct@kp58kUpt;Zk:+[1d"S_s&!<`fR 4^jGlm",1fs8;m)kl:_Ls8VrLVE=s=rVluX!!(@Err^:A!4_q+#`Sj@anaCc7.pQZ#bqMW`VJGD +3"3Y$6K86p8jb`huEc'rr37Z!*7hKc:.hqrVluK!!'S.rr]V.!7poE#_rC\gA&r_!K[3Z"1S=2 dA$Yk~> j8T9-V#UH9Yjh\m!!)>Drrq>%%KH[4Yl>0fXGUab.NUHI<ct@kp58kUpt;Zk:+[1d"S_s&!<`fR 4^jGlm",1fs8;m)kl:_Ls8VrLVE=s=rVluX!!(@Err^:A!4_q+#`Sj@anaCc7.pQZ#bqMW`VJGD +3"3Y$6K86p8jb`huEc'rr37Z!*7hKc:.hqrVluK!!'S.rr]V.!7poE#_rC\gA&r_!K[3Z"1S=2 dA$Yk~> j8T8j^An09b4,H2!!)>Frs$nT"98Eec)CXPkf>.pBLjNn2ck3i\_6bHrt"t^]q'LS4!5h;A;$bs jo4rQ%eA&RO`=5Q*\C*(Nip[sJcCH(!EgQC!!E<51N1kCrs4A_!!!+@s"FKQ!!"GErs$5.%g4,7 qu$Hubu5;Z,')rGrsR(1"r_%/LBISW"*+>?#.I/;!u4YMrVm-b!<<*#%fH>LrVus"2u!=V[n.58 'i;gHs82is-_p]l~> j8T8j^An09b4,H2!!)>Frs$nT"98Eec)CXPkf>.P!!NW8)DtZO\CpYGrsAPX]89`M)[ZfQkl:tm #8&@TE1tSHJcCH(!EgQC!!E<51N1kCrs4A_!!!+@s"FKQ!!"GErs$5.%g4,7qu$Hubu5;Z,')rG rsR(1"r_%/LBISW"*+>?#.I/;!u4YMrVm-b!<<*#%fH>LrVus"2u!=V[n.58'i;gHs82is-_p]l~> j8T8j^An09b4,H2!!)>Frs$nT"98Eec)CXPkf>.P!!NW8)DtZO\CpYGrsAPX]89`M)[ZfQkl:tm #8&@TE1tSHJcCH(!EgQC!!E<51N1kCrs4A_!!!+@s"FKQ!!"GErs$5.%g4,7qu$Hubu5;Z,')rG rsR(1"r_%/LBISW"*+>?#.I/;!u4YMrVm-b!<<*#%fH>LrVus"2u!=V[n.58'i;gHs82is-_p]l~> jSoGU!8.>8!9EYLrr<&bO8fB?!!!1-cD:L?4T59ik/F-LA4.^d4'R'$]A*.]rt#"a^Rp!^4sD4: @"=reiVhm<%e.iLNc%QC*\gN3Og<F+JcC<$JcE"TJ,~> jSoGU!8.>8!9EYLrr<&bO8fB?!!!1-cD:I?4SSm`!X];F+[9V*]A*.]rsJY\^R8e%+q=qd!o!\] "UPMP0iWY-ddhthJcC<$Z2]=~> jSoGU!8.>8!9EYLrr<&bO8fB?!!!1-cD:I?4SSm`!X];F+[9V*]A*.]rsJY\^R8e%+q=qd!o!\] "UPMP0iWY-ddhthJcC<$Z2]=~> jSoG=!:p07!rVQfrr<&bO8f>$!!%WHU]:?VpAY[%j27UC@R;=`4C*E.^Yeq"rt#(g_kM`l5U%@8 ?@ST^httt(%d_E@N,20<*]$`9PI8s7JcC<$JcE:\J,~> jSoG=!:p07!rVQfrr<&bO8f>$!!%WHU]1<VnGipt$4m[Z-V8HQ^Yeq"rsJ_b_kM?K.1lt!$-WAV !t5SI*BISg[FOu%s+13$s1//[~> jSoG=!:p07!rVQfrr<&bO8f>$!!%WHU]1<VnGipt$4m[Z-V8HQ^Yeq"rsJ_b_kM?K.1lt!$-WAV !t5SI*BISg[FOu%s+13$s1//[~> k5Y/Urr;iqqZ$Qq!:,^G#/_Sa!#g[\V>pQXmf*gphnPe5?9TPX5[],9_;Y=7rt#+j`2&&s6mWs; >C2jOg\Jhg%dM07LhK=-+#d8FQabT@JcC<$JcERdJ,~> k5Y/Urr;iqqZ$Qq!:,^G#/_Sa!#g[\V>gNXkl;(s&etrm0N<Oq_;Y=7rsShf`2%ud1):B6&I6#M $NUVJ%hL!TDO7iapOW?qs+13ds*t~> k5Y/Urr;iqqZ$Qq!:,^G#/_Sa!#g[\V>gNXkl;(s&etrm0N<Oq_;Y=7rsShf`2%ud1):B6&I6#M $NUVJ%hL!TDO7iapOW?qs+13ds*t~> jSoCG4TGG58FQTY!!)>Frs/Fr/H>bYMuKXSs#fHD&,P+qSUFd++!X-`KVZQJrn7;]kfB]YBLjNm 2ck9m\_6bcrsn22VM8\P-6P<OHCMP$q18Qss+13ls*t~> jSoCG4TGG58FQTY!!)>Frs/Fr/H>bYMuKXS!'K6@$j74_)%d]F@>(Gpjo3s5$g>[1Lh&Ue&Jl8s "0V\4#S\'f'.Qb&S%IGNJcC<$JcEjlJ,~> jSoCG4TGG58FQTY!!)>Frs/Fr/H>bYMuKXS!'K6@$j74_)%d]F@>(Gpjo3s5$g>[1Lh&Ue&Jl8s "0V\4#S\'f'.Qb&S%IGNJcC<$JcEjlJ,~> jSoC$?2sq4C@D3&!!)>Crrfr(!!$i5s8P4<rsnhW\X@_G3?TY<Aqm2&k32gTm)l>cC.]rs2-"da [FOuJrt#(g_kM`l66m^:?%&9Wh>2^&JcC<$dJn^~> jSoC$?2sq4C@D3&!!)>Crrfr(!!$i5rr>19!"8l>*?lL=*^OCmVT.c^rsS29WetOZ+VPe;*"S\B $j77a*#'2E>()sTh>2^&JcC<$dJn^~> jSoC$?2sq4C@D3&!!)>Crrfr(!!$i5rr>19!"8l>*?lL=*^OCmVT.c^rsS29WetOZ+VPe;*"S\B $j77a*#'2E>()sTh>2^&JcC<$dJn^~> jSoBVIfKF4N:?iLr;Zi_M>m[c$373,s8P44rsneT\!M;=2'"/=C5T%6lM1Ahm`qtqDG;](0i;qR ZdeW5rt#%d_4cBe5Tq:4@"=reiV\9,JcC<$g&HR~> jSoBVIfKF4N:?iLr;Zi_M>m[c$373,rr>11!"95V-n$2R,tVj/WljW%rs\>@Y)[Bn-Pd^K,o[2S !"Ar@+!i'F)EM8VTu#^cJcC<$JcFF'J,~> jSoBVIfKF4N:?iLr;Zi_M>m[c$373,rr>11!"95V-n$2R,tVj/WljW%rs\>@Y)[Bn-Pd^K,o[2S !"Ar@+!i'F)EM8VTu#^cJcC<$JcFF'J,~> jSoB3TE"p3Xml>m`;fnPM#RON!'R:\s#eU,(A-+_PB0YY*\0p#J8\4:*\U<-OKd+$LAqYX1cCnQ >s'8U6=Q",s-3Ndd[EQ(la6ZpfqV1?l_4?/~> jSoB3TE"p3Xml>m`;fnPM#RON!'R:\!'JI*'EoF*0eXah.SOZ/Dbhr&+=o,n)?bZm#r\?&>s'8U 6=Q",s-3Ndd[EQ(la6ZpfqV1?l_4?/~> jSoB3TE"p3Xml>m`;fnPM#RON!'R:\!'JI*'EoF*0eXah.SOZ/Dbhr&+=o,n)?bZm#r\?&>s'8U 6=Q",s-3Ndd[EQ(la6ZpfqV1?l_4?/~> jo5P`#J^<7!mgH;#?)*5!!!$0Bo;olqu?hts8P4$rs&&BZBhT9mXbE:s8P4Zrr`)O]<6_bZi:(' #iu!gDcZo=lb!/tq[!-""Bm_a!:-?YJ,~> jo5P`#J^<7!mgH;#?)*5!!!$0Bo;olqu?htrr>1#!!NB=.l/RfJH5QI!'L2Z"8U]`Y(?VZrrN!& jSo@$<r`6d]Dhp/#lO]*=uQE]l_4?/~> jo5P`#J^<7!mgH;#?)*5!!!$0Bo;olqu?htrr>1#!!NB=.l/RfJH5QI!'L2Z"8U]`Y(?VZrrN!& jSo@$<r`6d]Dhp/#lO]*=uQE]l_4?/~> JcF'rrrB"ts#bl4]DqmnJcDbM!QG-!s8N'!lb!/t`W5l8rr<&bU&TW~> JcF'rrrB"t!'Gf4\GuUlJcDbM!QG-!s8N'!lb!/t`W5l8rr<&bU&TW~> JcF'rrrB"t!'Gf4\GuUlJcDbM!QG-!s8N'!lb!/t`W5l8rr<&bU&TW~> JcF'rrrB"ts#bl4]DqmnJcDbM!EK3[s8N'!lb!/t<WN!rrr<&bU&TW~> JcF'rrrB"t!'Gf4\GuUlJcDbM!EK3[s8N'!lb!/t<WN!rrr<&bU&TW~> JcF'rrrB"t!'Gf4\GuUlJcDbM!EK3[s8N'!lb!/t<WN!rrr<&bU&TW~> JcF'rrrB"ts#bl4]DqmnJcDhO"7pU7!94%Y!!)>urr_k7!!)lqrr<&bU&TW~> JcF'rrrB"t!'Gf4\GuUlJcDhO"7pU7!94%Y!!)>urr_k7!!)lqrr<&bU&TW~> JcF'rrrB"t!'Gf4\GuUlJcDhO"7pU7!94%Y!!)>urr_k7!!)lqrr<&bU&TW~> JcF'rrrB"ts#bl4]DqmnJcE4Z#Q0<""WD8JT)S`i$2X`$rs#l0)?pd<TDSWmcs.Il'2HRGs8N'$ li7!Gqu?`oq#:uP<>G]TAE-W<s5gI[!:.?U#]BYA$-cTi!u"ABs8S/Y!!.$(r;Zm$s4@2L!WNK' !<)rt!!hi9AK_7!L&ItMJ,~> JcF'rrrB"t!'Gf4\GuUlJcE4Z#Q0<""WD8JT)S`i$2X`$rs#l0)?pd<TDSWmcs.Il'2HRGs8N'$ li7!Gqu?`oq#:uP<>G]TAE-W<s5gI[!:.?U#]BYA$-cTi!u"ABs8S/Y!!.$(r;Zm$s4@2L!WNK' !<)rt!!hi9AK_7!L&ItMJ,~> JcF'rrrB"t!'Gf4\GuUlJcE4Z#Q0<""WD8JT)S`i$2X`$rs#l0)?pd<TDSWmcs.Il'2HRGs8N'$ li7!Gqu?`oq#:uP<>G]TAE-W<s5gI[!:.?U#]BYA$-cTi!u"ABs8S/Y!!.$(r;Zm$s4@2L!WNK' !<)rt!!hi9AK_7!L&ItMJ,~> JcF'rrrB"ts#bl4]DqmnJcE4Z#B0Z`o%mUO9`=tmlMpq^rs3`IBBB$;3WOO*rs5.u6-]5E-3L"A s8N'!li-ne`rIs1pA"YG[07r#q84<Y(eXfp,6._$(eOoEs8SMi6dkhZ7KA;FrM9JohuE`4)ZXCH s8VgU/E[!4lMpq]s8N'(;Db]MiBdNkW;hA~> JcF'rrrB"t!'Gf4\GuUlJcE4Z#B0Z`o%mUO9`=tmlMpq^rs3`IBBB$;3WOO*rs5.u6-]5E-3L"A s8N'!li-ne`rIs1pA"YG[07r#q84<Y(eXfp,6._$(eOoEs8SMi6dkhZ7KA;FrM9JohuE`4)ZXCH s8VgU/E[!4lMpq]s8N'(;Db]MiBdNkW;hA~> JcF'rrrB"t!'Gf4\GuUlJcE4Z#B0Z`o%mUO9`=tmlMpq^rs3`IBBB$;3WOO*rs5.u6-]5E-3L"A s8N'!li-ne`rIs1pA"YG[07r#q84<Y(eXfp,6._$(eOoEs8SMi6dkhZ7KA;FrM9JohuE`4)ZXCH s8VgU/E[!4lMpq]s8N'(;Db]MiBdNkW;hA~> JcF'rrrB"ts#bl4]DqmnJcE4Z!Xo(arr3%3#P.lo!p]gdr;QlU!"o,-rrUFF(]OF:bl]Nlrr3&C !#,A3rr<8hs8U(RB)20#!Zh?_rr3&0!*K4"rr<?fmJk_ds2tKop\t0uq_%uhs8OtW`W#l=NW;fP rrF=>rr3&c!!)lqrr<(@rVlfuc2\QWs*t~> JcF'rrrB"t!'Gf4\GuUlJcE4Z!Xo(arr3%3#P.lo!p]gdr;QlU!"o,-rrUFF(]OF:bl]Nlrr3&C !#,A3rr<8hs8U(RB)20#!Zh?_rr3&0!*K4"rr<?fmJk_ds2tKop\t0uq_%uhs8OtW`W#l=NW;fP rrF=>rr3&c!!)lqrr<(@rVlfuc2\QWs*t~> JcF'rrrB"t!'Gf4\GuUlJcE4Z!Xo(arr3%3#P.lo!p]gdr;QlU!"o,-rrUFF(]OF:bl]Nlrr3&C !#,A3rr<8hs8U(RB)20#!Zh?_rr3&0!*K4"rr<?fmJk_ds2tKop\t0uq_%uhs8OtW`W#l=NW;fP rrF=>rr3&c!!)lqrr<(@rVlfuc2\QWs*t~> JcF'rrrB"ts#bl4]DqmnJcE4Z#Ts+6ec5[@444'-!p]gdr;QiT"_IZ4!p]gfrr3%#!1`ue!H;EF s8N'%li3djQM(7[oDemerr3&]!!rQ'rr<&Yr;Qgu!1j&f#G;&ps8SGdC&\,<OoP^Ss8U1OpAY'n lMpq]s8N'!li$hbkPtU]s*t~> JcF'rrrB"t!'Gf4\GuUlJcE4Z#Ts+6ec5[@444'-!p]gdr;QiT"_IZ4!p]gfrr3%#!1`ue!H;EF s8N'%li3djQM(7[oDemerr3&]!!rQ'rr<&Yr;Qgu!1j&f#G;&ps8SGdC&\,<OoP^Ss8U1OpAY'n lMpq]s8N'!li$hbkPtU]s*t~> JcF'rrrB"t!'Gf4\GuUlJcE4Z#Ts+6ec5[@444'-!p]gdr;QiT"_IZ4!p]gfrr3%#!1`ue!H;EF s8N'%li3djQM(7[oDemerr3&]!!rQ'rr<&Yr;Qgu!1j&f#G;&ps8SGdC&\,<OoP^Ss8U1OpAY'n lMpq]s8N'!li$hbkPtU]s*t~> JcF'rrrB"ts#bl4]DqmnJcE4Z#.4d<!'6M:r;Qia!!)or#jhKhqq/?:!!*#u!Ytdep](6n"6t:7 On8SS/HE`grrTD).fKDI!!)?_rrNr9fDPX]f`2ffs7$C-q#C@K)uuB+s)DWKrrVKd!;c`q!!)?` rrVKd!3#pJ~> JcF'rrrB"t!'Gf4\GuUlJcE4Z#.4d<!'6M:r;Qia!!)or#jhKhqq/?:!!*#u!Ytdep](6n"6t:7 On8SS/HE`grrTD).fKDI!!)?_rrNr9fDPX]f`2ffs7$C-q#C@K)uuB+s)DWKrrVKd!;c`q!!)?` rrVKd!3#pJ~> JcF'rrrB"t!'Gf4\GuUlJcE4Z#.4d<!'6M:r;Qia!!)or#jhKhqq/?:!!*#u!Ytdep](6n"6t:7 On8SS/HE`grrTD).fKDI!!)?_rrNr9fDPX]f`2ffs7$C-q#C@K)uuB+s)DWKrrVKd!;c`q!!)?` rrVKd!3#pJ~> JcF'rrrB"tHorsJ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@-b?s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1KsGJcE1Y#N'5*!!!@Lp\t0olMpq^rs7_:2[:![ >lXm(rrN<'kP,#V!!GeI"r?(frs7'n,/j5f)@*nQs8N'!lhpba!s%Q_rrV<_"9/</>QCi)d1s+j 4TG@!`Vof<lMpq]s8N'!li$hblMpp`s*t~> JcF'rrrB"t!'Gf4\GuUlJcE1Y#N'5*!!!@Lp\t0olMpq^rs7_:2[:![>lXm(rrN<'kP,#V!!GeI "r?(frs7'n,/j5f)@*nQs8N'!lhpba!s%Q_rrV<_"9/</>QCi)d1s+j4TG@!`Vof<lMpq]s8N'! li$hblMpp`s*t~> JcF'rrrB"t!'Gf4\GuUlJcE1Y#N'5*!!!@Lp\t0olMpq^rs7_:2[:![>lXm(rrN<'kP,#V!!GeI "r?(frs7'n,/j5f)@*nQs8N'!lhpba!s%Q_rrV<_"9/</>QCi)d1s+j4TG@!`Vof<lMpq]s8N'! li$hblMpp`s*t~> JcF'rrrB"tHorsJ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@-b?s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1KsGJcE4Z#kS)roqFYN!*0$u!p]gdr;R)>%Ln9N s8VBb!<3!")$&1\s8N'&A,2\r.IZs0#M_C@,6\c\d/<qD!!)?_rrNu:g\h'Qd/Y!^rsQO@:&f0Q rZVC$^a8pY!p]gdqZ$Qq!:0U`!p]gdW;hA~> JcF'rrrB"tHorsJ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@-b?s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1KsGJcE4Z#kS)roqFYN!*0$u!p]gdr;R)>%Ln9N s8VBb!<3!")$&1\s8N'&A,2\r.IZs0#M_C@,6\c\d/<qD!!)?_rrNu:g\h'Qd/Y!^rsQO@:&f0Q rZVC$^a8pY!p]gdqZ$Qq!:0U`!p]gdW;hA~> JcF'rrrB"tHorsJ^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&Xl R@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YHoDcLl ^&R\lRIgHlRD&XlR@-b?s1Oi6s7;YHoDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1Oi6s7;YH oDcLl^&R\lRIgHlRD&XlR@3[H]pZS6o9l$<s1KsGJcE4Z#kS)roqFYN!*0$u!p]gdr;R)>%Ln9N s8VBb!<3!")$&1\s8N'&A,2\r.IZs0#M_C@,6\c\d/<qD!!)?_rrNu:g\h'Qd/Y!^rsQO@:&f0Q rZVC$^a8pY!p]gdqZ$Qq!:0U`!p]gdW;hA~> JcF'rrrB"ts#bl4]DqmnJcE7[!lbT#rVm.q!!;los6BXbr;QgI!4)S'!p]gdrr3%(!0[6Z!;-9j rr<8hs8R$<62L?U!o"6+pAb-m!:0R_!`f<"r;Qh^!*0$u$iV=Qj;$8GKE-^>K`(iOlMpq]s8N'! li$hblMpp`s*t~> JcF'rrrB"ts#bl4]DqmnJcE7[!lbT#rVm.q!!;los6BXbr;QgI!4)S'!p]gdrr3%(!0[6Z!;-9j rr<8hs8R$<62L?U!o"6+pAb-m!:0R_!`f<"r;Qh^!*0$u$iV=Qj;$8GKE-^>K`(iOlMpq]s8N'! li$hblMpp`s*t~> JcF'rrrB"ts#bl4]DqmnJcE7[!lbT#rVm.q!!;los6BXbr;QgI!4)S'!p]gdrr3%(!0[6Z!;-9j rr<8hs8R$<62L?U!o"6+pAb-m!:0R_!`f<"r;Qh^!*0$u$iV=Qj;$8GKE-^>K`(iOlMpq]s8N'! li$hblMpp`s*t~> JcF'rrrB"ts#bl4]DqmnJcE7["8s5ln,E=nnc0*ss8VTh!;QNm!XSk_rr3?)N;rtWs8UIN*q0(-% E]mcs8DuulMpn^7K?firro5!'7RFMqYpZr!!)<^rr^:C49#6Z"8F8Gao25HJcJ(ts8V-^-l:n@r r_ck!;QKl"8r3"li$hbkl:^^s*t~> JcF'rrrB"ts#bl4]DqmnJcE7["8s5ln,E=nnc0*ss8VTh!;QNm!XSk_rr3?)N;rtWs8UIN*q0(-% E]mcs8DuulMpn^7K?firro5!'7RFMqYpZr!!)<^rr^:C49#6Z"8F8Gao25HJcJ(ts8V-^-l:n@r r_ck!;QKl"8r3"li$hbkl:^^s*t~> JcF'rrrB"ts#bl4]DqmnJcE7["8s5ln,E=nnc0*ss8VTh!;QNm!XSk_rr3?)N;rtWs8UIN*q0(-% E]mcs8DuulMpn^7K?firro5!'7RFMqYpZr!!)<^rr^:C49#6Z"8F8Gao25HJcJ(ts8V-^-l:n@r r_ck!;QKl"8r3"li$hbkl:^^s*t~> JcF'rrrB"ts#bl4]DqmnJcE4Z#_;t&YOq0j!/(7M&K_"=p8jb`@K9<jn#SB:(BD)Hrske,0u`tH Jfhu3s2P*>]`.p6mgK20p%eUhq/$Q>!!<]pLZe[:"31BA\GQ:3LB(B/ps)>0O8T"[iW9+Orr3$l !(?\`$QfA7p8jb`s3UfHaSl,@]`8&^WW.J~> JcF'rrrB"ts#bl4]DqmnJcE4Z#_;t&YOq0j!/(7M&K_"=p8jb`@K9<jn#SB:(BD)Hrske,0u`tH Jfhu3s2P*>]`.p6mgK20p%eUhq/$Q>!!<]pLZe[:"31BA\GQ:3LB(B/ps)>0O8T"[iW9+Orr3$l !(?\`$QfA7p8jb`s3UfHaSl,@]`8&^WW.J~> JcF'rrrB"ts#bl4]DqmnJcE4Z#_;t&YOq0j!/(7M&K_"=p8jb`@K9<jn#SB:(BD)Hrske,0u`tH Jfhu3s2P*>]`.p6mgK20p%eUhq/$Q>!!<]pLZe[:"31BA\GQ:3LB(B/ps)>0O8T"[iW9+Orr3$l !(?\`$QfA7p8jb`s3UfHaSl,@]`8&^WW.J~> JcF'rrrB"ts#bl4]DqmnJcE4Z#il)d9b7O]R/['a'$W?>)J%_)q03h])HOEK[3Gi$rr3>M;\T?Y Ep<W(0*2%P"!.EK$N:#+".f8f%.I2"LKlM<!"6:90EM.Q!%@aE#.I/;!u4YMqYpUd%J9Z"!j)Hu qYpfF2[112hZ#M5!!rZDs8N]4!!!$YWrIS~> JcF'rrrB"ts#bl4]DqmnJcE4Z#il)d9b7O]R/['a'$W?>)J%_)q03h])HOEK[3Gi$rr3>M;\T?Y Ep<W(0*2%P"!.EK$N:#+".f8f%.I2"LKlM<!"6:90EM.Q!%@aE#.I/;!u4YMqYpUd%J9Z"!j)Hu qYpfF2[112hZ#M5!!rZDs8N]4!!!$YWrIS~> JcF'rrrB"ts#bl4]DqmnJcE4Z#il)d9b7O]R/['a'$W?>)J%_)q03h])HOEK[3Gi$rr3>M;\T?Y Ep<W(0*2%P"!.EK$N:#+".f8f%.I2"LKlM<!"6:90EM.Q!%@aE#.I/;!u4YMqYpUd%J9Z"!j)Hu qYpfF2[112hZ#M5!!rZDs8N]4!!!$YWrIS~> JcF'rrrB"ts#bl4]DqmnJcC<$pAY6Q-;4=:rr`)16n*]elMlA~> JcF'rrrB"ts#bl4]DqmnJcC<$pAY6Q-;4=:rr`)16n*]elMlA~> JcF'rrrB"ts#bl4]DqmnJcC<$pAY6Q-;4=:rr`)16n*]elMlA~> JcF'rrrB"ts#bl4]DqmnJcC<$pAY1X!7(KA!Ug;Fs6BW7~> JcF'rrrB"ts#bl4]DqmnJcC<$pAY1X!7(KA!Ug;Fs6BW7~> JcF'rrrB"ts#bl4]DqmnJcC<$pAY1X!7(KA!Ug;Fs6BW7~> JcF'rrrB"ts#bl4]DqmnJcC<$pAY1$!7(KA!QI9Rs6BW7~> JcF'rrrB"ts#bl4]DqmnJcC<$pAY1$!7(KA!QI9Rs6BW7~> JcF'rrrB"ts#bl4]DqmnJcC<$pAY1$!7(KA!QI9Rs6BW7~> JcF'rrrB"ts#bl4]DqmnJcC<$pAYJG!$nQ-qsr!a/_>RRlMlA~> JcF'rrrB"ts#bl4]DqmnJcC<$pAYJG!$nQ-qsr!a/_>RRlMlA~> JcF'rrrB"ts#bl4]DqmnJcC<$pAYJG!$nQ-qsr!a/_>RRlMlA~> JcF'rs%B<js3#un]DqoSJcC<$p&>;r6kf\-)F]e\JcG!7J,~> JcF'rs%B<js3#un]DqoSJcC<$p&>;r6kf\-)F]e\JcG!7J,~> JcF'rs%B<js3#un]DqoSJcC<$p&>;r6kf\-)F]e\JcG!7J,~> %%EndData showpage %%Trailer end %%EOF ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/gdb/doc/annotate.texinfo��������������������������������������������������������������0000644�0001750�0001750�00000062636�12250770607�016616� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������\input texinfo @c -*-texinfo-*- @c %**start of header @setfilename annotate.info @c This is a dir.info fragment to support semi-automated addition of @c manuals to an info tree. @dircategory Software development @direntry * Annotate: (annotate). The obsolete annotation interface. @end direntry @c @include gdb-cfg.texi @c @settitle @value{GDBN}'s Obsolete Annotations @setchapternewpage off @c %**end of header @set EDITION 1.0 @set DATE July 2003 @c NOTE: cagney/2003-07-28: @c Don't make this migration document an appendix of GDB's user guide. @c By keeping this separate, the size of the user guide is contained. If @c the user guide to get much bigger it would need to switch to a larger, @c more expensive, form factor and would drive up the manuals publication @c cost. Having a smaller cheaper manual helps the GNU Press with its sales. @copying Copyright @copyright{} 1994-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end copying @ifnottex This file documents @value{GDBN}'s obsolete annotations. @insertcopying @end ifnottex @titlepage @title @value{GDBN}'s Obsolete Annotations @subtitle Edition @value{EDITION} @subtitle @value{DATE} @author Free Software Foundation @page @vskip 0pt plus 1filll @insertcopying @end titlepage @ifnottex @node Top @top GDB Annotations This document describes the obsolete level two annotation interface implemented in older @value{GDBN} versions. @ignore This is Edition @value{EDITION}, @value{DATE}. @end ignore @end ifnottex @menu * Annotations Overview:: What annotations are; the general syntax. * Limitations:: Limitations of the annotation interface. * Migrating to GDB/MI:: Migrating to GDB/MI * Server Prefix:: Issuing a command without affecting user state. * Value Annotations:: Values are marked as such. * Frame Annotations:: Stack frames are annotated. * Displays:: @value{GDBN} can be told to display something periodically. * Prompting:: Annotations marking @value{GDBN}'s need for input. * Errors:: Annotations for error messages. * Breakpoint Info:: Information on breakpoints. * Invalidation:: Some annotations describe things now invalid. * Annotations for Running:: Whether the program is running, how it stopped, etc. * Source Annotations:: Annotations describing source code. * Multi-threaded Apps:: An annotation that reports multi-threadedness. * GNU Free Documentation License:: @end menu @contents @node Annotations Overview @chapter What is an Annotation? @cindex annotations To produce obsolete level two annotations, start @value{GDBN} with the @code{--annotate=2} option. Annotations start with a newline character, two @samp{control-z} characters, and the name of the annotation. If there is no additional information associated with this annotation, the name of the annotation is followed immediately by a newline. If there is additional information, the name of the annotation is followed by a space, the additional information, and a newline. The additional information cannot contain newline characters. Any output not beginning with a newline and two @samp{control-z} characters denotes literal output from @value{GDBN}. Currently there is no need for @value{GDBN} to output a newline followed by two @samp{control-z} characters, but if there was such a need, the annotations could be extended with an @samp{escape} annotation which means those three characters as output. A simple example of starting up @value{GDBN} with annotations is: @smallexample $ gdb --annotate=2 GNU GDB 5.0 Copyright 2000 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc-sun-sunos4.1.3" ^Z^Zpre-prompt (gdb) ^Z^Zprompt quit ^Z^Zpost-prompt $ @end smallexample Here @samp{quit} is input to @value{GDBN}; the rest is output from @value{GDBN}. The three lines beginning @samp{^Z^Z} (where @samp{^Z} denotes a @samp{control-z} character) are annotations; the rest is output from @value{GDBN}. @node Limitations @chapter Limitations of the Annotation Interface The level two annotations mechanism is known to have a number of technical and architectural limitations. As a consequence, in 2001, with the release of @value{GDBN} 5.1 and the addition of @sc{gdb/mi}, the annotation interface was marked as deprecated. This chapter discusses the known problems. @section Dependant on @sc{cli} output The annotation interface works by interspersing markups with @value{GDBN} normal command-line interpreter output. Unfortunately, this makes the annotation client dependant on not just the annotations, but also the @sc{cli} output. This is because the client is forced to assume that specific @value{GDBN} commands provide specific information. Any change to @value{GDBN}'s @sc{cli} output modifies or removes that information and, consequently, likely breaks the client. Since the @sc{gdb/mi} output is independent of the @sc{cli}, it does not have this problem. @section Scalability The annotation interface relies on value annotations (@pxref{Value Annotations}) and the display mechanism as a way of obtaining up-to-date value information. These mechanisms are not scalable. In a graphical environment, where many values can be displayed simultaneously, a serious performance problem occurs when the client tries to first extract from @value{GDBN}, and then re-display, all those values. The client should instead only request and update the values that changed. The @sc{gdb/mi} Variable Objects provide just that mechanism. @section Correctness The annotation interface assumes that a variable's value can only be changed when the target is running. This assumption is not correct. A single assignment to a single variable can result in the entire target, and all displayed values, needing an update. The @sc{gdb/mi} Variable Objects include a mechanism for efficiently reporting such changes. @section Reliability The @sc{gdb/mi} interface includes a dedicated test directory (@file{gdb/gdb.mi}), and any addition or fix to @sc{gdb/mi} must include testsuite changes. @section Maintainability The annotation mechanism was implemented by interspersing @sc{cli} print statements with various annotations. As a consequence, any @sc{cli} output change can alter the annotation output. Since the @sc{gdb/mi} output is independent of the @sc{cli}, and the @sc{gdb/mi} is increasingly implemented independent of the @sc{cli} code, its long term maintenance is much easier. @node Migrating to GDB/MI @chapter Migrating to @sc{gdb/mi} By using the @samp{interp mi} command, it is possible for annotation clients to invoke @sc{gdb/mi} commands, and hence access the @sc{gdb/mi}. By doing this, existing annotation clients have a migration path from this obsolete interface to @sc{gdb/mi}. @node Server Prefix @chapter The Server Prefix @cindex server prefix for annotations To issue a command to @value{GDBN} without affecting certain aspects of the state which is seen by users, prefix it with @samp{server }. This means that this command will not affect the command history, nor will it affect @value{GDBN}'s notion of which command to repeat if @key{RET} is pressed on a line by itself. The server prefix does not affect the recording of values into the value history; to print a value without recording it into the value history, use the @code{output} command instead of the @code{print} command. @node Value Annotations @chapter Values @emph{Value Annotations have been removed. @sc{gdb/mi} instead provides Variable Objects.} @cindex annotations for values When a value is printed in various contexts, @value{GDBN} uses annotations to delimit the value from the surrounding text. @findex value-history-begin @findex value-history-value @findex value-history-end If a value is printed using @code{print} and added to the value history, the annotation looks like @smallexample ^Z^Zvalue-history-begin @var{history-number} @var{value-flags} @var{history-string} ^Z^Zvalue-history-value @var{the-value} ^Z^Zvalue-history-end @end smallexample @noindent where @var{history-number} is the number it is getting in the value history, @var{history-string} is a string, such as @samp{$5 = }, which introduces the value to the user, @var{the-value} is the output corresponding to the value itself, and @var{value-flags} is @samp{*} for a value which can be dereferenced and @samp{-} for a value which cannot. @findex value-begin @findex value-end If the value is not added to the value history (it is an invalid float or it is printed with the @code{output} command), the annotation is similar: @smallexample ^Z^Zvalue-begin @var{value-flags} @var{the-value} ^Z^Zvalue-end @end smallexample @findex arg-begin @findex arg-name-end @findex arg-value @findex arg-end When @value{GDBN} prints an argument to a function (for example, in the output from the @code{backtrace} command), it annotates it as follows: @smallexample ^Z^Zarg-begin @var{argument-name} ^Z^Zarg-name-end @var{separator-string} ^Z^Zarg-value @var{value-flags} @var{the-value} ^Z^Zarg-end @end smallexample @noindent where @var{argument-name} is the name of the argument, @var{separator-string} is text which separates the name from the value for the user's benefit (such as @samp{=}), and @var{value-flags} and @var{the-value} have the same meanings as in a @code{value-history-begin} annotation. @findex field-begin @findex field-name-end @findex field-value @findex field-end When printing a structure, @value{GDBN} annotates it as follows: @smallexample ^Z^Zfield-begin @var{value-flags} @var{field-name} ^Z^Zfield-name-end @var{separator-string} ^Z^Zfield-value @var{the-value} ^Z^Zfield-end @end smallexample @noindent where @var{field-name} is the name of the field, @var{separator-string} is text which separates the name from the value for the user's benefit (such as @samp{=}), and @var{value-flags} and @var{the-value} have the same meanings as in a @code{value-history-begin} annotation. When printing an array, @value{GDBN} annotates it as follows: @smallexample ^Z^Zarray-section-begin @var{array-index} @var{value-flags} @end smallexample @noindent where @var{array-index} is the index of the first element being annotated and @var{value-flags} has the same meaning as in a @code{value-history-begin} annotation. This is followed by any number of elements, where is element can be either a single element: @findex elt @smallexample @samp{,} @var{whitespace} ; @r{omitted for the first element} @var{the-value} ^Z^Zelt @end smallexample or a repeated element @findex elt-rep @findex elt-rep-end @smallexample @samp{,} @var{whitespace} ; @r{omitted for the first element} @var{the-value} ^Z^Zelt-rep @var{number-of-repetitions} @var{repetition-string} ^Z^Zelt-rep-end @end smallexample In both cases, @var{the-value} is the output for the value of the element and @var{whitespace} can contain spaces, tabs, and newlines. In the repeated case, @var{number-of-repetitions} is the number of consecutive array elements which contain that value, and @var{repetition-string} is a string which is designed to convey to the user that repetition is being depicted. @findex array-section-end Once all the array elements have been output, the array annotation is ended with @smallexample ^Z^Zarray-section-end @end smallexample @node Frame Annotations @chapter Frames @emph{Value Annotations have been removed. @sc{gdb/mi} instead provides a number of frame commands.} @emph{Frame annotations are no longer available. The @sc{gdb/mi} provides @samp{-stack-list-arguments}, @samp{-stack-list-locals}, and @samp{-stack-list-frames} commands.} @cindex annotations for frames Whenever @value{GDBN} prints a frame, it annotates it. For example, this applies to frames printed when @value{GDBN} stops, output from commands such as @code{backtrace} or @code{up}, etc. @findex frame-begin The frame annotation begins with @smallexample ^Z^Zframe-begin @var{level} @var{address} @var{level-string} @end smallexample @noindent where @var{level} is the number of the frame (0 is the innermost frame, and other frames have positive numbers), @var{address} is the address of the code executing in that frame, and @var{level-string} is a string designed to convey the level to the user. @var{address} is in the form @samp{0x} followed by one or more lowercase hex digits (note that this does not depend on the language). The frame ends with @findex frame-end @smallexample ^Z^Zframe-end @end smallexample Between these annotations is the main body of the frame, which can consist of @itemize @bullet @item @findex function-call @smallexample ^Z^Zfunction-call @var{function-call-string} @end smallexample where @var{function-call-string} is text designed to convey to the user that this frame is associated with a function call made by @value{GDBN} to a function in the program being debugged. @item @findex signal-handler-caller @smallexample ^Z^Zsignal-handler-caller @var{signal-handler-caller-string} @end smallexample where @var{signal-handler-caller-string} is text designed to convey to the user that this frame is associated with whatever mechanism is used by this operating system to call a signal handler (it is the frame which calls the signal handler, not the frame for the signal handler itself). @item A normal frame. @findex frame-address @findex frame-address-end This can optionally (depending on whether this is thought of as interesting information for the user to see) begin with @smallexample ^Z^Zframe-address @var{address} ^Z^Zframe-address-end @var{separator-string} @end smallexample where @var{address} is the address executing in the frame (the same address as in the @code{frame-begin} annotation, but printed in a form which is intended for user consumption---in particular, the syntax varies depending on the language), and @var{separator-string} is a string intended to separate this address from what follows for the user's benefit. @findex frame-function-name @findex frame-args Then comes @smallexample ^Z^Zframe-function-name @var{function-name} ^Z^Zframe-args @var{arguments} @end smallexample where @var{function-name} is the name of the function executing in the frame, or @samp{??} if not known, and @var{arguments} are the arguments to the frame, with parentheses around them (each argument is annotated individually as well, @pxref{Value Annotations}). @findex frame-source-begin @findex frame-source-file @findex frame-source-file-end @findex frame-source-line @findex frame-source-end If source information is available, a reference to it is then printed: @smallexample ^Z^Zframe-source-begin @var{source-intro-string} ^Z^Zframe-source-file @var{filename} ^Z^Zframe-source-file-end : ^Z^Zframe-source-line @var{line-number} ^Z^Zframe-source-end @end smallexample where @var{source-intro-string} separates for the user's benefit the reference from the text which precedes it, @var{filename} is the name of the source file, and @var{line-number} is the line number within that file (the first line is line 1). @findex frame-where If @value{GDBN} prints some information about where the frame is from (which library, which load segment, etc.; currently only done on the RS/6000), it is annotated with @smallexample ^Z^Zframe-where @var{information} @end smallexample Then, if source is to actually be displayed for this frame (for example, this is not true for output from the @code{backtrace} command), then a @code{source} annotation (@pxref{Source Annotations}) is displayed. Unlike most annotations, this is output instead of the normal text which would be output, not in addition. @end itemize @node Displays @chapter Displays @emph{Display Annotations have been removed. @sc{gdb/mi} instead provides Variable Objects.} @findex display-begin @findex display-number-end @findex display-format @findex display-expression @findex display-expression-end @findex display-value @findex display-end @cindex annotations for display When @value{GDBN} is told to display something using the @code{display} command, the results of the display are annotated: @smallexample ^Z^Zdisplay-begin @var{number} ^Z^Zdisplay-number-end @var{number-separator} ^Z^Zdisplay-format @var{format} ^Z^Zdisplay-expression @var{expression} ^Z^Zdisplay-expression-end @var{expression-separator} ^Z^Zdisplay-value @var{value} ^Z^Zdisplay-end @end smallexample @noindent where @var{number} is the number of the display, @var{number-separator} is intended to separate the number from what follows for the user, @var{format} includes information such as the size, format, or other information about how the value is being displayed, @var{expression} is the expression being displayed, @var{expression-separator} is intended to separate the expression from the text that follows for the user, and @var{value} is the actual value being displayed. @node Prompting @chapter Annotation for @value{GDBN} Input @cindex annotations for prompts When @value{GDBN} prompts for input, it annotates this fact so it is possible to know when to send output, when the output from a given command is over, etc. Different kinds of input each have a different @dfn{input type}. Each input type has three annotations: a @code{pre-} annotation, which denotes the beginning of any prompt which is being output, a plain annotation, which denotes the end of the prompt, and then a @code{post-} annotation which denotes the end of any echo which may (or may not) be associated with the input. For example, the @code{prompt} input type features the following annotations: @smallexample ^Z^Zpre-prompt ^Z^Zprompt ^Z^Zpost-prompt @end smallexample The input types are @table @code @findex pre-prompt @findex prompt @findex post-prompt @item prompt When @value{GDBN} is prompting for a command (the main @value{GDBN} prompt). @findex pre-commands @findex commands @findex post-commands @item commands When @value{GDBN} prompts for a set of commands, like in the @code{commands} command. The annotations are repeated for each command which is input. @findex pre-overload-choice @findex overload-choice @findex post-overload-choice @item overload-choice When @value{GDBN} wants the user to select between various overloaded functions. @findex pre-query @findex query @findex post-query @item query When @value{GDBN} wants the user to confirm a potentially dangerous operation. @findex pre-prompt-for-continue @findex prompt-for-continue @findex post-prompt-for-continue @item prompt-for-continue When @value{GDBN} is asking the user to press return to continue. Note: Don't expect this to work well; instead use @code{set height 0} to disable prompting. This is because the counting of lines is buggy in the presence of annotations. @end table @node Errors @chapter Errors @cindex annotations for errors, warnings and interrupts @findex quit @smallexample ^Z^Zquit @end smallexample This annotation occurs right before @value{GDBN} responds to an interrupt. @findex error @smallexample ^Z^Zerror @end smallexample This annotation occurs right before @value{GDBN} responds to an error. Quit and error annotations indicate that any annotations which @value{GDBN} was in the middle of may end abruptly. For example, if a @code{value-history-begin} annotation is followed by a @code{error}, one cannot expect to receive the matching @code{value-history-end}. One cannot expect not to receive it either, however; an error annotation does not necessarily mean that @value{GDBN} is immediately returning all the way to the top level. @findex error-begin A quit or error annotation may be preceded by @smallexample ^Z^Zerror-begin @end smallexample Any output between that and the quit or error annotation is the error message. Warning messages are not yet annotated. @c If we want to change that, need to fix warning(), type_error(), @c range_error(), and possibly other places. @node Breakpoint Info @chapter Information on Breakpoints @emph{Breakpoint Annotations have been removed. @sc{gdb/mi} instead provides breakpoint commands.} @cindex annotations for breakpoints The output from the @code{info breakpoints} command is annotated as follows: @findex breakpoints-headers @findex breakpoints-table @smallexample ^Z^Zbreakpoints-headers @var{header-entry} ^Z^Zbreakpoints-table @end smallexample @noindent where @var{header-entry} has the same syntax as an entry (see below) but instead of containing data, it contains strings which are intended to convey the meaning of each field to the user. This is followed by any number of entries. If a field does not apply for this entry, it is omitted. Fields may contain trailing whitespace. Each entry consists of: @findex record @findex field @smallexample ^Z^Zrecord ^Z^Zfield 0 @var{number} ^Z^Zfield 1 @var{type} ^Z^Zfield 2 @var{disposition} ^Z^Zfield 3 @var{enable} ^Z^Zfield 4 @var{address} ^Z^Zfield 5 @var{what} ^Z^Zfield 6 @var{frame} ^Z^Zfield 7 @var{condition} ^Z^Zfield 8 @var{ignore-count} ^Z^Zfield 9 @var{commands} @end smallexample Note that @var{address} is intended for user consumption---the syntax varies depending on the language. The output ends with @findex breakpoints-table-end @smallexample ^Z^Zbreakpoints-table-end @end smallexample @node Invalidation @chapter Invalidation Notices @cindex annotations for invalidation messages The following annotations say that certain pieces of state may have changed. @table @code @findex frames-invalid @item ^Z^Zframes-invalid The frames (for example, output from the @code{backtrace} command) may have changed. @findex breakpoints-invalid @item ^Z^Zbreakpoints-invalid The breakpoints may have changed. For example, the user just added or deleted a breakpoint. @end table @node Annotations for Running @chapter Running the Program @cindex annotations for running programs @findex starting @findex stopping When the program starts executing due to a @value{GDBN} command such as @code{step} or @code{continue}, @smallexample ^Z^Zstarting @end smallexample is output. When the program stops, @smallexample ^Z^Zstopped @end smallexample is output. Before the @code{stopped} annotation, a variety of annotations describe how the program stopped. @table @code @findex exited @item ^Z^Zexited @var{exit-status} The program exited, and @var{exit-status} is the exit status (zero for successful exit, otherwise nonzero). @findex signalled @findex signal-name @findex signal-name-end @findex signal-string @findex signal-string-end @item ^Z^Zsignalled The program exited with a signal. After the @code{^Z^Zsignalled}, the annotation continues: @smallexample @var{intro-text} ^Z^Zsignal-name @var{name} ^Z^Zsignal-name-end @var{middle-text} ^Z^Zsignal-string @var{string} ^Z^Zsignal-string-end @var{end-text} @end smallexample @noindent where @var{name} is the name of the signal, such as @code{SIGILL} or @code{SIGSEGV}, and @var{string} is the explanation of the signal, such as @code{Illegal Instruction} or @code{Segmentation fault}. @var{intro-text}, @var{middle-text}, and @var{end-text} are for the user's benefit and have no particular format. @findex signal @item ^Z^Zsignal The syntax of this annotation is just like @code{signalled}, but @value{GDBN} is just saying that the program received the signal, not that it was terminated with it. @findex breakpoint @item ^Z^Zbreakpoint @var{number} The program hit breakpoint number @var{number}. @findex watchpoint @item ^Z^Zwatchpoint @var{number} The program hit watchpoint number @var{number}. @end table @node Source Annotations @chapter Displaying Source @cindex annotations for source display @findex source The following annotation is used instead of displaying source code: @smallexample ^Z^Zsource @var{filename}:@var{line}:@var{character}:@var{middle}:@var{addr} @end smallexample where @var{filename} is an absolute file name indicating which source file, @var{line} is the line number within that file (where 1 is the first line in the file), @var{character} is the character position within the file (where 0 is the first character in the file) (for most debug formats this will necessarily point to the beginning of a line), @var{middle} is @samp{middle} if @var{addr} is in the middle of the line, or @samp{beg} if @var{addr} is at the beginning of the line, and @var{addr} is the address in the target program associated with the source which is being displayed. @var{addr} is in the form @samp{0x} followed by one or more lowercase hex digits (note that this does not depend on the language). @node Multi-threaded Apps @chapter Multi-threaded Applications @cindex annotations for multi-threaded apps The following annotations report thread related changes of state. @table @code @findex new-thread@r{, annotation} @item ^Z^Znew-thread This annotation is issued once for each thread that is created apart from the main thread, which is not reported. @findex thread-changed@r{, annotation} @item ^Z^Zthread-changed The selected thread has changed. This may occur at the request of the user with the @code{thread} command, or as a result of execution, e.g., another thread hits a breakpoint. @end table @node GNU Free Documentation License @appendix GNU Free Documentation License @include fdl.texi @ignore @node Index @unnumbered Index @printindex fn @end ignore @bye ��������������������������������������������������������������������������������������������������gdb-doc-7.6.2/gdb/doc/a4rc.sed����������������������������������������������������������������������0000644�0001750�0001750�00000000662�12250770607�014724� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/--- Papersize params:/,/--- end papersize params/c\ %------- Papersize params:\ %% A4 paper (297x210mm)\ %%\ \\totalwidth=297mm % total width of paper\ \\totalheight=210mm % total height of paper\ \\hmargin=5mm % horizontal margin width\ \\vmargin=10mm % vertical margin width\ \\secskip=.6pc % space between refcard secs\ \\lskip=1pt % extra skip between \\sec entries\ %------- end papersize params ������������������������������������������������������������������������������gdb-doc-7.6.2/gdb/doc/agentexpr.texi����������������������������������������������������������������0000644�0001750�0001750�00000100412�12250770607�016260� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c \input texinfo @c %**start of header @c @setfilename agentexpr.info @c @settitle GDB Agent Expressions @c @setchapternewpage off @c %**end of header @c This file is part of the GDB manual. @c @c Copyright (C) 2003-2013 Free Software Foundation, Inc. @c @c See the file gdb.texinfo for copying conditions. @node Agent Expressions @appendix The GDB Agent Expression Mechanism In some applications, it is not feasible for the debugger to interrupt the program's execution long enough for the developer to learn anything helpful about its behavior. If the program's correctness depends on its real-time behavior, delays introduced by a debugger might cause the program to fail, even when the code itself is correct. It is useful to be able to observe the program's behavior without interrupting it. Using GDB's @code{trace} and @code{collect} commands, the user can specify locations in the program, and arbitrary expressions to evaluate when those locations are reached. Later, using the @code{tfind} command, she can examine the values those expressions had when the program hit the trace points. The expressions may also denote objects in memory --- structures or arrays, for example --- whose values GDB should record; while visiting a particular tracepoint, the user may inspect those objects as if they were in memory at that moment. However, because GDB records these values without interacting with the user, it can do so quickly and unobtrusively, hopefully not disturbing the program's behavior. When GDB is debugging a remote target, the GDB @dfn{agent} code running on the target computes the values of the expressions itself. To avoid having a full symbolic expression evaluator on the agent, GDB translates expressions in the source language into a simpler bytecode language, and then sends the bytecode to the agent; the agent then executes the bytecode, and records the values for GDB to retrieve later. The bytecode language is simple; there are forty-odd opcodes, the bulk of which are the usual vocabulary of C operands (addition, subtraction, shifts, and so on) and various sizes of literals and memory reference operations. The bytecode interpreter operates strictly on machine-level values --- various sizes of integers and floating point numbers --- and requires no information about types or symbols; thus, the interpreter's internal data structures are simple, and each bytecode requires only a few native machine instructions to implement it. The interpreter is small, and strict limits on the memory and time required to evaluate an expression are easy to determine, making it suitable for use by the debugging agent in real-time applications. @menu * General Bytecode Design:: Overview of the interpreter. * Bytecode Descriptions:: What each one does. * Using Agent Expressions:: How agent expressions fit into the big picture. * Varying Target Capabilities:: How to discover what the target can do. * Rationale:: Why we did it this way. @end menu @c @node Rationale @c @section Rationale @node General Bytecode Design @section General Bytecode Design The agent represents bytecode expressions as an array of bytes. Each instruction is one byte long (thus the term @dfn{bytecode}). Some instructions are followed by operand bytes; for example, the @code{goto} instruction is followed by a destination for the jump. The bytecode interpreter is a stack-based machine; most instructions pop their operands off the stack, perform some operation, and push the result back on the stack for the next instruction to consume. Each element of the stack may contain either a integer or a floating point value; these values are as many bits wide as the largest integer that can be directly manipulated in the source language. Stack elements carry no record of their type; bytecode could push a value as an integer, then pop it as a floating point value. However, GDB will not generate code which does this. In C, one might define the type of a stack element as follows: @example union agent_val @{ LONGEST l; DOUBLEST d; @}; @end example @noindent where @code{LONGEST} and @code{DOUBLEST} are @code{typedef} names for the largest integer and floating point types on the machine. By the time the bytecode interpreter reaches the end of the expression, the value of the expression should be the only value left on the stack. For tracing applications, @code{trace} bytecodes in the expression will have recorded the necessary data, and the value on the stack may be discarded. For other applications, like conditional breakpoints, the value may be useful. Separate from the stack, the interpreter has two registers: @table @code @item pc The address of the next bytecode to execute. @item start The address of the start of the bytecode expression, necessary for interpreting the @code{goto} and @code{if_goto} instructions. @end table @noindent Neither of these registers is directly visible to the bytecode language itself, but they are useful for defining the meanings of the bytecode operations. There are no instructions to perform side effects on the running program, or call the program's functions; we assume that these expressions are only used for unobtrusive debugging, not for patching the running code. Most bytecode instructions do not distinguish between the various sizes of values, and operate on full-width values; the upper bits of the values are simply ignored, since they do not usually make a difference to the value computed. The exceptions to this rule are: @table @asis @item memory reference instructions (@code{ref}@var{n}) There are distinct instructions to fetch different word sizes from memory. Once on the stack, however, the values are treated as full-size integers. They may need to be sign-extended; the @code{ext} instruction exists for this purpose. @item the sign-extension instruction (@code{ext} @var{n}) These clearly need to know which portion of their operand is to be extended to occupy the full length of the word. @end table If the interpreter is unable to evaluate an expression completely for some reason (a memory location is inaccessible, or a divisor is zero, for example), we say that interpretation ``terminates with an error''. This means that the problem is reported back to the interpreter's caller in some helpful way. In general, code using agent expressions should assume that they may attempt to divide by zero, fetch arbitrary memory locations, and misbehave in other ways. Even complicated C expressions compile to a few bytecode instructions; for example, the expression @code{x + y * z} would typically produce code like the following, assuming that @code{x} and @code{y} live in registers, and @code{z} is a global variable holding a 32-bit @code{int}: @example reg 1 reg 2 const32 @i{address of z} ref32 ext 32 mul add end @end example In detail, these mean: @table @code @item reg 1 Push the value of register 1 (presumably holding @code{x}) onto the stack. @item reg 2 Push the value of register 2 (holding @code{y}). @item const32 @i{address of z} Push the address of @code{z} onto the stack. @item ref32 Fetch a 32-bit word from the address at the top of the stack; replace the address on the stack with the value. Thus, we replace the address of @code{z} with @code{z}'s value. @item ext 32 Sign-extend the value on the top of the stack from 32 bits to full length. This is necessary because @code{z} is a signed integer. @item mul Pop the top two numbers on the stack, multiply them, and push their product. Now the top of the stack contains the value of the expression @code{y * z}. @item add Pop the top two numbers, add them, and push the sum. Now the top of the stack contains the value of @code{x + y * z}. @item end Stop executing; the value left on the stack top is the value to be recorded. @end table @node Bytecode Descriptions @section Bytecode Descriptions Each bytecode description has the following form: @table @asis @item @code{add} (0x02): @var{a} @var{b} @result{} @var{a+b} Pop the top two stack items, @var{a} and @var{b}, as integers; push their sum, as an integer. @end table In this example, @code{add} is the name of the bytecode, and @code{(0x02)} is the one-byte value used to encode the bytecode, in hexadecimal. The phrase ``@var{a} @var{b} @result{} @var{a+b}'' shows the stack before and after the bytecode executes. Beforehand, the stack must contain at least two values, @var{a} and @var{b}; since the top of the stack is to the right, @var{b} is on the top of the stack, and @var{a} is underneath it. After execution, the bytecode will have popped @var{a} and @var{b} from the stack, and replaced them with a single value, @var{a+b}. There may be other values on the stack below those shown, but the bytecode affects only those shown. Here is another example: @table @asis @item @code{const8} (0x22) @var{n}: @result{} @var{n} Push the 8-bit integer constant @var{n} on the stack, without sign extension. @end table In this example, the bytecode @code{const8} takes an operand @var{n} directly from the bytecode stream; the operand follows the @code{const8} bytecode itself. We write any such operands immediately after the name of the bytecode, before the colon, and describe the exact encoding of the operand in the bytecode stream in the body of the bytecode description. For the @code{const8} bytecode, there are no stack items given before the @result{}; this simply means that the bytecode consumes no values from the stack. If a bytecode consumes no values, or produces no values, the list on either side of the @result{} may be empty. If a value is written as @var{a}, @var{b}, or @var{n}, then the bytecode treats it as an integer. If a value is written is @var{addr}, then the bytecode treats it as an address. We do not fully describe the floating point operations here; although this design can be extended in a clean way to handle floating point values, they are not of immediate interest to the customer, so we avoid describing them, to save time. @table @asis @item @code{float} (0x01): @result{} Prefix for floating-point bytecodes. Not implemented yet. @item @code{add} (0x02): @var{a} @var{b} @result{} @var{a+b} Pop two integers from the stack, and push their sum, as an integer. @item @code{sub} (0x03): @var{a} @var{b} @result{} @var{a-b} Pop two integers from the stack, subtract the top value from the next-to-top value, and push the difference. @item @code{mul} (0x04): @var{a} @var{b} @result{} @var{a*b} Pop two integers from the stack, multiply them, and push the product on the stack. Note that, when one multiplies two @var{n}-bit numbers yielding another @var{n}-bit number, it is irrelevant whether the numbers are signed or not; the results are the same. @item @code{div_signed} (0x05): @var{a} @var{b} @result{} @var{a/b} Pop two signed integers from the stack; divide the next-to-top value by the top value, and push the quotient. If the divisor is zero, terminate with an error. @item @code{div_unsigned} (0x06): @var{a} @var{b} @result{} @var{a/b} Pop two unsigned integers from the stack; divide the next-to-top value by the top value, and push the quotient. If the divisor is zero, terminate with an error. @item @code{rem_signed} (0x07): @var{a} @var{b} @result{} @var{a modulo b} Pop two signed integers from the stack; divide the next-to-top value by the top value, and push the remainder. If the divisor is zero, terminate with an error. @item @code{rem_unsigned} (0x08): @var{a} @var{b} @result{} @var{a modulo b} Pop two unsigned integers from the stack; divide the next-to-top value by the top value, and push the remainder. If the divisor is zero, terminate with an error. @item @code{lsh} (0x09): @var{a} @var{b} @result{} @var{a<<b} Pop two integers from the stack; let @var{a} be the next-to-top value, and @var{b} be the top value. Shift @var{a} left by @var{b} bits, and push the result. @item @code{rsh_signed} (0x0a): @var{a} @var{b} @result{} @code{(signed)}@var{a>>b} Pop two integers from the stack; let @var{a} be the next-to-top value, and @var{b} be the top value. Shift @var{a} right by @var{b} bits, inserting copies of the top bit at the high end, and push the result. @item @code{rsh_unsigned} (0x0b): @var{a} @var{b} @result{} @var{a>>b} Pop two integers from the stack; let @var{a} be the next-to-top value, and @var{b} be the top value. Shift @var{a} right by @var{b} bits, inserting zero bits at the high end, and push the result. @item @code{log_not} (0x0e): @var{a} @result{} @var{!a} Pop an integer from the stack; if it is zero, push the value one; otherwise, push the value zero. @item @code{bit_and} (0x0f): @var{a} @var{b} @result{} @var{a&b} Pop two integers from the stack, and push their bitwise @code{and}. @item @code{bit_or} (0x10): @var{a} @var{b} @result{} @var{a|b} Pop two integers from the stack, and push their bitwise @code{or}. @item @code{bit_xor} (0x11): @var{a} @var{b} @result{} @var{a^b} Pop two integers from the stack, and push their bitwise exclusive-@code{or}. @item @code{bit_not} (0x12): @var{a} @result{} @var{~a} Pop an integer from the stack, and push its bitwise complement. @item @code{equal} (0x13): @var{a} @var{b} @result{} @var{a=b} Pop two integers from the stack; if they are equal, push the value one; otherwise, push the value zero. @item @code{less_signed} (0x14): @var{a} @var{b} @result{} @var{a<b} Pop two signed integers from the stack; if the next-to-top value is less than the top value, push the value one; otherwise, push the value zero. @item @code{less_unsigned} (0x15): @var{a} @var{b} @result{} @var{a<b} Pop two unsigned integers from the stack; if the next-to-top value is less than the top value, push the value one; otherwise, push the value zero. @item @code{ext} (0x16) @var{n}: @var{a} @result{} @var{a}, sign-extended from @var{n} bits Pop an unsigned value from the stack; treating it as an @var{n}-bit twos-complement value, extend it to full length. This means that all bits to the left of bit @var{n-1} (where the least significant bit is bit 0) are set to the value of bit @var{n-1}. Note that @var{n} may be larger than or equal to the width of the stack elements of the bytecode engine; in this case, the bytecode should have no effect. The number of source bits to preserve, @var{n}, is encoded as a single byte unsigned integer following the @code{ext} bytecode. @item @code{zero_ext} (0x2a) @var{n}: @var{a} @result{} @var{a}, zero-extended from @var{n} bits Pop an unsigned value from the stack; zero all but the bottom @var{n} bits. This means that all bits to the left of bit @var{n-1} (where the least significant bit is bit 0) are set to the value of bit @var{n-1}. The number of source bits to preserve, @var{n}, is encoded as a single byte unsigned integer following the @code{zero_ext} bytecode. @item @code{ref8} (0x17): @var{addr} @result{} @var{a} @itemx @code{ref16} (0x18): @var{addr} @result{} @var{a} @itemx @code{ref32} (0x19): @var{addr} @result{} @var{a} @itemx @code{ref64} (0x1a): @var{addr} @result{} @var{a} Pop an address @var{addr} from the stack. For bytecode @code{ref}@var{n}, fetch an @var{n}-bit value from @var{addr}, using the natural target endianness. Push the fetched value as an unsigned integer. Note that @var{addr} may not be aligned in any particular way; the @code{ref@var{n}} bytecodes should operate correctly for any address. If attempting to access memory at @var{addr} would cause a processor exception of some sort, terminate with an error. @item @code{ref_float} (0x1b): @var{addr} @result{} @var{d} @itemx @code{ref_double} (0x1c): @var{addr} @result{} @var{d} @itemx @code{ref_long_double} (0x1d): @var{addr} @result{} @var{d} @itemx @code{l_to_d} (0x1e): @var{a} @result{} @var{d} @itemx @code{d_to_l} (0x1f): @var{d} @result{} @var{a} Not implemented yet. @item @code{dup} (0x28): @var{a} => @var{a} @var{a} Push another copy of the stack's top element. @item @code{swap} (0x2b): @var{a} @var{b} => @var{b} @var{a} Exchange the top two items on the stack. @item @code{pop} (0x29): @var{a} => Discard the top value on the stack. @item @code{pick} (0x32) @var{n}: @var{a} @dots{} @var{b} => @var{a} @dots{} @var{b} @var{a} Duplicate an item from the stack and push it on the top of the stack. @var{n}, a single byte, indicates the stack item to copy. If @var{n} is zero, this is the same as @code{dup}; if @var{n} is one, it copies the item under the top item, etc. If @var{n} exceeds the number of items on the stack, terminate with an error. @item @code{rot} (0x33): @var{a} @var{b} @var{c} => @var{c} @var{b} @var{a} Rotate the top three items on the stack. @item @code{if_goto} (0x20) @var{offset}: @var{a} @result{} Pop an integer off the stack; if it is non-zero, branch to the given offset in the bytecode string. Otherwise, continue to the next instruction in the bytecode stream. In other words, if @var{a} is non-zero, set the @code{pc} register to @code{start} + @var{offset}. Thus, an offset of zero denotes the beginning of the expression. The @var{offset} is stored as a sixteen-bit unsigned value, stored immediately following the @code{if_goto} bytecode. It is always stored most significant byte first, regardless of the target's normal endianness. The offset is not guaranteed to fall at any particular alignment within the bytecode stream; thus, on machines where fetching a 16-bit on an unaligned address raises an exception, you should fetch the offset one byte at a time. @item @code{goto} (0x21) @var{offset}: @result{} Branch unconditionally to @var{offset}; in other words, set the @code{pc} register to @code{start} + @var{offset}. The offset is stored in the same way as for the @code{if_goto} bytecode. @item @code{const8} (0x22) @var{n}: @result{} @var{n} @itemx @code{const16} (0x23) @var{n}: @result{} @var{n} @itemx @code{const32} (0x24) @var{n}: @result{} @var{n} @itemx @code{const64} (0x25) @var{n}: @result{} @var{n} Push the integer constant @var{n} on the stack, without sign extension. To produce a small negative value, push a small twos-complement value, and then sign-extend it using the @code{ext} bytecode. The constant @var{n} is stored in the appropriate number of bytes following the @code{const}@var{b} bytecode. The constant @var{n} is always stored most significant byte first, regardless of the target's normal endianness. The constant is not guaranteed to fall at any particular alignment within the bytecode stream; thus, on machines where fetching a 16-bit on an unaligned address raises an exception, you should fetch @var{n} one byte at a time. @item @code{reg} (0x26) @var{n}: @result{} @var{a} Push the value of register number @var{n}, without sign extension. The registers are numbered following GDB's conventions. The register number @var{n} is encoded as a 16-bit unsigned integer immediately following the @code{reg} bytecode. It is always stored most significant byte first, regardless of the target's normal endianness. The register number is not guaranteed to fall at any particular alignment within the bytecode stream; thus, on machines where fetching a 16-bit on an unaligned address raises an exception, you should fetch the register number one byte at a time. @item @code{getv} (0x2c) @var{n}: @result{} @var{v} Push the value of trace state variable number @var{n}, without sign extension. The variable number @var{n} is encoded as a 16-bit unsigned integer immediately following the @code{getv} bytecode. It is always stored most significant byte first, regardless of the target's normal endianness. The variable number is not guaranteed to fall at any particular alignment within the bytecode stream; thus, on machines where fetching a 16-bit on an unaligned address raises an exception, you should fetch the register number one byte at a time. @item @code{setv} (0x2d) @var{n}: @result{} @var{v} Set trace state variable number @var{n} to the value found on the top of the stack. The stack is unchanged, so that the value is readily available if the assignment is part of a larger expression. The handling of @var{n} is as described for @code{getv}. @item @code{trace} (0x0c): @var{addr} @var{size} @result{} Record the contents of the @var{size} bytes at @var{addr} in a trace buffer, for later retrieval by GDB. @item @code{trace_quick} (0x0d) @var{size}: @var{addr} @result{} @var{addr} Record the contents of the @var{size} bytes at @var{addr} in a trace buffer, for later retrieval by GDB. @var{size} is a single byte unsigned integer following the @code{trace} opcode. This bytecode is equivalent to the sequence @code{dup const8 @var{size} trace}, but we provide it anyway to save space in bytecode strings. @item @code{trace16} (0x30) @var{size}: @var{addr} @result{} @var{addr} Identical to trace_quick, except that @var{size} is a 16-bit big-endian unsigned integer, not a single byte. This should probably have been named @code{trace_quick16}, for consistency. @item @code{tracev} (0x2e) @var{n}: @result{} @var{a} Record the value of trace state variable number @var{n} in the trace buffer. The handling of @var{n} is as described for @code{getv}. @item @code{tracenz} (0x2f) @var{addr} @var{size} @result{} Record the bytes at @var{addr} in a trace buffer, for later retrieval by GDB. Stop at either the first zero byte, or when @var{size} bytes have been recorded, whichever occurs first. @item @code{printf} (0x34) @var{numargs} @var{string} @result{} Do a formatted print, in the style of the C function @code{printf}). The value of @var{numargs} is the number of arguments to expect on the stack, while @var{string} is the format string, prefixed with a two-byte length. The last byte of the string must be zero, and is included in the length. The format string includes escaped sequences just as it appears in C source, so for instance the format string @code{"\t%d\n"} is six characters long, and the output will consist of a tab character, a decimal number, and a newline. At the top of the stack, above the values to be printed, this bytecode will pop a ``function'' and ``channel''. If the function is nonzero, then the target may treat it as a function and call it, passing the channel as a first argument, as with the C function @code{fprintf}. If the function is zero, then the target may simply call a standard formatted print function of its choice. In all, this bytecode pops 2 + @var{numargs} stack elements, and pushes nothing. @item @code{end} (0x27): @result{} Stop executing bytecode; the result should be the top element of the stack. If the purpose of the expression was to compute an lvalue or a range of memory, then the next-to-top of the stack is the lvalue's address, and the top of the stack is the lvalue's size, in bytes. @end table @node Using Agent Expressions @section Using Agent Expressions Agent expressions can be used in several different ways by @value{GDBN}, and the debugger can generate different bytecode sequences as appropriate. One possibility is to do expression evaluation on the target rather than the host, such as for the conditional of a conditional tracepoint. In such a case, @value{GDBN} compiles the source expression into a bytecode sequence that simply gets values from registers or memory, does arithmetic, and returns a result. Another way to use agent expressions is for tracepoint data collection. @value{GDBN} generates a different bytecode sequence for collection; in addition to bytecodes that do the calculation, @value{GDBN} adds @code{trace} bytecodes to save the pieces of memory that were used. @itemize @bullet @item The user selects trace points in the program's code at which GDB should collect data. @item The user specifies expressions to evaluate at each trace point. These expressions may denote objects in memory, in which case those objects' contents are recorded as the program runs, or computed values, in which case the values themselves are recorded. @item GDB transmits the tracepoints and their associated expressions to the GDB agent, running on the debugging target. @item The agent arranges to be notified when a trace point is hit. @item When execution on the target reaches a trace point, the agent evaluates the expressions associated with that trace point, and records the resulting values and memory ranges. @item Later, when the user selects a given trace event and inspects the objects and expression values recorded, GDB talks to the agent to retrieve recorded data as necessary to meet the user's requests. If the user asks to see an object whose contents have not been recorded, GDB reports an error. @end itemize @node Varying Target Capabilities @section Varying Target Capabilities Some targets don't support floating-point, and some would rather not have to deal with @code{long long} operations. Also, different targets will have different stack sizes, and different bytecode buffer lengths. Thus, GDB needs a way to ask the target about itself. We haven't worked out the details yet, but in general, GDB should be able to send the target a packet asking it to describe itself. The reply should be a packet whose length is explicit, so we can add new information to the packet in future revisions of the agent, without confusing old versions of GDB, and it should contain a version number. It should contain at least the following information: @itemize @bullet @item whether floating point is supported @item whether @code{long long} is supported @item maximum acceptable size of bytecode stack @item maximum acceptable length of bytecode expressions @item which registers are actually available for collection @item whether the target supports disabled tracepoints @end itemize @node Rationale @section Rationale Some of the design decisions apparent above are arguable. @table @b @item What about stack overflow/underflow? GDB should be able to query the target to discover its stack size. Given that information, GDB can determine at translation time whether a given expression will overflow the stack. But this spec isn't about what kinds of error-checking GDB ought to do. @item Why are you doing everything in LONGEST? Speed isn't important, but agent code size is; using LONGEST brings in a bunch of support code to do things like division, etc. So this is a serious concern. First, note that you don't need different bytecodes for different operand sizes. You can generate code without @emph{knowing} how big the stack elements actually are on the target. If the target only supports 32-bit ints, and you don't send any 64-bit bytecodes, everything just works. The observation here is that the MIPS and the Alpha have only fixed-size registers, and you can still get C's semantics even though most instructions only operate on full-sized words. You just need to make sure everything is properly sign-extended at the right times. So there is no need for 32- and 64-bit variants of the bytecodes. Just implement everything using the largest size you support. GDB should certainly check to see what sizes the target supports, so the user can get an error earlier, rather than later. But this information is not necessary for correctness. @item Why don't you have @code{>} or @code{<=} operators? I want to keep the interpreter small, and we don't need them. We can combine the @code{less_} opcodes with @code{log_not}, and swap the order of the operands, yielding all four asymmetrical comparison operators. For example, @code{(x <= y)} is @code{! (x > y)}, which is @code{! (y < x)}. @item Why do you have @code{log_not}? @itemx Why do you have @code{ext}? @itemx Why do you have @code{zero_ext}? These are all easily synthesized from other instructions, but I expect them to be used frequently, and they're simple, so I include them to keep bytecode strings short. @code{log_not} is equivalent to @code{const8 0 equal}; it's used in half the relational operators. @code{ext @var{n}} is equivalent to @code{const8 @var{s-n} lsh const8 @var{s-n} rsh_signed}, where @var{s} is the size of the stack elements; it follows @code{ref@var{m}} and @var{reg} bytecodes when the value should be signed. See the next bulleted item. @code{zero_ext @var{n}} is equivalent to @code{const@var{m} @var{mask} log_and}; it's used whenever we push the value of a register, because we can't assume the upper bits of the register aren't garbage. @item Why not have sign-extending variants of the @code{ref} operators? Because that would double the number of @code{ref} operators, and we need the @code{ext} bytecode anyway for accessing bitfields. @item Why not have constant-address variants of the @code{ref} operators? Because that would double the number of @code{ref} operators again, and @code{const32 @var{address} ref32} is only one byte longer. @item Why do the @code{ref@var{n}} operators have to support unaligned fetches? GDB will generate bytecode that fetches multi-byte values at unaligned addresses whenever the executable's debugging information tells it to. Furthermore, GDB does not know the value the pointer will have when GDB generates the bytecode, so it cannot determine whether a particular fetch will be aligned or not. In particular, structure bitfields may be several bytes long, but follow no alignment rules; members of packed structures are not necessarily aligned either. In general, there are many cases where unaligned references occur in correct C code, either at the programmer's explicit request, or at the compiler's discretion. Thus, it is simpler to make the GDB agent bytecodes work correctly in all circumstances than to make GDB guess in each case whether the compiler did the usual thing. @item Why are there no side-effecting operators? Because our current client doesn't want them? That's a cheap answer. I think the real answer is that I'm afraid of implementing function calls. We should re-visit this issue after the present contract is delivered. @item Why aren't the @code{goto} ops PC-relative? The interpreter has the base address around anyway for PC bounds checking, and it seemed simpler. @item Why is there only one offset size for the @code{goto} ops? Offsets are currently sixteen bits. I'm not happy with this situation either: Suppose we have multiple branch ops with different offset sizes. As I generate code left-to-right, all my jumps are forward jumps (there are no loops in expressions), so I never know the target when I emit the jump opcode. Thus, I have to either always assume the largest offset size, or do jump relaxation on the code after I generate it, which seems like a big waste of time. I can imagine a reasonable expression being longer than 256 bytes. I can't imagine one being longer than 64k. Thus, we need 16-bit offsets. This kind of reasoning is so bogus, but relaxation is pathetic. The other approach would be to generate code right-to-left. Then I'd always know my offset size. That might be fun. @item Where is the function call bytecode? When we add side-effects, we should add this. @item Why does the @code{reg} bytecode take a 16-bit register number? Intel's IA-64 architecture has 128 general-purpose registers, and 128 floating-point registers, and I'm sure it has some random control registers. @item Why do we need @code{trace} and @code{trace_quick}? Because GDB needs to record all the memory contents and registers an expression touches. If the user wants to evaluate an expression @code{x->y->z}, the agent must record the values of @code{x} and @code{x->y} as well as the value of @code{x->y->z}. @item Don't the @code{trace} bytecodes make the interpreter less general? They do mean that the interpreter contains special-purpose code, but that doesn't mean the interpreter can only be used for that purpose. If an expression doesn't use the @code{trace} bytecodes, they don't get in its way. @item Why doesn't @code{trace_quick} consume its arguments the way everything else does? In general, you do want your operators to consume their arguments; it's consistent, and generally reduces the amount of stack rearrangement necessary. However, @code{trace_quick} is a kludge to save space; it only exists so we needn't write @code{dup const8 @var{SIZE} trace} before every memory reference. Therefore, it's okay for it not to consume its arguments; it's meant for a specific context in which we know exactly what it should do with the stack. If we're going to have a kludge, it should be an effective kludge. @item Why does @code{trace16} exist? That opcode was added by the customer that contracted Cygnus for the data tracing work. I personally think it is unnecessary; objects that large will be quite rare, so it is okay to use @code{dup const16 @var{size} trace} in those cases. Whatever we decide to do with @code{trace16}, we should at least leave opcode 0x30 reserved, to remain compatible with the customer who added it. @end table ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/gdb/doc/all-cfg.texi������������������������������������������������������������������0000644�0001750�0001750�00000002513�12250770607�015573� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c GDB MANUAL configuration file. @c @c Copyright (C) 1993-2013 Free Software Foundation, Inc. @c @c NOTE: While the GDB manual is configurable (by changing these @c switches), its configuration is ***NOT*** automatically tied in to @c source configuration---because the authors expect that, save in @c unusual cases, the most inclusive form of the manual is appropriate @c no matter how the program itself is configured. @c @c The only automatically-varying variable is the GDB version number, @c which the Makefile rewrites based on the VERSION variable from @c `../Makefile.in'. @c @c GDB version number is recorded in the variable GDBVN @include GDBvn.texi @c @c ---------------------------------------------------------------------- @c PLATFORM FLAGS: @set GENERIC @c @c HP PA-RISC target ONLY: @clear HPPA @c @c Refrain from discussing how to configure sw and format doc? @clear PRECONFIGURED @c @c ---------------------------------------------------------------------- @c STRINGS: @c @c Name of GDB program. Used also for (gdb) prompt string. @set GDBP gdb @c @c Name of GDB product. Used in running text. @set GDBN @sc{gdb} @c @c Name of host. Should not be used in generic configs, but generic @c value may catch some flubs. @set HOST machine specific @c @c Name of GCC product @set NGCC @sc{gcc} @c @c Name of GCC program @set GCC gcc �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/gdb/doc/gdb.info-2��������������������������������������������������������������������0000644�0001750�0001750�00001132051�12250773371�015146� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is gdb.info, produced by makeinfo version 4.13 from ./gdb.texinfo. INFO-DIR-SECTION Software development START-INFO-DIR-ENTRY * Gdb: (gdb). The GNU debugger. END-INFO-DIR-ENTRY Copyright (C) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom." This file documents the GNU debugger GDB. This is the Tenth Edition, of `Debugging with GDB: the GNU Source-Level Debugger' for GDB (GDB) Version 7.6.2. Copyright (C) 1988-2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom."  File: gdb.info, Node: Memory, Next: Auto Display, Prev: Output Formats, Up: Data 10.6 Examining Memory ===================== You can use the command `x' (for "examine") to examine memory in any of several formats, independently of your program's data types. `x/NFU ADDR' `x ADDR' `x' Use the `x' command to examine memory. N, F, and U are all optional parameters that specify how much memory to display and how to format it; ADDR is an expression giving the address where you want to start displaying memory. If you use defaults for NFU, you need not type the slash `/'. Several commands set convenient defaults for ADDR. N, the repeat count The repeat count is a decimal integer; the default is 1. It specifies how much memory (counting by units U) to display. F, the display format The display format is one of the formats used by `print' (`x', `d', `u', `o', `t', `a', `c', `f', `s'), and in addition `i' (for machine instructions). The default is `x' (hexadecimal) initially. The default changes each time you use either `x' or `print'. U, the unit size The unit size is any of `b' Bytes. `h' Halfwords (two bytes). `w' Words (four bytes). This is the initial default. `g' Giant words (eight bytes). Each time you specify a unit size with `x', that size becomes the default unit the next time you use `x'. For the `i' format, the unit size is ignored and is normally not written. For the `s' format, the unit size defaults to `b', unless it is explicitly given. Use `x /hs' to display 16-bit char strings and `x /ws' to display 32-bit strings. The next use of `x /s' will again display 8-bit strings. Note that the results depend on the programming language of the current compilation unit. If the language is C, the `s' modifier will use the UTF-16 encoding while `w' will use UTF-32. The encoding is set by the programming language and cannot be altered. ADDR, starting display address ADDR is the address where you want GDB to begin displaying memory. The expression need not have a pointer value (though it may); it is always interpreted as an integer address of a byte of memory. *Note Expressions: Expressions, for more information on expressions. The default for ADDR is usually just after the last address examined--but several other commands also set the default address: `info breakpoints' (to the address of the last breakpoint listed), `info line' (to the starting address of a line), and `print' (if you use it to display a value from memory). For example, `x/3uh 0x54320' is a request to display three halfwords (`h') of memory, formatted as unsigned decimal integers (`u'), starting at address `0x54320'. `x/4xw $sp' prints the four words (`w') of memory above the stack pointer (here, `$sp'; *note Registers: Registers.) in hexadecimal (`x'). Since the letters indicating unit sizes are all distinct from the letters specifying output formats, you do not have to remember whether unit size or format comes first; either order works. The output specifications `4xw' and `4wx' mean exactly the same thing. (However, the count N must come first; `wx4' does not work.) Even though the unit size U is ignored for the formats `s' and `i', you might still want to use a count N; for example, `3i' specifies that you want to see three machine instructions, including any operands. For convenience, especially when used with the `display' command, the `i' format also prints branch delay slot instructions, if any, beyond the count specified, which immediately follow the last instruction that is within the count. The command `disassemble' gives an alternative way of inspecting machine instructions; see *note Source and Machine Code: Machine Code. All the defaults for the arguments to `x' are designed to make it easy to continue scanning memory with minimal specifications each time you use `x'. For example, after you have inspected three machine instructions with `x/3i ADDR', you can inspect the next seven with just `x/7'. If you use <RET> to repeat the `x' command, the repeat count N is used again; the other arguments default as for successive uses of `x'. When examining machine instructions, the instruction at current program counter is shown with a `=>' marker. For example: (gdb) x/5i $pc-6 0x804837f <main+11>: mov %esp,%ebp 0x8048381 <main+13>: push %ecx 0x8048382 <main+14>: sub $0x4,%esp => 0x8048385 <main+17>: movl $0x8048460,(%esp) 0x804838c <main+24>: call 0x80482d4 <puts@plt> The addresses and contents printed by the `x' command are not saved in the value history because there is often too much of them and they would get in the way. Instead, GDB makes these values available for subsequent use in expressions as values of the convenience variables `$_' and `$__'. After an `x' command, the last address examined is available for use in expressions in the convenience variable `$_'. The contents of that address, as examined, are available in the convenience variable `$__'. If the `x' command has a repeat count, the address and contents saved are from the last memory unit printed; this is not the same as the last address printed if several units were printed on the last line of output. When you are debugging a program running on a remote target machine (*note Remote Debugging::), you may wish to verify the program's image in the remote machine's memory against the executable file you downloaded to the target. The `compare-sections' command is provided for such situations. `compare-sections [SECTION-NAME]' Compare the data of a loadable section SECTION-NAME in the executable file of the program being debugged with the same section in the remote machine's memory, and report any mismatches. With no arguments, compares all loadable sections. This command's availability depends on the target's support for the `"qCRC"' remote request.  File: gdb.info, Node: Auto Display, Next: Print Settings, Prev: Memory, Up: Data 10.7 Automatic Display ====================== If you find that you want to print the value of an expression frequently (to see how it changes), you might want to add it to the "automatic display list" so that GDB prints its value each time your program stops. Each expression added to the list is given a number to identify it; to remove an expression from the list, you specify that number. The automatic display looks like this: 2: foo = 38 3: bar[5] = (struct hack *) 0x3804 This display shows item numbers, expressions and their current values. As with displays you request manually using `x' or `print', you can specify the output format you prefer; in fact, `display' decides whether to use `print' or `x' depending your format specification--it uses `x' if you specify either the `i' or `s' format, or a unit size; otherwise it uses `print'. `display EXPR' Add the expression EXPR to the list of expressions to display each time your program stops. *Note Expressions: Expressions. `display' does not repeat if you press <RET> again after using it. `display/FMT EXPR' For FMT specifying only a display format and not a size or count, add the expression EXPR to the auto-display list but arrange to display it each time in the specified format FMT. *Note Output Formats: Output Formats. `display/FMT ADDR' For FMT `i' or `s', or including a unit-size or a number of units, add the expression ADDR as a memory address to be examined each time your program stops. Examining means in effect doing `x/FMT ADDR'. *Note Examining Memory: Memory. For example, `display/i $pc' can be helpful, to see the machine instruction about to be executed each time execution stops (`$pc' is a common name for the program counter; *note Registers: Registers.). `undisplay DNUMS...' `delete display DNUMS...' Remove items from the list of expressions to display. Specify the numbers of the displays that you want affected with the command argument DNUMS. It can be a single display number, one of the numbers shown in the first field of the `info display' display; or it could be a range of display numbers, as in `2-4'. `undisplay' does not repeat if you press <RET> after using it. (Otherwise you would just get the error `No display number ...'.) `disable display DNUMS...' Disable the display of item numbers DNUMS. A disabled display item is not printed automatically, but is not forgotten. It may be enabled again later. Specify the numbers of the displays that you want affected with the command argument DNUMS. It can be a single display number, one of the numbers shown in the first field of the `info display' display; or it could be a range of display numbers, as in `2-4'. `enable display DNUMS...' Enable display of item numbers DNUMS. It becomes effective once again in auto display of its expression, until you specify otherwise. Specify the numbers of the displays that you want affected with the command argument DNUMS. It can be a single display number, one of the numbers shown in the first field of the `info display' display; or it could be a range of display numbers, as in `2-4'. `display' Display the current values of the expressions on the list, just as is done when your program stops. `info display' Print the list of expressions previously set up to display automatically, each one with its item number, but without showing the values. This includes disabled expressions, which are marked as such. It also includes expressions which would not be displayed right now because they refer to automatic variables not currently available. If a display expression refers to local variables, then it does not make sense outside the lexical context for which it was set up. Such an expression is disabled when execution enters a context where one of its variables is not defined. For example, if you give the command `display last_char' while inside a function with an argument `last_char', GDB displays this argument while your program continues to stop inside that function. When it stops elsewhere--where there is no variable `last_char'--the display is disabled automatically. The next time your program stops where `last_char' is meaningful, you can enable the display expression once again.  File: gdb.info, Node: Print Settings, Next: Pretty Printing, Prev: Auto Display, Up: Data 10.8 Print Settings =================== GDB provides the following ways to control how arrays, structures, and symbols are printed. These settings are useful for debugging programs in any language: `set print address' `set print address on' GDB prints memory addresses showing the location of stack traces, structure values, pointer values, breakpoints, and so forth, even when it also displays the contents of those addresses. The default is `on'. For example, this is what a stack frame display looks like with `set print address on': (gdb) f #0 set_quotes (lq=0x34c78 "<<", rq=0x34c88 ">>") at input.c:530 530 if (lquote != def_lquote) `set print address off' Do not print addresses when displaying their contents. For example, this is the same stack frame displayed with `set print address off': (gdb) set print addr off (gdb) f #0 set_quotes (lq="<<", rq=">>") at input.c:530 530 if (lquote != def_lquote) You can use `set print address off' to eliminate all machine dependent displays from the GDB interface. For example, with `print address off', you should get the same text for backtraces on all machines--whether or not they involve pointer arguments. `show print address' Show whether or not addresses are to be printed. When GDB prints a symbolic address, it normally prints the closest earlier symbol plus an offset. If that symbol does not uniquely identify the address (for example, it is a name whose scope is a single source file), you may need to clarify. One way to do this is with `info line', for example `info line *0x4537'. Alternately, you can set GDB to print the source file and line number when it prints a symbolic address: `set print symbol-filename on' Tell GDB to print the source file name and line number of a symbol in the symbolic form of an address. `set print symbol-filename off' Do not print source file name and line number of a symbol. This is the default. `show print symbol-filename' Show whether or not GDB will print the source file name and line number of a symbol in the symbolic form of an address. Another situation where it is helpful to show symbol filenames and line numbers is when disassembling code; GDB shows you the line number and source file that corresponds to each instruction. Also, you may wish to see the symbolic form only if the address being printed is reasonably close to the closest earlier symbol: `set print max-symbolic-offset MAX-OFFSET' Tell GDB to only display the symbolic form of an address if the offset between the closest earlier symbol and the address is less than MAX-OFFSET. The default is 0, which tells GDB to always print the symbolic form of an address if any symbol precedes it. `show print max-symbolic-offset' Ask how large the maximum offset is that GDB prints in a symbolic address. If you have a pointer and you are not sure where it points, try `set print symbol-filename on'. Then you can determine the name and source file location of the variable where it points, using `p/a POINTER'. This interprets the address in symbolic form. For example, here GDB shows that a variable `ptt' points at another variable `t', defined in `hi2.c': (gdb) set print symbol-filename on (gdb) p/a ptt $4 = 0xe008 <t in hi2.c> _Warning:_ For pointers that point to a local variable, `p/a' does not show the symbol name and filename of the referent, even with the appropriate `set print' options turned on. You can also enable `/a'-like formatting all the time using `set print symbol on': `set print symbol on' Tell GDB to print the symbol corresponding to an address, if one exists. `set print symbol off' Tell GDB not to print the symbol corresponding to an address. In this mode, GDB will still print the symbol corresponding to pointers to functions. This is the default. `show print symbol' Show whether GDB will display the symbol corresponding to an address. Other settings control how different kinds of objects are printed: `set print array' `set print array on' Pretty print arrays. This format is more convenient to read, but uses more space. The default is off. `set print array off' Return to compressed format for arrays. `show print array' Show whether compressed or pretty format is selected for displaying arrays. `set print array-indexes' `set print array-indexes on' Print the index of each element when displaying arrays. May be more convenient to locate a given element in the array or quickly find the index of a given element in that printed array. The default is off. `set print array-indexes off' Stop printing element indexes when displaying arrays. `show print array-indexes' Show whether the index of each element is printed when displaying arrays. `set print elements NUMBER-OF-ELEMENTS' Set a limit on how many elements of an array GDB will print. If GDB is printing a large array, it stops printing after it has printed the number of elements set by the `set print elements' command. This limit also applies to the display of strings. When GDB starts, this limit is set to 200. Setting NUMBER-OF-ELEMENTS to zero means that the printing is unlimited. `show print elements' Display the number of elements of a large array that GDB will print. If the number is 0, then the printing is unlimited. `set print frame-arguments VALUE' This command allows to control how the values of arguments are printed when the debugger prints a frame (*note Frames::). The possible values are: `all' The values of all arguments are printed. `scalars' Print the value of an argument only if it is a scalar. The value of more complex arguments such as arrays, structures, unions, etc, is replaced by `...'. This is the default. Here is an example where only scalar arguments are shown: #1 0x08048361 in call_me (i=3, s=..., ss=0xbf8d508c, u=..., e=green) at frame-args.c:23 `none' None of the argument values are printed. Instead, the value of each argument is replaced by `...'. In this case, the example above now becomes: #1 0x08048361 in call_me (i=..., s=..., ss=..., u=..., e=...) at frame-args.c:23 By default, only scalar arguments are printed. This command can be used to configure the debugger to print the value of all arguments, regardless of their type. However, it is often advantageous to not print the value of more complex parameters. For instance, it reduces the amount of information printed in each frame, making the backtrace more readable. Also, it improves performance when displaying Ada frames, because the computation of large arguments can sometimes be CPU-intensive, especially in large applications. Setting `print frame-arguments' to `scalars' (the default) or `none' avoids this computation, thus speeding up the display of each Ada frame. `show print frame-arguments' Show how the value of arguments should be displayed when printing a frame. `set print entry-values VALUE' Set printing of frame argument values at function entry. In some cases GDB can determine the value of function argument which was passed by the function caller, even if the value was modified inside the called function and therefore is different. With optimized code, the current value could be unavailable, but the entry value may still be known. The default value is `default' (see below for its description). Older GDB behaved as with the setting `no'. Compilers not supporting this feature will behave in the `default' setting the same way as with the `no' setting. This functionality is currently supported only by DWARF 2 debugging format and the compiler has to produce `DW_TAG_GNU_call_site' tags. With GCC, you need to specify `-O -g' during compilation, to get this information. The VALUE parameter can be one of the following: `no' Print only actual parameter values, never print values from function entry point. #0 equal (val=5) #0 different (val=6) #0 lost (val=<optimized out>) #0 born (val=10) #0 invalid (val=<optimized out>) `only' Print only parameter values from function entry point. The actual parameter values are never printed. #0 equal (val@entry=5) #0 different (val@entry=5) #0 lost (val@entry=5) #0 born (val@entry=<optimized out>) #0 invalid (val@entry=<optimized out>) `preferred' Print only parameter values from function entry point. If value from function entry point is not known while the actual value is known, print the actual value for such parameter. #0 equal (val@entry=5) #0 different (val@entry=5) #0 lost (val@entry=5) #0 born (val=10) #0 invalid (val@entry=<optimized out>) `if-needed' Print actual parameter values. If actual parameter value is not known while value from function entry point is known, print the entry point value for such parameter. #0 equal (val=5) #0 different (val=6) #0 lost (val@entry=5) #0 born (val=10) #0 invalid (val=<optimized out>) `both' Always print both the actual parameter value and its value from function entry point, even if values of one or both are not available due to compiler optimizations. #0 equal (val=5, val@entry=5) #0 different (val=6, val@entry=5) #0 lost (val=<optimized out>, val@entry=5) #0 born (val=10, val@entry=<optimized out>) #0 invalid (val=<optimized out>, val@entry=<optimized out>) `compact' Print the actual parameter value if it is known and also its value from function entry point if it is known. If neither is known, print for the actual value `<optimized out>'. If not in MI mode (*note GDB/MI::) and if both values are known and identical, print the shortened `param=param@entry=VALUE' notation. #0 equal (val=val@entry=5) #0 different (val=6, val@entry=5) #0 lost (val@entry=5) #0 born (val=10) #0 invalid (val=<optimized out>) `default' Always print the actual parameter value. Print also its value from function entry point, but only if it is known. If not in MI mode (*note GDB/MI::) and if both values are known and identical, print the shortened `param=param@entry=VALUE' notation. #0 equal (val=val@entry=5) #0 different (val=6, val@entry=5) #0 lost (val=<optimized out>, val@entry=5) #0 born (val=10) #0 invalid (val=<optimized out>) For analysis messages on possible failures of frame argument values at function entry resolution see *note set debug entry-values::. `show print entry-values' Show the method being used for printing of frame argument values at function entry. `set print repeats' Set the threshold for suppressing display of repeated array elements. When the number of consecutive identical elements of an array exceeds the threshold, GDB prints the string `"<repeats N times>"', where N is the number of identical repetitions, instead of displaying the identical elements themselves. Setting the threshold to zero will cause all elements to be individually printed. The default threshold is 10. `show print repeats' Display the current threshold for printing repeated identical elements. `set print null-stop' Cause GDB to stop printing the characters of an array when the first NULL is encountered. This is useful when large arrays actually contain only short strings. The default is off. `show print null-stop' Show whether GDB stops printing an array on the first NULL character. `set print pretty on' Cause GDB to print structures in an indented format with one member per line, like this: $1 = { next = 0x0, flags = { sweet = 1, sour = 1 }, meat = 0x54 "Pork" } `set print pretty off' Cause GDB to print structures in a compact format, like this: $1 = {next = 0x0, flags = {sweet = 1, sour = 1}, \ meat = 0x54 "Pork"} This is the default format. `show print pretty' Show which format GDB is using to print structures. `set print sevenbit-strings on' Print using only seven-bit characters; if this option is set, GDB displays any eight-bit characters (in strings or character values) using the notation `\'NNN. This setting is best if you are working in English (ASCII) and you use the high-order bit of characters as a marker or "meta" bit. `set print sevenbit-strings off' Print full eight-bit characters. This allows the use of more international character sets, and is the default. `show print sevenbit-strings' Show whether or not GDB is printing only seven-bit characters. `set print union on' Tell GDB to print unions which are contained in structures and other unions. This is the default setting. `set print union off' Tell GDB not to print unions which are contained in structures and other unions. GDB will print `"{...}"' instead. `show print union' Ask GDB whether or not it will print unions which are contained in structures and other unions. For example, given the declarations typedef enum {Tree, Bug} Species; typedef enum {Big_tree, Acorn, Seedling} Tree_forms; typedef enum {Caterpillar, Cocoon, Butterfly} Bug_forms; struct thing { Species it; union { Tree_forms tree; Bug_forms bug; } form; }; struct thing foo = {Tree, {Acorn}}; with `set print union on' in effect `p foo' would print $1 = {it = Tree, form = {tree = Acorn, bug = Cocoon}} and with `set print union off' in effect it would print $1 = {it = Tree, form = {...}} `set print union' affects programs written in C-like languages and in Pascal. These settings are of interest when debugging C++ programs: `set print demangle' `set print demangle on' Print C++ names in their source form rather than in the encoded ("mangled") form passed to the assembler and linker for type-safe linkage. The default is on. `show print demangle' Show whether C++ names are printed in mangled or demangled form. `set print asm-demangle' `set print asm-demangle on' Print C++ names in their source form rather than their mangled form, even in assembler code printouts such as instruction disassemblies. The default is off. `show print asm-demangle' Show whether C++ names in assembly listings are printed in mangled or demangled form. `set demangle-style STYLE' Choose among several encoding schemes used by different compilers to represent C++ names. The choices for STYLE are currently: `auto' Allow GDB to choose a decoding style by inspecting your program. This is the default. `gnu' Decode based on the GNU C++ compiler (`g++') encoding algorithm. `hp' Decode based on the HP ANSI C++ (`aCC') encoding algorithm. `lucid' Decode based on the Lucid C++ compiler (`lcc') encoding algorithm. `arm' Decode using the algorithm in the `C++ Annotated Reference Manual'. *Warning:* this setting alone is not sufficient to allow debugging `cfront'-generated executables. GDB would require further enhancement to permit that. If you omit STYLE, you will see a list of possible formats. `show demangle-style' Display the encoding style currently in use for decoding C++ symbols. `set print object' `set print object on' When displaying a pointer to an object, identify the _actual_ (derived) type of the object rather than the _declared_ type, using the virtual function table. Note that the virtual function table is required--this feature can only work for objects that have run-time type identification; a single virtual method in the object's declared type is sufficient. Note that this setting is also taken into account when working with variable objects via MI (*note GDB/MI::). `set print object off' Display only the declared type of objects, without reference to the virtual function table. This is the default setting. `show print object' Show whether actual, or declared, object types are displayed. `set print static-members' `set print static-members on' Print static members when displaying a C++ object. The default is on. `set print static-members off' Do not print static members when displaying a C++ object. `show print static-members' Show whether C++ static members are printed or not. `set print pascal_static-members' `set print pascal_static-members on' Print static members when displaying a Pascal object. The default is on. `set print pascal_static-members off' Do not print static members when displaying a Pascal object. `show print pascal_static-members' Show whether Pascal static members are printed or not. `set print vtbl' `set print vtbl on' Pretty print C++ virtual function tables. The default is off. (The `vtbl' commands do not work on programs compiled with the HP ANSI C++ compiler (`aCC').) `set print vtbl off' Do not pretty print C++ virtual function tables. `show print vtbl' Show whether C++ virtual function tables are pretty printed, or not.  File: gdb.info, Node: Pretty Printing, Next: Value History, Prev: Print Settings, Up: Data 10.9 Pretty Printing ==================== GDB provides a mechanism to allow pretty-printing of values using Python code. It greatly simplifies the display of complex objects. This mechanism works for both MI and the CLI. * Menu: * Pretty-Printer Introduction:: Introduction to pretty-printers * Pretty-Printer Example:: An example pretty-printer * Pretty-Printer Commands:: Pretty-printer commands  File: gdb.info, Node: Pretty-Printer Introduction, Next: Pretty-Printer Example, Up: Pretty Printing 10.9.1 Pretty-Printer Introduction ---------------------------------- When GDB prints a value, it first sees if there is a pretty-printer registered for the value. If there is then GDB invokes the pretty-printer to print the value. Otherwise the value is printed normally. Pretty-printers are normally named. This makes them easy to manage. The `info pretty-printer' command will list all the installed pretty-printers with their names. If a pretty-printer can handle multiple data types, then its "subprinters" are the printers for the individual data types. Each such subprinter has its own name. The format of the name is PRINTER-NAME;SUBPRINTER-NAME. Pretty-printers are installed by "registering" them with GDB. Typically they are automatically loaded and registered when the corresponding debug information is loaded, thus making them available without having to do anything special. There are three places where a pretty-printer can be registered. * Pretty-printers registered globally are available when debugging all inferiors. * Pretty-printers registered with a program space are available only when debugging that program. *Note Progspaces In Python::, for more details on program spaces in Python. * Pretty-printers registered with an objfile are loaded and unloaded with the corresponding objfile (e.g., shared library). *Note Objfiles In Python::, for more details on objfiles in Python. *Note Selecting Pretty-Printers::, for further information on how pretty-printers are selected, *Note Writing a Pretty-Printer::, for implementing pretty printers for new types.  File: gdb.info, Node: Pretty-Printer Example, Next: Pretty-Printer Commands, Prev: Pretty-Printer Introduction, Up: Pretty Printing 10.9.2 Pretty-Printer Example ----------------------------- Here is how a C++ `std::string' looks without a pretty-printer: (gdb) print s $1 = { static npos = 4294967295, _M_dataplus = { <std::allocator<char>> = { <__gnu_cxx::new_allocator<char>> = { <No data fields>}, <No data fields> }, members of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider: _M_p = 0x804a014 "abcd" } } With a pretty-printer for `std::string' only the contents are printed: (gdb) print s $2 = "abcd"  File: gdb.info, Node: Pretty-Printer Commands, Prev: Pretty-Printer Example, Up: Pretty Printing 10.9.3 Pretty-Printer Commands ------------------------------ `info pretty-printer [OBJECT-REGEXP [NAME-REGEXP]]' Print the list of installed pretty-printers. This includes disabled pretty-printers, which are marked as such. OBJECT-REGEXP is a regular expression matching the objects whose pretty-printers to list. Objects can be `global', the program space's file (*note Progspaces In Python::), and the object files within that program space (*note Objfiles In Python::). *Note Selecting Pretty-Printers::, for details on how GDB looks up a printer from these three objects. NAME-REGEXP is a regular expression matching the name of the printers to list. `disable pretty-printer [OBJECT-REGEXP [NAME-REGEXP]]' Disable pretty-printers matching OBJECT-REGEXP and NAME-REGEXP. A disabled pretty-printer is not forgotten, it may be enabled again later. `enable pretty-printer [OBJECT-REGEXP [NAME-REGEXP]]' Enable pretty-printers matching OBJECT-REGEXP and NAME-REGEXP. Example: Suppose we have three pretty-printers installed: one from library1.so named `foo' that prints objects of type `foo', and another from library2.so named `bar' that prints two types of objects, `bar1' and `bar2'. (gdb) info pretty-printer library1.so: foo library2.so: bar bar1 bar2 (gdb) info pretty-printer library2 library2.so: bar bar1 bar2 (gdb) disable pretty-printer library1 1 printer disabled 2 of 3 printers enabled (gdb) info pretty-printer library1.so: foo [disabled] library2.so: bar bar1 bar2 (gdb) disable pretty-printer library2 bar:bar1 1 printer disabled 1 of 3 printers enabled (gdb) info pretty-printer library2 library1.so: foo [disabled] library2.so: bar bar1 [disabled] bar2 (gdb) disable pretty-printer library2 bar 1 printer disabled 0 of 3 printers enabled (gdb) info pretty-printer library2 library1.so: foo [disabled] library2.so: bar [disabled] bar1 [disabled] bar2 Note that for `bar' the entire printer can be disabled, as can each individual subprinter.  File: gdb.info, Node: Value History, Next: Convenience Vars, Prev: Pretty Printing, Up: Data 10.10 Value History =================== Values printed by the `print' command are saved in the GDB "value history". This allows you to refer to them in other expressions. Values are kept until the symbol table is re-read or discarded (for example with the `file' or `symbol-file' commands). When the symbol table changes, the value history is discarded, since the values may contain pointers back to the types defined in the symbol table. The values printed are given "history numbers" by which you can refer to them. These are successive integers starting with one. `print' shows you the history number assigned to a value by printing `$NUM = ' before the value; here NUM is the history number. To refer to any previous value, use `$' followed by the value's history number. The way `print' labels its output is designed to remind you of this. Just `$' refers to the most recent value in the history, and `$$' refers to the value before that. `$$N' refers to the Nth value from the end; `$$2' is the value just prior to `$$', `$$1' is equivalent to `$$', and `$$0' is equivalent to `$'. For example, suppose you have just printed a pointer to a structure and want to see the contents of the structure. It suffices to type p *$ If you have a chain of structures where the component `next' points to the next one, you can print the contents of the next one with this: p *$.next You can print successive links in the chain by repeating this command--which you can do by just typing <RET>. Note that the history records values, not expressions. If the value of `x' is 4 and you type these commands: print x set x=5 then the value recorded in the value history by the `print' command remains 4 even though the value of `x' has changed. `show values' Print the last ten values in the value history, with their item numbers. This is like `p $$9' repeated ten times, except that `show values' does not change the history. `show values N' Print ten history values centered on history item number N. `show values +' Print ten history values just after the values last printed. If no more values are available, `show values +' produces no display. Pressing <RET> to repeat `show values N' has exactly the same effect as `show values +'.  File: gdb.info, Node: Convenience Vars, Next: Convenience Funs, Prev: Value History, Up: Data 10.11 Convenience Variables =========================== GDB provides "convenience variables" that you can use within GDB to hold on to a value and refer to it later. These variables exist entirely within GDB; they are not part of your program, and setting a convenience variable has no direct effect on further execution of your program. That is why you can use them freely. Convenience variables are prefixed with `$'. Any name preceded by `$' can be used for a convenience variable, unless it is one of the predefined machine-specific register names (*note Registers: Registers.). (Value history references, in contrast, are _numbers_ preceded by `$'. *Note Value History: Value History.) You can save a value in a convenience variable with an assignment expression, just as you would set a variable in your program. For example: set $foo = *object_ptr would save in `$foo' the value contained in the object pointed to by `object_ptr'. Using a convenience variable for the first time creates it, but its value is `void' until you assign a new value. You can alter the value with another assignment at any time. Convenience variables have no fixed types. You can assign a convenience variable any type of value, including structures and arrays, even if that variable already has a value of a different type. The convenience variable, when used as an expression, has the type of its current value. `show convenience' Print a list of convenience variables used so far, and their values, as well as a list of the convenience functions. Abbreviated `show conv'. `init-if-undefined $VARIABLE = EXPRESSION' Set a convenience variable if it has not already been set. This is useful for user-defined commands that keep some state. It is similar, in concept, to using local static variables with initializers in C (except that convenience variables are global). It can also be used to allow users to override default values used in a command script. If the variable is already defined then the expression is not evaluated so any side-effects do not occur. One of the ways to use a convenience variable is as a counter to be incremented or a pointer to be advanced. For example, to print a field from successive elements of an array of structures: set $i = 0 print bar[$i++]->contents Repeat that command by typing <RET>. Some convenience variables are created automatically by GDB and given values likely to be useful. `$_' The variable `$_' is automatically set by the `x' command to the last address examined (*note Examining Memory: Memory.). Other commands which provide a default address for `x' to examine also set `$_' to that address; these commands include `info line' and `info breakpoint'. The type of `$_' is `void *' except when set by the `x' command, in which case it is a pointer to the type of `$__'. `$__' The variable `$__' is automatically set by the `x' command to the value found in the last address examined. Its type is chosen to match the format in which the data was printed. `$_exitcode' The variable `$_exitcode' is automatically set to the exit code when the program being debugged terminates. `$_probe_argc' `$_probe_arg0...$_probe_arg11' Arguments to a static probe. *Note Static Probe Points::. `$_sdata' The variable `$_sdata' contains extra collected static tracepoint data. *Note Tracepoint Action Lists: Tracepoint Actions. Note that `$_sdata' could be empty, if not inspecting a trace buffer, or if extra static tracepoint data has not been collected. `$_siginfo' The variable `$_siginfo' contains extra signal information (*note extra signal information::). Note that `$_siginfo' could be empty, if the application has not yet received any signals. For example, it will be empty before you execute the `run' command. `$_tlb' The variable `$_tlb' is automatically set when debugging applications running on MS-Windows in native mode or connected to gdbserver that supports the `qGetTIBAddr' request. *Note General Query Packets::. This variable contains the address of the thread information block. On HP-UX systems, if you refer to a function or variable name that begins with a dollar sign, GDB searches for a user or system name first, before it searches for a convenience variable.  File: gdb.info, Node: Convenience Funs, Next: Registers, Prev: Convenience Vars, Up: Data 10.12 Convenience Functions =========================== GDB also supplies some "convenience functions". These have a syntax similar to convenience variables. A convenience function can be used in an expression just like an ordinary function; however, a convenience function is implemented internally to GDB. These functions require GDB to be configured with `Python' support. `$_memeq(BUF1, BUF2, LENGTH)' Returns one if the LENGTH bytes at the addresses given by BUF1 and BUF2 are equal. Otherwise it returns zero. `$_regex(STR, REGEX)' Returns one if the string STR matches the regular expression REGEX. Otherwise it returns zero. The syntax of the regular expression is that specified by `Python''s regular expression support. `$_streq(STR1, STR2)' Returns one if the strings STR1 and STR2 are equal. Otherwise it returns zero. `$_strlen(STR)' Returns the length of string STR. GDB provides the ability to list and get help on convenience functions. `help function' Print a list of all convenience functions.  File: gdb.info, Node: Registers, Next: Floating Point Hardware, Prev: Convenience Funs, Up: Data 10.13 Registers =============== You can refer to machine register contents, in expressions, as variables with names starting with `$'. The names of registers are different for each machine; use `info registers' to see the names used on your machine. `info registers' Print the names and values of all registers except floating-point and vector registers (in the selected stack frame). `info all-registers' Print the names and values of all registers, including floating-point and vector registers (in the selected stack frame). `info registers REGNAME ...' Print the "relativized" value of each specified register REGNAME. As discussed in detail below, register values are normally relative to the selected stack frame. REGNAME may be any register name valid on the machine you are using, with or without the initial `$'. GDB has four "standard" register names that are available (in expressions) on most machines--whenever they do not conflict with an architecture's canonical mnemonics for registers. The register names `$pc' and `$sp' are used for the program counter register and the stack pointer. `$fp' is used for a register that contains a pointer to the current stack frame, and `$ps' is used for a register that contains the processor status. For example, you could print the program counter in hex with p/x $pc or print the instruction to be executed next with x/i $pc or add four to the stack pointer(1) with set $sp += 4 Whenever possible, these four standard register names are available on your machine even though the machine has different canonical mnemonics, so long as there is no conflict. The `info registers' command shows the canonical names. For example, on the SPARC, `info registers' displays the processor status register as `$psr' but you can also refer to it as `$ps'; and on x86-based machines `$ps' is an alias for the EFLAGS register. GDB always considers the contents of an ordinary register as an integer when the register is examined in this way. Some machines have special registers which can hold nothing but floating point; these registers are considered to have floating point values. There is no way to refer to the contents of an ordinary register as floating point value (although you can _print_ it as a floating point value with `print/f $REGNAME'). Some registers have distinct "raw" and "virtual" data formats. This means that the data format in which the register contents are saved by the operating system is not the same one that your program normally sees. For example, the registers of the 68881 floating point coprocessor are always saved in "extended" (raw) format, but all C programs expect to work with "double" (virtual) format. In such cases, GDB normally works with the virtual format only (the format that makes sense for your program), but the `info registers' command prints the data in both formats. Some machines have special registers whose contents can be interpreted in several different ways. For example, modern x86-based machines have SSE and MMX registers that can hold several values packed together in several different formats. GDB refers to such registers in `struct' notation: (gdb) print $xmm1 $1 = { v4_float = {0, 3.43859137e-038, 1.54142831e-044, 1.821688e-044}, v2_double = {9.92129282474342e-303, 2.7585945287983262e-313}, v16_int8 = "\000\000\000\000\3706;\001\v\000\000\000\r\000\000", v8_int16 = {0, 0, 14072, 315, 11, 0, 13, 0}, v4_int32 = {0, 20657912, 11, 13}, v2_int64 = {88725056443645952, 55834574859}, uint128 = 0x0000000d0000000b013b36f800000000 } To set values of such registers, you need to tell GDB which view of the register you wish to change, as if you were assigning value to a `struct' member: (gdb) set $xmm1.uint128 = 0x000000000000000000000000FFFFFFFF Normally, register values are relative to the selected stack frame (*note Selecting a Frame: Selection.). This means that you get the value that the register would contain if all stack frames farther in were exited and their saved registers restored. In order to see the true contents of hardware registers, you must select the innermost frame (with `frame 0'). However, GDB must deduce where registers are saved, from the machine code generated by your compiler. If some registers are not saved, or if GDB is unable to locate the saved registers, the selected stack frame makes no difference. ---------- Footnotes ---------- (1) This is a way of removing one word from the stack, on machines where stacks grow downward in memory (most machines, nowadays). This assumes that the innermost stack frame is selected; setting `$sp' is not allowed when other stack frames are selected. To pop entire frames off the stack, regardless of machine architecture, use `return'; see *note Returning from a Function: Returning.  File: gdb.info, Node: Floating Point Hardware, Next: Vector Unit, Prev: Registers, Up: Data 10.14 Floating Point Hardware ============================= Depending on the configuration, GDB may be able to give you more information about the status of the floating point hardware. `info float' Display hardware-dependent information about the floating point unit. The exact contents and layout vary depending on the floating point chip. Currently, `info float' is supported on the ARM and x86 machines.  File: gdb.info, Node: Vector Unit, Next: OS Information, Prev: Floating Point Hardware, Up: Data 10.15 Vector Unit ================= Depending on the configuration, GDB may be able to give you more information about the status of the vector unit. `info vector' Display information about the vector unit. The exact contents and layout vary depending on the hardware.  File: gdb.info, Node: OS Information, Next: Memory Region Attributes, Prev: Vector Unit, Up: Data 10.16 Operating System Auxiliary Information ============================================ GDB provides interfaces to useful OS facilities that can help you debug your program. Some operating systems supply an "auxiliary vector" to programs at startup. This is akin to the arguments and environment that you specify for a program, but contains a system-dependent variety of binary values that tell system libraries important details about the hardware, operating system, and process. Each value's purpose is identified by an integer tag; the meanings are well-known but system-specific. Depending on the configuration and operating system facilities, GDB may be able to show you this information. For remote targets, this functionality may further depend on the remote stub's support of the `qXfer:auxv:read' packet, see *note qXfer auxiliary vector read::. `info auxv' Display the auxiliary vector of the inferior, which can be either a live process or a core dump file. GDB prints each tag value numerically, and also shows names and text descriptions for recognized tags. Some values in the vector are numbers, some bit masks, and some pointers to strings or other data. GDB displays each value in the most appropriate form for a recognized tag, and in hexadecimal for an unrecognized tag. On some targets, GDB can access operating system-specific information and show it to you. The types of information available will differ depending on the type of operating system running on the target. The mechanism used to fetch the data is described in *note Operating System Information::. For remote targets, this functionality depends on the remote stub's support of the `qXfer:osdata:read' packet, see *note qXfer osdata read::. `info os INFOTYPE' Display OS information of the requested type. On GNU/Linux, the following values of INFOTYPE are valid: `processes' Display the list of processes on the target. For each process, GDB prints the process identifier, the name of the user, the command corresponding to the process, and the list of processor cores that the process is currently running on. (To understand what these properties mean, for this and the following info types, please consult the general GNU/Linux documentation.) `procgroups' Display the list of process groups on the target. For each process, GDB prints the identifier of the process group that it belongs to, the command corresponding to the process group leader, the process identifier, and the command line of the process. The list is sorted first by the process group identifier, then by the process identifier, so that processes belonging to the same process group are grouped together and the process group leader is listed first. `threads' Display the list of threads running on the target. For each thread, GDB prints the identifier of the process that the thread belongs to, the command of the process, the thread identifier, and the processor core that it is currently running on. The main thread of a process is not listed. `files' Display the list of open file descriptors on the target. For each file descriptor, GDB prints the identifier of the process owning the descriptor, the command of the owning process, the value of the descriptor, and the target of the descriptor. `sockets' Display the list of Internet-domain sockets on the target. For each socket, GDB prints the address and port of the local and remote endpoints, the current state of the connection, the creator of the socket, the IP address family of the socket, and the type of the connection. `shm' Display the list of all System V shared-memory regions on the target. For each shared-memory region, GDB prints the region key, the shared-memory identifier, the access permissions, the size of the region, the process that created the region, the process that last attached to or detached from the region, the current number of live attaches to the region, and the times at which the region was last attached to, detach from, and changed. `semaphores' Display the list of all System V semaphore sets on the target. For each semaphore set, GDB prints the semaphore set key, the semaphore set identifier, the access permissions, the number of semaphores in the set, the user and group of the owner and creator of the semaphore set, and the times at which the semaphore set was operated upon and changed. `msg' Display the list of all System V message queues on the target. For each message queue, GDB prints the message queue key, the message queue identifier, the access permissions, the current number of bytes on the queue, the current number of messages on the queue, the processes that last sent and received a message on the queue, the user and group of the owner and creator of the message queue, the times at which a message was last sent and received on the queue, and the time at which the message queue was last changed. `modules' Display the list of all loaded kernel modules on the target. For each module, GDB prints the module name, the size of the module in bytes, the number of times the module is used, the dependencies of the module, the status of the module, and the address of the loaded module in memory. `info os' If INFOTYPE is omitted, then list the possible values for INFOTYPE and the kind of OS information available for each INFOTYPE. If the target does not return a list of possible types, this command will report an error.  File: gdb.info, Node: Memory Region Attributes, Next: Dump/Restore Files, Prev: OS Information, Up: Data 10.17 Memory Region Attributes ============================== "Memory region attributes" allow you to describe special handling required by regions of your target's memory. GDB uses attributes to determine whether to allow certain types of memory accesses; whether to use specific width accesses; and whether to cache target memory. By default the description of memory regions is fetched from the target (if the current target supports this), but the user can override the fetched regions. Defined memory regions can be individually enabled and disabled. When a memory region is disabled, GDB uses the default attributes when accessing memory in that region. Similarly, if no memory regions have been defined, GDB uses the default attributes when accessing all memory. When a memory region is defined, it is given a number to identify it; to enable, disable, or remove a memory region, you specify that number. `mem LOWER UPPER ATTRIBUTES...' Define a memory region bounded by LOWER and UPPER with attributes ATTRIBUTES..., and add it to the list of regions monitored by GDB. Note that UPPER == 0 is a special case: it is treated as the target's maximum memory address. (0xffff on 16 bit targets, 0xffffffff on 32 bit targets, etc.) `mem auto' Discard any user changes to the memory regions and use target-supplied regions, if available, or no regions if the target does not support. `delete mem NUMS...' Remove memory regions NUMS... from the list of regions monitored by GDB. `disable mem NUMS...' Disable monitoring of memory regions NUMS.... A disabled memory region is not forgotten. It may be enabled again later. `enable mem NUMS...' Enable monitoring of memory regions NUMS.... `info mem' Print a table of all defined memory regions, with the following columns for each region: _Memory Region Number_ _Enabled or Disabled._ Enabled memory regions are marked with `y'. Disabled memory regions are marked with `n'. _Lo Address_ The address defining the inclusive lower bound of the memory region. _Hi Address_ The address defining the exclusive upper bound of the memory region. _Attributes_ The list of attributes set for this memory region. 10.17.1 Attributes ------------------ 10.17.1.1 Memory Access Mode ............................ The access mode attributes set whether GDB may make read or write accesses to a memory region. While these attributes prevent GDB from performing invalid memory accesses, they do nothing to prevent the target system, I/O DMA, etc. from accessing memory. `ro' Memory is read only. `wo' Memory is write only. `rw' Memory is read/write. This is the default. 10.17.1.2 Memory Access Size ............................ The access size attribute tells GDB to use specific sized accesses in the memory region. Often memory mapped device registers require specific sized accesses. If no access size attribute is specified, GDB may use accesses of any size. `8' Use 8 bit memory accesses. `16' Use 16 bit memory accesses. `32' Use 32 bit memory accesses. `64' Use 64 bit memory accesses. 10.17.1.3 Data Cache .................... The data cache attributes set whether GDB will cache target memory. While this generally improves performance by reducing debug protocol overhead, it can lead to incorrect results because GDB does not know about volatile variables or memory mapped device registers. `cache' Enable GDB to cache target memory. `nocache' Disable GDB from caching target memory. This is the default. 10.17.2 Memory Access Checking ------------------------------ GDB can be instructed to refuse accesses to memory that is not explicitly described. This can be useful if accessing such regions has undesired effects for a specific target, or to provide better error checking. The following commands control this behaviour. `set mem inaccessible-by-default [on|off]' If `on' is specified, make GDB treat memory not explicitly described by the memory ranges as non-existent and refuse accesses to such memory. The checks are only performed if there's at least one memory range defined. If `off' is specified, make GDB treat the memory not explicitly described by the memory ranges as RAM. The default value is `on'. `show mem inaccessible-by-default' Show the current handling of accesses to unknown memory.  File: gdb.info, Node: Dump/Restore Files, Next: Core File Generation, Prev: Memory Region Attributes, Up: Data 10.18 Copy Between Memory and a File ==================================== You can use the commands `dump', `append', and `restore' to copy data between target memory and a file. The `dump' and `append' commands write data to a file, and the `restore' command reads data from a file back into the inferior's memory. Files may be in binary, Motorola S-record, Intel hex, or Tektronix Hex format; however, GDB can only append to binary files. `dump [FORMAT] memory FILENAME START_ADDR END_ADDR' `dump [FORMAT] value FILENAME EXPR' Dump the contents of memory from START_ADDR to END_ADDR, or the value of EXPR, to FILENAME in the given format. The FORMAT parameter may be any one of: `binary' Raw binary form. `ihex' Intel hex format. `srec' Motorola S-record format. `tekhex' Tektronix Hex format. GDB uses the same definitions of these formats as the GNU binary utilities, like `objdump' and `objcopy'. If FORMAT is omitted, GDB dumps the data in raw binary form. `append [binary] memory FILENAME START_ADDR END_ADDR' `append [binary] value FILENAME EXPR' Append the contents of memory from START_ADDR to END_ADDR, or the value of EXPR, to the file FILENAME, in raw binary form. (GDB can only append data to files in raw binary form.) `restore FILENAME [binary] BIAS START END' Restore the contents of file FILENAME into memory. The `restore' command can automatically recognize any known BFD file format, except for raw binary. To restore a raw binary file you must specify the optional keyword `binary' after the filename. If BIAS is non-zero, its value will be added to the addresses contained in the file. Binary files always start at address zero, so they will be restored at address BIAS. Other bfd files have a built-in location; they will be restored at offset BIAS from that location. If START and/or END are non-zero, then only data between file offset START and file offset END will be restored. These offsets are relative to the addresses in the file, before the BIAS argument is applied.  File: gdb.info, Node: Core File Generation, Next: Character Sets, Prev: Dump/Restore Files, Up: Data 10.19 How to Produce a Core File from Your Program ================================================== A "core file" or "core dump" is a file that records the memory image of a running process and its process status (register values etc.). Its primary use is post-mortem debugging of a program that crashed while it ran outside a debugger. A program that crashes automatically produces a core file, unless this feature is disabled by the user. *Note Files::, for information on invoking GDB in the post-mortem debugging mode. Occasionally, you may wish to produce a core file of the program you are debugging in order to preserve a snapshot of its state. GDB has a special command for that. `generate-core-file [FILE]' `gcore [FILE]' Produce a core dump of the inferior process. The optional argument FILE specifies the file name where to put the core dump. If not specified, the file name defaults to `core.PID', where PID is the inferior process ID. Note that this command is implemented only for some systems (as of this writing, GNU/Linux, FreeBSD, Solaris, and S390).  File: gdb.info, Node: Character Sets, Next: Caching Remote Data, Prev: Core File Generation, Up: Data 10.20 Character Sets ==================== If the program you are debugging uses a different character set to represent characters and strings than the one GDB uses itself, GDB can automatically translate between the character sets for you. The character set GDB uses we call the "host character set"; the one the inferior program uses we call the "target character set". For example, if you are running GDB on a GNU/Linux system, which uses the ISO Latin 1 character set, but you are using GDB's remote protocol (*note Remote Debugging::) to debug a program running on an IBM mainframe, which uses the EBCDIC character set, then the host character set is Latin-1, and the target character set is EBCDIC. If you give GDB the command `set target-charset EBCDIC-US', then GDB translates between EBCDIC and Latin 1 as you print character or string values, or use character and string literals in expressions. GDB has no way to automatically recognize which character set the inferior program uses; you must tell it, using the `set target-charset' command, described below. Here are the commands for controlling GDB's character set support: `set target-charset CHARSET' Set the current target character set to CHARSET. To display the list of supported target character sets, type `set target-charset <TAB><TAB>'. `set host-charset CHARSET' Set the current host character set to CHARSET. By default, GDB uses a host character set appropriate to the system it is running on; you can override that default using the `set host-charset' command. On some systems, GDB cannot automatically determine the appropriate host character set. In this case, GDB uses `UTF-8'. GDB can only use certain character sets as its host character set. If you type `set host-charset <TAB><TAB>', GDB will list the host character sets it supports. `set charset CHARSET' Set the current host and target character sets to CHARSET. As above, if you type `set charset <TAB><TAB>', GDB will list the names of the character sets that can be used for both host and target. `show charset' Show the names of the current host and target character sets. `show host-charset' Show the name of the current host character set. `show target-charset' Show the name of the current target character set. `set target-wide-charset CHARSET' Set the current target's wide character set to CHARSET. This is the character set used by the target's `wchar_t' type. To display the list of supported wide character sets, type `set target-wide-charset <TAB><TAB>'. `show target-wide-charset' Show the name of the current target's wide character set. Here is an example of GDB's character set support in action. Assume that the following source code has been placed in the file `charset-test.c': #include <stdio.h> char ascii_hello[] = {72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 33, 10, 0}; char ibm1047_hello[] = {200, 133, 147, 147, 150, 107, 64, 166, 150, 153, 147, 132, 90, 37, 0}; main () { printf ("Hello, world!\n"); } In this program, `ascii_hello' and `ibm1047_hello' are arrays containing the string `Hello, world!' followed by a newline, encoded in the ASCII and IBM1047 character sets. We compile the program, and invoke the debugger on it: $ gcc -g charset-test.c -o charset-test $ gdb -nw charset-test GNU gdb 2001-12-19-cvs Copyright 2001 Free Software Foundation, Inc. ... (gdb) We can use the `show charset' command to see what character sets GDB is currently using to interpret and display characters and strings: (gdb) show charset The current host and target character set is `ISO-8859-1'. (gdb) For the sake of printing this manual, let's use ASCII as our initial character set: (gdb) set charset ASCII (gdb) show charset The current host and target character set is `ASCII'. (gdb) Let's assume that ASCII is indeed the correct character set for our host system -- in other words, let's assume that if GDB prints characters using the ASCII character set, our terminal will display them properly. Since our current target character set is also ASCII, the contents of `ascii_hello' print legibly: (gdb) print ascii_hello $1 = 0x401698 "Hello, world!\n" (gdb) print ascii_hello[0] $2 = 72 'H' (gdb) GDB uses the target character set for character and string literals you use in expressions: (gdb) print '+' $3 = 43 '+' (gdb) The ASCII character set uses the number 43 to encode the `+' character. GDB relies on the user to tell it which character set the target program uses. If we print `ibm1047_hello' while our target character set is still ASCII, we get jibberish: (gdb) print ibm1047_hello $4 = 0x4016a8 "\310\205\223\223\226k@\246\226\231\223\204Z%" (gdb) print ibm1047_hello[0] $5 = 200 '\310' (gdb) If we invoke the `set target-charset' followed by <TAB><TAB>, GDB tells us the character sets it supports: (gdb) set target-charset ASCII EBCDIC-US IBM1047 ISO-8859-1 (gdb) set target-charset We can select IBM1047 as our target character set, and examine the program's strings again. Now the ASCII string is wrong, but GDB translates the contents of `ibm1047_hello' from the target character set, IBM1047, to the host character set, ASCII, and they display correctly: (gdb) set target-charset IBM1047 (gdb) show charset The current host character set is `ASCII'. The current target character set is `IBM1047'. (gdb) print ascii_hello $6 = 0x401698 "\110\145%%?\054\040\167?\162%\144\041\012" (gdb) print ascii_hello[0] $7 = 72 '\110' (gdb) print ibm1047_hello $8 = 0x4016a8 "Hello, world!\n" (gdb) print ibm1047_hello[0] $9 = 200 'H' (gdb) As above, GDB uses the target character set for character and string literals you use in expressions: (gdb) print '+' $10 = 78 '+' (gdb) The IBM1047 character set uses the number 78 to encode the `+' character.  File: gdb.info, Node: Caching Remote Data, Next: Searching Memory, Prev: Character Sets, Up: Data 10.21 Caching Data of Remote Targets ==================================== GDB caches data exchanged between the debugger and a remote target (*note Remote Debugging::). Such caching generally improves performance, because it reduces the overhead of the remote protocol by bundling memory reads and writes into large chunks. Unfortunately, simply caching everything would lead to incorrect results, since GDB does not necessarily know anything about volatile values, memory-mapped I/O addresses, etc. Furthermore, in non-stop mode (*note Non-Stop Mode::) memory can be changed _while_ a gdb command is executing. Therefore, by default, GDB only caches data known to be on the stack(1). Other regions of memory can be explicitly marked as cacheable; see *note Memory Region Attributes::. `set remotecache on' `set remotecache off' This option no longer does anything; it exists for compatibility with old scripts. `show remotecache' Show the current state of the obsolete remotecache flag. `set stack-cache on' `set stack-cache off' Enable or disable caching of stack accesses. When `ON', use caching. By default, this option is `ON'. `show stack-cache' Show the current state of data caching for memory accesses. `info dcache [line]' Print the information about the data cache performance. The information displayed includes the dcache width and depth, and for each cache line, its number, address, and how many times it was referenced. This command is useful for debugging the data cache operation. If a line number is specified, the contents of that line will be printed in hex. `set dcache size SIZE' Set maximum number of entries in dcache (dcache depth above). `set dcache line-size LINE-SIZE' Set number of bytes each dcache entry caches (dcache width above). Must be a power of 2. `show dcache size' Show maximum number of dcache entries. See also *note info dcache: Caching Remote Data. `show dcache line-size' Show default size of dcache lines. See also *note info dcache: Caching Remote Data. ---------- Footnotes ---------- (1) In non-stop mode, it is moderately rare for a running thread to modify the stack of a stopped thread in a way that would interfere with a backtrace, and caching of stack reads provides a significant speed up of remote backtraces.  File: gdb.info, Node: Searching Memory, Prev: Caching Remote Data, Up: Data 10.22 Search Memory =================== Memory can be searched for a particular sequence of bytes with the `find' command. `find [/SN] START_ADDR, +LEN, VAL1 [, VAL2, ...]' `find [/SN] START_ADDR, END_ADDR, VAL1 [, VAL2, ...]' Search memory for the sequence of bytes specified by VAL1, VAL2, etc. The search begins at address START_ADDR and continues for either LEN bytes or through to END_ADDR inclusive. S and N are optional parameters. They may be specified in either order, apart or together. S, search query size The size of each search query value. `b' bytes `h' halfwords (two bytes) `w' words (four bytes) `g' giant words (eight bytes) All values are interpreted in the current language. This means, for example, that if the current source language is C/C++ then searching for the string "hello" includes the trailing '\0'. If the value size is not specified, it is taken from the value's type in the current language. This is useful when one wants to specify the search pattern as a mixture of types. Note that this means, for example, that in the case of C-like languages a search for an untyped 0x42 will search for `(int) 0x42' which is typically four bytes. N, maximum number of finds The maximum number of matches to print. The default is to print all finds. You can use strings as search values. Quote them with double-quotes (`"'). The string value is copied into the search pattern byte by byte, regardless of the endianness of the target and the size specification. The address of each match found is printed as well as a count of the number of matches found. The address of the last value found is stored in convenience variable `$_'. A count of the number of matches is stored in `$numfound'. For example, if stopped at the `printf' in this function: void hello () { static char hello[] = "hello-hello"; static struct { char c; short s; int i; } __attribute__ ((packed)) mixed = { 'c', 0x1234, 0x87654321 }; printf ("%s\n", hello); } you get during debugging: (gdb) find &hello[0], +sizeof(hello), "hello" 0x804956d <hello.1620+6> 1 pattern found (gdb) find &hello[0], +sizeof(hello), 'h', 'e', 'l', 'l', 'o' 0x8049567 <hello.1620> 0x804956d <hello.1620+6> 2 patterns found (gdb) find /b1 &hello[0], +sizeof(hello), 'h', 0x65, 'l' 0x8049567 <hello.1620> 1 pattern found (gdb) find &mixed, +sizeof(mixed), (char) 'c', (short) 0x1234, (int) 0x87654321 0x8049560 <mixed.1625> 1 pattern found (gdb) print $numfound $1 = 1 (gdb) print $_ $2 = (void *) 0x8049560  File: gdb.info, Node: Optimized Code, Next: Macros, Prev: Data, Up: Top 11 Debugging Optimized Code *************************** Almost all compilers support optimization. With optimization disabled, the compiler generates assembly code that corresponds directly to your source code, in a simplistic way. As the compiler applies more powerful optimizations, the generated assembly code diverges from your original source code. With help from debugging information generated by the compiler, GDB can map from the running program back to constructs from your original source. GDB is more accurate with optimization disabled. If you can recompile without optimization, it is easier to follow the progress of your program during debugging. But, there are many cases where you may need to debug an optimized version. When you debug a program compiled with `-g -O', remember that the optimizer has rearranged your code; the debugger shows you what is really there. Do not be too surprised when the execution path does not exactly match your source file! An extreme example: if you define a variable, but never use it, GDB never sees that variable--because the compiler optimizes it out of existence. Some things do not work as well with `-g -O' as with just `-g', particularly on machines with instruction scheduling. If in doubt, recompile with `-g' alone, and if this fixes the problem, please report it to us as a bug (including a test case!). *Note Variables::, for more information about debugging optimized code. * Menu: * Inline Functions:: How GDB presents inlining * Tail Call Frames:: GDB analysis of jumps to functions  File: gdb.info, Node: Inline Functions, Next: Tail Call Frames, Up: Optimized Code 11.1 Inline Functions ===================== "Inlining" is an optimization that inserts a copy of the function body directly at each call site, instead of jumping to a shared routine. GDB displays inlined functions just like non-inlined functions. They appear in backtraces. You can view their arguments and local variables, step into them with `step', skip them with `next', and escape from them with `finish'. You can check whether a function was inlined by using the `info frame' command. For GDB to support inlined functions, the compiler must record information about inlining in the debug information -- GCC using the DWARF 2 format does this, and several other compilers do also. GDB only supports inlined functions when using DWARF 2. Versions of GCC before 4.1 do not emit two required attributes (`DW_AT_call_file' and `DW_AT_call_line'); GDB does not display inlined function calls with earlier versions of GCC. It instead displays the arguments and local variables of inlined functions as local variables in the caller. The body of an inlined function is directly included at its call site; unlike a non-inlined function, there are no instructions devoted to the call. GDB still pretends that the call site and the start of the inlined function are different instructions. Stepping to the call site shows the call site, and then stepping again shows the first line of the inlined function, even though no additional instructions are executed. This makes source-level debugging much clearer; you can see both the context of the call and then the effect of the call. Only stepping by a single instruction using `stepi' or `nexti' does not do this; single instruction steps always show the inlined body. There are some ways that GDB does not pretend that inlined function calls are the same as normal calls: * Setting breakpoints at the call site of an inlined function may not work, because the call site does not contain any code. GDB may incorrectly move the breakpoint to the next line of the enclosing function, after the call. This limitation will be removed in a future version of GDB; until then, set a breakpoint on an earlier line or inside the inlined function instead. * GDB cannot locate the return value of inlined calls after using the `finish' command. This is a limitation of compiler-generated debugging information; after `finish', you can step to the next line and print a variable where your program stored the return value.  File: gdb.info, Node: Tail Call Frames, Prev: Inline Functions, Up: Optimized Code 11.2 Tail Call Frames ===================== Function `B' can call function `C' in its very last statement. In unoptimized compilation the call of `C' is immediately followed by return instruction at the end of `B' code. Optimizing compiler may replace the call and return in function `B' into one jump to function `C' instead. Such use of a jump instruction is called "tail call". During execution of function `C', there will be no indication in the function call stack frames that it was tail-called from `B'. If function `A' regularly calls function `B' which tail-calls function `C', then GDB will see `A' as the caller of `C'. However, in some cases GDB can determine that `C' was tail-called from `B', and it will then create fictitious call frame for that, with the return address set up as if `B' called `C' normally. This functionality is currently supported only by DWARF 2 debugging format and the compiler has to produce `DW_TAG_GNU_call_site' tags. With GCC, you need to specify `-O -g' during compilation, to get this information. `info frame' command (*note Frame Info::) will indicate the tail call frame kind by text `tail call frame' such as in this sample GDB output: (gdb) x/i $pc - 2 0x40066b <b(int, double)+11>: jmp 0x400640 <c(int, double)> (gdb) info frame Stack level 1, frame at 0x7fffffffda30: rip = 0x40066d in b (amd64-entry-value.cc:59); saved rip 0x4004c5 tail call frame, caller of frame at 0x7fffffffda30 source language c++. Arglist at unknown address. Locals at unknown address, Previous frame's sp is 0x7fffffffda30 The detection of all the possible code path executions can find them ambiguous. There is no execution history stored (possible *note Reverse Execution:: is never used for this purpose) and the last known caller could have reached the known callee by multiple different jump sequences. In such case GDB still tries to show at least all the unambiguous top tail callers and all the unambiguous bottom tail calees, if any. `set debug entry-values' When set to on, enables printing of analysis messages for both frame argument values at function entry and tail calls. It will show all the possible valid tail calls code paths it has considered. It will also print the intersection of them with the final unambiguous (possibly partial or even empty) code path result. `show debug entry-values' Show the current state of analysis messages printing for both frame argument values at function entry and tail calls. The analysis messages for tail calls can for example show why the virtual tail call frame for function `c' has not been recognized (due to the indirect reference by variable `x'): static void __attribute__((noinline, noclone)) c (void); void (*x) (void) = c; static void __attribute__((noinline, noclone)) a (void) { x++; } static void __attribute__((noinline, noclone)) c (void) { a (); } int main (void) { x (); return 0; } Breakpoint 1, DW_OP_GNU_entry_value resolving cannot find DW_TAG_GNU_call_site 0x40039a in main a () at t.c:3 3 static void __attribute__((noinline, noclone)) a (void) { x++; } (gdb) bt #0 a () at t.c:3 #1 0x000000000040039a in main () at t.c:5 Another possibility is an ambiguous virtual tail call frames resolution: int i; static void __attribute__((noinline, noclone)) f (void) { i++; } static void __attribute__((noinline, noclone)) e (void) { f (); } static void __attribute__((noinline, noclone)) d (void) { f (); } static void __attribute__((noinline, noclone)) c (void) { d (); } static void __attribute__((noinline, noclone)) b (void) { if (i) c (); else e (); } static void __attribute__((noinline, noclone)) a (void) { b (); } int main (void) { a (); return 0; } tailcall: initial: 0x4004d2(a) 0x4004ce(b) 0x4004b2(c) 0x4004a2(d) tailcall: compare: 0x4004d2(a) 0x4004cc(b) 0x400492(e) tailcall: reduced: 0x4004d2(a) | (gdb) bt #0 f () at t.c:2 #1 0x00000000004004d2 in a () at t.c:8 #2 0x0000000000400395 in main () at t.c:9 Frames #0 and #2 are real, #1 is a virtual tail call frame. The code can have possible execution paths `main->a->b->c->d->f' or `main->a->b->e->f', GDB cannot find which one from the inferior state. `initial:' state shows some random possible calling sequence GDB has found. It then finds another possible calling sequcen - that one is prefixed by `compare:'. The non-ambiguous intersection of these two is printed as the `reduced:' calling sequence. That one could have many futher `compare:' and `reduced:' statements as long as there remain any non-ambiguous sequence entries. For the frame of function `b' in both cases there are different possible `$pc' values (`0x4004cc' or `0x4004ce'), therefore this frame is also ambigous. The only non-ambiguous frame is the one for function `a', therefore this one is displayed to the user while the ambiguous frames are omitted. There can be also reasons why printing of frame argument values at function entry may fail: int v; static void __attribute__((noinline, noclone)) c (int i) { v++; } static void __attribute__((noinline, noclone)) a (int i); static void __attribute__((noinline, noclone)) b (int i) { a (i); } static void __attribute__((noinline, noclone)) a (int i) { if (i) b (i - 1); else c (0); } int main (void) { a (5); return 0; } (gdb) bt #0 c (i=i@entry=0) at t.c:2 #1 0x0000000000400428 in a (DW_OP_GNU_entry_value resolving has found function "a" at 0x400420 can call itself via tail calls i=<optimized out>) at t.c:6 #2 0x000000000040036e in main () at t.c:7 GDB cannot find out from the inferior state if and how many times did function `a' call itself (via function `b') as these calls would be tail calls. Such tail calls would modify thue `i' variable, therefore GDB cannot be sure the value it knows would be right - GDB prints `<optimized out>' instead.  File: gdb.info, Node: Macros, Next: Tracepoints, Prev: Optimized Code, Up: Top 12 C Preprocessor Macros ************************ Some languages, such as C and C++, provide a way to define and invoke "preprocessor macros" which expand into strings of tokens. GDB can evaluate expressions containing macro invocations, show the result of macro expansion, and show a macro's definition, including where it was defined. You may need to compile your program specially to provide GDB with information about preprocessor macros. Most compilers do not include macros in their debugging information, even when you compile with the `-g' flag. *Note Compilation::. A program may define a macro at one point, remove that definition later, and then provide a different definition after that. Thus, at different points in the program, a macro may have different definitions, or have no definition at all. If there is a current stack frame, GDB uses the macros in scope at that frame's source code line. Otherwise, GDB uses the macros in scope at the current listing location; see *note List::. Whenever GDB evaluates an expression, it always expands any macro invocations present in the expression. GDB also provides the following commands for working with macros explicitly. `macro expand EXPRESSION' `macro exp EXPRESSION' Show the results of expanding all preprocessor macro invocations in EXPRESSION. Since GDB simply expands macros, but does not parse the result, EXPRESSION need not be a valid expression; it can be any string of tokens. `macro expand-once EXPRESSION' `macro exp1 EXPRESSION' (This command is not yet implemented.) Show the results of expanding those preprocessor macro invocations that appear explicitly in EXPRESSION. Macro invocations appearing in that expansion are left unchanged. This command allows you to see the effect of a particular macro more clearly, without being confused by further expansions. Since GDB simply expands macros, but does not parse the result, EXPRESSION need not be a valid expression; it can be any string of tokens. `info macro [-a|-all] [--] MACRO' Show the current definition or all definitions of the named MACRO, and describe the source location or compiler command-line where that definition was established. The optional double dash is to signify the end of argument processing and the beginning of MACRO for non C-like macros where the macro may begin with a hyphen. `info macros LINESPEC' Show all macro definitions that are in effect at the location specified by LINESPEC, and describe the source location or compiler command-line where those definitions were established. `macro define MACRO REPLACEMENT-LIST' `macro define MACRO(ARGLIST) REPLACEMENT-LIST' Introduce a definition for a preprocessor macro named MACRO, invocations of which are replaced by the tokens given in REPLACEMENT-LIST. The first form of this command defines an "object-like" macro, which takes no arguments; the second form defines a "function-like" macro, which takes the arguments given in ARGLIST. A definition introduced by this command is in scope in every expression evaluated in GDB, until it is removed with the `macro undef' command, described below. The definition overrides all definitions for MACRO present in the program being debugged, as well as any previous user-supplied definition. `macro undef MACRO' Remove any user-supplied definition for the macro named MACRO. This command only affects definitions provided with the `macro define' command, described above; it cannot remove definitions present in the program being debugged. `macro list' List all the macros defined using the `macro define' command. Here is a transcript showing the above commands in action. First, we show our source files: $ cat sample.c #include <stdio.h> #include "sample.h" #define M 42 #define ADD(x) (M + x) main () { #define N 28 printf ("Hello, world!\n"); #undef N printf ("We're so creative.\n"); #define N 1729 printf ("Goodbye, world!\n"); } $ cat sample.h #define Q < $ Now, we compile the program using the GNU C compiler, GCC. We pass the `-gdwarf-2'(1) _and_ `-g3' flags to ensure the compiler includes information about preprocessor macros in the debugging information. $ gcc -gdwarf-2 -g3 sample.c -o sample $ Now, we start GDB on our sample program: $ gdb -nw sample GNU gdb 2002-05-06-cvs Copyright 2002 Free Software Foundation, Inc. GDB is free software, ... (gdb) We can expand macros and examine their definitions, even when the program is not running. GDB uses the current listing position to decide which macro definitions are in scope: (gdb) list main 3 4 #define M 42 5 #define ADD(x) (M + x) 6 7 main () 8 { 9 #define N 28 10 printf ("Hello, world!\n"); 11 #undef N 12 printf ("We're so creative.\n"); (gdb) info macro ADD Defined at /home/jimb/gdb/macros/play/sample.c:5 #define ADD(x) (M + x) (gdb) info macro Q Defined at /home/jimb/gdb/macros/play/sample.h:1 included at /home/jimb/gdb/macros/play/sample.c:2 #define Q < (gdb) macro expand ADD(1) expands to: (42 + 1) (gdb) macro expand-once ADD(1) expands to: once (M + 1) (gdb) In the example above, note that `macro expand-once' expands only the macro invocation explicit in the original text -- the invocation of `ADD' -- but does not expand the invocation of the macro `M', which was introduced by `ADD'. Once the program is running, GDB uses the macro definitions in force at the source line of the current stack frame: (gdb) break main Breakpoint 1 at 0x8048370: file sample.c, line 10. (gdb) run Starting program: /home/jimb/gdb/macros/play/sample Breakpoint 1, main () at sample.c:10 10 printf ("Hello, world!\n"); (gdb) At line 10, the definition of the macro `N' at line 9 is in force: (gdb) info macro N Defined at /home/jimb/gdb/macros/play/sample.c:9 #define N 28 (gdb) macro expand N Q M expands to: 28 < 42 (gdb) print N Q M $1 = 1 (gdb) As we step over directives that remove `N''s definition, and then give it a new definition, GDB finds the definition (or lack thereof) in force at each point: (gdb) next Hello, world! 12 printf ("We're so creative.\n"); (gdb) info macro N The symbol `N' has no definition as a C/C++ preprocessor macro at /home/jimb/gdb/macros/play/sample.c:12 (gdb) next We're so creative. 14 printf ("Goodbye, world!\n"); (gdb) info macro N Defined at /home/jimb/gdb/macros/play/sample.c:13 #define N 1729 (gdb) macro expand N Q M expands to: 1729 < 42 (gdb) print N Q M $2 = 0 (gdb) In addition to source files, macros can be defined on the compilation command line using the `-DNAME=VALUE' syntax. For macros defined in such a way, GDB displays the location of their definition as line zero of the source file submitted to the compiler. (gdb) info macro __STDC__ Defined at /home/jimb/gdb/macros/play/sample.c:0 -D__STDC__=1 (gdb) ---------- Footnotes ---------- (1) This is the minimum. Recent versions of GCC support `-gdwarf-3' and `-gdwarf-4'; we recommend always choosing the most recent version of DWARF.  File: gdb.info, Node: Tracepoints, Next: Overlays, Prev: Macros, Up: Top 13 Tracepoints ************** In some applications, it is not feasible for the debugger to interrupt the program's execution long enough for the developer to learn anything helpful about its behavior. If the program's correctness depends on its real-time behavior, delays introduced by a debugger might cause the program to change its behavior drastically, or perhaps fail, even when the code itself is correct. It is useful to be able to observe the program's behavior without interrupting it. Using GDB's `trace' and `collect' commands, you can specify locations in the program, called "tracepoints", and arbitrary expressions to evaluate when those tracepoints are reached. Later, using the `tfind' command, you can examine the values those expressions had when the program hit the tracepoints. The expressions may also denote objects in memory--structures or arrays, for example--whose values GDB should record; while visiting a particular tracepoint, you may inspect those objects as if they were in memory at that moment. However, because GDB records these values without interacting with you, it can do so quickly and unobtrusively, hopefully not disturbing the program's behavior. The tracepoint facility is currently available only for remote targets. *Note Targets::. In addition, your remote target must know how to collect trace data. This functionality is implemented in the remote stub; however, none of the stubs distributed with GDB support tracepoints as of this writing. The format of the remote packets used to implement tracepoints are described in *note Tracepoint Packets::. It is also possible to get trace data from a file, in a manner reminiscent of corefiles; you specify the filename, and use `tfind' to search through the file. *Note Trace Files::, for more details. This chapter describes the tracepoint commands and features. * Menu: * Set Tracepoints:: * Analyze Collected Data:: * Tracepoint Variables:: * Trace Files::  File: gdb.info, Node: Set Tracepoints, Next: Analyze Collected Data, Up: Tracepoints 13.1 Commands to Set Tracepoints ================================ Before running such a "trace experiment", an arbitrary number of tracepoints can be set. A tracepoint is actually a special type of breakpoint (*note Set Breaks::), so you can manipulate it using standard breakpoint commands. For instance, as with breakpoints, tracepoint numbers are successive integers starting from one, and many of the commands associated with tracepoints take the tracepoint number as their argument, to identify which tracepoint to work on. For each tracepoint, you can specify, in advance, some arbitrary set of data that you want the target to collect in the trace buffer when it hits that tracepoint. The collected data can include registers, local variables, or global data. Later, you can use GDB commands to examine the values these data had at the time the tracepoint was hit. Tracepoints do not support every breakpoint feature. Ignore counts on tracepoints have no effect, and tracepoints cannot run GDB commands when they are hit. Tracepoints may not be thread-specific either. Some targets may support "fast tracepoints", which are inserted in a different way (such as with a jump instead of a trap), that is faster but possibly restricted in where they may be installed. Regular and fast tracepoints are dynamic tracing facilities, meaning that they can be used to insert tracepoints at (almost) any location in the target. Some targets may also support controlling "static tracepoints" from GDB. With static tracing, a set of instrumentation points, also known as "markers", are embedded in the target program, and can be activated or deactivated by name or address. These are usually placed at locations which facilitate investigating what the target is actually doing. GDB's support for static tracing includes being able to list instrumentation points, and attach them with GDB defined high level tracepoints that expose the whole range of convenience of GDB's tracepoints support. Namely, support for collecting registers values and values of global or local (to the instrumentation point) variables; tracepoint conditions and trace state variables. The act of installing a GDB static tracepoint on an instrumentation point, or marker, is referred to as "probing" a static tracepoint marker. `gdbserver' supports tracepoints on some target systems. *Note Tracepoints support in `gdbserver': Server. This section describes commands to set tracepoints and associated conditions and actions. * Menu: * Create and Delete Tracepoints:: * Enable and Disable Tracepoints:: * Tracepoint Passcounts:: * Tracepoint Conditions:: * Trace State Variables:: * Tracepoint Actions:: * Listing Tracepoints:: * Listing Static Tracepoint Markers:: * Starting and Stopping Trace Experiments:: * Tracepoint Restrictions::  File: gdb.info, Node: Create and Delete Tracepoints, Next: Enable and Disable Tracepoints, Up: Set Tracepoints 13.1.1 Create and Delete Tracepoints ------------------------------------ `trace LOCATION' The `trace' command is very similar to the `break' command. Its argument LOCATION can be a source line, a function name, or an address in the target program. *Note Specify Location::. The `trace' command defines a tracepoint, which is a point in the target program where the debugger will briefly stop, collect some data, and then allow the program to continue. Setting a tracepoint or changing its actions takes effect immediately if the remote stub supports the `InstallInTrace' feature (*note install tracepoint in tracing::). If remote stub doesn't support the `InstallInTrace' feature, all these changes don't take effect until the next `tstart' command, and once a trace experiment is running, further changes will not have any effect until the next trace experiment starts. In addition, GDB supports "pending tracepoints"--tracepoints whose address is not yet resolved. (This is similar to pending breakpoints.) Pending tracepoints are not downloaded to the target and not installed until they are resolved. The resolution of pending tracepoints requires GDB support--when debugging with the remote target, and GDB disconnects from the remote stub (*note disconnected tracing::), pending tracepoints can not be resolved (and downloaded to the remote stub) while GDB is disconnected. Here are some examples of using the `trace' command: (gdb) trace foo.c:121 // a source file and line number (gdb) trace +2 // 2 lines forward (gdb) trace my_function // first source line of function (gdb) trace *my_function // EXACT start address of function (gdb) trace *0x2117c4 // an address You can abbreviate `trace' as `tr'. `trace LOCATION if COND' Set a tracepoint with condition COND; evaluate the expression COND each time the tracepoint is reached, and collect data only if the value is nonzero--that is, if COND evaluates as true. *Note Tracepoint Conditions: Tracepoint Conditions, for more information on tracepoint conditions. `ftrace LOCATION [ if COND ]' The `ftrace' command sets a fast tracepoint. For targets that support them, fast tracepoints will use a more efficient but possibly less general technique to trigger data collection, such as a jump instruction instead of a trap, or some sort of hardware support. It may not be possible to create a fast tracepoint at the desired location, in which case the command will exit with an explanatory message. GDB handles arguments to `ftrace' exactly as for `trace'. On 32-bit x86-architecture systems, fast tracepoints normally need to be placed at an instruction that is 5 bytes or longer, but can be placed at 4-byte instructions if the low 64K of memory of the target program is available to install trampolines. Some Unix-type systems, such as GNU/Linux, exclude low addresses from the program's address space; but for instance with the Linux kernel it is possible to let GDB use this area by doing a `sysctl' command to set the `mmap_min_addr' kernel parameter, as in sudo sysctl -w vm.mmap_min_addr=32768 which sets the low address to 32K, which leaves plenty of room for trampolines. The minimum address should be set to a page boundary. `strace LOCATION [ if COND ]' The `strace' command sets a static tracepoint. For targets that support it, setting a static tracepoint probes a static instrumentation point, or marker, found at LOCATION. It may not be possible to set a static tracepoint at the desired location, in which case the command will exit with an explanatory message. GDB handles arguments to `strace' exactly as for `trace', with the addition that the user can also specify `-m MARKER' as LOCATION. This probes the marker identified by the MARKER string identifier. This identifier depends on the static tracepoint backend library your program is using. You can find all the marker identifiers in the `ID' field of the `info static-tracepoint-markers' command output. *Note Listing Static Tracepoint Markers: Listing Static Tracepoint Markers. For example, in the following small program using the UST tracing engine: main () { trace_mark(ust, bar33, "str %s", "FOOBAZ"); } the marker id is composed of joining the first two arguments to the `trace_mark' call with a slash, which translates to: (gdb) info static-tracepoint-markers Cnt Enb ID Address What 1 n ust/bar33 0x0000000000400ddc in main at stexample.c:22 Data: "str %s" [etc...] so you may probe the marker above with: (gdb) strace -m ust/bar33 Static tracepoints accept an extra collect action -- `collect $_sdata'. This collects arbitrary user data passed in the probe point call to the tracing library. In the UST example above, you'll see that the third argument to `trace_mark' is a printf-like format string. The user data is then the result of running that formating string against the following arguments. Note that `info static-tracepoint-markers' command output lists that format string in the `Data:' field. You can inspect this data when analyzing the trace buffer, by printing the $_sdata variable like any other variable available to GDB. *Note Tracepoint Action Lists: Tracepoint Actions. The convenience variable `$tpnum' records the tracepoint number of the most recently set tracepoint. `delete tracepoint [NUM]' Permanently delete one or more tracepoints. With no argument, the default is to delete all tracepoints. Note that the regular `delete' command can remove tracepoints also. Examples: (gdb) delete trace 1 2 3 // remove three tracepoints (gdb) delete trace // remove all tracepoints You can abbreviate this command as `del tr'.  File: gdb.info, Node: Enable and Disable Tracepoints, Next: Tracepoint Passcounts, Prev: Create and Delete Tracepoints, Up: Set Tracepoints 13.1.2 Enable and Disable Tracepoints ------------------------------------- These commands are deprecated; they are equivalent to plain `disable' and `enable'. `disable tracepoint [NUM]' Disable tracepoint NUM, or all tracepoints if no argument NUM is given. A disabled tracepoint will have no effect during a trace experiment, but it is not forgotten. You can re-enable a disabled tracepoint using the `enable tracepoint' command. If the command is issued during a trace experiment and the debug target has support for disabling tracepoints during a trace experiment, then the change will be effective immediately. Otherwise, it will be applied to the next trace experiment. `enable tracepoint [NUM]' Enable tracepoint NUM, or all tracepoints. If this command is issued during a trace experiment and the debug target supports enabling tracepoints during a trace experiment, then the enabled tracepoints will become effective immediately. Otherwise, they will become effective the next time a trace experiment is run.  File: gdb.info, Node: Tracepoint Passcounts, Next: Tracepoint Conditions, Prev: Enable and Disable Tracepoints, Up: Set Tracepoints 13.1.3 Tracepoint Passcounts ---------------------------- `passcount [N [NUM]]' Set the "passcount" of a tracepoint. The passcount is a way to automatically stop a trace experiment. If a tracepoint's passcount is N, then the trace experiment will be automatically stopped on the N'th time that tracepoint is hit. If the tracepoint number NUM is not specified, the `passcount' command sets the passcount of the most recently defined tracepoint. If no passcount is given, the trace experiment will run until stopped explicitly by the user. Examples: (gdb) passcount 5 2 // Stop on the 5th execution of `// tracepoint 2' (gdb) passcount 12 // Stop on the 12th execution of the `// most recently defined tracepoint.' (gdb) trace foo (gdb) pass 3 (gdb) trace bar (gdb) pass 2 (gdb) trace baz (gdb) pass 1 // Stop tracing when foo has been `// executed 3 times OR when bar has' `// been executed 2 times' `// OR when baz has been executed 1 time.'  File: gdb.info, Node: Tracepoint Conditions, Next: Trace State Variables, Prev: Tracepoint Passcounts, Up: Set Tracepoints 13.1.4 Tracepoint Conditions ---------------------------- The simplest sort of tracepoint collects data every time your program reaches a specified place. You can also specify a "condition" for a tracepoint. A condition is just a Boolean expression in your programming language (*note Expressions: Expressions.). A tracepoint with a condition evaluates the expression each time your program reaches it, and data collection happens only if the condition is true. Tracepoint conditions can be specified when a tracepoint is set, by using `if' in the arguments to the `trace' command. *Note Setting Tracepoints: Create and Delete Tracepoints. They can also be set or changed at any time with the `condition' command, just as with breakpoints. Unlike breakpoint conditions, GDB does not actually evaluate the conditional expression itself. Instead, GDB encodes the expression into an agent expression (*note Agent Expressions::) suitable for execution on the target, independently of GDB. Global variables become raw memory locations, locals become stack accesses, and so forth. For instance, suppose you have a function that is usually called frequently, but should not be called after an error has occurred. You could use the following tracepoint command to collect data about calls of that function that happen while the error code is propagating through the program; an unconditional tracepoint could end up collecting thousands of useless trace frames that you would have to search through. (gdb) trace normal_operation if errcode > 0  File: gdb.info, Node: Trace State Variables, Next: Tracepoint Actions, Prev: Tracepoint Conditions, Up: Set Tracepoints 13.1.5 Trace State Variables ---------------------------- A "trace state variable" is a special type of variable that is created and managed by target-side code. The syntax is the same as that for GDB's convenience variables (a string prefixed with "$"), but they are stored on the target. They must be created explicitly, using a `tvariable' command. They are always 64-bit signed integers. Trace state variables are remembered by GDB, and downloaded to the target along with tracepoint information when the trace experiment starts. There are no intrinsic limits on the number of trace state variables, beyond memory limitations of the target. Although trace state variables are managed by the target, you can use them in print commands and expressions as if they were convenience variables; GDB will get the current value from the target while the trace experiment is running. Trace state variables share the same namespace as other "$" variables, which means that you cannot have trace state variables with names like `$23' or `$pc', nor can you have a trace state variable and a convenience variable with the same name. `tvariable $NAME [ = EXPRESSION ]' The `tvariable' command creates a new trace state variable named `$NAME', and optionally gives it an initial value of EXPRESSION. EXPRESSION is evaluated when this command is entered; the result will be converted to an integer if possible, otherwise GDB will report an error. A subsequent `tvariable' command specifying the same name does not create a variable, but instead assigns the supplied initial value to the existing variable of that name, overwriting any previous initial value. The default initial value is 0. `info tvariables' List all the trace state variables along with their initial values. Their current values may also be displayed, if the trace experiment is currently running. `delete tvariable [ $NAME ... ]' Delete the given trace state variables, or all of them if no arguments are specified.  File: gdb.info, Node: Tracepoint Actions, Next: Listing Tracepoints, Prev: Trace State Variables, Up: Set Tracepoints 13.1.6 Tracepoint Action Lists ------------------------------ `actions [NUM]' This command will prompt for a list of actions to be taken when the tracepoint is hit. If the tracepoint number NUM is not specified, this command sets the actions for the one that was most recently defined (so that you can define a tracepoint and then say `actions' without bothering about its number). You specify the actions themselves on the following lines, one action at a time, and terminate the actions list with a line containing just `end'. So far, the only defined actions are `collect', `teval', and `while-stepping'. `actions' is actually equivalent to `commands' (*note Breakpoint Command Lists: Break Commands.), except that only the defined actions are allowed; any other GDB command is rejected. To remove all actions from a tracepoint, type `actions NUM' and follow it immediately with `end'. (gdb) collect DATA // collect some data (gdb) while-stepping 5 // single-step 5 times, collect data (gdb) end // signals the end of actions. In the following example, the action list begins with `collect' commands indicating the things to be collected when the tracepoint is hit. Then, in order to single-step and collect additional data following the tracepoint, a `while-stepping' command is used, followed by the list of things to be collected after each step in a sequence of single steps. The `while-stepping' command is terminated by its own separate `end' command. Lastly, the action list is terminated by an `end' command. (gdb) trace foo (gdb) actions Enter actions for tracepoint 1, one per line: > collect bar,baz > collect $regs > while-stepping 12 > collect $pc, arr[i] > end end `collect[/MODS] EXPR1, EXPR2, ...' Collect values of the given expressions when the tracepoint is hit. This command accepts a comma-separated list of any valid expressions. In addition to global, static, or local variables, the following special arguments are supported: `$regs' Collect all registers. `$args' Collect all function arguments. `$locals' Collect all local variables. `$_ret' Collect the return address. This is helpful if you want to see more of a backtrace. `$_probe_argc' Collects the number of arguments from the static probe at which the tracepoint is located. *Note Static Probe Points::. `$_probe_argN' N is an integer between 0 and 11. Collects the Nth argument from the static probe at which the tracepoint is located. *Note Static Probe Points::. `$_sdata' Collect static tracepoint marker specific data. Only available for static tracepoints. *Note Tracepoint Action Lists: Tracepoint Actions. On the UST static tracepoints library backend, an instrumentation point resembles a `printf' function call. The tracing library is able to collect user specified data formatted to a character string using the format provided by the programmer that instrumented the program. Other backends have similar mechanisms. Here's an example of a UST marker call: const char master_name[] = "$your_name"; trace_mark(channel1, marker1, "hello %s", master_name) In this case, collecting `$_sdata' collects the string `hello $yourname'. When analyzing the trace buffer, you can inspect `$_sdata' like any other variable available to GDB. You can give several consecutive `collect' commands, each one with a single argument, or one `collect' command with several arguments separated by commas; the effect is the same. The optional MODS changes the usual handling of the arguments. `s' requests that pointers to chars be handled as strings, in particular collecting the contents of the memory being pointed at, up to the first zero. The upper bound is by default the value of the `print elements' variable; if `s' is followed by a decimal number, that is the upper bound instead. So for instance `collect/s25 mystr' collects as many as 25 characters at `mystr'. The command `info scope' (*note info scope: Symbols.) is particularly useful for figuring out what data to collect. `teval EXPR1, EXPR2, ...' Evaluate the given expressions when the tracepoint is hit. This command accepts a comma-separated list of expressions. The results are discarded, so this is mainly useful for assigning values to trace state variables (*note Trace State Variables::) without adding those values to the trace buffer, as would be the case if the `collect' action were used. `while-stepping N' Perform N single-step instruction traces after the tracepoint, collecting new data after each step. The `while-stepping' command is followed by the list of what to collect while stepping (followed by its own `end' command): > while-stepping 12 > collect $regs, myglobal > end > Note that `$pc' is not automatically collected by `while-stepping'; you need to explicitly collect that register if you need it. You may abbreviate `while-stepping' as `ws' or `stepping'. `set default-collect EXPR1, EXPR2, ...' This variable is a list of expressions to collect at each tracepoint hit. It is effectively an additional `collect' action prepended to every tracepoint action list. The expressions are parsed individually for each tracepoint, so for instance a variable named `xyz' may be interpreted as a global for one tracepoint, and a local for another, as appropriate to the tracepoint's location. `show default-collect' Show the list of expressions that are collected by default at each tracepoint hit.  File: gdb.info, Node: Listing Tracepoints, Next: Listing Static Tracepoint Markers, Prev: Tracepoint Actions, Up: Set Tracepoints 13.1.7 Listing Tracepoints -------------------------- `info tracepoints [NUM...]' Display information about the tracepoint NUM. If you don't specify a tracepoint number, displays information about all the tracepoints defined so far. The format is similar to that used for `info breakpoints'; in fact, `info tracepoints' is the same command, simply restricting itself to tracepoints. A tracepoint's listing may include additional information specific to tracing: * its passcount as given by the `passcount N' command * the state about installed on target of each location (gdb) info trace Num Type Disp Enb Address What 1 tracepoint keep y 0x0804ab57 in foo() at main.cxx:7 while-stepping 20 collect globfoo, $regs end collect globfoo2 end pass count 1200 2 tracepoint keep y <MULTIPLE> collect $eip 2.1 y 0x0804859c in func4 at change-loc.h:35 installed on target 2.2 y 0xb7ffc480 in func4 at change-loc.h:35 installed on target 2.3 y <PENDING> set_tracepoint 3 tracepoint keep y 0x080485b1 in foo at change-loc.c:29 not installed on target (gdb) This command can be abbreviated `info tp'.  File: gdb.info, Node: Listing Static Tracepoint Markers, Next: Starting and Stopping Trace Experiments, Prev: Listing Tracepoints, Up: Set Tracepoints 13.1.8 Listing Static Tracepoint Markers ---------------------------------------- `info static-tracepoint-markers' Display information about all static tracepoint markers defined in the program. For each marker, the following columns are printed: _Count_ An incrementing counter, output to help readability. This is not a stable identifier. _ID_ The marker ID, as reported by the target. _Enabled or Disabled_ Probed markers are tagged with `y'. `n' identifies marks that are not enabled. _Address_ Where the marker is in your program, as a memory address. _What_ Where the marker is in the source for your program, as a file and line number. If the debug information included in the program does not allow GDB to locate the source of the marker, this column will be left blank. In addition, the following information may be printed for each marker: _Data_ User data passed to the tracing library by the marker call. In the UST backend, this is the format string passed as argument to the marker call. _Static tracepoints probing the marker_ The list of static tracepoints attached to the marker. (gdb) info static-tracepoint-markers Cnt ID Enb Address What 1 ust/bar2 y 0x0000000000400e1a in main at stexample.c:25 Data: number1 %d number2 %d Probed by static tracepoints: #2 2 ust/bar33 n 0x0000000000400c87 in main at stexample.c:24 Data: str %s (gdb)  File: gdb.info, Node: Starting and Stopping Trace Experiments, Next: Tracepoint Restrictions, Prev: Listing Static Tracepoint Markers, Up: Set Tracepoints 13.1.9 Starting and Stopping Trace Experiments ---------------------------------------------- `tstart' This command starts the trace experiment, and begins collecting data. It has the side effect of discarding all the data collected in the trace buffer during the previous trace experiment. If any arguments are supplied, they are taken as a note and stored with the trace experiment's state. The notes may be arbitrary text, and are especially useful with disconnected tracing in a multi-user context; the notes can explain what the trace is doing, supply user contact information, and so forth. `tstop' This command stops the trace experiment. If any arguments are supplied, they are recorded with the experiment as a note. This is useful if you are stopping a trace started by someone else, for instance if the trace is interfering with the system's behavior and needs to be stopped quickly. *Note*: a trace experiment and data collection may stop automatically if any tracepoint's passcount is reached (*note Tracepoint Passcounts::), or if the trace buffer becomes full. `tstatus' This command displays the status of the current trace data collection. Here is an example of the commands we described so far: (gdb) trace gdb_c_test (gdb) actions Enter actions for tracepoint #1, one per line. > collect $regs,$locals,$args > while-stepping 11 > collect $regs > end > end (gdb) tstart [time passes ...] (gdb) tstop You can choose to continue running the trace experiment even if GDB disconnects from the target, voluntarily or involuntarily. For commands such as `detach', the debugger will ask what you want to do with the trace. But for unexpected terminations (GDB crash, network outage), it would be unfortunate to lose hard-won trace data, so the variable `disconnected-tracing' lets you decide whether the trace should continue running without GDB. `set disconnected-tracing on' `set disconnected-tracing off' Choose whether a tracing run should continue to run if GDB has disconnected from the target. Note that `detach' or `quit' will ask you directly what to do about a running trace no matter what this variable's setting, so the variable is mainly useful for handling unexpected situations, such as loss of the network. `show disconnected-tracing' Show the current choice for disconnected tracing. When you reconnect to the target, the trace experiment may or may not still be running; it might have filled the trace buffer in the meantime, or stopped for one of the other reasons. If it is running, it will continue after reconnection. Upon reconnection, the target will upload information about the tracepoints in effect. GDB will then compare that information to the set of tracepoints currently defined, and attempt to match them up, allowing for the possibility that the numbers may have changed due to creation and deletion in the meantime. If one of the target's tracepoints does not match any in GDB, the debugger will create a new tracepoint, so that you have a number with which to specify that tracepoint. This matching-up process is necessarily heuristic, and it may result in useless tracepoints being created; you may simply delete them if they are of no use. If your target agent supports a "circular trace buffer", then you can run a trace experiment indefinitely without filling the trace buffer; when space runs out, the agent deletes already-collected trace frames, oldest first, until there is enough room to continue collecting. This is especially useful if your tracepoints are being hit too often, and your trace gets terminated prematurely because the buffer is full. To ask for a circular trace buffer, simply set `circular-trace-buffer' to on. You can set this at any time, including during tracing; if the agent can do it, it will change buffer handling on the fly, otherwise it will not take effect until the next run. `set circular-trace-buffer on' `set circular-trace-buffer off' Choose whether a tracing run should use a linear or circular buffer for trace data. A linear buffer will not lose any trace data, but may fill up prematurely, while a circular buffer will discard old trace data, but it will have always room for the latest tracepoint hits. `show circular-trace-buffer' Show the current choice for the trace buffer. Note that this may not match the agent's current buffer handling, nor is it guaranteed to match the setting that might have been in effect during a past run, for instance if you are looking at frames from a trace file. `set trace-buffer-size N' Request that the target use a trace buffer of N bytes. Not all targets will honor the request; they may have a compiled-in size for the trace buffer, or some other limitation. Set to a value of `-1' to let the target use whatever size it likes. This is also the default. `show trace-buffer-size' Show the current requested size for the trace buffer. Note that this will only match the actual size if the target supports size-setting, and was able to handle the requested size. For instance, if the target can only change buffer size between runs, this variable will not reflect the change until the next run starts. Use `tstatus' to get a report of the actual buffer size. `set trace-user TEXT' `show trace-user' `set trace-notes TEXT' Set the trace run's notes. `show trace-notes' Show the trace run's notes. `set trace-stop-notes TEXT' Set the trace run's stop notes. The handling of the note is as for `tstop' arguments; the set command is convenient way to fix a stop note that is mistaken or incomplete. `show trace-stop-notes' Show the trace run's stop notes.  File: gdb.info, Node: Tracepoint Restrictions, Prev: Starting and Stopping Trace Experiments, Up: Set Tracepoints 13.1.10 Tracepoint Restrictions ------------------------------- There are a number of restrictions on the use of tracepoints. As described above, tracepoint data gathering occurs on the target without interaction from GDB. Thus the full capabilities of the debugger are not available during data gathering, and then at data examination time, you will be limited by only having what was collected. The following items describe some common problems, but it is not exhaustive, and you may run into additional difficulties not mentioned here. * Tracepoint expressions are intended to gather objects (lvalues). Thus the full flexibility of GDB's expression evaluator is not available. You cannot call functions, cast objects to aggregate types, access convenience variables or modify values (except by assignment to trace state variables). Some language features may implicitly call functions (for instance Objective-C fields with accessors), and therefore cannot be collected either. * Collection of local variables, either individually or in bulk with `$locals' or `$args', during `while-stepping' may behave erratically. The stepping action may enter a new scope (for instance by stepping into a function), or the location of the variable may change (for instance it is loaded into a register). The tracepoint data recorded uses the location information for the variables that is correct for the tracepoint location. When the tracepoint is created, it is not possible, in general, to determine where the steps of a `while-stepping' sequence will advance the program--particularly if a conditional branch is stepped. * Collection of an incompletely-initialized or partially-destroyed object may result in something that GDB cannot display, or displays in a misleading way. * When GDB displays a pointer to character it automatically dereferences the pointer to also display characters of the string being pointed to. However, collecting the pointer during tracing does not automatically collect the string. You need to explicitly dereference the pointer and provide size information if you want to collect not only the pointer, but the memory pointed to. For example, `*ptr@50' can be used to collect the 50 element array pointed to by `ptr'. * It is not possible to collect a complete stack backtrace at a tracepoint. Instead, you may collect the registers and a few hundred bytes from the stack pointer with something like `*(unsigned char *)$esp@300' (adjust to use the name of the actual stack pointer register on your target architecture, and the amount of stack you wish to capture). Then the `backtrace' command will show a partial backtrace when using a trace frame. The number of stack frames that can be examined depends on the sizes of the frames in the collected stack. Note that if you ask for a block so large that it goes past the bottom of the stack, the target agent may report an error trying to read from an invalid address. * If you do not collect registers at a tracepoint, GDB can infer that the value of `$pc' must be the same as the address of the tracepoint and use that when you are looking at a trace frame for that tracepoint. However, this cannot work if the tracepoint has multiple locations (for instance if it was set in a function that was inlined), or if it has a `while-stepping' loop. In those cases GDB will warn you that it can't infer `$pc', and default it to zero.  File: gdb.info, Node: Analyze Collected Data, Next: Tracepoint Variables, Prev: Set Tracepoints, Up: Tracepoints 13.2 Using the Collected Data ============================= After the tracepoint experiment ends, you use GDB commands for examining the trace data. The basic idea is that each tracepoint collects a trace "snapshot" every time it is hit and another snapshot every time it single-steps. All these snapshots are consecutively numbered from zero and go into a buffer, and you can examine them later. The way you examine them is to "focus" on a specific trace snapshot. When the remote stub is focused on a trace snapshot, it will respond to all GDB requests for memory and registers by reading from the buffer which belongs to that snapshot, rather than from _real_ memory or registers of the program being debugged. This means that *all* GDB commands (`print', `info registers', `backtrace', etc.) will behave as if we were currently debugging the program state as it was when the tracepoint occurred. Any requests for data that are not in the buffer will fail. * Menu: * tfind:: How to select a trace snapshot * tdump:: How to display all data for a snapshot * save tracepoints:: How to save tracepoints for a future run  File: gdb.info, Node: tfind, Next: tdump, Up: Analyze Collected Data 13.2.1 `tfind N' ---------------- The basic command for selecting a trace snapshot from the buffer is `tfind N', which finds trace snapshot number N, counting from zero. If no argument N is given, the next snapshot is selected. Here are the various forms of using the `tfind' command. `tfind start' Find the first snapshot in the buffer. This is a synonym for `tfind 0' (since 0 is the number of the first snapshot). `tfind none' Stop debugging trace snapshots, resume _live_ debugging. `tfind end' Same as `tfind none'. `tfind' No argument means find the next trace snapshot. `tfind -' Find the previous trace snapshot before the current one. This permits retracing earlier steps. `tfind tracepoint NUM' Find the next snapshot associated with tracepoint NUM. Search proceeds forward from the last examined trace snapshot. If no argument NUM is given, it means find the next snapshot collected for the same tracepoint as the current snapshot. `tfind pc ADDR' Find the next snapshot associated with the value ADDR of the program counter. Search proceeds forward from the last examined trace snapshot. If no argument ADDR is given, it means find the next snapshot with the same value of PC as the current snapshot. `tfind outside ADDR1, ADDR2' Find the next snapshot whose PC is outside the given range of addresses (exclusive). `tfind range ADDR1, ADDR2' Find the next snapshot whose PC is between ADDR1 and ADDR2 (inclusive). `tfind line [FILE:]N' Find the next snapshot associated with the source line N. If the optional argument FILE is given, refer to line N in that source file. Search proceeds forward from the last examined trace snapshot. If no argument N is given, it means find the next line other than the one currently being examined; thus saying `tfind line' repeatedly can appear to have the same effect as stepping from line to line in a _live_ debugging session. The default arguments for the `tfind' commands are specifically designed to make it easy to scan through the trace buffer. For instance, `tfind' with no argument selects the next trace snapshot, and `tfind -' with no argument selects the previous trace snapshot. So, by giving one `tfind' command, and then simply hitting <RET> repeatedly you can examine all the trace snapshots in order. Or, by saying `tfind -' and then hitting <RET> repeatedly you can examine the snapshots in reverse order. The `tfind line' command with no argument selects the snapshot for the next source line executed. The `tfind pc' command with no argument selects the next snapshot with the same program counter (PC) as the current frame. The `tfind tracepoint' command with no argument selects the next trace snapshot collected by the same tracepoint as the current one. In addition to letting you scan through the trace buffer manually, these commands make it easy to construct GDB scripts that scan through the trace buffer and print out whatever collected data you are interested in. Thus, if we want to examine the PC, FP, and SP registers from each trace frame in the buffer, we can say this: (gdb) tfind start (gdb) while ($trace_frame != -1) > printf "Frame %d, PC = %08X, SP = %08X, FP = %08X\n", \ $trace_frame, $pc, $sp, $fp > tfind > end Frame 0, PC = 0020DC64, SP = 0030BF3C, FP = 0030BF44 Frame 1, PC = 0020DC6C, SP = 0030BF38, FP = 0030BF44 Frame 2, PC = 0020DC70, SP = 0030BF34, FP = 0030BF44 Frame 3, PC = 0020DC74, SP = 0030BF30, FP = 0030BF44 Frame 4, PC = 0020DC78, SP = 0030BF2C, FP = 0030BF44 Frame 5, PC = 0020DC7C, SP = 0030BF28, FP = 0030BF44 Frame 6, PC = 0020DC80, SP = 0030BF24, FP = 0030BF44 Frame 7, PC = 0020DC84, SP = 0030BF20, FP = 0030BF44 Frame 8, PC = 0020DC88, SP = 0030BF1C, FP = 0030BF44 Frame 9, PC = 0020DC8E, SP = 0030BF18, FP = 0030BF44 Frame 10, PC = 00203F6C, SP = 0030BE3C, FP = 0030BF14 Or, if we want to examine the variable `X' at each source line in the buffer: (gdb) tfind start (gdb) while ($trace_frame != -1) > printf "Frame %d, X == %d\n", $trace_frame, X > tfind line > end Frame 0, X = 1 Frame 7, X = 2 Frame 13, X = 255  File: gdb.info, Node: tdump, Next: save tracepoints, Prev: tfind, Up: Analyze Collected Data 13.2.2 `tdump' -------------- This command takes no arguments. It prints all the data collected at the current trace snapshot. (gdb) trace 444 (gdb) actions Enter actions for tracepoint #2, one per line: > collect $regs, $locals, $args, gdb_long_test > end (gdb) tstart (gdb) tfind line 444 #0 gdb_test (p1=0x11, p2=0x22, p3=0x33, p4=0x44, p5=0x55, p6=0x66) at gdb_test.c:444 444 printp( "%s: arguments = 0x%X 0x%X 0x%X 0x%X 0x%X 0x%X\n", ) (gdb) tdump Data collected at tracepoint 2, trace frame 1: d0 0xc4aa0085 -995491707 d1 0x18 24 d2 0x80 128 d3 0x33 51 d4 0x71aea3d 119204413 d5 0x22 34 d6 0xe0 224 d7 0x380035 3670069 a0 0x19e24a 1696330 a1 0x3000668 50333288 a2 0x100 256 a3 0x322000 3284992 a4 0x3000698 50333336 a5 0x1ad3cc 1758156 fp 0x30bf3c 0x30bf3c sp 0x30bf34 0x30bf34 ps 0x0 0 pc 0x20b2c8 0x20b2c8 fpcontrol 0x0 0 fpstatus 0x0 0 fpiaddr 0x0 0 p = 0x20e5b4 "gdb-test" p1 = (void *) 0x11 p2 = (void *) 0x22 p3 = (void *) 0x33 p4 = (void *) 0x44 p5 = (void *) 0x55 p6 = (void *) 0x66 gdb_long_test = 17 '\021' (gdb) `tdump' works by scanning the tracepoint's current collection actions and printing the value of each expression listed. So `tdump' can fail, if after a run, you change the tracepoint's actions to mention variables that were not collected during the run. Also, for tracepoints with `while-stepping' loops, `tdump' uses the collected value of `$pc' to distinguish between trace frames that were collected at the tracepoint hit, and frames that were collected while stepping. This allows it to correctly choose whether to display the basic list of collections, or the collections from the body of the while-stepping loop. However, if `$pc' was not collected, then `tdump' will always attempt to dump using the basic collection list, and may fail if a while-stepping frame does not include all the same data that is collected at the tracepoint hit.  File: gdb.info, Node: save tracepoints, Prev: tdump, Up: Analyze Collected Data 13.2.3 `save tracepoints FILENAME' ---------------------------------- This command saves all current tracepoint definitions together with their actions and passcounts, into a file `FILENAME' suitable for use in a later debugging session. To read the saved tracepoint definitions, use the `source' command (*note Command Files::). The `save-tracepoints' command is a deprecated alias for `save tracepoints'  File: gdb.info, Node: Tracepoint Variables, Next: Trace Files, Prev: Analyze Collected Data, Up: Tracepoints 13.3 Convenience Variables for Tracepoints ========================================== `(int) $trace_frame' The current trace snapshot (a.k.a. "frame") number, or -1 if no snapshot is selected. `(int) $tracepoint' The tracepoint for the current trace snapshot. `(int) $trace_line' The line number for the current trace snapshot. `(char []) $trace_file' The source file for the current trace snapshot. `(char []) $trace_func' The name of the function containing `$tracepoint'. Note: `$trace_file' is not suitable for use in `printf', use `output' instead. Here's a simple example of using these convenience variables for stepping through all the trace snapshots and printing some of their data. Note that these are not the same as trace state variables, which are managed by the target. (gdb) tfind start (gdb) while $trace_frame != -1 > output $trace_file > printf ", line %d (tracepoint #%d)\n", $trace_line, $tracepoint > tfind > end  File: gdb.info, Node: Trace Files, Prev: Tracepoint Variables, Up: Tracepoints 13.4 Using Trace Files ====================== In some situations, the target running a trace experiment may no longer be available; perhaps it crashed, or the hardware was needed for a different activity. To handle these cases, you can arrange to dump the trace data into a file, and later use that file as a source of trace data, via the `target tfile' command. `tsave [ -r ] FILENAME' Save the trace data to FILENAME. By default, this command assumes that FILENAME refers to the host filesystem, so if necessary GDB will copy raw trace data up from the target and then save it. If the target supports it, you can also supply the optional argument `-r' ("remote") to direct the target to save the data directly into FILENAME in its own filesystem, which may be more efficient if the trace buffer is very large. (Note, however, that `target tfile' can only read from files accessible to the host.) `target tfile FILENAME' Use the file named FILENAME as a source of trace data. Commands that examine data work as they do with a live target, but it is not possible to run any new trace experiments. `tstatus' will report the state of the trace run at the moment the data was saved, as well as the current trace frame you are examining. FILENAME must be on a filesystem accessible to the host.  File: gdb.info, Node: Overlays, Next: Languages, Prev: Tracepoints, Up: Top 14 Debugging Programs That Use Overlays *************************************** If your program is too large to fit completely in your target system's memory, you can sometimes use "overlays" to work around this problem. GDB provides some support for debugging programs that use overlays. * Menu: * How Overlays Work:: A general explanation of overlays. * Overlay Commands:: Managing overlays in GDB. * Automatic Overlay Debugging:: GDB can find out which overlays are mapped by asking the inferior. * Overlay Sample Program:: A sample program using overlays.  File: gdb.info, Node: How Overlays Work, Next: Overlay Commands, Up: Overlays 14.1 How Overlays Work ====================== Suppose you have a computer whose instruction address space is only 64 kilobytes long, but which has much more memory which can be accessed by other means: special instructions, segment registers, or memory management hardware, for example. Suppose further that you want to adapt a program which is larger than 64 kilobytes to run on this system. One solution is to identify modules of your program which are relatively independent, and need not call each other directly; call these modules "overlays". Separate the overlays from the main program, and place their machine code in the larger memory. Place your main program in instruction memory, but leave at least enough space there to hold the largest overlay as well. Now, to call a function located in an overlay, you must first copy that overlay's machine code from the large memory into the space set aside for it in the instruction memory, and then jump to its entry point there. Data Instruction Larger Address Space Address Space Address Space +-----------+ +-----------+ +-----------+ | | | | | | +-----------+ +-----------+ +-----------+<-- overlay 1 | program | | main | .----| overlay 1 | load address | variables | | program | | +-----------+ | and heap | | | | | | +-----------+ | | | +-----------+<-- overlay 2 | | +-----------+ | | | load address +-----------+ | | | .-| overlay 2 | | | | | | | mapped --->+-----------+ | | +-----------+ address | | | | | | | overlay | <-' | | | | area | <---' +-----------+<-- overlay 3 | | <---. | | load address +-----------+ `--| overlay 3 | | | | | +-----------+ | | +-----------+ | | +-----------+ A code overlay The diagram (*note A code overlay::) shows a system with separate data and instruction address spaces. To map an overlay, the program copies its code from the larger address space to the instruction address space. Since the overlays shown here all use the same mapped address, only one may be mapped at a time. For a system with a single address space for data and instructions, the diagram would be similar, except that the program variables and heap would share an address space with the main program and the overlay area. An overlay loaded into instruction memory and ready for use is called a "mapped" overlay; its "mapped address" is its address in the instruction memory. An overlay not present (or only partially present) in instruction memory is called "unmapped"; its "load address" is its address in the larger memory. The mapped address is also called the "virtual memory address", or "VMA"; the load address is also called the "load memory address", or "LMA". Unfortunately, overlays are not a completely transparent way to adapt a program to limited instruction memory. They introduce a new set of global constraints you must keep in mind as you design your program: * Before calling or returning to a function in an overlay, your program must make sure that overlay is actually mapped. Otherwise, the call or return will transfer control to the right address, but in the wrong overlay, and your program will probably crash. * If the process of mapping an overlay is expensive on your system, you will need to choose your overlays carefully to minimize their effect on your program's performance. * The executable file you load onto your system must contain each overlay's instructions, appearing at the overlay's load address, not its mapped address. However, each overlay's instructions must be relocated and its symbols defined as if the overlay were at its mapped address. You can use GNU linker scripts to specify different load and relocation addresses for pieces of your program; see *note Overlay Description: (ld.info)Overlay Description. * The procedure for loading executable files onto your system must be able to load their contents into the larger address space as well as the instruction and data spaces. The overlay system described above is rather simple, and could be improved in many ways: * If your system has suitable bank switch registers or memory management hardware, you could use those facilities to make an overlay's load area contents simply appear at their mapped address in instruction space. This would probably be faster than copying the overlay to its mapped area in the usual way. * If your overlays are small enough, you could set aside more than one overlay area, and have more than one overlay mapped at a time. * You can use overlays to manage data, as well as instructions. In general, data overlays are even less transparent to your design than code overlays: whereas code overlays only require care when you call or return to functions, data overlays require care every time you access the data. Also, if you change the contents of a data overlay, you must copy its contents back out to its load address before you can copy a different data overlay into the same mapped area.  File: gdb.info, Node: Overlay Commands, Next: Automatic Overlay Debugging, Prev: How Overlays Work, Up: Overlays 14.2 Overlay Commands ===================== To use GDB's overlay support, each overlay in your program must correspond to a separate section of the executable file. The section's virtual memory address and load memory address must be the overlay's mapped and load addresses. Identifying overlays with sections allows GDB to determine the appropriate address of a function or variable, depending on whether the overlay is mapped or not. GDB's overlay commands all start with the word `overlay'; you can abbreviate this as `ov' or `ovly'. The commands are: `overlay off' Disable GDB's overlay support. When overlay support is disabled, GDB assumes that all functions and variables are always present at their mapped addresses. By default, GDB's overlay support is disabled. `overlay manual' Enable "manual" overlay debugging. In this mode, GDB relies on you to tell it which overlays are mapped, and which are not, using the `overlay map-overlay' and `overlay unmap-overlay' commands described below. `overlay map-overlay OVERLAY' `overlay map OVERLAY' Tell GDB that OVERLAY is now mapped; OVERLAY must be the name of the object file section containing the overlay. When an overlay is mapped, GDB assumes it can find the overlay's functions and variables at their mapped addresses. GDB assumes that any other overlays whose mapped ranges overlap that of OVERLAY are now unmapped. `overlay unmap-overlay OVERLAY' `overlay unmap OVERLAY' Tell GDB that OVERLAY is no longer mapped; OVERLAY must be the name of the object file section containing the overlay. When an overlay is unmapped, GDB assumes it can find the overlay's functions and variables at their load addresses. `overlay auto' Enable "automatic" overlay debugging. In this mode, GDB consults a data structure the overlay manager maintains in the inferior to see which overlays are mapped. For details, see *note Automatic Overlay Debugging::. `overlay load-target' `overlay load' Re-read the overlay table from the inferior. Normally, GDB re-reads the table GDB automatically each time the inferior stops, so this command should only be necessary if you have changed the overlay mapping yourself using GDB. This command is only useful when using automatic overlay debugging. `overlay list-overlays' `overlay list' Display a list of the overlays currently mapped, along with their mapped addresses, load addresses, and sizes. Normally, when GDB prints a code address, it includes the name of the function the address falls in: (gdb) print main $3 = {int ()} 0x11a0 <main> When overlay debugging is enabled, GDB recognizes code in unmapped overlays, and prints the names of unmapped functions with asterisks around them. For example, if `foo' is a function in an unmapped overlay, GDB prints it this way: (gdb) overlay list No sections are mapped. (gdb) print foo $5 = {int (int)} 0x100000 <*foo*> When `foo''s overlay is mapped, GDB prints the function's name normally: (gdb) overlay list Section .ov.foo.text, loaded at 0x100000 - 0x100034, mapped at 0x1016 - 0x104a (gdb) print foo $6 = {int (int)} 0x1016 <foo> When overlay debugging is enabled, GDB can find the correct address for functions and variables in an overlay, whether or not the overlay is mapped. This allows most GDB commands, like `break' and `disassemble', to work normally, even on unmapped code. However, GDB's breakpoint support has some limitations: * You can set breakpoints in functions in unmapped overlays, as long as GDB can write to the overlay at its load address. * GDB can not set hardware or simulator-based breakpoints in unmapped overlays. However, if you set a breakpoint at the end of your overlay manager (and tell GDB which overlays are now mapped, if you are using manual overlay management), GDB will re-set its breakpoints properly.  File: gdb.info, Node: Automatic Overlay Debugging, Next: Overlay Sample Program, Prev: Overlay Commands, Up: Overlays 14.3 Automatic Overlay Debugging ================================ GDB can automatically track which overlays are mapped and which are not, given some simple co-operation from the overlay manager in the inferior. If you enable automatic overlay debugging with the `overlay auto' command (*note Overlay Commands::), GDB looks in the inferior's memory for certain variables describing the current state of the overlays. Here are the variables your overlay manager must define to support GDB's automatic overlay debugging: `_ovly_table': This variable must be an array of the following structures: struct { /* The overlay's mapped address. */ unsigned long vma; /* The size of the overlay, in bytes. */ unsigned long size; /* The overlay's load address. */ unsigned long lma; /* Non-zero if the overlay is currently mapped; zero otherwise. */ unsigned long mapped; } `_novlys': This variable must be a four-byte signed integer, holding the total number of elements in `_ovly_table'. To decide whether a particular overlay is mapped or not, GDB looks for an entry in `_ovly_table' whose `vma' and `lma' members equal the VMA and LMA of the overlay's section in the executable file. When GDB finds a matching entry, it consults the entry's `mapped' member to determine whether the overlay is currently mapped. In addition, your overlay manager may define a function called `_ovly_debug_event'. If this function is defined, GDB will silently set a breakpoint there. If the overlay manager then calls this function whenever it has changed the overlay table, this will enable GDB to accurately keep track of which overlays are in program memory, and update any breakpoints that may be set in overlays. This will allow breakpoints to work even if the overlays are kept in ROM or other non-writable memory while they are not being executed.  File: gdb.info, Node: Overlay Sample Program, Prev: Automatic Overlay Debugging, Up: Overlays 14.4 Overlay Sample Program =========================== When linking a program which uses overlays, you must place the overlays at their load addresses, while relocating them to run at their mapped addresses. To do this, you must write a linker script (*note Overlay Description: (ld.info)Overlay Description.). Unfortunately, since linker scripts are specific to a particular host system, target architecture, and target memory layout, this manual cannot provide portable sample code demonstrating GDB's overlay support. However, the GDB source distribution does contain an overlaid program, with linker scripts for a few systems, as part of its test suite. The program consists of the following files from `gdb/testsuite/gdb.base': `overlays.c' The main program file. `ovlymgr.c' A simple overlay manager, used by `overlays.c'. `foo.c' `bar.c' `baz.c' `grbx.c' Overlay modules, loaded and used by `overlays.c'. `d10v.ld' `m32r.ld' Linker scripts for linking the test program on the `d10v-elf' and `m32r-elf' targets. You can build the test program using the `d10v-elf' GCC cross-compiler like this: $ d10v-elf-gcc -g -c overlays.c $ d10v-elf-gcc -g -c ovlymgr.c $ d10v-elf-gcc -g -c foo.c $ d10v-elf-gcc -g -c bar.c $ d10v-elf-gcc -g -c baz.c $ d10v-elf-gcc -g -c grbx.c $ d10v-elf-gcc -g overlays.o ovlymgr.o foo.o bar.o \ baz.o grbx.o -Wl,-Td10v.ld -o overlays The build process is identical for any other architecture, except that you must substitute the appropriate compiler and linker script for the target system for `d10v-elf-gcc' and `d10v.ld'.  File: gdb.info, Node: Languages, Next: Symbols, Prev: Overlays, Up: Top 15 Using GDB with Different Languages ************************************* Although programming languages generally have common aspects, they are rarely expressed in the same manner. For instance, in ANSI C, dereferencing a pointer `p' is accomplished by `*p', but in Modula-2, it is accomplished by `p^'. Values can also be represented (and displayed) differently. Hex numbers in C appear as `0x1ae', while in Modula-2 they appear as `1AEH'. Language-specific information is built into GDB for some languages, allowing you to express operations like the above in your program's native language, and allowing GDB to output values in a manner consistent with the syntax of your program's native language. The language you use to build expressions is called the "working language". * Menu: * Setting:: Switching between source languages * Show:: Displaying the language * Checks:: Type and range checks * Supported Languages:: Supported languages * Unsupported Languages:: Unsupported languages  File: gdb.info, Node: Setting, Next: Show, Up: Languages 15.1 Switching Between Source Languages ======================================= There are two ways to control the working language--either have GDB set it automatically, or select it manually yourself. You can use the `set language' command for either purpose. On startup, GDB defaults to setting the language automatically. The working language is used to determine how expressions you type are interpreted, how values are printed, etc. In addition to the working language, every source file that GDB knows about has its own working language. For some object file formats, the compiler might indicate which language a particular source file is in. However, most of the time GDB infers the language from the name of the file. The language of a source file controls whether C++ names are demangled--this way `backtrace' can show each frame appropriately for its own language. There is no way to set the language of a source file from within GDB, but you can set the language associated with a filename extension. *Note Displaying the Language: Show. This is most commonly a problem when you use a program, such as `cfront' or `f2c', that generates C but is written in another language. In that case, make the program use `#line' directives in its C output; that way GDB will know the correct language of the source code of the original program, and will display that source code, not the generated C code. * Menu: * Filenames:: Filename extensions and languages. * Manually:: Setting the working language manually * Automatically:: Having GDB infer the source language  File: gdb.info, Node: Filenames, Next: Manually, Up: Setting 15.1.1 List of Filename Extensions and Languages ------------------------------------------------ If a source file name ends in one of the following extensions, then GDB infers that its language is the one indicated. `.ada' `.ads' `.adb' `.a' Ada source file. `.c' C source file `.C' `.cc' `.cp' `.cpp' `.cxx' `.c++' C++ source file `.d' D source file `.m' Objective-C source file `.f' `.F' Fortran source file `.mod' Modula-2 source file `.s' `.S' Assembler source file. This actually behaves almost like C, but GDB does not skip over function prologues when stepping. In addition, you may set the language associated with a filename extension. *Note Displaying the Language: Show.  File: gdb.info, Node: Manually, Next: Automatically, Prev: Filenames, Up: Setting 15.1.2 Setting the Working Language ----------------------------------- If you allow GDB to set the language automatically, expressions are interpreted the same way in your debugging session and your program. If you wish, you may set the language manually. To do this, issue the command `set language LANG', where LANG is the name of a language, such as `c' or `modula-2'. For a list of the supported languages, type `set language'. Setting the language manually prevents GDB from updating the working language automatically. This can lead to confusion if you try to debug a program when the working language is not the same as the source language, when an expression is acceptable to both languages--but means different things. For instance, if the current source file were written in C, and GDB was parsing Modula-2, a command such as: print a = b + c might not have the effect you intended. In C, this means to add `b' and `c' and place the result in `a'. The result printed would be the value of `a'. In Modula-2, this means to compare `a' to the result of `b+c', yielding a `BOOLEAN' value.  File: gdb.info, Node: Automatically, Prev: Manually, Up: Setting 15.1.3 Having GDB Infer the Source Language ------------------------------------------- To have GDB set the working language automatically, use `set language local' or `set language auto'. GDB then infers the working language. That is, when your program stops in a frame (usually by encountering a breakpoint), GDB sets the working language to the language recorded for the function in that frame. If the language for a frame is unknown (that is, if the function or block corresponding to the frame was defined in a source file that does not have a recognized extension), the current working language is not changed, and GDB issues a warning. This may not seem necessary for most programs, which are written entirely in one source language. However, program modules and libraries written in one source language can be used by a main program written in a different source language. Using `set language auto' in this case frees you from having to set the working language manually.  File: gdb.info, Node: Show, Next: Checks, Prev: Setting, Up: Languages 15.2 Displaying the Language ============================ The following commands help you find out which language is the working language, and also what language source files were written in. `show language' Display the current working language. This is the language you can use with commands such as `print' to build and compute expressions that may involve variables in your program. `info frame' Display the source language for this frame. This language becomes the working language if you use an identifier from this frame. *Note Information about a Frame: Frame Info, to identify the other information listed here. `info source' Display the source language of this source file. *Note Examining the Symbol Table: Symbols, to identify the other information listed here. In unusual circumstances, you may have source files with extensions not in the standard list. You can then set the extension associated with a language explicitly: `set extension-language EXT LANGUAGE' Tell GDB that source files with extension EXT are to be assumed as written in the source language LANGUAGE. `info extensions' List all the filename extensions and the associated languages.  File: gdb.info, Node: Checks, Next: Supported Languages, Prev: Show, Up: Languages 15.3 Type and Range Checking ============================ Some languages are designed to guard you against making seemingly common errors through a series of compile- and run-time checks. These include checking the type of arguments to functions and operators and making sure mathematical overflows are caught at run time. Checks such as these help to ensure a program's correctness once it has been compiled by eliminating type mismatches and providing active checks for range errors when your program is running. By default GDB checks for these errors according to the rules of the current source language. Although GDB does not check the statements in your program, it can check expressions entered directly into GDB for evaluation via the `print' command, for example. * Menu: * Type Checking:: An overview of type checking * Range Checking:: An overview of range checking  File: gdb.info, Node: Type Checking, Next: Range Checking, Up: Checks 15.3.1 An Overview of Type Checking ----------------------------------- Some languages, such as C and C++, are strongly typed, meaning that the arguments to operators and functions have to be of the correct type, otherwise an error occurs. These checks prevent type mismatch errors from ever causing any run-time problems. For example, int klass::my_method(char *b) { return b ? 1 : 2; } (gdb) print obj.my_method (0) $1 = 2 but (gdb) print obj.my_method (0x1234) Cannot resolve method klass::my_method to any overloaded instance The second example fails because in C++ the integer constant `0x1234' is not type-compatible with the pointer parameter type. For the expressions you use in GDB commands, you can tell GDB to not enforce strict type checking or to treat any mismatches as errors and abandon the expression; When type checking is disabled, GDB successfully evaluates expressions like the second example above. Even if type checking is off, there may be other reasons related to type that prevent GDB from evaluating an expression. For instance, GDB does not know how to add an `int' and a `struct foo'. These particular type errors have nothing to do with the language in use and usually arise from expressions which make little sense to evaluate anyway. GDB provides some additional commands for controlling type checking: `set check type on' `set check type off' Set strict type checking on or off. If any type mismatches occur in evaluating an expression while type checking is on, GDB prints a message and aborts evaluation of the expression. `show check type' Show the current setting of type checking and whether GDB is enforcing strict type checking rules.  File: gdb.info, Node: Range Checking, Prev: Type Checking, Up: Checks 15.3.2 An Overview of Range Checking ------------------------------------ In some languages (such as Modula-2), it is an error to exceed the bounds of a type; this is enforced with run-time checks. Such range checking is meant to ensure program correctness by making sure computations do not overflow, or indices on an array element access do not exceed the bounds of the array. For expressions you use in GDB commands, you can tell GDB to treat range errors in one of three ways: ignore them, always treat them as errors and abandon the expression, or issue warnings but evaluate the expression anyway. A range error can result from numerical overflow, from exceeding an array index bound, or when you type a constant that is not a member of any type. Some languages, however, do not treat overflows as an error. In many implementations of C, mathematical overflow causes the result to "wrap around" to lower values--for example, if M is the largest integer value, and S is the smallest, then M + 1 => S This, too, is specific to individual languages, and in some cases specific to individual compilers or machines. *Note Supported Languages: Supported Languages, for further details on specific languages. GDB provides some additional commands for controlling the range checker: `set check range auto' Set range checking on or off based on the current working language. *Note Supported Languages: Supported Languages, for the default settings for each language. `set check range on' `set check range off' Set range checking on or off, overriding the default setting for the current working language. A warning is issued if the setting does not match the language default. If a range error occurs and range checking is on, then a message is printed and evaluation of the expression is aborted. `set check range warn' Output messages when the GDB range checker detects a range error, but attempt to evaluate the expression anyway. Evaluating the expression may still be impossible for other reasons, such as accessing memory that the process does not own (a typical example from many Unix systems). `show range' Show the current setting of the range checker, and whether or not it is being set automatically by GDB.  File: gdb.info, Node: Supported Languages, Next: Unsupported Languages, Prev: Checks, Up: Languages 15.4 Supported Languages ======================== GDB supports C, C++, D, Go, Objective-C, Fortran, Java, OpenCL C, Pascal, assembly, Modula-2, and Ada. Some GDB features may be used in expressions regardless of the language you use: the GDB `@' and `::' operators, and the `{type}addr' construct (*note Expressions: Expressions.) can be used with the constructs of any supported language. The following sections detail to what degree each source language is supported by GDB. These sections are not meant to be language tutorials or references, but serve only as a reference guide to what the GDB expression parser accepts, and what input and output formats should look like for different languages. There are many good books written on each of these languages; please look to these for a language reference or tutorial. * Menu: * C:: C and C++ * D:: D * Go:: Go * Objective-C:: Objective-C * OpenCL C:: OpenCL C * Fortran:: Fortran * Pascal:: Pascal * Modula-2:: Modula-2 * Ada:: Ada  File: gdb.info, Node: C, Next: D, Up: Supported Languages 15.4.1 C and C++ ---------------- Since C and C++ are so closely related, many features of GDB apply to both languages. Whenever this is the case, we discuss those languages together. The C++ debugging facilities are jointly implemented by the C++ compiler and GDB. Therefore, to debug your C++ code effectively, you must compile your C++ programs with a supported C++ compiler, such as GNU `g++', or the HP ANSI C++ compiler (`aCC'). * Menu: * C Operators:: C and C++ operators * C Constants:: C and C++ constants * C Plus Plus Expressions:: C++ expressions * C Defaults:: Default settings for C and C++ * C Checks:: C and C++ type and range checks * Debugging C:: GDB and C * Debugging C Plus Plus:: GDB features for C++ * Decimal Floating Point:: Numbers in Decimal Floating Point format  File: gdb.info, Node: C Operators, Next: C Constants, Up: C 15.4.1.1 C and C++ Operators ............................ Operators must be defined on values of specific types. For instance, `+' is defined on numbers, but not on structures. Operators are often defined on groups of types. For the purposes of C and C++, the following definitions hold: * _Integral types_ include `int' with any of its storage-class specifiers; `char'; `enum'; and, for C++, `bool'. * _Floating-point types_ include `float', `double', and `long double' (if supported by the target platform). * _Pointer types_ include all types defined as `(TYPE *)'. * _Scalar types_ include all of the above. The following operators are supported. They are listed here in order of increasing precedence: `,' The comma or sequencing operator. Expressions in a comma-separated list are evaluated from left to right, with the result of the entire expression being the last expression evaluated. `=' Assignment. The value of an assignment expression is the value assigned. Defined on scalar types. `OP=' Used in an expression of the form `A OP= B', and translated to `A = A OP B'. `OP=' and `=' have the same precedence. OP is any one of the operators `|', `^', `&', `<<', `>>', `+', `-', `*', `/', `%'. `?:' The ternary operator. `A ? B : C' can be thought of as: if A then B else C. A should be of an integral type. `||' Logical OR. Defined on integral types. `&&' Logical AND. Defined on integral types. `|' Bitwise OR. Defined on integral types. `^' Bitwise exclusive-OR. Defined on integral types. `&' Bitwise AND. Defined on integral types. `==, !=' Equality and inequality. Defined on scalar types. The value of these expressions is 0 for false and non-zero for true. `<, >, <=, >=' Less than, greater than, less than or equal, greater than or equal. Defined on scalar types. The value of these expressions is 0 for false and non-zero for true. `<<, >>' left shift, and right shift. Defined on integral types. `@' The GDB "artificial array" operator (*note Expressions: Expressions.). `+, -' Addition and subtraction. Defined on integral types, floating-point types and pointer types. `*, /, %' Multiplication, division, and modulus. Multiplication and division are defined on integral and floating-point types. Modulus is defined on integral types. `++, --' Increment and decrement. When appearing before a variable, the operation is performed before the variable is used in an expression; when appearing after it, the variable's value is used before the operation takes place. `*' Pointer dereferencing. Defined on pointer types. Same precedence as `++'. `&' Address operator. Defined on variables. Same precedence as `++'. For debugging C++, GDB implements a use of `&' beyond what is allowed in the C++ language itself: you can use `&(&REF)' to examine the address where a C++ reference variable (declared with `&REF') is stored. `-' Negative. Defined on integral and floating-point types. Same precedence as `++'. `!' Logical negation. Defined on integral types. Same precedence as `++'. `~' Bitwise complement operator. Defined on integral types. Same precedence as `++'. `., ->' Structure member, and pointer-to-structure member. For convenience, GDB regards the two as equivalent, choosing whether to dereference a pointer based on the stored type information. Defined on `struct' and `union' data. `.*, ->*' Dereferences of pointers to members. `[]' Array indexing. `A[I]' is defined as `*(A+I)'. Same precedence as `->'. `()' Function parameter list. Same precedence as `->'. `::' C++ scope resolution operator. Defined on `struct', `union', and `class' types. `::' Doubled colons also represent the GDB scope operator (*note Expressions: Expressions.). Same precedence as `::', above. If an operator is redefined in the user code, GDB usually attempts to invoke the redefined version instead of using the operator's predefined meaning.  File: gdb.info, Node: C Constants, Next: C Plus Plus Expressions, Prev: C Operators, Up: C 15.4.1.2 C and C++ Constants ............................ GDB allows you to express the constants of C and C++ in the following ways: * Integer constants are a sequence of digits. Octal constants are specified by a leading `0' (i.e. zero), and hexadecimal constants by a leading `0x' or `0X'. Constants may also end with a letter `l', specifying that the constant should be treated as a `long' value. * Floating point constants are a sequence of digits, followed by a decimal point, followed by a sequence of digits, and optionally followed by an exponent. An exponent is of the form: `e[[+]|-]NNN', where NNN is another sequence of digits. The `+' is optional for positive exponents. A floating-point constant may also end with a letter `f' or `F', specifying that the constant should be treated as being of the `float' (as opposed to the default `double') type; or with a letter `l' or `L', which specifies a `long double' constant. * Enumerated constants consist of enumerated identifiers, or their integral equivalents. * Character constants are a single character surrounded by single quotes (`''), or a number--the ordinal value of the corresponding character (usually its ASCII value). Within quotes, the single character may be represented by a letter or by "escape sequences", which are of the form `\NNN', where NNN is the octal representation of the character's ordinal value; or of the form `\X', where `X' is a predefined special character--for example, `\n' for newline. Wide character constants can be written by prefixing a character constant with `L', as in C. For example, `L'x'' is the wide form of `x'. The target wide character set is used when computing the value of this constant (*note Character Sets::). * String constants are a sequence of character constants surrounded by double quotes (`"'). Any valid character constant (as described above) may appear. Double quotes within the string must be preceded by a backslash, so for instance `"a\"b'c"' is a string of five characters. Wide string constants can be written by prefixing a string constant with `L', as in C. The target wide character set is used when computing the value of this constant (*note Character Sets::). * Pointer constants are an integral value. You can also write pointers to constants using the C operator `&'. * Array constants are comma-separated lists surrounded by braces `{' and `}'; for example, `{1,2,3}' is a three-element array of integers, `{{1,2}, {3,4}, {5,6}}' is a three-by-two array, and `{&"hi", &"there", &"fred"}' is a three-element array of pointers.  File: gdb.info, Node: C Plus Plus Expressions, Next: C Defaults, Prev: C Constants, Up: C 15.4.1.3 C++ Expressions ........................ GDB expression handling can interpret most C++ expressions. _Warning:_ GDB can only debug C++ code if you use the proper compiler and the proper debug format. Currently, GDB works best when debugging C++ code that is compiled with the most recent version of GCC possible. The DWARF debugging format is preferred; GCC defaults to this on most popular platforms. Other compilers and/or debug formats are likely to work badly or not at all when using GDB to debug C++ code. *Note Compilation::. 1. Member function calls are allowed; you can use expressions like count = aml->GetOriginal(x, y) 2. While a member function is active (in the selected stack frame), your expressions have the same namespace available as the member function; that is, GDB allows implicit references to the class instance pointer `this' following the same rules as C++. `using' declarations in the current scope are also respected by GDB. 3. You can call overloaded functions; GDB resolves the function call to the right definition, with some restrictions. GDB does not perform overload resolution involving user-defined type conversions, calls to constructors, or instantiations of templates that do not exist in the program. It also cannot handle ellipsis argument lists or default arguments. It does perform integral conversions and promotions, floating-point promotions, arithmetic conversions, pointer conversions, conversions of class objects to base classes, and standard conversions such as those of functions or arrays to pointers; it requires an exact match on the number of function arguments. Overload resolution is always performed, unless you have specified `set overload-resolution off'. *Note GDB Features for C++: Debugging C Plus Plus. You must specify `set overload-resolution off' in order to use an explicit function signature to call an overloaded function, as in p 'foo(char,int)'('x', 13) The GDB command-completion facility can simplify this; see *note Command Completion: Completion. 4. GDB understands variables declared as C++ references; you can use them in expressions just as you do in C++ source--they are automatically dereferenced. In the parameter list shown when GDB displays a frame, the values of reference variables are not displayed (unlike other variables); this avoids clutter, since references are often used for large structures. The _address_ of a reference variable is always shown, unless you have specified `set print address off'. 5. GDB supports the C++ name resolution operator `::'--your expressions can use it just as expressions in your program do. Since one scope may be defined in another, you can use `::' repeatedly if necessary, for example in an expression like `SCOPE1::SCOPE2::NAME'. GDB also allows resolving name scope by reference to source files, in both C and C++ debugging (*note Program Variables: Variables.). 6. GDB performs argument-dependent lookup, following the C++ specification.  File: gdb.info, Node: C Defaults, Next: C Checks, Prev: C Plus Plus Expressions, Up: C 15.4.1.4 C and C++ Defaults ........................... If you allow GDB to set range checking automatically, it defaults to `off' whenever the working language changes to C or C++. This happens regardless of whether you or GDB selects the working language. If you allow GDB to set the language automatically, it recognizes source files whose names end with `.c', `.C', or `.cc', etc, and when GDB enters code compiled from one of these files, it sets the working language to C or C++. *Note Having GDB Infer the Source Language: Automatically, for further details.  File: gdb.info, Node: C Checks, Next: Debugging C, Prev: C Defaults, Up: C 15.4.1.5 C and C++ Type and Range Checks ........................................ By default, when GDB parses C or C++ expressions, strict type checking is used. However, if you turn type checking off, GDB will allow certain non-standard conversions, such as promoting integer constants to pointers. Range checking, if turned on, is done on mathematical operations. Array indices are not checked, since they are often used to index a pointer that is not itself an array.  File: gdb.info, Node: Debugging C, Next: Debugging C Plus Plus, Prev: C Checks, Up: C 15.4.1.6 GDB and C .................. The `set print union' and `show print union' commands apply to the `union' type. When set to `on', any `union' that is inside a `struct' or `class' is also printed. Otherwise, it appears as `{...}'. The `@' operator aids in the debugging of dynamic arrays, formed with pointers and a memory allocation function. *Note Expressions: Expressions.  File: gdb.info, Node: Debugging C Plus Plus, Next: Decimal Floating Point, Prev: Debugging C, Up: C 15.4.1.7 GDB Features for C++ ............................. Some GDB commands are particularly useful with C++, and some are designed specifically for use with C++. Here is a summary: `breakpoint menus' When you want a breakpoint in a function whose name is overloaded, GDB has the capability to display a menu of possible breakpoint locations to help you specify which function definition you want. *Note Ambiguous Expressions: Ambiguous Expressions. `rbreak REGEX' Setting breakpoints using regular expressions is helpful for setting breakpoints on overloaded functions that are not members of any special classes. *Note Setting Breakpoints: Set Breaks. `catch throw' `catch catch' Debug C++ exception handling using these commands. *Note Setting Catchpoints: Set Catchpoints. `ptype TYPENAME' Print inheritance relationships as well as other information for type TYPENAME. *Note Examining the Symbol Table: Symbols. `info vtbl EXPRESSION.' The `info vtbl' command can be used to display the virtual method tables of the object computed by EXPRESSION. This shows one entry per virtual table; there may be multiple virtual tables when multiple inheritance is in use. `set print demangle' `show print demangle' `set print asm-demangle' `show print asm-demangle' Control whether C++ symbols display in their source form, both when displaying code as C++ source and when displaying disassemblies. *Note Print Settings: Print Settings. `set print object' `show print object' Choose whether to print derived (actual) or declared types of objects. *Note Print Settings: Print Settings. `set print vtbl' `show print vtbl' Control the format for printing virtual function tables. *Note Print Settings: Print Settings. (The `vtbl' commands do not work on programs compiled with the HP ANSI C++ compiler (`aCC').) `set overload-resolution on' Enable overload resolution for C++ expression evaluation. The default is on. For overloaded functions, GDB evaluates the arguments and searches for a function whose signature matches the argument types, using the standard C++ conversion rules (see *note C++ Expressions: C Plus Plus Expressions, for details). If it cannot find a match, it emits a message. `set overload-resolution off' Disable overload resolution for C++ expression evaluation. For overloaded functions that are not class member functions, GDB chooses the first function of the specified name that it finds in the symbol table, whether or not its arguments are of the correct type. For overloaded functions that are class member functions, GDB searches for a function whose signature _exactly_ matches the argument types. `show overload-resolution' Show the current setting of overload resolution. `Overloaded symbol names' You can specify a particular definition of an overloaded symbol, using the same notation that is used to declare such symbols in C++: type `SYMBOL(TYPES)' rather than just SYMBOL. You can also use the GDB command-line word completion facilities to list the available choices, or to finish the type list for you. *Note Command Completion: Completion, for details on how to do this.  File: gdb.info, Node: Decimal Floating Point, Prev: Debugging C Plus Plus, Up: C 15.4.1.8 Decimal Floating Point format ...................................... GDB can examine, set and perform computations with numbers in decimal floating point format, which in the C language correspond to the `_Decimal32', `_Decimal64' and `_Decimal128' types as specified by the extension to support decimal floating-point arithmetic. There are two encodings in use, depending on the architecture: BID (Binary Integer Decimal) for x86 and x86-64, and DPD (Densely Packed Decimal) for PowerPC. GDB will use the appropriate encoding for the configured target. Because of a limitation in `libdecnumber', the library used by GDB to manipulate decimal floating point numbers, it is not possible to convert (using a cast, for example) integers wider than 32-bit to decimal float. In addition, in order to imitate GDB's behaviour with binary floating point computations, error checking in decimal float operations ignores underflow, overflow and divide by zero exceptions. In the PowerPC architecture, GDB provides a set of pseudo-registers to inspect `_Decimal128' values stored in floating point registers. See *note PowerPC: PowerPC. for more details.  File: gdb.info, Node: D, Next: Go, Prev: C, Up: Supported Languages 15.4.2 D -------- GDB can be used to debug programs written in D and compiled with GDC, LDC or DMD compilers. Currently GDB supports only one D specific feature -- dynamic arrays.  File: gdb.info, Node: Go, Next: Objective-C, Prev: D, Up: Supported Languages 15.4.3 Go --------- GDB can be used to debug programs written in Go and compiled with `gccgo' or `6g' compilers. Here is a summary of the Go-specific features and restrictions: `The current Go package' The name of the current package does not need to be specified when specifying global variables and functions. For example, given the program: package main var myglob = "Shall we?" func main () { // ... } When stopped inside `main' either of these work: (gdb) p myglob (gdb) p main.myglob `Builtin Go types' The `string' type is recognized by GDB and is printed as a string. `Builtin Go functions' The GDB expression parser recognizes the `unsafe.Sizeof' function and handles it internally. `Restrictions on Go expressions' All Go operators are supported except `&^'. The Go `_' "blank identifier" is not supported. Automatic dereferencing of pointers is not supported.  File: gdb.info, Node: Objective-C, Next: OpenCL C, Prev: Go, Up: Supported Languages 15.4.4 Objective-C ------------------ This section provides information about some commands and command options that are useful for debugging Objective-C code. See also *note info classes: Symbols, and *note info selectors: Symbols, for a few more commands specific to Objective-C support. * Menu: * Method Names in Commands:: * The Print Command with Objective-C::  File: gdb.info, Node: Method Names in Commands, Next: The Print Command with Objective-C, Up: Objective-C 15.4.4.1 Method Names in Commands ................................. The following commands have been extended to accept Objective-C method names as line specifications: * `clear' * `break' * `info line' * `jump' * `list' A fully qualified Objective-C method name is specified as -[CLASS METHODNAME] where the minus sign is used to indicate an instance method and a plus sign (not shown) is used to indicate a class method. The class name CLASS and method name METHODNAME are enclosed in brackets, similar to the way messages are specified in Objective-C source code. For example, to set a breakpoint at the `create' instance method of class `Fruit' in the program currently being debugged, enter: break -[Fruit create] To list ten program lines around the `initialize' class method, enter: list +[NSText initialize] In the current version of GDB, the plus or minus sign is required. In future versions of GDB, the plus or minus sign will be optional, but you can use it to narrow the search. It is also possible to specify just a method name: break create You must specify the complete method name, including any colons. If your program's source files contain more than one `create' method, you'll be presented with a numbered list of classes that implement that method. Indicate your choice by number, or type `0' to exit if none apply. As another example, to clear a breakpoint established at the `makeKeyAndOrderFront:' method of the `NSWindow' class, enter: clear -[NSWindow makeKeyAndOrderFront:]  File: gdb.info, Node: The Print Command with Objective-C, Prev: Method Names in Commands, Up: Objective-C 15.4.4.2 The Print Command With Objective-C ........................................... The print command has also been extended to accept methods. For example: print -[OBJECT hash] will tell GDB to send the `hash' message to OBJECT and print the result. Also, an additional command has been added, `print-object' or `po' for short, which is meant to print the description of an object. However, this command may only work with certain Objective-C libraries that have a particular hook function, `_NSPrintForDebugger', defined.  File: gdb.info, Node: OpenCL C, Next: Fortran, Prev: Objective-C, Up: Supported Languages 15.4.5 OpenCL C --------------- This section provides information about GDBs OpenCL C support. * Menu: * OpenCL C Datatypes:: * OpenCL C Expressions:: * OpenCL C Operators::  File: gdb.info, Node: OpenCL C Datatypes, Next: OpenCL C Expressions, Up: OpenCL C 15.4.5.1 OpenCL C Datatypes ........................... GDB supports the builtin scalar and vector datatypes specified by OpenCL 1.1. In addition the half- and double-precision floating point data types of the `cl_khr_fp16' and `cl_khr_fp64' OpenCL extensions are also known to GDB.  File: gdb.info, Node: OpenCL C Expressions, Next: OpenCL C Operators, Prev: OpenCL C Datatypes, Up: OpenCL C 15.4.5.2 OpenCL C Expressions ............................. GDB supports accesses to vector components including the access as lvalue where possible. Since OpenCL C is based on C99 most C expressions supported by GDB can be used as well.  File: gdb.info, Node: OpenCL C Operators, Prev: OpenCL C Expressions, Up: OpenCL C 15.4.5.3 OpenCL C Operators ........................... GDB supports the operators specified by OpenCL 1.1 for scalar and vector data types.  File: gdb.info, Node: Fortran, Next: Pascal, Prev: OpenCL C, Up: Supported Languages 15.4.6 Fortran -------------- GDB can be used to debug programs written in Fortran, but it currently supports only the features of Fortran 77 language. Some Fortran compilers (GNU Fortran 77 and Fortran 95 compilers among them) append an underscore to the names of variables and functions. When you debug programs compiled by those compilers, you will need to refer to variables and functions with a trailing underscore. * Menu: * Fortran Operators:: Fortran operators and expressions * Fortran Defaults:: Default settings for Fortran * Special Fortran Commands:: Special GDB commands for Fortran  File: gdb.info, Node: Fortran Operators, Next: Fortran Defaults, Up: Fortran 15.4.6.1 Fortran Operators and Expressions .......................................... Operators must be defined on values of specific types. For instance, `+' is defined on numbers, but not on characters or other non- arithmetic types. Operators are often defined on groups of types. `**' The exponentiation operator. It raises the first operand to the power of the second one. `:' The range operator. Normally used in the form of array(low:high) to represent a section of array. `%' The access component operator. Normally used to access elements in derived types. Also suitable for unions. As unions aren't part of regular Fortran, this can only happen when accessing a register that uses a gdbarch-defined union type.  File: gdb.info, Node: Fortran Defaults, Next: Special Fortran Commands, Prev: Fortran Operators, Up: Fortran 15.4.6.2 Fortran Defaults ......................... Fortran symbols are usually case-insensitive, so GDB by default uses case-insensitive matches for Fortran symbols. You can change that with the `set case-insensitive' command, see *note Symbols::, for the details.  File: gdb.info, Node: Special Fortran Commands, Prev: Fortran Defaults, Up: Fortran 15.4.6.3 Special Fortran Commands ................................. GDB has some commands to support Fortran-specific features, such as displaying common blocks. `info common [COMMON-NAME]' This command prints the values contained in the Fortran `COMMON' block whose name is COMMON-NAME. With no argument, the names of all `COMMON' blocks visible at the current program location are printed.  File: gdb.info, Node: Pascal, Next: Modula-2, Prev: Fortran, Up: Supported Languages 15.4.7 Pascal ------------- Debugging Pascal programs which use sets, subranges, file variables, or nested functions does not currently work. GDB does not support entering expressions, printing values, or similar features using Pascal syntax. The Pascal-specific command `set print pascal_static-members' controls whether static members of Pascal objects are displayed. *Note pascal_static-members: Print Settings.  File: gdb.info, Node: Modula-2, Next: Ada, Prev: Pascal, Up: Supported Languages 15.4.8 Modula-2 --------------- The extensions made to GDB to support Modula-2 only support output from the GNU Modula-2 compiler (which is currently being developed). Other Modula-2 compilers are not currently supported, and attempting to debug executables produced by them is most likely to give an error as GDB reads in the executable's symbol table. * Menu: * M2 Operators:: Built-in operators * Built-In Func/Proc:: Built-in functions and procedures * M2 Constants:: Modula-2 constants * M2 Types:: Modula-2 types * M2 Defaults:: Default settings for Modula-2 * Deviations:: Deviations from standard Modula-2 * M2 Checks:: Modula-2 type and range checks * M2 Scope:: The scope operators `::' and `.' * GDB/M2:: GDB and Modula-2  File: gdb.info, Node: M2 Operators, Next: Built-In Func/Proc, Up: Modula-2 15.4.8.1 Operators .................. Operators must be defined on values of specific types. For instance, `+' is defined on numbers, but not on structures. Operators are often defined on groups of types. For the purposes of Modula-2, the following definitions hold: * _Integral types_ consist of `INTEGER', `CARDINAL', and their subranges. * _Character types_ consist of `CHAR' and its subranges. * _Floating-point types_ consist of `REAL'. * _Pointer types_ consist of anything declared as `POINTER TO TYPE'. * _Scalar types_ consist of all of the above. * _Set types_ consist of `SET' and `BITSET' types. * _Boolean types_ consist of `BOOLEAN'. The following operators are supported, and appear in order of increasing precedence: `,' Function argument or array index separator. `:=' Assignment. The value of VAR `:=' VALUE is VALUE. `<, >' Less than, greater than on integral, floating-point, or enumerated types. `<=, >=' Less than or equal to, greater than or equal to on integral, floating-point and enumerated types, or set inclusion on set types. Same precedence as `<'. `=, <>, #' Equality and two ways of expressing inequality, valid on scalar types. Same precedence as `<'. In GDB scripts, only `<>' is available for inequality, since `#' conflicts with the script comment character. `IN' Set membership. Defined on set types and the types of their members. Same precedence as `<'. `OR' Boolean disjunction. Defined on boolean types. `AND, &' Boolean conjunction. Defined on boolean types. `@' The GDB "artificial array" operator (*note Expressions: Expressions.). `+, -' Addition and subtraction on integral and floating-point types, or union and difference on set types. `*' Multiplication on integral and floating-point types, or set intersection on set types. `/' Division on floating-point types, or symmetric set difference on set types. Same precedence as `*'. `DIV, MOD' Integer division and remainder. Defined on integral types. Same precedence as `*'. `-' Negative. Defined on `INTEGER' and `REAL' data. `^' Pointer dereferencing. Defined on pointer types. `NOT' Boolean negation. Defined on boolean types. Same precedence as `^'. `.' `RECORD' field selector. Defined on `RECORD' data. Same precedence as `^'. `[]' Array indexing. Defined on `ARRAY' data. Same precedence as `^'. `()' Procedure argument list. Defined on `PROCEDURE' objects. Same precedence as `^'. `::, .' GDB and Modula-2 scope operators. _Warning:_ Set expressions and their operations are not yet supported, so GDB treats the use of the operator `IN', or the use of operators `+', `-', `*', `/', `=', , `<>', `#', `<=', and `>=' on sets as an error.  File: gdb.info, Node: Built-In Func/Proc, Next: M2 Constants, Prev: M2 Operators, Up: Modula-2 15.4.8.2 Built-in Functions and Procedures .......................................... Modula-2 also makes available several built-in procedures and functions. In describing these, the following metavariables are used: A represents an `ARRAY' variable. C represents a `CHAR' constant or variable. I represents a variable or constant of integral type. M represents an identifier that belongs to a set. Generally used in the same function with the metavariable S. The type of S should be `SET OF MTYPE' (where MTYPE is the type of M). N represents a variable or constant of integral or floating-point type. R represents a variable or constant of floating-point type. T represents a type. V represents a variable. X represents a variable or constant of one of many types. See the explanation of the function for details. All Modula-2 built-in procedures also return a result, described below. `ABS(N)' Returns the absolute value of N. `CAP(C)' If C is a lower case letter, it returns its upper case equivalent, otherwise it returns its argument. `CHR(I)' Returns the character whose ordinal value is I. `DEC(V)' Decrements the value in the variable V by one. Returns the new value. `DEC(V,I)' Decrements the value in the variable V by I. Returns the new value. `EXCL(M,S)' Removes the element M from the set S. Returns the new set. `FLOAT(I)' Returns the floating point equivalent of the integer I. `HIGH(A)' Returns the index of the last member of A. `INC(V)' Increments the value in the variable V by one. Returns the new value. `INC(V,I)' Increments the value in the variable V by I. Returns the new value. `INCL(M,S)' Adds the element M to the set S if it is not already there. Returns the new set. `MAX(T)' Returns the maximum value of the type T. `MIN(T)' Returns the minimum value of the type T. `ODD(I)' Returns boolean TRUE if I is an odd number. `ORD(X)' Returns the ordinal value of its argument. For example, the ordinal value of a character is its ASCII value (on machines supporting the ASCII character set). X must be of an ordered type, which include integral, character and enumerated types. `SIZE(X)' Returns the size of its argument. X can be a variable or a type. `TRUNC(R)' Returns the integral part of R. `TSIZE(X)' Returns the size of its argument. X can be a variable or a type. `VAL(T,I)' Returns the member of the type T whose ordinal value is I. _Warning:_ Sets and their operations are not yet supported, so GDB treats the use of procedures `INCL' and `EXCL' as an error.  File: gdb.info, Node: M2 Constants, Next: M2 Types, Prev: Built-In Func/Proc, Up: Modula-2 15.4.8.3 Constants .................. GDB allows you to express the constants of Modula-2 in the following ways: * Integer constants are simply a sequence of digits. When used in an expression, a constant is interpreted to be type-compatible with the rest of the expression. Hexadecimal integers are specified by a trailing `H', and octal integers by a trailing `B'. * Floating point constants appear as a sequence of digits, followed by a decimal point and another sequence of digits. An optional exponent can then be specified, in the form `E[+|-]NNN', where `[+|-]NNN' is the desired exponent. All of the digits of the floating point constant must be valid decimal (base 10) digits. * Character constants consist of a single character enclosed by a pair of like quotes, either single (`'') or double (`"'). They may also be expressed by their ordinal value (their ASCII value, usually) followed by a `C'. * String constants consist of a sequence of characters enclosed by a pair of like quotes, either single (`'') or double (`"'). Escape sequences in the style of C are also allowed. *Note C and C++ Constants: C Constants, for a brief explanation of escape sequences. * Enumerated constants consist of an enumerated identifier. * Boolean constants consist of the identifiers `TRUE' and `FALSE'. * Pointer constants consist of integral values only. * Set constants are not yet supported.  File: gdb.info, Node: M2 Types, Next: M2 Defaults, Prev: M2 Constants, Up: Modula-2 15.4.8.4 Modula-2 Types ....................... Currently GDB can print the following data types in Modula-2 syntax: array types, record types, set types, pointer types, procedure types, enumerated types, subrange types and base types. You can also print the contents of variables declared using these type. This section gives a number of simple source code examples together with sample GDB sessions. The first example contains the following section of code: VAR s: SET OF CHAR ; r: [20..40] ; and you can request GDB to interrogate the type and value of `r' and `s'. (gdb) print s {'A'..'C', 'Z'} (gdb) ptype s SET OF CHAR (gdb) print r 21 (gdb) ptype r [20..40] Likewise if your source code declares `s' as: VAR s: SET ['A'..'Z'] ; then you may query the type of `s' by: (gdb) ptype s type = SET ['A'..'Z'] Note that at present you cannot interactively manipulate set expressions using the debugger. The following example shows how you might declare an array in Modula-2 and how you can interact with GDB to print its type and contents: VAR s: ARRAY [-10..10] OF CHAR ; (gdb) ptype s ARRAY [-10..10] OF CHAR Note that the array handling is not yet complete and although the type is printed correctly, expression handling still assumes that all arrays have a lower bound of zero and not `-10' as in the example above. Here are some more type related Modula-2 examples: TYPE colour = (blue, red, yellow, green) ; t = [blue..yellow] ; VAR s: t ; BEGIN s := blue ; The GDB interaction shows how you can query the data type and value of a variable. (gdb) print s $1 = blue (gdb) ptype t type = [blue..yellow] In this example a Modula-2 array is declared and its contents displayed. Observe that the contents are written in the same way as their `C' counterparts. VAR s: ARRAY [1..5] OF CARDINAL ; BEGIN s[1] := 1 ; (gdb) print s $1 = {1, 0, 0, 0, 0} (gdb) ptype s type = ARRAY [1..5] OF CARDINAL The Modula-2 language interface to GDB also understands pointer types as shown in this example: VAR s: POINTER TO ARRAY [1..5] OF CARDINAL ; BEGIN NEW(s) ; s^[1] := 1 ; and you can request that GDB describes the type of `s'. (gdb) ptype s type = POINTER TO ARRAY [1..5] OF CARDINAL GDB handles compound types as we can see in this example. Here we combine array types, record types, pointer types and subrange types: TYPE foo = RECORD f1: CARDINAL ; f2: CHAR ; f3: myarray ; END ; myarray = ARRAY myrange OF CARDINAL ; myrange = [-2..2] ; VAR s: POINTER TO ARRAY myrange OF foo ; and you can ask GDB to describe the type of `s' as shown below. (gdb) ptype s type = POINTER TO ARRAY [-2..2] OF foo = RECORD f1 : CARDINAL; f2 : CHAR; f3 : ARRAY [-2..2] OF CARDINAL; END  File: gdb.info, Node: M2 Defaults, Next: Deviations, Prev: M2 Types, Up: Modula-2 15.4.8.5 Modula-2 Defaults .......................... If type and range checking are set automatically by GDB, they both default to `on' whenever the working language changes to Modula-2. This happens regardless of whether you or GDB selected the working language. If you allow GDB to set the language automatically, then entering code compiled from a file whose name ends with `.mod' sets the working language to Modula-2. *Note Having GDB Infer the Source Language: Automatically, for further details.  File: gdb.info, Node: Deviations, Next: M2 Checks, Prev: M2 Defaults, Up: Modula-2 15.4.8.6 Deviations from Standard Modula-2 .......................................... A few changes have been made to make Modula-2 programs easier to debug. This is done primarily via loosening its type strictness: * Unlike in standard Modula-2, pointer constants can be formed by integers. This allows you to modify pointer variables during debugging. (In standard Modula-2, the actual address contained in a pointer variable is hidden from you; it can only be modified through direct assignment to another pointer variable or expression that returned a pointer.) * C escape sequences can be used in strings and characters to represent non-printable characters. GDB prints out strings with these escape sequences embedded. Single non-printable characters are printed using the `CHR(NNN)' format. * The assignment operator (`:=') returns the value of its right-hand argument. * All built-in procedures both modify _and_ return their argument.  File: gdb.info, Node: M2 Checks, Next: M2 Scope, Prev: Deviations, Up: Modula-2 15.4.8.7 Modula-2 Type and Range Checks ....................................... _Warning:_ in this release, GDB does not yet perform type or range checking. GDB considers two Modula-2 variables type equivalent if: * They are of types that have been declared equivalent via a `TYPE T1 = T2' statement * They have been declared on the same line. (Note: This is true of the GNU Modula-2 compiler, but it may not be true of other compilers.) As long as type checking is enabled, any attempt to combine variables whose types are not equivalent is an error. Range checking is done on all mathematical operations, assignment, array index bounds, and all built-in functions and procedures.  File: gdb.info, Node: M2 Scope, Next: GDB/M2, Prev: M2 Checks, Up: Modula-2 15.4.8.8 The Scope Operators `::' and `.' ......................................... There are a few subtle differences between the Modula-2 scope operator (`.') and the GDB scope operator (`::'). The two have similar syntax: MODULE . ID SCOPE :: ID where SCOPE is the name of a module or a procedure, MODULE the name of a module, and ID is any declared identifier within your program, except another module. Using the `::' operator makes GDB search the scope specified by SCOPE for the identifier ID. If it is not found in the specified scope, then GDB searches all scopes enclosing the one specified by SCOPE. Using the `.' operator makes GDB search the current scope for the identifier specified by ID that was imported from the definition module specified by MODULE. With this operator, it is an error if the identifier ID was not imported from definition module MODULE, or if ID is not an identifier in MODULE.  File: gdb.info, Node: GDB/M2, Prev: M2 Scope, Up: Modula-2 15.4.8.9 GDB and Modula-2 ......................... Some GDB commands have little use when debugging Modula-2 programs. Five subcommands of `set print' and `show print' apply specifically to C and C++: `vtbl', `demangle', `asm-demangle', `object', and `union'. The first four apply to C++, and the last to the C `union' type, which has no direct analogue in Modula-2. The `@' operator (*note Expressions: Expressions.), while available with any language, is not useful with Modula-2. Its intent is to aid the debugging of "dynamic arrays", which cannot be created in Modula-2 as they can in C or C++. However, because an address can be specified by an integral constant, the construct `{TYPE}ADREXP' is still useful. In GDB scripts, the Modula-2 inequality operator `#' is interpreted as the beginning of a comment. Use `<>' instead.  File: gdb.info, Node: Ada, Prev: Modula-2, Up: Supported Languages 15.4.9 Ada ---------- The extensions made to GDB for Ada only support output from the GNU Ada (GNAT) compiler. Other Ada compilers are not currently supported, and attempting to debug executables produced by them is most likely to be difficult. * Menu: * Ada Mode Intro:: General remarks on the Ada syntax and semantics supported by Ada mode in GDB. * Omissions from Ada:: Restrictions on the Ada expression syntax. * Additions to Ada:: Extensions of the Ada expression syntax. * Stopping Before Main Program:: Debugging the program during elaboration. * Ada Tasks:: Listing and setting breakpoints in tasks. * Ada Tasks and Core Files:: Tasking Support when Debugging Core Files * Ravenscar Profile:: Tasking Support when using the Ravenscar Profile * Ada Glitches:: Known peculiarities of Ada mode.  File: gdb.info, Node: Ada Mode Intro, Next: Omissions from Ada, Up: Ada 15.4.9.1 Introduction ..................... The Ada mode of GDB supports a fairly large subset of Ada expression syntax, with some extensions. The philosophy behind the design of this subset is * That GDB should provide basic literals and access to operations for arithmetic, dereferencing, field selection, indexing, and subprogram calls, leaving more sophisticated computations to subprograms written into the program (which therefore may be called from GDB). * That type safety and strict adherence to Ada language restrictions are not particularly important to the GDB user. * That brevity is important to the GDB user. Thus, for brevity, the debugger acts as if all names declared in user-written packages are directly visible, even if they are not visible according to Ada rules, thus making it unnecessary to fully qualify most names with their packages, regardless of context. Where this causes ambiguity, GDB asks the user's intent. The debugger will start in Ada mode if it detects an Ada main program. As for other languages, it will enter Ada mode when stopped in a program that was translated from an Ada source file. While in Ada mode, you may use `-' for comments. This is useful mostly for documenting command files. The standard GDB comment (`#') still works at the beginning of a line in Ada mode, but not in the middle (to allow based literals). The debugger supports limited overloading. Given a subprogram call in which the function symbol has multiple definitions, it will use the number of actual parameters and some information about their types to attempt to narrow the set of definitions. It also makes very limited use of context, preferring procedures to functions in the context of the `call' command, and functions to procedures elsewhere.  File: gdb.info, Node: Omissions from Ada, Next: Additions to Ada, Prev: Ada Mode Intro, Up: Ada 15.4.9.2 Omissions from Ada ........................... Here are the notable omissions from the subset: * Only a subset of the attributes are supported: - 'First, 'Last, and 'Length on array objects (not on types and subtypes). - 'Min and 'Max. - 'Pos and 'Val. - 'Tag. - 'Range on array objects (not subtypes), but only as the right operand of the membership (`in') operator. - 'Access, 'Unchecked_Access, and 'Unrestricted_Access (a GNAT extension). - 'Address. * The names in `Characters.Latin_1' are not available and concatenation is not implemented. Thus, escape characters in strings are not currently available. * Equality tests (`=' and `/=') on arrays test for bitwise equality of representations. They will generally work correctly for strings and arrays whose elements have integer or enumeration types. They may not work correctly for arrays whose element types have user-defined equality, for arrays of real values (in particular, IEEE-conformant floating point, because of negative zeroes and NaNs), and for arrays whose elements contain unused bits with indeterminate values. * The other component-by-component array operations (`and', `or', `xor', `not', and relational tests other than equality) are not implemented. * There is limited support for array and record aggregates. They are permitted only on the right sides of assignments, as in these examples: (gdb) set An_Array := (1, 2, 3, 4, 5, 6) (gdb) set An_Array := (1, others => 0) (gdb) set An_Array := (0|4 => 1, 1..3 => 2, 5 => 6) (gdb) set A_2D_Array := ((1, 2, 3), (4, 5, 6), (7, 8, 9)) (gdb) set A_Record := (1, "Peter", True); (gdb) set A_Record := (Name => "Peter", Id => 1, Alive => True) Changing a discriminant's value by assigning an aggregate has an undefined effect if that discriminant is used within the record. However, you can first modify discriminants by directly assigning to them (which normally would not be allowed in Ada), and then performing an aggregate assignment. For example, given a variable `A_Rec' declared to have a type such as: type Rec (Len : Small_Integer := 0) is record Id : Integer; Vals : IntArray (1 .. Len); end record; you can assign a value with a different size of `Vals' with two assignments: (gdb) set A_Rec.Len := 4 (gdb) set A_Rec := (Id => 42, Vals => (1, 2, 3, 4)) As this example also illustrates, GDB is very loose about the usual rules concerning aggregates. You may leave out some of the components of an array or record aggregate (such as the `Len' component in the assignment to `A_Rec' above); they will retain their original values upon assignment. You may freely use dynamic values as indices in component associations. You may even use overlapping or redundant component associations, although which component values are assigned in such cases is not defined. * Calls to dispatching subprograms are not implemented. * The overloading algorithm is much more limited (i.e., less selective) than that of real Ada. It makes only limited use of the context in which a subexpression appears to resolve its meaning, and it is much looser in its rules for allowing type matches. As a result, some function calls will be ambiguous, and the user will be asked to choose the proper resolution. * The `new' operator is not implemented. * Entry calls are not implemented. * Aside from printing, arithmetic operations on the native VAX floating-point formats are not supported. * It is not possible to slice a packed array. * The names `True' and `False', when not part of a qualified name, are interpreted as if implicitly prefixed by `Standard', regardless of context. Should your program redefine these names in a package or procedure (at best a dubious practice), you will have to use fully qualified names to access their new definitions.  File: gdb.info, Node: Additions to Ada, Next: Stopping Before Main Program, Prev: Omissions from Ada, Up: Ada 15.4.9.3 Additions to Ada ......................... As it does for other languages, GDB makes certain generic extensions to Ada (*note Expressions::): * If the expression E is a variable residing in memory (typically a local variable or array element) and N is a positive integer, then `E@N' displays the values of E and the N-1 adjacent variables following it in memory as an array. In Ada, this operator is generally not necessary, since its prime use is in displaying parts of an array, and slicing will usually do this in Ada. However, there are occasional uses when debugging programs in which certain debugging information has been optimized away. * `B::VAR' means "the variable named VAR that appears in function or file B." When B is a file name, you must typically surround it in single quotes. * The expression `{TYPE} ADDR' means "the variable of type TYPE that appears at address ADDR." * A name starting with `$' is a convenience variable (*note Convenience Vars::) or a machine register (*note Registers::). In addition, GDB provides a few other shortcuts and outright additions specific to Ada: * The assignment statement is allowed as an expression, returning its right-hand operand as its value. Thus, you may enter (gdb) set x := y + 3 (gdb) print A(tmp := y + 1) * The semicolon is allowed as an "operator," returning as its value the value of its right-hand operand. This allows, for example, complex conditional breaks: (gdb) break f (gdb) condition 1 (report(i); k += 1; A(k) > 100) * Rather than use catenation and symbolic character names to introduce special characters into strings, one may instead use a special bracket notation, which is also used to print strings. A sequence of characters of the form `["XX"]' within a string or character literal denotes the (single) character whose numeric encoding is XX in hexadecimal. The sequence of characters `["""]' also denotes a single quotation mark in strings. For example, "One line.["0a"]Next line.["0a"]" contains an ASCII newline character (`Ada.Characters.Latin_1.LF') after each period. * The subtype used as a prefix for the attributes 'Pos, 'Min, and 'Max is optional (and is ignored in any case). For example, it is valid to write (gdb) print 'max(x, y) * When printing arrays, GDB uses positional notation when the array has a lower bound of 1, and uses a modified named notation otherwise. For example, a one-dimensional array of three integers with a lower bound of 3 might print as (3 => 10, 17, 1) That is, in contrast to valid Ada, only the first component has a `=>' clause. * You may abbreviate attributes in expressions with any unique, multi-character subsequence of their names (an exact match gets preference). For example, you may use a'len, a'gth, or a'lh in place of a'length. * Since Ada is case-insensitive, the debugger normally maps identifiers you type to lower case. The GNAT compiler uses upper-case characters for some of its internal identifiers, which are normally of no interest to users. For the rare occasions when you actually have to look at them, enclose them in angle brackets to avoid the lower-case mapping. For example, (gdb) print <JMPBUF_SAVE>[0] * Printing an object of class-wide type or dereferencing an access-to-class-wide value will display all the components of the object's specific type (as indicated by its run-time tag). Likewise, component selection on such a value will operate on the specific type of the object.  File: gdb.info, Node: Stopping Before Main Program, Next: Ada Tasks, Prev: Additions to Ada, Up: Ada 15.4.9.4 Stopping at the Very Beginning ....................................... It is sometimes necessary to debug the program during elaboration, and before reaching the main procedure. As defined in the Ada Reference Manual, the elaboration code is invoked from a procedure called `adainit'. To run your program up to the beginning of elaboration, simply use the following two commands: `tbreak adainit' and `run'.  File: gdb.info, Node: Ada Tasks, Next: Ada Tasks and Core Files, Prev: Stopping Before Main Program, Up: Ada 15.4.9.5 Extensions for Ada Tasks ................................. Support for Ada tasks is analogous to that for threads (*note Threads::). GDB provides the following task-related commands: `info tasks' This command shows a list of current Ada tasks, as in the following example: (gdb) info tasks ID TID P-ID Pri State Name 1 8088000 0 15 Child Activation Wait main_task 2 80a4000 1 15 Accept Statement b 3 809a800 1 15 Child Activation Wait a * 4 80ae800 3 15 Runnable c In this listing, the asterisk before the last task indicates it to be the task currently being inspected. ID Represents GDB's internal task number. TID The Ada task ID. P-ID The parent's task ID (GDB's internal task number). Pri The base priority of the task. State Current state of the task. `Unactivated' The task has been created but has not been activated. It cannot be executing. `Runnable' The task is not blocked for any reason known to Ada. (It may be waiting for a mutex, though.) It is conceptually "executing" in normal mode. `Terminated' The task is terminated, in the sense of ARM 9.3 (5). Any dependents that were waiting on terminate alternatives have been awakened and have terminated themselves. `Child Activation Wait' The task is waiting for created tasks to complete activation. `Accept Statement' The task is waiting on an accept or selective wait statement. `Waiting on entry call' The task is waiting on an entry call. `Async Select Wait' The task is waiting to start the abortable part of an asynchronous select statement. `Delay Sleep' The task is waiting on a select statement with only a delay alternative open. `Child Termination Wait' The task is sleeping having completed a master within itself, and is waiting for the tasks dependent on that master to become terminated or waiting on a terminate Phase. `Wait Child in Term Alt' The task is sleeping waiting for tasks on terminate alternatives to finish terminating. `Accepting RV with TASKNO' The task is accepting a rendez-vous with the task TASKNO. Name Name of the task in the program. `info task TASKNO' This command shows detailled informations on the specified task, as in the following example: (gdb) info tasks ID TID P-ID Pri State Name 1 8077880 0 15 Child Activation Wait main_task * 2 807c468 1 15 Runnable task_1 (gdb) info task 2 Ada Task: 0x807c468 Name: task_1 Thread: 0x807f378 Parent: 1 (main_task) Base Priority: 15 State: Runnable `task' This command prints the ID of the current task. (gdb) info tasks ID TID P-ID Pri State Name 1 8077870 0 15 Child Activation Wait main_task * 2 807c458 1 15 Runnable t (gdb) task [Current task is 2] `task TASKNO' This command is like the `thread THREADNO' command (*note Threads::). It switches the context of debugging from the current task to the given task. (gdb) info tasks ID TID P-ID Pri State Name 1 8077870 0 15 Child Activation Wait main_task * 2 807c458 1 15 Runnable t (gdb) task 1 [Switching to task 1] #0 0x8067726 in pthread_cond_wait () (gdb) bt #0 0x8067726 in pthread_cond_wait () #1 0x8056714 in system.os_interface.pthread_cond_wait () #2 0x805cb63 in system.task_primitives.operations.sleep () #3 0x806153e in system.tasking.stages.activate_tasks () #4 0x804aacc in un () at un.adb:5 `break LINESPEC task TASKNO' `break LINESPEC task TASKNO if ...' These commands are like the `break ... thread ...' command (*note Thread Stops::). LINESPEC specifies source lines, as described in *note Specify Location::. Use the qualifier `task TASKNO' with a breakpoint command to specify that you only want GDB to stop the program when a particular Ada task reaches this breakpoint. TASKNO is one of the numeric task identifiers assigned by GDB, shown in the first column of the `info tasks' display. If you do not specify `task TASKNO' when you set a breakpoint, the breakpoint applies to _all_ tasks of your program. You can use the `task' qualifier on conditional breakpoints as well; in this case, place `task TASKNO' before the breakpoint condition (before the `if'). For example, (gdb) info tasks ID TID P-ID Pri State Name 1 140022020 0 15 Child Activation Wait main_task 2 140045060 1 15 Accept/Select Wait t2 3 140044840 1 15 Runnable t1 * 4 140056040 1 15 Runnable t3 (gdb) b 15 task 2 Breakpoint 5 at 0x120044cb0: file test_task_debug.adb, line 15. (gdb) cont Continuing. task # 1 running task # 2 running Breakpoint 5, test_task_debug () at test_task_debug.adb:15 15 flush; (gdb) info tasks ID TID P-ID Pri State Name 1 140022020 0 15 Child Activation Wait main_task * 2 140045060 1 15 Runnable t2 3 140044840 1 15 Runnable t1 4 140056040 1 15 Delay Sleep t3  File: gdb.info, Node: Ada Tasks and Core Files, Next: Ravenscar Profile, Prev: Ada Tasks, Up: Ada 15.4.9.6 Tasking Support when Debugging Core Files .................................................. When inspecting a core file, as opposed to debugging a live program, tasking support may be limited or even unavailable, depending on the platform being used. For instance, on x86-linux, the list of tasks is available, but task switching is not supported. On Tru64, however, task switching will work as usual. On certain platforms, including Tru64, the debugger needs to perform some memory writes in order to provide Ada tasking support. When inspecting a core file, this means that the core file must be opened with read-write privileges, using the command `"set write on"' (*note Patching::). Under these circumstances, you should make a backup copy of the core file before inspecting it with GDB.  File: gdb.info, Node: Ravenscar Profile, Next: Ada Glitches, Prev: Ada Tasks and Core Files, Up: Ada 15.4.9.7 Tasking Support when using the Ravenscar Profile ......................................................... The "Ravenscar Profile" is a subset of the Ada tasking features, specifically designed for systems with safety-critical real-time requirements. `set ravenscar task-switching on' Allows task switching when debugging a program that uses the Ravenscar Profile. This is the default. `set ravenscar task-switching off' Turn off task switching when debugging a program that uses the Ravenscar Profile. This is mostly intended to disable the code that adds support for the Ravenscar Profile, in case a bug in either GDB or in the Ravenscar runtime is preventing GDB from working properly. To be effective, this command should be run before the program is started. `show ravenscar task-switching' Show whether it is possible to switch from task to task in a program using the Ravenscar Profile.  File: gdb.info, Node: Ada Glitches, Prev: Ravenscar Profile, Up: Ada 15.4.9.8 Known Peculiarities of Ada Mode ........................................ Besides the omissions listed previously (*note Omissions from Ada::), we know of several problems with and limitations of Ada mode in GDB, some of which will be fixed with planned future releases of the debugger and the GNU Ada compiler. * Static constants that the compiler chooses not to materialize as objects in storage are invisible to the debugger. * Named parameter associations in function argument lists are ignored (the argument lists are treated as positional). * Many useful library packages are currently invisible to the debugger. * Fixed-point arithmetic, conversions, input, and output is carried out using floating-point arithmetic, and may give results that only approximate those on the host machine. * The GNAT compiler never generates the prefix `Standard' for any of the standard symbols defined by the Ada language. GDB knows about this: it will strip the prefix from names when you use it, and will never look for a name you have so qualified among local symbols, nor match against symbols in other packages or subprograms. If you have defined entities anywhere in your program other than parameters and local variables whose simple names match names in `Standard', GNAT's lack of qualification here can cause confusion. When this happens, you can usually resolve the confusion by qualifying the problematic names with package `Standard' explicitly. Older versions of the compiler sometimes generate erroneous debugging information, resulting in the debugger incorrectly printing the value of affected entities. In some cases, the debugger is able to work around an issue automatically. In other cases, the debugger is able to work around the issue, but the work-around has to be specifically enabled. `set ada trust-PAD-over-XVS on' Configure GDB to strictly follow the GNAT encoding when computing the value of Ada entities, particularly when `PAD' and `PAD___XVS' types are involved (see `ada/exp_dbug.ads' in the GCC sources for a complete description of the encoding used by the GNAT compiler). This is the default. `set ada trust-PAD-over-XVS off' This is related to the encoding using by the GNAT compiler. If GDB sometimes prints the wrong value for certain entities, changing `ada trust-PAD-over-XVS' to `off' activates a work-around which may fix the issue. It is always safe to set `ada trust-PAD-over-XVS' to `off', but this incurs a slight performance penalty, so it is recommended to leave this setting to `on' unless necessary.  File: gdb.info, Node: Unsupported Languages, Prev: Supported Languages, Up: Languages 15.5 Unsupported Languages ========================== In addition to the other fully-supported programming languages, GDB also provides a pseudo-language, called `minimal'. It does not represent a real programming language, but provides a set of capabilities close to what the C or assembly languages provide. This should allow most simple operations to be performed while debugging an application that uses a language currently not supported by GDB. If the language is set to `auto', GDB will automatically select this language if the current frame corresponds to an unsupported language.  File: gdb.info, Node: Symbols, Next: Altering, Prev: Languages, Up: Top 16 Examining the Symbol Table ***************************** The commands described in this chapter allow you to inquire about the symbols (names of variables, functions and types) defined in your program. This information is inherent in the text of your program and does not change as your program executes. GDB finds it in your program's symbol table, in the file indicated when you started GDB (*note Choosing Files: File Options.), or by one of the file-management commands (*note Commands to Specify Files: Files.). Occasionally, you may need to refer to symbols that contain unusual characters, which GDB ordinarily treats as word delimiters. The most frequent case is in referring to static variables in other source files (*note Program Variables: Variables.). File names are recorded in object files as debugging symbols, but GDB would ordinarily parse a typical file name, like `foo.c', as the three words `foo' `.' `c'. To allow GDB to recognize `foo.c' as a single symbol, enclose it in single quotes; for example, p 'foo.c'::x looks up the value of `x' in the scope of the file `foo.c'. `set case-sensitive on' `set case-sensitive off' `set case-sensitive auto' Normally, when GDB looks up symbols, it matches their names with case sensitivity determined by the current source language. Occasionally, you may wish to control that. The command `set case-sensitive' lets you do that by specifying `on' for case-sensitive matches or `off' for case-insensitive ones. If you specify `auto', case sensitivity is reset to the default suitable for the source language. The default is case-sensitive matches for all languages except for Fortran, for which the default is case-insensitive matches. `show case-sensitive' This command shows the current setting of case sensitivity for symbols lookups. `set print type methods' `set print type methods on' `set print type methods off' Normally, when GDB prints a class, it displays any methods declared in that class. You can control this behavior either by passing the appropriate flag to `ptype', or using `set print type methods'. Specifying `on' will cause GDB to display the methods; this is the default. Specifying `off' will cause GDB to omit the methods. `show print type methods' This command shows the current setting of method display when printing classes. `set print type typedefs' `set print type typedefs on' `set print type typedefs off' Normally, when GDB prints a class, it displays any typedefs defined in that class. You can control this behavior either by passing the appropriate flag to `ptype', or using `set print type typedefs'. Specifying `on' will cause GDB to display the typedef definitions; this is the default. Specifying `off' will cause GDB to omit the typedef definitions. Note that this controls whether the typedef definition itself is printed, not whether typedef names are substituted when printing other types. `show print type typedefs' This command shows the current setting of typedef display when printing classes. `info address SYMBOL' Describe where the data for SYMBOL is stored. For a register variable, this says which register it is kept in. For a non-register local variable, this prints the stack-frame offset at which the variable is always stored. Note the contrast with `print &SYMBOL', which does not work at all for a register variable, and for a stack local variable prints the exact address of the current instantiation of the variable. `info symbol ADDR' Print the name of a symbol which is stored at the address ADDR. If no symbol is stored exactly at ADDR, GDB prints the nearest symbol and an offset from it: (gdb) info symbol 0x54320 _initialize_vx + 396 in section .text This is the opposite of the `info address' command. You can use it to find out the name of a variable or a function given its address. For dynamically linked executables, the name of executable or shared library containing the symbol is also printed: (gdb) info symbol 0x400225 _start + 5 in section .text of /tmp/a.out (gdb) info symbol 0x2aaaac2811cf __read_nocancel + 6 in section .text of /usr/lib64/libc.so.6 `whatis[/FLAGS] [ARG]' Print the data type of ARG, which can be either an expression or a name of a data type. With no argument, print the data type of `$', the last value in the value history. If ARG is an expression (*note Expressions: Expressions.), it is not actually evaluated, and any side-effecting operations (such as assignments or function calls) inside it do not take place. If ARG is a variable or an expression, `whatis' prints its literal type as it is used in the source code. If the type was defined using a `typedef', `whatis' will _not_ print the data type underlying the `typedef'. If the type of the variable or the expression is a compound data type, such as `struct' or `class', `whatis' never prints their fields or methods. It just prints the `struct'/`class' name (a.k.a. its "tag"). If you want to see the members of such a compound data type, use `ptype'. If ARG is a type name that was defined using `typedef', `whatis' "unrolls" only one level of that `typedef'. Unrolling means that `whatis' will show the underlying type used in the `typedef' declaration of ARG. However, if that underlying type is also a `typedef', `whatis' will not unroll it. For C code, the type names may also have the form `class CLASS-NAME', `struct STRUCT-TAG', `union UNION-TAG' or `enum ENUM-TAG'. FLAGS can be used to modify how the type is displayed. Available flags are: `r' Display in "raw" form. Normally, GDB substitutes template parameters and typedefs defined in a class when printing the class' members. The `/r' flag disables this. `m' Do not print methods defined in the class. `M' Print methods defined in the class. This is the default, but the flag exists in case you change the default with `set print type methods'. `t' Do not print typedefs defined in the class. Note that this controls whether the typedef definition itself is printed, not whether typedef names are substituted when printing other types. `T' Print typedefs defined in the class. This is the default, but the flag exists in case you change the default with `set print type typedefs'. `ptype[/FLAGS] [ARG]' `ptype' accepts the same arguments as `whatis', but prints a detailed description of the type, instead of just the name of the type. *Note Expressions: Expressions. Contrary to `whatis', `ptype' always unrolls any `typedef's in its argument declaration, whether the argument is a variable, expression, or a data type. This means that `ptype' of a variable or an expression will not print literally its type as present in the source code--use `whatis' for that. `typedef's at the pointer or reference targets are also unrolled. Only `typedef's of fields, methods and inner `class typedef's of `struct's, `class'es and `union's are not unrolled even with `ptype'. For example, for this variable declaration: typedef double real_t; struct complex { real_t real; double imag; }; typedef struct complex complex_t; complex_t var; real_t *real_pointer_var; the two commands give this output: (gdb) whatis var type = complex_t (gdb) ptype var type = struct complex { real_t real; double imag; } (gdb) whatis complex_t type = struct complex (gdb) whatis struct complex type = struct complex (gdb) ptype struct complex type = struct complex { real_t real; double imag; } (gdb) whatis real_pointer_var type = real_t * (gdb) ptype real_pointer_var type = double * As with `whatis', using `ptype' without an argument refers to the type of `$', the last value in the value history. Sometimes, programs use opaque data types or incomplete specifications of complex data structure. If the debug information included in the program does not allow GDB to display a full declaration of the data type, it will say `<incomplete type>'. For example, given these declarations: struct foo; struct foo *fooptr; but no definition for `struct foo' itself, GDB will say: (gdb) ptype foo $1 = <incomplete type> "Incomplete type" is C terminology for data types that are not completely specified. `info types REGEXP' `info types' Print a brief description of all types whose names match the regular expression REGEXP (or all types in your program, if you supply no argument). Each complete typename is matched as though it were a complete line; thus, `i type value' gives information on all types in your program whose names include the string `value', but `i type ^value$' gives information only on types whose complete name is `value'. This command differs from `ptype' in two ways: first, like `whatis', it does not print a detailed description; second, it lists all source files where a type is defined. `info type-printers' Versions of GDB that ship with Python scripting enabled may have "type printers" available. When using `ptype' or `whatis', these printers are consulted when the name of a type is needed. *Note Type Printing API::, for more information on writing type printers. `info type-printers' displays all the available type printers. `enable type-printer NAME...' `disable type-printer NAME...' These commands can be used to enable or disable type printers. `info scope LOCATION' List all the variables local to a particular scope. This command accepts a LOCATION argument--a function name, a source line, or an address preceded by a `*', and prints all the variables local to the scope defined by that location. (*Note Specify Location::, for details about supported forms of LOCATION.) For example: (gdb) info scope command_line_handler Scope for command_line_handler: Symbol rl is an argument at stack/frame offset 8, length 4. Symbol linebuffer is in static storage at address 0x150a18, length 4. Symbol linelength is in static storage at address 0x150a1c, length 4. Symbol p is a local variable in register $esi, length 4. Symbol p1 is a local variable in register $ebx, length 4. Symbol nline is a local variable in register $edx, length 4. Symbol repeat is a local variable at frame offset -8, length 4. This command is especially useful for determining what data to collect during a "trace experiment", see *note collect: Tracepoint Actions. `info source' Show information about the current source file--that is, the source file for the function containing the current point of execution: * the name of the source file, and the directory containing it, * the directory it was compiled in, * its length, in lines, * which programming language it is written in, * whether the executable includes debugging information for that file, and if so, what format the information is in (e.g., STABS, Dwarf 2, etc.), and * whether the debugging information includes information about preprocessor macros. `info sources' Print the names of all source files in your program for which there is debugging information, organized into two lists: files whose symbols have already been read, and files whose symbols will be read when needed. `info functions' Print the names and data types of all defined functions. `info functions REGEXP' Print the names and data types of all defined functions whose names contain a match for regular expression REGEXP. Thus, `info fun step' finds all functions whose names include `step'; `info fun ^step' finds those whose names start with `step'. If a function name contains characters that conflict with the regular expression language (e.g. `operator*()'), they may be quoted with a backslash. `info variables' Print the names and data types of all variables that are defined outside of functions (i.e. excluding local variables). `info variables REGEXP' Print the names and data types of all variables (except for local variables) whose names contain a match for regular expression REGEXP. `info classes' `info classes REGEXP' Display all Objective-C classes in your program, or (with the REGEXP argument) all those matching a particular regular expression. `info selectors' `info selectors REGEXP' Display all Objective-C selectors in your program, or (with the REGEXP argument) all those matching a particular regular expression. `set opaque-type-resolution on' Tell GDB to resolve opaque types. An opaque type is a type declared as a pointer to a `struct', `class', or `union'--for example, `struct MyType *'--that is used in one source file although the full declaration of `struct MyType' is in another source file. The default is on. A change in the setting of this subcommand will not take effect until the next time symbols for a file are loaded. `set opaque-type-resolution off' Tell GDB not to resolve opaque types. In this case, the type is printed as follows: {<no data fields>} `show opaque-type-resolution' Show whether opaque types are resolved or not. `maint print symbols FILENAME' `maint print psymbols FILENAME' `maint print msymbols FILENAME' Write a dump of debugging symbol data into the file FILENAME. These commands are used to debug the GDB symbol-reading code. Only symbols with debugging data are included. If you use `maint print symbols', GDB includes all the symbols for which it has already collected full details: that is, FILENAME reflects symbols for only those files whose symbols GDB has read. You can use the command `info sources' to find out which files these are. If you use `maint print psymbols' instead, the dump shows information about symbols that GDB only knows partially--that is, symbols defined in files that GDB has skimmed, but not yet read completely. Finally, `maint print msymbols' dumps just the minimal symbol information required for each object file from which GDB has read some symbols. *Note Commands to Specify Files: Files, for a discussion of how GDB reads symbols (in the description of `symbol-file'). `maint info symtabs [ REGEXP ]' `maint info psymtabs [ REGEXP ]' List the `struct symtab' or `struct partial_symtab' structures whose names match REGEXP. If REGEXP is not given, list them all. The output includes expressions which you can copy into a GDB debugging this one to examine a particular structure in more detail. For example: (gdb) maint info psymtabs dwarf2read { objfile /home/gnu/build/gdb/gdb ((struct objfile *) 0x82e69d0) { psymtab /home/gnu/src/gdb/dwarf2read.c ((struct partial_symtab *) 0x8474b10) readin no fullname (null) text addresses 0x814d3c8 -- 0x8158074 globals (* (struct partial_symbol **) 0x8507a08 @ 9) statics (* (struct partial_symbol **) 0x40e95b78 @ 2882) dependencies (none) } } (gdb) maint info symtabs (gdb) We see that there is one partial symbol table whose filename contains the string `dwarf2read', belonging to the `gdb' executable; and we see that GDB has not read in any symtabs yet at all. If we set a breakpoint on a function, that will cause GDB to read the symtab for the compilation unit containing that function: (gdb) break dwarf2_psymtab_to_symtab Breakpoint 1 at 0x814e5da: file /home/gnu/src/gdb/dwarf2read.c, line 1574. (gdb) maint info symtabs { objfile /home/gnu/build/gdb/gdb ((struct objfile *) 0x82e69d0) { symtab /home/gnu/src/gdb/dwarf2read.c ((struct symtab *) 0x86c1f38) dirname (null) fullname (null) blockvector ((struct blockvector *) 0x86c1bd0) (primary) linetable ((struct linetable *) 0x8370fa0) debugformat DWARF 2 } } (gdb)  File: gdb.info, Node: Altering, Next: GDB Files, Prev: Symbols, Up: Top 17 Altering Execution ********************* Once you think you have found an error in your program, you might want to find out for certain whether correcting the apparent error would lead to correct results in the rest of the run. You can find the answer by experiment, using the GDB features for altering execution of the program. For example, you can store new values into variables or memory locations, give your program a signal, restart it at a different address, or even return prematurely from a function. * Menu: * Assignment:: Assignment to variables * Jumping:: Continuing at a different address * Signaling:: Giving your program a signal * Returning:: Returning from a function * Calling:: Calling your program's functions * Patching:: Patching your program  File: gdb.info, Node: Assignment, Next: Jumping, Up: Altering 17.1 Assignment to Variables ============================ To alter the value of a variable, evaluate an assignment expression. *Note Expressions: Expressions. For example, print x=4 stores the value 4 into the variable `x', and then prints the value of the assignment expression (which is 4). *Note Using GDB with Different Languages: Languages, for more information on operators in supported languages. If you are not interested in seeing the value of the assignment, use the `set' command instead of the `print' command. `set' is really the same as `print' except that the expression's value is not printed and is not put in the value history (*note Value History: Value History.). The expression is evaluated only for its effects. If the beginning of the argument string of the `set' command appears identical to a `set' subcommand, use the `set variable' command instead of just `set'. This command is identical to `set' except for its lack of subcommands. For example, if your program has a variable `width', you get an error if you try to set a new value with just `set width=13', because GDB has the command `set width': (gdb) whatis width type = double (gdb) p width $4 = 13 (gdb) set width=47 Invalid syntax in expression. The invalid expression, of course, is `=47'. In order to actually set the program's variable `width', use (gdb) set var width=47 Because the `set' command has many subcommands that can conflict with the names of program variables, it is a good idea to use the `set variable' command instead of just `set'. For example, if your program has a variable `g', you run into problems if you try to set a new value with just `set g=4', because GDB has the command `set gnutarget', abbreviated `set g': (gdb) whatis g type = double (gdb) p g $1 = 1 (gdb) set g=4 (gdb) p g $2 = 1 (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/smith/cc_progs/a.out "/home/smith/cc_progs/a.out": can't open to read symbols: Invalid bfd target. (gdb) show g The current BFD target is "=4". The program variable `g' did not change, and you silently set the `gnutarget' to an invalid value. In order to set the variable `g', use (gdb) set var g=4 GDB allows more implicit conversions in assignments than C; you can freely store an integer value into a pointer variable or vice versa, and you can convert any structure to any other structure that is the same length or shorter. To store values into arbitrary places in memory, use the `{...}' construct to generate a value of specified type at a specified address (*note Expressions: Expressions.). For example, `{int}0x83040' refers to memory location `0x83040' as an integer (which implies a certain size and representation in memory), and set {int}0x83040 = 4 stores the value 4 into that memory location.  File: gdb.info, Node: Jumping, Next: Signaling, Prev: Assignment, Up: Altering 17.2 Continuing at a Different Address ====================================== Ordinarily, when you continue your program, you do so at the place where it stopped, with the `continue' command. You can instead continue at an address of your own choosing, with the following commands: `jump LINESPEC' `j LINESPEC' `jump LOCATION' `j LOCATION' Resume execution at line LINESPEC or at address given by LOCATION. Execution stops again immediately if there is a breakpoint there. *Note Specify Location::, for a description of the different forms of LINESPEC and LOCATION. It is common practice to use the `tbreak' command in conjunction with `jump'. *Note Setting Breakpoints: Set Breaks. The `jump' command does not change the current stack frame, or the stack pointer, or the contents of any memory location or any register other than the program counter. If line LINESPEC is in a different function from the one currently executing, the results may be bizarre if the two functions expect different patterns of arguments or of local variables. For this reason, the `jump' command requests confirmation if the specified line is not in the function currently executing. However, even bizarre results are predictable if you are well acquainted with the machine-language code of your program. On many systems, you can get much the same effect as the `jump' command by storing a new value into the register `$pc'. The difference is that this does not start your program running; it only changes the address of where it _will_ run when you continue. For example, set $pc = 0x485 makes the next `continue' command or stepping command execute at address `0x485', rather than at the address where your program stopped. *Note Continuing and Stepping: Continuing and Stepping. The most common occasion to use the `jump' command is to back up--perhaps with more breakpoints set--over a portion of a program that has already executed, in order to examine its execution in more detail.  File: gdb.info, Node: Signaling, Next: Returning, Prev: Jumping, Up: Altering 17.3 Giving your Program a Signal ================================= `signal SIGNAL' Resume execution where your program stopped, but immediately give it the signal SIGNAL. SIGNAL can be the name or the number of a signal. For example, on many systems `signal 2' and `signal SIGINT' are both ways of sending an interrupt signal. Alternatively, if SIGNAL is zero, continue execution without giving a signal. This is useful when your program stopped on account of a signal and would ordinarily see the signal when resumed with the `continue' command; `signal 0' causes it to resume without a signal. `signal' does not repeat when you press <RET> a second time after executing the command. Invoking the `signal' command is not the same as invoking the `kill' utility from the shell. Sending a signal with `kill' causes GDB to decide what to do with the signal depending on the signal handling tables (*note Signals::). The `signal' command passes the signal directly to your program.  File: gdb.info, Node: Returning, Next: Calling, Prev: Signaling, Up: Altering 17.4 Returning from a Function ============================== `return' `return EXPRESSION' You can cancel execution of a function call with the `return' command. If you give an EXPRESSION argument, its value is used as the function's return value. When you use `return', GDB discards the selected stack frame (and all frames within it). You can think of this as making the discarded frame return prematurely. If you wish to specify a value to be returned, give that value as the argument to `return'. This pops the selected stack frame (*note Selecting a Frame: Selection.), and any other frames inside of it, leaving its caller as the innermost remaining frame. That frame becomes selected. The specified value is stored in the registers used for returning values of functions. The `return' command does not resume execution; it leaves the program stopped in the state that would exist if the function had just returned. In contrast, the `finish' command (*note Continuing and Stepping: Continuing and Stepping.) resumes execution until the selected stack frame returns naturally. GDB needs to know how the EXPRESSION argument should be set for the inferior. The concrete registers assignment depends on the OS ABI and the type being returned by the selected stack frame. For example it is common for OS ABI to return floating point values in FPU registers while integer values in CPU registers. Still some ABIs return even floating point values in CPU registers. Larger integer widths (such as `long long int') also have specific placement rules. GDB already knows the OS ABI from its current target so it needs to find out also the type being returned to make the assignment into the right register(s). Normally, the selected stack frame has debug info. GDB will always use the debug info instead of the implicit type of EXPRESSION when the debug info is available. For example, if you type `return -1', and the function in the current stack frame is declared to return a `long long int', GDB transparently converts the implicit `int' value of -1 into a `long long int': Breakpoint 1, func () at gdb.base/return-nodebug.c:29 29 return 31; (gdb) return -1 Make func return now? (y or n) y #0 0x004004f6 in main () at gdb.base/return-nodebug.c:43 43 printf ("result=%lld\n", func ()); (gdb) However, if the selected stack frame does not have a debug info, e.g., if the function was compiled without debug info, GDB has to find out the type to return from user. Specifying a different type by mistake may set the value in different inferior registers than the caller code expects. For example, typing `return -1' with its implicit type `int' would set only a part of a `long long int' result for a debug info less function (on 32-bit architectures). Therefore the user is required to specify the return type by an appropriate cast explicitly: Breakpoint 2, 0x0040050b in func () (gdb) return -1 Return value type not available for selected stack frame. Please use an explicit cast of the value to return. (gdb) return (long long int) -1 Make selected stack frame return now? (y or n) y #0 0x00400526 in main () (gdb)  File: gdb.info, Node: Calling, Next: Patching, Prev: Returning, Up: Altering 17.5 Calling Program Functions ============================== `print EXPR' Evaluate the expression EXPR and display the resulting value. EXPR may include calls to functions in the program being debugged. `call EXPR' Evaluate the expression EXPR without displaying `void' returned values. You can use this variant of the `print' command if you want to execute a function from your program that does not return anything (a.k.a. "a void function"), but without cluttering the output with `void' returned values that GDB will otherwise print. If the result is not void, it is printed and saved in the value history. It is possible for the function you call via the `print' or `call' command to generate a signal (e.g., if there's a bug in the function, or if you passed it incorrect arguments). What happens in that case is controlled by the `set unwindonsignal' command. Similarly, with a C++ program it is possible for the function you call via the `print' or `call' command to generate an exception that is not handled due to the constraints of the dummy frame. In this case, any exception that is raised in the frame, but has an out-of-frame exception handler will not be found. GDB builds a dummy-frame for the inferior function call, and the unwinder cannot seek for exception handlers outside of this dummy-frame. What happens in that case is controlled by the `set unwind-on-terminating-exception' command. `set unwindonsignal' Set unwinding of the stack if a signal is received while in a function that GDB called in the program being debugged. If set to on, GDB unwinds the stack it created for the call and restores the context to what it was before the call. If set to off (the default), GDB stops in the frame where the signal was received. `show unwindonsignal' Show the current setting of stack unwinding in the functions called by GDB. `set unwind-on-terminating-exception' Set unwinding of the stack if a C++ exception is raised, but left unhandled while in a function that GDB called in the program being debugged. If set to on (the default), GDB unwinds the stack it created for the call and restores the context to what it was before the call. If set to off, GDB the exception is delivered to the default C++ exception handler and the inferior terminated. `show unwind-on-terminating-exception' Show the current setting of stack unwinding in the functions called by GDB. Sometimes, a function you wish to call is actually a "weak alias" for another function. In such case, GDB might not pick up the type information, including the types of the function arguments, which causes GDB to call the inferior function incorrectly. As a result, the called function will function erroneously and may even crash. A solution to that is to use the name of the aliased function instead.  File: gdb.info, Node: Patching, Prev: Calling, Up: Altering 17.6 Patching Programs ====================== By default, GDB opens the file containing your program's executable code (or the corefile) read-only. This prevents accidental alterations to machine code; but it also prevents you from intentionally patching your program's binary. If you'd like to be able to patch the binary, you can specify that explicitly with the `set write' command. For example, you might want to turn on internal debugging flags, or even to make emergency repairs. `set write on' `set write off' If you specify `set write on', GDB opens executable and core files for both reading and writing; if you specify `set write off' (the default), GDB opens them read-only. If you have already loaded a file, you must load it again (using the `exec-file' or `core-file' command) after changing `set write', for your new setting to take effect. `show write' Display whether executable files and core files are opened for writing as well as reading.  File: gdb.info, Node: GDB Files, Next: Targets, Prev: Altering, Up: Top 18 GDB Files ************ GDB needs to know the file name of the program to be debugged, both in order to read its symbol table and in order to start your program. To debug a core dump of a previous run, you must also tell GDB the name of the core dump file. * Menu: * Files:: Commands to specify files * Separate Debug Files:: Debugging information in separate files * MiniDebugInfo:: Debugging information in a special section * Index Files:: Index files speed up GDB * Symbol Errors:: Errors reading symbol files * Data Files:: GDB data files  File: gdb.info, Node: Files, Next: Separate Debug Files, Up: GDB Files 18.1 Commands to Specify Files ============================== You may want to specify executable and core dump file names. The usual way to do this is at start-up time, using the arguments to GDB's start-up commands (*note Getting In and Out of GDB: Invocation.). Occasionally it is necessary to change to a different file during a GDB session. Or you may run GDB and forget to specify a file you want to use. Or you are debugging a remote target via `gdbserver' (*note file: Server.). In these situations the GDB commands to specify new files are useful. `file FILENAME' Use FILENAME as the program to be debugged. It is read for its symbols and for the contents of pure memory. It is also the program executed when you use the `run' command. If you do not specify a directory and the file is not found in the GDB working directory, GDB uses the environment variable `PATH' as a list of directories to search, just as the shell does when looking for a program to run. You can change the value of this variable, for both GDB and your program, using the `path' command. You can load unlinked object `.o' files into GDB using the `file' command. You will not be able to "run" an object file, but you can disassemble functions and inspect variables. Also, if the underlying BFD functionality supports it, you could use `gdb -write' to patch object files using this technique. Note that GDB can neither interpret nor modify relocations in this case, so branches and some initialized variables will appear to go to the wrong place. But this feature is still handy from time to time. `file' `file' with no argument makes GDB discard any information it has on both executable file and the symbol table. `exec-file [ FILENAME ]' Specify that the program to be run (but not the symbol table) is found in FILENAME. GDB searches the environment variable `PATH' if necessary to locate your program. Omitting FILENAME means to discard information on the executable file. `symbol-file [ FILENAME ]' Read symbol table information from file FILENAME. `PATH' is searched when necessary. Use the `file' command to get both symbol table and program to run from the same file. `symbol-file' with no argument clears out GDB information on your program's symbol table. The `symbol-file' command causes GDB to forget the contents of some breakpoints and auto-display expressions. This is because they may contain pointers to the internal data recording symbols and data types, which are part of the old symbol table data being discarded inside GDB. `symbol-file' does not repeat if you press <RET> again after executing it once. When GDB is configured for a particular environment, it understands debugging information in whatever format is the standard generated for that environment; you may use either a GNU compiler, or other compilers that adhere to the local conventions. Best results are usually obtained from GNU compilers; for example, using `GCC' you can generate debugging information for optimized code. For most kinds of object files, with the exception of old SVR3 systems using COFF, the `symbol-file' command does not normally read the symbol table in full right away. Instead, it scans the symbol table quickly to find which source files and which symbols are present. The details are read later, one source file at a time, as they are needed. The purpose of this two-stage reading strategy is to make GDB start up faster. For the most part, it is invisible except for occasional pauses while the symbol table details for a particular source file are being read. (The `set verbose' command can turn these pauses into messages if desired. *Note Optional Warnings and Messages: Messages/Warnings.) We have not implemented the two-stage strategy for COFF yet. When the symbol table is stored in COFF format, `symbol-file' reads the symbol table data in full right away. Note that "stabs-in-COFF" still does the two-stage strategy, since the debug info is actually in stabs format. `symbol-file [ -readnow ] FILENAME' `file [ -readnow ] FILENAME' You can override the GDB two-stage strategy for reading symbol tables by using the `-readnow' option with any of the commands that load symbol table information, if you want to be sure GDB has the entire symbol table available. `core-file [FILENAME]' `core' Specify the whereabouts of a core dump file to be used as the "contents of memory". Traditionally, core files contain only some parts of the address space of the process that generated them; GDB can access the executable file itself for other parts. `core-file' with no argument specifies that no core file is to be used. Note that the core file is ignored when your program is actually running under GDB. So, if you have been running your program and you wish to debug a core file instead, you must kill the subprocess in which the program is running. To do this, use the `kill' command (*note Killing the Child Process: Kill Process.). `add-symbol-file FILENAME ADDRESS' `add-symbol-file FILENAME ADDRESS [ -readnow ]' `add-symbol-file FILENAME ADDRESS -s SECTION ADDRESS ...' The `add-symbol-file' command reads additional symbol table information from the file FILENAME. You would use this command when FILENAME has been dynamically loaded (by some other means) into the program that is running. ADDRESS should be the memory address at which the file has been loaded; GDB cannot figure this out for itself. You can additionally specify an arbitrary number of `-s SECTION ADDRESS' pairs, to give an explicit section name and base address for that section. You can specify any ADDRESS as an expression. The symbol table of the file FILENAME is added to the symbol table originally read with the `symbol-file' command. You can use the `add-symbol-file' command any number of times; the new symbol data thus read keeps adding to the old. To discard all old symbol data instead, use the `symbol-file' command without any arguments. Although FILENAME is typically a shared library file, an executable file, or some other object file which has been fully relocated for loading into a process, you can also load symbolic information from relocatable `.o' files, as long as: * the file's symbolic information refers only to linker symbols defined in that file, not to symbols defined by other object files, * every section the file's symbolic information refers to has actually been loaded into the inferior, as it appears in the file, and * you can determine the address at which every section was loaded, and provide these to the `add-symbol-file' command. Some embedded operating systems, like Sun Chorus and VxWorks, can load relocatable files into an already running program; such systems typically make the requirements above easy to meet. However, it's important to recognize that many native systems use complex link procedures (`.linkonce' section factoring and C++ constructor table assembly, for example) that make the requirements difficult to meet. In general, one cannot assume that using `add-symbol-file' to read a relocatable object file's symbolic information will have the same effect as linking the relocatable object file into the program in the normal way. `add-symbol-file' does not repeat if you press <RET> after using it. `add-symbol-file-from-memory ADDRESS' Load symbols from the given ADDRESS in a dynamically loaded object file whose image is mapped directly into the inferior's memory. For example, the Linux kernel maps a `syscall DSO' into each process's address space; this DSO provides kernel-specific code for some system calls. The argument can be any expression whose evaluation yields the address of the file's shared object file header. For this command to work, you must have used `symbol-file' or `exec-file' commands in advance. `add-shared-symbol-files LIBRARY-FILE' `assf LIBRARY-FILE' The `add-shared-symbol-files' command can currently be used only in the Cygwin build of GDB on MS-Windows OS, where it is an alias for the `dll-symbols' command (*note Cygwin Native::). GDB automatically looks for shared libraries, however if GDB does not find yours, you can invoke `add-shared-symbol-files'. It takes one argument: the shared library's file name. `assf' is a shorthand alias for `add-shared-symbol-files'. `section SECTION ADDR' The `section' command changes the base address of the named SECTION of the exec file to ADDR. This can be used if the exec file does not contain section addresses, (such as in the `a.out' format), or when the addresses specified in the file itself are wrong. Each section must be changed separately. The `info files' command, described below, lists all the sections and their addresses. `info files' `info target' `info files' and `info target' are synonymous; both print the current target (*note Specifying a Debugging Target: Targets.), including the names of the executable and core dump files currently in use by GDB, and the files from which symbols were loaded. The command `help target' lists all possible targets rather than current ones. `maint info sections' Another command that can give you extra information about program sections is `maint info sections'. In addition to the section information displayed by `info files', this command displays the flags and file offset of each section in the executable and core dump files. In addition, `maint info sections' provides the following command options (which may be arbitrarily combined): `ALLOBJ' Display sections for all loaded object files, including shared libraries. `SECTIONS' Display info only for named SECTIONS. `SECTION-FLAGS' Display info only for sections for which SECTION-FLAGS are true. The section flags that GDB currently knows about are: `ALLOC' Section will have space allocated in the process when loaded. Set for all sections except those containing debug information. `LOAD' Section will be loaded from the file into the child process memory. Set for pre-initialized code and data, clear for `.bss' sections. `RELOC' Section needs to be relocated before loading. `READONLY' Section cannot be modified by the child process. `CODE' Section contains executable code only. `DATA' Section contains data only (no executable code). `ROM' Section will reside in ROM. `CONSTRUCTOR' Section contains data for constructor/destructor lists. `HAS_CONTENTS' Section is not empty. `NEVER_LOAD' An instruction to the linker to not output the section. `COFF_SHARED_LIBRARY' A notification to the linker that the section contains COFF shared library information. `IS_COMMON' Section contains common symbols. `set trust-readonly-sections on' Tell GDB that readonly sections in your object file really are read-only (i.e. that their contents will not change). In that case, GDB can fetch values from these sections out of the object file, rather than from the target program. For some targets (notably embedded ones), this can be a significant enhancement to debugging performance. The default is off. `set trust-readonly-sections off' Tell GDB not to trust readonly sections. This means that the contents of the section might change while the program is running, and must therefore be fetched from the target when needed. `show trust-readonly-sections' Show the current setting of trusting readonly sections. All file-specifying commands allow both absolute and relative file names as arguments. GDB always converts the file name to an absolute file name and remembers it that way. GDB supports GNU/Linux, MS-Windows, HP-UX, SunOS, SVr4, Irix, and IBM RS/6000 AIX shared libraries. On MS-Windows GDB must be linked with the Expat library to support shared libraries. *Note Expat::. GDB automatically loads symbol definitions from shared libraries when you use the `run' command, or when you examine a core file. (Before you issue the `run' command, GDB does not understand references to a function in a shared library, however--unless you are debugging a core file). On HP-UX, if the program loads a library explicitly, GDB automatically loads the symbols at the time of the `shl_load' call. There are times, however, when you may wish to not automatically load symbol definitions from shared libraries, such as when they are particularly large or there are many of them. To control the automatic loading of shared library symbols, use the commands: `set auto-solib-add MODE' If MODE is `on', symbols from all shared object libraries will be loaded automatically when the inferior begins execution, you attach to an independently started inferior, or when the dynamic linker informs GDB that a new library has been loaded. If MODE is `off', symbols must be loaded manually, using the `sharedlibrary' command. The default value is `on'. If your program uses lots of shared libraries with debug info that takes large amounts of memory, you can decrease the GDB memory footprint by preventing it from automatically loading the symbols from shared libraries. To that end, type `set auto-solib-add off' before running the inferior, then load each library whose debug symbols you do need with `sharedlibrary REGEXP', where REGEXP is a regular expression that matches the libraries whose symbols you want to be loaded. `show auto-solib-add' Display the current autoloading mode. To explicitly load shared library symbols, use the `sharedlibrary' command: `info share REGEX' `info sharedlibrary REGEX' Print the names of the shared libraries which are currently loaded that match REGEX. If REGEX is omitted then print all shared libraries that are loaded. `sharedlibrary REGEX' `share REGEX' Load shared object library symbols for files matching a Unix regular expression. As with files loaded automatically, it only loads shared libraries required by your program for a core file or after typing `run'. If REGEX is omitted all shared libraries required by your program are loaded. `nosharedlibrary' Unload all shared object library symbols. This discards all symbols that have been loaded from all shared libraries. Symbols from shared libraries that were loaded by explicit user requests are not discarded. Sometimes you may wish that GDB stops and gives you control when any of shared library events happen. The best way to do this is to use `catch load' and `catch unload' (*note Set Catchpoints::). GDB also supports the the `set stop-on-solib-events' command for this. This command exists for historical reasons. It is less useful than setting a catchpoint, because it does not allow for conditions or commands as a catchpoint does. `set stop-on-solib-events' This command controls whether GDB should give you control when the dynamic linker notifies it about some shared library event. The most common event of interest is loading or unloading of a new shared library. `show stop-on-solib-events' Show whether GDB stops and gives you control when shared library events happen. Shared libraries are also supported in many cross or remote debugging configurations. GDB needs to have access to the target's libraries; this can be accomplished either by providing copies of the libraries on the host system, or by asking GDB to automatically retrieve the libraries from the target. If copies of the target libraries are provided, they need to be the same as the target libraries, although the copies on the target can be stripped as long as the copies on the host are not. For remote debugging, you need to tell GDB where the target libraries are, so that it can load the correct copies--otherwise, it may try to load the host's libraries. GDB has two variables to specify the search directories for target libraries. `set sysroot PATH' Use PATH as the system root for the program being debugged. Any absolute shared library paths will be prefixed with PATH; many runtime loaders store the absolute paths to the shared library in the target program's memory. If you use `set sysroot' to find shared libraries, they need to be laid out in the same way that they are on the target, with e.g. a `/lib' and `/usr/lib' hierarchy under PATH. If PATH starts with the sequence `remote:', GDB will retrieve the target libraries from the remote system. This is only supported when using a remote target that supports the `remote get' command (*note Sending files to a remote system: File Transfer.). The part of PATH following the initial `remote:' (if present) is used as system root prefix on the remote file system. (1) For targets with an MS-DOS based filesystem, such as MS-Windows and SymbianOS, GDB tries prefixing a few variants of the target absolute file name with PATH. But first, on Unix hosts, GDB converts all backslash directory separators into forward slashes, because the backslash is not a directory separator on Unix: c:\foo\bar.dll => c:/foo/bar.dll Then, GDB attempts prefixing the target file name with PATH, and looks for the resulting file name in the host file system: c:/foo/bar.dll => /path/to/sysroot/c:/foo/bar.dll If that does not find the shared library, GDB tries removing the `:' character from the drive spec, both for convenience, and, for the case of the host file system not supporting file names with colons: c:/foo/bar.dll => /path/to/sysroot/c/foo/bar.dll This makes it possible to have a system root that mirrors a target with more than one drive. E.g., you may want to setup your local copies of the target system shared libraries like so (note `c' vs `z'): `/path/to/sysroot/c/sys/bin/foo.dll' `/path/to/sysroot/c/sys/bin/bar.dll' `/path/to/sysroot/z/sys/bin/bar.dll' and point the system root at `/path/to/sysroot', so that GDB can find the correct copies of both `c:\sys\bin\foo.dll', and `z:\sys\bin\bar.dll'. If that still does not find the shared library, GDB tries removing the whole drive spec from the target file name: c:/foo/bar.dll => /path/to/sysroot/foo/bar.dll This last lookup makes it possible to not care about the drive name, if you don't want or need to. The `set solib-absolute-prefix' command is an alias for `set sysroot'. You can set the default system root by using the configure-time `--with-sysroot' option. If the system root is inside GDB's configured binary prefix (set with `--prefix' or `--exec-prefix'), then the default system root will be updated automatically if the installed GDB is moved to a new location. `show sysroot' Display the current shared library prefix. `set solib-search-path PATH' If this variable is set, PATH is a colon-separated list of directories to search for shared libraries. `solib-search-path' is used after `sysroot' fails to locate the library, or if the path to the library is relative instead of absolute. If you want to use `solib-search-path' instead of `sysroot', be sure to set `sysroot' to a nonexistent directory to prevent GDB from finding your host's libraries. `sysroot' is preferred; setting it to a nonexistent directory may interfere with automatic loading of shared library symbols. `show solib-search-path' Display the current shared library search path. `set target-file-system-kind KIND' Set assumed file system kind for target reported file names. Shared library file names as reported by the target system may not make sense as is on the system GDB is running on. For example, when remote debugging a target that has MS-DOS based file system semantics, from a Unix host, the target may be reporting to GDB a list of loaded shared libraries with file names such as `c:\Windows\kernel32.dll'. On Unix hosts, there's no concept of drive letters, so the `c:\' prefix is not normally understood as indicating an absolute file name, and neither is the backslash normally considered a directory separator character. In that case, the native file system would interpret this whole absolute file name as a relative file name with no directory components. This would make it impossible to point GDB at a copy of the remote target's shared libraries on the host using `set sysroot', and impractical with `set solib-search-path'. Setting `target-file-system-kind' to `dos-based' tells GDB to interpret such file names similarly to how the target would, and to map them to file names valid on GDB's native file system semantics. The value of KIND can be `"auto"', in addition to one of the supported file system kinds. In that case, GDB tries to determine the appropriate file system variant based on the current target's operating system (*note Configuring the Current ABI: ABI.). The supported file system settings are: `unix' Instruct GDB to assume the target file system is of Unix kind. Only file names starting the forward slash (`/') character are considered absolute, and the directory separator character is also the forward slash. `dos-based' Instruct GDB to assume the target file system is DOS based. File names starting with either a forward slash, or a drive letter followed by a colon (e.g., `c:'), are considered absolute, and both the slash (`/') and the backslash (`\\') characters are considered directory separators. `auto' Instruct GDB to use the file system kind associated with the target operating system (*note Configuring the Current ABI: ABI.). This is the default. When processing file names provided by the user, GDB frequently needs to compare them to the file names recorded in the program's debug info. Normally, GDB compares just the "base names" of the files as strings, which is reasonably fast even for very large programs. (The base name of a file is the last portion of its name, after stripping all the leading directories.) This shortcut in comparison is based upon the assumption that files cannot have more than one base name. This is usually true, but references to files that use symlinks or similar filesystem facilities violate that assumption. If your program records files using such facilities, or if you provide file names to GDB using symlinks etc., you can set `basenames-may-differ' to `true' to instruct GDB to completely canonicalize each pair of file names it needs to compare. This will make file-name comparisons accurate, but at a price of a significant slowdown. `set basenames-may-differ' Set whether a source file may have multiple base names. `show basenames-may-differ' Show whether a source file may have multiple base names. ---------- Footnotes ---------- (1) If you want to specify a local system root using a directory that happens to be named `remote:', you need to use some equivalent variant of the name like `./remote:'.  File: gdb.info, Node: Separate Debug Files, Next: MiniDebugInfo, Prev: Files, Up: GDB Files 18.2 Debugging Information in Separate Files ============================================ GDB allows you to put a program's debugging information in a file separate from the executable itself, in a way that allows GDB to find and load the debugging information automatically. Since debugging information can be very large--sometimes larger than the executable code itself--some systems distribute debugging information for their executables in separate files, which users can install only when they need to debug a problem. GDB supports two ways of specifying the separate debug info file: * The executable contains a "debug link" that specifies the name of the separate debug info file. The separate debug file's name is usually `EXECUTABLE.debug', where EXECUTABLE is the name of the corresponding executable file without leading directories (e.g., `ls.debug' for `/usr/bin/ls'). In addition, the debug link specifies a 32-bit "Cyclic Redundancy Check" (CRC) checksum for the debug file, which GDB uses to validate that the executable and the debug file came from the same build. * The executable contains a "build ID", a unique bit string that is also present in the corresponding debug info file. (This is supported only on some operating systems, notably those which use the ELF format for binary files and the GNU Binutils.) For more details about this feature, see the description of the `--build-id' command-line option in *note Command Line Options: (ld.info)Options. The debug info file's name is not specified explicitly by the build ID, but can be computed from the build ID, see below. Depending on the way the debug info file is specified, GDB uses two different methods of looking for the debug file: * For the "debug link" method, GDB looks up the named file in the directory of the executable file, then in a subdirectory of that directory named `.debug', and finally under each one of the global debug directories, in a subdirectory whose name is identical to the leading directories of the executable's absolute file name. * For the "build ID" method, GDB looks in the `.build-id' subdirectory of each one of the global debug directories for a file named `NN/NNNNNNNN.debug', where NN are the first 2 hex characters of the build ID bit string, and NNNNNNNN are the rest of the bit string. (Real build ID strings are 32 or more hex characters, not 10.) So, for example, suppose you ask GDB to debug `/usr/bin/ls', which has a debug link that specifies the file `ls.debug', and a build ID whose value in hex is `abcdef1234'. If the list of the global debug directories includes `/usr/lib/debug', then GDB will look for the following debug information files, in the indicated order: - `/usr/lib/debug/.build-id/ab/cdef1234.debug' - `/usr/bin/ls.debug' - `/usr/bin/.debug/ls.debug' - `/usr/lib/debug/usr/bin/ls.debug'. Global debugging info directories default to what is set by GDB configure option `--with-separate-debug-dir'. During GDB run you can also set the global debugging info directories, and view the list GDB is currently using. `set debug-file-directory DIRECTORIES' Set the directories which GDB searches for separate debugging information files to DIRECTORY. Multiple path components can be set concatenating them by a path separator. `show debug-file-directory' Show the directories GDB searches for separate debugging information files. A debug link is a special section of the executable file named `.gnu_debuglink'. The section must contain: * A filename, with any leading directory components removed, followed by a zero byte, * zero to three bytes of padding, as needed to reach the next four-byte boundary within the section, and * a four-byte CRC checksum, stored in the same endianness used for the executable file itself. The checksum is computed on the debugging information file's full contents by the function given below, passing zero as the CRC argument. Any executable file format can carry a debug link, as long as it can contain a section named `.gnu_debuglink' with the contents described above. The build ID is a special section in the executable file (and in other ELF binary files that GDB may consider). This section is often named `.note.gnu.build-id', but that name is not mandatory. It contains unique identification for the built files--the ID remains the same across multiple builds of the same build tree. The default algorithm SHA1 produces 160 bits (40 hexadecimal characters) of the content for the build ID string. The same section with an identical value is present in the original built binary with symbols, in its stripped variant, and in the separate debugging information file. The debugging information file itself should be an ordinary executable, containing a full set of linker symbols, sections, and debugging information. The sections of the debugging information file should have the same names, addresses, and sizes as the original file, but they need not contain any data--much like a `.bss' section in an ordinary executable. The GNU binary utilities (Binutils) package includes the `objcopy' utility that can produce the separated executable / debugging information file pairs using the following commands: objcopy --only-keep-debug foo foo.debug strip -g foo These commands remove the debugging information from the executable file `foo' and place it in the file `foo.debug'. You can use the first, second or both methods to link the two files: * The debug link method needs the following additional command to also leave behind a debug link in `foo': objcopy --add-gnu-debuglink=foo.debug foo Ulrich Drepper's `elfutils' package, starting with version 0.53, contains a version of the `strip' command such that the command `strip foo -f foo.debug' has the same functionality as the two `objcopy' commands and the `ln -s' command above, together. * Build ID gets embedded into the main executable using `ld --build-id' or the GCC counterpart `gcc -Wl,--build-id'. Build ID support plus compatibility fixes for debug files separation are present in GNU binary utilities (Binutils) package since version 2.18. The CRC used in `.gnu_debuglink' is the CRC-32 defined in IEEE 802.3 using the polynomial: x^32 + x^26 + x^23 + x^22 + x^16 + x^12 + x^11 + x^10 + x^8 + x^7 + x^5 + x^4 + x^2 + x + 1 The function is computed byte at a time, taking the least significant bit of each byte first. The initial pattern `0xffffffff' is used, to ensure leading zeros affect the CRC and the final result is inverted to ensure trailing zeros also affect the CRC. _Note:_ This is the same CRC polynomial as used in handling the "Remote Serial Protocol" `qCRC' packet (*note GDB Remote Serial Protocol: Remote Protocol.). However in the case of the Remote Serial Protocol, the CRC is computed _most_ significant bit first, and the result is not inverted, so trailing zeros have no effect on the CRC value. To complete the description, we show below the code of the function which produces the CRC used in `.gnu_debuglink'. Inverting the initially supplied `crc' argument means that an initial call to this function passing in zero will start computing the CRC using `0xffffffff'. unsigned long gnu_debuglink_crc32 (unsigned long crc, unsigned char *buf, size_t len) { static const unsigned long crc32_table[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; unsigned char *end; crc = ~crc & 0xffffffff; for (end = buf + len; buf < end; ++buf) crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8); return ~crc & 0xffffffff; } This computation does not apply to the "build ID" method. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/gdb/doc/gdbint.info-2�����������������������������������������������������������������0000644�0001750�0001750�00000275072�12250773371�015673� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is gdbint.info, produced by makeinfo version 4.13 from ./gdbint.texinfo. INFO-DIR-SECTION Software development START-INFO-DIR-ENTRY * Gdb-Internals: (gdbint). The GNU debugger's internals. END-INFO-DIR-ENTRY Copyright (C) 1990-2013 Free Software Foundation, Inc. Contributed by Cygnus Solutions. Written by John Gilmore. Second Edition by Stan Shebs. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". This file documents the internals of the GNU debugger GDB. Copyright (C) 1990-2013 Free Software Foundation, Inc. Contributed by Cygnus Solutions. Written by John Gilmore. Second Edition by Stan Shebs. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".  File: gdbint.info, Node: Debugging GDB, Prev: Getting Started, Up: Hints 23.2 Debugging GDB with itself ============================== If GDB is limping on your machine, this is the preferred way to get it fully functional. Be warned that in some ancient Unix systems, like Ultrix 4.2, a program can't be running in one process while it is being debugged in another. Rather than typing the command `./gdb ./gdb', which works on Suns and such, you can copy `gdb' to `gdb2' and then type `./gdb ./gdb2'. When you run GDB in the GDB source directory, it will read `gdb-gdb.gdb' file (plus possibly `gdb-gdb.py' file) that sets up some simple things to make debugging gdb easier. The `info' command, when executed without a subcommand in a GDB being debugged by gdb, will pop you back up to the top level gdb. See `gdb-gdb.gdb' for details. If you use emacs, you will probably want to do a `make TAGS' after you configure your distribution; this will put the machine dependent routines for your local machine where they will be accessed first by `M-.' Also, make sure that you've either compiled GDB with your local cc, or have run `fixincludes' if you are compiling with gcc. 23.3 Submitting Patches ======================= Thanks for thinking of offering your changes back to the community of GDB users. In general we like to get well designed enhancements. Thanks also for checking in advance about the best way to transfer the changes. The GDB maintainers will only install "cleanly designed" patches. This manual summarizes what we believe to be clean design for GDB. If the maintainers don't have time to put the patch in when it arrives, or if there is any question about a patch, it goes into a large queue with everyone else's patches and bug reports. The legal issue is that to incorporate substantial changes requires a copyright assignment from you and/or your employer, granting ownership of the changes to the Free Software Foundation. You can get the standard documents for doing this by sending mail to `gnu@gnu.org' and asking for it. We recommend that people write in "All programs owned by the Free Software Foundation" as "NAME OF PROGRAM", so that changes in many programs (not just GDB, but GAS, Emacs, GCC, etc) can be contributed with only one piece of legalese pushed through the bureaucracy and filed with the FSF. We can't start merging changes until this paperwork is received by the FSF (their rules, which we follow since we maintain it for them). Technically, the easiest way to receive changes is to receive each feature as a small context diff or unidiff, suitable for `patch'. Each message sent to me should include the changes to C code and header files for a single feature, plus `ChangeLog' entries for each directory where files were modified, and diffs for any changes needed to the manuals (`gdb/doc/gdb.texinfo' or `gdb/doc/gdbint.texinfo'). If there are a lot of changes for a single feature, they can be split down into multiple messages. In this way, if we read and like the feature, we can add it to the sources with a single patch command, do some testing, and check it in. If you leave out the `ChangeLog', we have to write one. If you leave out the doc, we have to puzzle out what needs documenting. Etc., etc. The reason to send each change in a separate message is that we will not install some of the changes. They'll be returned to you with questions or comments. If we're doing our job correctly, the message back to you will say what you have to fix in order to make the change acceptable. The reason to have separate messages for separate features is so that the acceptable changes can be installed while one or more changes are being reworked. If multiple features are sent in a single message, we tend to not put in the effort to sort out the acceptable changes from the unacceptable, so none of the features get installed until all are acceptable. If this sounds painful or authoritarian, well, it is. But we get a lot of bug reports and a lot of patches, and many of them don't get installed because we don't have the time to finish the job that the bug reporter or the contributor could have done. Patches that arrive complete, working, and well designed, tend to get installed on the day they arrive. The others go into a queue and get installed as time permits, which, since the maintainers have many demands to meet, may not be for quite some time. Please send patches directly to the GDB maintainers <gdb-patches@sourceware.org>. 23.4 Build Script ================= The script `gdb_buildall.sh' builds GDB with flag `--enable-targets=all' set. This builds GDB with all supported targets activated. This helps testing GDB when doing changes that affect more than one architecture and is much faster than using `gdb_mbuild.sh'. After building GDB the script checks which architectures are supported and then switches the current architecture to each of those to get information about the architecture. The test results are stored in log files in the directory the script was called from.  File: gdbint.info, Node: GDB Observers, Next: GNU Free Documentation License, Prev: Hints, Up: Top Appendix A GDB Currently available observers ******************************************** A.1 Implementation rationale ============================ An "observer" is an entity which is interested in being notified when GDB reaches certain states, or certain events occur in GDB. The entity being observed is called the "subject". To receive notifications, the observer attaches a callback to the subject. One subject can have several observers. `observer.c' implements an internal generic low-level event notification mechanism. This generic event notification mechanism is then re-used to implement the exported high-level notification management routines for all possible notifications. The current implementation of the generic observer provides support for contextual data. This contextual data is given to the subject when attaching the callback. In return, the subject will provide this contextual data back to the observer as a parameter of the callback. Note that the current support for the contextual data is only partial, as it lacks a mechanism that would deallocate this data when the callback is detached. This is not a problem so far, as this contextual data is only used internally to hold a function pointer. Later on, if a certain observer needs to provide support for user-level contextual data, then the generic notification mechanism will need to be enhanced to allow the observer to provide a routine to deallocate the data when attaching the callback. The observer implementation is also currently not reentrant. In particular, it is therefore not possible to call the attach or detach routines during a notification. A.2 Debugging ============= Observer notifications can be traced using the command `set debug observer 1' (*note Optional messages about internal happenings: (gdb)Debugging Output.). A.3 `normal_stop' Notifications =============================== GDB notifies all `normal_stop' observers when the inferior execution has just stopped, the associated messages and annotations have been printed, and the control is about to be returned to the user. Note that the `normal_stop' notification is not emitted when the execution stops due to a breakpoint, and this breakpoint has a condition that is not met. If the breakpoint has any associated commands list, the commands are executed after the notification is emitted. The following interfaces are available to manage observers: -- Function: extern struct observer *observer_attach_EVENT (observer_EVENT_ftype *F) Using the function F, create an observer that is notified when ever EVENT occurs, return the observer. -- Function: extern void observer_detach_EVENT (struct observer *OBSERVER); Remove OBSERVER from the list of observers to be notified when EVENT occurs. -- Function: extern void observer_notify_EVENT (void); Send a notification to all EVENT observers. The following observable events are defined: -- Function: void normal_stop (struct bpstats *BS, int PRINT_FRAME) The inferior has stopped for real. The BS argument describes the breakpoints were are stopped at, if any. Second argument PRINT_FRAME non-zero means display the location where the inferior has stopped. -- Function: void target_changed (struct target_ops *TARGET) The target's register contents have changed. -- Function: void executable_changed (void) The executable being debugged by GDB has changed: The user decided to debug a different program, or the program he was debugging has been modified since being loaded by the debugger (by being recompiled, for instance). -- Function: void inferior_created (struct target_ops *OBJFILE, int FROM_TTY) GDB has just connected to an inferior. For `run', GDB calls this observer while the inferior is still stopped at the entry-point instruction. For `attach' and `core', GDB calls this observer immediately after connecting to the inferior, and before any information on the inferior has been printed. -- Function: void record_changed (struct inferior *INFERIOR, int STARTED) The status of process record for inferior INFERIOR in GDB has changed. The process record is started if STARTED is true, and the process record is stopped if STARTED is false. -- Function: void solib_loaded (struct so_list *SOLIB) The shared library specified by SOLIB has been loaded. Note that when GDB calls this observer, the library's symbols probably haven't been loaded yet. -- Function: void solib_unloaded (struct so_list *SOLIB) The shared library specified by SOLIB has been unloaded. Note that when GDB calls this observer, the library's symbols have not been unloaded yet, and thus are still available. -- Function: void new_objfile (struct objfile *OBJFILE) The symbol file specified by OBJFILE has been loaded. Called with OBJFILE equal to `NULL' to indicate previously loaded symbol table data has now been invalidated. -- Function: void new_thread (struct thread_info *T) The thread specified by T has been created. -- Function: void thread_exit (struct thread_info *T, int SILENT) The thread specified by T has exited. The SILENT argument indicates that GDB is removing the thread from its tables without wanting to notify the user about it. -- Function: void thread_stop_requested (ptid_t PTID) An explicit stop request was issued to PTID. If PTID equals MINUS_ONE_PTID, the request applied to all threads. If `ptid_is_pid(ptid)' returns true, the request applied to all threads of the process pointed at by PTID. Otherwise, the request applied to the single thread pointed at by PTID. -- Function: void target_resumed (ptid_t PTID) The target was resumed. The PTID parameter specifies which thread was resume, and may be RESUME_ALL if all threads are resumed. -- Function: void about_to_proceed (void) The target is about to be proceeded. -- Function: void breakpoint_created (struct breakpoint *B) A new breakpoint B has been created. -- Function: void breakpoint_deleted (struct breakpoint *B) A breakpoint has been destroyed. The argument B is the pointer to the destroyed breakpoint. -- Function: void breakpoint_modified (struct breakpoint *B) A breakpoint has been modified in some way. The argument B is the modified breakpoint. -- Function: void traceframe_changed (int TFNUM, int TPNUM) The trace frame is changed to TFNUM (e.g., by using the `tfind' command). If TFNUM is negative, it means GDB resumes live debugging. The number of the tracepoint associated with this traceframe is TPNUM. -- Function: void architecture_changed (struct gdbarch *NEWARCH) The current architecture has changed. The argument NEWARCH is a pointer to the new architecture. -- Function: void thread_ptid_changed (ptid_t OLD_PTID, ptid_t NEW_PTID) The thread's ptid has changed. The OLD_PTID parameter specifies the old value, and NEW_PTID specifies the new value. -- Function: void inferior_added (struct inferior *INF) The inferior INF has been added to the list of inferiors. At this point, it might not be associated with any process. -- Function: void inferior_appeared (struct inferior *INF) The inferior identified by INF has been attached to a process. -- Function: void inferior_exit (struct inferior *INF) Either the inferior associated with INF has been detached from the process, or the process has exited. -- Function: void inferior_removed (struct inferior *INF) The inferior INF has been removed from the list of inferiors. This method is called immediately before freeing INF. -- Function: void memory_changed (struct inferior *INFERIOR, CORE_ADDR ADDR, ssize_t LEN, const bfd_byte *DATA) Bytes from DATA to DATA + LEN have been written to the INFERIOR at ADDR. -- Function: void before_prompt (const char *CURRENT_PROMPT) Called before a top-level prompt is displayed. CURRENT_PROMPT is the current top-level prompt. -- Function: void gdb_datadir_changed (void) Variable gdb_datadir has been set. The value may not necessarily change. -- Function: void command_param_changed (const char *PARAM, const char *VALUE) The parameter of some `set' commands in console are changed. This method is called after a command `set PARAM VALUE'. PARAM is the parameter of `set' command, and VALUE is the value of changed parameter. -- Function: void tsv_created (const struct trace_state_variable *TSV) The new trace state variable TSV is created. -- Function: void tsv_deleted (const struct trace_state_variable *TSV) The trace state variable TSV is deleted. If TSV is `NULL', all trace state variables are deleted. -- Function: void tsv_modified (const struct trace_state_variable *TSV) The trace state value TSV is modified. -- Function: void test_notification (int SOMEARG) This observer is used for internal testing. Do not use. See testsuite/gdb.gdb/observer.exp.  File: gdbint.info, Node: GNU Free Documentation License, Next: Concept Index, Prev: GDB Observers, Up: Top Appendix B GNU Free Documentation License ***************************************** Version 1.3, 3 November 2008 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. `http://fsf.org/' Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. The "publisher" means any person or entity that distributes copies of the Document to the public. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements." 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See `http://www.gnu.org/copyleft/'. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. 11. RELICENSING "Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site. "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. "Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. ADDENDUM: How to use this License for your documents ==================================================== To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.  File: gdbint.info, Node: Concept Index, Next: Function and Variable Index, Prev: GNU Free Documentation License, Up: Top Concept Index ************* �[index�] * Menu: * $fp: Register Information Functions. (line 126) * $pc: Register Architecture Functions & Variables. (line 58) * $ps: Register Architecture Functions & Variables. (line 69) * $sp: Register Architecture Functions & Variables. (line 49) * a.out format: Symbol Handling. (line 218) * abstract interpretation of function prologues: Algorithms. (line 48) * adding a new host: Host Definition. (line 13) * adding a symbol-reading module: Symbol Handling. (line 37) * adding a target: Adding a New Target. (line 6) * adding debugging info reader: Symbol Handling. (line 365) * adding source language: Language Support. (line 17) * address classes: Address Classes. (line 6) * address representation: Pointers and Addresses. (line 6) * address spaces, separate data and code: Pointers and Addresses. (line 6) * algorithms: Algorithms. (line 6) * ARCH-tdep.c: How an Architecture is Represented. (line 13) * architecture representation: How an Architecture is Represented. (line 6) * Array Containers: Support Libraries. (line 131) * assumptions about targets: Misc Guidelines. (line 334) * base of a frame: Frame Handling Terminology. (line 28) * BFD library: Support Libraries. (line 9) * breakpoint address adjusted: Defining Other Architecture Features. (line 149) * breakpoints: Algorithms. (line 151) * bug-gdb mailing list: Getting Started. (line 72) * build script: Debugging GDB. (line 94) * C data types: Coding Standards. (line 120) * call frame information: Algorithms. (line 14) * call stack frame: Stack Frames. (line 6) * calls to the inferior: Inferior Call Setup. (line 6) * CFI (call frame information): Algorithms. (line 14) * checkpoints: Algorithms. (line 600) * cleanups: Misc Guidelines. (line 12) * CLI: User Interface. (line 12) * code pointers, word-addressed: Pointers and Addresses. (line 6) * coding standards: Coding Standards. (line 6) * COFF debugging info: Symbol Handling. (line 315) * COFF format: Symbol Handling. (line 233) * command implementation: Getting Started. (line 60) * command interpreter: User Interface. (line 12) * comment formatting: Coding Standards. (line 94) * compiler warnings: Misc Guidelines. (line 252) * Compressed DWARF 2 debugging info: Symbol Handling. (line 335) * computed values: Values. (line 35) * configure.tgt: How an Architecture is Represented. (line 19) * converting between pointers and addresses: Pointers and Addresses. (line 6) * converting integers to addresses: Defining Other Architecture Features. (line 278) * cooked register representation: Raw and Cooked Registers. (line 6) * core files: Adding support for debugging core files. (line 6) * D10V addresses: Pointers and Addresses. (line 6) * data output: User Interface. (line 254) * data-pointer, per-architecture/per-module: Misc Guidelines. (line 100) * debugging GDB: Debugging GDB. (line 6) * deprecating commands: User Interface. (line 32) * design: Misc Guidelines. (line 329) * DOS text files: Host Definition. (line 79) * dummy frames: About Dummy Frames. (line 6) * DW_AT_address_class: Address Classes. (line 6) * DW_AT_byte_size: Address Classes. (line 6) * DWARF 2 debugging info: Symbol Handling. (line 328) * DWARF 3 debugging info: Symbol Handling. (line 355) * ECOFF debugging info: Symbol Handling. (line 321) * ECOFF format: Symbol Handling. (line 248) * ELF format: Symbol Handling. (line 281) * execution state: Managing Execution State. (line 6) * experimental branches: Versions and Branches. (line 116) * expression evaluation routines: Language Support. (line 58) * expression parser: Language Support. (line 21) * field output functions: User Interface. (line 254) * file names, portability: Misc Guidelines. (line 367) * finding a symbol: Symbol Handling. (line 133) * fine-tuning gdbarch structure: OS ABI Variant Handling. (line 23) * first floating point register: Register Architecture Functions & Variables. (line 78) * frame: Stack Frames. (line 6) * frame ID: Stack Frames. (line 41) * frame pointer: Register Information Functions. (line 126) * frame, definition of base of a frame: Frame Handling Terminology. (line 28) * frame, definition of innermost frame: Frame Handling Terminology. (line 24) * frame, definition of NEXT frame: Frame Handling Terminology. (line 11) * frame, definition of PREVIOUS frame: Frame Handling Terminology. (line 14) * frame, definition of sentinel frame: Frame Handling Terminology. (line 52) * frame, definition of sniffing: Frame Handling Terminology. (line 46) * frame, definition of THIS frame: Frame Handling Terminology. (line 9) * frame, definition of unwinding: Frame Handling Terminology. (line 41) * frame_base: Analyzing Stacks---Frame Sniffers. (line 89) * frame_unwind: Analyzing Stacks---Frame Sniffers. (line 36) * full symbol table: Symbol Handling. (line 104) * function prologue: Prologue Caches. (line 6) * function prototypes: Coding Standards. (line 153) * function usage: Coding Standards. (line 124) * fundamental types: Symbol Handling. (line 183) * GDB source tree structure: Overall Structure. (line 83) * gdb_byte: Register Caching. (line 23) * gdbarch: How an Architecture is Represented. (line 19) * gdbarch accessor functions: Creating a New Architecture. (line 14) * gdbarch lookup: Looking Up an Existing Architecture. (line 6) * gdbarch register architecture functions: Register Architecture Functions & Variables. (line 6) * gdbarch register information functions: Register Information Functions. (line 6) * gdbarch_info: Looking Up an Existing Architecture. (line 22) * gdbarch_tdep definition: Creating a New Architecture. (line 34) * gdbarch_tdep when allocating new gdbarch: Creating a New Architecture. (line 6) * generic host support: Host Definition. (line 38) * hardware breakpoints: Algorithms. (line 158) * hardware watchpoints: Algorithms. (line 280) * host: Overall Structure. (line 50) * host, adding: Host Definition. (line 13) * innermost frame: Frame Handling Terminology. (line 24) * insert or remove hardware breakpoint: Algorithms. (line 234) * insert or remove hardware watchpoint: Algorithms. (line 347) * insert or remove software breakpoint: Algorithms. (line 211) * item output functions: User Interface. (line 254) * language parser: Language Support. (line 25) * language support: Language Support. (line 6) * legal papers for code contributions: Debugging GDB. (line 42) * libgdb: libgdb. (line 9) * libiberty library: Support Libraries. (line 52) * line wrap in output: Misc Guidelines. (line 191) * list output functions: User Interface. (line 131) * longjmp debugging: Algorithms. (line 258) * lookup_symbol: Symbol Handling. (line 142) * lval_type enumeration, for values.: Values. (line 19) * making a new release of gdb: Releasing GDB. (line 6) * memory representation: Register and Memory Data. (line 6) * minimal symbol table: Symbol Handling. (line 111) * minsymtabs: Symbol Handling. (line 111) * multi-arch data: Misc Guidelines. (line 100) * native conditionals: Native Debugging. (line 75) * native debugging: Native Debugging. (line 6) * nesting level in ui_out functions: User Interface. (line 143) * new year procedure: Start of New Year Procedure. (line 6) * NEXT frame: Frame Handling Terminology. (line 11) * normal_stop observer: GDB Observers. (line 48) * notification about inferior execution stop: GDB Observers. (line 48) * notifications about changes in internals: Algorithms. (line 630) * object file formats: Symbol Handling. (line 215) * observer pattern interface: Algorithms. (line 630) * observers implementation rationale: GDB Observers. (line 9) * obstacks: Support Libraries. (line 69) * opcodes library: Support Libraries. (line 39) * OS ABI variants: OS ABI Variant Handling. (line 6) * partial symbol table: Symbol Handling. (line 114) * PE-COFF format: Symbol Handling. (line 272) * per-architecture module data: Misc Guidelines. (line 100) * pointer representation: Pointers and Addresses. (line 6) * portability: Misc Guidelines. (line 350) * portable file name handling: Misc Guidelines. (line 367) * porting to new machines: Porting GDB. (line 6) * PREVIOUS frame: Frame Handling Terminology. (line 14) * processor status register: Register Architecture Functions & Variables. (line 69) * program counter <1>: Register Architecture Functions & Variables. (line 58) * program counter: Algorithms. (line 158) * prologue analysis: Algorithms. (line 14) * prologue cache: Prologue Caches. (line 12) * prologue of a function: Prologue Caches. (line 6) * prologue-value.c: Algorithms. (line 48) * prompt: Host Definition. (line 86) * pseudo-evaluation of function prologues: Algorithms. (line 48) * psymtabs: Symbol Handling. (line 107) * raw register representation: Raw and Cooked Registers. (line 6) * reading of symbols: Symbol Handling. (line 25) * readline library: Support Libraries. (line 45) * register caching: Register Caching. (line 6) * register data formats, converting: Register and Memory Data. (line 6) * register representation: Register and Memory Data. (line 6) * regular expressions library: Support Libraries. (line 110) * Release Branches: Versions and Branches. (line 93) * remote debugging support: Host Definition. (line 41) * representation of architecture: How an Architecture is Represented. (line 6) * representations, raw and cooked registers: Raw and Cooked Registers. (line 6) * representations, register and memory: Register and Memory Data. (line 6) * requirements for GDB: Requirements. (line 6) * restart: Algorithms. (line 600) * running the test suite: Testsuite. (line 19) * secondary symbol file: Symbol Handling. (line 47) * sentinel frame <1>: Frame Handling Terminology. (line 52) * sentinel frame: Stack Frames. (line 22) * separate data and code address spaces: Pointers and Addresses. (line 6) * serial line support: Host Definition. (line 41) * set_gdbarch functions: Creating a New Architecture. (line 14) * sniffing: Frame Handling Terminology. (line 46) * software breakpoints: Algorithms. (line 184) * software watchpoints: Algorithms. (line 280) * SOM debugging info: Symbol Handling. (line 360) * SOM format: Symbol Handling. (line 291) * source code formatting: Coding Standards. (line 28) * spaces, separate data and code address: Pointers and Addresses. (line 6) * stabs debugging info: Symbol Handling. (line 305) * stack frame, definition of base of a frame: Frame Handling Terminology. (line 28) * stack frame, definition of innermost frame: Frame Handling Terminology. (line 24) * stack frame, definition of NEXT frame: Frame Handling Terminology. (line 11) * stack frame, definition of PREVIOUS frame: Frame Handling Terminology. (line 14) * stack frame, definition of sentinel frame: Frame Handling Terminology. (line 52) * stack frame, definition of sniffing: Frame Handling Terminology. (line 46) * stack frame, definition of THIS frame: Frame Handling Terminology. (line 9) * stack frame, definition of unwinding: Frame Handling Terminology. (line 41) * stack pointer: Register Architecture Functions & Variables. (line 49) * status register: Register Architecture Functions & Variables. (line 69) * struct gdbarch creation: Creating a New Architecture. (line 6) * struct regcache: Register Caching. (line 10) * struct value, converting register contents to: Register and Memory Data. (line 6) * submitting patches: Debugging GDB. (line 30) * sym_fns structure: Symbol Handling. (line 37) * symbol files: Symbol Handling. (line 25) * symbol lookup: Symbol Handling. (line 133) * symbol reading: Symbol Handling. (line 25) * symtabs: Symbol Handling. (line 104) * system dependencies: Misc Guidelines. (line 354) * table output functions: User Interface. (line 131) * target: Overall Structure. (line 50) * target architecture definition: Target Architecture Definition. (line 6) * target dependent files: Adding a New Target. (line 8) * target descriptions: Target Descriptions. (line 6) * target descriptions, adding register support: Adding Target Described Register Support. (line 6) * target descriptions, implementation: Target Descriptions Implementation. (line 6) * target vector: Target Vector Definition. (line 6) * targets: Existing Targets. (line 6) * TCP remote support: Host Definition. (line 57) * terminal device: Host Definition. (line 89) * test suite: Testsuite. (line 6) * test suite organization: Testsuite. (line 195) * Testsuite Configuration: Testsuite. (line 167) * THIS frame: Frame Handling Terminology. (line 9) * tuple output functions: User Interface. (line 131) * type codes: Symbol Handling. (line 191) * types: Coding Standards. (line 136) * ui_out functions: User Interface. (line 47) * ui_out functions, usage examples: User Interface. (line 398) * unwind frame: Stack Frames. (line 9) * unwinding: Frame Handling Terminology. (line 41) * using ui_out functions: User Interface. (line 398) * value structure: Values. (line 9) * values: Values. (line 9) * VEC: Support Libraries. (line 131) * vendor branches: Versions and Branches. (line 108) * watchpoints: Algorithms. (line 274) * watchpoints, on x86: Algorithms. (line 449) * watchpoints, with threads: Algorithms. (line 425) * word-addressed machines: Pointers and Addresses. (line 6) * writing tests: Testsuite. (line 247) * x86 debug registers: Algorithms. (line 449) * XCOFF format: Symbol Handling. (line 256)  File: gdbint.info, Node: Function and Variable Index, Prev: Concept Index, Up: Top Function and Variable Index *************************** �[index�] * Menu: * _initialize_ARCH_tdep <1>: Adding a New Target. (line 22) * _initialize_ARCH_tdep: How an Architecture is Represented. (line 13) * _initialize_language: Language Support. (line 79) * about_to_proceed: GDB Observers. (line 139) * add_cmd: User Interface. (line 21) * add_com: User Interface. (line 21) * add_setshow_cmd: User Interface. (line 26) * add_setshow_cmd_full: User Interface. (line 26) * add_symtab_fns: Symbol Handling. (line 37) * address_class_name_to_type_flags: Defining Other Architecture Features. (line 28) * address_class_name_to_type_flags_p: Defining Other Architecture Features. (line 39) * align_down: Functions and Variable to Analyze Frames. (line 46) * align_up: Functions and Variable to Analyze Frames. (line 46) * allocate_symtab: Language Support. (line 83) * architecture_changed: GDB Observers. (line 159) * before_prompt: GDB Observers. (line 188) * bfd_arch_info: Looking Up an Existing Architecture. (line 41) * BIG_BREAKPOINT: Defining Other Architecture Features. (line 100) * BPT_VECTOR: Defining Other Architecture Features. (line 538) * BREAKPOINT: Defining Other Architecture Features. (line 88) * breakpoint_created: GDB Observers. (line 142) * breakpoint_deleted: GDB Observers. (line 145) * breakpoint_modified: GDB Observers. (line 149) * command_param_changed: GDB Observers. (line 197) * core_addr_greaterthan: Functions and Variable to Analyze Frames. (line 30) * core_addr_lessthan: Functions and Variable to Analyze Frames. (line 30) * CRLF_SOURCE_FILES: Host Definition. (line 78) * current_language: Language Support. (line 75) * DEFAULT_PROMPT: Host Definition. (line 85) * deprecate_cmd: User Interface. (line 32) * DEPRECATED_IBM6000_TARGET: Defining Other Architecture Features. (line 246) * DEV_TTY: Host Definition. (line 88) * DIRNAME_SEPARATOR: Misc Guidelines. (line 399) * DISABLE_UNSETTABLE_BREAK: Defining Other Architecture Features. (line 215) * discard_cleanups: Misc Guidelines. (line 39) * do_cleanups: Misc Guidelines. (line 35) * evaluate_subexp: Language Support. (line 58) * executable_changed: GDB Observers. (line 85) * extract_typed_address: Pointers and Addresses. (line 52) * FILENAME_CMP: Misc Guidelines. (line 393) * find_pc_function: Symbol Handling. (line 136) * find_pc_line: Symbol Handling. (line 136) * find_sym_fns: Symbol Handling. (line 32) * FOPEN_RB: Host Definition. (line 94) * fp0_regnum: Register Architecture Functions & Variables. (line 78) * frame_align: Functions and Variable to Analyze Frames. (line 46) * frame_base_append_sniffer: Analyzing Stacks---Frame Sniffers. (line 19) * frame_base_set_default: Analyzing Stacks---Frame Sniffers. (line 22) * frame_num_args: Functions to Access Frame Data. (line 43) * frame_red_zone_size: Functions and Variable to Analyze Frames. (line 63) * frame_register_unwind: Stack Frames. (line 15) * frame_unwind_append_sniffer: Analyzing Stacks---Frame Sniffers. (line 16) * frame_unwind_append_unwinder: Stack Frames. (line 30) * frame_unwind_got_address: Stack Frames. (line 105) * frame_unwind_got_constant: Stack Frames. (line 101) * frame_unwind_got_memory: Stack Frames. (line 98) * frame_unwind_got_optimized: Stack Frames. (line 90) * frame_unwind_got_register: Stack Frames. (line 93) * frame_unwind_prepend_unwinder: Stack Frames. (line 30) * GCC2_COMPILED_FLAG_SYMBOL: Defining Other Architecture Features. (line 229) * GCC_COMPILED_FLAG_SYMBOL: Defining Other Architecture Features. (line 229) * gdb_datadir_changed: GDB Observers. (line 192) * GDB_OSABI_AIX: OS ABI Variant Handling. (line 90) * GDB_OSABI_CYGWIN: OS ABI Variant Handling. (line 87) * GDB_OSABI_FREEBSD_AOUT: OS ABI Variant Handling. (line 51) * GDB_OSABI_FREEBSD_ELF: OS ABI Variant Handling. (line 54) * GDB_OSABI_GO32: OS ABI Variant Handling. (line 69) * GDB_OSABI_HPUX_ELF: OS ABI Variant Handling. (line 78) * GDB_OSABI_HPUX_SOM: OS ABI Variant Handling. (line 81) * GDB_OSABI_HURD: OS ABI Variant Handling. (line 39) * GDB_OSABI_INTERIX: OS ABI Variant Handling. (line 75) * GDB_OSABI_IRIX: OS ABI Variant Handling. (line 72) * GDB_OSABI_LINUX: OS ABI Variant Handling. (line 48) * GDB_OSABI_NETBSD_AOUT: OS ABI Variant Handling. (line 57) * GDB_OSABI_NETBSD_ELF: OS ABI Variant Handling. (line 60) * GDB_OSABI_OPENBSD_ELF: OS ABI Variant Handling. (line 63) * GDB_OSABI_OSF1: OS ABI Variant Handling. (line 45) * GDB_OSABI_QNXNTO: OS ABI Variant Handling. (line 84) * GDB_OSABI_SOLARIS: OS ABI Variant Handling. (line 42) * GDB_OSABI_SVR4: OS ABI Variant Handling. (line 36) * GDB_OSABI_UNINITIALIZED: OS ABI Variant Handling. (line 29) * GDB_OSABI_UNKNOWN: OS ABI Variant Handling. (line 32) * GDB_OSABI_WINCE: OS ABI Variant Handling. (line 66) * gdbarch_addr_bits_remove: Defining Other Architecture Features. (line 11) * gdbarch_address_class_name_to_type_flags: Address Classes. (line 30) * gdbarch_address_class_type_flags <1>: Defining Other Architecture Features. (line 43) * gdbarch_address_class_type_flags: Address Classes. (line 18) * gdbarch_address_class_type_flags_p: Defining Other Architecture Features. (line 52) * gdbarch_address_class_type_flags_to_name <1>: Defining Other Architecture Features. (line 56) * gdbarch_address_class_type_flags_to_name: Address Classes. (line 25) * gdbarch_address_class_type_flags_to_name_p: Defining Other Architecture Features. (line 60) * gdbarch_address_to_pointer <1>: Defining Other Architecture Features. (line 65) * gdbarch_address_to_pointer: Pointers and Addresses. (line 114) * gdbarch_adjust_breakpoint_address: Defining Other Architecture Features. (line 149) * gdbarch_alloc: Creating a New Architecture. (line 6) * gdbarch_believe_pcc_promotion: Defining Other Architecture Features. (line 72) * gdbarch_bits_big_endian: Defining Other Architecture Features. (line 77) * gdbarch_breakpoint_from_pc: Defining Other Architecture Features. (line 106) * gdbarch_call_dummy_location: Defining Other Architecture Features. (line 182) * gdbarch_cannot_fetch_register: Defining Other Architecture Features. (line 188) * gdbarch_cannot_store_register: Defining Other Architecture Features. (line 192) * gdbarch_char_signed: Defining Other Architecture Features. (line 463) * gdbarch_convert_register_p <1>: Defining Other Architecture Features. (line 199) * gdbarch_convert_register_p: Register and Memory Data. (line 30) * gdbarch_data: Misc Guidelines. (line 133) * gdbarch_data_register_post_init: Misc Guidelines. (line 118) * gdbarch_data_register_pre_init: Misc Guidelines. (line 108) * gdbarch_decr_pc_after_break: Defining Other Architecture Features. (line 209) * gdbarch_deprecated_fp_regnum: Defining Other Architecture Features. (line 452) * gdbarch_double_bit: Defining Other Architecture Features. (line 473) * gdbarch_dummy_id: Defining Other Architecture Features. (line 525) * gdbarch_dwarf2_reg_to_regnum: Defining Other Architecture Features. (line 220) * gdbarch_ecoff_reg_to_regnum: Defining Other Architecture Features. (line 224) * gdbarch_float_bit: Defining Other Architecture Features. (line 477) * gdbarch_fp0_regnum: Defining Other Architecture Features. (line 204) * gdbarch_get_longjmp_target <1>: Defining Other Architecture Features. (line 235) * gdbarch_get_longjmp_target: Algorithms. (line 263) * gdbarch_have_nonsteppable_watchpoint: Algorithms. (line 396) * gdbarch_in_function_epilogue_p: Defining Other Architecture Features. (line 257) * gdbarch_in_solib_return_trampoline: Defining Other Architecture Features. (line 263) * gdbarch_init_osabi: OS ABI Variant Handling. (line 125) * gdbarch_int_bit: Defining Other Architecture Features. (line 480) * gdbarch_integer_to_address: Defining Other Architecture Features. (line 278) * gdbarch_list_lookup_by_info: Looking Up an Existing Architecture. (line 22) * gdbarch_long_bit: Defining Other Architecture Features. (line 483) * gdbarch_long_double_bit: Defining Other Architecture Features. (line 487) * gdbarch_long_long_bit: Defining Other Architecture Features. (line 491) * gdbarch_lookup_osabi: OS ABI Variant Handling. (line 119) * gdbarch_memory_insert_breakpoint: Defining Other Architecture Features. (line 134) * gdbarch_memory_remove_breakpoint: Defining Other Architecture Features. (line 134) * gdbarch_osabi_name: OS ABI Variant Handling. (line 97) * gdbarch_pointer_to_address <1>: Defining Other Architecture Features. (line 299) * gdbarch_pointer_to_address: Pointers and Addresses. (line 105) * gdbarch_print_insn: Defining Other Architecture Features. (line 515) * gdbarch_ptr_bit: Defining Other Architecture Features. (line 495) * gdbarch_push_dummy_call: Defining Other Architecture Features. (line 367) * gdbarch_push_dummy_code: Defining Other Architecture Features. (line 379) * gdbarch_register <1>: Adding a New Target. (line 40) * gdbarch_register: How an Architecture is Represented. (line 19) * gdbarch_register_osabi: OS ABI Variant Handling. (line 103) * gdbarch_register_osabi_sniffer: OS ABI Variant Handling. (line 112) * gdbarch_register_to_value <1>: Defining Other Architecture Features. (line 305) * gdbarch_register_to_value: Register and Memory Data. (line 46) * gdbarch_return_value: Defining Other Architecture Features. (line 400) * gdbarch_sdb_reg_to_regnum: Defining Other Architecture Features. (line 396) * gdbarch_short_bit: Defining Other Architecture Features. (line 499) * gdbarch_skip_permanent_breakpoint: Defining Other Architecture Features. (line 436) * gdbarch_skip_trampoline_code: Defining Other Architecture Features. (line 447) * gdbarch_stab_reg_to_regnum: Defining Other Architecture Features. (line 456) * gdbarch_stabs_argument_has_addr: Defining Other Architecture Features. (line 363) * gdbarch_value_to_register <1>: Defining Other Architecture Features. (line 531) * gdbarch_value_to_register: Register and Memory Data. (line 62) * gdbarch_virtual_frame_pointer: Defining Other Architecture Features. (line 503) * GDBINIT_FILENAME: Host Definition. (line 74) * generic_elf_osabi_sniff_abi_tag_sections: OS ABI Variant Handling. (line 133) * get_frame_register: Stack Frames. (line 15) * get_frame_type: Stack Frames. (line 22) * HAVE_CONTINUABLE_WATCHPOINT: Algorithms. (line 402) * HAVE_DOS_BASED_FILE_SYSTEM: Misc Guidelines. (line 376) * HAVE_STEPPABLE_WATCHPOINT: Algorithms. (line 386) * i386_cleanup_dregs: Algorithms. (line 576) * I386_DR_LOW_GET_STATUS: Algorithms. (line 489) * I386_DR_LOW_RESET_ADDR: Algorithms. (line 485) * I386_DR_LOW_SET_ADDR: Algorithms. (line 482) * I386_DR_LOW_SET_CONTROL: Algorithms. (line 479) * i386_insert_hw_breakpoint: Algorithms. (line 564) * i386_insert_watchpoint: Algorithms. (line 536) * i386_region_ok_for_watchpoint: Algorithms. (line 514) * i386_remove_hw_breakpoint: Algorithms. (line 564) * i386_remove_watchpoint: Algorithms. (line 536) * i386_stopped_by_watchpoint: Algorithms. (line 528) * i386_stopped_data_address: Algorithms. (line 521) * I386_USE_GENERIC_WATCHPOINTS: Algorithms. (line 461) * in_dynsym_resolve_code: Defining Other Architecture Features. (line 267) * inferior_added: GDB Observers. (line 168) * inferior_appeared: GDB Observers. (line 172) * inferior_created: GDB Observers. (line 92) * inferior_exit: GDB Observers. (line 175) * inferior_removed: GDB Observers. (line 179) * inner_than: Functions and Variable to Analyze Frames. (line 30) * IS_ABSOLUTE_PATH: Misc Guidelines. (line 387) * IS_DIR_SEPARATOR: Misc Guidelines. (line 382) * ISATTY: Host Definition. (line 91) * length_of_subexp: Language Support. (line 58) * lint: Host Definition. (line 107) * LITTLE_BREAKPOINT: Defining Other Architecture Features. (line 100) * LSEEK_NOT_LINEAR: Host Definition. (line 102) * make_cleanup: Misc Guidelines. (line 28) * make_cleanup_ui_out_list_begin_end: User Interface. (line 247) * make_cleanup_ui_out_tuple_begin_end: User Interface. (line 223) * memory_changed: GDB Observers. (line 184) * NATDEPFILES: Native Debugging. (line 8) * new_objfile: GDB Observers. (line 115) * new_thread: GDB Observers. (line 120) * normal_stop: GDB Observers. (line 76) * op_print_tab: Language Support. (line 91) * parse_exp_1: Language Support. (line 97) * pc_regnum: Register Architecture Functions & Variables. (line 58) * prefixify_subexp: Language Support. (line 58) * print_float_info: Register Information Functions. (line 80) * print_registers_info: Register Information Functions. (line 53) * print_subexp: Language Support. (line 91) * print_vector_info: Register Information Functions. (line 96) * PRINTF_HAS_LONG_LONG: Host Definition. (line 97) * ps_regnum: Register Architecture Functions & Variables. (line 69) * pseudo_register_read: Register Architecture Functions & Variables. (line 29) * pseudo_register_write: Register Architecture Functions & Variables. (line 33) * push_dummy_call: Functions Creating Dummy Frames. (line 13) * push_dummy_code: Functions Creating Dummy Frames. (line 57) * read_pc: Register Architecture Functions & Variables. (line 10) * record_changed: GDB Observers. (line 100) * regcache_cooked_read: Register Caching. (line 23) * regcache_cooked_read_signed: Register Caching. (line 23) * regcache_cooked_read_unsigned: Register Caching. (line 23) * regcache_cooked_write: Register Caching. (line 23) * regcache_cooked_write_signed: Register Caching. (line 23) * regcache_cooked_write_unsigned: Register Caching. (line 23) * REGISTER_CONVERT_TO_RAW: Defining Other Architecture Features. (line 315) * REGISTER_CONVERT_TO_VIRTUAL: Defining Other Architecture Features. (line 310) * register_name: Register Information Functions. (line 10) * register_reggroup_p: Register Information Functions. (line 110) * register_type: Register Information Functions. (line 33) * regset_from_core_section: Defining Other Architecture Features. (line 320) * REMOTE_BPT_VECTOR: Defining Other Architecture Features. (line 542) * SENTINEL_FRAME: Stack Frames. (line 22) * set_gdbarch_bits_big_endian: Defining Other Architecture Features. (line 83) * set_gdbarch_sofun_address_maybe_missing: Defining Other Architecture Features. (line 334) * skip_prologue: Functions and Variable to Analyze Frames. (line 12) * SKIP_SOLIB_RESOLVER: Defining Other Architecture Features. (line 271) * SLASH_STRING: Misc Guidelines. (line 404) * SOFTWARE_SINGLE_STEP: Defining Other Architecture Features. (line 328) * SOFTWARE_SINGLE_STEP_P: Defining Other Architecture Features. (line 324) * SOLIB_ADD: Native Debugging. (line 86) * SOLIB_CREATE_INFERIOR_HOOK: Native Debugging. (line 92) * solib_loaded: GDB Observers. (line 105) * solib_unloaded: GDB Observers. (line 110) * sp_regnum: Register Architecture Functions & Variables. (line 49) * START_INFERIOR_TRAPS_EXPECTED: Native Debugging. (line 96) * STOPPED_BY_WATCHPOINT: Algorithms. (line 408) * store_typed_address: Pointers and Addresses. (line 70) * struct: GDB Observers. (line 62) * TARGET_CAN_USE_HARDWARE_WATCHPOINT: Algorithms. (line 333) * target_changed: GDB Observers. (line 82) * TARGET_CHAR_BIT: Defining Other Architecture Features. (line 460) * target_insert_breakpoint: Algorithms. (line 211) * target_insert_hw_breakpoint: Algorithms. (line 234) * target_insert_watchpoint: Algorithms. (line 347) * TARGET_REGION_OK_FOR_HW_WATCHPOINT: Algorithms. (line 343) * target_remove_breakpoint: Algorithms. (line 211) * target_remove_hw_breakpoint: Algorithms. (line 234) * target_remove_watchpoint: Algorithms. (line 347) * target_resumed: GDB Observers. (line 135) * target_stopped_data_address: Algorithms. (line 364) * target_watchpoint_addr_within_range: Algorithms. (line 378) * test_notification: GDB Observers. (line 213) * thread_exit: GDB Observers. (line 123) * thread_ptid_changed: GDB Observers. (line 164) * thread_stop_requested: GDB Observers. (line 128) * traceframe_changed: GDB Observers. (line 153) * tsv_created: GDB Observers. (line 203) * tsv_deleted: GDB Observers. (line 206) * tsv_modified: GDB Observers. (line 210) * ui_out_field_core_addr: User Interface. (line 287) * ui_out_field_fmt: User Interface. (line 261) * ui_out_field_fmt_int: User Interface. (line 280) * ui_out_field_int: User Interface. (line 273) * ui_out_field_skip: User Interface. (line 352) * ui_out_field_stream: User Interface. (line 320) * ui_out_field_string: User Interface. (line 291) * ui_out_flush: User Interface. (line 392) * ui_out_list_begin: User Interface. (line 234) * ui_out_list_end: User Interface. (line 240) * ui_out_message: User Interface. (line 376) * ui_out_spaces: User Interface. (line 371) * ui_out_stream_delete: User Interface. (line 315) * ui_out_stream_new: User Interface. (line 309) * ui_out_table_begin: User Interface. (line 165) * ui_out_table_body: User Interface. (line 191) * ui_out_table_end: User Interface. (line 194) * ui_out_table_header: User Interface. (line 178) * ui_out_text: User Interface. (line 358) * ui_out_tuple_begin: User Interface. (line 210) * ui_out_tuple_end: User Interface. (line 216) * ui_out_wrap_hint: User Interface. (line 382) * unwind_dummy_id: Functions Creating Dummy Frames. (line 38) * unwind_pc: Functions to Access Frame Data. (line 11) * unwind_sp: Functions to Access Frame Data. (line 27) * value_as_address: Pointers and Addresses. (line 84) * value_from_pointer: Pointers and Addresses. (line 93) * void: GDB Observers. (line 67) * volatile: Host Definition. (line 110) * wrap_here: Misc Guidelines. (line 191) * write_pc: Register Architecture Functions & Variables. (line 13) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/gdb/doc/stack_frame.txt���������������������������������������������������������������0000644�0001750�0001750�00000004170�12250770607�016414� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ ^ ->| | Frame | | | | Number - | | |============| int fact (int n) | | | | i = 3 | { | | | |------------| if (0 == n) { | | | | f = ? | return 1; <-------- PC #4 main() < | | |------------| } | | | | | else { | | -+->|------------| ---> return n * fact (n - 1); | -+-+--+-----o | | } = | | |============| | } | | | | n = 3 | | | | | |------------| | main () #3 fact (3) < | | | o---------+- { | -+-+->|------------| | | int i; | | | --+-----o | | | = | | |============| | | for (i = 0; i < 10; i++) { | | | | n = 2 | | -> int f = fact (i); | | | |------------| | printf ("%d! = %d\n", i , f); #2 fact (2) < | | | o------+--| } | | | ->|------------| | } | | -+--+-----o | | = | | |============| | | | | | n = 1 | | | | | |------------| | #1 fact (1) < | | | o------+--| | | | |------------| | | ---|--+-----o |<-+------- FP = | |============| | | | | | n = 0 | | | | | |------------| | | #0 fact (0) < | | o--------- | | | |------------| | | --+-----o |<--------- SP | = |============| | | | Red Zone | v | \/\/\/\/\/\/\/ Direction of #-1 < \/\/\/\/\/\/\/ stack growth | | | ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/gdb/version.in������������������������������������������������������������������������0000644�0001750�0001750�00000000006�12250773212�014631� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������7.6.2 ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/COPYING�������������������������������������������������������������������������������0000644�0001750�0001750�00000043122�12250770606�013125� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/config.guess��������������������������������������������������������������������������0000755�0001750�0001750�00000127462�12250773211�014417� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012, 2013 Free Software Foundation, Inc. timestamp='2012-12-30' # This file 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 3 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, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches with a ChangeLog entry to config-patches@gnu.org. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include <stdio.h> /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include <sys/systemcfg.h> main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include <stdlib.h> #include <unistd.h> int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include <unistd.h> int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-gnueabi else echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` echo ${UNAME_MACHINE}-pc-isc$UNAME_REL elif /bin/uname -X 2>/dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says <Richard.M.Bartel@ccMail.Census.GOV> echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <hewes@openmarket.com>. # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac eval $set_cc_for_build cat >$dummy.c <<EOF #ifdef _SEQUENT_ # include <sys/types.h> # include <sys/utsname.h> #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include <sys/param.h> printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include <sys/param.h> # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 <<EOF $0: unable to guess system type This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD and http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD If the version you run ($0) is already up to date, please send the following data and any information you think might be pertinent to <config-patches@gnu.org> in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/README��������������������������������������������������������������������������������0000644�0001750�0001750�00000003267�12250770606�012760� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ README for GNU development tools This directory contains various GNU compilers, assemblers, linkers, debuggers, etc., plus their support routines, definitions, and documentation. If you are receiving this as part of a GDB release, see the file gdb/README. If with a binutils release, see binutils/README; if with a libg++ release, see libg++/README, etc. That'll give you info about this package -- supported targets, how to use it, how to report bugs, etc. It is now possible to automatically configure and build a variety of tools with one command. To build all of the tools contained herein, run the ``configure'' script here, e.g.: ./configure make To install them (by default in /usr/local/bin, /usr/local/lib, etc), then do: make install (If the configure script can't determine your type of computer, give it the name as an argument, for instance ``./configure sun4''. You can use the script ``config.sub'' to test whether a name is recognized; if it is, config.sub translates it to a triplet specifying CPU, vendor, and OS.) If you have more than one compiler on your system, it is often best to explicitly set CC in the environment before running configure, and to also set CC when running make. For example (assuming sh/bash/ksh): CC=gcc ./configure make A similar example using csh: setenv CC gcc ./configure make Much of the code and documentation enclosed is copyright by the Free Software Foundation, Inc. See the file COPYING or COPYING.LIB in the various directories, for a description of the GNU General Public License terms under which you can copy the files. REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info on where and how to report problems. �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/�����������������������������������������������������������������������������0000755�0001750�0001750�00000000000�12266504106�013650� 5����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/rltypedefs.h�����������������������������������������������������������������0000644�0001750�0001750�00000005435�12250770610�016207� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* rltypedefs.h -- Type declarations for readline functions. */ /* Copyright (C) 2000-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _RL_TYPEDEFS_H_ #define _RL_TYPEDEFS_H_ #ifdef __cplusplus extern "C" { #endif /* Old-style */ #if !defined (_FUNCTION_DEF) # define _FUNCTION_DEF typedef int Function (); typedef void VFunction (); typedef char *CPFunction (); typedef char **CPPFunction (); #endif /* _FUNCTION_DEF */ /* New style. */ #if !defined (_RL_FUNCTION_TYPEDEF) # define _RL_FUNCTION_TYPEDEF /* Bindable functions */ typedef int rl_command_func_t PARAMS((int, int)); /* Typedefs for the completion system */ typedef char *rl_compentry_func_t PARAMS((const char *, int)); typedef char **rl_completion_func_t PARAMS((const char *, int, int)); typedef char *rl_quote_func_t PARAMS((char *, int, char *)); typedef char *rl_dequote_func_t PARAMS((char *, int)); typedef int rl_compignore_func_t PARAMS((char **)); typedef void rl_compdisp_func_t PARAMS((char **, int, int)); /* Type for input and pre-read hook functions like rl_event_hook */ typedef int rl_hook_func_t PARAMS((void)); /* Input function type */ typedef int rl_getc_func_t PARAMS((FILE *)); /* Generic function that takes a character buffer (which could be the readline line buffer) and an index into it (which could be rl_point) and returns an int. */ typedef int rl_linebuf_func_t PARAMS((char *, int)); /* `Generic' function pointer typedefs */ typedef int rl_intfunc_t PARAMS((int)); #define rl_ivoidfunc_t rl_hook_func_t typedef int rl_icpfunc_t PARAMS((char *)); typedef int rl_icppfunc_t PARAMS((char **)); typedef void rl_voidfunc_t PARAMS((void)); typedef void rl_vintfunc_t PARAMS((int)); typedef void rl_vcpfunc_t PARAMS((char *)); typedef void rl_vcppfunc_t PARAMS((char **)); typedef char *rl_cpvfunc_t PARAMS((void)); typedef char *rl_cpifunc_t PARAMS((int)); typedef char *rl_cpcpfunc_t PARAMS((char *)); typedef char *rl_cpcppfunc_t PARAMS((char **)); #endif /* _RL_FUNCTION_TYPEDEF */ #ifdef __cplusplus } #endif #endif /* _RL_TYPEDEFS_H_ */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/Makefile.in������������������������������������������������������������������0000644�0001750�0001750�00000043022�12250770610�015714� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## -*- text -*- ## # Master Makefile for the GNU readline library. # Copyright (C) 1994-2009 Free Software Foundation, Inc. # 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 3 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, see <http://www.gnu.org/licenses/>. RL_LIBRARY_VERSION = @LIBVERSION@ RL_LIBRARY_NAME = readline PACKAGE = @PACKAGE_NAME@ VERSION = @PACKAGE_VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_VERSION = @PACKAGE_VERSION@ srcdir = @srcdir@ VPATH = @srcdir@ top_srcdir = @top_srcdir@ BUILD_DIR = @BUILD_DIR@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ CC = @CC@ RANLIB = @RANLIB@ AR = @AR@ ARFLAGS = @ARFLAGS@ RM = rm -f CP = cp MV = mv PURIFY = @PURIFY@ @SET_MAKE@ SHELL = @MAKE_SHELL@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ bindir = @bindir@ libdir = @libdir@ mandir = @mandir@ includedir = @includedir@ datadir = @datadir@ localedir = @localedir@ infodir = @infodir@ man3dir = $(mandir)/man3 # Support an alternate destination root directory for package building DESTDIR = # Programs to make tags files. ETAGS = etags CTAGS = ctags -tw CFLAGS = @CFLAGS@ LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"' CPPFLAGS = @CPPFLAGS@ DEFS = @DEFS@ @CROSS_COMPILE@ LOCAL_DEFS = @LOCAL_DEFS@ TERMCAP_LIB = @TERMCAP_LIB@ # For libraries which include headers from other libraries. INCLUDES = -I. -I$(srcdir) XCCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) CCFLAGS = $(XCCFLAGS) $(LOCAL_CFLAGS) $(CFLAGS) # could add -Werror here GCC_LINT_FLAGS = -ansi -Wall -Wshadow -Wpointer-arith -Wcast-qual \ -Wwrite-strings -Wstrict-prototypes \ -Wmissing-prototypes -Wno-implicit -pedantic GCC_LINT_CFLAGS = $(XCCFLAGS) $(GCC_LINT_FLAGS) @CFLAGS@ @LOCAL_CFLAGS@ .c.o: ${RM} $@ $(CC) -c $(CCFLAGS) $< # The name of the main library target. LIBRARY_NAME = libreadline.a STATIC_LIBS = libreadline.a libhistory.a # The C code source files for this library. CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \ $(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \ $(srcdir)/complete.c $(srcdir)/bind.c $(srcdir)/isearch.c \ $(srcdir)/display.c $(srcdir)/signals.c $(srcdir)/emacs_keymap.c \ $(srcdir)/vi_keymap.c $(srcdir)/util.c $(srcdir)/kill.c \ $(srcdir)/undo.c $(srcdir)/macro.c $(srcdir)/input.c \ $(srcdir)/callback.c $(srcdir)/terminal.c $(srcdir)/xmalloc.c $(srcdir)/xfree.c \ $(srcdir)/history.c $(srcdir)/histsearch.c $(srcdir)/histexpand.c \ $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \ $(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c \ $(srcdir)/text.c $(srcdir)/misc.c $(srcdir)/compat.c \ $(srcdir)/mbutil.c # The header files for this library. HSOURCES = $(srcdir)/readline.h $(srcdir)/rldefs.h $(srcdir)/chardefs.h \ $(srcdir)/keymaps.h $(srcdir)/history.h $(srcdir)/histlib.h \ $(srcdir)/posixstat.h $(srcdir)/posixdir.h $(srcdir)/posixjmp.h \ $(srcdir)/tilde.h $(srcdir)/rlconf.h $(srcdir)/rltty.h \ $(srcdir)/ansi_stdlib.h $(srcdir)/tcap.h $(srcdir)/rlstdc.h \ $(srcdir)/xmalloc.h $(srcdir)/rlprivate.h $(srcdir)/rlshell.h \ $(srcdir)/rltypedefs.h $(srcdir)/rlmbutil.h HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o mbutil.o TILDEOBJ = tilde.o OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \ rltty.o complete.o bind.o isearch.o display.o signals.o \ util.o kill.o undo.o macro.o input.o callback.o terminal.o \ text.o nls.o misc.o compat.o xfree.o xmalloc.o $(HISTOBJ) $(TILDEOBJ) # The texinfo files which document this library. DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo DOCOBJECT = doc/readline.dvi DOCSUPPORT = doc/Makefile DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT) CREATED_MAKEFILES = Makefile doc/Makefile examples/Makefile shlib/Makefile CREATED_CONFIGURE = config.status config.h config.cache config.log \ stamp-config stamp-h CREATED_TAGS = TAGS tags INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \ rlstdc.h rlconf.h rltypedefs.h ########################################################################## TARGETS = @STATIC_TARGET@ @SHARED_TARGET@ INSTALL_TARGETS = @STATIC_INSTALL_TARGET@ @SHARED_INSTALL_TARGET@ all: $(TARGETS) everything: all examples static: $(STATIC_LIBS) libreadline.a: $(OBJECTS) $(RM) $@ $(AR) $(ARFLAGS) $@ $(OBJECTS) -test -n "$(RANLIB)" && $(RANLIB) $@ libhistory.a: $(HISTOBJ) xmalloc.o xfree.o $(RM) $@ $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o xfree.o -test -n "$(RANLIB)" && $(RANLIB) $@ # Since tilde.c is shared between readline and bash, make sure we compile # it with the right flags when it's built as part of readline tilde.o: tilde.c rm -f $@ $(CC) $(CCFLAGS) -DREADLINE_LIBRARY -c $(srcdir)/tilde.c readline: $(OBJECTS) readline.h rldefs.h chardefs.h ./libreadline.a $(CC) $(CCFLAGS) -DREADLINE_LIBRARY -o $@ $(top_srcdir)/examples/rl.c ./libreadline.a ${TERMCAP_LIB} lint: force $(MAKE) $(MFLAGS) CCFLAGS='$(GCC_LINT_CFLAGS)' static Makefile makefile: config.status $(srcdir)/Makefile.in CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status Makefiles makefiles: config.status $(srcdir)/Makefile.in @for mf in $(CREATED_MAKEFILES); do \ CONFIG_FILES=$$mf CONFIG_HEADERS= $(SHELL) ./config.status ; \ done config.status: configure $(SHELL) ./config.status --recheck config.h: stamp-h stamp-h: config.status $(srcdir)/config.h.in CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status echo > $@ #$(srcdir)/configure: $(srcdir)/configure.in ## Comment-me-out in distribution # cd $(srcdir) && autoconf ## Comment-me-out in distribution shared: force -test -d shlib || mkdir shlib -( cd shlib ; ${MAKE} ${MFLAGS} all ) documentation: force -test -d doc || mkdir doc -( cd doc && $(MAKE) $(MFLAGS) ) examples: force -test -d examples || mkdir examples -(cd examples && ${MAKE} ${MFLAGS} all ) force: ## GDB LOCAL ## Don't mess with people's installed readline's. ## This tries to install this version of readline over whatever ## version is already installed on the system (which could be a ## newer version). There is no real reason for us to install ## readline along with GDB. GDB links statically against readline, ## so it doesn't depend on us installing it on the system. install: #install: $(INSTALL_TARGETS) install-headers: installdirs ${INSTALLED_HEADERS} for f in ${INSTALLED_HEADERS}; do \ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/readline ; \ done uninstall-headers: -test -n "$(includedir)" && cd $(DESTDIR)$(includedir)/readline && \ ${RM} ${INSTALLED_HEADERS} maybe-uninstall-headers: uninstall-headers install-static: installdirs $(STATIC_LIBS) install-headers install-doc install-examples -$(MV) $(DESTDIR)$(libdir)/libreadline.a $(DESTDIR)$(libdir)/libreadline.old $(INSTALL_DATA) libreadline.a $(DESTDIR)$(libdir)/libreadline.a -test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libreadline.a -$(MV) $(DESTDIR)$(libdir)/libhistory.a $(DESTDIR)$(libdir)/libhistory.old $(INSTALL_DATA) libhistory.a $(DESTDIR)$(libdir)/libhistory.a -test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libhistory.a installdirs: $(srcdir)/support/mkinstalldirs -$(SHELL) $(srcdir)/support/mkinstalldirs $(DESTDIR)$(includedir) \ $(DESTDIR)$(includedir)/readline $(DESTDIR)$(libdir) \ $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) uninstall: uninstall-headers uninstall-doc uninstall-examples -test -n "$(DESTDIR)$(libdir)" && cd $(DESTDIR)$(libdir) && \ ${RM} libreadline.a libreadline.old libhistory.a libhistory.old $(SHARED_LIBS) -( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall ) install-shared: installdirs install-headers shared install-doc -( cd shlib ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install ) uninstall-shared: maybe-uninstall-headers -( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall ) install-examples: installdirs install-headers shared -( cd examples ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install ) uninstall-examples: maybe-uninstall-headers -( cd examples; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall ) install-doc: installdirs -( if test -d doc ; then \ cd doc && \ ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} install; \ fi ) uninstall-doc: -( if test -d doc ; then \ cd doc && \ ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} uninstall; \ fi ) TAGS: force -( cd $(srcdir) && $(ETAGS) $(CSOURCES) $(HSOURCES) ) tags: force -( cd $(srcdir) && $(CTAGS) $(CSOURCES) $(HSOURCES) ) clean: force $(RM) $(OBJECTS) $(STATIC_LIBS) $(RM) readline readline.exe -( cd shlib && $(MAKE) $(MFLAGS) $@ ) -( cd doc && $(MAKE) $(MFLAGS) $@ ) -( cd examples && $(MAKE) $(MFLAGS) $@ ) mostlyclean: clean -( cd shlib && $(MAKE) $(MFLAGS) $@ ) -( cd doc && $(MAKE) $(MFLAGS) $@ ) -( cd examples && $(MAKE) $(MFLAGS) $@ ) distclean maintainer-clean: clean -( cd shlib && $(MAKE) $(MFLAGS) $@ ) -( cd doc && $(MAKE) $(MFLAGS) $@ ) -( cd examples && $(MAKE) $(MFLAGS) $@ ) $(RM) Makefile $(RM) $(CREATED_CONFIGURE) $(RM) $(CREATED_TAGS) info dvi html pdf ps: -( cd doc && $(MAKE) $(MFLAGS) $@ ) install-info: install-dvi: install-html: install-pdf: install-ps: check: installcheck: dist: force @echo Readline distributions are created using $(srcdir)/support/mkdist. @echo Here is a sample of the necessary commands: @echo bash $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r $(RL_LIBRARY_NAME) $(RL_LIBRARY_VERSION) @echo tar cf $(RL_LIBRARY_NAME)-${RL_LIBRARY_VERSION}.tar ${RL_LIBRARY_NAME}-$(RL_LIBRARY_VERSION) @echo gzip $(RL_LIBRARY_NAME)-$(RL_LIBRARY_VERSION).tar # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: # Dependencies bind.o: ansi_stdlib.h posixstat.h bind.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h bind.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h bind.o: history.h callback.o: rlconf.h callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h callback.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h compat.o: rlstdc.h complete.o: ansi_stdlib.h posixdir.h posixstat.h complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h complete.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h display.o: ansi_stdlib.h posixstat.h display.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h display.o: tcap.h display.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h display.o: history.h rlstdc.h funmap.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h funmap.o: rlconf.h ansi_stdlib.h rlstdc.h funmap.o: ${BUILD_DIR}/config.h histexpand.o: ansi_stdlib.h histexpand.o: history.h histlib.h rlstdc.h rltypedefs.h histexpand.o: ${BUILD_DIR}/config.h histfile.o: ansi_stdlib.h histfile.o: history.h histlib.h rlstdc.h rltypedefs.h histfile.o: ${BUILD_DIR}/config.h history.o: ansi_stdlib.h history.o: history.h histlib.h rlstdc.h rltypedefs.h history.o: ${BUILD_DIR}/config.h histsearch.o: ansi_stdlib.h histsearch.o: history.h histlib.h rlstdc.h rltypedefs.h histsearch.o: ${BUILD_DIR}/config.h input.o: ansi_stdlib.h input.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h input.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h isearch.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h isearch.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h isearch.o: ansi_stdlib.h history.h rlstdc.h keymaps.o: emacs_keymap.c vi_keymap.c keymaps.o: keymaps.h rltypedefs.h chardefs.h rlconf.h ansi_stdlib.h keymaps.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h keymaps.o: ${BUILD_DIR}/config.h rlstdc.h kill.o: ansi_stdlib.h kill.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h kill.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h kill.o: history.h rlstdc.h macro.o: ansi_stdlib.h macro.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h macro.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h macro.o: history.h rlstdc.h mbutil.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h mbutil.o: readline.h keymaps.h rltypedefs.h chardefs.h rlstdc.h misc.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h misc.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h misc.o: history.h rlstdc.h ansi_stdlib.h nls.o: ansi_stdlib.h nls.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h nls.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h nls.o: history.h rlstdc.h parens.o: rlconf.h parens.o: ${BUILD_DIR}/config.h parens.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h readline.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h readline.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h readline.o: history.h rlstdc.h readline.o: posixstat.h ansi_stdlib.h posixjmp.h rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h rltty.o: rltty.h rltty.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h search.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h search.o: ansi_stdlib.h history.h rlstdc.h shell.o: ${BUILD_DIR}/config.h shell.o: ansi_stdlib.h signals.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h signals.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h signals.o: history.h rlstdc.h terminal.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h terminal.o: tcap.h terminal.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h terminal.o: history.h rlstdc.h text.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h text.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h text.o: history.h rlstdc.h ansi_stdlib.h tilde.o: ansi_stdlib.h tilde.o: ${BUILD_DIR}/config.h tilde.o: tilde.h undo.o: ansi_stdlib.h undo.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h undo.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h undo.o: history.h rlstdc.h util.o: posixjmp.h ansi_stdlib.h util.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h util.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h vi_mode.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h vi_mode.o: history.h ansi_stdlib.h rlstdc.h xfree.o: ${BUILD_DIR}/config.h xfree.o: ansi_stdlib.h readline.h xmalloc.o: ${BUILD_DIR}/config.h xmalloc.o: ansi_stdlib.h bind.o: rlshell.h histfile.o: rlshell.h nls.o: rlshell.h readline.o: rlshell.h shell.o: rlshell.h terminal.o: rlshell.h histexpand.o: rlshell.h bind.o: rlprivate.h callback.o: rlprivate.h complete.o: rlprivate.h display.o: rlprivate.h input.o: rlprivate.h isearch.o: rlprivate.h kill.o: rlprivate.h macro.o: rlprivate.h mbutil.o: rlprivate.h misc.o: rlprivate.h nls.o: rlprivate.h parens.o: rlprivate.h readline.o: rlprivate.h rltty.o: rlprivate.h search.o: rlprivate.h signals.o: rlprivate.h terminal.o: rlprivate.h text.o: rlprivate.h undo.o: rlprivate.h util.o: rlprivate.h vi_mode.o: rlprivate.h bind.o: xmalloc.h callback.o: xmalloc.h complete.o: xmalloc.h display.o: xmalloc.h funmap.o: xmalloc.h histexpand.o: xmalloc.h histfile.o: xmalloc.h history.o: xmalloc.h input.o: xmalloc.h isearch.o: xmalloc.h keymaps.o: xmalloc.h kill.o: xmalloc.h macro.o: xmalloc.h mbutil.o: xmalloc.h misc.o: xmalloc.h readline.o: xmalloc.h savestring.o: xmalloc.h search.o: xmalloc.h shell.o: xmalloc.h terminal.o: xmalloc.h text.o: xmalloc.h tilde.o: xmalloc.h undo.o: xmalloc.h util.o: xmalloc.h vi_mode.o: xmalloc.h xfree.o: xmalloc.h xmalloc.o: xmalloc.h complete.o: rlmbutil.h display.o: rlmbutil.h histexpand.o: rlmbutil.h input.o: rlmbutil.h isearch.o: rlmbutil.h mbutil.o: rlmbutil.h misc.o: rlmbutil.h readline.o: rlmbutil.h search.o: rlmbutil.h text.o: rlmbutil.h vi_mode.o: rlmbutil.h bind.o: $(srcdir)/bind.c callback.o: $(srcdir)/callback.c compat.o: $(srcdir)/compat.c complete.o: $(srcdir)/complete.c display.o: $(srcdir)/display.c funmap.o: $(srcdir)/funmap.c input.o: $(srcdir)/input.c isearch.o: $(srcdir)/isearch.c keymaps.o: $(srcdir)/keymaps.c $(srcdir)/emacs_keymap.c $(srcdir)/vi_keymap.c kill.o: $(srcdir)/kill.c macro.o: $(srcdir)/macro.c mbutil.o: $(srcdir)/mbutil.c misc.o: $(srcdir)/misc.c nls.o: $(srcdir)/nls.c parens.o: $(srcdir)/parens.c readline.o: $(srcdir)/readline.c rltty.o: $(srcdir)/rltty.c savestring.o: $(srcdir)/savestring.c search.o: $(srcdir)/search.c shell.o: $(srcdir)/shell.c signals.o: $(srcdir)/signals.c terminal.o: $(srcdir)/terminal.c text.o: $(srcdir)/text.c tilde.o: $(srcdir)/tilde.c undo.o: $(srcdir)/undo.c util.o: $(srcdir)/util.c vi_mode.o: $(srcdir)/vi_mode.c xfree.o: $(srcdir)/xfree.c xmalloc.o: $(srcdir)/xmalloc.c histexpand.o: $(srcdir)/histexpand.c histfile.o: $(srcdir)/histfile.c history.o: $(srcdir)/history.c histsearch.o: $(srcdir)/histsearch.c bind.o: bind.c callback.o: callback.c compat.o: compat.c complete.o: complete.c display.o: display.c funmap.o: funmap.c input.o: input.c isearch.o: isearch.c keymaps.o: keymaps.c emacs_keymap.c vi_keymap.c kill.o: kill.c macro.o: macro.c mbutil.o: mbutil.c misc.o: misc.c nls.o: nls.c parens.o: parens.c readline.o: readline.c rltty.o: rltty.c savestring.o: savestring.c search.o: search.c shell.o: shell.c signals.o: signals.c terminal.o: terminal.c text.o: text.c tilde.o: tilde.c undo.o: undo.c util.o: util.c vi_mode.o: vi_mode.c xfree.o: xfree.c xmalloc.o: xmalloc.c histexpand.o: histexpand.c histfile.o: histfile.c history.o: history.c histsearch.o: histsearch.c ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/tilde.c����������������������������������������������������������������������0000644�0001750�0001750�00000031610�12250770610�015114� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* tilde.c -- Tilde expansion code (~/foo := $HOME/foo). */ /* Copyright (C) 1988-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #if defined (HAVE_CONFIG_H) # include <config.h> #endif #if defined (HAVE_UNISTD_H) # ifdef _MINIX # include <sys/types.h> # endif # include <unistd.h> #endif #if defined (HAVE_STRING_H) # include <string.h> #else /* !HAVE_STRING_H */ # include <strings.h> #endif /* !HAVE_STRING_H */ #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #include <sys/types.h> #if defined (HAVE_PWD_H) #include <pwd.h> #endif #include "tilde.h" #if defined (TEST) || defined (STATIC_MALLOC) static void *xmalloc (), *xrealloc (); #else # include "xmalloc.h" #endif /* TEST || STATIC_MALLOC */ #if !defined (HAVE_GETPW_DECLS) # if defined (HAVE_GETPWUID) extern struct passwd *getpwuid PARAMS((uid_t)); # endif # if defined (HAVE_GETPWNAM) extern struct passwd *getpwnam PARAMS((const char *)); # endif #endif /* !HAVE_GETPW_DECLS */ #if !defined (savestring) #define savestring(x) strcpy ((char *)xmalloc (1 + strlen (x)), (x)) #endif /* !savestring */ #if !defined (NULL) # if defined (__STDC__) # define NULL ((void *) 0) # else # define NULL 0x0 # endif /* !__STDC__ */ #endif /* !NULL */ /* If being compiled as part of bash, these will be satisfied from variables.o. If being compiled as part of readline, they will be satisfied from shell.o. */ extern char *sh_get_home_dir PARAMS((void)); extern char *sh_get_env_value PARAMS((const char *)); /* The default value of tilde_additional_prefixes. This is set to whitespace preceding a tilde so that simple programs which do not perform any word separation get desired behaviour. */ static const char *default_prefixes[] = { " ~", "\t~", (const char *)NULL }; /* The default value of tilde_additional_suffixes. This is set to whitespace or newline so that simple programs which do not perform any word separation get desired behaviour. */ static const char *default_suffixes[] = { " ", "\n", (const char *)NULL }; /* If non-null, this contains the address of a function that the application wants called before trying the standard tilde expansions. The function is called with the text sans tilde, and returns a malloc()'ed string which is the expansion, or a NULL pointer if the expansion fails. */ tilde_hook_func_t *tilde_expansion_preexpansion_hook = (tilde_hook_func_t *)NULL; /* If non-null, this contains the address of a function to call if the standard meaning for expanding a tilde fails. The function is called with the text (sans tilde, as in "foo"), and returns a malloc()'ed string which is the expansion, or a NULL pointer if there is no expansion. */ tilde_hook_func_t *tilde_expansion_failure_hook = (tilde_hook_func_t *)NULL; /* When non-null, this is a NULL terminated array of strings which are duplicates for a tilde prefix. Bash uses this to expand `=~' and `:~'. */ char **tilde_additional_prefixes = (char **)default_prefixes; /* When non-null, this is a NULL terminated array of strings which match the end of a username, instead of just "/". Bash sets this to `:' and `=~'. */ char **tilde_additional_suffixes = (char **)default_suffixes; static int tilde_find_prefix PARAMS((const char *, int *)); static int tilde_find_suffix PARAMS((const char *)); static char *isolate_tilde_prefix PARAMS((const char *, int *)); static char *glue_prefix_and_suffix PARAMS((char *, const char *, int)); /* Find the start of a tilde expansion in STRING, and return the index of the tilde which starts the expansion. Place the length of the text which identified this tilde starter in LEN, excluding the tilde itself. */ static int tilde_find_prefix (string, len) const char *string; int *len; { register int i, j, string_len; register char **prefixes; prefixes = tilde_additional_prefixes; string_len = strlen (string); *len = 0; if (*string == '\0' || *string == '~') return (0); if (prefixes) { for (i = 0; i < string_len; i++) { for (j = 0; prefixes[j]; j++) { if (strncmp (string + i, prefixes[j], strlen (prefixes[j])) == 0) { *len = strlen (prefixes[j]) - 1; return (i + *len); } } } } return (string_len); } /* Find the end of a tilde expansion in STRING, and return the index of the character which ends the tilde definition. */ static int tilde_find_suffix (string) const char *string; { register int i, j, string_len; register char **suffixes; suffixes = tilde_additional_suffixes; string_len = strlen (string); for (i = 0; i < string_len; i++) { #if defined (__MSDOS__) if (string[i] == '/' || string[i] == '\\' /* || !string[i] */) #else if (string[i] == '/' /* || !string[i] */) #endif break; for (j = 0; suffixes && suffixes[j]; j++) { if (strncmp (string + i, suffixes[j], strlen (suffixes[j])) == 0) return (i); } } return (i); } /* Return a new string which is the result of tilde expanding STRING. */ char * tilde_expand (string) const char *string; { char *result; int result_size, result_index; result_index = result_size = 0; if (result = strchr (string, '~')) result = (char *)xmalloc (result_size = (strlen (string) + 16)); else result = (char *)xmalloc (result_size = (strlen (string) + 1)); /* Scan through STRING expanding tildes as we come to them. */ while (1) { register int start, end; char *tilde_word, *expansion; int len; /* Make START point to the tilde which starts the expansion. */ start = tilde_find_prefix (string, &len); /* Copy the skipped text into the result. */ if ((result_index + start + 1) > result_size) result = (char *)xrealloc (result, 1 + (result_size += (start + 20))); strncpy (result + result_index, string, start); result_index += start; /* Advance STRING to the starting tilde. */ string += start; /* Make END be the index of one after the last character of the username. */ end = tilde_find_suffix (string); /* If both START and END are zero, we are all done. */ if (!start && !end) break; /* Expand the entire tilde word, and copy it into RESULT. */ tilde_word = (char *)xmalloc (1 + end); strncpy (tilde_word, string, end); tilde_word[end] = '\0'; string += end; expansion = tilde_expand_word (tilde_word); xfree (tilde_word); len = strlen (expansion); #ifdef __CYGWIN__ /* Fix for Cygwin to prevent ~user/xxx from expanding to //xxx when $HOME for `user' is /. On cygwin, // denotes a network drive. */ if (len > 1 || *expansion != '/' || *string != '/') #endif { if ((result_index + len + 1) > result_size) result = (char *)xrealloc (result, 1 + (result_size += (len + 20))); strcpy (result + result_index, expansion); result_index += len; } xfree (expansion); } result[result_index] = '\0'; return (result); } /* Take FNAME and return the tilde prefix we want expanded. If LENP is non-null, the index of the end of the prefix into FNAME is returned in the location it points to. */ static char * isolate_tilde_prefix (fname, lenp) const char *fname; int *lenp; { char *ret; int i; ret = (char *)xmalloc (strlen (fname)); #if defined (__MSDOS__) for (i = 1; fname[i] && fname[i] != '/' && fname[i] != '\\'; i++) #else for (i = 1; fname[i] && fname[i] != '/'; i++) #endif ret[i - 1] = fname[i]; ret[i - 1] = '\0'; if (lenp) *lenp = i; return ret; } #if 0 /* Public function to scan a string (FNAME) beginning with a tilde and find the portion of the string that should be passed to the tilde expansion function. Right now, it just calls tilde_find_suffix and allocates new memory, but it can be expanded to do different things later. */ char * tilde_find_word (fname, flags, lenp) const char *fname; int flags, *lenp; { int x; char *r; x = tilde_find_suffix (fname); if (x == 0) { r = savestring (fname); if (lenp) *lenp = 0; } else { r = (char *)xmalloc (1 + x); strncpy (r, fname, x); r[x] = '\0'; if (lenp) *lenp = x; } return r; } #endif /* Return a string that is PREFIX concatenated with SUFFIX starting at SUFFIND. */ static char * glue_prefix_and_suffix (prefix, suffix, suffind) char *prefix; const char *suffix; int suffind; { char *ret; int plen, slen; plen = (prefix && *prefix) ? strlen (prefix) : 0; slen = strlen (suffix + suffind); ret = (char *)xmalloc (plen + slen + 1); if (plen) strcpy (ret, prefix); strcpy (ret + plen, suffix + suffind); return ret; } /* Do the work of tilde expansion on FILENAME. FILENAME starts with a tilde. If there is no expansion, call tilde_expansion_failure_hook. This always returns a newly-allocated string, never static storage. */ char * tilde_expand_word (filename) const char *filename; { char *dirname, *expansion, *username; int user_len; struct passwd *user_entry; if (filename == 0) return ((char *)NULL); if (*filename != '~') return (savestring (filename)); /* A leading `~/' or a bare `~' is *always* translated to the value of $HOME or the home directory of the current user, regardless of any preexpansion hook. */ if (filename[1] == '\0' || filename[1] == '/') { /* Prefix $HOME to the rest of the string. */ expansion = sh_get_env_value ("HOME"); /* If there is no HOME variable, look up the directory in the password database. */ if (expansion == 0) expansion = sh_get_home_dir (); return (glue_prefix_and_suffix (expansion, filename, 1)); } username = isolate_tilde_prefix (filename, &user_len); if (tilde_expansion_preexpansion_hook) { expansion = (*tilde_expansion_preexpansion_hook) (username); if (expansion) { dirname = glue_prefix_and_suffix (expansion, filename, user_len); xfree (username); xfree (expansion); return (dirname); } } /* No preexpansion hook, or the preexpansion hook failed. Look in the password database. */ dirname = (char *)NULL; #if defined (HAVE_GETPWNAM) user_entry = getpwnam (username); #else user_entry = 0; #endif if (user_entry == 0) { /* If the calling program has a special syntax for expanding tildes, and we couldn't find a standard expansion, then let them try. */ if (tilde_expansion_failure_hook) { expansion = (*tilde_expansion_failure_hook) (username); if (expansion) { dirname = glue_prefix_and_suffix (expansion, filename, user_len); xfree (expansion); } } /* If we don't have a failure hook, or if the failure hook did not expand the tilde, return a copy of what we were passed. */ if (dirname == 0) dirname = savestring (filename); } #if defined (HAVE_GETPWENT) else dirname = glue_prefix_and_suffix (user_entry->pw_dir, filename, user_len); #endif xfree (username); #if defined (HAVE_GETPWENT) endpwent (); #endif return (dirname); } #if defined (TEST) #undef NULL #include <stdio.h> main (argc, argv) int argc; char **argv; { char *result, line[512]; int done = 0; while (!done) { printf ("~expand: "); fflush (stdout); if (!gets (line)) strcpy (line, "done"); if ((strcmp (line, "done") == 0) || (strcmp (line, "quit") == 0) || (strcmp (line, "exit") == 0)) { done = 1; break; } result = tilde_expand (line); printf (" --> %s\n", result); free (result); } exit (0); } static void memory_error_and_abort (); static void * xmalloc (bytes) size_t bytes; { void *temp = (char *)malloc (bytes); if (!temp) memory_error_and_abort (); return (temp); } static void * xrealloc (pointer, bytes) void *pointer; int bytes; { void *temp; if (!pointer) temp = malloc (bytes); else temp = realloc (pointer, bytes); if (!temp) memory_error_and_abort (); return (temp); } static void memory_error_and_abort () { fprintf (stderr, "readline: out of virtual memory\n"); abort (); } /* * Local variables: * compile-command: "gcc -g -DTEST -o tilde tilde.c" * end: */ #endif /* TEST */ ������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/util.c�����������������������������������������������������������������������0000644�0001750�0001750�00000025014�12250773212�014772� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* util.c -- readline utility functions */ /* Copyright (C) 1987-2010 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include <config.h> #endif #include <sys/types.h> #include <fcntl.h> #include "posixjmp.h" #if defined (HAVE_UNISTD_H) # include <unistd.h> /* for _POSIX_VERSION */ #endif /* HAVE_UNISTD_H */ #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #include <stdio.h> #include <ctype.h> /* System-specific feature definitions and include files. */ #include "rldefs.h" #include "rlmbutil.h" #if defined (TIOCSTAT_IN_SYS_IOCTL) # include <sys/ioctl.h> #endif /* TIOCSTAT_IN_SYS_IOCTL */ /* Some standard library routines. */ #include "readline.h" #include "rlprivate.h" #include "xmalloc.h" /* **************************************************************** */ /* */ /* Utility Functions */ /* */ /* **************************************************************** */ /* Return 0 if C is not a member of the class of characters that belong in words, or 1 if it is. */ int _rl_allow_pathname_alphabetic_chars = 0; static const char * const pathname_alphabetic_chars = "/-_=~.#$"; int rl_alphabetic (c) int c; { if (ALPHABETIC (c)) return (1); return (_rl_allow_pathname_alphabetic_chars && strchr (pathname_alphabetic_chars, c) != NULL); } #if defined (HANDLE_MULTIBYTE) int _rl_walphabetic (wchar_t wc) { int c; if (iswalnum (wc)) return (1); c = wc & 0177; return (_rl_allow_pathname_alphabetic_chars && strchr (pathname_alphabetic_chars, c) != NULL); } #endif /* How to abort things. */ int _rl_abort_internal () { rl_ding (); rl_clear_message (); _rl_reset_argument (); rl_clear_pending_input (); RL_UNSETSTATE (RL_STATE_MACRODEF); while (rl_executing_macro) _rl_pop_executing_macro (); rl_last_func = (rl_command_func_t *)NULL; longjmp (_rl_top_level, 1); return (0); } int rl_abort (count, key) int count, key; { return (_rl_abort_internal ()); } int _rl_null_function (count, key) int count, key; { return 0; } int rl_tty_status (count, key) int count, key; { #if defined (TIOCSTAT) ioctl (1, TIOCSTAT, (char *)0); rl_refresh_line (count, key); #else rl_ding (); #endif return 0; } /* Return a copy of the string between FROM and TO. FROM is inclusive, TO is not. */ char * rl_copy_text (from, to) int from, to; { register int length; char *copy; /* Fix it if the caller is confused. */ if (from > to) SWAP (from, to); length = to - from; copy = (char *)xmalloc (1 + length); strncpy (copy, rl_line_buffer + from, length); copy[length] = '\0'; return (copy); } /* Increase the size of RL_LINE_BUFFER until it has enough space to hold LEN characters. */ void rl_extend_line_buffer (len) int len; { while (len >= rl_line_buffer_len) { rl_line_buffer_len += DEFAULT_BUFFER_SIZE; rl_line_buffer = (char *)xrealloc (rl_line_buffer, rl_line_buffer_len); } _rl_set_the_line (); } /* A function for simple tilde expansion. */ int rl_tilde_expand (ignore, key) int ignore, key; { register int start, end; char *homedir, *temp; int len; end = rl_point; start = end - 1; if (rl_point == rl_end && rl_line_buffer[rl_point] == '~') { homedir = tilde_expand ("~"); _rl_replace_text (homedir, start, end); xfree (homedir); return (0); } else if (rl_line_buffer[start] != '~') { for (; !whitespace (rl_line_buffer[start]) && start >= 0; start--) ; start++; } end = start; do end++; while (whitespace (rl_line_buffer[end]) == 0 && end < rl_end); if (whitespace (rl_line_buffer[end]) || end >= rl_end) end--; /* If the first character of the current word is a tilde, perform tilde expansion and insert the result. If not a tilde, do nothing. */ if (rl_line_buffer[start] == '~') { len = end - start + 1; temp = (char *)xmalloc (len + 1); strncpy (temp, rl_line_buffer + start, len); temp[len] = '\0'; homedir = tilde_expand (temp); xfree (temp); _rl_replace_text (homedir, start, end); xfree (homedir); } return (0); } #if defined (USE_VARARGS) void #if defined (PREFER_STDARG) _rl_ttymsg (const char *format, ...) #else _rl_ttymsg (va_alist) va_dcl #endif { va_list args; #if defined (PREFER_VARARGS) char *format; #endif #if defined (PREFER_STDARG) va_start (args, format); #else va_start (args); format = va_arg (args, char *); #endif fprintf (stderr, "readline: "); vfprintf (stderr, format, args); fprintf (stderr, "\n"); fflush (stderr); va_end (args); rl_forced_update_display (); } void #if defined (PREFER_STDARG) _rl_errmsg (const char *format, ...) #else _rl_errmsg (va_alist) va_dcl #endif { va_list args; #if defined (PREFER_VARARGS) char *format; #endif #if defined (PREFER_STDARG) va_start (args, format); #else va_start (args); format = va_arg (args, char *); #endif fprintf (stderr, "readline: "); vfprintf (stderr, format, args); fprintf (stderr, "\n"); fflush (stderr); va_end (args); } #else /* !USE_VARARGS */ void _rl_ttymsg (format, arg1, arg2) char *format; { fprintf (stderr, "readline: "); fprintf (stderr, format, arg1, arg2); fprintf (stderr, "\n"); rl_forced_update_display (); } void _rl_errmsg (format, arg1, arg2) char *format; { fprintf (stderr, "readline: "); fprintf (stderr, format, arg1, arg2); fprintf (stderr, "\n"); } #endif /* !USE_VARARGS */ /* **************************************************************** */ /* */ /* String Utility Functions */ /* */ /* **************************************************************** */ /* Determine if s2 occurs in s1. If so, return a pointer to the match in s1. The compare is case insensitive. */ char * _rl_strindex (s1, s2) register const char *s1, *s2; { register int i, l, len; for (i = 0, l = strlen (s2), len = strlen (s1); (len - i) >= l; i++) if (_rl_strnicmp (s1 + i, s2, l) == 0) return ((char *) (s1 + i)); return ((char *)NULL); } #ifndef HAVE_STRPBRK /* Find the first occurrence in STRING1 of any character from STRING2. Return a pointer to the character in STRING1. */ char * _rl_strpbrk (string1, string2) const char *string1, *string2; { register const char *scan; #if defined (HANDLE_MULTIBYTE) mbstate_t ps; register int i, v; memset (&ps, 0, sizeof (mbstate_t)); #endif for (; *string1; string1++) { for (scan = string2; *scan; scan++) { if (*string1 == *scan) return ((char *)string1); } #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { v = _rl_get_char_len (string1, &ps); if (v > 1) string1 += v - 1; /* -1 to account for auto-increment in loop */ } #endif } return ((char *)NULL); } #endif #if !defined (HAVE_STRCASECMP) /* Compare at most COUNT characters from string1 to string2. Case doesn't matter (strncasecmp). */ int _rl_strnicmp (string1, string2, count) char *string1, *string2; int count; { register char *s1, *s2; int d; if (count <= 0 || (string1 == string2)) return 0; s1 = string1; s2 = string2; do { d = _rl_to_lower (*s1) - _rl_to_lower (*s2); /* XXX - cast to unsigned char? */ if (d != 0) return d; if (*s1++ == '\0') break; s2++; } while (--count != 0) return (0); } /* strcmp (), but caseless (strcasecmp). */ int _rl_stricmp (string1, string2) char *string1, *string2; { register char *s1, *s2; int d; s1 = string1; s2 = string2; if (s1 == s2) return 0; while ((d = _rl_to_lower (*s1) - _rl_to_lower (*s2)) == 0) { if (*s1++ == '\0') return 0; s2++; } return (d); } #endif /* !HAVE_STRCASECMP */ /* Stupid comparison routine for qsort () ing strings. */ int _rl_qsort_string_compare (s1, s2) char **s1, **s2; { #if defined (HAVE_STRCOLL) return (strcoll (*s1, *s2)); #else int result; result = **s1 - **s2; if (result == 0) result = strcmp (*s1, *s2); return result; #endif } /* Function equivalents for the macros defined in chardefs.h. */ #define FUNCTION_FOR_MACRO(f) int (f) (c) int c; { return f (c); } FUNCTION_FOR_MACRO (_rl_digit_p) FUNCTION_FOR_MACRO (_rl_digit_value) FUNCTION_FOR_MACRO (_rl_lowercase_p) FUNCTION_FOR_MACRO (_rl_pure_alphabetic) FUNCTION_FOR_MACRO (_rl_to_lower) FUNCTION_FOR_MACRO (_rl_to_upper) FUNCTION_FOR_MACRO (_rl_uppercase_p) /* A convenience function, to force memory deallocation to be performed by readline. DLLs on Windows apparently require this. */ void rl_free (mem) void *mem; { if (mem) free (mem); } /* Backwards compatibility, now that savestring has been removed from all `public' readline header files. */ #undef _rl_savestring char * _rl_savestring (s) const char *s; { return (strcpy ((char *)xmalloc (1 + (int)strlen (s)), (s))); } #if defined (USE_VARARGS) static FILE *_rl_tracefp; void #if defined (PREFER_STDARG) _rl_trace (const char *format, ...) #else _rl_trace (va_alist) va_dcl #endif { va_list args; #if defined (PREFER_VARARGS) char *format; #endif #if defined (PREFER_STDARG) va_start (args, format); #else va_start (args); format = va_arg (args, char *); #endif if (_rl_tracefp == 0) _rl_tropen (); vfprintf (_rl_tracefp, format, args); fprintf (_rl_tracefp, "\n"); fflush (_rl_tracefp); va_end (args); } int _rl_tropen () { char fnbuf[128]; if (_rl_tracefp) fclose (_rl_tracefp); sprintf (fnbuf, "/var/tmp/rltrace.%ld", getpid()); unlink(fnbuf); _rl_tracefp = fopen (fnbuf, "w+"); return _rl_tracefp != 0; } int _rl_trclose () { int r; r = fclose (_rl_tracefp); _rl_tracefp = 0; return r; } #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/misc.c�����������������������������������������������������������������������0000644�0001750�0001750�00000036611�12250770610�014754� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* misc.c -- miscellaneous bindable readline functions. */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include <config.h> #endif #if defined (HAVE_UNISTD_H) # include <unistd.h> #endif /* HAVE_UNISTD_H */ #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #if defined (HAVE_LOCALE_H) # include <locale.h> #endif #include <stdio.h> /* System-specific feature definitions and include files. */ #include "rldefs.h" #include "rlmbutil.h" /* Some standard library routines. */ #include "readline.h" #include "history.h" #include "rlprivate.h" #include "rlshell.h" #include "xmalloc.h" static int rl_digit_loop PARAMS((void)); static void _rl_history_set_point PARAMS((void)); /* Forward declarations used in this file */ void _rl_free_history_entry PARAMS((HIST_ENTRY *)); /* If non-zero, rl_get_previous_history and rl_get_next_history attempt to preserve the value of rl_point from line to line. */ int _rl_history_preserve_point = 0; _rl_arg_cxt _rl_argcxt; /* Saved target point for when _rl_history_preserve_point is set. Special value of -1 means that point is at the end of the line. */ int _rl_history_saved_point = -1; /* **************************************************************** */ /* */ /* Numeric Arguments */ /* */ /* **************************************************************** */ int _rl_arg_overflow () { if (rl_numeric_arg > 1000000) { _rl_argcxt = 0; rl_explicit_arg = rl_numeric_arg = 0; rl_ding (); rl_restore_prompt (); rl_clear_message (); RL_UNSETSTATE(RL_STATE_NUMERICARG); return 1; } return 0; } void _rl_arg_init () { rl_save_prompt (); _rl_argcxt = 0; RL_SETSTATE(RL_STATE_NUMERICARG); } int _rl_arg_getchar () { int c; rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg); RL_SETSTATE(RL_STATE_MOREINPUT); c = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); return c; } /* Process C as part of the current numeric argument. Return -1 if the argument should be aborted, 0 if we should not read any more chars, and 1 if we should continue to read chars. */ int _rl_arg_dispatch (cxt, c) _rl_arg_cxt cxt; int c; { int key, r; key = c; /* If we see a key bound to `universal-argument' after seeing digits, it ends the argument but is otherwise ignored. */ if (_rl_keymap[c].type == ISFUNC && _rl_keymap[c].function == rl_universal_argument) { if ((cxt & NUM_SAWDIGITS) == 0) { rl_numeric_arg *= 4; return 1; } else if (RL_ISSTATE (RL_STATE_CALLBACK)) { _rl_argcxt |= NUM_READONE; return 0; /* XXX */ } else { RL_SETSTATE(RL_STATE_MOREINPUT); key = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); rl_restore_prompt (); rl_clear_message (); RL_UNSETSTATE(RL_STATE_NUMERICARG); if (key < 0) return -1; return (_rl_dispatch (key, _rl_keymap)); } } c = UNMETA (c); if (_rl_digit_p (c)) { r = _rl_digit_value (c); rl_numeric_arg = rl_explicit_arg ? (rl_numeric_arg * 10) + r : r; rl_explicit_arg = 1; _rl_argcxt |= NUM_SAWDIGITS; } else if (c == '-' && rl_explicit_arg == 0) { rl_numeric_arg = 1; _rl_argcxt |= NUM_SAWMINUS; rl_arg_sign = -1; } else { /* Make M-- command equivalent to M--1 command. */ if ((_rl_argcxt & NUM_SAWMINUS) && rl_numeric_arg == 1 && rl_explicit_arg == 0) rl_explicit_arg = 1; rl_restore_prompt (); rl_clear_message (); RL_UNSETSTATE(RL_STATE_NUMERICARG); r = _rl_dispatch (key, _rl_keymap); if (RL_ISSTATE (RL_STATE_CALLBACK)) { /* At worst, this will cause an extra redisplay. Otherwise, we have to wait until the next character comes in. */ if (rl_done == 0) (*rl_redisplay_function) (); r = 0; } return r; } return 1; } /* Handle C-u style numeric args, as well as M--, and M-digits. */ static int rl_digit_loop () { int c, r; while (1) { if (_rl_arg_overflow ()) return 1; c = _rl_arg_getchar (); if (c < 0) { _rl_abort_internal (); return -1; } r = _rl_arg_dispatch (_rl_argcxt, c); if (r <= 0 || (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)) break; } return r; } /* Create a default argument. */ void _rl_reset_argument () { rl_numeric_arg = rl_arg_sign = 1; rl_explicit_arg = 0; _rl_argcxt = 0; } /* Start a numeric argument with initial value KEY */ int rl_digit_argument (ignore, key) int ignore, key; { _rl_arg_init (); if (RL_ISSTATE (RL_STATE_CALLBACK)) { _rl_arg_dispatch (_rl_argcxt, key); rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg); return 0; } else { rl_execute_next (key); return (rl_digit_loop ()); } } /* C-u, universal argument. Multiply the current argument by 4. Read a key. If the key has nothing to do with arguments, then dispatch on it. If the key is the abort character then abort. */ int rl_universal_argument (count, key) int count, key; { _rl_arg_init (); rl_numeric_arg *= 4; return (RL_ISSTATE (RL_STATE_CALLBACK) ? 0 : rl_digit_loop ()); } int _rl_arg_callback (cxt) _rl_arg_cxt cxt; { int c, r; c = _rl_arg_getchar (); if (_rl_argcxt & NUM_READONE) { _rl_argcxt &= ~NUM_READONE; rl_restore_prompt (); rl_clear_message (); RL_UNSETSTATE(RL_STATE_NUMERICARG); rl_execute_next (c); return 0; } r = _rl_arg_dispatch (cxt, c); return (r != 1); } /* What to do when you abort reading an argument. */ int rl_discard_argument () { rl_ding (); rl_clear_message (); _rl_reset_argument (); return 0; } /* **************************************************************** */ /* */ /* History Utilities */ /* */ /* **************************************************************** */ /* We already have a history library, and that is what we use to control the history features of readline. This is our local interface to the history mechanism. */ /* While we are editing the history, this is the saved version of the original line. */ HIST_ENTRY *_rl_saved_line_for_history = (HIST_ENTRY *)NULL; /* Set the history pointer back to the last entry in the history. */ void _rl_start_using_history () { using_history (); if (_rl_saved_line_for_history) _rl_free_history_entry (_rl_saved_line_for_history); _rl_saved_line_for_history = (HIST_ENTRY *)NULL; } /* Free the contents (and containing structure) of a HIST_ENTRY. */ void _rl_free_history_entry (entry) HIST_ENTRY *entry; { if (entry == 0) return; FREE (entry->line); FREE (entry->timestamp); xfree (entry); } /* Perhaps put back the current line if it has changed. */ int rl_maybe_replace_line () { HIST_ENTRY *temp; temp = current_history (); /* If the current line has changed, save the changes. */ if (temp && ((UNDO_LIST *)(temp->data) != rl_undo_list)) { temp = replace_history_entry (where_history (), rl_line_buffer, (histdata_t)rl_undo_list); xfree (temp->line); FREE (temp->timestamp); xfree (temp); } return 0; } /* Restore the _rl_saved_line_for_history if there is one. */ int rl_maybe_unsave_line () { if (_rl_saved_line_for_history) { /* Can't call with `1' because rl_undo_list might point to an undo list from a history entry, as in rl_replace_from_history() below. */ rl_replace_line (_rl_saved_line_for_history->line, 0); rl_undo_list = (UNDO_LIST *)_rl_saved_line_for_history->data; _rl_free_history_entry (_rl_saved_line_for_history); _rl_saved_line_for_history = (HIST_ENTRY *)NULL; rl_point = rl_end; /* rl_replace_line sets rl_end */ } else rl_ding (); return 0; } /* Save the current line in _rl_saved_line_for_history. */ int rl_maybe_save_line () { if (_rl_saved_line_for_history == 0) { _rl_saved_line_for_history = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); _rl_saved_line_for_history->line = savestring (rl_line_buffer); _rl_saved_line_for_history->timestamp = (char *)NULL; _rl_saved_line_for_history->data = (char *)rl_undo_list; } return 0; } int _rl_free_saved_history_line () { if (_rl_saved_line_for_history) { _rl_free_history_entry (_rl_saved_line_for_history); _rl_saved_line_for_history = (HIST_ENTRY *)NULL; } return 0; } static void _rl_history_set_point () { rl_point = (_rl_history_preserve_point && _rl_history_saved_point != -1) ? _rl_history_saved_point : rl_end; if (rl_point > rl_end) rl_point = rl_end; #if defined (VI_MODE) if (rl_editing_mode == vi_mode && _rl_keymap != vi_insertion_keymap) rl_point = 0; #endif /* VI_MODE */ if (rl_editing_mode == emacs_mode) rl_mark = (rl_point == rl_end ? 0 : rl_end); } void rl_replace_from_history (entry, flags) HIST_ENTRY *entry; int flags; /* currently unused */ { /* Can't call with `1' because rl_undo_list might point to an undo list from a history entry, just like we're setting up here. */ rl_replace_line (entry->line, 0); rl_undo_list = (UNDO_LIST *)entry->data; rl_point = rl_end; rl_mark = 0; #if defined (VI_MODE) if (rl_editing_mode == vi_mode) { rl_point = 0; rl_mark = rl_end; } #endif } /* Process and free undo lists attached to each history entry prior to the current entry, inclusive, reverting each line to its saved state. This is destructive, and state about the current line is lost. This is not intended to be called while actively editing, and the current line is not assumed to have been added to the history list. */ void _rl_revert_all_lines () { int hpos; HIST_ENTRY *entry; UNDO_LIST *ul, *saved_undo_list; char *lbuf; lbuf = savestring (rl_line_buffer); saved_undo_list = rl_undo_list; hpos = where_history (); entry = (hpos == history_length) ? previous_history () : current_history (); while (entry) { if (ul = (UNDO_LIST *)entry->data) { if (ul == saved_undo_list) saved_undo_list = 0; /* Set up rl_line_buffer and other variables from history entry */ rl_replace_from_history (entry, 0); /* entry->line is now current */ /* Undo all changes to this history entry */ while (rl_undo_list) rl_do_undo (); /* And copy the reverted line back to the history entry, preserving the timestamp. */ FREE (entry->line); entry->line = savestring (rl_line_buffer); entry->data = 0; } entry = previous_history (); } /* Restore history state */ rl_undo_list = saved_undo_list; /* may have been set to null */ history_set_pos (hpos); /* reset the line buffer */ rl_replace_line (lbuf, 0); _rl_set_the_line (); /* and clean up */ xfree (lbuf); } /* **************************************************************** */ /* */ /* History Commands */ /* */ /* **************************************************************** */ /* Meta-< goes to the start of the history. */ int rl_beginning_of_history (count, key) int count, key; { return (rl_get_previous_history (1 + where_history (), key)); } /* Meta-> goes to the end of the history. (The current line). */ int rl_end_of_history (count, key) int count, key; { rl_maybe_replace_line (); using_history (); rl_maybe_unsave_line (); return 0; } /* Move down to the next history line. */ int rl_get_next_history (count, key) int count, key; { HIST_ENTRY *temp; if (count < 0) return (rl_get_previous_history (-count, key)); if (count == 0) return 0; rl_maybe_replace_line (); /* either not saved by rl_newline or at end of line, so set appropriately. */ if (_rl_history_saved_point == -1 && (rl_point || rl_end)) _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point; temp = (HIST_ENTRY *)NULL; while (count) { temp = next_history (); if (!temp) break; --count; } if (temp == 0) rl_maybe_unsave_line (); else { rl_replace_from_history (temp, 0); _rl_history_set_point (); } return 0; } /* Get the previous item out of our interactive history, making it the current line. If there is no previous history, just ding. */ int rl_get_previous_history (count, key) int count, key; { HIST_ENTRY *old_temp, *temp; if (count < 0) return (rl_get_next_history (-count, key)); if (count == 0) return 0; /* either not saved by rl_newline or at end of line, so set appropriately. */ if (_rl_history_saved_point == -1 && (rl_point || rl_end)) _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point; /* If we don't have a line saved, then save this one. */ rl_maybe_save_line (); /* If the current line has changed, save the changes. */ rl_maybe_replace_line (); temp = old_temp = (HIST_ENTRY *)NULL; while (count) { temp = previous_history (); if (temp == 0) break; old_temp = temp; --count; } /* If there was a large argument, and we moved back to the start of the history, that is not an error. So use the last value found. */ if (!temp && old_temp) temp = old_temp; if (temp == 0) rl_ding (); else { rl_replace_from_history (temp, 0); _rl_history_set_point (); } return 0; } /* **************************************************************** */ /* */ /* Editing Modes */ /* */ /* **************************************************************** */ /* How to toggle back and forth between editing modes. */ int rl_vi_editing_mode (count, key) int count, key; { #if defined (VI_MODE) _rl_set_insert_mode (RL_IM_INSERT, 1); /* vi mode ignores insert mode */ rl_editing_mode = vi_mode; rl_vi_insert_mode (1, key); #endif /* VI_MODE */ return 0; } int rl_emacs_editing_mode (count, key) int count, key; { rl_editing_mode = emacs_mode; _rl_set_insert_mode (RL_IM_INSERT, 1); /* emacs mode default is insert mode */ _rl_keymap = emacs_standard_keymap; return 0; } /* Function for the rest of the library to use to set insert/overwrite mode. */ void _rl_set_insert_mode (im, force) int im, force; { #ifdef CURSOR_MODE _rl_set_cursor (im, force); #endif rl_insert_mode = im; } /* Toggle overwrite mode. A positive explicit argument selects overwrite mode. A negative or zero explicit argument selects insert mode. */ int rl_overwrite_mode (count, key) int count, key; { if (rl_explicit_arg == 0) _rl_set_insert_mode (rl_insert_mode ^ 1, 0); else if (count > 0) _rl_set_insert_mode (RL_IM_OVERWRITE, 0); else _rl_set_insert_mode (RL_IM_INSERT, 0); return 0; } �����������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/rltty.c����������������������������������������������������������������������0000644�0001750�0001750�00000054304�12250770610�015176� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* rltty.c -- functions to prepare and restore the terminal for readline's use. */ /* Copyright (C) 1992-2005 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include <config.h> #endif #include <sys/types.h> #include <signal.h> #include <errno.h> #include <stdio.h> #if defined (HAVE_UNISTD_H) # include <unistd.h> #endif /* HAVE_UNISTD_H */ #include "rldefs.h" #if defined (GWINSZ_IN_SYS_IOCTL) # include <sys/ioctl.h> #endif /* GWINSZ_IN_SYS_IOCTL */ #include "rltty.h" #include "readline.h" #include "rlprivate.h" #if !defined (errno) extern int errno; #endif /* !errno */ rl_vintfunc_t *rl_prep_term_function = rl_prep_terminal; rl_voidfunc_t *rl_deprep_term_function = rl_deprep_terminal; static void set_winsize PARAMS((int)); /* **************************************************************** */ /* */ /* Saving and Restoring the TTY */ /* */ /* **************************************************************** */ /* Non-zero means that the terminal is in a prepped state. */ static int terminal_prepped; static _RL_TTY_CHARS _rl_tty_chars, _rl_last_tty_chars; /* If non-zero, means that this process has called tcflow(fd, TCOOFF) and output is suspended. */ #if defined (__ksr1__) static int ksrflow; #endif /* Dummy call to force a backgrounded readline to stop before it tries to get the tty settings. */ static void set_winsize (tty) int tty; { #if defined (TIOCGWINSZ) struct winsize w; if (ioctl (tty, TIOCGWINSZ, &w) == 0) (void) ioctl (tty, TIOCSWINSZ, &w); #endif /* TIOCGWINSZ */ } #if defined (NO_TTY_DRIVER) /* Nothing */ #elif defined (NEW_TTY_DRIVER) /* Values for the `flags' field of a struct bsdtty. This tells which elements of the struct bsdtty have been fetched from the system and are valid. */ #define SGTTY_SET 0x01 #define LFLAG_SET 0x02 #define TCHARS_SET 0x04 #define LTCHARS_SET 0x08 struct bsdtty { struct sgttyb sgttyb; /* Basic BSD tty driver information. */ int lflag; /* Local mode flags, like LPASS8. */ #if defined (TIOCGETC) struct tchars tchars; /* Terminal special characters, including ^S and ^Q. */ #endif #if defined (TIOCGLTC) struct ltchars ltchars; /* 4.2 BSD editing characters */ #endif int flags; /* Bitmap saying which parts of the struct are valid. */ }; #define TIOTYPE struct bsdtty static TIOTYPE otio; static void save_tty_chars PARAMS((TIOTYPE *)); static int _get_tty_settings PARAMS((int, TIOTYPE *)); static int get_tty_settings PARAMS((int, TIOTYPE *)); static int _set_tty_settings PARAMS((int, TIOTYPE *)); static int set_tty_settings PARAMS((int, TIOTYPE *)); static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *)); static void set_special_char PARAMS((Keymap, TIOTYPE *, int, rl_command_func_t)); static void save_tty_chars (tiop) TIOTYPE *tiop; { _rl_last_tty_chars = _rl_tty_chars; if (tiop->flags & SGTTY_SET) { _rl_tty_chars.t_erase = tiop->sgttyb.sg_erase; _rl_tty_chars.t_kill = tiop->sgttyb.sg_kill; } if (tiop->flags & TCHARS_SET) { _rl_intr_char = _rl_tty_chars.t_intr = tiop->tchars.t_intrc; _rl_quit_char = _rl_tty_chars.t_quit = tiop->tchars.t_quitc; _rl_tty_chars.t_start = tiop->tchars.t_startc; _rl_tty_chars.t_stop = tiop->tchars.t_stopc; _rl_tty_chars.t_eof = tiop->tchars.t_eofc; _rl_tty_chars.t_eol = '\n'; _rl_tty_chars.t_eol2 = tiop->tchars.t_brkc; } if (tiop->flags & LTCHARS_SET) { _rl_susp_char = _rl_tty_chars.t_susp = tiop->ltchars.t_suspc; _rl_tty_chars.t_dsusp = tiop->ltchars.t_dsuspc; _rl_tty_chars.t_reprint = tiop->ltchars.t_rprntc; _rl_tty_chars.t_flush = tiop->ltchars.t_flushc; _rl_tty_chars.t_werase = tiop->ltchars.t_werasc; _rl_tty_chars.t_lnext = tiop->ltchars.t_lnextc; } _rl_tty_chars.t_status = -1; } static int get_tty_settings (tty, tiop) int tty; TIOTYPE *tiop; { set_winsize (tty); tiop->flags = tiop->lflag = 0; errno = 0; if (ioctl (tty, TIOCGETP, &(tiop->sgttyb)) < 0) return -1; tiop->flags |= SGTTY_SET; #if defined (TIOCLGET) if (ioctl (tty, TIOCLGET, &(tiop->lflag)) == 0) tiop->flags |= LFLAG_SET; #endif #if defined (TIOCGETC) if (ioctl (tty, TIOCGETC, &(tiop->tchars)) == 0) tiop->flags |= TCHARS_SET; #endif #if defined (TIOCGLTC) if (ioctl (tty, TIOCGLTC, &(tiop->ltchars)) == 0) tiop->flags |= LTCHARS_SET; #endif return 0; } static int set_tty_settings (tty, tiop) int tty; TIOTYPE *tiop; { if (tiop->flags & SGTTY_SET) { ioctl (tty, TIOCSETN, &(tiop->sgttyb)); tiop->flags &= ~SGTTY_SET; } _rl_echoing_p = 1; #if defined (TIOCLSET) if (tiop->flags & LFLAG_SET) { ioctl (tty, TIOCLSET, &(tiop->lflag)); tiop->flags &= ~LFLAG_SET; } #endif #if defined (TIOCSETC) if (tiop->flags & TCHARS_SET) { ioctl (tty, TIOCSETC, &(tiop->tchars)); tiop->flags &= ~TCHARS_SET; } #endif #if defined (TIOCSLTC) if (tiop->flags & LTCHARS_SET) { ioctl (tty, TIOCSLTC, &(tiop->ltchars)); tiop->flags &= ~LTCHARS_SET; } #endif return 0; } static void prepare_terminal_settings (meta_flag, oldtio, tiop) int meta_flag; TIOTYPE oldtio, *tiop; { _rl_echoing_p = (oldtio.sgttyb.sg_flags & ECHO); _rl_echoctl = (oldtio.sgttyb.sg_flags & ECHOCTL); /* Copy the original settings to the structure we're going to use for our settings. */ tiop->sgttyb = oldtio.sgttyb; tiop->lflag = oldtio.lflag; #if defined (TIOCGETC) tiop->tchars = oldtio.tchars; #endif #if defined (TIOCGLTC) tiop->ltchars = oldtio.ltchars; #endif tiop->flags = oldtio.flags; /* First, the basic settings to put us into character-at-a-time, no-echo input mode. */ tiop->sgttyb.sg_flags &= ~(ECHO | CRMOD); tiop->sgttyb.sg_flags |= CBREAK; /* If this terminal doesn't care how the 8th bit is used, then we can use it for the meta-key. If only one of even or odd parity is specified, then the terminal is using parity, and we cannot. */ #if !defined (ANYP) # define ANYP (EVENP | ODDP) #endif if (((oldtio.sgttyb.sg_flags & ANYP) == ANYP) || ((oldtio.sgttyb.sg_flags & ANYP) == 0)) { tiop->sgttyb.sg_flags |= ANYP; /* Hack on local mode flags if we can. */ #if defined (TIOCLGET) # if defined (LPASS8) tiop->lflag |= LPASS8; # endif /* LPASS8 */ #endif /* TIOCLGET */ } #if defined (TIOCGETC) # if defined (USE_XON_XOFF) /* Get rid of terminal output start and stop characters. */ tiop->tchars.t_stopc = -1; /* C-s */ tiop->tchars.t_startc = -1; /* C-q */ /* If there is an XON character, bind it to restart the output. */ if (oldtio.tchars.t_startc != -1) rl_bind_key (oldtio.tchars.t_startc, rl_restart_output); # endif /* USE_XON_XOFF */ /* If there is an EOF char, bind _rl_eof_char to it. */ if (oldtio.tchars.t_eofc != -1) _rl_eof_char = oldtio.tchars.t_eofc; # if defined (NO_KILL_INTR) /* Get rid of terminal-generated SIGQUIT and SIGINT. */ tiop->tchars.t_quitc = -1; /* C-\ */ tiop->tchars.t_intrc = -1; /* C-c */ # endif /* NO_KILL_INTR */ #endif /* TIOCGETC */ #if defined (TIOCGLTC) /* Make the interrupt keys go away. Just enough to make people happy. */ tiop->ltchars.t_dsuspc = -1; /* C-y */ tiop->ltchars.t_lnextc = -1; /* C-v */ #endif /* TIOCGLTC */ } #else /* !defined (NEW_TTY_DRIVER) */ #if !defined (VMIN) # define VMIN VEOF #endif #if !defined (VTIME) # define VTIME VEOL #endif #if defined (TERMIOS_TTY_DRIVER) # define TIOTYPE struct termios # define DRAIN_OUTPUT(fd) tcdrain (fd) # define GETATTR(tty, tiop) (tcgetattr (tty, tiop)) # ifdef M_UNIX # define SETATTR(tty, tiop) (tcsetattr (tty, TCSANOW, tiop)) # else # define SETATTR(tty, tiop) (tcsetattr (tty, TCSADRAIN, tiop)) # endif /* !M_UNIX */ #else # define TIOTYPE struct termio # define DRAIN_OUTPUT(fd) # define GETATTR(tty, tiop) (ioctl (tty, TCGETA, tiop)) # define SETATTR(tty, tiop) (ioctl (tty, TCSETAW, tiop)) #endif /* !TERMIOS_TTY_DRIVER */ static TIOTYPE otio; static void save_tty_chars PARAMS((TIOTYPE *)); static int _get_tty_settings PARAMS((int, TIOTYPE *)); static int get_tty_settings PARAMS((int, TIOTYPE *)); static int _set_tty_settings PARAMS((int, TIOTYPE *)); static int set_tty_settings PARAMS((int, TIOTYPE *)); static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *)); static void set_special_char PARAMS((Keymap, TIOTYPE *, int, rl_command_func_t)); static void _rl_bind_tty_special_chars PARAMS((Keymap, TIOTYPE)); #if defined (FLUSHO) # define OUTPUT_BEING_FLUSHED(tp) (tp->c_lflag & FLUSHO) #else # define OUTPUT_BEING_FLUSHED(tp) 0 #endif static void save_tty_chars (tiop) TIOTYPE *tiop; { _rl_last_tty_chars = _rl_tty_chars; _rl_tty_chars.t_eof = tiop->c_cc[VEOF]; _rl_tty_chars.t_eol = tiop->c_cc[VEOL]; #ifdef VEOL2 _rl_tty_chars.t_eol2 = tiop->c_cc[VEOL2]; #endif _rl_tty_chars.t_erase = tiop->c_cc[VERASE]; #ifdef VWERASE _rl_tty_chars.t_werase = tiop->c_cc[VWERASE]; #endif _rl_tty_chars.t_kill = tiop->c_cc[VKILL]; #ifdef VREPRINT _rl_tty_chars.t_reprint = tiop->c_cc[VREPRINT]; #endif _rl_intr_char = _rl_tty_chars.t_intr = tiop->c_cc[VINTR]; _rl_quit_char = _rl_tty_chars.t_quit = tiop->c_cc[VQUIT]; #ifdef VSUSP _rl_susp_char = _rl_tty_chars.t_susp = tiop->c_cc[VSUSP]; #endif #ifdef VDSUSP _rl_tty_chars.t_dsusp = tiop->c_cc[VDSUSP]; #endif #ifdef VSTART _rl_tty_chars.t_start = tiop->c_cc[VSTART]; #endif #ifdef VSTOP _rl_tty_chars.t_stop = tiop->c_cc[VSTOP]; #endif #ifdef VLNEXT _rl_tty_chars.t_lnext = tiop->c_cc[VLNEXT]; #endif #ifdef VDISCARD _rl_tty_chars.t_flush = tiop->c_cc[VDISCARD]; #endif #ifdef VSTATUS _rl_tty_chars.t_status = tiop->c_cc[VSTATUS]; #endif } #if defined (_AIX) || defined (_AIX41) /* Currently this is only used on AIX */ static void rltty_warning (msg) char *msg; { _rl_errmsg ("warning: %s", msg); } #endif #if defined (_AIX) void setopost(tp) TIOTYPE *tp; { if ((tp->c_oflag & OPOST) == 0) { _rl_errmsg ("warning: turning on OPOST for terminal\r"); tp->c_oflag |= OPOST|ONLCR; } } #endif static int _get_tty_settings (tty, tiop) int tty; TIOTYPE *tiop; { int ioctl_ret; while (1) { ioctl_ret = GETATTR (tty, tiop); if (ioctl_ret < 0) { if (errno != EINTR) return -1; else continue; } if (OUTPUT_BEING_FLUSHED (tiop)) { #if defined (FLUSHO) _rl_errmsg ("warning: turning off output flushing"); tiop->c_lflag &= ~FLUSHO; break; #else continue; #endif } break; } return 0; } static int get_tty_settings (tty, tiop) int tty; TIOTYPE *tiop; { set_winsize (tty); errno = 0; if (_get_tty_settings (tty, tiop) < 0) return -1; #if defined (_AIX) setopost(tiop); #endif return 0; } static int _set_tty_settings (tty, tiop) int tty; TIOTYPE *tiop; { while (SETATTR (tty, tiop) < 0) { if (errno != EINTR) return -1; errno = 0; } return 0; } static int set_tty_settings (tty, tiop) int tty; TIOTYPE *tiop; { if (_set_tty_settings (tty, tiop) < 0) return -1; #if 0 #if defined (TERMIOS_TTY_DRIVER) # if defined (__ksr1__) if (ksrflow) { ksrflow = 0; tcflow (tty, TCOON); } # else /* !ksr1 */ tcflow (tty, TCOON); /* Simulate a ^Q. */ # endif /* !ksr1 */ #else ioctl (tty, TCXONC, 1); /* Simulate a ^Q. */ #endif /* !TERMIOS_TTY_DRIVER */ #endif /* 0 */ return 0; } static void prepare_terminal_settings (meta_flag, oldtio, tiop) int meta_flag; TIOTYPE oldtio, *tiop; { _rl_echoing_p = (oldtio.c_lflag & ECHO); #if defined (ECHOCTL) _rl_echoctl = (oldtio.c_lflag & ECHOCTL); #endif tiop->c_lflag &= ~(ICANON | ECHO); if ((unsigned char) oldtio.c_cc[VEOF] != (unsigned char) _POSIX_VDISABLE) _rl_eof_char = oldtio.c_cc[VEOF]; #if defined (USE_XON_XOFF) #if defined (IXANY) tiop->c_iflag &= ~(IXON | IXOFF | IXANY); #else /* `strict' Posix systems do not define IXANY. */ tiop->c_iflag &= ~(IXON | IXOFF); #endif /* IXANY */ #endif /* USE_XON_XOFF */ /* Only turn this off if we are using all 8 bits. */ if (((tiop->c_cflag & CSIZE) == CS8) || meta_flag) tiop->c_iflag &= ~(ISTRIP | INPCK); /* Make sure we differentiate between CR and NL on input. */ tiop->c_iflag &= ~(ICRNL | INLCR); #if !defined (HANDLE_SIGNALS) tiop->c_lflag &= ~ISIG; #else tiop->c_lflag |= ISIG; #endif tiop->c_cc[VMIN] = 1; tiop->c_cc[VTIME] = 0; #if defined (FLUSHO) if (OUTPUT_BEING_FLUSHED (tiop)) { tiop->c_lflag &= ~FLUSHO; oldtio.c_lflag &= ~FLUSHO; } #endif /* Turn off characters that we need on Posix systems with job control, just to be sure. This includes ^Y and ^V. This should not really be necessary. */ #if defined (TERMIOS_TTY_DRIVER) && defined (_POSIX_VDISABLE) #if defined (VLNEXT) tiop->c_cc[VLNEXT] = _POSIX_VDISABLE; #endif #if defined (VDSUSP) tiop->c_cc[VDSUSP] = _POSIX_VDISABLE; #endif #endif /* TERMIOS_TTY_DRIVER && _POSIX_VDISABLE */ } #endif /* !NEW_TTY_DRIVER */ /* Put the terminal in CBREAK mode so that we can detect key presses. */ #if defined (NO_TTY_DRIVER) void rl_prep_terminal (meta_flag) int meta_flag; { _rl_echoing_p = 1; } void rl_deprep_terminal () { } #else /* ! NO_TTY_DRIVER */ void rl_prep_terminal (meta_flag) int meta_flag; { int tty; TIOTYPE tio; if (terminal_prepped) return; /* Try to keep this function from being INTerrupted. */ _rl_block_sigint (); tty = rl_instream ? fileno (rl_instream) : fileno (stdin); if (get_tty_settings (tty, &tio) < 0) { #if defined (ENOTSUP) /* MacOS X and Linux, at least, lie about the value of errno if tcgetattr fails. */ if (errno == ENOTTY || errno == EINVAL || errno == ENOTSUP) #else if (errno == ENOTTY || errno == EINVAL) #endif _rl_echoing_p = 1; /* XXX */ _rl_release_sigint (); return; } otio = tio; if (_rl_bind_stty_chars) { #if defined (VI_MODE) /* If editing in vi mode, make sure we restore the bindings in the insertion keymap no matter what keymap we ended up in. */ if (rl_editing_mode == vi_mode) rl_tty_unset_default_bindings (vi_insertion_keymap); else #endif rl_tty_unset_default_bindings (_rl_keymap); } save_tty_chars (&otio); RL_SETSTATE(RL_STATE_TTYCSAVED); if (_rl_bind_stty_chars) { #if defined (VI_MODE) /* If editing in vi mode, make sure we set the bindings in the insertion keymap no matter what keymap we ended up in. */ if (rl_editing_mode == vi_mode) _rl_bind_tty_special_chars (vi_insertion_keymap, tio); else #endif _rl_bind_tty_special_chars (_rl_keymap, tio); } prepare_terminal_settings (meta_flag, otio, &tio); if (set_tty_settings (tty, &tio) < 0) { _rl_release_sigint (); return; } if (_rl_enable_keypad) _rl_control_keypad (1); fflush (rl_outstream); terminal_prepped = 1; RL_SETSTATE(RL_STATE_TERMPREPPED); _rl_release_sigint (); } /* Restore the terminal's normal settings and modes. */ void rl_deprep_terminal () { int tty; if (!terminal_prepped) return; /* Try to keep this function from being interrupted. */ _rl_block_sigint (); tty = rl_instream ? fileno (rl_instream) : fileno (stdout); if (_rl_enable_keypad) _rl_control_keypad (0); fflush (rl_outstream); if (set_tty_settings (tty, &otio) < 0) { _rl_release_sigint (); return; } terminal_prepped = 0; RL_UNSETSTATE(RL_STATE_TERMPREPPED); _rl_release_sigint (); } #endif /* !NO_TTY_DRIVER */ /* **************************************************************** */ /* */ /* Bogus Flow Control */ /* */ /* **************************************************************** */ int rl_restart_output (count, key) int count, key; { #if defined (__MINGW32__) return 0; #else /* !__MING32__ */ int fildes = fileno (rl_outstream); #if defined (TIOCSTART) #if defined (apollo) ioctl (&fildes, TIOCSTART, 0); #else ioctl (fildes, TIOCSTART, 0); #endif /* apollo */ #else /* !TIOCSTART */ # if defined (TERMIOS_TTY_DRIVER) # if defined (__ksr1__) if (ksrflow) { ksrflow = 0; tcflow (fildes, TCOON); } # else /* !ksr1 */ tcflow (fildes, TCOON); /* Simulate a ^Q. */ # endif /* !ksr1 */ # else /* !TERMIOS_TTY_DRIVER */ # if defined (TCXONC) ioctl (fildes, TCXONC, TCOON); # endif /* TCXONC */ # endif /* !TERMIOS_TTY_DRIVER */ #endif /* !TIOCSTART */ return 0; #endif /* !__MINGW32__ */ } int rl_stop_output (count, key) int count, key; { #if defined (__MINGW32__) return 0; #else int fildes = fileno (rl_instream); #if defined (TIOCSTOP) # if defined (apollo) ioctl (&fildes, TIOCSTOP, 0); # else ioctl (fildes, TIOCSTOP, 0); # endif /* apollo */ #else /* !TIOCSTOP */ # if defined (TERMIOS_TTY_DRIVER) # if defined (__ksr1__) ksrflow = 1; # endif /* ksr1 */ tcflow (fildes, TCOOFF); # else # if defined (TCXONC) ioctl (fildes, TCXONC, TCOON); # endif /* TCXONC */ # endif /* !TERMIOS_TTY_DRIVER */ #endif /* !TIOCSTOP */ return 0; #endif /* !__MINGW32__ */ } /* **************************************************************** */ /* */ /* Default Key Bindings */ /* */ /* **************************************************************** */ #if !defined (NO_TTY_DRIVER) #define SET_SPECIAL(sc, func) set_special_char(kmap, &ttybuff, sc, func) #endif #if defined (NO_TTY_DRIVER) #define SET_SPECIAL(sc, func) #define RESET_SPECIAL(c) #elif defined (NEW_TTY_DRIVER) static void set_special_char (kmap, tiop, sc, func) Keymap kmap; TIOTYPE *tiop; int sc; rl_command_func_t *func; { if (sc != -1 && kmap[(unsigned char)sc].type == ISFUNC) kmap[(unsigned char)sc].function = func; } #define RESET_SPECIAL(c) \ if (c != -1 && kmap[(unsigned char)c].type == ISFUNC) \ kmap[(unsigned char)c].function = rl_insert; static void _rl_bind_tty_special_chars (kmap, ttybuff) Keymap kmap; TIOTYPE ttybuff; { if (ttybuff.flags & SGTTY_SET) { SET_SPECIAL (ttybuff.sgttyb.sg_erase, rl_rubout); SET_SPECIAL (ttybuff.sgttyb.sg_kill, rl_unix_line_discard); } # if defined (TIOCGLTC) if (ttybuff.flags & LTCHARS_SET) { SET_SPECIAL (ttybuff.ltchars.t_werasc, rl_unix_word_rubout); SET_SPECIAL (ttybuff.ltchars.t_lnextc, rl_quoted_insert); } # endif /* TIOCGLTC */ } #else /* !NEW_TTY_DRIVER */ static void set_special_char (kmap, tiop, sc, func) Keymap kmap; TIOTYPE *tiop; int sc; rl_command_func_t *func; { unsigned char uc; uc = tiop->c_cc[sc]; if (uc != (unsigned char)_POSIX_VDISABLE && kmap[uc].type == ISFUNC) kmap[uc].function = func; } /* used later */ #define RESET_SPECIAL(uc) \ if (uc != (unsigned char)_POSIX_VDISABLE && kmap[uc].type == ISFUNC) \ kmap[uc].function = rl_insert; static void _rl_bind_tty_special_chars (kmap, ttybuff) Keymap kmap; TIOTYPE ttybuff; { SET_SPECIAL (VERASE, rl_rubout); SET_SPECIAL (VKILL, rl_unix_line_discard); # if defined (VLNEXT) && defined (TERMIOS_TTY_DRIVER) SET_SPECIAL (VLNEXT, rl_quoted_insert); # endif /* VLNEXT && TERMIOS_TTY_DRIVER */ # if defined (VWERASE) && defined (TERMIOS_TTY_DRIVER) SET_SPECIAL (VWERASE, rl_unix_word_rubout); # endif /* VWERASE && TERMIOS_TTY_DRIVER */ } #endif /* !NEW_TTY_DRIVER */ /* Set the system's default editing characters to their readline equivalents in KMAP. Should be static, now that we have rl_tty_set_default_bindings. */ void rltty_set_default_bindings (kmap) Keymap kmap; { #if !defined (NO_TTY_DRIVER) TIOTYPE ttybuff; int tty; tty = fileno (rl_instream); if (get_tty_settings (tty, &ttybuff) == 0) _rl_bind_tty_special_chars (kmap, ttybuff); #endif } /* New public way to set the system default editing chars to their readline equivalents. */ void rl_tty_set_default_bindings (kmap) Keymap kmap; { rltty_set_default_bindings (kmap); } /* Rebind all of the tty special chars that readline worries about back to self-insert. Call this before saving the current terminal special chars with save_tty_chars(). This only works on POSIX termios or termio systems. */ void rl_tty_unset_default_bindings (kmap) Keymap kmap; { /* Don't bother before we've saved the tty special chars at least once. */ if (RL_ISSTATE(RL_STATE_TTYCSAVED) == 0) return; RESET_SPECIAL (_rl_tty_chars.t_erase); RESET_SPECIAL (_rl_tty_chars.t_kill); # if defined (VLNEXT) && defined (TERMIOS_TTY_DRIVER) RESET_SPECIAL (_rl_tty_chars.t_lnext); # endif /* VLNEXT && TERMIOS_TTY_DRIVER */ # if defined (VWERASE) && defined (TERMIOS_TTY_DRIVER) RESET_SPECIAL (_rl_tty_chars.t_werase); # endif /* VWERASE && TERMIOS_TTY_DRIVER */ } #if defined (HANDLE_SIGNALS) #if defined (NEW_TTY_DRIVER) || defined (NO_TTY_DRIVER) int _rl_disable_tty_signals () { return 0; } int _rl_restore_tty_signals () { return 0; } #else static TIOTYPE sigstty, nosigstty; static int tty_sigs_disabled = 0; int _rl_disable_tty_signals () { if (tty_sigs_disabled) return 0; if (_get_tty_settings (fileno (rl_instream), &sigstty) < 0) return -1; nosigstty = sigstty; nosigstty.c_lflag &= ~ISIG; nosigstty.c_iflag &= ~IXON; if (_set_tty_settings (fileno (rl_instream), &nosigstty) < 0) return (_set_tty_settings (fileno (rl_instream), &sigstty)); tty_sigs_disabled = 1; return 0; } int _rl_restore_tty_signals () { int r; if (tty_sigs_disabled == 0) return 0; r = _set_tty_settings (fileno (rl_instream), &sigstty); if (r == 0) tty_sigs_disabled = 0; return r; } #endif /* !NEW_TTY_DRIVER */ #endif /* HANDLE_SIGNALS */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/histexpand.c�����������������������������������������������������������������0000644�0001750�0001750�00000117764�12250770610�016201� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* histexpand.c -- history expansion. */ /* Copyright (C) 1989-2010 Free Software Foundation, Inc. This file contains the GNU History Library (History), a set of routines for managing the text of previously typed lines. History 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 3 of the License, or (at your option) any later version. History 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 History. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include <config.h> #endif #include <stdio.h> #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #if defined (HAVE_UNISTD_H) # ifndef _MINIX # include <sys/types.h> # endif # include <unistd.h> #endif #include "rlmbutil.h" #include "history.h" #include "histlib.h" #include "rlshell.h" #include "xmalloc.h" #define HISTORY_WORD_DELIMITERS " \t\n;&()|<>" #define HISTORY_QUOTE_CHARACTERS "\"'`" #define slashify_in_quotes "\\`\"$" typedef int _hist_search_func_t PARAMS((const char *, int)); static char error_pointer; static char *subst_lhs; static char *subst_rhs; static int subst_lhs_len; static int subst_rhs_len; static char *get_history_word_specifier PARAMS((char *, char *, int *)); static int history_tokenize_word PARAMS((const char *, int)); static char **history_tokenize_internal PARAMS((const char *, int, int *)); static char *history_substring PARAMS((const char *, int, int)); static void freewords PARAMS((char **, int)); static char *history_find_word PARAMS((char *, int)); static char *quote_breaks PARAMS((char *)); /* Variables exported by this file. */ /* The character that represents the start of a history expansion request. This is usually `!'. */ char history_expansion_char = '!'; /* The character that invokes word substitution if found at the start of a line. This is usually `^'. */ char history_subst_char = '^'; /* During tokenization, if this character is seen as the first character of a word, then it, and all subsequent characters upto a newline are ignored. For a Bourne shell, this should be '#'. Bash special cases the interactive comment character to not be a comment delimiter. */ char history_comment_char = '\0'; /* The list of characters which inhibit the expansion of text if found immediately following history_expansion_char. */ char *history_no_expand_chars = " \t\n\r="; /* If set to a non-zero value, single quotes inhibit history expansion. The default is 0. */ int history_quotes_inhibit_expansion = 0; /* Used to split words by history_tokenize_internal. */ char *history_word_delimiters = HISTORY_WORD_DELIMITERS; /* If set, this points to a function that is called to verify that a particular history expansion should be performed. */ rl_linebuf_func_t *history_inhibit_expansion_function; /* **************************************************************** */ /* */ /* History Expansion */ /* */ /* **************************************************************** */ /* Hairy history expansion on text, not tokens. This is of general use, and thus belongs in this library. */ /* The last string searched for by a !?string? search. */ static char *search_string; /* The last string matched by a !?string? search. */ static char *search_match; /* Return the event specified at TEXT + OFFSET modifying OFFSET to point to after the event specifier. Just a pointer to the history line is returned; NULL is returned in the event of a bad specifier. You pass STRING with *INDEX equal to the history_expansion_char that begins this specification. DELIMITING_QUOTE is a character that is allowed to end the string specification for what to search for in addition to the normal characters `:', ` ', `\t', `\n', and sometimes `?'. So you might call this function like: line = get_history_event ("!echo:p", &index, 0); */ char * get_history_event (string, caller_index, delimiting_quote) const char *string; int *caller_index; int delimiting_quote; { register int i; register char c; HIST_ENTRY *entry; int which, sign, local_index, substring_okay; _hist_search_func_t *search_func; char *temp; /* The event can be specified in a number of ways. !! the previous command !n command line N !-n current command-line minus N !str the most recent command starting with STR !?str[?] the most recent command containing STR All values N are determined via HISTORY_BASE. */ i = *caller_index; if (string[i] != history_expansion_char) return ((char *)NULL); /* Move on to the specification. */ i++; sign = 1; substring_okay = 0; #define RETURN_ENTRY(e, w) \ return ((e = history_get (w)) ? e->line : (char *)NULL) /* Handle !! case. */ if (string[i] == history_expansion_char) { i++; which = history_base + (history_length - 1); *caller_index = i; RETURN_ENTRY (entry, which); } /* Hack case of numeric line specification. */ if (string[i] == '-') { sign = -1; i++; } if (_rl_digit_p (string[i])) { /* Get the extent of the digits and compute the value. */ for (which = 0; _rl_digit_p (string[i]); i++) which = (which * 10) + _rl_digit_value (string[i]); *caller_index = i; if (sign < 0) which = (history_length + history_base) - which; RETURN_ENTRY (entry, which); } /* This must be something to search for. If the spec begins with a '?', then the string may be anywhere on the line. Otherwise, the string must be found at the start of a line. */ if (string[i] == '?') { substring_okay++; i++; } /* Only a closing `?' or a newline delimit a substring search string. */ for (local_index = i; c = string[i]; i++) { #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { int v; mbstate_t ps; memset (&ps, 0, sizeof (mbstate_t)); /* These produce warnings because we're passing a const string to a function that takes a non-const string. */ _rl_adjust_point ((char *)string, i, &ps); if ((v = _rl_get_char_len ((char *)string + i, &ps)) > 1) { i += v - 1; continue; } } #endif /* HANDLE_MULTIBYTE */ if ((!substring_okay && (whitespace (c) || c == ':' || (history_search_delimiter_chars && member (c, history_search_delimiter_chars)) || string[i] == delimiting_quote)) || string[i] == '\n' || (substring_okay && string[i] == '?')) break; } which = i - local_index; temp = (char *)xmalloc (1 + which); if (which) strncpy (temp, string + local_index, which); temp[which] = '\0'; if (substring_okay && string[i] == '?') i++; *caller_index = i; #define FAIL_SEARCH() \ do { \ history_offset = history_length; xfree (temp) ; return (char *)NULL; \ } while (0) /* If there is no search string, try to use the previous search string, if one exists. If not, fail immediately. */ if (*temp == '\0' && substring_okay) { if (search_string) { xfree (temp); temp = savestring (search_string); } else FAIL_SEARCH (); } search_func = substring_okay ? history_search : history_search_prefix; while (1) { local_index = (*search_func) (temp, -1); if (local_index < 0) FAIL_SEARCH (); if (local_index == 0 || substring_okay) { entry = current_history (); history_offset = history_length; /* If this was a substring search, then remember the string that we matched for word substitution. */ if (substring_okay) { FREE (search_string); search_string = temp; FREE (search_match); search_match = history_find_word (entry->line, local_index); } else xfree (temp); return (entry->line); } if (history_offset) history_offset--; else FAIL_SEARCH (); } #undef FAIL_SEARCH #undef RETURN_ENTRY } /* Function for extracting single-quoted strings. Used for inhibiting history expansion within single quotes. */ /* Extract the contents of STRING as if it is enclosed in single quotes. SINDEX, when passed in, is the offset of the character immediately following the opening single quote; on exit, SINDEX is left pointing to the closing single quote. FLAGS currently used to allow backslash to escape a single quote (e.g., for bash $'...'). */ static void hist_string_extract_single_quoted (string, sindex, flags) char *string; int *sindex, flags; { register int i; for (i = *sindex; string[i] && string[i] != '\''; i++) { if ((flags & 1) && string[i] == '\\' && string[i+1]) i++; } *sindex = i; } static char * quote_breaks (s) char *s; { register char *p, *r; char *ret; int len = 3; for (p = s; p && *p; p++, len++) { if (*p == '\'') len += 3; else if (whitespace (*p) || *p == '\n') len += 2; } r = ret = (char *)xmalloc (len); *r++ = '\''; for (p = s; p && *p; ) { if (*p == '\'') { *r++ = '\''; *r++ = '\\'; *r++ = '\''; *r++ = '\''; p++; } else if (whitespace (*p) || *p == '\n') { *r++ = '\''; *r++ = *p++; *r++ = '\''; } else *r++ = *p++; } *r++ = '\''; *r = '\0'; return ret; } static char * hist_error(s, start, current, errtype) char *s; int start, current, errtype; { char *temp; const char *emsg; int ll, elen; ll = current - start; switch (errtype) { case EVENT_NOT_FOUND: emsg = "event not found"; elen = 15; break; case BAD_WORD_SPEC: emsg = "bad word specifier"; elen = 18; break; case SUBST_FAILED: emsg = "substitution failed"; elen = 19; break; case BAD_MODIFIER: emsg = "unrecognized history modifier"; elen = 29; break; case NO_PREV_SUBST: emsg = "no previous substitution"; elen = 24; break; default: emsg = "unknown expansion error"; elen = 23; break; } temp = (char *)xmalloc (ll + elen + 3); strncpy (temp, s + start, ll); temp[ll] = ':'; temp[ll + 1] = ' '; strcpy (temp + ll + 2, emsg); return (temp); } /* Get a history substitution string from STR starting at *IPTR and return it. The length is returned in LENPTR. A backslash can quote the delimiter. If the string is the empty string, the previous pattern is used. If there is no previous pattern for the lhs, the last history search string is used. If IS_RHS is 1, we ignore empty strings and set the pattern to "" anyway. subst_lhs is not changed if the lhs is empty; subst_rhs is allowed to be set to the empty string. */ static char * get_subst_pattern (str, iptr, delimiter, is_rhs, lenptr) char *str; int *iptr, delimiter, is_rhs, *lenptr; { register int si, i, j, k; char *s; #if defined (HANDLE_MULTIBYTE) mbstate_t ps; #endif s = (char *)NULL; i = *iptr; #if defined (HANDLE_MULTIBYTE) memset (&ps, 0, sizeof (mbstate_t)); _rl_adjust_point (str, i, &ps); #endif for (si = i; str[si] && str[si] != delimiter; si++) #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { int v; if ((v = _rl_get_char_len (str + si, &ps)) > 1) si += v - 1; else if (str[si] == '\\' && str[si + 1] == delimiter) si++; } else #endif /* HANDLE_MULTIBYTE */ if (str[si] == '\\' && str[si + 1] == delimiter) si++; if (si > i || is_rhs) { s = (char *)xmalloc (si - i + 1); for (j = 0, k = i; k < si; j++, k++) { /* Remove a backslash quoting the search string delimiter. */ if (str[k] == '\\' && str[k + 1] == delimiter) k++; s[j] = str[k]; } s[j] = '\0'; if (lenptr) *lenptr = j; } i = si; if (str[i]) i++; *iptr = i; return s; } static void postproc_subst_rhs () { char *new; int i, j, new_size; new = (char *)xmalloc (new_size = subst_rhs_len + subst_lhs_len); for (i = j = 0; i < subst_rhs_len; i++) { if (subst_rhs[i] == '&') { if (j + subst_lhs_len >= new_size) new = (char *)xrealloc (new, (new_size = new_size * 2 + subst_lhs_len)); strcpy (new + j, subst_lhs); j += subst_lhs_len; } else { /* a single backslash protects the `&' from lhs interpolation */ if (subst_rhs[i] == '\\' && subst_rhs[i + 1] == '&') i++; if (j >= new_size) new = (char *)xrealloc (new, new_size *= 2); new[j++] = subst_rhs[i]; } } new[j] = '\0'; xfree (subst_rhs); subst_rhs = new; subst_rhs_len = j; } /* Expand the bulk of a history specifier starting at STRING[START]. Returns 0 if everything is OK, -1 if an error occurred, and 1 if the `p' modifier was supplied and the caller should just print the returned string. Returns the new index into string in *END_INDEX_PTR, and the expanded specifier in *RET_STRING. */ static int history_expand_internal (string, start, end_index_ptr, ret_string, current_line) char *string; int start, *end_index_ptr; char **ret_string; char *current_line; /* for !# */ { int i, n, starting_index; int substitute_globally, subst_bywords, want_quotes, print_only; char *event, *temp, *result, *tstr, *t, c, *word_spec; int result_len; #if defined (HANDLE_MULTIBYTE) mbstate_t ps; memset (&ps, 0, sizeof (mbstate_t)); #endif result = (char *)xmalloc (result_len = 128); i = start; /* If it is followed by something that starts a word specifier, then !! is implied as the event specifier. */ if (member (string[i + 1], ":$*%^")) { char fake_s[3]; int fake_i = 0; i++; fake_s[0] = fake_s[1] = history_expansion_char; fake_s[2] = '\0'; event = get_history_event (fake_s, &fake_i, 0); } else if (string[i + 1] == '#') { i += 2; event = current_line; } else { int quoted_search_delimiter = 0; /* If the character before this `!' is a double or single quote, then this expansion takes place inside of the quoted string. If we have to search for some text ("!foo"), allow the delimiter to end the search string. */ #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { int ch, l; l = _rl_find_prev_mbchar (string, i, MB_FIND_ANY); ch = string[l]; /* XXX - original patch had i - 1 ??? If i == 0 it would fail. */ if (i && (ch == '\'' || ch == '"')) quoted_search_delimiter = ch; } else #endif /* HANDLE_MULTIBYTE */ if (i && (string[i - 1] == '\'' || string[i - 1] == '"')) quoted_search_delimiter = string[i - 1]; event = get_history_event (string, &i, quoted_search_delimiter); } if (event == 0) { *ret_string = hist_error (string, start, i, EVENT_NOT_FOUND); xfree (result); return (-1); } /* If a word specifier is found, then do what that requires. */ starting_index = i; word_spec = get_history_word_specifier (string, event, &i); /* There is no such thing as a `malformed word specifier'. However, it is possible for a specifier that has no match. In that case, we complain. */ if (word_spec == (char *)&error_pointer) { *ret_string = hist_error (string, starting_index, i, BAD_WORD_SPEC); xfree (result); return (-1); } /* If no word specifier, than the thing of interest was the event. */ temp = word_spec ? savestring (word_spec) : savestring (event); FREE (word_spec); /* Perhaps there are other modifiers involved. Do what they say. */ want_quotes = substitute_globally = subst_bywords = print_only = 0; starting_index = i; while (string[i] == ':') { c = string[i + 1]; if (c == 'g' || c == 'a') { substitute_globally = 1; i++; c = string[i + 1]; } else if (c == 'G') { subst_bywords = 1; i++; c = string[i + 1]; } switch (c) { default: *ret_string = hist_error (string, i+1, i+2, BAD_MODIFIER); xfree (result); xfree (temp); return -1; case 'q': want_quotes = 'q'; break; case 'x': want_quotes = 'x'; break; /* :p means make this the last executed line. So we return an error state after adding this line to the history. */ case 'p': print_only++; break; /* :t discards all but the last part of the pathname. */ case 't': tstr = strrchr (temp, '/'); if (tstr) { tstr++; t = savestring (tstr); xfree (temp); temp = t; } break; /* :h discards the last part of a pathname. */ case 'h': tstr = strrchr (temp, '/'); if (tstr) *tstr = '\0'; break; /* :r discards the suffix. */ case 'r': tstr = strrchr (temp, '.'); if (tstr) *tstr = '\0'; break; /* :e discards everything but the suffix. */ case 'e': tstr = strrchr (temp, '.'); if (tstr) { t = savestring (tstr); xfree (temp); temp = t; } break; /* :s/this/that substitutes `that' for the first occurrence of `this'. :gs/this/that substitutes `that' for each occurrence of `this'. :& repeats the last substitution. :g& repeats the last substitution globally. */ case '&': case 's': { char *new_event; int delimiter, failed, si, l_temp, ws, we; if (c == 's') { if (i + 2 < (int)strlen (string)) { #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { _rl_adjust_point (string, i + 2, &ps); if (_rl_get_char_len (string + i + 2, &ps) > 1) delimiter = 0; else delimiter = string[i + 2]; } else #endif /* HANDLE_MULTIBYTE */ delimiter = string[i + 2]; } else break; /* no search delimiter */ i += 3; t = get_subst_pattern (string, &i, delimiter, 0, &subst_lhs_len); /* An empty substitution lhs with no previous substitution uses the last search string as the lhs. */ if (t) { FREE (subst_lhs); subst_lhs = t; } else if (!subst_lhs) { if (search_string && *search_string) { subst_lhs = savestring (search_string); subst_lhs_len = strlen (subst_lhs); } else { subst_lhs = (char *) NULL; subst_lhs_len = 0; } } FREE (subst_rhs); subst_rhs = get_subst_pattern (string, &i, delimiter, 1, &subst_rhs_len); /* If `&' appears in the rhs, it's supposed to be replaced with the lhs. */ if (member ('&', subst_rhs)) postproc_subst_rhs (); } else i += 2; /* If there is no lhs, the substitution can't succeed. */ if (subst_lhs_len == 0) { *ret_string = hist_error (string, starting_index, i, NO_PREV_SUBST); xfree (result); xfree (temp); return -1; } l_temp = strlen (temp); /* Ignore impossible cases. */ if (subst_lhs_len > l_temp) { *ret_string = hist_error (string, starting_index, i, SUBST_FAILED); xfree (result); xfree (temp); return (-1); } /* Find the first occurrence of THIS in TEMP. */ /* Substitute SUBST_RHS for SUBST_LHS in TEMP. There are three cases to consider: 1. substitute_globally == subst_bywords == 0 2. substitute_globally == 1 && subst_bywords == 0 3. substitute_globally == 0 && subst_bywords == 1 In the first case, we substitute for the first occurrence only. In the second case, we substitute for every occurrence. In the third case, we tokenize into words and substitute the first occurrence of each word. */ si = we = 0; for (failed = 1; (si + subst_lhs_len) <= l_temp; si++) { /* First skip whitespace and find word boundaries if we're past the end of the word boundary we found the last time. */ if (subst_bywords && si > we) { for (; temp[si] && whitespace (temp[si]); si++) ; ws = si; we = history_tokenize_word (temp, si); } if (STREQN (temp+si, subst_lhs, subst_lhs_len)) { int len = subst_rhs_len - subst_lhs_len + l_temp; new_event = (char *)xmalloc (1 + len); strncpy (new_event, temp, si); strncpy (new_event + si, subst_rhs, subst_rhs_len); strncpy (new_event + si + subst_rhs_len, temp + si + subst_lhs_len, l_temp - (si + subst_lhs_len)); new_event[len] = '\0'; xfree (temp); temp = new_event; failed = 0; if (substitute_globally) { /* Reported to fix a bug that causes it to skip every other match when matching a single character. Was si += subst_rhs_len previously. */ si += subst_rhs_len - 1; l_temp = strlen (temp); substitute_globally++; continue; } else if (subst_bywords) { si = we; l_temp = strlen (temp); continue; } else break; } } if (substitute_globally > 1) { substitute_globally = 0; continue; /* don't want to increment i */ } if (failed == 0) continue; /* don't want to increment i */ *ret_string = hist_error (string, starting_index, i, SUBST_FAILED); xfree (result); xfree (temp); return (-1); } } i += 2; } /* Done with modfiers. */ /* Believe it or not, we have to back the pointer up by one. */ --i; if (want_quotes) { char *x; if (want_quotes == 'q') x = sh_single_quote (temp); else if (want_quotes == 'x') x = quote_breaks (temp); else x = savestring (temp); xfree (temp); temp = x; } n = strlen (temp); if (n >= result_len) result = (char *)xrealloc (result, n + 2); strcpy (result, temp); xfree (temp); *end_index_ptr = i; *ret_string = result; return (print_only); } /* Expand the string STRING, placing the result into OUTPUT, a pointer to a string. Returns: -1) If there was an error in expansion. 0) If no expansions took place (or, if the only change in the text was the de-slashifying of the history expansion character) 1) If expansions did take place 2) If the `p' modifier was given and the caller should print the result If an error ocurred in expansion, then OUTPUT contains a descriptive error message. */ #define ADD_STRING(s) \ do \ { \ int sl = strlen (s); \ j += sl; \ if (j >= result_len) \ { \ while (j >= result_len) \ result_len += 128; \ result = (char *)xrealloc (result, result_len); \ } \ strcpy (result + j - sl, s); \ } \ while (0) #define ADD_CHAR(c) \ do \ { \ if (j >= result_len - 1) \ result = (char *)xrealloc (result, result_len += 64); \ result[j++] = c; \ result[j] = '\0'; \ } \ while (0) int history_expand (hstring, output) char *hstring; char **output; { register int j; int i, r, l, passc, cc, modified, eindex, only_printing, dquote, flag; char *string; /* The output string, and its length. */ int result_len; char *result; #if defined (HANDLE_MULTIBYTE) char mb[MB_LEN_MAX]; mbstate_t ps; #endif /* Used when adding the string. */ char *temp; if (output == 0) return 0; /* Setting the history expansion character to 0 inhibits all history expansion. */ if (history_expansion_char == 0) { *output = savestring (hstring); return (0); } /* Prepare the buffer for printing error messages. */ result = (char *)xmalloc (result_len = 256); result[0] = '\0'; only_printing = modified = 0; l = strlen (hstring); /* Grovel the string. Only backslash and single quotes can quote the history escape character. We also handle arg specifiers. */ /* Before we grovel forever, see if the history_expansion_char appears anywhere within the text. */ /* The quick substitution character is a history expansion all right. That is to say, "^this^that^" is equivalent to "!!:s^this^that^", and in fact, that is the substitution that we do. */ if (hstring[0] == history_subst_char) { string = (char *)xmalloc (l + 5); string[0] = string[1] = history_expansion_char; string[2] = ':'; string[3] = 's'; strcpy (string + 4, hstring); l += 4; } else { #if defined (HANDLE_MULTIBYTE) memset (&ps, 0, sizeof (mbstate_t)); #endif string = hstring; /* If not quick substitution, still maybe have to do expansion. */ /* `!' followed by one of the characters in history_no_expand_chars is NOT an expansion. */ for (i = dquote = 0; string[i]; i++) { #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { int v; v = _rl_get_char_len (string + i, &ps); if (v > 1) { i += v - 1; continue; } } #endif /* HANDLE_MULTIBYTE */ cc = string[i + 1]; /* The history_comment_char, if set, appearing at the beginning of a word signifies that the rest of the line should not have history expansion performed on it. Skip the rest of the line and break out of the loop. */ if (history_comment_char && string[i] == history_comment_char && (i == 0 || member (string[i - 1], history_word_delimiters))) { while (string[i]) i++; break; } else if (string[i] == history_expansion_char) { if (cc == 0 || member (cc, history_no_expand_chars)) continue; /* If the calling application has set history_inhibit_expansion_function to a function that checks for special cases that should not be history expanded, call the function and skip the expansion if it returns a non-zero value. */ else if (history_inhibit_expansion_function && (*history_inhibit_expansion_function) (string, i)) continue; else break; } /* Shell-like quoting: allow backslashes to quote double quotes inside a double-quoted string. */ else if (dquote && string[i] == '\\' && cc == '"') i++; /* More shell-like quoting: if we're paying attention to single quotes and letting them quote the history expansion character, then we need to pay attention to double quotes, because single quotes are not special inside double-quoted strings. */ else if (history_quotes_inhibit_expansion && string[i] == '"') { dquote = 1 - dquote; } else if (dquote == 0 && history_quotes_inhibit_expansion && string[i] == '\'') { /* If this is bash, single quotes inhibit history expansion. */ flag = (i > 0 && string[i - 1] == '$'); i++; hist_string_extract_single_quoted (string, &i, flag); } else if (history_quotes_inhibit_expansion && string[i] == '\\') { /* If this is bash, allow backslashes to quote single quotes and the history expansion character. */ if (cc == '\'' || cc == history_expansion_char) i++; } } if (string[i] != history_expansion_char) { xfree (result); *output = savestring (string); return (0); } } /* Extract and perform the substitution. */ for (passc = dquote = i = j = 0; i < l; i++) { int tchar = string[i]; if (passc) { passc = 0; ADD_CHAR (tchar); continue; } #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { int k, c; c = tchar; memset (mb, 0, sizeof (mb)); for (k = 0; k < MB_LEN_MAX; k++) { mb[k] = (char)c; memset (&ps, 0, sizeof (mbstate_t)); if (_rl_get_char_len (mb, &ps) == -2) c = string[++i]; else break; } if (strlen (mb) > 1) { ADD_STRING (mb); continue; } } #endif /* HANDLE_MULTIBYTE */ if (tchar == history_expansion_char) tchar = -3; else if (tchar == history_comment_char) tchar = -2; switch (tchar) { default: ADD_CHAR (string[i]); break; case '\\': passc++; ADD_CHAR (tchar); break; case '"': dquote = 1 - dquote; ADD_CHAR (tchar); break; case '\'': { /* If history_quotes_inhibit_expansion is set, single quotes inhibit history expansion. */ if (dquote == 0 && history_quotes_inhibit_expansion) { int quote, slen; flag = (i > 0 && string[i - 1] == '$'); quote = i++; hist_string_extract_single_quoted (string, &i, flag); slen = i - quote + 2; temp = (char *)xmalloc (slen); strncpy (temp, string + quote, slen); temp[slen - 1] = '\0'; ADD_STRING (temp); xfree (temp); } else ADD_CHAR (string[i]); break; } case -2: /* history_comment_char */ if (i == 0 || member (string[i - 1], history_word_delimiters)) { temp = (char *)xmalloc (l - i + 1); strcpy (temp, string + i); ADD_STRING (temp); xfree (temp); i = l; } else ADD_CHAR (string[i]); break; case -3: /* history_expansion_char */ cc = string[i + 1]; /* If the history_expansion_char is followed by one of the characters in history_no_expand_chars, then it is not a candidate for expansion of any kind. */ if (cc == 0 || member (cc, history_no_expand_chars) || (history_inhibit_expansion_function && (*history_inhibit_expansion_function) (string, i))) { ADD_CHAR (string[i]); break; } #if defined (NO_BANG_HASH_MODIFIERS) /* There is something that is listed as a `word specifier' in csh documentation which means `the expanded text to this point'. That is not a word specifier, it is an event specifier. If we don't want to allow modifiers with `!#', just stick the current output line in again. */ if (cc == '#') { if (result) { temp = (char *)xmalloc (1 + strlen (result)); strcpy (temp, result); ADD_STRING (temp); xfree (temp); } i++; break; } #endif r = history_expand_internal (string, i, &eindex, &temp, result); if (r < 0) { *output = temp; xfree (result); if (string != hstring) xfree (string); return -1; } else { if (temp) { modified++; if (*temp) ADD_STRING (temp); xfree (temp); } only_printing = r == 1; i = eindex; } break; } } *output = result; if (string != hstring) xfree (string); if (only_printing) { #if 0 add_history (result); #endif return (2); } return (modified != 0); } /* Return a consed string which is the word specified in SPEC, and found in FROM. NULL is returned if there is no spec. The address of ERROR_POINTER is returned if the word specified cannot be found. CALLER_INDEX is the offset in SPEC to start looking; it is updated to point to just after the last character parsed. */ static char * get_history_word_specifier (spec, from, caller_index) char *spec, *from; int *caller_index; { register int i = *caller_index; int first, last; int expecting_word_spec = 0; char *result; /* The range of words to return doesn't exist yet. */ first = last = 0; result = (char *)NULL; /* If we found a colon, then this *must* be a word specification. If it isn't, then it is an error. */ if (spec[i] == ':') { i++; expecting_word_spec++; } /* Handle special cases first. */ /* `%' is the word last searched for. */ if (spec[i] == '%') { *caller_index = i + 1; return (search_match ? savestring (search_match) : savestring ("")); } /* `*' matches all of the arguments, but not the command. */ if (spec[i] == '*') { *caller_index = i + 1; result = history_arg_extract (1, '$', from); return (result ? result : savestring ("")); } /* `$' is last arg. */ if (spec[i] == '$') { *caller_index = i + 1; return (history_arg_extract ('$', '$', from)); } /* Try to get FIRST and LAST figured out. */ if (spec[i] == '-') first = 0; else if (spec[i] == '^') { first = 1; i++; } else if (_rl_digit_p (spec[i]) && expecting_word_spec) { for (first = 0; _rl_digit_p (spec[i]); i++) first = (first * 10) + _rl_digit_value (spec[i]); } else return ((char *)NULL); /* no valid `first' for word specifier */ if (spec[i] == '^' || spec[i] == '*') { last = (spec[i] == '^') ? 1 : '$'; /* x* abbreviates x-$ */ i++; } else if (spec[i] != '-') last = first; else { i++; if (_rl_digit_p (spec[i])) { for (last = 0; _rl_digit_p (spec[i]); i++) last = (last * 10) + _rl_digit_value (spec[i]); } else if (spec[i] == '$') { i++; last = '$'; } #if 0 else if (!spec[i] || spec[i] == ':') /* check against `:' because there could be a modifier separator */ #else else /* csh seems to allow anything to terminate the word spec here, leaving it as an abbreviation. */ #endif last = -1; /* x- abbreviates x-$ omitting word `$' */ } *caller_index = i; if (last >= first || last == '$' || last < 0) result = history_arg_extract (first, last, from); return (result ? result : (char *)&error_pointer); } /* Extract the args specified, starting at FIRST, and ending at LAST. The args are taken from STRING. If either FIRST or LAST is < 0, then make that arg count from the right (subtract from the number of tokens, so that FIRST = -1 means the next to last token on the line). If LAST is `$' the last arg from STRING is used. */ char * history_arg_extract (first, last, string) int first, last; const char *string; { register int i, len; char *result; int size, offset; char **list; /* XXX - think about making history_tokenize return a struct array, each struct in array being a string and a length to avoid the calls to strlen below. */ if ((list = history_tokenize (string)) == NULL) return ((char *)NULL); for (len = 0; list[len]; len++) ; if (last < 0) last = len + last - 1; if (first < 0) first = len + first - 1; if (last == '$') last = len - 1; if (first == '$') first = len - 1; last++; if (first >= len || last > len || first < 0 || last < 0 || first > last) result = ((char *)NULL); else { for (size = 0, i = first; i < last; i++) size += strlen (list[i]) + 1; result = (char *)xmalloc (size + 1); result[0] = '\0'; for (i = first, offset = 0; i < last; i++) { strcpy (result + offset, list[i]); offset += strlen (list[i]); if (i + 1 < last) { result[offset++] = ' '; result[offset] = 0; } } } for (i = 0; i < len; i++) xfree (list[i]); xfree (list); return (result); } static int history_tokenize_word (string, ind) const char *string; int ind; { register int i; int delimiter, nestdelim, delimopen; i = ind; delimiter = nestdelim = 0; if (member (string[i], "()\n")) { i++; return i; } if (member (string[i], "<>;&|$")) { int peek = string[i + 1]; if (peek == string[i] && peek != '$') { if (peek == '<' && string[i + 2] == '-') i++; else if (peek == '<' && string[i + 2] == '<') i++; i += 2; return i; } else if ((peek == '&' && (string[i] == '>' || string[i] == '<')) || (peek == '>' && string[i] == '&')) { i += 2; return i; } /* XXX - separated out for later -- bash-4.2 */ else if ((peek == '(' && (string[i] == '>' || string[i] == '<')) || /* ) */ (peek == '(' && string[i] == '$')) /*)*/ { i += 2; delimopen = '('; delimiter = ')'; nestdelim = 1; goto get_word; } #if 0 else if (peek == '\'' && string[i] == '$') { i += 2; /* XXX */ return i; } #endif if (string[i] != '$') { i++; return i; } } /* same code also used for $(...)/<(...)/>(...) above */ if (member (string[i], "!@?+*")) { int peek = string[i + 1]; if (peek == '(') /*)*/ { /* Shell extended globbing patterns */ i += 2; delimopen = '('; delimiter = ')'; /* XXX - not perfect */ nestdelim = 1; } } get_word: /* Get word from string + i; */ if (delimiter == 0 && member (string[i], HISTORY_QUOTE_CHARACTERS)) delimiter = string[i++]; for (; string[i]; i++) { if (string[i] == '\\' && string[i + 1] == '\n') { i++; continue; } if (string[i] == '\\' && delimiter != '\'' && (delimiter != '"' || member (string[i], slashify_in_quotes))) { i++; continue; } /* delimiter must be set and set to something other than a quote if nestdelim is set, so these tests are safe. */ if (nestdelim && string[i] == delimopen) { nestdelim++; continue; } if (nestdelim && string[i] == delimiter) { nestdelim--; if (nestdelim == 0) delimiter = 0; continue; } if (delimiter && string[i] == delimiter) { delimiter = 0; continue; } if (delimiter == 0 && (member (string[i], history_word_delimiters))) break; if (delimiter == 0 && member (string[i], HISTORY_QUOTE_CHARACTERS)) delimiter = string[i]; } return i; } static char * history_substring (string, start, end) const char *string; int start, end; { register int len; register char *result; len = end - start; result = (char *)xmalloc (len + 1); strncpy (result, string + start, len); result[len] = '\0'; return result; } /* Parse STRING into tokens and return an array of strings. If WIND is not -1 and INDP is not null, we also want the word surrounding index WIND. The position in the returned array of strings is returned in *INDP. */ static char ** history_tokenize_internal (string, wind, indp) const char *string; int wind, *indp; { char **result; register int i, start, result_index, size; /* If we're searching for a string that's not part of a word (e.g., " "), make sure we set *INDP to a reasonable value. */ if (indp && wind != -1) *indp = -1; /* Get a token, and stuff it into RESULT. The tokens are split exactly where the shell would split them. */ for (i = result_index = size = 0, result = (char **)NULL; string[i]; ) { /* Skip leading whitespace. */ for (; string[i] && whitespace (string[i]); i++) ; if (string[i] == 0 || string[i] == history_comment_char) return (result); start = i; i = history_tokenize_word (string, start); /* If we have a non-whitespace delimiter character (which would not be skipped by the loop above), use it and any adjacent delimiters to make a separate field. Any adjacent white space will be skipped the next time through the loop. */ if (i == start && history_word_delimiters) { i++; while (string[i] && member (string[i], history_word_delimiters)) i++; } /* If we are looking for the word in which the character at a particular index falls, remember it. */ if (indp && wind != -1 && wind >= start && wind < i) *indp = result_index; if (result_index + 2 >= size) result = (char **)xrealloc (result, ((size += 10) * sizeof (char *))); result[result_index++] = history_substring (string, start, i); result[result_index] = (char *)NULL; } return (result); } /* Return an array of tokens, much as the shell might. The tokens are parsed out of STRING. */ char ** history_tokenize (string) const char *string; { return (history_tokenize_internal (string, -1, (int *)NULL)); } /* Free members of WORDS from START to an empty string */ static void freewords (words, start) char **words; int start; { register int i; for (i = start; words[i]; i++) xfree (words[i]); } /* Find and return the word which contains the character at index IND in the history line LINE. Used to save the word matched by the last history !?string? search. */ static char * history_find_word (line, ind) char *line; int ind; { char **words, *s; int i, wind; words = history_tokenize_internal (line, ind, &wind); if (wind == -1 || words == 0) { if (words) freewords (words, 0); FREE (words); return ((char *)NULL); } s = words[wind]; for (i = 0; i < wind; i++) xfree (words[i]); freewords (words, wind + 1); xfree (words); return s; } ������������gdb-doc-7.6.2/readline/rlwinsize.h������������������������������������������������������������������0000644�0001750�0001750�00000004235�12250770610�016051� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* rlwinsize.h -- an attempt to isolate some of the system-specific defines for `struct winsize' and TIOCGWINSZ. */ /* Copyright (C) 1997-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #if !defined (_RLWINSIZE_H_) #define _RLWINSIZE_H_ #if defined (HAVE_CONFIG_H) # include "config.h" #endif /* Try to find the definitions of `struct winsize' and TIOGCWINSZ */ #if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ) # include <sys/ioctl.h> #endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */ #if defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL) # include <termios.h> #endif /* STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */ /* Not in either of the standard places, look around. */ #if !defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL) # if defined (HAVE_SYS_STREAM_H) # include <sys/stream.h> # endif /* HAVE_SYS_STREAM_H */ # if defined (HAVE_SYS_PTEM_H) /* SVR4.2, at least, has it here */ # include <sys/ptem.h> # define _IO_PTEM_H /* work around SVR4.2 1.1.4 bug */ # endif /* HAVE_SYS_PTEM_H */ # if defined (HAVE_SYS_PTE_H) /* ??? */ # include <sys/pte.h> # endif /* HAVE_SYS_PTE_H */ #endif /* !STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */ #if defined (M_UNIX) && !defined (_SCO_DS) && !defined (tcflow) # define tcflow(fd, action) ioctl(fd, TCXONC, action) #endif #endif /* _RL_WINSIZE_H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/xmalloc.c��������������������������������������������������������������������0000644�0001750�0001750�00000004014�12250770610�015450� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* xmalloc.c -- safe versions of malloc and realloc */ /* Copyright (C) 1991-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) #include <config.h> #endif #include <stdio.h> #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #include "xmalloc.h" /* **************************************************************** */ /* */ /* Memory Allocation and Deallocation. */ /* */ /* **************************************************************** */ static void memory_error_and_abort (fname) char *fname; { fprintf (stderr, "%s: out of virtual memory\n", fname); exit (2); } /* Return a pointer to free()able block of memory large enough to hold BYTES number of bytes. If the memory cannot be allocated, print an error message and abort. */ PTR_T xmalloc (bytes) size_t bytes; { PTR_T temp; temp = malloc (bytes); if (temp == 0) memory_error_and_abort ("xmalloc"); return (temp); } PTR_T xrealloc (pointer, bytes) PTR_T pointer; size_t bytes; { PTR_T temp; temp = pointer ? realloc (pointer, bytes) : malloc (bytes); if (temp == 0) memory_error_and_abort ("xrealloc"); return (temp); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/ChangeLog.gdb����������������������������������������������������������������0000644�0001750�0001750�00000140613�12250773212�016161� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������2012-10-18 Joel Brobecker <brobecker@adacore.com> * terminal.c: Remove duplicate includes of windows.h and wincon.h. (_rl_get_screen_size): Remove redundant code for MinGW getting the console size from the Windows API. 2012-02-24 Pierre Muller <muller@ics.u-strasbg.fr> * signals.c (_rl_block_sigwinch, _rl_release_sigwinch): Add conditional SIGWINCH around functions. 2011-05-11 Sterling Augustine <saugustine@google.com> * complete.c (rl_completion_matches): Undo inadvertant checkin. 2011-06-29 Jan Kratochvil <jan.kratochvil@redhat.com> Avoid free from a signal handler. * Makefile.in (xfree.o): Add readline.h. * xfree.c: Include stdio.h and readline.h. (xfree): Return on RL_STATE_SIGHANDLER. * xmalloc.h (xfree): New definition. 2011-05-11 Jan Kratochvil <jan.kratochvil@redhat.com> Workaround gdb.base/completion.exp regression on readline-6.2. * complete.c (get_y_or_n): Disable the return on RL_STATE_CALLBACK. 2011-05-11 Jan Kratochvil <jan.kratochvil@redhat.com> Imported readline 6.2, and upstream patch 001. * configure: Regenerate. 2011-03-04 Michael Snyder <msnyder@vmware.com> * bind.c (rl_function_dumper): Free allocated memory. 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * configure: Regenerate. * configure.in: m4_include toplevel config/override.m4. * configure: Regenerate. 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * Makefile.in (datarootdir): New variable. * doc/Makefile.in (datarootdir): New variable. * shlib/Makefile.in (datarootdir): New variable. 2009-04-17 Carlos O'Donell <carlos@codesourcery.com> * Makefile.in: Add html target. Add dummy install-html and install-pdf targets. 2008-08-10 Pedro Alves <pedro@codesourcery.com> Build fixes for DJGPP. * signals.c (rl_set_sighandler): Guard access to SIGWINCH. * wcwidth.c [__GO32__]: Include wctype.h before wchar.h. 2008-03-24 Jan Kratochvil <jan.kratochvil@redhat.com> PR gdb/544 * rltty.c (block_sigint, release_sigint): Rename to... (_rl_block_sigint, _rl_release_sigint): ...these and make them global. * rltty.h (_rl_block_sigint, _rl_release_sigint): New prototypes. * display.c (rl_redisplay): Wrap the function by the calls to _RL_BLOCK_SIGINT and _RL_RELEASE_SIGINT. 2007-09-01 Daniel Jacobowitz <dan@codesourcery.com> PR gdb/2138 From readline 5.2: * configure.in (CROSS_COMPILE): Initialize to empty. * configure: Regenerated. 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com> * Makefile.in: Add dummy "pdf" target. 2006-11-13 Denis Pilat <denis.pilat@st.com> * terminal.c (_rl_get_screen_size): use wr and wc variable to store window size. 2006-10-21 Ulrich Weigand <uweigand@de.ibm.com> * callback.c: Include "xmalloc.h". * Makefile.in: Add dependency. 2006-04-24 Daniel Jacobowitz <dan@codesourcery.com> Imported readline 5.1, and upstream patches 001-004. 2006-03-21 Denis Pilat <denis.pilat@st.com> * histfile.c (read_history_range): Remove '\r' character from history lines. 2005-02-10 Denis Pilat <denis.pilat@st.com> * readline/terminal.c (_rl_get_screen_size): Get console size from the Windows API when compiling with MinGW. 2005-07-25 Mark Mitchell <mark@codesourcery.com> * input.c (rl_getc): Use getch to read console input on Windows. * readline.c (bind_arrow_keys_internal): Translate Windows keysequences into ANSI key sequences. * rldefs.h (NO_TTY_DRIVER): Define on MinGW. * rltty.c: Conditionalize on NO_TTY_DRIVER throughout. 2005-07-03 Mark Kettenis <kettenis@gnu.org> From Martin Simmons: * configure.in: Check for getpwnam instead of getpwname. * configure: Regenerate. 2005-05-09 Mark Mitchell <mark@codesourcery.com> * aclocal.m4: Use AC_TRY_LINK to check for mbstate_t. * complete.c (pwd.h): Guard with HAVE_PWD_H. (getpwent): Guard with HAVE_GETPWENT. (rl_username_completion_function): Guard use of getpwent. (endpwent): Likewise. * config.h.in (HAVE_FCNTL): New macro. (HAVE_GETPWENT): Likewise. (HAVE_GETPWNAM): Likewise. (HAVE_GETPWUID): Likewise. (HAVE_KILL): Likewise. (HAVE_PWD_H): Likewise. * configure: Regenerated. * configure.in: Handle MinGW when cross compiling. Check for getpwnam, getpwent, getpwuid, kill, and pwd.h. * display.c (rl_clear_screen): Treat Windows like DOS. (insert_some_chars): Likewise. (delete_chars): Likewise. * shell.c (pwd.h): Guard with HAVE_PWD_H. (getpwuid): Guard with HAVE_GETPWUID. (sh_unset_nodelay_mode): Guard use of fnctl with HAVE_FNCTL_H. * signals.c (rl_signal_handler): Don't use SIGALRM or SIGQUIT if not defined. Use "raise" if "kill" is not available. (rl_set_signals): Don't set handlers for SIGQUIT or SIGALRM if they are not defined. (rl_clear_signals): Likewise. * tilde.c (pwd.h): Guard with HAVE_PWD_H. (getpwuid): Guard declaration with HAVE_GETPWUID. (getpwnam): Guard declaration with HAVE_GETPWNAM. (tilde_expand_word): Guard use of getpwnam with HAVE_GETPWNAM. 2004-02-19 Andrew Cagney <cagney@redhat.com> * config.guess: Update from version 2003-06-12 to 2004-02-16. * config.sub: Update from version 2003-06-13 to 2004-02-16. 2004-01-27 Elena Zannoni <ezannoni@redhat.com> Merge in official patches to readline-4.3 from ftp://ftp.cwru.edu/pub/bash/readline-4.3-patches: NOTE: Patch-ID readline-43-004 was already applied (see below). * bind.c (rl_generic_bind): Pressing certain key sequences causes an infinite loop in _rl_dispatch_subseq with the `key' argument set to 256. This eventually causes bash to exceed the stack size limit and crash with a segmentation violation. Patch-ID: readline43-001. * readline.c (_rl_dispatch_subseq): Repeating an edit in vi-mode with `.' does not work. Patch-ID: readline43-002. * mbutil.c (_rl_get_char_len, _rl_compare_chars, _rl_adjust_point): When in a locale with multibyte characters, the readline display updater will occasionally cause a segmentation fault when attempting to compute the length of the first multibyte character on the line. Patch-ID: readline43-003. * vi_mode.c (_rl_vi_change_mbchar_case): Using the vi editing mode's case-changing commands in a locale with multibyte characters will cause garbage characters to be inserted into the editing buffer. Patch-ID: readline43-005. 2003-12-28 Eli Zaretskii <eliz@elta.co.il> * readline.c (rl_save_state, rl_restore_state): Support systems that don't define SIGWINCH. 2003-12-25 Eli Zaretskii <eliz@elta.co.il> * terminal.c (_rl_get_screen_size) [__DJGPP__]: Compute the screen width and height using console I/O. (_rl_init_terminal_io) [__MSDOS__]: Zero out all the _rl_term_* variables. Convert to _rl_* naming scheme. (_rl_set_cursor) [__MSDOS__]: Ifdef away this function. 2003-12-23 Eli Zaretskii <eliz@elta.co.il> * display.c (_rl_move_vert) [__MSDOS__]: Don't use undeclared variable `l'. Use `delta' instead recomputing its value anew. Assign -delta to i instead of the other way around. 2003-12-11 Michael Chastain <mec.gnu@mindspring.com> * rlmbutil.h: Require HAVE_MBSTATE_T for HANDLE_MULTIBYTE. Revert requirement of HAVE_MBRTOWC. Delete macro definitions that attempted to fake mbstate_t if HAVE_MBSRTOCWS is defined and HAVE_MBSTATE_T is not defined. 2003-06-14 H.J. Lu <hongjiu.lu@intel.com> * support/config.guess: Update to 2003-06-12 version. * support/config.sub: Update to 2003-06-13 version. 2003-05-25 Mark Kettenis <kettenis@gnu.org> * aclocal.m4: Don't add wcwidth.o if we don't have wchar.h. * configure: Regenerate. 2003-05-13 Andreas Jaeger <aj@suse.de> * support/config.guess: Update to 2003-05-09 version. * support/config.sub: Update to 2003-05-09 version. 2003-03-03 Joel Brobecker <brobecker@gnat.com> * aclocal.m4: Add check for mbrtowc. * config.h.in: Regenerate. * configure: Regenerate. * rlmbutil.h: Disable multi-byte if mbrtowc is not defined. 2003-03-03 Kris Warkentin <kewarken@qnx.com> * aclocal.m4: Cause wcwidth check to substitute HAVE_WCWIDTH for building. * Makefile.in: Add wcwidth object to lib if required. * shlib/Makefile.in: Likewise. * configure: Regenerate. 2003-01-09 Michael Chastain <mec@shout.net> From Chet Ramey, <chet@po.cwru.edu>, the readline maintainer: ftp://ftp.cwru.edu/pub/bash/readline-4.3-patches/readline43-004 * display.c: Fix perverse screen refresh with UTF-8. When running in a locale with multibyte characters, the readline display updater will use carriage returns when drawing the line, overwriting any partial output already on the screen and not terminated by a newline. Patch-ID: readline43-004 2003-01-08 Chris Demetriou <cgd@broadcom.com> * config.guess: Update to 2003-01-03 version. * config.sub: Update to 2003-01-03 version. 2002-12-16 Christopher Faylor <cgf@redhat.com> * configure.in: Remove --enable-shared option. It shouldn't be used for gdb. * configure: Regenerate. 2002-12-16 Christopher Faylor <cgf@redhat.com> * config/cygwin.cache: Prime mbstate_t. 2002-12-06 Elena Zannoni <ezannoni@redhat.com> Import of readline 4.3. NB: This import includes those gdb local changes that aren't in the official readline sources. * compat.c, mbutil.c, misc.c, rlmbutil.h, rltypedefs.h, text.c, doc/history.0, doc/history.3, support/wcwidth.c, examples/readlinebuf.h, examples/rlcat.c: New files. * CHANGELOG, CHANGES, INSTALL, MANIFEST, Makefile.in, README, aclocal.m4, ansi_stdlib.h, bind.c, callback.c, chardefs.h, complete.c, config.h.in, configure, configure.in, display.c, emacs_keymap.c, funmap.c, histexpand.c, histfile.c, histlib.h, history.c, history.h, histsearch.c, input.c, isearch.c, keymaps.c, keymaps.h, kill.c, macro.c, nls.c, parens.c, posixdir.h, readline.c, readline.h, rlconf.h, rldefs.h, rlprivate.h, rlshell.h, rlstdc.h, rltty.c, savestring.c, search.c, shell.c, signals.c, terminal.c, tilde.c, tilde.h, undo.c, util.c, vi_keymap.c, vi_mode.c, xmalloc.c, xmalloc.h, doc/Makefile.in, doc/hist.texinfo, doc/hstech.texinfo, doc/hsuser.texinfo, doc/manvers.texinfo, doc/readline.3, doc/rlman.texinfo, doc/rltech.texinfo, doc/rluser.texinfo doc/rluserman.texinfo, doc/texi2dvi, doc/texi2html, shlib/Makefile.in, support/install.sh, support/mkdirs, support/mkdist, support/shlib-install, support/shobj-conf, examples/Inputrc, examples/Makefile.in, examples/fileman.c, examples/histexamp.c, examples/manexamp.c, examples/rl.c, examples/rlfe.c, examples/rltest.c, examples/rlversion.c: Modified files. 2002-08-23 Andrew Cagney <ac131313@redhat.com> * support/config.guess: Import version 2002-08-23. * support/config.sub: Import version 2002-08-22. 2002-07-19 Chris Demetriou <cgd@broadcom.com> * support/config.guess: Update from ../config.guess. * support/config.sub: Update from ../config.sub. 2002-02-24 Elena Zannoni <ezannoni@redhat.com> * ChangeLog.gdb: Renamed from ChangeLog.Cygnus. 2002-02-24 Daniel Jacobowitz <drow@mvista.com> * support/config.guess: Import from master sources, rev 1.232. * support/config.sub: Import from master sources, rev 1.246. 2002-02-01 Ben Elliston <bje@redhat.com> * config.guess: Import from master sources, rev 1.229. * config.sub: Import from master sources, rev 1.240. 2002-01-17 H.J. Lu (hjl@gnu.org) * support/config.guess: Import from master sources, rev 1.225. * support/config.sub: Import from master sources, rev 1.238. 2001-07-20 Andrew Cagney <ac131313@redhat.com> * support/config.guess: Update using ../config.sub. 2001-07-16 Andrew Cagney <ac131313@redhat.com> * support/config.sub: Update using ../config.sub. 2001-06-15 Elena Zannoni <ezannoni@redhat.com> * configure.in: Add -fsigned-char to LOCAL_CFLAGS for Linux running on the IBM S/390. * configure: Ditto. 2001-01-07 Michael Sokolov <msokolov@ivan.Harhan.ORG> * rltty.c (save_tty_chars): Fix compilation-stopping typo. 2000-07-10 Eli Zaretskii <eliz@is.elta.co.il> * terminal.c (_rl_get_screen_size) [__DJGPP__]: Determine screen size via DJGPP-specific calls. (_rl_init_terminal_io) [__MSDOS__]: DJGPP-specific terminal initialization. (_rl_backspace) [__MSDOS__]: Don't call tputs. (ding) [__MSDOS__]: Use DJGPP-specific calls to support visible bell. * display.c (_rl_move_vert) [__MSDOS__]: Support cursor movement upwards with DJGPP-specific calls. (_rl_clear_to_eol) [__MSDOS__]: Don't call tputs. (_rl_clear_screen) [__MSDOS__]: Support clear-screen with DJGPP-specific calls. (insert_some_chars) [__MSDOS__]: Don't call tputs. (delete_chars) [__MSDOS__]: Don't call tputs. 2000-07-08 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * readline/readline.h: Ifdef out the export of savestring(). It should not have been in the distribution. 2000-07-07 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * Import of readline 4.1. Locally modified files: Makefile.in, configure.in, configure (regenerated), config.h.in (regenerated), rltty.c, shell.c signals.c. Locally added files: acconfig.h, config/*, config.h.bot, cross-build/*, doc/inc-hit.texinfo. New files: USAGE, rlprivate.h, rlshell.h, xmalloc.h. 2000-03-16 Eli Zaretskii <eliz@is.elta.co.il> * support/shobj-conf: Shared libs are unsupported on MSDOS. * bind.c (_rl_read_file): Open files in binary mode. Strip CR characters after reading the file. (rl_re_read_init_file, rl_read_init_file): Allow for _inputrc on DOS. * complete.c (username_completion_function): Don't bypass getpw* function calls for DJGPP. (Filename_completion_function): Handle d:foo/bar file names. * display.c (_rl_move_vert) [__GO32__]: fflush the stream, to make sure cursor position is up to date. (_rl_clear_screen) [__GO32__]: Clear screen and home the cursor. (insert_some_characters, delete_characters) [__DJGPP__]: Don't use memcpy. * histfile.c (read_history_range, history_truncate_file) (history_do_write) [__MSDOS__]: Allow for underscore instead of the leading dot in file names. * input.c: Don't use GO32-specific workarounds if HAVE_SELECT or HAVE_TERMIOS_H are defined. * readline.c: Don't disable signals if __DJGPP__ is defined. * rltty.c: Don't disable signals and don't bypass termios code for DJGPP (if HAVE_TERMIOS_H is defined). * signals.c: Don't disable signals for DJGPP. * terminal.c (_rl_get_screen_size) [__DJGPP__]: Initialize screen dimensions. (ding) [__DJGPP__]: Support visual bell. 1999-08-13 Elena Zannoni <ezannoni@kwikemart.cygnus.com> From Philippe De Muyter <phdm@macqel.be> * shell.c (stdio.h): File included, for definition of NULL. * readline/rltty.c (get_tty_settings): Conditionalize call to set_winsize on TIOGWINSZ. 1999-07-30 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * Imported Readline 4.0. Integrated all the Cygnus local changes since last import. New files: rlstdc.h, savestring.c, shlib directory, doc/manvers.texinfo, examples/rlversion.c, support/install-shlib, support/shobj-conf. Removed files: MANIFEST.doc, doc/inc-hist.texi. 1999-07-13 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * acconfig.h: Fix typo: it's GWINSZ_IN_SYS_IOCTL, not TIOCGWINSZ_IN_SYS_IOCTL. * config.h.in: Regenerate with autoheader. 1999-04-27 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * ChangeLog.Cygnus: new file. It is the old Changelog. * ChangeLog: removed. It was conflicting with CHANGELOG on Windows. 1999-04-22 Jason Molenda (jsm@bugshack.cygnus.com) * Makefile.in (install): Make comment about this change more explicit. 1999-04-22 Jason Molenda (jsm@bugshack.cygnus.com) * Makefile.in (install): Don't install the final libreadline.a or .h files. Tue Mar 23 10:56:08 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com> Patches from Robert Hoehne <robert.hoehne@gmx.net>: * display.c: Change some terminal calls to work on DJGPP. * terminal.c: Likewise. * Makefile.in: Remove . from the VPATH directive. Tue Mar 9 14:58:13 1999 Geoffrey Noer <noer@cygnus.com> * support/config.sub: Recognize cygwin*, not just cygwin32. Tue Feb 9 10:38:57 1999 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * configure.in: Do not use the ./support directory. * configure: Regenerate. Wed Jan 6 12:24:19 1999 Christopher Faylor <cgf@cygnus.com> * configure.in: Use LOCAL_CFLAGS rather than CFLAGS for searching libtermcap directory. * configure: Regenerate. Thu Dec 31 12:07:01 1998 Christopher Faylor <cgf@cygnus.com> * configure.in: Search devo libtermcap directory for termcap.h when compiling for cygwin. * configure: Regenerated. 1998-12-30 Michael Meissner <meissner@cygnus.com> * Makefile.in (install): Only try to copy libreadline.a and libhistory.a if they exist. Tue Dec 29 23:49:20 1998 Christopher Faylor <cgf@cygnus.com> * cross-build/cygwin.cache: Add a couple more known settings. * configure.in: Fix typo. * configure: Regenerated. Tue Dec 29 18:11:28 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * cross-build: new directory. * cross-build/cygwin.cache: new file. Used for Cygwin cross builds. * configure.in: added tests for cross-build for Cygwin. 1998-12-24 Jason Molenda (jsm@bugshack.cygnus.com) * Makefile.in: Add CYGNUS LOCAL comment. * acconfig.h: Add missing defines. * config.h.bot: Add missing content. * configure, config.h.in: Regenerated. Wed Dec 23 16:21:41 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * Makefile.in: comment out the rule to rebuild configure by running autoconf. Tue Dec 22 10:00:30 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * shell.c (savestring): ifdef'd it out. * Imported new version of Readline 2.2.1. Removed all the Cygnus local changes. New files: acconfig.h, aclocal.m4, ansi_stdlib.h, callback.c, config.h.in, configure, histexpand.c, histfile.c, histlib.h, histsearch.c, input.c, kill.c, macro.c, nls.c, posixdir.h, posixjmp.h, posixstat.h, rlconf.h, rltty.h, rlwinsize.h, shell.c, tcap.h, terminal.c, undo.c, util.c, support directory. Removed files: sysdep*, config directory. Fri Dec 4 15:25:41 1998 David Taylor <taylor@texas.cygnus.com> The following changes were made by Jim Blandy <jimb@zwingli.cygnus.com> and David Taylor <taylor@texas.cygnus.com> as part of a project to merge in changes made by HP; HP did not create ChangeLog entries. * config/mp-enable-tui: New file. (TUI_CFLAGS): Search devo's include directory, as long as we're totally ruining modularity. (INCLUDE_SRCDIR): New var. (GDB_TUI_SRCDIR): Fix syntax error. * configure.in: Check the --enable-tui flag; if it's set, include a makefile fragment that #defines TUI and adds the needed #include directories. (*-*-hpux*): New host; use sysdep-hpux.h. * Makefile.in (.c.o): Check the variable set in the makefile fragment above. * display.c (term_goto): declare it. (insert_some_chars): set it. (delete_chars): set it. * readline.c: add tui include files surrounded by TUI. (rl_reset): new function, move some of rl_abort functionality to here. (rl_abort): call rl_reset. (rl_getc): tui changes. (init_terminal_io): tui changes. * readline.h (tui_version, fputc_unfiltered, fputs_unfiltered, tui_tputs): declare if TUI is defined. * rltty.c (prepare_terminal_settings): additional comment. * signals.c: add tui include files surrounded by TUI. move #if and #endif to column 1 so HP's compiler will accept them. Remove declaration of tuiDoAndReturnToTop since it's declared in tui.h. (rl_handle_sigwinch): call tuiDoAndReturnToTop if TUI defined. (rl_handle_sigwinch_on_clear): define if TUI defined. (rl_set_signals): if TUI, avoid infinite recursion. (rl_clear_signals): install rl_handle_sigwinch_on_clear. * sysdep-hpux.h: New file. Mon Nov 2 15:26:33 1998 Geoffrey Noer <noer@cygnus.com> * configure.in: Check cygwin* instead of cygwin32*. Tue Jul 28 09:43:27 1998 Jeffrey A Law (law@cygnus.com) * sysdep-hpux11.h: New file. * configure.in (*-*-*-hpux11*): Use sysdep-hpux11.h. Thu Jul 23 17:48:21 1998 Ian Lance Taylor <ian@cygnus.com> * configure.bat: Remove obsolete file. * examples/configure.bat: Remove obsolete file. Wed May 13 13:41:53 1998 Ian Lance Taylor <ian@cygnus.com> * sysdep-6irix.h: New file. * configure.in (*-*-irix6*): New host; use sysdep-6irix.h. * Makefile.in (isearch.o, search.o): Depend upon sysdep.h. (Makefile): Depend upon $(srcdir)/configure.in. Thu Apr 9 11:59:38 1998 Ian Dall (<Ian.Dall@dsto.defence.gov.au> * configure.in (host==netbsd): Include config/mh-bsd44. * config/mh-bsd44: New file. Wed Dec 3 16:48:20 1997 Michael Snyder (msnyder@cleaver.cygnus.com) * rltty.c: fix typos. Tue Oct 8 08:59:24 1996 Stu Grossman (grossman@critters.cygnus.com) * tilde.c (tilde_word_expand): __MSDOS___ -> __MSDOS__ Sat Oct 05 11:24:34 1996 Mark Alexander <marka@cygnus.com> * rldefs.h: On Linux, include <termios.h> to fix compile error in <termcap.h>. Wed Sep 4 18:06:51 1996 Stu Grossman (grossman@critters.cygnus.com) * rldefs.h: Enable HANDLE_SIGNALS for cygwin32. Thu Aug 29 16:59:45 1996 Michael Meissner <meissner@tiktok.cygnus.com> * configure.in (i[345]86-*-*): Recognize i686 for pentium pro. Fri Aug 16 17:49:57 1996 Stu Grossman (grossman@critters.cygnus.com) * complete.c: Include <pwd.h> if not DOS, and if cygwin32 or not win32. * configure.in: Add test for *-*-cygwin32* to use config/mh-posix. * readline.c: Move decl of tgetstr to rldefs.h. * (_rl_set_screen_size): Remove redundant ifdef MINIMALs. * rldefs.h: Don't do MINIMAL for cygwin32. Cygwin32 now uses full-blown readline, except for termcap. Sun Aug 11 21:06:26 1996 Stu Grossman (grossman@critters.cygnus.com) * rldefs.c: Get rid of define of SIGALRM if _WIN32 or __MSDOS__. * Don't define ScreenCols/ScreenRows/... if cygwin32. * sysdep-norm.h: Don't include <malloc.h> if cygwin32. Sun Aug 11 14:59:09 1996 Fred Fish <fnf@cygnus.com> * rldefs.h: If __osf__is defined, include <termio.h> instead of <sgtty.h>. Fri Aug 9 08:54:26 1996 Stu Grossman (grossman@critters.cygnus.com) * bind.c complete.c history.c readline.c: Don't include sys/file.h. * complete.c display.c parens.c readline.c rldefs.h rltty.c signals.c tilde.c: Change refs to _MSC_VER and __WIN32__ to _WIN32. * signals.c (rl_signal_handler): Ifdef out kill if _WIN32. * sysdep-norm.h: Ifdef out include of dirent.h if _WIN32. Include malloc.h if _WIN32. Thu Jul 18 15:59:35 1996 Michael Meissner <meissner@tiktok.cygnus.com> * rldefs.h (sys/uio.h) Before sys/stream.h is included under AIX, include sys/uio.h, which prevents an undefined structure used in a prototype message from being generated. Tue Jun 25 23:05:55 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) * Makefile.in (datadir): Set to $(prefix)/share. (docdir): Removed. Sun May 26 15:14:42 1996 Fred Fish <fnf@cygnus.com> From: David Mosberger-Tang <davidm@azstarnet.com> * sysdep-linux.h: New file. * display.c: Add include of "sysdep.h" to get HAVE_VARARGS_H. * configure.in: Change pattern i[345]86-*-linux* into *-*-linux* to support non-x86 based Linux platforms. Sun Apr 7 22:06:11 1996 Fred Fish <fnf@cygnus.com> From: Miles Bader <miles@gnu.ai.mit.edu> * config/mh-gnu: New file. * configure.in (*-*-gnu*): New host. Sun Apr 7 13:21:51 1996 Fred Fish <fnf@cygnus.com> From: Robert Lipe <robertl@dgii.com> * configure.in: SCO OpenServer 5 (a.k.a 3.2v5*) is more like SCO 3.2v4 than 3.2v2. Wed Jan 3 18:22:10 1996 steve chamberlain <sac@slash.cygnus.com> * readline.c, display.c, complete.c: Add _MSC_VER to list of things which can't do most things. Thu Nov 16 15:39:05 1995 Geoffrey Noer <noer@cygnus.com> * complete.c: Change WIN32 to __WIN32__, added #else return NULL to end of that define. Tue Oct 31 10:38:58 1995 steve chamberlain <sac@slash.cygnus.com> * display.c, parens.c, readline.c, rldefs.h: Change use of WIN32 to __WIN32__. Tue Oct 10 11:07:23 1995 Fred Fish <fnf@cygnus.com> * Makefile.in (BISON): Remove macro. Tue Oct 10 08:49:00 1995 steve chamberlain <sac@slash.cygnus.com> * complete.c (filename_completion_function): Enable for win32 when not MSC. Sun Oct 8 04:17:19 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * configure.in: Handle powerpc-ibm-aix* like rs6000-ibm-aix*. Sat Oct 7 20:36:16 1995 Michael Meissner <meissner@cygnus.com> * rltty.c (outchar): Return an int, like tputs expects. * signals.c (_rl_output_character_function): Ditto. Fri Sep 29 15:19:23 1995 steve chamberlain <sac@slash.cygnus.com> Fixes for when the host WIN32, but not MSC. * complete.c: Sometimes have pwd.h * parens.c: WIN32 has similar restrictions to __GO32__. * readline.c (__GO32__): Some of this moved into rldefs.h * signals.c (__GO32__): Likewise. * rldefs.h (MSDOS||WIN32) becomes MSDOS||MSC. (WIN32&&!WIN32): New definitions. Wed Sep 20 12:57:17 1995 Ian Lance Taylor <ian@cygnus.com> * Makefile.in (maintainer-clean): New synonym for realclean. Wed Mar 1 13:33:43 1995 Michael Meissner <meissner@tiktok.cygnus.com> * rltty.c (outchar): Provide prototype for outchar, to silence type warnings in passing outchar to tputs on systems like Linux that have full prototypes. * signals.c (_rl_output_character_function): Provide prototype to silence type warnings. Sun Jan 15 14:10:37 1995 Steve Chamberlain <sac@splat> * rldefs.h: Define MINIMAL for __GO32__ and WIN32. * complete.c, display.c, readline.c, rltty.c: Test MINIMAL instead of __GO32__. Wed Aug 24 13:04:47 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) * configure.in: Change i[34]86 to i[345]86. Sat Jul 16 13:26:31 1994 Stan Shebs (shebs@andros.cygnus.com) * configure.in (m88*-harris-cxux7*): Recognize. * sysdep-cxux7.h: New file. Fri Jul 8 13:18:33 1994 Steve Chamberlain (sac@jonny.cygnus.com) * rttty.c (control_meta_key_on): Remove superfluous testing of __GO32__. Thu Jun 30 15:21:54 1994 Steve Chamberlain (sac@jonny.cygnus.com) * rltty.c (control_meta_key_on): Don't compile if __GO32__ is defined. (rltty_set_default_bindings): Likewise. * display.c (insert_some_chars, delete_chars): row_start should be a short. * parens.c (rl_insert_close): No FD_SET if using __GO32__. * readline.c (rl_gather_tyi): Strip off spurious high bits. Sun Jun 12 03:51:52 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * history.c: Swap inclusion of rldefs.h and chardefs.h to avoid CTRL macro redefinition. Mon May 9 18:29:42 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * readline.c (readline_default_bindings): Don't compile if __GO32__ is defined. (_rl_set_screen_size): Likewise. * rltty.c (rltty_set_default_bindings): Likewise. (control_meta_key): Likewise. * display.c: If __GO32__ is defined, include <sys/pc.h>. * parens.c: If __GO32__ is defined, undefine FD_SET. * signals.c: Include SIGWINCH handling in the set of things which is not done if HANDLE_SIGNALS is not set. Fri May 6 13:38:39 1994 Steve Chamberlain (sac@cygnus.com) * config/mh-go32: New fragment. * configure.in (host==go32): Use go32 fragment. Wed May 4 14:36:53 1994 Stu Grossman (grossman@cygnus.com) * chardefs.h, rldefs.h: Move decls of string funcs from chardefs.h to rldefs.h so that they don't pollute apps that include readline.h. * history.c: include rldefs.h to get decls of string funcs. Wed May 4 12:15:11 1994 Stan Shebs (shebs@andros.cygnus.com) * configure.in (rs6000-bull-bosx*): New configuration, RS/6000 variant. Wed Apr 20 10:43:52 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * configure.in: Use mh-posix for sunos4.1*. Wed Apr 13 21:28:44 1994 Jim Kingdon (kingdon@deneb.cygnus.com) * rltty.c (set_tty_settings): Don't set readline_echoing_p. (rl_deprep_terminal) [NEW_TTY_DRIVER]: Set readline_echoing_p. Sun Mar 13 09:13:12 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * Makefile.in: Add TAGS target. Wed Mar 9 18:01:31 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * isearch.c, search.c: Include sysdep.h. Thu Mar 3 17:40:03 1994 Jim Kingdon (kingdon@deneb.cygnus.com) * configure.in: For ISC, use mh-sysv, not mh-isc. Thu Feb 24 04:13:53 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) * Merge in changes from bash-1.13.5. Merge changes from glob/tilde.c into tilde.c and use it. Add system function declarations where necessary. Check for __GO32__, not _GO32_ consistently. * Makefile.in: Update dependencies. * rltty.c: Include <sys/file.h> to match include file setup in readline.c for rldefs.h. Otherwise we get inconsistent TTY_DRIVER definitions in readline.c and rltty.c. * bind.c, complete.c: Do not include <sys/types.h>, it is already included via sysdep.h, which causes problems if <sys/types.h> has no multiple inclusion protection. * readline.c (_rl_set_screen_size): Reestablish test for TIOCGWINSZ_BROKEN. * rldefs.h: Define S_ISREG if necessary. Fri Feb 18 08:56:35 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * Makefile.in: Add search.o rule for Sun make. Wed Feb 16 16:35:49 1994 Per Bothner (bothner@kalessin.cygnus.com) * rltty.c: #if out some code if __GO32__. Tue Feb 15 14:07:08 1994 Per Bothner (bothner@kalessin.cygnus.com) * readline.c (_rl_output_character_function), display.c: Return int, not void, to conform with the expected arg of tputs. * readline.c (init_terminal_io): tgetflag only takes 1 arg. * readline.c (_rl_savestring): New function. * chardefs.h: To avoid conflicts and/or warnings, define savestring as a macro wrapper for _rl_savestring. * display.c (extern term_xn): It's an int flag, not a string. * charsdefs.h, rldefs.h: Remove HAVE_STRING_H-related junk. Sat Feb 5 08:32:30 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * Makefile.in: Remove obsolete rules for history.info and readline.info. Thu Jan 27 17:04:01 1994 Jim Kingdon (kingdon@deneb.cygnus.com) * chardefs.h: Only declare strrchr if it is not #define'd. Tue Jan 25 11:30:06 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * rldefs.h: Accept __hpux as well as hpux for HP compiler in ANSI mode. Fri Jan 21 17:31:26 1994 Jim Kingdon (kingdon@lisa.cygnus.com) * chardefs.h, tilde.c: Just declare strrchr rather than trying to include a system header. Fri Jan 21 14:40:43 1994 Fred Fish (fnf@cygnus.com) * Makefile.in (distclean, realclean): Expand local-distclean inline after doing recursion. You can't recurse after removing Makefile. Make them depend on local-clean. * Makefile.in (local-distclean): Remove now superfluous target. Mon Jan 17 12:42:07 1994 Ken Raeburn (raeburn@cujo.cygnus.com) * readline.c (doing_an_undo): Delete second declaration, since it confuses the alpha-osf1 native compiler. Sun Jan 16 12:33:11 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * complete.c, bind.c: Include <sys/stat.h>. * complete.c: Define X_OK if not defined by a system header. * chardefs.h: Don't declare xmalloc. * keymaps.h: Include "chardefs.h" not <readline/chardefs.h>. * Makefile.in (clean mostlyclean distclean realclean): Recurse into subdirectories as well as doing this directory. Add clean-dvi target. Sat Jan 15 19:36:12 1994 Per Bothner (bothner@kalessin.cygnus.com) * readline.c, display.c: Patches to allow use of all 80 columns on most terminals (those with am and xn). Merge in changes from bash-1.13. The most obvious one is that the file readline.c has been split into multiple files. * bind.c, complete.c, dispay.c, isearch.c, parens.c, rldefs.h, rltty.c, search.c signals.c, tilde.c, tilde.h, xmalloc.c: New files. Sat Dec 11 16:29:17 1993 Steve Chamberlain (sac@thepub.cygnus.com) * readline.c (rl_getc): If GO32, trim high bit from getkey, otherwise fancy PC keys cause grief. Fri Nov 5 11:49:47 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * configure.in: Add doc to configdirs. * Makefile.in (info dvi install-info clean-info): Recurse into doc. Fri Oct 22 07:55:08 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * configure.in: Add * to end of all OS names. Tue Oct 5 12:33:51 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * readline.c: Add stuff for HIUX to place where we detect termio vs. sgtty (ugh, but I don't see a simple better way). Wed Sep 29 11:02:58 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * readline.c (parser_if): Free tname when done with it (change imported from from bash 1.12 readline). Tue Sep 7 17:15:37 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * configure.in (m88k-*-sysvr4*): Comment out previous change. Fri Jul 2 11:05:34 1993 Ian Lance Taylor (ian@cygnus.com) * configure.in (*-*-riscos*): New entry; use mh-sysv. Wed Jun 23 13:00:12 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * configure.in: Add comment. Mon Jun 14 14:28:55 1993 Jim Kingdon (kingdon@eric) * configure.in (m88k-*-sysvr4*): Use sysdep-norm.h. Sun Jun 13 13:04:09 1993 Jim Kingdon (kingdon@cygnus.com) * Makefile.in ({real,dist}clean): Remove sysdep.h. Thu Jun 10 11:22:41 1993 Jim Kingdon (kingdon@cygnus.com) * Makefile.in: Add mostlyclean, distclean, and realclean targets. Fri May 21 17:09:28 1993 Jim Kingdon (kingdon@lioth.cygnus.com) * config/mh-isc: New file. * configure.in: Use it. Sat Apr 17 00:40:12 1993 Jim Kingdon (kingdon at calvin) * readline.c, history.c: Don't include sys/types.h; sysdep.h does. * config/mh-sysv: Define TIOCGWINSZ_BROKEN. readline.c: Check it. Wed Mar 24 02:06:15 1993 david d `zoo' zuhn (zoo at poseidon.cygnus.com) * Makefile.in: add installcheck & dvi targets Fri Mar 12 18:36:53 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: recognize *-*-solaris2* instead of *-*-solaris* (a number of people want to call SunOS 4.1.2 "solaris1.0" and get it right) Tue Mar 2 21:25:36 1993 Fred Fish (fnf@cygnus.com) * sysdep-sysv4.h: New file for SVR4. * configure.in (*-*-sysv4*): Use sysdep-sysv4.h. * configure.in (*-*-ultrix2): Add triplet from Michael Rendell (michael@mercury.cs.mun.ca) Tue Dec 15 12:38:16 1992 Ian Lance Taylor (ian@cygnus.com) * configure.in (i[34]86-*-sco3.2v4*): use mh-sco4. * config/mh-sco4: New file, like mh-sco but without defining _POSIX_SOURCE. Wed Nov 11 21:20:14 1992 John Gilmore (gnu@cygnus.com) * configure.in: Reformat to one-case-per-line. Handle SunOS 3.5, as per Karl Berry, <karl@claude.cs.umb.edu>. Wed Nov 4 15:32:31 1992 Stu Grossman (grossman at cygnus.com) * sysdep-norm.h: Remove some crud, install dire warning. Thu Oct 22 01:08:13 1992 Stu Grossman (grossman at cygnus.com) * configure.in: Make SCO work again... Mon Oct 12 15:04:07 1992 Ian Lance Taylor (ian@cygnus.com) * readline.c (init_terminal_io): if tgetent returns 0, the terminal type is unknown. Thu Oct 1 23:44:14 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: use cpu-vendor-os triple instead of nested cases Wed Sep 30 12:58:57 1992 Stu Grossman (grossman at cygnus.com) * readline.c (rl_complete_internal): Cast alloca to (char *) to avoid warning. Fri Sep 25 12:45:05 1992 Stu Grossman (grossman at cygnus.com) * readline.c (clear_to_eol, rl_generic_bind): Make static. (rl_digit_loop): Add arg to call to rl_message(). * vi_mode.c (rl_vi_first_print): Add arg to call to rl_back_to_indent(). Wed Aug 19 14:59:07 1992 Ian Lance Taylor (ian@cygnus.com) * Makefile.in: always create installation directories, use full file name for install target. Wed Aug 12 15:50:57 1992 John Gilmore (gnu@cygnus.com) * readline.c (last_readline_init_file): Fix typo made by Steve Chamberlain/DJ Delorie. Proper control file name is ~/.inputrc, not ~/inputrc. Thu Jun 25 16:15:27 1992 Stu Grossman (grossman at cygnus.com) * configure.in: Make bsd based systems use sysdep-obsd.h. Tue Jun 23 23:22:53 1992 Per Bothner (bothner@cygnus.com) * config/mh-posix: New file, for Posix-compliant systems. * configure.in: Use mh-posix for Linux (free Unix clone). Tue Jun 23 21:59:20 1992 Fred Fish (fnf@cygnus.com) * sysdep-norm.h (alloca): Protect against previous definition as a macro with arguments. Fri Jun 19 15:48:54 1992 Stu Grossman (grossman at cygnus.com) * sysdep-obsd.h: #include <sys/types.h> to make this more Kosher. Fri Jun 19 12:53:28 1992 John Gilmore (gnu at cygnus.com) * config/mh-apollo68v, mh-sco, mh-sysv, mh-sysv4}: RANLIB=true. Mon Jun 15 13:50:34 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * configure.in: use mh-sysv4 on solaris2 Mon Jun 15 12:28:24 1992 Fred Fish (fnf@cygnus.com) * config/mh-ncr3000 (INSTALL): Don't use /usr/ucb/install, it is broken on ncr 3000's. * config/mh-ncr3000 (RANLIB): Use RANLIB=true. Mon Jun 15 01:35:55 1992 John Gilmore (gnu at cygnus.com) * readline.c: Make new SIGNALS_* macros to parameterize the ugly changes in signal blocking. Use them throughout, reducing #ifdef HAVE_POSIX_SIGNALS and HAVE_BSD_SIGNALS clutter significantly. Make all such places use POSIX if available, to avoid losing with poor `sigsetmask' emulation from libiberty. Sun Jun 14 15:19:51 1992 Stu Grossman (grossman at cygnus.com) * readline.c (insert_some_chars): Return void. Thu Jun 11 01:27:45 1992 John Gilmore (gnu at cygnus.com) * readline.c: #undef PC, which Solaris2 defines in sys/types.h, clobbering the termcap global variable PC. Tue Jun 9 17:30:23 1992 Fred Fish (fnf@cygnus.com) * config/{mh-ncr3000, mh-sysv4}: Change INSTALL to use /usr/ucb/install. Mon Jun 8 23:10:07 1992 Fred Fish (fnf@cygnus.com) * readline.h (rl_completer_quote_characters): Add declaration. * readline.c (rl_completer_quote_characters): Add global var. * readline.c (strpbrk): Add prototype and function. * readline.c (rl_complete_internal): Add code to handle expansion of quoted strings. Mon May 11 12:39:30 1992 John Gilmore (gnu at cygnus.com) * readline.c: Can't initialize FILE *'s with stdin and stdout, because they might not be constant. Patch from Tom Quinn, trq@dinoysos.thphys.ox.ac.uk. Tue Apr 28 21:52:34 1992 John Gilmore (gnu at cygnus.com) * readline.h: Declare rl_event_hook (which already existed). Suggested by Christoph Tietz <tietz@zi.gmd.dbp.de>. Wed Apr 22 18:08:01 1992 K. Richard Pixley (rich@rtl.cygnus.com) * configure.in: remove subdirs declaration. The obsolete semantic for subdirs has been usurped by per's new meaning. Tue Apr 21 11:54:23 1992 K. Richard Pixley (rich@cygnus.com) * Makefile.in: rework CFLAGS so that they can be set on the command line to make. Remove MINUS_G. Default CFLAGS to -g. Fri Apr 10 23:02:27 1992 Fred Fish (fnf@cygnus.com) * configure.in: Recognize new ncr3000 config. * config/mh-ncr3000: New NCR 3000 config file. Wed Mar 25 10:46:30 1992 John Gilmore (gnu at cygnus.com) * history.c (stifle_history): Negative arg treated as zero. Tue Mar 24 23:46:20 1992 K. Richard Pixley (rich@cygnus.com) * config/mh-sysv: INSTALL_PROG -> INSTALL. Mon Feb 10 01:41:35 1992 Brian Fox (bfox at gnuwest.fsf.org) * history.c (history_do_write) Build a buffer of all of the lines to write and write them in one fell swoop (lower overhead than calling write () for each line). Suggested by Peter Ho. * vi_mode.c (rl_vi_subst) Don't forget to end the undo group. Sat Mar 7 00:15:36 1992 K. Richard Pixley (rich@rtl.cygnus.com) * Makefile.in: remove FIXME's on info and install-info targets. Fri Mar 6 22:02:04 1992 K. Richard Pixley (rich@cygnus.com) * Makefile.in: added check target. Wed Feb 26 18:04:40 1992 K. Richard Pixley (rich@cygnus.com) * Makefile.in, configure.in: removed traces of namesubdir, -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced copyrights to '92, changed some from Cygnus to FSF. Fri Feb 21 14:37:32 1992 Steve Chamberlain (sac at rtl.cygnus.com) * readline.c, examples/fileman.c: patches from DJ to support DOS Thu Feb 20 23:23:16 1992 Stu Grossman (grossman at cygnus.com) * readline.c (rl_read_init_file): Make sure that null filename is not passed to open() or else we end up opening the directory, and read a bunch of garbage into keymap[]. Mon Feb 17 17:15:09 1992 Fred Fish (fnf at cygnus.com) * readline.c (readline_default_bindings): Only make use of VLNEXT when both VLNEXT and TERMIOS_TTY_DRIVER is defined. On SVR4 <termio.h> includes <termios.h>, so VLNEXT is always defined. * sysdep-norm.h (_POSIX_VERSION): Define this for all SVR4 systems so that <termios.h> gets used, instead of <termio.h>. Fri Dec 20 12:04:31 1991 Fred Fish (fnf at cygnus.com) * configure.in: Change svr4 references to sysv4. Tue Dec 10 04:07:20 1991 K. Richard Pixley (rich at rtl.cygnus.com) * Makefile.in: infodir belongs in datadir. Fri Dec 6 23:23:14 1991 K. Richard Pixley (rich at rtl.cygnus.com) * Makefile.in: remove spaces following hyphens, bsd make can't cope. added clean-info. added standards.text support. Don't know how to make info anymore. * configure.in: commontargets is no longer a recognized hook, so remove it. new subdir called doc. Thu Dec 5 22:46:10 1991 K. Richard Pixley (rich at rtl.cygnus.com) * Makefile.in: idestdir and ddestdir go away. Added copyrights and shift gpl to v2. Added ChangeLog if it didn't exist. docdir and mandir now keyed off datadir by default. Fri Nov 22 09:02:32 1991 John Gilmore (gnu at cygnus.com) * sysdep-obsd.h: Rename from sysdep-newsos.h. * configure.in: Use sysdep-obsd for Mach as well as NEWs. * sysdep-norm.h, sysdep-aix.h: Add <sys/types.h>, which POSIX requires to make <dirent.h> work. Improve Sun alloca decl. Thu Nov 21 18:48:08 1991 John Gilmore (gnu at cygnus.com) * Makefile.in: Clean up ../glob/tilde.c -> tilde.o path. Clean up makefile a bit in general. Thu Nov 21 14:40:29 1991 Stu Grossman (grossman at cygnus.com) * configure.in, config/mh-svr4: Make SVR4 work. * readline.c: Move config stuff to sysdep.h, use typedef dirent consistently, remove refs to d_namlen (& D_NAMLEN) to improve portability. Also, update copyright notice. readline.h: remove config stuff that I added erroneously in the first place. * emacs_keymap.c, funmap.c, history.c, keymaps.c, vi_keymap.c, vi_mode.c: move config stuff to sysdep.h, update copyright notices. Tue Nov 19 15:02:13 1991 Stu Grossman (grossman at cygnus.com) * history.c: #include "sysdep.h". Tue Nov 19 10:49:17 1991 Fred Fish (fnf at cygnus.com) * Makefile.in, config/hm-sysv, config/hm-sco: Change SYSV to USG to match current usage. * readline.c: Add USGr4 to list of defined things to check for to use <dirent.h> style directory access. * config/hm-svr4: New file for System V Release 4 (USGr4). Mon Nov 18 23:59:52 1991 Stu Grossman (grossman at cygnus.com) * readline.c (filename_completion_function): use struct dirent instead of struct direct. Fri Nov 1 07:02:13 1991 Brian Fox (bfox at gnuwest.fsf.org) * readline.c (rl_translate_keyseq) Make C-? translate to RUBOUT unconditionally. Mon Oct 28 11:34:52 1991 Brian Fox (bfox at gnuwest.fsf.org) * readline.c; Use Posix directory routines and macros. * funmap.c; Add entry for call-last-kbd-macro. * readline.c (rl_prep_term); Use system EOF character on POSIX systems also. Thu Oct 3 16:19:53 1991 Brian Fox (bfox at gnuwest.fsf.org) * readline.c; Make a distinction between having a TERMIOS tty driver, and having POSIX signal handling. You might one without the other. New defines used HAVE_POSIX_SIGNALS, and TERMIOS_TTY_DRIVER. Tue Jul 30 22:37:26 1991 Brian Fox (bfox at gnuwest.fsf.org) * readline.c: rl_getc () If a call to read () returns without an error, but with zero characters, the file is empty, so return EOF. Thu Jul 11 20:58:38 1991 Brian Fox (bfox at gnuwest.fsf.org) * readline.c: (rl_get_next_history, rl_get_previous_history) Reallocate the buffer space if the line being moved to is longer the the current space allocated. Amazing that no one has found this bug until now. Sun Jul 7 02:37:05 1991 Brian Fox (bfox at gnuwest.fsf.org) * readline.c:(rl_parse_and_bind) Allow leading whitespace. Make sure TERMIO and TERMIOS systems treat CR and NL disctinctly. Tue Jun 25 04:09:27 1991 Brian Fox (bfox at gnuwest.fsf.org) * readline.c: Rework parsing conditionals to pay attention to the prior states of the conditional stack. This makes $if statements work correctly. Mon Jun 24 20:45:59 1991 Brian Fox (bfox at gnuwest.fsf.org) * readline.c: support for displaying key binding information includes the functions rl_list_funmap_names (), invoking_keyseqs_in_map (), rl_invoking_keyseqs (), rl_dump_functions (), and rl_function_dumper (). funmap.c: support for same includes rl_funmap_names (). readline.c, funmap.c: no longer define STATIC_MALLOC. However, update both version of xrealloc () to handle a null pointer. Thu Apr 25 12:03:49 1991 Brian Fox (bfox at gnuwest.fsf.org) * vi_mode.c (rl_vi_fword, fWord, etc. All functions use the macro `isident()'. Fixed movement bug which prevents continious movement through the text. Fri Jul 27 16:47:01 1990 Brian Fox (bfox at gnuwest.fsf.org) * readline.c (parser_if) Allow "$if term=foo" construct. Wed May 23 16:10:33 1990 Brian Fox (bfox at gnuwest.fsf.org) * readline.c (rl_dispatch) Correctly remember the last command executed. Fixed typo in username_completion_function (). Mon Apr 9 19:55:48 1990 Brian Fox (bfox at gnuwest.fsf.org) * readline.c: username_completion_function (); For text passed in with a leading `~', remember that this could be a filename (after it is completed). Thu Apr 5 13:44:24 1990 Brian Fox (bfox at gnuwest.fsf.org) * readline.c: rl_search_history (): Correctly handle case of an unfound search string, but a graceful exit (as with ESC). * readline.c: rl_restart_output (); The Apollo passes the address of the file descriptor to TIOCSTART, not the descriptor itself. Tue Mar 20 05:38:55 1990 Brian Fox (bfox at gnuwest.fsf.org) * readline.c: rl_complete (); second call in a row causes possible completions to be listed. * readline.c: rl_redisplay (), added prompt_this_line variable which is the first character character following \n in prompt. Sun Mar 11 04:32:03 1990 Brian Fox (bfox at gnuwest.fsf.org) * Signals are now supposedly handled inside of SYSV compilation. Wed Jan 17 19:24:09 1990 Brian Fox (bfox at sbphy.ucsb.edu) * history.c: history_expand (); fixed overwriting memory error, added needed argument to call to get_history_event (). Thu Jan 11 10:54:04 1990 Brian Fox (bfox at sbphy.ucsb.edu) * readline.c: added mark_modified_lines to control the display of an asterisk on modified history lines. Also added a user variable called mark-modified-lines to the `set' command. Thu Jan 4 10:38:05 1990 Brian Fox (bfox at sbphy.ucsb.edu) * readline.c: start_insert (). Only use IC if we don't have an im capability. Fri Sep 8 09:00:45 1989 Brian Fox (bfox at aurel) * readline.c: rl_prep_terminal (). Only turn on 8th bit as meta-bit iff the terminal is not using parity. Sun Sep 3 08:57:40 1989 Brian Fox (bfox at aurel) * readline.c: start_insert (). Uses multiple insertion call in cases where that makes sense. rl_insert (). Read type-ahead buffer for additional keys that are bound to rl_insert, and insert them all at once. Make insertion of single keys given with an argument much more efficient. Tue Aug 8 18:13:57 1989 Brian Fox (bfox at aurel) * readline.c: Changed handling of EOF. readline () returns (char *)EOF or consed string. The EOF character is read from the tty, or if the tty doesn't have one, defaults to C-d. * readline.c: Added support for event driven programs. rl_event_hook is the address of a function you want called while Readline is waiting for input. * readline.c: Cleanup time. Functions without type declarations do not use return with a value. * history.c: history_expand () has new variable which is the characters to ignore immediately following history_expansion_char. Sun Jul 16 08:14:00 1989 Brian Fox (bfox at aurel) * rl_prep_terminal () BSD version turns off C-s, C-q, C-y, C-v. * readline.c -- rl_prep_terminal () SYSV version hacks readline_echoing_p. BSD version turns on passing of the 8th bit for the duration of reading the line. Tue Jul 11 06:25:01 1989 Brian Fox (bfox at aurel) * readline.c: new variable rl_tilde_expander. If non-null, this contains the address of a function to call if the standard meaning for expanding a tilde fails. The function is called with the text sans tilde (as in "foo"), and returns a malloc()'ed string which is the expansion, or a NULL pointer if there is no expansion. * readline.h - new file chardefs.h Separates things that only readline.c needs from the standard header file publishing interesting things about readline. * readline.c: readline_default_bindings () now looks at terminal chararacters and binds those as well. Wed Jun 28 20:20:51 1989 Brian Fox (bfox at aurel) * Made readline and history into independent libraries. ���������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/macro.c����������������������������������������������������������������������0000644�0001750�0001750�00000015405�12250770610�015120� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* macro.c -- keyboard macros for readline. */ /* Copyright (C) 1994-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include <config.h> #endif #include <sys/types.h> #if defined (HAVE_UNISTD_H) # include <unistd.h> /* for _POSIX_VERSION */ #endif /* HAVE_UNISTD_H */ #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #include <stdio.h> /* System-specific feature definitions and include files. */ #include "rldefs.h" /* Some standard library routines. */ #include "readline.h" #include "history.h" #include "rlprivate.h" #include "xmalloc.h" /* **************************************************************** */ /* */ /* Hacking Keyboard Macros */ /* */ /* **************************************************************** */ /* The currently executing macro string. If this is non-zero, then it is a malloc ()'ed string where input is coming from. */ char *rl_executing_macro = (char *)NULL; /* The offset in the above string to the next character to be read. */ static int executing_macro_index; /* The current macro string being built. Characters get stuffed in here by add_macro_char (). */ static char *current_macro = (char *)NULL; /* The size of the buffer allocated to current_macro. */ static int current_macro_size; /* The index at which characters are being added to current_macro. */ static int current_macro_index; /* A structure used to save nested macro strings. It is a linked list of string/index for each saved macro. */ struct saved_macro { struct saved_macro *next; char *string; int sindex; }; /* The list of saved macros. */ static struct saved_macro *macro_list = (struct saved_macro *)NULL; /* Set up to read subsequent input from STRING. STRING is free ()'ed when we are done with it. */ void _rl_with_macro_input (string) char *string; { _rl_push_executing_macro (); rl_executing_macro = string; executing_macro_index = 0; RL_SETSTATE(RL_STATE_MACROINPUT); } /* Return the next character available from a macro, or 0 if there are no macro characters. */ int _rl_next_macro_key () { int c; if (rl_executing_macro == 0) return (0); if (rl_executing_macro[executing_macro_index] == 0) { _rl_pop_executing_macro (); return (_rl_next_macro_key ()); } #if defined (READLINE_CALLBACKS) c = rl_executing_macro[executing_macro_index++]; if (RL_ISSTATE (RL_STATE_CALLBACK) && RL_ISSTATE (RL_STATE_READCMD|RL_STATE_MOREINPUT) && rl_executing_macro[executing_macro_index] == 0) _rl_pop_executing_macro (); return c; #else return (rl_executing_macro[executing_macro_index++]); #endif } /* Save the currently executing macro on a stack of saved macros. */ void _rl_push_executing_macro () { struct saved_macro *saver; saver = (struct saved_macro *)xmalloc (sizeof (struct saved_macro)); saver->next = macro_list; saver->sindex = executing_macro_index; saver->string = rl_executing_macro; macro_list = saver; } /* Discard the current macro, replacing it with the one on the top of the stack of saved macros. */ void _rl_pop_executing_macro () { struct saved_macro *macro; FREE (rl_executing_macro); rl_executing_macro = (char *)NULL; executing_macro_index = 0; if (macro_list) { macro = macro_list; rl_executing_macro = macro_list->string; executing_macro_index = macro_list->sindex; macro_list = macro_list->next; xfree (macro); } if (rl_executing_macro == 0) RL_UNSETSTATE(RL_STATE_MACROINPUT); } /* Add a character to the macro being built. */ void _rl_add_macro_char (c) int c; { if (current_macro_index + 1 >= current_macro_size) { if (current_macro == 0) current_macro = (char *)xmalloc (current_macro_size = 25); else current_macro = (char *)xrealloc (current_macro, current_macro_size += 25); } current_macro[current_macro_index++] = c; current_macro[current_macro_index] = '\0'; } void _rl_kill_kbd_macro () { if (current_macro) { xfree (current_macro); current_macro = (char *) NULL; } current_macro_size = current_macro_index = 0; FREE (rl_executing_macro); rl_executing_macro = (char *) NULL; executing_macro_index = 0; RL_UNSETSTATE(RL_STATE_MACRODEF); } /* Begin defining a keyboard macro. Keystrokes are recorded as they are executed. End the definition with rl_end_kbd_macro (). If a numeric argument was explicitly typed, then append this definition to the end of the existing macro, and start by re-executing the existing macro. */ int rl_start_kbd_macro (ignore1, ignore2) int ignore1, ignore2; { if (RL_ISSTATE (RL_STATE_MACRODEF)) { _rl_abort_internal (); return -1; } if (rl_explicit_arg) { if (current_macro) _rl_with_macro_input (savestring (current_macro)); } else current_macro_index = 0; RL_SETSTATE(RL_STATE_MACRODEF); return 0; } /* Stop defining a keyboard macro. A numeric argument says to execute the macro right now, that many times, counting the definition as the first time. */ int rl_end_kbd_macro (count, ignore) int count, ignore; { if (RL_ISSTATE (RL_STATE_MACRODEF) == 0) { _rl_abort_internal (); return -1; } current_macro_index -= rl_key_sequence_length - 1; current_macro[current_macro_index] = '\0'; RL_UNSETSTATE(RL_STATE_MACRODEF); return (rl_call_last_kbd_macro (--count, 0)); } /* Execute the most recently defined keyboard macro. COUNT says how many times to execute it. */ int rl_call_last_kbd_macro (count, ignore) int count, ignore; { if (current_macro == 0) _rl_abort_internal (); if (RL_ISSTATE (RL_STATE_MACRODEF)) { rl_ding (); /* no recursive macros */ current_macro[--current_macro_index] = '\0'; /* erase this char */ return 0; } while (count--) _rl_with_macro_input (savestring (current_macro)); return 0; } void rl_push_macro_input (macro) char *macro; { _rl_with_macro_input (macro); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/NEWS�������������������������������������������������������������������������0000644�0001750�0001750�00000001626�12250770610�014352� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������This is a terse description of the new features added to readline-6.2 since the release of readline-6.1. a. The history library does not try to write the history filename in the current directory if $HOME is unset. This closes a potential security problem if the application does not specify a history filename. b. New bindable variable `completion-display-width' to set the number of columns used when displaying completions. c. New bindable variable `completion-case-map' to cause case-insensitive completion to treat `-' and `_' as identical. d. There are new bindable vi-mode command names to avoid readline's case- insensitive matching not allowing them to be bound separately. e. New bindable variable `menu-complete-display-prefix' causes the menu completion code to display the common prefix of the possible completions before cycling through the list, instead of after. ����������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/readline.h�������������������������������������������������������������������0000644�0001750�0001750�00000107245�12250770610�015613� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Readline.h -- the names of functions callable from within readline. */ /* Copyright (C) 1987-2011 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #if !defined (_READLINE_H_) #define _READLINE_H_ #ifdef __cplusplus extern "C" { #endif #if defined (READLINE_LIBRARY) # include "rlstdc.h" # include "rltypedefs.h" # include "keymaps.h" # include "tilde.h" #else # include <readline/rlstdc.h> # include <readline/rltypedefs.h> # include <readline/keymaps.h> # include <readline/tilde.h> #endif /* Hex-encoded Readline version number. */ #define RL_READLINE_VERSION 0x0602 /* Readline 6.2 */ #define RL_VERSION_MAJOR 6 #define RL_VERSION_MINOR 2 /* Readline data structures. */ /* Maintaining the state of undo. We remember individual deletes and inserts on a chain of things to do. */ /* The actions that undo knows how to undo. Notice that UNDO_DELETE means to insert some text, and UNDO_INSERT means to delete some text. I.e., the code tells undo what to undo, not how to undo it. */ enum undo_code { UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END }; /* What an element of THE_UNDO_LIST looks like. */ typedef struct undo_list { struct undo_list *next; int start, end; /* Where the change took place. */ char *text; /* The text to insert, if undoing a delete. */ enum undo_code what; /* Delete, Insert, Begin, End. */ } UNDO_LIST; /* The current undo list for RL_LINE_BUFFER. */ extern UNDO_LIST *rl_undo_list; /* The data structure for mapping textual names to code addresses. */ typedef struct _funmap { const char *name; rl_command_func_t *function; } FUNMAP; extern FUNMAP **funmap; /* **************************************************************** */ /* */ /* Functions available to bind to key sequences */ /* */ /* **************************************************************** */ /* Bindable commands for numeric arguments. */ extern int rl_digit_argument PARAMS((int, int)); extern int rl_universal_argument PARAMS((int, int)); /* Bindable commands for moving the cursor. */ extern int rl_forward_byte PARAMS((int, int)); extern int rl_forward_char PARAMS((int, int)); extern int rl_forward PARAMS((int, int)); extern int rl_backward_byte PARAMS((int, int)); extern int rl_backward_char PARAMS((int, int)); extern int rl_backward PARAMS((int, int)); extern int rl_beg_of_line PARAMS((int, int)); extern int rl_end_of_line PARAMS((int, int)); extern int rl_forward_word PARAMS((int, int)); extern int rl_backward_word PARAMS((int, int)); extern int rl_refresh_line PARAMS((int, int)); extern int rl_clear_screen PARAMS((int, int)); extern int rl_skip_csi_sequence PARAMS((int, int)); extern int rl_arrow_keys PARAMS((int, int)); /* Bindable commands for inserting and deleting text. */ extern int rl_insert PARAMS((int, int)); extern int rl_quoted_insert PARAMS((int, int)); extern int rl_tab_insert PARAMS((int, int)); extern int rl_newline PARAMS((int, int)); extern int rl_do_lowercase_version PARAMS((int, int)); extern int rl_rubout PARAMS((int, int)); extern int rl_delete PARAMS((int, int)); extern int rl_rubout_or_delete PARAMS((int, int)); extern int rl_delete_horizontal_space PARAMS((int, int)); extern int rl_delete_or_show_completions PARAMS((int, int)); extern int rl_insert_comment PARAMS((int, int)); /* Bindable commands for changing case. */ extern int rl_upcase_word PARAMS((int, int)); extern int rl_downcase_word PARAMS((int, int)); extern int rl_capitalize_word PARAMS((int, int)); /* Bindable commands for transposing characters and words. */ extern int rl_transpose_words PARAMS((int, int)); extern int rl_transpose_chars PARAMS((int, int)); /* Bindable commands for searching within a line. */ extern int rl_char_search PARAMS((int, int)); extern int rl_backward_char_search PARAMS((int, int)); /* Bindable commands for readline's interface to the command history. */ extern int rl_beginning_of_history PARAMS((int, int)); extern int rl_end_of_history PARAMS((int, int)); extern int rl_get_next_history PARAMS((int, int)); extern int rl_get_previous_history PARAMS((int, int)); /* Bindable commands for managing the mark and region. */ extern int rl_set_mark PARAMS((int, int)); extern int rl_exchange_point_and_mark PARAMS((int, int)); /* Bindable commands to set the editing mode (emacs or vi). */ extern int rl_vi_editing_mode PARAMS((int, int)); extern int rl_emacs_editing_mode PARAMS((int, int)); /* Bindable commands to change the insert mode (insert or overwrite) */ extern int rl_overwrite_mode PARAMS((int, int)); /* Bindable commands for managing key bindings. */ extern int rl_re_read_init_file PARAMS((int, int)); extern int rl_dump_functions PARAMS((int, int)); extern int rl_dump_macros PARAMS((int, int)); extern int rl_dump_variables PARAMS((int, int)); /* Bindable commands for word completion. */ extern int rl_complete PARAMS((int, int)); extern int rl_possible_completions PARAMS((int, int)); extern int rl_insert_completions PARAMS((int, int)); extern int rl_old_menu_complete PARAMS((int, int)); extern int rl_menu_complete PARAMS((int, int)); extern int rl_backward_menu_complete PARAMS((int, int)); /* Bindable commands for killing and yanking text, and managing the kill ring. */ extern int rl_kill_word PARAMS((int, int)); extern int rl_backward_kill_word PARAMS((int, int)); extern int rl_kill_line PARAMS((int, int)); extern int rl_backward_kill_line PARAMS((int, int)); extern int rl_kill_full_line PARAMS((int, int)); extern int rl_unix_word_rubout PARAMS((int, int)); extern int rl_unix_filename_rubout PARAMS((int, int)); extern int rl_unix_line_discard PARAMS((int, int)); extern int rl_copy_region_to_kill PARAMS((int, int)); extern int rl_kill_region PARAMS((int, int)); extern int rl_copy_forward_word PARAMS((int, int)); extern int rl_copy_backward_word PARAMS((int, int)); extern int rl_yank PARAMS((int, int)); extern int rl_yank_pop PARAMS((int, int)); extern int rl_yank_nth_arg PARAMS((int, int)); extern int rl_yank_last_arg PARAMS((int, int)); /* Not available unless __CYGWIN__ is defined. */ #ifdef __CYGWIN__ extern int rl_paste_from_clipboard PARAMS((int, int)); #endif /* Bindable commands for incremental searching. */ extern int rl_reverse_search_history PARAMS((int, int)); extern int rl_forward_search_history PARAMS((int, int)); /* Bindable keyboard macro commands. */ extern int rl_start_kbd_macro PARAMS((int, int)); extern int rl_end_kbd_macro PARAMS((int, int)); extern int rl_call_last_kbd_macro PARAMS((int, int)); /* Bindable undo commands. */ extern int rl_revert_line PARAMS((int, int)); extern int rl_undo_command PARAMS((int, int)); /* Bindable tilde expansion commands. */ extern int rl_tilde_expand PARAMS((int, int)); /* Bindable terminal control commands. */ extern int rl_restart_output PARAMS((int, int)); extern int rl_stop_output PARAMS((int, int)); /* Miscellaneous bindable commands. */ extern int rl_abort PARAMS((int, int)); extern int rl_tty_status PARAMS((int, int)); /* Bindable commands for incremental and non-incremental history searching. */ extern int rl_history_search_forward PARAMS((int, int)); extern int rl_history_search_backward PARAMS((int, int)); extern int rl_noninc_forward_search PARAMS((int, int)); extern int rl_noninc_reverse_search PARAMS((int, int)); extern int rl_noninc_forward_search_again PARAMS((int, int)); extern int rl_noninc_reverse_search_again PARAMS((int, int)); /* Bindable command used when inserting a matching close character. */ extern int rl_insert_close PARAMS((int, int)); /* Not available unless READLINE_CALLBACKS is defined. */ extern void rl_callback_handler_install PARAMS((const char *, rl_vcpfunc_t *)); extern void rl_callback_read_char PARAMS((void)); extern void rl_callback_handler_remove PARAMS((void)); /* Things for vi mode. Not available unless readline is compiled -DVI_MODE. */ /* VI-mode bindable commands. */ extern int rl_vi_redo PARAMS((int, int)); extern int rl_vi_undo PARAMS((int, int)); extern int rl_vi_yank_arg PARAMS((int, int)); extern int rl_vi_fetch_history PARAMS((int, int)); extern int rl_vi_search_again PARAMS((int, int)); extern int rl_vi_search PARAMS((int, int)); extern int rl_vi_complete PARAMS((int, int)); extern int rl_vi_tilde_expand PARAMS((int, int)); extern int rl_vi_prev_word PARAMS((int, int)); extern int rl_vi_next_word PARAMS((int, int)); extern int rl_vi_end_word PARAMS((int, int)); extern int rl_vi_insert_beg PARAMS((int, int)); extern int rl_vi_append_mode PARAMS((int, int)); extern int rl_vi_append_eol PARAMS((int, int)); extern int rl_vi_eof_maybe PARAMS((int, int)); extern int rl_vi_insertion_mode PARAMS((int, int)); extern int rl_vi_insert_mode PARAMS((int, int)); extern int rl_vi_movement_mode PARAMS((int, int)); extern int rl_vi_arg_digit PARAMS((int, int)); extern int rl_vi_change_case PARAMS((int, int)); extern int rl_vi_put PARAMS((int, int)); extern int rl_vi_column PARAMS((int, int)); extern int rl_vi_delete_to PARAMS((int, int)); extern int rl_vi_change_to PARAMS((int, int)); extern int rl_vi_yank_to PARAMS((int, int)); extern int rl_vi_rubout PARAMS((int, int)); extern int rl_vi_delete PARAMS((int, int)); extern int rl_vi_back_to_indent PARAMS((int, int)); extern int rl_vi_first_print PARAMS((int, int)); extern int rl_vi_char_search PARAMS((int, int)); extern int rl_vi_match PARAMS((int, int)); extern int rl_vi_change_char PARAMS((int, int)); extern int rl_vi_subst PARAMS((int, int)); extern int rl_vi_overstrike PARAMS((int, int)); extern int rl_vi_overstrike_delete PARAMS((int, int)); extern int rl_vi_replace PARAMS((int, int)); extern int rl_vi_set_mark PARAMS((int, int)); extern int rl_vi_goto_mark PARAMS((int, int)); /* VI-mode utility functions. */ extern int rl_vi_check PARAMS((void)); extern int rl_vi_domove PARAMS((int, int *)); extern int rl_vi_bracktype PARAMS((int)); extern void rl_vi_start_inserting PARAMS((int, int, int)); /* VI-mode pseudo-bindable commands, used as utility functions. */ extern int rl_vi_fWord PARAMS((int, int)); extern int rl_vi_bWord PARAMS((int, int)); extern int rl_vi_eWord PARAMS((int, int)); extern int rl_vi_fword PARAMS((int, int)); extern int rl_vi_bword PARAMS((int, int)); extern int rl_vi_eword PARAMS((int, int)); /* **************************************************************** */ /* */ /* Well Published Functions */ /* */ /* **************************************************************** */ /* Readline functions. */ /* Read a line of input. Prompt with PROMPT. A NULL PROMPT means none. */ extern char *readline PARAMS((const char *)); extern int rl_set_prompt PARAMS((const char *)); extern int rl_expand_prompt PARAMS((char *)); extern int rl_initialize PARAMS((void)); /* Undocumented; unused by readline */ extern int rl_discard_argument PARAMS((void)); /* Utility functions to bind keys to readline commands. */ extern int rl_add_defun PARAMS((const char *, rl_command_func_t *, int)); extern int rl_bind_key PARAMS((int, rl_command_func_t *)); extern int rl_bind_key_in_map PARAMS((int, rl_command_func_t *, Keymap)); extern int rl_unbind_key PARAMS((int)); extern int rl_unbind_key_in_map PARAMS((int, Keymap)); extern int rl_bind_key_if_unbound PARAMS((int, rl_command_func_t *)); extern int rl_bind_key_if_unbound_in_map PARAMS((int, rl_command_func_t *, Keymap)); extern int rl_unbind_function_in_map PARAMS((rl_command_func_t *, Keymap)); extern int rl_unbind_command_in_map PARAMS((const char *, Keymap)); extern int rl_bind_keyseq PARAMS((const char *, rl_command_func_t *)); extern int rl_bind_keyseq_in_map PARAMS((const char *, rl_command_func_t *, Keymap)); extern int rl_bind_keyseq_if_unbound PARAMS((const char *, rl_command_func_t *)); extern int rl_bind_keyseq_if_unbound_in_map PARAMS((const char *, rl_command_func_t *, Keymap)); extern int rl_generic_bind PARAMS((int, const char *, char *, Keymap)); extern char *rl_variable_value PARAMS((const char *)); extern int rl_variable_bind PARAMS((const char *, const char *)); /* Backwards compatibility, use rl_bind_keyseq_in_map instead. */ extern int rl_set_key PARAMS((const char *, rl_command_func_t *, Keymap)); /* Backwards compatibility, use rl_generic_bind instead. */ extern int rl_macro_bind PARAMS((const char *, const char *, Keymap)); /* Undocumented in the texinfo manual; not really useful to programs. */ extern int rl_translate_keyseq PARAMS((const char *, char *, int *)); extern char *rl_untranslate_keyseq PARAMS((int)); extern rl_command_func_t *rl_named_function PARAMS((const char *)); extern rl_command_func_t *rl_function_of_keyseq PARAMS((const char *, Keymap, int *)); extern void rl_list_funmap_names PARAMS((void)); extern char **rl_invoking_keyseqs_in_map PARAMS((rl_command_func_t *, Keymap)); extern char **rl_invoking_keyseqs PARAMS((rl_command_func_t *)); extern void rl_function_dumper PARAMS((int)); extern void rl_macro_dumper PARAMS((int)); extern void rl_variable_dumper PARAMS((int)); extern int rl_read_init_file PARAMS((const char *)); extern int rl_parse_and_bind PARAMS((char *)); /* Functions for manipulating keymaps. */ extern Keymap rl_make_bare_keymap PARAMS((void)); extern Keymap rl_copy_keymap PARAMS((Keymap)); extern Keymap rl_make_keymap PARAMS((void)); extern void rl_discard_keymap PARAMS((Keymap)); extern Keymap rl_get_keymap_by_name PARAMS((const char *)); extern char *rl_get_keymap_name PARAMS((Keymap)); extern void rl_set_keymap PARAMS((Keymap)); extern Keymap rl_get_keymap PARAMS((void)); /* Undocumented; used internally only. */ extern void rl_set_keymap_from_edit_mode PARAMS((void)); extern char *rl_get_keymap_name_from_edit_mode PARAMS((void)); /* Functions for manipulating the funmap, which maps command names to functions. */ extern int rl_add_funmap_entry PARAMS((const char *, rl_command_func_t *)); extern const char **rl_funmap_names PARAMS((void)); /* Undocumented, only used internally -- there is only one funmap, and this function may be called only once. */ extern void rl_initialize_funmap PARAMS((void)); /* Utility functions for managing keyboard macros. */ extern void rl_push_macro_input PARAMS((char *)); /* Functions for undoing, from undo.c */ extern void rl_add_undo PARAMS((enum undo_code, int, int, char *)); extern void rl_free_undo_list PARAMS((void)); extern int rl_do_undo PARAMS((void)); extern int rl_begin_undo_group PARAMS((void)); extern int rl_end_undo_group PARAMS((void)); extern int rl_modifying PARAMS((int, int)); /* Functions for redisplay. */ extern void rl_redisplay PARAMS((void)); extern int rl_on_new_line PARAMS((void)); extern int rl_on_new_line_with_prompt PARAMS((void)); extern int rl_forced_update_display PARAMS((void)); extern int rl_clear_message PARAMS((void)); extern int rl_reset_line_state PARAMS((void)); extern int rl_crlf PARAMS((void)); #if defined (USE_VARARGS) && defined (PREFER_STDARG) extern int rl_message (const char *, ...) __attribute__((__format__ (printf, 1, 2))); #else extern int rl_message (); #endif extern int rl_show_char PARAMS((int)); /* Undocumented in texinfo manual. */ extern int rl_character_len PARAMS((int, int)); /* Save and restore internal prompt redisplay information. */ extern void rl_save_prompt PARAMS((void)); extern void rl_restore_prompt PARAMS((void)); /* Modifying text. */ extern void rl_replace_line PARAMS((const char *, int)); extern int rl_insert_text PARAMS((const char *)); extern int rl_delete_text PARAMS((int, int)); extern int rl_kill_text PARAMS((int, int)); extern char *rl_copy_text PARAMS((int, int)); /* Terminal and tty mode management. */ extern void rl_prep_terminal PARAMS((int)); extern void rl_deprep_terminal PARAMS((void)); extern void rl_tty_set_default_bindings PARAMS((Keymap)); extern void rl_tty_unset_default_bindings PARAMS((Keymap)); extern int rl_reset_terminal PARAMS((const char *)); extern void rl_resize_terminal PARAMS((void)); extern void rl_set_screen_size PARAMS((int, int)); extern void rl_get_screen_size PARAMS((int *, int *)); extern void rl_reset_screen_size PARAMS((void)); extern char *rl_get_termcap PARAMS((const char *)); /* Functions for character input. */ extern int rl_stuff_char PARAMS((int)); extern int rl_execute_next PARAMS((int)); extern int rl_clear_pending_input PARAMS((void)); extern int rl_read_key PARAMS((void)); extern int rl_getc PARAMS((FILE *)); extern int rl_set_keyboard_input_timeout PARAMS((int)); /* `Public' utility functions . */ extern void rl_extend_line_buffer PARAMS((int)); extern int rl_ding PARAMS((void)); extern int rl_alphabetic PARAMS((int)); extern void rl_free PARAMS((void *)); /* Readline signal handling, from signals.c */ extern int rl_set_signals PARAMS((void)); extern int rl_clear_signals PARAMS((void)); extern void rl_cleanup_after_signal PARAMS((void)); extern void rl_reset_after_signal PARAMS((void)); extern void rl_free_line_state PARAMS((void)); extern void rl_echo_signal_char PARAMS((int)); extern int rl_set_paren_blink_timeout PARAMS((int)); /* Undocumented. */ extern int rl_maybe_save_line PARAMS((void)); extern int rl_maybe_unsave_line PARAMS((void)); extern int rl_maybe_replace_line PARAMS((void)); /* Completion functions. */ extern int rl_complete_internal PARAMS((int)); extern void rl_display_match_list PARAMS((char **, int, int)); extern char **rl_completion_matches PARAMS((const char *, rl_compentry_func_t *)); extern char *rl_username_completion_function PARAMS((const char *, int)); extern char *rl_filename_completion_function PARAMS((const char *, int)); extern int rl_completion_mode PARAMS((rl_command_func_t *)); #if 0 /* Backwards compatibility (compat.c). These will go away sometime. */ extern void free_undo_list PARAMS((void)); extern int maybe_save_line PARAMS((void)); extern int maybe_unsave_line PARAMS((void)); extern int maybe_replace_line PARAMS((void)); extern int ding PARAMS((void)); extern int alphabetic PARAMS((int)); extern int crlf PARAMS((void)); extern char **completion_matches PARAMS((char *, rl_compentry_func_t *)); extern char *username_completion_function PARAMS((const char *, int)); extern char *filename_completion_function PARAMS((const char *, int)); #endif /* **************************************************************** */ /* */ /* Well Published Variables */ /* */ /* **************************************************************** */ /* The version of this incarnation of the readline library. */ extern const char *rl_library_version; /* e.g., "4.2" */ extern int rl_readline_version; /* e.g., 0x0402 */ /* True if this is real GNU readline. */ extern int rl_gnu_readline_p; /* Flags word encapsulating the current readline state. */ extern int rl_readline_state; /* Says which editing mode readline is currently using. 1 means emacs mode; 0 means vi mode. */ extern int rl_editing_mode; /* Insert or overwrite mode for emacs mode. 1 means insert mode; 0 means overwrite mode. Reset to insert mode on each input line. */ extern int rl_insert_mode; /* The name of the calling program. You should initialize this to whatever was in argv[0]. It is used when parsing conditionals. */ extern const char *rl_readline_name; /* The prompt readline uses. This is set from the argument to readline (), and should not be assigned to directly. */ extern char *rl_prompt; /* The prompt string that is actually displayed by rl_redisplay. Public so applications can more easily supply their own redisplay functions. */ extern char *rl_display_prompt; /* The line buffer that is in use. */ extern char *rl_line_buffer; /* The location of point, and end. */ extern int rl_point; extern int rl_end; /* The mark, or saved cursor position. */ extern int rl_mark; /* Flag to indicate that readline has finished with the current input line and should return it. */ extern int rl_done; /* If set to a character value, that will be the next keystroke read. */ extern int rl_pending_input; /* Non-zero if we called this function from _rl_dispatch(). It's present so functions can find out whether they were called from a key binding or directly from an application. */ extern int rl_dispatching; /* Non-zero if the user typed a numeric argument before executing the current function. */ extern int rl_explicit_arg; /* The current value of the numeric argument specified by the user. */ extern int rl_numeric_arg; /* The address of the last command function Readline executed. */ extern rl_command_func_t *rl_last_func; /* The name of the terminal to use. */ extern const char *rl_terminal_name; /* The input and output streams. */ extern FILE *rl_instream; extern FILE *rl_outstream; /* If non-zero, Readline gives values of LINES and COLUMNS from the environment greater precedence than values fetched from the kernel when computing the screen dimensions. */ extern int rl_prefer_env_winsize; /* If non-zero, then this is the address of a function to call just before readline_internal () prints the first prompt. */ extern rl_hook_func_t *rl_startup_hook; /* If non-zero, this is the address of a function to call just before readline_internal_setup () returns and readline_internal starts reading input characters. */ extern rl_hook_func_t *rl_pre_input_hook; /* The address of a function to call periodically while Readline is awaiting character input, or NULL, for no event handling. */ extern rl_hook_func_t *rl_event_hook; /* The address of the function to call to fetch a character from the current Readline input stream */ extern rl_getc_func_t *rl_getc_function; extern rl_voidfunc_t *rl_redisplay_function; extern rl_vintfunc_t *rl_prep_term_function; extern rl_voidfunc_t *rl_deprep_term_function; /* Dispatch variables. */ extern Keymap rl_executing_keymap; extern Keymap rl_binding_keymap; /* Display variables. */ /* If non-zero, readline will erase the entire line, including any prompt, if the only thing typed on an otherwise-blank line is something bound to rl_newline. */ extern int rl_erase_empty_line; /* If non-zero, the application has already printed the prompt (rl_prompt) before calling readline, so readline should not output it the first time redisplay is done. */ extern int rl_already_prompted; /* A non-zero value means to read only this many characters rather than up to a character bound to accept-line. */ extern int rl_num_chars_to_read; /* The text of a currently-executing keyboard macro. */ extern char *rl_executing_macro; /* Variables to control readline signal handling. */ /* If non-zero, readline will install its own signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP, SIGTTIN, and SIGTTOU. */ extern int rl_catch_signals; /* If non-zero, readline will install a signal handler for SIGWINCH that also attempts to call any calling application's SIGWINCH signal handler. Note that the terminal is not cleaned up before the application's signal handler is called; use rl_cleanup_after_signal() to do that. */ extern int rl_catch_sigwinch; /* Completion variables. */ /* Pointer to the generator function for completion_matches (). NULL means to use rl_filename_completion_function (), the default filename completer. */ extern rl_compentry_func_t *rl_completion_entry_function; /* Optional generator for menu completion. Default is rl_completion_entry_function (rl_filename_completion_function). */ extern rl_compentry_func_t *rl_menu_completion_entry_function; /* If rl_ignore_some_completions_function is non-NULL it is the address of a function to call after all of the possible matches have been generated, but before the actual completion is done to the input line. The function is called with one argument; a NULL terminated array of (char *). If your function removes any of the elements, they must be free()'ed. */ extern rl_compignore_func_t *rl_ignore_some_completions_function; /* Pointer to alternative function to create matches. Function is called with TEXT, START, and END. START and END are indices in RL_LINE_BUFFER saying what the boundaries of TEXT are. If this function exists and returns NULL then call the value of rl_completion_entry_function to try to match, otherwise use the array of strings returned. */ extern rl_completion_func_t *rl_attempted_completion_function; /* The basic list of characters that signal a break between words for the completer routine. The initial contents of this variable is what breaks words in the shell, i.e. "n\"\\'`@$>". */ extern const char *rl_basic_word_break_characters; /* The list of characters that signal a break between words for rl_complete_internal. The default list is the contents of rl_basic_word_break_characters. */ extern /*const*/ char *rl_completer_word_break_characters; /* Hook function to allow an application to set the completion word break characters before readline breaks up the line. Allows position-dependent word break characters. */ extern rl_cpvfunc_t *rl_completion_word_break_hook; /* List of characters which can be used to quote a substring of the line. Completion occurs on the entire substring, and within the substring rl_completer_word_break_characters are treated as any other character, unless they also appear within this list. */ extern const char *rl_completer_quote_characters; /* List of quote characters which cause a word break. */ extern const char *rl_basic_quote_characters; /* List of characters that need to be quoted in filenames by the completer. */ extern const char *rl_filename_quote_characters; /* List of characters that are word break characters, but should be left in TEXT when it is passed to the completion function. The shell uses this to help determine what kind of completing to do. */ extern const char *rl_special_prefixes; /* If non-zero, then this is the address of a function to call when completing on a directory name. The function is called with the address of a string (the current directory name) as an arg. It changes what is displayed when the possible completions are printed or inserted. The directory completion hook should perform any necessary dequoting. This function should return 1 if it modifies the directory name pointer passed as an argument. If the directory completion hook returns 0, it should not modify the directory name pointer passed as an argument. */ extern rl_icppfunc_t *rl_directory_completion_hook; /* If non-zero, this is the address of a function to call when completing a directory name. This function takes the address of the directory name to be modified as an argument. Unlike rl_directory_completion_hook, it only modifies the directory name used in opendir(2), not what is displayed when the possible completions are printed or inserted. If set, it takes precedence over rl_directory_completion_hook. The directory rewrite hook should perform any necessary dequoting. This function has the same return value properties as the directory_completion_hook. I'm not happy with how this works yet, so it's undocumented. I'm trying it in bash to see how well it goes. */ extern rl_icppfunc_t *rl_directory_rewrite_hook; /* If non-zero, this is the address of a function to call when reading directory entries from the filesystem for completion and comparing them to the partial word to be completed. The function should either return its first argument (if no conversion takes place) or newly-allocated memory. This can, for instance, convert filenames between character sets for comparison against what's typed at the keyboard. The returned value is what is added to the list of matches. The second argument is the length of the filename to be converted. */ extern rl_dequote_func_t *rl_filename_rewrite_hook; /* Backwards compatibility with previous versions of readline. */ #define rl_symbolic_link_hook rl_directory_completion_hook /* If non-zero, then this is the address of a function to call when completing a word would normally display the list of possible matches. This function is called instead of actually doing the display. It takes three arguments: (char **matches, int num_matches, int max_length) where MATCHES is the array of strings that matched, NUM_MATCHES is the number of strings in that array, and MAX_LENGTH is the length of the longest string in that array. */ extern rl_compdisp_func_t *rl_completion_display_matches_hook; /* Non-zero means that the results of the matches are to be treated as filenames. This is ALWAYS zero on entry, and can only be changed within a completion entry finder function. */ extern int rl_filename_completion_desired; /* Non-zero means that the results of the matches are to be quoted using double quotes (or an application-specific quoting mechanism) if the filename contains any characters in rl_word_break_chars. This is ALWAYS non-zero on entry, and can only be changed within a completion entry finder function. */ extern int rl_filename_quoting_desired; /* Set to a function to quote a filename in an application-specific fashion. Called with the text to quote, the type of match found (single or multiple) and a pointer to the quoting character to be used, which the function can reset if desired. */ extern rl_quote_func_t *rl_filename_quoting_function; /* Function to call to remove quoting characters from a filename. Called before completion is attempted, so the embedded quotes do not interfere with matching names in the file system. */ extern rl_dequote_func_t *rl_filename_dequoting_function; /* Function to call to decide whether or not a word break character is quoted. If a character is quoted, it does not break words for the completer. */ extern rl_linebuf_func_t *rl_char_is_quoted_p; /* Non-zero means to suppress normal filename completion after the user-specified completion function has been called. */ extern int rl_attempted_completion_over; /* Set to a character describing the type of completion being attempted by rl_complete_internal; available for use by application completion functions. */ extern int rl_completion_type; /* Set to the last key used to invoke one of the completion functions */ extern int rl_completion_invoking_key; /* Up to this many items will be displayed in response to a possible-completions call. After that, we ask the user if she is sure she wants to see them all. The default value is 100. */ extern int rl_completion_query_items; /* Character appended to completed words when at the end of the line. The default is a space. Nothing is added if this is '\0'. */ extern int rl_completion_append_character; /* If set to non-zero by an application completion function, rl_completion_append_character will not be appended. */ extern int rl_completion_suppress_append; /* Set to any quote character readline thinks it finds before any application completion function is called. */ extern int rl_completion_quote_character; /* Set to a non-zero value if readline found quoting anywhere in the word to be completed; set before any application completion function is called. */ extern int rl_completion_found_quote; /* If non-zero, the completion functions don't append any closing quote. This is set to 0 by rl_complete_internal and may be changed by an application-specific completion function. */ extern int rl_completion_suppress_quote; /* If non-zero, readline will sort the completion matches. On by default. */ extern int rl_sort_completion_matches; /* If non-zero, a slash will be appended to completed filenames that are symbolic links to directory names, subject to the value of the mark-directories variable (which is user-settable). This exists so that application completion functions can override the user's preference (set via the mark-symlinked-directories variable) if appropriate. It's set to the value of _rl_complete_mark_symlink_dirs in rl_complete_internal before any application-specific completion function is called, so without that function doing anything, the user's preferences are honored. */ extern int rl_completion_mark_symlink_dirs; /* If non-zero, then disallow duplicates in the matches. */ extern int rl_ignore_completion_duplicates; /* If this is non-zero, completion is (temporarily) inhibited, and the completion character will be inserted as any other. */ extern int rl_inhibit_completion; /* Input error; can be returned by (*rl_getc_function) if readline is reading a top-level command (RL_ISSTATE (RL_STATE_READCMD)). */ #define READERR (-2) /* Definitions available for use by readline clients. */ #define RL_PROMPT_START_IGNORE '\001' #define RL_PROMPT_END_IGNORE '\002' /* Possible values for do_replace argument to rl_filename_quoting_function, called by rl_complete_internal. */ #define NO_MATCH 0 #define SINGLE_MATCH 1 #define MULT_MATCH 2 /* Possible state values for rl_readline_state */ #define RL_STATE_NONE 0x000000 /* no state; before first call */ #define RL_STATE_INITIALIZING 0x0000001 /* initializing */ #define RL_STATE_INITIALIZED 0x0000002 /* initialization done */ #define RL_STATE_TERMPREPPED 0x0000004 /* terminal is prepped */ #define RL_STATE_READCMD 0x0000008 /* reading a command key */ #define RL_STATE_METANEXT 0x0000010 /* reading input after ESC */ #define RL_STATE_DISPATCHING 0x0000020 /* dispatching to a command */ #define RL_STATE_MOREINPUT 0x0000040 /* reading more input in a command function */ #define RL_STATE_ISEARCH 0x0000080 /* doing incremental search */ #define RL_STATE_NSEARCH 0x0000100 /* doing non-inc search */ #define RL_STATE_SEARCH 0x0000200 /* doing a history search */ #define RL_STATE_NUMERICARG 0x0000400 /* reading numeric argument */ #define RL_STATE_MACROINPUT 0x0000800 /* getting input from a macro */ #define RL_STATE_MACRODEF 0x0001000 /* defining keyboard macro */ #define RL_STATE_OVERWRITE 0x0002000 /* overwrite mode */ #define RL_STATE_COMPLETING 0x0004000 /* doing completion */ #define RL_STATE_SIGHANDLER 0x0008000 /* in readline sighandler */ #define RL_STATE_UNDOING 0x0010000 /* doing an undo */ #define RL_STATE_INPUTPENDING 0x0020000 /* rl_execute_next called */ #define RL_STATE_TTYCSAVED 0x0040000 /* tty special chars saved */ #define RL_STATE_CALLBACK 0x0080000 /* using the callback interface */ #define RL_STATE_VIMOTION 0x0100000 /* reading vi motion arg */ #define RL_STATE_MULTIKEY 0x0200000 /* reading multiple-key command */ #define RL_STATE_VICMDONCE 0x0400000 /* entered vi command mode at least once */ #define RL_STATE_REDISPLAYING 0x0800000 /* updating terminal display */ #define RL_STATE_DONE 0x1000000 /* done; accepted line */ #define RL_SETSTATE(x) (rl_readline_state |= (x)) #define RL_UNSETSTATE(x) (rl_readline_state &= ~(x)) #define RL_ISSTATE(x) (rl_readline_state & (x)) struct readline_state { /* line state */ int point; int end; int mark; char *buffer; int buflen; UNDO_LIST *ul; char *prompt; /* global state */ int rlstate; int done; Keymap kmap; /* input state */ rl_command_func_t *lastfunc; int insmode; int edmode; int kseqlen; FILE *inf; FILE *outf; int pendingin; char *macro; /* signal state */ int catchsigs; int catchsigwinch; /* search state */ /* completion state */ /* options state */ /* reserved for future expansion, so the struct size doesn't change */ char reserved[64]; }; extern int rl_save_state PARAMS((struct readline_state *)); extern int rl_restore_state PARAMS((struct readline_state *)); #ifdef __cplusplus } #endif #endif /* _READLINE_H_ */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/input.c����������������������������������������������������������������������0000644�0001750�0001750�00000031116�12250770610�015153� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* input.c -- character input functions for readline. */ /* Copyright (C) 1994-2010 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (__TANDEM) # include <floss.h> #endif #if defined (HAVE_CONFIG_H) # include <config.h> #endif #include <sys/types.h> #include <fcntl.h> #if defined (HAVE_SYS_FILE_H) # include <sys/file.h> #endif /* HAVE_SYS_FILE_H */ #if defined (HAVE_UNISTD_H) # include <unistd.h> #endif /* HAVE_UNISTD_H */ #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #include "posixselect.h" #if defined (FIONREAD_IN_SYS_IOCTL) # include <sys/ioctl.h> #endif #include <stdio.h> #include <errno.h> #if !defined (errno) extern int errno; #endif /* !errno */ /* System-specific feature definitions and include files. */ #include "rldefs.h" #include "rlmbutil.h" /* Some standard library routines. */ #include "readline.h" #include "rlprivate.h" #include "rlshell.h" #include "xmalloc.h" /* What kind of non-blocking I/O do we have? */ #if !defined (O_NDELAY) && defined (O_NONBLOCK) # define O_NDELAY O_NONBLOCK /* Posix style */ #endif /* Non-null means it is a pointer to a function to run while waiting for character input. */ rl_hook_func_t *rl_event_hook = (rl_hook_func_t *)NULL; rl_getc_func_t *rl_getc_function = rl_getc; static int _keyboard_input_timeout = 100000; /* 0.1 seconds; it's in usec */ static int ibuffer_space PARAMS((void)); static int rl_get_char PARAMS((int *)); static int rl_gather_tyi PARAMS((void)); /* **************************************************************** */ /* */ /* Character Input Buffering */ /* */ /* **************************************************************** */ static int pop_index, push_index; static unsigned char ibuffer[512]; static int ibuffer_len = sizeof (ibuffer) - 1; #define any_typein (push_index != pop_index) int _rl_any_typein () { return any_typein; } /* Return the amount of space available in the buffer for stuffing characters. */ static int ibuffer_space () { if (pop_index > push_index) return (pop_index - push_index - 1); else return (ibuffer_len - (push_index - pop_index)); } /* Get a key from the buffer of characters to be read. Return the key in KEY. Result is KEY if there was a key, or 0 if there wasn't. */ static int rl_get_char (key) int *key; { if (push_index == pop_index) return (0); *key = ibuffer[pop_index++]; #if 0 if (pop_index >= ibuffer_len) #else if (pop_index > ibuffer_len) #endif pop_index = 0; return (1); } /* Stuff KEY into the *front* of the input buffer. Returns non-zero if successful, zero if there is no space left in the buffer. */ int _rl_unget_char (key) int key; { if (ibuffer_space ()) { pop_index--; if (pop_index < 0) pop_index = ibuffer_len; ibuffer[pop_index] = key; return (1); } return (0); } int _rl_pushed_input_available () { return (push_index != pop_index); } /* If a character is available to be read, then read it and stuff it into IBUFFER. Otherwise, just return. Returns number of characters read (0 if none available) and -1 on error (EIO). */ static int rl_gather_tyi () { int tty; register int tem, result; int chars_avail, k; char input; #if defined(HAVE_SELECT) fd_set readfds, exceptfds; struct timeval timeout; #endif chars_avail = 0; tty = fileno (rl_instream); #if defined (HAVE_SELECT) FD_ZERO (&readfds); FD_ZERO (&exceptfds); FD_SET (tty, &readfds); FD_SET (tty, &exceptfds); USEC_TO_TIMEVAL (_keyboard_input_timeout, timeout); result = select (tty + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout); if (result <= 0) return 0; /* Nothing to read. */ #endif result = -1; #if defined (FIONREAD) errno = 0; result = ioctl (tty, FIONREAD, &chars_avail); if (result == -1 && errno == EIO) return -1; #endif #if defined (O_NDELAY) if (result == -1) { tem = fcntl (tty, F_GETFL, 0); fcntl (tty, F_SETFL, (tem | O_NDELAY)); chars_avail = read (tty, &input, 1); fcntl (tty, F_SETFL, tem); if (chars_avail == -1 && errno == EAGAIN) return 0; if (chars_avail == 0) /* EOF */ { rl_stuff_char (EOF); return (0); } } #endif /* O_NDELAY */ #if defined (__MINGW32__) /* Use getch/_kbhit to check for available console input, in the same way that we read it normally. */ chars_avail = isatty (tty) ? _kbhit () : 0; result = 0; #endif /* If there's nothing available, don't waste time trying to read something. */ if (chars_avail <= 0) return 0; tem = ibuffer_space (); if (chars_avail > tem) chars_avail = tem; /* One cannot read all of the available input. I can only read a single character at a time, or else programs which require input can be thwarted. If the buffer is larger than one character, I lose. Damn! */ if (tem < ibuffer_len) chars_avail = 0; if (result != -1) { while (chars_avail--) { RL_CHECK_SIGNALS (); k = (*rl_getc_function) (rl_instream); if (rl_stuff_char (k) == 0) break; /* some problem; no more room */ if (k == NEWLINE || k == RETURN) break; } } else { if (chars_avail) rl_stuff_char (input); } return 1; } int rl_set_keyboard_input_timeout (u) int u; { int o; o = _keyboard_input_timeout; if (u >= 0) _keyboard_input_timeout = u; return (o); } /* Is there input available to be read on the readline input file descriptor? Only works if the system has select(2) or FIONREAD. Uses the value of _keyboard_input_timeout as the timeout; if another readline function wants to specify a timeout and not leave it up to the user, it should use _rl_input_queued(timeout_value_in_microseconds) instead. */ int _rl_input_available () { #if defined(HAVE_SELECT) fd_set readfds, exceptfds; struct timeval timeout; #endif #if !defined (HAVE_SELECT) && defined(FIONREAD) int chars_avail; #endif int tty; tty = fileno (rl_instream); #if defined (HAVE_SELECT) FD_ZERO (&readfds); FD_ZERO (&exceptfds); FD_SET (tty, &readfds); FD_SET (tty, &exceptfds); timeout.tv_sec = 0; timeout.tv_usec = _keyboard_input_timeout; return (select (tty + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout) > 0); #else #if defined (FIONREAD) if (ioctl (tty, FIONREAD, &chars_avail) == 0) return (chars_avail); #endif #endif #if defined (__MINGW32__) if (isatty (tty)) return (_kbhit ()); #endif return 0; } int _rl_input_queued (t) int t; { int old_timeout, r; old_timeout = rl_set_keyboard_input_timeout (t); r = _rl_input_available (); rl_set_keyboard_input_timeout (old_timeout); return r; } void _rl_insert_typein (c) int c; { int key, t, i; char *string; i = key = 0; string = (char *)xmalloc (ibuffer_len + 1); string[i++] = (char) c; while ((t = rl_get_char (&key)) && _rl_keymap[key].type == ISFUNC && _rl_keymap[key].function == rl_insert) string[i++] = key; if (t) _rl_unget_char (key); string[i] = '\0'; rl_insert_text (string); xfree (string); } /* Add KEY to the buffer of characters to be read. Returns 1 if the character was stuffed correctly; 0 otherwise. */ int rl_stuff_char (key) int key; { if (ibuffer_space () == 0) return 0; if (key == EOF) { key = NEWLINE; rl_pending_input = EOF; RL_SETSTATE (RL_STATE_INPUTPENDING); } ibuffer[push_index++] = key; #if 0 if (push_index >= ibuffer_len) #else if (push_index > ibuffer_len) #endif push_index = 0; return 1; } /* Make C be the next command to be executed. */ int rl_execute_next (c) int c; { rl_pending_input = c; RL_SETSTATE (RL_STATE_INPUTPENDING); return 0; } /* Clear any pending input pushed with rl_execute_next() */ int rl_clear_pending_input () { rl_pending_input = 0; RL_UNSETSTATE (RL_STATE_INPUTPENDING); return 0; } /* **************************************************************** */ /* */ /* Character Input */ /* */ /* **************************************************************** */ /* Read a key, including pending input. */ int rl_read_key () { int c; rl_key_sequence_length++; if (rl_pending_input) { c = rl_pending_input; rl_clear_pending_input (); } else { /* If input is coming from a macro, then use that. */ if (c = _rl_next_macro_key ()) return (c); /* If the user has an event function, then call it periodically. */ if (rl_event_hook) { while (rl_event_hook) { if (rl_gather_tyi () < 0) /* XXX - EIO */ { rl_done = 1; return ('\n'); } RL_CHECK_SIGNALS (); if (rl_get_char (&c) != 0) break; if (rl_done) /* XXX - experimental */ return ('\n'); (*rl_event_hook) (); } } else { if (rl_get_char (&c) == 0) c = (*rl_getc_function) (rl_instream); RL_CHECK_SIGNALS (); } } return (c); } int rl_getc (stream) FILE *stream; { int result; unsigned char c; while (1) { RL_CHECK_SIGNALS (); #if defined (__MINGW32__) if (isatty (fileno (stream))) return (getch ()); #endif result = read (fileno (stream), &c, sizeof (unsigned char)); if (result == sizeof (unsigned char)) return (c); /* If zero characters are returned, then the file that we are reading from is empty! Return EOF in that case. */ if (result == 0) return (EOF); #if defined (__BEOS__) if (errno == EINTR) continue; #endif #if defined (EWOULDBLOCK) # define X_EWOULDBLOCK EWOULDBLOCK #else # define X_EWOULDBLOCK -99 #endif #if defined (EAGAIN) # define X_EAGAIN EAGAIN #else # define X_EAGAIN -99 #endif if (errno == X_EWOULDBLOCK || errno == X_EAGAIN) { if (sh_unset_nodelay_mode (fileno (stream)) < 0) return (EOF); continue; } #undef X_EWOULDBLOCK #undef X_EAGAIN /* If the error that we received was SIGINT, then try again, this is simply an interrupted system call to read (). Otherwise, some error ocurred, also signifying EOF. */ if (errno != EINTR) return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF); } } #if defined (HANDLE_MULTIBYTE) /* read multibyte char */ int _rl_read_mbchar (mbchar, size) char *mbchar; int size; { int mb_len, c; size_t mbchar_bytes_length; wchar_t wc; mbstate_t ps, ps_back; memset(&ps, 0, sizeof (mbstate_t)); memset(&ps_back, 0, sizeof (mbstate_t)); mb_len = 0; while (mb_len < size) { RL_SETSTATE(RL_STATE_MOREINPUT); c = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); if (c < 0) break; mbchar[mb_len++] = c; mbchar_bytes_length = mbrtowc (&wc, mbchar, mb_len, &ps); if (mbchar_bytes_length == (size_t)(-1)) break; /* invalid byte sequence for the current locale */ else if (mbchar_bytes_length == (size_t)(-2)) { /* shorted bytes */ ps = ps_back; continue; } else if (mbchar_bytes_length == 0) { mbchar[0] = '\0'; /* null wide character */ mb_len = 1; break; } else if (mbchar_bytes_length > (size_t)(0)) break; } return mb_len; } /* Read a multibyte-character string whose first character is FIRST into the buffer MB of length MLEN. Returns the last character read, which may be FIRST. Used by the search functions, among others. Very similar to _rl_read_mbchar. */ int _rl_read_mbstring (first, mb, mlen) int first; char *mb; int mlen; { int i, c; mbstate_t ps; c = first; memset (mb, 0, mlen); for (i = 0; c >= 0 && i < mlen; i++) { mb[i] = (char)c; memset (&ps, 0, sizeof (mbstate_t)); if (_rl_get_char_len (mb, &ps) == -2) { /* Read more for multibyte character */ RL_SETSTATE (RL_STATE_MOREINPUT); c = rl_read_key (); RL_UNSETSTATE (RL_STATE_MOREINPUT); } else break; } return c; } #endif /* HANDLE_MULTIBYTE */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/callback.c�������������������������������������������������������������������0000644�0001750�0001750�00000016533�12250770610�015556� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* callback.c -- functions to use readline as an X `callback' mechanism. */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include <config.h> #endif #include "rlconf.h" #if defined (READLINE_CALLBACKS) #include <sys/types.h> #ifdef HAVE_STDLIB_H # include <stdlib.h> #else # include "ansi_stdlib.h" #endif #include <stdio.h> /* System-specific feature definitions and include files. */ #include "rldefs.h" #include "readline.h" #include "rlprivate.h" #include "xmalloc.h" /* Private data for callback registration functions. See comments in rl_callback_read_char for more details. */ _rl_callback_func_t *_rl_callback_func = 0; _rl_callback_generic_arg *_rl_callback_data = 0; /* **************************************************************** */ /* */ /* Callback Readline Functions */ /* */ /* **************************************************************** */ /* Allow using readline in situations where a program may have multiple things to handle at once, and dispatches them via select(). Call rl_callback_handler_install() with the prompt and a function to call whenever a complete line of input is ready. The user must then call rl_callback_read_char() every time some input is available, and rl_callback_read_char() will call the user's function with the complete text read in at each end of line. The terminal is kept prepped and signals handled all the time, except during calls to the user's function. */ rl_vcpfunc_t *rl_linefunc; /* user callback function */ static int in_handler; /* terminal_prepped and signals set? */ /* Make sure the terminal is set up, initialize readline, and prompt. */ static void _rl_callback_newline () { rl_initialize (); if (in_handler == 0) { in_handler = 1; if (rl_prep_term_function) (*rl_prep_term_function) (_rl_meta_flag); #if defined (HANDLE_SIGNALS) rl_set_signals (); #endif } readline_internal_setup (); RL_CHECK_SIGNALS (); } /* Install a readline handler, set up the terminal, and issue the prompt. */ void rl_callback_handler_install (prompt, linefunc) const char *prompt; rl_vcpfunc_t *linefunc; { rl_set_prompt (prompt); RL_SETSTATE (RL_STATE_CALLBACK); rl_linefunc = linefunc; _rl_callback_newline (); } /* Read one character, and dispatch to the handler if it ends the line. */ void rl_callback_read_char () { char *line; int eof, jcode; static procenv_t olevel; if (rl_linefunc == NULL) { _rl_errmsg ("readline_callback_read_char() called with no handler!"); abort (); } memcpy ((void *)olevel, (void *)_rl_top_level, sizeof (procenv_t)); jcode = setjmp (_rl_top_level); if (jcode) { (*rl_redisplay_function) (); _rl_want_redisplay = 0; memcpy ((void *)_rl_top_level, (void *)olevel, sizeof (procenv_t)); return; } do { RL_CHECK_SIGNALS (); if (RL_ISSTATE (RL_STATE_ISEARCH)) { eof = _rl_isearch_callback (_rl_iscxt); if (eof == 0 && (RL_ISSTATE (RL_STATE_ISEARCH) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING)) rl_callback_read_char (); return; } else if (RL_ISSTATE (RL_STATE_NSEARCH)) { eof = _rl_nsearch_callback (_rl_nscxt); return; } #if defined (VI_MODE) else if (RL_ISSTATE (RL_STATE_VIMOTION)) { eof = _rl_vi_domove_callback (_rl_vimvcxt); /* Should handle everything, including cleanup, numeric arguments, and turning off RL_STATE_VIMOTION */ if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) _rl_internal_char_cleanup (); return; } #endif else if (RL_ISSTATE (RL_STATE_NUMERICARG)) { eof = _rl_arg_callback (_rl_argcxt); if (eof == 0 && (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING)) rl_callback_read_char (); /* XXX - this should handle _rl_last_command_was_kill better */ else if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) _rl_internal_char_cleanup (); return; } else if (RL_ISSTATE (RL_STATE_MULTIKEY)) { eof = _rl_dispatch_callback (_rl_kscxt); /* For now */ while ((eof == -1 || eof == -2) && RL_ISSTATE (RL_STATE_MULTIKEY) && _rl_kscxt && (_rl_kscxt->flags & KSEQ_DISPATCHED)) eof = _rl_dispatch_callback (_rl_kscxt); if (RL_ISSTATE (RL_STATE_MULTIKEY) == 0) { _rl_internal_char_cleanup (); _rl_want_redisplay = 1; } } else if (_rl_callback_func) { /* This allows functions that simply need to read an additional character (like quoted-insert) to register a function to be called when input is available. _rl_callback_data is simply a pointer to a struct that has the argument count originally passed to the registering function and space for any additional parameters. */ eof = (*_rl_callback_func) (_rl_callback_data); /* If the function `deregisters' itself, make sure the data is cleaned up. */ if (_rl_callback_func == 0) { if (_rl_callback_data) { _rl_callback_data_dispose (_rl_callback_data); _rl_callback_data = 0; } _rl_internal_char_cleanup (); } } else eof = readline_internal_char (); RL_CHECK_SIGNALS (); if (rl_done == 0 && _rl_want_redisplay) { (*rl_redisplay_function) (); _rl_want_redisplay = 0; } if (rl_done) { line = readline_internal_teardown (eof); if (rl_deprep_term_function) (*rl_deprep_term_function) (); #if defined (HANDLE_SIGNALS) rl_clear_signals (); #endif in_handler = 0; (*rl_linefunc) (line); /* If the user did not clear out the line, do it for him. */ if (rl_line_buffer[0]) _rl_init_line_state (); /* Redisplay the prompt if readline_handler_{install,remove} not called. */ if (in_handler == 0 && rl_linefunc) _rl_callback_newline (); } } while (rl_pending_input || _rl_pushed_input_available () || RL_ISSTATE (RL_STATE_MACROINPUT)); } /* Remove the handler, and make sure the terminal is in its normal state. */ void rl_callback_handler_remove () { rl_linefunc = NULL; RL_UNSETSTATE (RL_STATE_CALLBACK); RL_CHECK_SIGNALS (); if (in_handler) { in_handler = 0; if (rl_deprep_term_function) (*rl_deprep_term_function) (); #if defined (HANDLE_SIGNALS) rl_clear_signals (); #endif } } _rl_callback_generic_arg * _rl_callback_data_alloc (count) int count; { _rl_callback_generic_arg *arg; arg = (_rl_callback_generic_arg *)xmalloc (sizeof (_rl_callback_generic_arg)); arg->count = count; arg->i1 = arg->i2 = 0; return arg; } void _rl_callback_data_dispose (arg) _rl_callback_generic_arg *arg; { xfree (arg); } #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/rlprivate.h������������������������������������������������������������������0000644�0001750�0001750�00000036576�12250770610�016050� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* rlprivate.h -- functions and variables global to the readline library, but not intended for use by applications. */ /* Copyright (C) 1999-2010 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #if !defined (_RL_PRIVATE_H_) #define _RL_PRIVATE_H_ #include "rlconf.h" /* for VISIBLE_STATS */ #include "rlstdc.h" #include "posixjmp.h" /* defines procenv_t */ /************************************************************************* * * * Convenience definitions * * * *************************************************************************/ #define EMACS_MODE() (rl_editing_mode == emacs_mode) #define VI_COMMAND_MODE() (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap) #define VI_INSERT_MODE() (rl_editing_mode == vi_mode && _rl_keymap == vi_insertion_keymap) #define RL_CHECK_SIGNALS() \ do { \ if (_rl_caught_signal) _rl_signal_handler (_rl_caught_signal); \ } while (0) /************************************************************************* * * * Global structs undocumented in texinfo manual and not in readline.h * * * *************************************************************************/ /* search types */ #define RL_SEARCH_ISEARCH 0x01 /* incremental search */ #define RL_SEARCH_NSEARCH 0x02 /* non-incremental search */ #define RL_SEARCH_CSEARCH 0x04 /* intra-line char search */ /* search flags */ #define SF_REVERSE 0x01 #define SF_FOUND 0x02 #define SF_FAILED 0x04 #define SF_CHGKMAP 0x08 typedef struct __rl_search_context { int type; int sflags; char *search_string; int search_string_index; int search_string_size; char **lines; char *allocated_line; int hlen; int hindex; int save_point; int save_mark; int save_line; int last_found_line; char *prev_line_found; UNDO_LIST *save_undo_list; Keymap keymap; /* used when dispatching commands in search string */ Keymap okeymap; /* original keymap */ int history_pos; int direction; int lastc; #if defined (HANDLE_MULTIBYTE) char mb[MB_LEN_MAX]; #endif char *sline; int sline_len; int sline_index; char *search_terminators; } _rl_search_cxt; /* Callback data for reading numeric arguments */ #define NUM_SAWMINUS 0x01 #define NUM_SAWDIGITS 0x02 #define NUM_READONE 0x04 typedef int _rl_arg_cxt; /* A context for reading key sequences longer than a single character when using the callback interface. */ #define KSEQ_DISPATCHED 0x01 #define KSEQ_SUBSEQ 0x02 #define KSEQ_RECURSIVE 0x04 typedef struct __rl_keyseq_context { int flags; int subseq_arg; int subseq_retval; /* XXX */ Keymap dmap; Keymap oldmap; int okey; struct __rl_keyseq_context *ocxt; int childval; } _rl_keyseq_cxt; /* vi-mode commands that use result of motion command to define boundaries */ #define VIM_DELETE 0x01 #define VIM_CHANGE 0x02 #define VIM_YANK 0x04 /* various states for vi-mode commands that use motion commands. reflects RL_READLINE_STATE */ #define VMSTATE_READ 0x01 #define VMSTATE_NUMARG 0x02 typedef struct __rl_vimotion_context { int op; int state; int flags; /* reserved */ _rl_arg_cxt ncxt; int numeric_arg; int start, end; /* rl_point, rl_end */ int key, motion; /* initial key, motion command */ } _rl_vimotion_cxt; /* fill in more as needed */ /* `Generic' callback data and functions */ typedef struct __rl_callback_generic_arg { int count; int i1, i2; /* add here as needed */ } _rl_callback_generic_arg; typedef int _rl_callback_func_t PARAMS((_rl_callback_generic_arg *)); /************************************************************************* * * * Global functions undocumented in texinfo manual and not in readline.h * * * *************************************************************************/ /************************************************************************* * * * Global variables undocumented in texinfo manual and not in readline.h * * * *************************************************************************/ /* complete.c */ extern int rl_complete_with_tilde_expansion; #if defined (VISIBLE_STATS) extern int rl_visible_stats; #endif /* VISIBLE_STATS */ /* readline.c */ extern int rl_line_buffer_len; extern int rl_arg_sign; extern int rl_visible_prompt_length; extern int rl_key_sequence_length; extern int rl_byte_oriented; /* display.c */ extern int rl_display_fixed; /* parens.c */ extern int rl_blink_matching_paren; /************************************************************************* * * * Global functions and variables unsed and undocumented * * * *************************************************************************/ /* kill.c */ extern int rl_set_retained_kills PARAMS((int)); /* terminal.c */ extern void _rl_set_screen_size PARAMS((int, int)); /* undo.c */ extern int _rl_fix_last_undo_of_type PARAMS((int, int, int)); /* util.c */ extern char *_rl_savestring PARAMS((const char *)); /************************************************************************* * * * Functions and variables private to the readline library * * * *************************************************************************/ /* NOTE: Functions and variables prefixed with `_rl_' are pseudo-global: they are global so they can be shared between files in the readline library, but are not intended to be visible to readline callers. */ /************************************************************************* * Undocumented private functions * *************************************************************************/ #if defined(READLINE_CALLBACKS) /* readline.c */ extern void readline_internal_setup PARAMS((void)); extern char *readline_internal_teardown PARAMS((int)); extern int readline_internal_char PARAMS((void)); extern _rl_keyseq_cxt *_rl_keyseq_cxt_alloc PARAMS((void)); extern void _rl_keyseq_cxt_dispose PARAMS((_rl_keyseq_cxt *)); extern void _rl_keyseq_chain_dispose PARAMS((void)); extern int _rl_dispatch_callback PARAMS((_rl_keyseq_cxt *)); /* callback.c */ extern _rl_callback_generic_arg *_rl_callback_data_alloc PARAMS((int)); extern void _rl_callback_data_dispose PARAMS((_rl_callback_generic_arg *)); #endif /* READLINE_CALLBACKS */ /* bind.c */ /* complete.c */ extern void _rl_reset_completion_state PARAMS((void)); extern char _rl_find_completion_word PARAMS((int *, int *)); extern void _rl_free_match_list PARAMS((char **)); /* display.c */ extern char *_rl_strip_prompt PARAMS((char *)); extern void _rl_move_cursor_relative PARAMS((int, const char *)); extern void _rl_move_vert PARAMS((int)); extern void _rl_save_prompt PARAMS((void)); extern void _rl_restore_prompt PARAMS((void)); extern char *_rl_make_prompt_for_search PARAMS((int)); extern void _rl_erase_at_end_of_line PARAMS((int)); extern void _rl_clear_to_eol PARAMS((int)); extern void _rl_clear_screen PARAMS((void)); extern void _rl_update_final PARAMS((void)); extern void _rl_redisplay_after_sigwinch PARAMS((void)); extern void _rl_clean_up_for_exit PARAMS((void)); extern void _rl_erase_entire_line PARAMS((void)); extern int _rl_current_display_line PARAMS((void)); /* input.c */ extern int _rl_any_typein PARAMS((void)); extern int _rl_input_available PARAMS((void)); extern int _rl_input_queued PARAMS((int)); extern void _rl_insert_typein PARAMS((int)); extern int _rl_unget_char PARAMS((int)); extern int _rl_pushed_input_available PARAMS((void)); /* isearch.c */ extern _rl_search_cxt *_rl_scxt_alloc PARAMS((int, int)); extern void _rl_scxt_dispose PARAMS((_rl_search_cxt *, int)); extern int _rl_isearch_dispatch PARAMS((_rl_search_cxt *, int)); extern int _rl_isearch_callback PARAMS((_rl_search_cxt *)); extern int _rl_search_getchar PARAMS((_rl_search_cxt *)); /* macro.c */ extern void _rl_with_macro_input PARAMS((char *)); extern int _rl_next_macro_key PARAMS((void)); extern void _rl_push_executing_macro PARAMS((void)); extern void _rl_pop_executing_macro PARAMS((void)); extern void _rl_add_macro_char PARAMS((int)); extern void _rl_kill_kbd_macro PARAMS((void)); /* misc.c */ extern int _rl_arg_overflow PARAMS((void)); extern void _rl_arg_init PARAMS((void)); extern int _rl_arg_getchar PARAMS((void)); extern int _rl_arg_callback PARAMS((_rl_arg_cxt)); extern void _rl_reset_argument PARAMS((void)); extern void _rl_start_using_history PARAMS((void)); extern int _rl_free_saved_history_line PARAMS((void)); extern void _rl_set_insert_mode PARAMS((int, int)); extern void _rl_revert_all_lines PARAMS((void)); /* nls.c */ extern int _rl_init_eightbit PARAMS((void)); /* parens.c */ extern void _rl_enable_paren_matching PARAMS((int)); /* readline.c */ extern void _rl_init_line_state PARAMS((void)); extern void _rl_set_the_line PARAMS((void)); extern int _rl_dispatch PARAMS((int, Keymap)); extern int _rl_dispatch_subseq PARAMS((int, Keymap, int)); extern void _rl_internal_char_cleanup PARAMS((void)); /* rltty.c */ extern int _rl_disable_tty_signals PARAMS((void)); extern int _rl_restore_tty_signals PARAMS((void)); /* search.c */ extern int _rl_nsearch_callback PARAMS((_rl_search_cxt *)); /* signals.c */ extern void _rl_signal_handler PARAMS((int)); extern void _rl_block_sigint PARAMS((void)); extern void _rl_release_sigint PARAMS((void)); extern void _rl_block_sigwinch PARAMS((void)); extern void _rl_release_sigwinch PARAMS((void)); /* terminal.c */ extern void _rl_get_screen_size PARAMS((int, int)); extern int _rl_init_terminal_io PARAMS((const char *)); #ifdef _MINIX extern void _rl_output_character_function PARAMS((int)); #else extern int _rl_output_character_function PARAMS((int)); #endif extern void _rl_output_some_chars PARAMS((const char *, int)); extern int _rl_backspace PARAMS((int)); extern void _rl_enable_meta_key PARAMS((void)); extern void _rl_control_keypad PARAMS((int)); extern void _rl_set_cursor PARAMS((int, int)); /* text.c */ extern void _rl_fix_point PARAMS((int)); extern int _rl_replace_text PARAMS((const char *, int, int)); extern int _rl_forward_char_internal PARAMS((int)); extern int _rl_insert_char PARAMS((int, int)); extern int _rl_overwrite_char PARAMS((int, int)); extern int _rl_overwrite_rubout PARAMS((int, int)); extern int _rl_rubout_char PARAMS((int, int)); #if defined (HANDLE_MULTIBYTE) extern int _rl_char_search_internal PARAMS((int, int, char *, int)); #else extern int _rl_char_search_internal PARAMS((int, int, int)); #endif extern int _rl_set_mark_at_pos PARAMS((int)); /* undo.c */ extern UNDO_LIST *_rl_copy_undo_entry PARAMS((UNDO_LIST *)); extern UNDO_LIST *_rl_copy_undo_list PARAMS((UNDO_LIST *)); /* util.c */ #if defined (USE_VARARGS) && defined (PREFER_STDARG) extern void _rl_ttymsg (const char *, ...) __attribute__((__format__ (printf, 1, 2))); extern void _rl_errmsg (const char *, ...) __attribute__((__format__ (printf, 1, 2))); extern void _rl_trace (const char *, ...) __attribute__((__format__ (printf, 1, 2))); #else extern void _rl_ttymsg (); extern void _rl_errmsg (); extern void _rl_trace (); #endif extern int _rl_tropen PARAMS((void)); extern int _rl_abort_internal PARAMS((void)); extern int _rl_null_function PARAMS((int, int)); extern char *_rl_strindex PARAMS((const char *, const char *)); extern int _rl_qsort_string_compare PARAMS((char **, char **)); extern int (_rl_uppercase_p) PARAMS((int)); extern int (_rl_lowercase_p) PARAMS((int)); extern int (_rl_pure_alphabetic) PARAMS((int)); extern int (_rl_digit_p) PARAMS((int)); extern int (_rl_to_lower) PARAMS((int)); extern int (_rl_to_upper) PARAMS((int)); extern int (_rl_digit_value) PARAMS((int)); /* vi_mode.c */ extern void _rl_vi_initialize_line PARAMS((void)); extern void _rl_vi_reset_last PARAMS((void)); extern void _rl_vi_set_last PARAMS((int, int, int)); extern int _rl_vi_textmod_command PARAMS((int)); extern void _rl_vi_done_inserting PARAMS((void)); extern int _rl_vi_domove_callback PARAMS((_rl_vimotion_cxt *)); /************************************************************************* * Undocumented private variables * *************************************************************************/ /* bind.c */ extern const char * const _rl_possible_control_prefixes[]; extern const char * const _rl_possible_meta_prefixes[]; /* callback.c */ extern _rl_callback_func_t *_rl_callback_func; extern _rl_callback_generic_arg *_rl_callback_data; /* complete.c */ extern int _rl_complete_show_all; extern int _rl_complete_show_unmodified; extern int _rl_complete_mark_directories; extern int _rl_complete_mark_symlink_dirs; extern int _rl_completion_prefix_display_length; extern int _rl_completion_columns; extern int _rl_print_completions_horizontally; extern int _rl_completion_case_fold; extern int _rl_completion_case_map; extern int _rl_match_hidden_files; extern int _rl_page_completions; extern int _rl_skip_completed_text; extern int _rl_menu_complete_prefix_first; /* display.c */ extern int _rl_vis_botlin; extern int _rl_last_c_pos; extern int _rl_suppress_redisplay; extern int _rl_want_redisplay; /* isearch.c */ extern char *_rl_isearch_terminators; extern _rl_search_cxt *_rl_iscxt; /* macro.c */ extern char *_rl_executing_macro; /* misc.c */ extern int _rl_history_preserve_point; extern int _rl_history_saved_point; extern _rl_arg_cxt _rl_argcxt; /* readline.c */ extern int _rl_echoing_p; extern int _rl_horizontal_scroll_mode; extern int _rl_mark_modified_lines; extern int _rl_bell_preference; extern int _rl_meta_flag; extern int _rl_convert_meta_chars_to_ascii; extern int _rl_output_meta_chars; extern int _rl_bind_stty_chars; extern int _rl_revert_all_at_newline; extern int _rl_echo_control_chars; extern char *_rl_comment_begin; extern unsigned char _rl_parsing_conditionalized_out; extern Keymap _rl_keymap; extern FILE *_rl_in_stream; extern FILE *_rl_out_stream; extern int _rl_last_command_was_kill; extern int _rl_eof_char; extern procenv_t _rl_top_level; extern _rl_keyseq_cxt *_rl_kscxt; /* search.c */ extern _rl_search_cxt *_rl_nscxt; /* signals.c */ extern int _rl_interrupt_immediately; extern int volatile _rl_caught_signal; extern int _rl_echoctl; extern int _rl_intr_char; extern int _rl_quit_char; extern int _rl_susp_char; /* terminal.c */ extern int _rl_enable_keypad; extern int _rl_enable_meta; extern char *_rl_term_clreol; extern char *_rl_term_clrpag; extern char *_rl_term_im; extern char *_rl_term_ic; extern char *_rl_term_ei; extern char *_rl_term_DC; extern char *_rl_term_up; extern char *_rl_term_dc; extern char *_rl_term_cr; extern char *_rl_term_IC; extern char *_rl_term_forward_char; extern int _rl_screenheight; extern int _rl_screenwidth; extern int _rl_screenchars; extern int _rl_terminal_can_insert; extern int _rl_term_autowrap; /* undo.c */ extern int _rl_doing_an_undo; extern int _rl_undo_group_level; /* vi_mode.c */ extern int _rl_vi_last_command; extern _rl_vimotion_cxt *_rl_vimvcxt; #endif /* _RL_PRIVATE_H_ */ ����������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/readline.c�������������������������������������������������������������������0000644�0001750�0001750�00000101171�12250773212�015577� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* readline.c -- a general facility for reading lines of input with emacs style editing and completion. */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include <config.h> #endif #include <sys/types.h> #include "posixstat.h" #include <fcntl.h> #if defined (HAVE_SYS_FILE_H) # include <sys/file.h> #endif /* HAVE_SYS_FILE_H */ #if defined (HAVE_UNISTD_H) # include <unistd.h> #endif /* HAVE_UNISTD_H */ #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #if defined (HAVE_LOCALE_H) # include <locale.h> #endif #include <stdio.h> #include "posixjmp.h" #include <errno.h> #if !defined (errno) extern int errno; #endif /* !errno */ /* System-specific feature definitions and include files. */ #include "rldefs.h" #include "rlmbutil.h" #if defined (__EMX__) # define INCL_DOSPROCESS # include <os2.h> #endif /* __EMX__ */ /* Some standard library routines. */ #include "readline.h" #include "history.h" #include "rlprivate.h" #include "rlshell.h" #include "xmalloc.h" #ifndef RL_LIBRARY_VERSION # define RL_LIBRARY_VERSION "5.1" #endif #ifndef RL_READLINE_VERSION # define RL_READLINE_VERSION 0x0501 #endif extern void _rl_free_history_entry PARAMS((HIST_ENTRY *)); /* Forward declarations used in this file. */ static char *readline_internal PARAMS((void)); static void readline_initialize_everything PARAMS((void)); static void bind_arrow_keys_internal PARAMS((Keymap)); static void bind_arrow_keys PARAMS((void)); static void readline_default_bindings PARAMS((void)); static void reset_default_bindings PARAMS((void)); static int _rl_subseq_result PARAMS((int, Keymap, int, int)); static int _rl_subseq_getchar PARAMS((int)); /* **************************************************************** */ /* */ /* Line editing input utility */ /* */ /* **************************************************************** */ const char *rl_library_version = RL_LIBRARY_VERSION; int rl_readline_version = RL_READLINE_VERSION; /* True if this is `real' readline as opposed to some stub substitute. */ int rl_gnu_readline_p = 1; /* A pointer to the keymap that is currently in use. By default, it is the standard emacs keymap. */ Keymap _rl_keymap = emacs_standard_keymap; /* The current style of editing. */ int rl_editing_mode = emacs_mode; /* The current insert mode: input (the default) or overwrite */ int rl_insert_mode = RL_IM_DEFAULT; /* Non-zero if we called this function from _rl_dispatch(). It's present so functions can find out whether they were called from a key binding or directly from an application. */ int rl_dispatching; /* Non-zero if the previous command was a kill command. */ int _rl_last_command_was_kill = 0; /* The current value of the numeric argument specified by the user. */ int rl_numeric_arg = 1; /* Non-zero if an argument was typed. */ int rl_explicit_arg = 0; /* Temporary value used while generating the argument. */ int rl_arg_sign = 1; /* Non-zero means we have been called at least once before. */ static int rl_initialized; #if 0 /* If non-zero, this program is running in an EMACS buffer. */ static int running_in_emacs; #endif /* Flags word encapsulating the current readline state. */ int rl_readline_state = RL_STATE_NONE; /* The current offset in the current input line. */ int rl_point; /* Mark in the current input line. */ int rl_mark; /* Length of the current input line. */ int rl_end; /* Make this non-zero to return the current input_line. */ int rl_done; /* The last function executed by readline. */ rl_command_func_t *rl_last_func = (rl_command_func_t *)NULL; /* Top level environment for readline_internal (). */ procenv_t _rl_top_level; /* The streams we interact with. */ FILE *_rl_in_stream, *_rl_out_stream; /* The names of the streams that we do input and output to. */ FILE *rl_instream = (FILE *)NULL; FILE *rl_outstream = (FILE *)NULL; /* Non-zero means echo characters as they are read. Defaults to no echo; set to 1 if there is a controlling terminal, we can get its attributes, and the attributes include `echo'. Look at rltty.c:prepare_terminal_settings for the code that sets it. */ int _rl_echoing_p = 0; /* Current prompt. */ char *rl_prompt = (char *)NULL; int rl_visible_prompt_length = 0; /* Set to non-zero by calling application if it has already printed rl_prompt and does not want readline to do it the first time. */ int rl_already_prompted = 0; /* The number of characters read in order to type this complete command. */ int rl_key_sequence_length = 0; /* If non-zero, then this is the address of a function to call just before readline_internal_setup () prints the first prompt. */ rl_hook_func_t *rl_startup_hook = (rl_hook_func_t *)NULL; /* If non-zero, this is the address of a function to call just before readline_internal_setup () returns and readline_internal starts reading input characters. */ rl_hook_func_t *rl_pre_input_hook = (rl_hook_func_t *)NULL; /* What we use internally. You should always refer to RL_LINE_BUFFER. */ static char *the_line; /* The character that can generate an EOF. Really read from the terminal driver... just defaulted here. */ int _rl_eof_char = CTRL ('D'); /* Non-zero makes this the next keystroke to read. */ int rl_pending_input = 0; /* Pointer to a useful terminal name. */ const char *rl_terminal_name = (const char *)NULL; /* Non-zero means to always use horizontal scrolling in line display. */ int _rl_horizontal_scroll_mode = 0; /* Non-zero means to display an asterisk at the starts of history lines which have been modified. */ int _rl_mark_modified_lines = 0; /* The style of `bell' notification preferred. This can be set to NO_BELL, AUDIBLE_BELL, or VISIBLE_BELL. */ int _rl_bell_preference = AUDIBLE_BELL; /* String inserted into the line by rl_insert_comment (). */ char *_rl_comment_begin; /* Keymap holding the function currently being executed. */ Keymap rl_executing_keymap; /* Keymap we're currently using to dispatch. */ Keymap _rl_dispatching_keymap; /* Non-zero means to erase entire line, including prompt, on empty input lines. */ int rl_erase_empty_line = 0; /* Non-zero means to read only this many characters rather than up to a character bound to accept-line. */ int rl_num_chars_to_read; /* Line buffer and maintenence. */ char *rl_line_buffer = (char *)NULL; int rl_line_buffer_len = 0; /* Key sequence `contexts' */ _rl_keyseq_cxt *_rl_kscxt = 0; /* Forward declarations used by the display, termcap, and history code. */ /* **************************************************************** */ /* */ /* `Forward' declarations */ /* */ /* **************************************************************** */ /* Non-zero means do not parse any lines other than comments and parser directives. */ unsigned char _rl_parsing_conditionalized_out = 0; /* Non-zero means to convert characters with the meta bit set to escape-prefixed characters so we can indirect through emacs_meta_keymap or vi_escape_keymap. */ int _rl_convert_meta_chars_to_ascii = 1; /* Non-zero means to output characters with the meta bit set directly rather than as a meta-prefixed escape sequence. */ int _rl_output_meta_chars = 0; /* Non-zero means to look at the termios special characters and bind them to equivalent readline functions at startup. */ int _rl_bind_stty_chars = 1; /* Non-zero means to go through the history list at every newline (or whenever rl_done is set and readline returns) and revert each line to its initial state. */ int _rl_revert_all_at_newline = 0; /* Non-zero means to honor the termios ECHOCTL bit and echo control characters corresponding to keyboard-generated signals. */ int _rl_echo_control_chars = 1; /* **************************************************************** */ /* */ /* Top Level Functions */ /* */ /* **************************************************************** */ /* Non-zero means treat 0200 bit in terminal input as Meta bit. */ int _rl_meta_flag = 0; /* Forward declaration */ /* Set up the prompt and expand it. Called from readline() and rl_callback_handler_install (). */ int rl_set_prompt (prompt) const char *prompt; { FREE (rl_prompt); rl_prompt = prompt ? savestring (prompt) : (char *)NULL; rl_display_prompt = rl_prompt ? rl_prompt : ""; rl_visible_prompt_length = rl_expand_prompt (rl_prompt); return 0; } /* Read a line of input. Prompt with PROMPT. An empty PROMPT means none. A return value of NULL means that EOF was encountered. */ char * readline (prompt) const char *prompt; { char *value; #if 0 int in_callback; #endif /* If we are at EOF return a NULL string. */ if (rl_pending_input == EOF) { rl_clear_pending_input (); return ((char *)NULL); } #if 0 /* If readline() is called after installing a callback handler, temporarily turn off the callback state to avoid ensuing messiness. Patch supplied by the gdb folks. XXX -- disabled. This can be fooled and readline left in a strange state by a poorly-timed longjmp. */ if (in_callback = RL_ISSTATE (RL_STATE_CALLBACK)) RL_UNSETSTATE (RL_STATE_CALLBACK); #endif rl_set_prompt (prompt); rl_initialize (); if (rl_prep_term_function) (*rl_prep_term_function) (_rl_meta_flag); #if defined (HANDLE_SIGNALS) rl_set_signals (); #endif value = readline_internal (); if (rl_deprep_term_function) (*rl_deprep_term_function) (); #if defined (HANDLE_SIGNALS) rl_clear_signals (); #endif #if 0 if (in_callback) RL_SETSTATE (RL_STATE_CALLBACK); #endif return (value); } #if defined (READLINE_CALLBACKS) # define STATIC_CALLBACK #else # define STATIC_CALLBACK static #endif STATIC_CALLBACK void readline_internal_setup () { char *nprompt; _rl_in_stream = rl_instream; _rl_out_stream = rl_outstream; if (rl_startup_hook) (*rl_startup_hook) (); /* If we're not echoing, we still want to at least print a prompt, because rl_redisplay will not do it for us. If the calling application has a custom redisplay function, though, let that function handle it. */ if (_rl_echoing_p == 0 && rl_redisplay_function == rl_redisplay) { if (rl_prompt && rl_already_prompted == 0) { nprompt = _rl_strip_prompt (rl_prompt); fprintf (_rl_out_stream, "%s", nprompt); fflush (_rl_out_stream); xfree (nprompt); } } else { if (rl_prompt && rl_already_prompted) rl_on_new_line_with_prompt (); else rl_on_new_line (); (*rl_redisplay_function) (); } #if defined (VI_MODE) if (rl_editing_mode == vi_mode) rl_vi_insert_mode (1, 'i'); #endif /* VI_MODE */ if (rl_pre_input_hook) (*rl_pre_input_hook) (); RL_CHECK_SIGNALS (); } STATIC_CALLBACK char * readline_internal_teardown (eof) int eof; { char *temp; HIST_ENTRY *entry; RL_CHECK_SIGNALS (); /* Restore the original of this history line, iff the line that we are editing was originally in the history, AND the line has changed. */ entry = current_history (); if (entry && rl_undo_list) { temp = savestring (the_line); rl_revert_line (1, 0); entry = replace_history_entry (where_history (), the_line, (histdata_t)NULL); _rl_free_history_entry (entry); strcpy (the_line, temp); xfree (temp); } if (_rl_revert_all_at_newline) _rl_revert_all_lines (); /* At any rate, it is highly likely that this line has an undo list. Get rid of it now. */ if (rl_undo_list) rl_free_undo_list (); /* Restore normal cursor, if available. */ _rl_set_insert_mode (RL_IM_INSERT, 0); return (eof ? (char *)NULL : savestring (the_line)); } void _rl_internal_char_cleanup () { #if defined (VI_MODE) /* In vi mode, when you exit insert mode, the cursor moves back over the previous character. We explicitly check for that here. */ if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap) rl_vi_check (); #endif /* VI_MODE */ if (rl_num_chars_to_read && rl_end >= rl_num_chars_to_read) { (*rl_redisplay_function) (); _rl_want_redisplay = 0; rl_newline (1, '\n'); } if (rl_done == 0) { (*rl_redisplay_function) (); _rl_want_redisplay = 0; } /* If the application writer has told us to erase the entire line if the only character typed was something bound to rl_newline, do so. */ if (rl_erase_empty_line && rl_done && rl_last_func == rl_newline && rl_point == 0 && rl_end == 0) _rl_erase_entire_line (); } STATIC_CALLBACK int #if defined (READLINE_CALLBACKS) readline_internal_char () #else readline_internal_charloop () #endif { static int lastc, eof_found; int c, code, lk; lastc = -1; eof_found = 0; #if !defined (READLINE_CALLBACKS) while (rl_done == 0) { #endif lk = _rl_last_command_was_kill; code = setjmp (_rl_top_level); if (code) { (*rl_redisplay_function) (); _rl_want_redisplay = 0; /* If we get here, we're not being called from something dispatched from _rl_callback_read_char(), which sets up its own value of _rl_top_level (saving and restoring the old, of course), so we can just return here. */ if (RL_ISSTATE (RL_STATE_CALLBACK)) return (0); } if (rl_pending_input == 0) { /* Then initialize the argument and number of keys read. */ _rl_reset_argument (); rl_key_sequence_length = 0; } RL_SETSTATE(RL_STATE_READCMD); c = rl_read_key (); RL_UNSETSTATE(RL_STATE_READCMD); /* look at input.c:rl_getc() for the circumstances under which this will be returned; punt immediately on read error without converting it to a newline. */ if (c == READERR) { #if defined (READLINE_CALLBACKS) RL_SETSTATE(RL_STATE_DONE); return (rl_done = 1); #else eof_found = 1; break; #endif } /* EOF typed to a non-blank line is a <NL>. */ if (c == EOF && rl_end) c = NEWLINE; /* The character _rl_eof_char typed to blank line, and not as the previous character is interpreted as EOF. */ if (((c == _rl_eof_char && lastc != c) || c == EOF) && !rl_end) { #if defined (READLINE_CALLBACKS) RL_SETSTATE(RL_STATE_DONE); return (rl_done = 1); #else eof_found = 1; break; #endif } lastc = c; _rl_dispatch ((unsigned char)c, _rl_keymap); RL_CHECK_SIGNALS (); /* If there was no change in _rl_last_command_was_kill, then no kill has taken place. Note that if input is pending we are reading a prefix command, so nothing has changed yet. */ if (rl_pending_input == 0 && lk == _rl_last_command_was_kill) _rl_last_command_was_kill = 0; _rl_internal_char_cleanup (); #if defined (READLINE_CALLBACKS) return 0; #else } return (eof_found); #endif } #if defined (READLINE_CALLBACKS) static int readline_internal_charloop () { int eof = 1; while (rl_done == 0) eof = readline_internal_char (); return (eof); } #endif /* READLINE_CALLBACKS */ /* Read a line of input from the global rl_instream, doing output on the global rl_outstream. If rl_prompt is non-null, then that is our prompt. */ static char * readline_internal () { int eof; readline_internal_setup (); eof = readline_internal_charloop (); return (readline_internal_teardown (eof)); } void _rl_init_line_state () { rl_point = rl_end = rl_mark = 0; the_line = rl_line_buffer; the_line[0] = 0; } void _rl_set_the_line () { the_line = rl_line_buffer; } #if defined (READLINE_CALLBACKS) _rl_keyseq_cxt * _rl_keyseq_cxt_alloc () { _rl_keyseq_cxt *cxt; cxt = (_rl_keyseq_cxt *)xmalloc (sizeof (_rl_keyseq_cxt)); cxt->flags = cxt->subseq_arg = cxt->subseq_retval = 0; cxt->okey = 0; cxt->ocxt = _rl_kscxt; cxt->childval = 42; /* sentinel value */ return cxt; } void _rl_keyseq_cxt_dispose (cxt) _rl_keyseq_cxt *cxt; { xfree (cxt); } void _rl_keyseq_chain_dispose () { _rl_keyseq_cxt *cxt; while (_rl_kscxt) { cxt = _rl_kscxt; _rl_kscxt = _rl_kscxt->ocxt; _rl_keyseq_cxt_dispose (cxt); } } #endif static int _rl_subseq_getchar (key) int key; { int k; if (key == ESC) RL_SETSTATE(RL_STATE_METANEXT); RL_SETSTATE(RL_STATE_MOREINPUT); k = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); if (key == ESC) RL_UNSETSTATE(RL_STATE_METANEXT); return k; } #if defined (READLINE_CALLBACKS) int _rl_dispatch_callback (cxt) _rl_keyseq_cxt *cxt; { int nkey, r; /* For now */ /* The first time this context is used, we want to read input and dispatch on it. When traversing the chain of contexts back `up', we want to use the value from the next context down. We're simulating recursion using a chain of contexts. */ if ((cxt->flags & KSEQ_DISPATCHED) == 0) { nkey = _rl_subseq_getchar (cxt->okey); if (nkey < 0) { _rl_abort_internal (); return -1; } r = _rl_dispatch_subseq (nkey, cxt->dmap, cxt->subseq_arg); cxt->flags |= KSEQ_DISPATCHED; } else r = cxt->childval; /* For now */ if (r != -3) /* don't do this if we indicate there will be other matches */ r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ)); RL_CHECK_SIGNALS (); if (r == 0) /* success! */ { _rl_keyseq_chain_dispose (); RL_UNSETSTATE (RL_STATE_MULTIKEY); return r; } if (r != -3) /* magic value that says we added to the chain */ _rl_kscxt = cxt->ocxt; if (_rl_kscxt) _rl_kscxt->childval = r; if (r != -3) _rl_keyseq_cxt_dispose (cxt); return r; } #endif /* READLINE_CALLBACKS */ /* Do the command associated with KEY in MAP. If the associated command is really a keymap, then read another key, and dispatch into that map. */ int _rl_dispatch (key, map) register int key; Keymap map; { _rl_dispatching_keymap = map; return _rl_dispatch_subseq (key, map, 0); } int _rl_dispatch_subseq (key, map, got_subseq) register int key; Keymap map; int got_subseq; { int r, newkey; char *macro; rl_command_func_t *func; #if defined (READLINE_CALLBACKS) _rl_keyseq_cxt *cxt; #endif if (META_CHAR (key) && _rl_convert_meta_chars_to_ascii) { if (map[ESC].type == ISKMAP) { if (RL_ISSTATE (RL_STATE_MACRODEF)) _rl_add_macro_char (ESC); map = FUNCTION_TO_KEYMAP (map, ESC); key = UNMETA (key); rl_key_sequence_length += 2; return (_rl_dispatch (key, map)); } else rl_ding (); return 0; } if (RL_ISSTATE (RL_STATE_MACRODEF)) _rl_add_macro_char (key); r = 0; switch (map[key].type) { case ISFUNC: func = map[key].function; if (func) { /* Special case rl_do_lowercase_version (). */ if (func == rl_do_lowercase_version) return (_rl_dispatch (_rl_to_lower (key), map)); rl_executing_keymap = map; rl_dispatching = 1; RL_SETSTATE(RL_STATE_DISPATCHING); (*map[key].function)(rl_numeric_arg * rl_arg_sign, key); RL_UNSETSTATE(RL_STATE_DISPATCHING); rl_dispatching = 0; /* If we have input pending, then the last command was a prefix command. Don't change the state of rl_last_func. Otherwise, remember the last command executed in this variable. */ if (rl_pending_input == 0 && map[key].function != rl_digit_argument) rl_last_func = map[key].function; RL_CHECK_SIGNALS (); } else if (map[ANYOTHERKEY].function) { /* OK, there's no function bound in this map, but there is a shadow function that was overridden when the current keymap was created. Return -2 to note that. */ _rl_unget_char (key); return -2; } else if (got_subseq) { /* Return -1 to note that we're in a subsequence, but we don't have a matching key, nor was one overridden. This means we need to back up the recursion chain and find the last subsequence that is bound to a function. */ _rl_unget_char (key); return -1; } else { #if defined (READLINE_CALLBACKS) RL_UNSETSTATE (RL_STATE_MULTIKEY); _rl_keyseq_chain_dispose (); #endif _rl_abort_internal (); return -1; } break; case ISKMAP: if (map[key].function != 0) { #if defined (VI_MODE) /* The only way this test will be true is if a subsequence has been bound starting with ESC, generally the arrow keys. What we do is check whether there's input in the queue, which there generally will be if an arrow key has been pressed, and, if there's not, just dispatch to (what we assume is) rl_vi_movement_mode right away. This is essentially an input test with a zero timeout. */ if (rl_editing_mode == vi_mode && key == ESC && map == vi_insertion_keymap && _rl_input_queued (0) == 0) return (_rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key))); #endif rl_key_sequence_length++; _rl_dispatching_keymap = FUNCTION_TO_KEYMAP (map, key); /* Allocate new context here. Use linked contexts (linked through cxt->ocxt) to simulate recursion */ #if defined (READLINE_CALLBACKS) if (RL_ISSTATE (RL_STATE_CALLBACK)) { /* Return 0 only the first time, to indicate success to _rl_callback_read_char. The rest of the time, we're called from _rl_dispatch_callback, so we return -3 to indicate special handling is necessary. */ r = RL_ISSTATE (RL_STATE_MULTIKEY) ? -3 : 0; cxt = _rl_keyseq_cxt_alloc (); if (got_subseq) cxt->flags |= KSEQ_SUBSEQ; cxt->okey = key; cxt->oldmap = map; cxt->dmap = _rl_dispatching_keymap; cxt->subseq_arg = got_subseq || cxt->dmap[ANYOTHERKEY].function; RL_SETSTATE (RL_STATE_MULTIKEY); _rl_kscxt = cxt; return r; /* don't indicate immediate success */ } #endif newkey = _rl_subseq_getchar (key); if (newkey < 0) { _rl_abort_internal (); return -1; } r = _rl_dispatch_subseq (newkey, _rl_dispatching_keymap, got_subseq || map[ANYOTHERKEY].function); return _rl_subseq_result (r, map, key, got_subseq); } else { _rl_abort_internal (); return -1; } break; case ISMACR: if (map[key].function != 0) { macro = savestring ((char *)map[key].function); _rl_with_macro_input (macro); return 0; } break; } #if defined (VI_MODE) if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap && key != ANYOTHERKEY && _rl_vi_textmod_command (key)) _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign); #endif return (r); } static int _rl_subseq_result (r, map, key, got_subseq) int r; Keymap map; int key, got_subseq; { Keymap m; int type, nt; rl_command_func_t *func, *nf; if (r == -2) /* We didn't match anything, and the keymap we're indexed into shadowed a function previously bound to that prefix. Call the function. The recursive call to _rl_dispatch_subseq has already taken care of pushing any necessary input back onto the input queue with _rl_unget_char. */ { m = _rl_dispatching_keymap; type = m[ANYOTHERKEY].type; func = m[ANYOTHERKEY].function; if (type == ISFUNC && func == rl_do_lowercase_version) r = _rl_dispatch (_rl_to_lower (key), map); else if (type == ISFUNC && func == rl_insert) { /* If the function that was shadowed was self-insert, we somehow need a keymap with map[key].func == self-insert. Let's use this one. */ nt = m[key].type; nf = m[key].function; m[key].type = type; m[key].function = func; r = _rl_dispatch (key, m); m[key].type = nt; m[key].function = nf; } else r = _rl_dispatch (ANYOTHERKEY, m); } else if (r && map[ANYOTHERKEY].function) { /* We didn't match (r is probably -1), so return something to tell the caller that it should try ANYOTHERKEY for an overridden function. */ _rl_unget_char (key); _rl_dispatching_keymap = map; return -2; } else if (r && got_subseq) { /* OK, back up the chain. */ _rl_unget_char (key); _rl_dispatching_keymap = map; return -1; } return r; } /* **************************************************************** */ /* */ /* Initializations */ /* */ /* **************************************************************** */ /* Initialize readline (and terminal if not already). */ int rl_initialize () { /* If we have never been called before, initialize the terminal and data structures. */ if (!rl_initialized) { RL_SETSTATE(RL_STATE_INITIALIZING); readline_initialize_everything (); RL_UNSETSTATE(RL_STATE_INITIALIZING); rl_initialized++; RL_SETSTATE(RL_STATE_INITIALIZED); } /* Initalize the current line information. */ _rl_init_line_state (); /* We aren't done yet. We haven't even gotten started yet! */ rl_done = 0; RL_UNSETSTATE(RL_STATE_DONE); /* Tell the history routines what is going on. */ _rl_start_using_history (); /* Make the display buffer match the state of the line. */ rl_reset_line_state (); /* No such function typed yet. */ rl_last_func = (rl_command_func_t *)NULL; /* Parsing of key-bindings begins in an enabled state. */ _rl_parsing_conditionalized_out = 0; #if defined (VI_MODE) if (rl_editing_mode == vi_mode) _rl_vi_initialize_line (); #endif /* Each line starts in insert mode (the default). */ _rl_set_insert_mode (RL_IM_DEFAULT, 1); return 0; } #if 0 #if defined (__EMX__) static void _emx_build_environ () { TIB *tibp; PIB *pibp; char *t, **tp; int c; DosGetInfoBlocks (&tibp, &pibp); t = pibp->pib_pchenv; for (c = 1; *t; c++) t += strlen (t) + 1; tp = environ = (char **)xmalloc ((c + 1) * sizeof (char *)); t = pibp->pib_pchenv; while (*t) { *tp++ = t; t += strlen (t) + 1; } *tp = 0; } #endif /* __EMX__ */ #endif /* Initialize the entire state of the world. */ static void readline_initialize_everything () { #if 0 #if defined (__EMX__) if (environ == 0) _emx_build_environ (); #endif #endif #if 0 /* Find out if we are running in Emacs -- UNUSED. */ running_in_emacs = sh_get_env_value ("EMACS") != (char *)0; #endif /* Set up input and output if they are not already set up. */ if (!rl_instream) rl_instream = stdin; if (!rl_outstream) rl_outstream = stdout; /* Bind _rl_in_stream and _rl_out_stream immediately. These values may change, but they may also be used before readline_internal () is called. */ _rl_in_stream = rl_instream; _rl_out_stream = rl_outstream; /* Allocate data structures. */ if (rl_line_buffer == 0) rl_line_buffer = (char *)xmalloc (rl_line_buffer_len = DEFAULT_BUFFER_SIZE); /* Initialize the terminal interface. */ if (rl_terminal_name == 0) rl_terminal_name = sh_get_env_value ("TERM"); _rl_init_terminal_io (rl_terminal_name); /* Bind tty characters to readline functions. */ readline_default_bindings (); /* Initialize the function names. */ rl_initialize_funmap (); /* Decide whether we should automatically go into eight-bit mode. */ _rl_init_eightbit (); /* Read in the init file. */ rl_read_init_file ((char *)NULL); /* XXX */ if (_rl_horizontal_scroll_mode && _rl_term_autowrap) { _rl_screenwidth--; _rl_screenchars -= _rl_screenheight; } /* Override the effect of any `set keymap' assignments in the inputrc file. */ rl_set_keymap_from_edit_mode (); /* Try to bind a common arrow key prefix, if not already bound. */ bind_arrow_keys (); /* Enable the meta key, if this terminal has one. */ if (_rl_enable_meta) _rl_enable_meta_key (); /* If the completion parser's default word break characters haven't been set yet, then do so now. */ if (rl_completer_word_break_characters == (char *)NULL) rl_completer_word_break_characters = (char *)rl_basic_word_break_characters; } /* If this system allows us to look at the values of the regular input editing characters, then bind them to their readline equivalents, iff the characters are not bound to keymaps. */ static void readline_default_bindings () { if (_rl_bind_stty_chars) rl_tty_set_default_bindings (_rl_keymap); } /* Reset the default bindings for the terminal special characters we're interested in back to rl_insert and read the new ones. */ static void reset_default_bindings () { if (_rl_bind_stty_chars) { rl_tty_unset_default_bindings (_rl_keymap); rl_tty_set_default_bindings (_rl_keymap); } } /* Bind some common arrow key sequences in MAP. */ static void bind_arrow_keys_internal (map) Keymap map; { Keymap xkeymap; xkeymap = _rl_keymap; _rl_keymap = map; #if defined (__MSDOS__) rl_bind_keyseq_if_unbound ("\033[0A", rl_get_previous_history); rl_bind_keyseq_if_unbound ("\033[0B", rl_backward_char); rl_bind_keyseq_if_unbound ("\033[0C", rl_forward_char); rl_bind_keyseq_if_unbound ("\033[0D", rl_get_next_history); #endif rl_bind_keyseq_if_unbound ("\033[A", rl_get_previous_history); rl_bind_keyseq_if_unbound ("\033[B", rl_get_next_history); rl_bind_keyseq_if_unbound ("\033[C", rl_forward_char); rl_bind_keyseq_if_unbound ("\033[D", rl_backward_char); rl_bind_keyseq_if_unbound ("\033[H", rl_beg_of_line); rl_bind_keyseq_if_unbound ("\033[F", rl_end_of_line); rl_bind_keyseq_if_unbound ("\033OA", rl_get_previous_history); rl_bind_keyseq_if_unbound ("\033OB", rl_get_next_history); rl_bind_keyseq_if_unbound ("\033OC", rl_forward_char); rl_bind_keyseq_if_unbound ("\033OD", rl_backward_char); rl_bind_keyseq_if_unbound ("\033OH", rl_beg_of_line); rl_bind_keyseq_if_unbound ("\033OF", rl_end_of_line); #if defined (__MINGW32__) rl_bind_keyseq_if_unbound ("\340H", rl_get_previous_history); rl_bind_keyseq_if_unbound ("\340P", rl_get_next_history); rl_bind_keyseq_if_unbound ("\340M", rl_forward_char); rl_bind_keyseq_if_unbound ("\340K", rl_backward_char); #endif _rl_keymap = xkeymap; } /* Try and bind the common arrow key prefixes after giving termcap and the inputrc file a chance to bind them and create `real' keymaps for the arrow key prefix. */ static void bind_arrow_keys () { bind_arrow_keys_internal (emacs_standard_keymap); #if defined (VI_MODE) bind_arrow_keys_internal (vi_movement_keymap); /* Unbind vi_movement_keymap[ESC] to allow users to repeatedly hit ESC in vi command mode while still allowing the arrow keys to work. */ if (vi_movement_keymap[ESC].type == ISKMAP) rl_bind_keyseq_in_map ("\033", (rl_command_func_t *)NULL, vi_movement_keymap); bind_arrow_keys_internal (vi_insertion_keymap); #endif } /* **************************************************************** */ /* */ /* Saving and Restoring Readline's state */ /* */ /* **************************************************************** */ int rl_save_state (sp) struct readline_state *sp; { if (sp == 0) return -1; sp->point = rl_point; sp->end = rl_end; sp->mark = rl_mark; sp->buffer = rl_line_buffer; sp->buflen = rl_line_buffer_len; sp->ul = rl_undo_list; sp->prompt = rl_prompt; sp->rlstate = rl_readline_state; sp->done = rl_done; sp->kmap = _rl_keymap; sp->lastfunc = rl_last_func; sp->insmode = rl_insert_mode; sp->edmode = rl_editing_mode; sp->kseqlen = rl_key_sequence_length; sp->inf = rl_instream; sp->outf = rl_outstream; sp->pendingin = rl_pending_input; sp->macro = rl_executing_macro; sp->catchsigs = rl_catch_signals; sp->catchsigwinch = rl_catch_sigwinch; return (0); } int rl_restore_state (sp) struct readline_state *sp; { if (sp == 0) return -1; rl_point = sp->point; rl_end = sp->end; rl_mark = sp->mark; the_line = rl_line_buffer = sp->buffer; rl_line_buffer_len = sp->buflen; rl_undo_list = sp->ul; rl_prompt = sp->prompt; rl_readline_state = sp->rlstate; rl_done = sp->done; _rl_keymap = sp->kmap; rl_last_func = sp->lastfunc; rl_insert_mode = sp->insmode; rl_editing_mode = sp->edmode; rl_key_sequence_length = sp->kseqlen; rl_instream = sp->inf; rl_outstream = sp->outf; rl_pending_input = sp->pendingin; rl_executing_macro = sp->macro; rl_catch_signals = sp->catchsigs; rl_catch_sigwinch = sp->catchsigwinch; return (0); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/xfree.c����������������������������������������������������������������������0000644�0001750�0001750�00000003166�12250770610�015131� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* xfree.c -- safe version of free that ignores attempts to free NUL */ /* Copyright (C) 1991-2010 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) #include <config.h> #endif #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #include <stdio.h> #include "xmalloc.h" #include "readline.h" /* **************************************************************** */ /* */ /* Memory Deallocation. */ /* */ /* **************************************************************** */ /* Use this as the function to call when adding unwind protects so we don't need to know what free() returns. */ void xfree (string) PTR_T string; { /* Leak a bit. */ if (RL_ISSTATE(RL_STATE_SIGHANDLER)) return; if (string) free (string); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/rlmbutil.h�������������������������������������������������������������������0000644�0001750�0001750�00000011734�12250770610�015657� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* rlmbutil.h -- utility functions for multibyte characters. */ /* Copyright (C) 2001-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #if !defined (_RL_MBUTIL_H_) #define _RL_MBUTIL_H_ #include "rlstdc.h" /************************************************/ /* check multibyte capability for I18N code */ /************************************************/ /* For platforms which support the ISO C amendement 1 functionality we support user defined character classes. */ /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */ #if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined (HAVE_LOCALE_H) # include <wchar.h> # include <wctype.h> # if defined (HAVE_ISWCTYPE) && \ defined (HAVE_ISWLOWER) && \ defined (HAVE_ISWUPPER) && \ defined (HAVE_MBSRTOWCS) && \ defined (HAVE_MBRTOWC) && \ defined (HAVE_MBRLEN) && \ defined (HAVE_TOWLOWER) && \ defined (HAVE_TOWUPPER) && \ defined (HAVE_WCHAR_T) && \ defined (HAVE_WCWIDTH) /* system is supposed to support XPG5 */ # define HANDLE_MULTIBYTE 1 # endif #endif /* If we don't want multibyte chars even on a system that supports them, let the configuring user turn multibyte support off. */ #if defined (NO_MULTIBYTE_SUPPORT) # undef HANDLE_MULTIBYTE #endif /* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ #if HANDLE_MULTIBYTE && !defined (HAVE_MBSTATE_T) # define wcsrtombs(dest, src, len, ps) (wcsrtombs) (dest, src, len, 0) # define mbsrtowcs(dest, src, len, ps) (mbsrtowcs) (dest, src, len, 0) # define wcrtomb(s, wc, ps) (wcrtomb) (s, wc, 0) # define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) # define mbrlen(s, n, ps) (mbrlen) (s, n, 0) # define mbstate_t int #endif /* Make sure MB_LEN_MAX is at least 16 on systems that claim to be able to handle multibyte chars (some systems define MB_LEN_MAX as 1) */ #ifdef HANDLE_MULTIBYTE # include <limits.h> # if defined(MB_LEN_MAX) && (MB_LEN_MAX < 16) # undef MB_LEN_MAX # endif # if !defined (MB_LEN_MAX) # define MB_LEN_MAX 16 # endif #endif /************************************************/ /* end of multibyte capability checks for I18N */ /************************************************/ /* * Flags for _rl_find_prev_mbchar and _rl_find_next_mbchar: * * MB_FIND_ANY find any multibyte character * MB_FIND_NONZERO find a non-zero-width multibyte character */ #define MB_FIND_ANY 0x00 #define MB_FIND_NONZERO 0x01 extern int _rl_find_prev_mbchar PARAMS((char *, int, int)); extern int _rl_find_next_mbchar PARAMS((char *, int, int, int)); #ifdef HANDLE_MULTIBYTE extern int _rl_compare_chars PARAMS((char *, int, mbstate_t *, char *, int, mbstate_t *)); extern int _rl_get_char_len PARAMS((char *, mbstate_t *)); extern int _rl_adjust_point PARAMS((char *, int, mbstate_t *)); extern int _rl_read_mbchar PARAMS((char *, int)); extern int _rl_read_mbstring PARAMS((int, char *, int)); extern int _rl_is_mbchar_matched PARAMS((char *, int, int, char *, int)); extern wchar_t _rl_char_value PARAMS((char *, int)); extern int _rl_walphabetic PARAMS((wchar_t)); #define _rl_to_wupper(wc) (iswlower (wc) ? towupper (wc) : (wc)) #define _rl_to_wlower(wc) (iswupper (wc) ? towlower (wc) : (wc)) #define MB_NEXTCHAR(b,s,c,f) \ ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) \ ? _rl_find_next_mbchar ((b), (s), (c), (f)) \ : ((s) + (c))) #define MB_PREVCHAR(b,s,f) \ ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) \ ? _rl_find_prev_mbchar ((b), (s), (f)) \ : ((s) - 1)) #define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2) #define MB_NULLWCH(x) ((x) == 0) #else /* !HANDLE_MULTIBYTE */ #undef MB_LEN_MAX #undef MB_CUR_MAX #define MB_LEN_MAX 1 #define MB_CUR_MAX 1 #define _rl_find_prev_mbchar(b, i, f) (((i) == 0) ? (i) : ((i) - 1)) #define _rl_find_next_mbchar(b, i1, i2, f) ((i1) + (i2)) #define _rl_char_value(buf,ind) ((buf)[(ind)]) #define _rl_walphabetic(c) (rl_alphabetic (c)) #define _rl_to_wupper(c) (_rl_to_upper (c)) #define _rl_to_wlower(c) (_rl_to_lower (c)) #define MB_NEXTCHAR(b,s,c,f) ((s) + (c)) #define MB_PREVCHAR(b,s,f) ((s) - 1) #define MB_INVALIDCH(x) (0) #define MB_NULLWCH(x) (0) #endif /* !HANDLE_MULTIBYTE */ extern int rl_byte_oriented; #endif /* _RL_MBUTIL_H_ */ ������������������������������������gdb-doc-7.6.2/readline/parens.c���������������������������������������������������������������������0000644�0001750�0001750�00000010635�12250770610�015307� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* parens.c -- implementation of matching parentheses feature. */ /* Copyright (C) 1987, 1989, 1992-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (__TANDEM) # include <floss.h> #endif #include "rlconf.h" #if defined (HAVE_CONFIG_H) # include <config.h> #endif #include <stdio.h> #include <sys/types.h> #if defined (HAVE_UNISTD_H) # include <unistd.h> #endif #include "posixselect.h" #if defined (HAVE_STRING_H) # include <string.h> #else /* !HAVE_STRING_H */ # include <strings.h> #endif /* !HAVE_STRING_H */ #if !defined (strchr) && !defined (__STDC__) extern char *strchr (), *strrchr (); #endif /* !strchr && !__STDC__ */ #include "readline.h" #include "rlprivate.h" static int find_matching_open PARAMS((char *, int, int)); /* Non-zero means try to blink the matching open parenthesis when the close parenthesis is inserted. */ #if defined (HAVE_SELECT) int rl_blink_matching_paren = 1; #else /* !HAVE_SELECT */ int rl_blink_matching_paren = 0; #endif /* !HAVE_SELECT */ static int _paren_blink_usec = 500000; /* Change emacs_standard_keymap to have bindings for paren matching when ON_OR_OFF is 1, change them back to self_insert when ON_OR_OFF == 0. */ void _rl_enable_paren_matching (on_or_off) int on_or_off; { if (on_or_off) { /* ([{ */ rl_bind_key_in_map (')', rl_insert_close, emacs_standard_keymap); rl_bind_key_in_map (']', rl_insert_close, emacs_standard_keymap); rl_bind_key_in_map ('}', rl_insert_close, emacs_standard_keymap); } else { /* ([{ */ rl_bind_key_in_map (')', rl_insert, emacs_standard_keymap); rl_bind_key_in_map (']', rl_insert, emacs_standard_keymap); rl_bind_key_in_map ('}', rl_insert, emacs_standard_keymap); } } int rl_set_paren_blink_timeout (u) int u; { int o; o = _paren_blink_usec; if (u > 0) _paren_blink_usec = u; return (o); } int rl_insert_close (count, invoking_key) int count, invoking_key; { if (rl_explicit_arg || !rl_blink_matching_paren) _rl_insert_char (count, invoking_key); else { #if defined (HAVE_SELECT) int orig_point, match_point, ready; struct timeval timer; fd_set readfds; _rl_insert_char (1, invoking_key); (*rl_redisplay_function) (); match_point = find_matching_open (rl_line_buffer, rl_point - 2, invoking_key); /* Emacs might message or ring the bell here, but I don't. */ if (match_point < 0) return -1; FD_ZERO (&readfds); FD_SET (fileno (rl_instream), &readfds); USEC_TO_TIMEVAL (_paren_blink_usec, timer); orig_point = rl_point; rl_point = match_point; (*rl_redisplay_function) (); ready = select (1, &readfds, (fd_set *)NULL, (fd_set *)NULL, &timer); rl_point = orig_point; #else /* !HAVE_SELECT */ _rl_insert_char (count, invoking_key); #endif /* !HAVE_SELECT */ } return 0; } static int find_matching_open (string, from, closer) char *string; int from, closer; { register int i; int opener, level, delimiter; switch (closer) { case ']': opener = '['; break; case '}': opener = '{'; break; case ')': opener = '('; break; default: return (-1); } level = 1; /* The closer passed in counts as 1. */ delimiter = 0; /* Delimited state unknown. */ for (i = from; i > -1; i--) { if (delimiter && (string[i] == delimiter)) delimiter = 0; else if (rl_basic_quote_characters && strchr (rl_basic_quote_characters, string[i])) delimiter = string[i]; else if (!delimiter && (string[i] == closer)) level++; else if (!delimiter && (string[i] == opener)) level--; if (!level) break; } return (i); } ���������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/undo.c�����������������������������������������������������������������������0000644�0001750�0001750�00000015726�12250770610�014772� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* readline.c -- a general facility for reading lines of input with emacs style editing and completion. */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include <config.h> #endif #include <sys/types.h> #if defined (HAVE_UNISTD_H) # include <unistd.h> /* for _POSIX_VERSION */ #endif /* HAVE_UNISTD_H */ #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #include <stdio.h> /* System-specific feature definitions and include files. */ #include "rldefs.h" /* Some standard library routines. */ #include "readline.h" #include "history.h" #include "rlprivate.h" #include "xmalloc.h" extern void replace_history_data PARAMS((int, histdata_t *, histdata_t *)); /* Non-zero tells rl_delete_text and rl_insert_text to not add to the undo list. */ int _rl_doing_an_undo = 0; /* How many unclosed undo groups we currently have. */ int _rl_undo_group_level = 0; /* The current undo list for THE_LINE. */ UNDO_LIST *rl_undo_list = (UNDO_LIST *)NULL; /* **************************************************************** */ /* */ /* Undo, and Undoing */ /* */ /* **************************************************************** */ static UNDO_LIST * alloc_undo_entry (what, start, end, text) enum undo_code what; int start, end; char *text; { UNDO_LIST *temp; temp = (UNDO_LIST *)xmalloc (sizeof (UNDO_LIST)); temp->what = what; temp->start = start; temp->end = end; temp->text = text; temp->next = (UNDO_LIST *)NULL; return temp; } /* Remember how to undo something. Concatenate some undos if that seems right. */ void rl_add_undo (what, start, end, text) enum undo_code what; int start, end; char *text; { UNDO_LIST *temp; temp = alloc_undo_entry (what, start, end, text); temp->next = rl_undo_list; rl_undo_list = temp; } /* Free the existing undo list. */ void rl_free_undo_list () { UNDO_LIST *release, *orig_list; orig_list = rl_undo_list; while (rl_undo_list) { release = rl_undo_list; rl_undo_list = rl_undo_list->next; if (release->what == UNDO_DELETE) xfree (release->text); xfree (release); } rl_undo_list = (UNDO_LIST *)NULL; replace_history_data (-1, (histdata_t *)orig_list, (histdata_t *)NULL); } UNDO_LIST * _rl_copy_undo_entry (entry) UNDO_LIST *entry; { UNDO_LIST *new; new = alloc_undo_entry (entry->what, entry->start, entry->end, (char *)NULL); new->text = entry->text ? savestring (entry->text) : 0; return new; } UNDO_LIST * _rl_copy_undo_list (head) UNDO_LIST *head; { UNDO_LIST *list, *new, *roving, *c; if (head == 0) return head; list = head; new = 0; while (list) { c = _rl_copy_undo_entry (list); if (new == 0) roving = new = c; else { roving->next = c; roving = roving->next; } list = list->next; } roving->next = 0; return new; } /* Undo the next thing in the list. Return 0 if there is nothing to undo, or non-zero if there was. */ int rl_do_undo () { UNDO_LIST *release; int waiting_for_begin, start, end; #define TRANS(i) ((i) == -1 ? rl_point : ((i) == -2 ? rl_end : (i))) start = end = waiting_for_begin = 0; do { if (rl_undo_list == 0) return (0); _rl_doing_an_undo = 1; RL_SETSTATE(RL_STATE_UNDOING); /* To better support vi-mode, a start or end value of -1 means rl_point, and a value of -2 means rl_end. */ if (rl_undo_list->what == UNDO_DELETE || rl_undo_list->what == UNDO_INSERT) { start = TRANS (rl_undo_list->start); end = TRANS (rl_undo_list->end); } switch (rl_undo_list->what) { /* Undoing deletes means inserting some text. */ case UNDO_DELETE: rl_point = start; rl_insert_text (rl_undo_list->text); xfree (rl_undo_list->text); break; /* Undoing inserts means deleting some text. */ case UNDO_INSERT: rl_delete_text (start, end); rl_point = start; break; /* Undoing an END means undoing everything 'til we get to a BEGIN. */ case UNDO_END: waiting_for_begin++; break; /* Undoing a BEGIN means that we are done with this group. */ case UNDO_BEGIN: if (waiting_for_begin) waiting_for_begin--; else rl_ding (); break; } _rl_doing_an_undo = 0; RL_UNSETSTATE(RL_STATE_UNDOING); release = rl_undo_list; rl_undo_list = rl_undo_list->next; replace_history_data (-1, (histdata_t *)release, (histdata_t *)rl_undo_list); xfree (release); } while (waiting_for_begin); return (1); } #undef TRANS int _rl_fix_last_undo_of_type (type, start, end) int type, start, end; { UNDO_LIST *rl; for (rl = rl_undo_list; rl; rl = rl->next) { if (rl->what == type) { rl->start = start; rl->end = end; return 0; } } return 1; } /* Begin a group. Subsequent undos are undone as an atomic operation. */ int rl_begin_undo_group () { rl_add_undo (UNDO_BEGIN, 0, 0, 0); _rl_undo_group_level++; return 0; } /* End an undo group started with rl_begin_undo_group (). */ int rl_end_undo_group () { rl_add_undo (UNDO_END, 0, 0, 0); _rl_undo_group_level--; return 0; } /* Save an undo entry for the text from START to END. */ int rl_modifying (start, end) int start, end; { if (start > end) { SWAP (start, end); } if (start != end) { char *temp = rl_copy_text (start, end); rl_begin_undo_group (); rl_add_undo (UNDO_DELETE, start, end, temp); rl_add_undo (UNDO_INSERT, start, end, (char *)NULL); rl_end_undo_group (); } return 0; } /* Revert the current line to its previous state. */ int rl_revert_line (count, key) int count, key; { if (rl_undo_list == 0) rl_ding (); else { while (rl_undo_list) rl_do_undo (); #if defined (VI_MODE) if (rl_editing_mode == vi_mode) rl_point = rl_mark = 0; /* rl_end should be set correctly */ #endif } return 0; } /* Do some undoing of things that were done. */ int rl_undo_command (count, key) int count, key; { if (count < 0) return 0; /* Nothing to do. */ while (count) { if (rl_do_undo ()) count--; else { rl_ding (); break; } } return 0; } ������������������������������������������gdb-doc-7.6.2/readline/posixjmp.h�������������������������������������������������������������������0000644�0001750�0001750�00000002323�12250770610�015670� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* posixjmp.h -- wrapper for setjmp.h with changes for POSIX systems. */ /* Copyright (C) 1987,1991 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash 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 3 of the License, or (at your option) any later version. Bash 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 Bash. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _POSIXJMP_H_ #define _POSIXJMP_H_ #include <setjmp.h> /* This *must* be included *after* config.h */ #if defined (HAVE_POSIX_SIGSETJMP) # define procenv_t sigjmp_buf # if !defined (__OPENNT) # undef setjmp # define setjmp(x) sigsetjmp((x), 1) # undef longjmp # define longjmp(x, n) siglongjmp((x), (n)) # endif /* !__OPENNT */ #else # define procenv_t jmp_buf #endif #endif /* _POSIXJMP_H_ */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/rlshell.h��������������������������������������������������������������������0000644�0001750�0001750�00000002352�12250770610�015466� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* rlshell.h -- utility functions normally provided by bash. */ /* Copyright (C) 1999-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #if !defined (_RL_SHELL_H_) #define _RL_SHELL_H_ #include "rlstdc.h" extern char *sh_single_quote PARAMS((char *)); extern void sh_set_lines_and_columns PARAMS((int, int)); extern char *sh_get_env_value PARAMS((const char *)); extern char *sh_get_home_dir PARAMS((void)); extern int sh_unset_nodelay_mode PARAMS((int)); #endif /* _RL_SHELL_H_ */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/display.c��������������������������������������������������������������������0000644�0001750�0001750�00000243442�12250770610�015470� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* display.c -- readline redisplay facility. */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include <config.h> #endif #include <sys/types.h> #if defined (HAVE_UNISTD_H) # include <unistd.h> #endif /* HAVE_UNISTD_H */ #include "posixstat.h" #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #include <stdio.h> #ifdef __MSDOS__ # include <pc.h> #endif /* System-specific feature definitions and include files. */ #include "rldefs.h" #include "rlmbutil.h" /* Termcap library stuff. */ #include "tcap.h" /* Some standard library routines. */ #include "readline.h" #include "history.h" #include "rlprivate.h" #include "xmalloc.h" #if !defined (strchr) && !defined (__STDC__) extern char *strchr (), *strrchr (); #endif /* !strchr && !__STDC__ */ static void update_line PARAMS((char *, char *, int, int, int, int)); static void space_to_eol PARAMS((int)); static void delete_chars PARAMS((int)); static void insert_some_chars PARAMS((char *, int, int)); static void cr PARAMS((void)); /* State of visible and invisible lines. */ struct line_state { char *line; int *lbreaks; int lbsize; #if defined (HANDLE_MULTIBYTE) int *wrapped_line; int wbsize; #endif }; /* The line display buffers. One is the line currently displayed on the screen. The other is the line about to be displayed. */ static struct line_state line_state_array[2]; static struct line_state *line_state_visible = &line_state_array[0]; static struct line_state *line_state_invisible = &line_state_array[1]; static int line_structures_initialized = 0; /* Backwards-compatible names. */ #define inv_lbreaks (line_state_invisible->lbreaks) #define inv_lbsize (line_state_invisible->lbsize) #define vis_lbreaks (line_state_visible->lbreaks) #define vis_lbsize (line_state_visible->lbsize) #define visible_line (line_state_visible->line) #define invisible_line (line_state_invisible->line) #if defined (HANDLE_MULTIBYTE) static int _rl_col_width PARAMS((const char *, int, int, int)); #else # define _rl_col_width(l, s, e, f) (((e) <= (s)) ? 0 : (e) - (s)) #endif /* Heuristic used to decide whether it is faster to move from CUR to NEW by backing up or outputting a carriage return and moving forward. CUR and NEW are either both buffer positions or absolute screen positions. */ #define CR_FASTER(new, cur) (((new) + 1) < ((cur) - (new))) /* _rl_last_c_pos is an absolute cursor position in multibyte locales and a buffer index in others. This macro is used when deciding whether the current cursor position is in the middle of a prompt string containing invisible characters. XXX - might need to take `modmark' into account. */ #define PROMPT_ENDING_INDEX \ ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) ? prompt_physical_chars : prompt_last_invisible+1) /* **************************************************************** */ /* */ /* Display stuff */ /* */ /* **************************************************************** */ /* This is the stuff that is hard for me. I never seem to write good display routines in C. Let's see how I do this time. */ /* (PWP) Well... Good for a simple line updater, but totally ignores the problems of input lines longer than the screen width. update_line and the code that calls it makes a multiple line, automatically wrapping line update. Careful attention needs to be paid to the vertical position variables. */ /* Keep two buffers; one which reflects the current contents of the screen, and the other to draw what we think the new contents should be. Then compare the buffers, and make whatever changes to the screen itself that we should. Finally, make the buffer that we just drew into be the one which reflects the current contents of the screen, and place the cursor where it belongs. Commands that want to can fix the display themselves, and then let this function know that the display has been fixed by setting the RL_DISPLAY_FIXED variable. This is good for efficiency. */ /* Application-specific redisplay function. */ rl_voidfunc_t *rl_redisplay_function = rl_redisplay; /* Global variables declared here. */ /* What YOU turn on when you have handled all redisplay yourself. */ int rl_display_fixed = 0; int _rl_suppress_redisplay = 0; int _rl_want_redisplay = 0; /* The stuff that gets printed out before the actual text of the line. This is usually pointing to rl_prompt. */ char *rl_display_prompt = (char *)NULL; /* Pseudo-global variables declared here. */ /* The visible cursor position. If you print some text, adjust this. */ /* NOTE: _rl_last_c_pos is used as a buffer index when not in a locale supporting multibyte characters, and an absolute cursor position when in such a locale. This is an artifact of the donated multibyte support. Care must be taken when modifying its value. */ int _rl_last_c_pos = 0; int _rl_last_v_pos = 0; static int cpos_adjusted; static int cpos_buffer_position; static int prompt_multibyte_chars; /* Number of lines currently on screen minus 1. */ int _rl_vis_botlin = 0; /* Variables used only in this file. */ /* The last left edge of text that was displayed. This is used when doing horizontal scrolling. It shifts in thirds of a screenwidth. */ static int last_lmargin; /* A buffer for `modeline' messages. */ static char msg_buf[128]; /* Non-zero forces the redisplay even if we thought it was unnecessary. */ static int forced_display; /* Default and initial buffer size. Can grow. */ static int line_size = 1024; /* Variables to keep track of the expanded prompt string, which may include invisible characters. */ static char *local_prompt, *local_prompt_prefix; static int local_prompt_len; static int prompt_visible_length, prompt_prefix_length; /* The number of invisible characters in the line currently being displayed on the screen. */ static int visible_wrap_offset; /* The number of invisible characters in the prompt string. Static so it can be shared between rl_redisplay and update_line */ static int wrap_offset; /* The index of the last invisible character in the prompt string. */ static int prompt_last_invisible; /* The length (buffer offset) of the first line of the last (possibly multi-line) buffer displayed on the screen. */ static int visible_first_line_len; /* Number of invisible characters on the first physical line of the prompt. Only valid when the number of physical characters in the prompt exceeds (or is equal to) _rl_screenwidth. */ static int prompt_invis_chars_first_line; static int prompt_last_screen_line; static int prompt_physical_chars; /* set to a non-zero value by rl_redisplay if we are marking modified history lines and the current line is so marked. */ static int modmark; /* Variables to save and restore prompt and display information. */ /* These are getting numerous enough that it's time to create a struct. */ static char *saved_local_prompt; static char *saved_local_prefix; static int saved_last_invisible; static int saved_visible_length; static int saved_prefix_length; static int saved_local_length; static int saved_invis_chars_first_line; static int saved_physical_chars; /* Expand the prompt string S and return the number of visible characters in *LP, if LP is not null. This is currently more-or-less a placeholder for expansion. LIP, if non-null is a place to store the index of the last invisible character in the returned string. NIFLP, if non-zero, is a place to store the number of invisible characters in the first prompt line. The previous are used as byte counts -- indexes into a character buffer. */ /* Current implementation: \001 (^A) start non-visible characters \002 (^B) end non-visible characters all characters except \001 and \002 (following a \001) are copied to the returned string; all characters except those between \001 and \002 are assumed to be `visible'. */ static char * expand_prompt (pmt, lp, lip, niflp, vlp) char *pmt; int *lp, *lip, *niflp, *vlp; { char *r, *ret, *p, *igstart; int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars; /* Short-circuit if we can. */ if ((MB_CUR_MAX <= 1 || rl_byte_oriented) && strchr (pmt, RL_PROMPT_START_IGNORE) == 0) { r = savestring (pmt); if (lp) *lp = strlen (r); if (lip) *lip = 0; if (niflp) *niflp = 0; if (vlp) *vlp = lp ? *lp : strlen (r); return r; } l = strlen (pmt); r = ret = (char *)xmalloc (l + 1); invfl = 0; /* invisible chars in first line of prompt */ invflset = 0; /* we only want to set invfl once */ igstart = 0; for (rl = ignoring = last = ninvis = physchars = 0, p = pmt; p && *p; p++) { /* This code strips the invisible character string markers RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE */ if (ignoring == 0 && *p == RL_PROMPT_START_IGNORE) /* XXX - check ignoring? */ { ignoring = 1; igstart = p; continue; } else if (ignoring && *p == RL_PROMPT_END_IGNORE) { ignoring = 0; if (p != (igstart + 1)) last = r - ret - 1; continue; } else { #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { pind = p - pmt; ind = _rl_find_next_mbchar (pmt, pind, 1, MB_FIND_NONZERO); l = ind - pind; while (l--) *r++ = *p++; if (!ignoring) { /* rl ends up being assigned to prompt_visible_length, which is the number of characters in the buffer that contribute to characters on the screen, which might not be the same as the number of physical characters on the screen in the presence of multibyte characters */ rl += ind - pind; physchars += _rl_col_width (pmt, pind, ind, 0); } else ninvis += ind - pind; p--; /* compensate for later increment */ } else #endif { *r++ = *p; if (!ignoring) { rl++; /* visible length byte counter */ physchars++; } else ninvis++; /* invisible chars byte counter */ } if (invflset == 0 && rl >= _rl_screenwidth) { invfl = ninvis; invflset = 1; } } } if (rl < _rl_screenwidth) invfl = ninvis; *r = '\0'; if (lp) *lp = rl; if (lip) *lip = last; if (niflp) *niflp = invfl; if (vlp) *vlp = physchars; return ret; } /* Just strip out RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE from PMT and return the rest of PMT. */ char * _rl_strip_prompt (pmt) char *pmt; { char *ret; ret = expand_prompt (pmt, (int *)NULL, (int *)NULL, (int *)NULL, (int *)NULL); return ret; } /* * Expand the prompt string into the various display components, if * necessary. * * local_prompt = expanded last line of string in rl_display_prompt * (portion after the final newline) * local_prompt_prefix = portion before last newline of rl_display_prompt, * expanded via expand_prompt * prompt_visible_length = number of visible characters in local_prompt * prompt_prefix_length = number of visible characters in local_prompt_prefix * * This function is called once per call to readline(). It may also be * called arbitrarily to expand the primary prompt. * * The return value is the number of visible characters on the last line * of the (possibly multi-line) prompt. */ int rl_expand_prompt (prompt) char *prompt; { char *p, *t; int c; /* Clear out any saved values. */ FREE (local_prompt); FREE (local_prompt_prefix); local_prompt = local_prompt_prefix = (char *)0; local_prompt_len = 0; prompt_last_invisible = prompt_invis_chars_first_line = 0; prompt_visible_length = prompt_physical_chars = 0; if (prompt == 0 || *prompt == 0) return (0); p = strrchr (prompt, '\n'); if (!p) { /* The prompt is only one logical line, though it might wrap. */ local_prompt = expand_prompt (prompt, &prompt_visible_length, &prompt_last_invisible, &prompt_invis_chars_first_line, &prompt_physical_chars); local_prompt_prefix = (char *)0; local_prompt_len = local_prompt ? strlen (local_prompt) : 0; return (prompt_visible_length); } else { /* The prompt spans multiple lines. */ t = ++p; local_prompt = expand_prompt (p, &prompt_visible_length, &prompt_last_invisible, &prompt_invis_chars_first_line, &prompt_physical_chars); c = *t; *t = '\0'; /* The portion of the prompt string up to and including the final newline is now null-terminated. */ local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length, (int *)NULL, (int *)NULL, (int *)NULL); *t = c; local_prompt_len = local_prompt ? strlen (local_prompt) : 0; return (prompt_prefix_length); } } /* Initialize the VISIBLE_LINE and INVISIBLE_LINE arrays, and their associated arrays of line break markers. MINSIZE is the minimum size of VISIBLE_LINE and INVISIBLE_LINE; if it is greater than LINE_SIZE, LINE_SIZE is increased. If the lines have already been allocated, this ensures that they can hold at least MINSIZE characters. */ static void init_line_structures (minsize) int minsize; { register int n; if (invisible_line == 0) /* initialize it */ { if (line_size < minsize) line_size = minsize; visible_line = (char *)xmalloc (line_size); invisible_line = (char *)xmalloc (line_size); } else if (line_size < minsize) /* ensure it can hold MINSIZE chars */ { line_size *= 2; if (line_size < minsize) line_size = minsize; visible_line = (char *)xrealloc (visible_line, line_size); invisible_line = (char *)xrealloc (invisible_line, line_size); } for (n = minsize; n < line_size; n++) { visible_line[n] = 0; invisible_line[n] = 1; } if (vis_lbreaks == 0) { /* should be enough. */ inv_lbsize = vis_lbsize = 256; #if defined (HANDLE_MULTIBYTE) line_state_visible->wbsize = vis_lbsize; line_state_visible->wrapped_line = (int *)xmalloc (line_state_visible->wbsize * sizeof (int)); line_state_invisible->wbsize = inv_lbsize; line_state_invisible->wrapped_line = (int *)xmalloc (line_state_invisible->wbsize * sizeof (int)); #endif inv_lbreaks = (int *)xmalloc (inv_lbsize * sizeof (int)); vis_lbreaks = (int *)xmalloc (vis_lbsize * sizeof (int)); inv_lbreaks[0] = vis_lbreaks[0] = 0; } line_structures_initialized = 1; } /* Basic redisplay algorithm. */ void rl_redisplay () { register int in, out, c, linenum, cursor_linenum; register char *line; int inv_botlin, lb_botlin, lb_linenum, o_cpos; int newlines, lpos, temp, n0, num, prompt_lines_estimate; char *prompt_this_line; #if defined (HANDLE_MULTIBYTE) wchar_t wc; size_t wc_bytes; int wc_width; mbstate_t ps; int _rl_wrapped_multicolumn = 0; #endif if (_rl_echoing_p == 0) return; /* Block keyboard interrupts because this function manipulates global data structures. */ _rl_block_sigint (); RL_SETSTATE (RL_STATE_REDISPLAYING); if (!rl_display_prompt) rl_display_prompt = ""; if (line_structures_initialized == 0) { init_line_structures (0); rl_on_new_line (); } /* Draw the line into the buffer. */ cpos_buffer_position = -1; prompt_multibyte_chars = prompt_visible_length - prompt_physical_chars; line = invisible_line; out = inv_botlin = 0; /* Mark the line as modified or not. We only do this for history lines. */ modmark = 0; if (_rl_mark_modified_lines && current_history () && rl_undo_list) { line[out++] = '*'; line[out] = '\0'; modmark = 1; } /* If someone thought that the redisplay was handled, but the currently visible line has a different modification state than the one about to become visible, then correct the caller's misconception. */ if (visible_line[0] != invisible_line[0]) rl_display_fixed = 0; /* If the prompt to be displayed is the `primary' readline prompt (the one passed to readline()), use the values we have already expanded. If not, use what's already in rl_display_prompt. WRAP_OFFSET is the number of non-visible characters in the prompt string. */ if (rl_display_prompt == rl_prompt || local_prompt) { if (local_prompt_prefix && forced_display) _rl_output_some_chars (local_prompt_prefix, strlen (local_prompt_prefix)); if (local_prompt_len > 0) { temp = local_prompt_len + out + 2; if (temp >= line_size) { line_size = (temp + 1024) - (temp % 1024); visible_line = (char *)xrealloc (visible_line, line_size); line = invisible_line = (char *)xrealloc (invisible_line, line_size); } strncpy (line + out, local_prompt, local_prompt_len); out += local_prompt_len; } line[out] = '\0'; wrap_offset = local_prompt_len - prompt_visible_length; } else { int pmtlen; prompt_this_line = strrchr (rl_display_prompt, '\n'); if (!prompt_this_line) prompt_this_line = rl_display_prompt; else { prompt_this_line++; pmtlen = prompt_this_line - rl_display_prompt; /* temp var */ if (forced_display) { _rl_output_some_chars (rl_display_prompt, pmtlen); /* Make sure we are at column zero even after a newline, regardless of the state of terminal output processing. */ if (pmtlen < 2 || prompt_this_line[-2] != '\r') cr (); } } prompt_physical_chars = pmtlen = strlen (prompt_this_line); temp = pmtlen + out + 2; if (temp >= line_size) { line_size = (temp + 1024) - (temp % 1024); visible_line = (char *)xrealloc (visible_line, line_size); line = invisible_line = (char *)xrealloc (invisible_line, line_size); } strncpy (line + out, prompt_this_line, pmtlen); out += pmtlen; line[out] = '\0'; wrap_offset = prompt_invis_chars_first_line = 0; } #define CHECK_INV_LBREAKS() \ do { \ if (newlines >= (inv_lbsize - 2)) \ { \ inv_lbsize *= 2; \ inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ } \ } while (0) #if defined (HANDLE_MULTIBYTE) #define CHECK_LPOS() \ do { \ lpos++; \ if (lpos >= _rl_screenwidth) \ { \ if (newlines >= (inv_lbsize - 2)) \ { \ inv_lbsize *= 2; \ inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ } \ inv_lbreaks[++newlines] = out; \ if (newlines >= (line_state_invisible->wbsize - 1)) \ { \ line_state_invisible->wbsize *= 2; \ line_state_invisible->wrapped_line = (int *)xrealloc (line_state_invisible->wrapped_line, line_state_invisible->wbsize * sizeof(int)); \ } \ line_state_invisible->wrapped_line[newlines] = _rl_wrapped_multicolumn; \ lpos = 0; \ } \ } while (0) #else #define CHECK_LPOS() \ do { \ lpos++; \ if (lpos >= _rl_screenwidth) \ { \ if (newlines >= (inv_lbsize - 2)) \ { \ inv_lbsize *= 2; \ inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ } \ inv_lbreaks[++newlines] = out; \ lpos = 0; \ } \ } while (0) #endif /* inv_lbreaks[i] is where line i starts in the buffer. */ inv_lbreaks[newlines = 0] = 0; lpos = prompt_physical_chars + modmark; #if defined (HANDLE_MULTIBYTE) memset (line_state_invisible->wrapped_line, 0, line_state_invisible->wbsize * sizeof (int)); num = 0; #endif /* prompt_invis_chars_first_line is the number of invisible characters in the first physical line of the prompt. wrap_offset - prompt_invis_chars_first_line is the number of invis chars on the second (or, more generally, last) line. */ /* This is zero-based, used to set the newlines */ prompt_lines_estimate = lpos / _rl_screenwidth; /* what if lpos is already >= _rl_screenwidth before we start drawing the contents of the command line? */ while (lpos >= _rl_screenwidth) { int z; /* fix from Darin Johnson <darin@acuson.com> for prompt string with invisible characters that is longer than the screen width. The prompt_invis_chars_first_line variable could be made into an array saying how many invisible characters there are per line, but that's probably too much work for the benefit gained. How many people have prompts that exceed two physical lines? Additional logic fix from Edward Catmur <ed@catmur.co.uk> */ #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0 && prompt_multibyte_chars > 0) { n0 = num; temp = local_prompt_len; while (num < temp) { z = _rl_col_width (local_prompt, n0, num, 1); if (z > _rl_screenwidth) { num = _rl_find_prev_mbchar (local_prompt, num, MB_FIND_ANY); break; } else if (z == _rl_screenwidth) break; num++; } temp = num; } else #endif /* !HANDLE_MULTIBYTE */ temp = ((newlines + 1) * _rl_screenwidth); /* Now account for invisible characters in the current line. */ /* XXX - this assumes that the invisible characters may be split, but only between the first and the last lines. */ temp += ((local_prompt_prefix == 0) ? ((newlines == 0) ? prompt_invis_chars_first_line : ((newlines == prompt_lines_estimate) ? wrap_offset : prompt_invis_chars_first_line)) : ((newlines == 0) ? wrap_offset : 0)); inv_lbreaks[++newlines] = temp; #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0 && prompt_multibyte_chars > 0) lpos -= _rl_col_width (local_prompt, n0, num, 1); else #endif lpos -= _rl_screenwidth; } prompt_last_screen_line = newlines; /* Draw the rest of the line (after the prompt) into invisible_line, keeping track of where the cursor is (cpos_buffer_position), the number of the line containing the cursor (lb_linenum), the last line number (lb_botlin and inv_botlin). It maintains an array of line breaks for display (inv_lbreaks). This handles expanding tabs for display and displaying meta characters. */ lb_linenum = 0; #if defined (HANDLE_MULTIBYTE) in = 0; if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { memset (&ps, 0, sizeof (mbstate_t)); /* XXX - what if wc_bytes ends up <= 0? check for MB_INVALIDCH */ wc_bytes = mbrtowc (&wc, rl_line_buffer, rl_end, &ps); } else wc_bytes = 1; while (in < rl_end) #else for (in = 0; in < rl_end; in++) #endif { c = (unsigned char)rl_line_buffer[in]; #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { if (MB_INVALIDCH (wc_bytes)) { /* Byte sequence is invalid or shortened. Assume that the first byte represents a character. */ wc_bytes = 1; /* Assume that a character occupies a single column. */ wc_width = 1; memset (&ps, 0, sizeof (mbstate_t)); } else if (MB_NULLWCH (wc_bytes)) break; /* Found '\0' */ else { temp = wcwidth (wc); wc_width = (temp >= 0) ? temp : 1; } } #endif if (out + 8 >= line_size) /* XXX - 8 for \t */ { line_size *= 2; visible_line = (char *)xrealloc (visible_line, line_size); invisible_line = (char *)xrealloc (invisible_line, line_size); line = invisible_line; } if (in == rl_point) { cpos_buffer_position = out; lb_linenum = newlines; } #if defined (HANDLE_MULTIBYTE) if (META_CHAR (c) && _rl_output_meta_chars == 0) /* XXX - clean up */ #else if (META_CHAR (c)) #endif { if (_rl_output_meta_chars == 0) { sprintf (line + out, "\\%o", c); if (lpos + 4 >= _rl_screenwidth) { temp = _rl_screenwidth - lpos; CHECK_INV_LBREAKS (); inv_lbreaks[++newlines] = out + temp; lpos = 4 - temp; } else lpos += 4; out += 4; } else { line[out++] = c; CHECK_LPOS(); } } #if defined (DISPLAY_TABS) else if (c == '\t') { register int newout; #if 0 newout = (out | (int)7) + 1; #else newout = out + 8 - lpos % 8; #endif temp = newout - out; if (lpos + temp >= _rl_screenwidth) { register int temp2; temp2 = _rl_screenwidth - lpos; CHECK_INV_LBREAKS (); inv_lbreaks[++newlines] = out + temp2; lpos = temp - temp2; while (out < newout) line[out++] = ' '; } else { while (out < newout) line[out++] = ' '; lpos += temp; } } #endif else if (c == '\n' && _rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up) { line[out++] = '\0'; /* XXX - sentinel */ CHECK_INV_LBREAKS (); inv_lbreaks[++newlines] = out; lpos = 0; } else if (CTRL_CHAR (c) || c == RUBOUT) { line[out++] = '^'; CHECK_LPOS(); line[out++] = CTRL_CHAR (c) ? UNCTRL (c) : '?'; CHECK_LPOS(); } else { #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { register int i; _rl_wrapped_multicolumn = 0; if (_rl_screenwidth < lpos + wc_width) for (i = lpos; i < _rl_screenwidth; i++) { /* The space will be removed in update_line() */ line[out++] = ' '; _rl_wrapped_multicolumn++; CHECK_LPOS(); } if (in == rl_point) { cpos_buffer_position = out; lb_linenum = newlines; } for (i = in; i < in+wc_bytes; i++) line[out++] = rl_line_buffer[i]; for (i = 0; i < wc_width; i++) CHECK_LPOS(); } else { line[out++] = c; CHECK_LPOS(); } #else line[out++] = c; CHECK_LPOS(); #endif } #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { in += wc_bytes; /* XXX - what if wc_bytes ends up <= 0? check for MB_INVALIDCH */ wc_bytes = mbrtowc (&wc, rl_line_buffer + in, rl_end - in, &ps); } else in++; #endif } line[out] = '\0'; if (cpos_buffer_position < 0) { cpos_buffer_position = out; lb_linenum = newlines; } inv_botlin = lb_botlin = newlines; CHECK_INV_LBREAKS (); inv_lbreaks[newlines+1] = out; cursor_linenum = lb_linenum; /* CPOS_BUFFER_POSITION == position in buffer where cursor should be placed. CURSOR_LINENUM == line number where the cursor should be placed. */ /* PWP: now is when things get a bit hairy. The visible and invisible line buffers are really multiple lines, which would wrap every (screenwidth - 1) characters. Go through each in turn, finding the changed region and updating it. The line order is top to bottom. */ /* If we can move the cursor up and down, then use multiple lines, otherwise, let long lines display in a single terminal line, and horizontally scroll it. */ if (_rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up) { int nleft, pos, changed_screen_line, tx; if (!rl_display_fixed || forced_display) { forced_display = 0; /* If we have more than a screenful of material to display, then only display a screenful. We should display the last screen, not the first. */ if (out >= _rl_screenchars) { if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) out = _rl_find_prev_mbchar (line, _rl_screenchars, MB_FIND_ANY); else out = _rl_screenchars - 1; } /* The first line is at character position 0 in the buffer. The second and subsequent lines start at inv_lbreaks[N], offset by OFFSET (which has already been calculated above). */ #define INVIS_FIRST() (prompt_physical_chars > _rl_screenwidth ? prompt_invis_chars_first_line : wrap_offset) #define WRAP_OFFSET(line, offset) ((line == 0) \ ? (offset ? INVIS_FIRST() : 0) \ : ((line == prompt_last_screen_line) ? wrap_offset-prompt_invis_chars_first_line : 0)) #define W_OFFSET(line, offset) ((line) == 0 ? offset : 0) #define VIS_LLEN(l) ((l) > _rl_vis_botlin ? 0 : (vis_lbreaks[l+1] - vis_lbreaks[l])) #define INV_LLEN(l) (inv_lbreaks[l+1] - inv_lbreaks[l]) #define VIS_CHARS(line) (visible_line + vis_lbreaks[line]) #define VIS_LINE(line) ((line) > _rl_vis_botlin) ? "" : VIS_CHARS(line) #define INV_LINE(line) (invisible_line + inv_lbreaks[line]) #define OLD_CPOS_IN_PROMPT() (cpos_adjusted == 0 && \ _rl_last_c_pos != o_cpos && \ _rl_last_c_pos > wrap_offset && \ o_cpos < prompt_last_invisible) /* For each line in the buffer, do the updating display. */ for (linenum = 0; linenum <= inv_botlin; linenum++) { /* This can lead us astray if we execute a program that changes the locale from a non-multibyte to a multibyte one. */ o_cpos = _rl_last_c_pos; cpos_adjusted = 0; update_line (VIS_LINE(linenum), INV_LINE(linenum), linenum, VIS_LLEN(linenum), INV_LLEN(linenum), inv_botlin); /* update_line potentially changes _rl_last_c_pos, but doesn't take invisible characters into account, since _rl_last_c_pos is an absolute cursor position in a multibyte locale. See if compensating here is the right thing, or if we have to change update_line itself. There are several cases in which update_line adjusts _rl_last_c_pos itself (so it can pass _rl_move_cursor_relative accurate values); it communicates this back by setting cpos_adjusted. If we assume that _rl_last_c_pos is correct (an absolute cursor position) each time update_line is called, then we can assume in our calculations that o_cpos does not need to be adjusted by wrap_offset. */ if (linenum == 0 && (MB_CUR_MAX > 1 && rl_byte_oriented == 0) && OLD_CPOS_IN_PROMPT()) _rl_last_c_pos -= prompt_invis_chars_first_line; /* XXX - was wrap_offset */ else if (linenum == prompt_last_screen_line && prompt_physical_chars > _rl_screenwidth && (MB_CUR_MAX > 1 && rl_byte_oriented == 0) && cpos_adjusted == 0 && _rl_last_c_pos != o_cpos && _rl_last_c_pos > (prompt_last_invisible - _rl_screenwidth - prompt_invis_chars_first_line)) _rl_last_c_pos -= (wrap_offset-prompt_invis_chars_first_line); /* If this is the line with the prompt, we might need to compensate for invisible characters in the new line. Do this only if there is not more than one new line (which implies that we completely overwrite the old visible line) and the new line is shorter than the old. Make sure we are at the end of the new line before clearing. */ if (linenum == 0 && inv_botlin == 0 && _rl_last_c_pos == out && (wrap_offset > visible_wrap_offset) && (_rl_last_c_pos < visible_first_line_len)) { if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) nleft = _rl_screenwidth - _rl_last_c_pos; else nleft = _rl_screenwidth + wrap_offset - _rl_last_c_pos; if (nleft) _rl_clear_to_eol (nleft); } #if 0 /* This segment is intended to handle the case where the prompt has invisible characters on the second line and the new line to be displayed needs to clear the rest of the old characters out (e.g., when printing the i-search prompt). In general, the case of the new line being shorter than the old. Incomplete */ else if (linenum == prompt_last_screen_line && prompt_physical_chars > _rl_screenwidth && wrap_offset != prompt_invis_chars_first_line && _rl_last_c_pos == out && #endif /* Since the new first line is now visible, save its length. */ if (linenum == 0) visible_first_line_len = (inv_botlin > 0) ? inv_lbreaks[1] : out - wrap_offset; } /* We may have deleted some lines. If so, clear the left over blank ones at the bottom out. */ if (_rl_vis_botlin > inv_botlin) { char *tt; for (; linenum <= _rl_vis_botlin; linenum++) { tt = VIS_CHARS (linenum); _rl_move_vert (linenum); _rl_move_cursor_relative (0, tt); _rl_clear_to_eol ((linenum == _rl_vis_botlin) ? strlen (tt) : _rl_screenwidth); } } _rl_vis_botlin = inv_botlin; /* CHANGED_SCREEN_LINE is set to 1 if we have moved to a different screen line during this redisplay. */ changed_screen_line = _rl_last_v_pos != cursor_linenum; if (changed_screen_line) { _rl_move_vert (cursor_linenum); /* If we moved up to the line with the prompt using _rl_term_up, the physical cursor position on the screen stays the same, but the buffer position needs to be adjusted to account for invisible characters. */ if ((MB_CUR_MAX == 1 || rl_byte_oriented) && cursor_linenum == 0 && wrap_offset) _rl_last_c_pos += wrap_offset; } /* We have to reprint the prompt if it contains invisible characters, since it's not generally OK to just reprint the characters from the current cursor position. But we only need to reprint it if the cursor is before the last invisible character in the prompt string. */ nleft = prompt_visible_length + wrap_offset; if (cursor_linenum == 0 && wrap_offset > 0 && _rl_last_c_pos > 0 && #if 0 _rl_last_c_pos <= PROMPT_ENDING_INDEX && local_prompt) #else _rl_last_c_pos < PROMPT_ENDING_INDEX && local_prompt) #endif { #if defined (__MSDOS__) putc ('\r', rl_outstream); #else if (_rl_term_cr) tputs (_rl_term_cr, 1, _rl_output_character_function); #endif if (modmark) _rl_output_some_chars ("*", 1); _rl_output_some_chars (local_prompt, nleft); if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) _rl_last_c_pos = _rl_col_width (local_prompt, 0, nleft, 1) - wrap_offset + modmark; else _rl_last_c_pos = nleft + modmark; } /* Where on that line? And where does that line start in the buffer? */ pos = inv_lbreaks[cursor_linenum]; /* nleft == number of characters in the line buffer between the start of the line and the desired cursor position. */ nleft = cpos_buffer_position - pos; /* NLEFT is now a number of characters in a buffer. When in a multibyte locale, however, _rl_last_c_pos is an absolute cursor position that doesn't take invisible characters in the prompt into account. We use a fudge factor to compensate. */ /* Since _rl_backspace() doesn't know about invisible characters in the prompt, and there's no good way to tell it, we compensate for those characters here and call _rl_backspace() directly. */ if (wrap_offset && cursor_linenum == 0 && nleft < _rl_last_c_pos) { /* TX == new physical cursor position in multibyte locale. */ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) tx = _rl_col_width (&visible_line[pos], 0, nleft, 1) - visible_wrap_offset; else tx = nleft; if (tx >= 0 && _rl_last_c_pos > tx) { _rl_backspace (_rl_last_c_pos - tx); /* XXX */ _rl_last_c_pos = tx; } } /* We need to note that in a multibyte locale we are dealing with _rl_last_c_pos as an absolute cursor position, but moving to a point specified by a buffer position (NLEFT) that doesn't take invisible characters into account. */ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) _rl_move_cursor_relative (nleft, &invisible_line[pos]); else if (nleft != _rl_last_c_pos) _rl_move_cursor_relative (nleft, &invisible_line[pos]); } } else /* Do horizontal scrolling. */ { #define M_OFFSET(margin, offset) ((margin) == 0 ? offset : 0) int lmargin, ndisp, nleft, phys_c_pos, t; /* Always at top line. */ _rl_last_v_pos = 0; /* Compute where in the buffer the displayed line should start. This will be LMARGIN. */ /* The number of characters that will be displayed before the cursor. */ ndisp = cpos_buffer_position - wrap_offset; nleft = prompt_visible_length + wrap_offset; /* Where the new cursor position will be on the screen. This can be longer than SCREENWIDTH; if it is, lmargin will be adjusted. */ phys_c_pos = cpos_buffer_position - (last_lmargin ? last_lmargin : wrap_offset); t = _rl_screenwidth / 3; /* If the number of characters had already exceeded the screenwidth, last_lmargin will be > 0. */ /* If the number of characters to be displayed is more than the screen width, compute the starting offset so that the cursor is about two-thirds of the way across the screen. */ if (phys_c_pos > _rl_screenwidth - 2) { lmargin = cpos_buffer_position - (2 * t); if (lmargin < 0) lmargin = 0; /* If the left margin would be in the middle of a prompt with invisible characters, don't display the prompt at all. */ if (wrap_offset && lmargin > 0 && lmargin < nleft) lmargin = nleft; } else if (ndisp < _rl_screenwidth - 2) /* XXX - was -1 */ lmargin = 0; else if (phys_c_pos < 1) { /* If we are moving back towards the beginning of the line and the last margin is no longer correct, compute a new one. */ lmargin = ((cpos_buffer_position - 1) / t) * t; /* XXX */ if (wrap_offset && lmargin > 0 && lmargin < nleft) lmargin = nleft; } else lmargin = last_lmargin; /* If the first character on the screen isn't the first character in the display line, indicate this with a special character. */ if (lmargin > 0) line[lmargin] = '<'; /* If SCREENWIDTH characters starting at LMARGIN do not encompass the whole line, indicate that with a special character at the right edge of the screen. If LMARGIN is 0, we need to take the wrap offset into account. */ t = lmargin + M_OFFSET (lmargin, wrap_offset) + _rl_screenwidth; if (t < out) line[t - 1] = '>'; if (rl_display_fixed == 0 || forced_display || lmargin != last_lmargin) { forced_display = 0; o_cpos = _rl_last_c_pos; cpos_adjusted = 0; update_line (&visible_line[last_lmargin], &invisible_line[lmargin], 0, _rl_screenwidth + visible_wrap_offset, _rl_screenwidth + (lmargin ? 0 : wrap_offset), 0); if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) && OLD_CPOS_IN_PROMPT()) _rl_last_c_pos -= prompt_invis_chars_first_line; /* XXX - was wrap_offset */ /* If the visible new line is shorter than the old, but the number of invisible characters is greater, and we are at the end of the new line, we need to clear to eol. */ t = _rl_last_c_pos - M_OFFSET (lmargin, wrap_offset); if ((M_OFFSET (lmargin, wrap_offset) > visible_wrap_offset) && (_rl_last_c_pos == out) && t < visible_first_line_len) { nleft = _rl_screenwidth - t; _rl_clear_to_eol (nleft); } visible_first_line_len = out - lmargin - M_OFFSET (lmargin, wrap_offset); if (visible_first_line_len > _rl_screenwidth) visible_first_line_len = _rl_screenwidth; _rl_move_cursor_relative (cpos_buffer_position - lmargin, &invisible_line[lmargin]); last_lmargin = lmargin; } } fflush (rl_outstream); /* Swap visible and non-visible lines. */ { struct line_state *vtemp = line_state_visible; line_state_visible = line_state_invisible; line_state_invisible = vtemp; rl_display_fixed = 0; /* If we are displaying on a single line, and last_lmargin is > 0, we are not displaying any invisible characters, so set visible_wrap_offset to 0. */ if (_rl_horizontal_scroll_mode && last_lmargin) visible_wrap_offset = 0; else visible_wrap_offset = wrap_offset; } RL_UNSETSTATE (RL_STATE_REDISPLAYING); _rl_release_sigint (); } /* PWP: update_line() is based on finding the middle difference of each line on the screen; vis: /old first difference /beginning of line | /old last same /old EOL v v v v old: eddie> Oh, my little gruntle-buggy is to me, as lurgid as new: eddie> Oh, my little buggy says to me, as lurgid as ^ ^ ^ ^ \beginning of line | \new last same \new end of line \new first difference All are character pointers for the sake of speed. Special cases for no differences, as well as for end of line additions must be handled. Could be made even smarter, but this works well enough */ static void update_line (old, new, current_line, omax, nmax, inv_botlin) register char *old, *new; int current_line, omax, nmax, inv_botlin; { register char *ofd, *ols, *oe, *nfd, *nls, *ne; int temp, lendiff, wsatend, od, nd, twidth, o_cpos; int current_invis_chars; int col_lendiff, col_temp; #if defined (HANDLE_MULTIBYTE) mbstate_t ps_new, ps_old; int new_offset, old_offset; #endif /* If we're at the right edge of a terminal that supports xn, we're ready to wrap around, so do so. This fixes problems with knowing the exact cursor position and cut-and-paste with certain terminal emulators. In this calculation, TEMP is the physical screen position of the cursor. */ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) temp = _rl_last_c_pos; else temp = _rl_last_c_pos - WRAP_OFFSET (_rl_last_v_pos, visible_wrap_offset); if (temp == _rl_screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode && _rl_last_v_pos == current_line - 1) { #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { wchar_t wc; mbstate_t ps; int tempwidth, bytes; size_t ret; /* This fixes only double-column characters, but if the wrapped character comsumes more than three columns, spaces will be inserted in the string buffer. */ if (current_line < line_state_visible->wbsize && line_state_visible->wrapped_line[current_line] > 0) _rl_clear_to_eol (line_state_visible->wrapped_line[current_line]); memset (&ps, 0, sizeof (mbstate_t)); ret = mbrtowc (&wc, new, MB_CUR_MAX, &ps); if (MB_INVALIDCH (ret)) { tempwidth = 1; ret = 1; } else if (MB_NULLWCH (ret)) tempwidth = 0; else tempwidth = wcwidth (wc); if (tempwidth > 0) { int count, i; bytes = ret; for (count = 0; count < bytes; count++) putc (new[count], rl_outstream); _rl_last_c_pos = tempwidth; _rl_last_v_pos++; memset (&ps, 0, sizeof (mbstate_t)); ret = mbrtowc (&wc, old, MB_CUR_MAX, &ps); if (ret != 0 && bytes != 0) { if (MB_INVALIDCH (ret)) ret = 1; memmove (old+bytes, old+ret, strlen (old+ret)); memcpy (old, new, bytes); /* Fix up indices if we copy data from one line to another */ omax += bytes - ret; for (i = current_line+1; i < inv_botlin+1; i++) vis_lbreaks[i] += bytes - ret; } } else { putc (' ', rl_outstream); _rl_last_c_pos = 1; _rl_last_v_pos++; if (old[0] && new[0]) old[0] = new[0]; } } else #endif { if (new[0]) putc (new[0], rl_outstream); else putc (' ', rl_outstream); _rl_last_c_pos = 1; _rl_last_v_pos++; if (old[0] && new[0]) old[0] = new[0]; } } /* Find first difference. */ #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { /* See if the old line is a subset of the new line, so that the only change is adding characters. */ temp = (omax < nmax) ? omax : nmax; if (memcmp (old, new, temp) == 0) /* adding at the end */ { ofd = old + temp; nfd = new + temp; } else { memset (&ps_new, 0, sizeof(mbstate_t)); memset (&ps_old, 0, sizeof(mbstate_t)); if (omax == nmax && STREQN (new, old, omax)) { ofd = old + omax; nfd = new + nmax; } else { new_offset = old_offset = 0; for (ofd = old, nfd = new; (ofd - old < omax) && *ofd && _rl_compare_chars(old, old_offset, &ps_old, new, new_offset, &ps_new); ) { old_offset = _rl_find_next_mbchar (old, old_offset, 1, MB_FIND_ANY); new_offset = _rl_find_next_mbchar (new, new_offset, 1, MB_FIND_ANY); ofd = old + old_offset; nfd = new + new_offset; } } } } else #endif for (ofd = old, nfd = new; (ofd - old < omax) && *ofd && (*ofd == *nfd); ofd++, nfd++) ; /* Move to the end of the screen line. ND and OD are used to keep track of the distance between ne and new and oe and old, respectively, to move a subtraction out of each loop. */ for (od = ofd - old, oe = ofd; od < omax && *oe; oe++, od++); for (nd = nfd - new, ne = nfd; nd < nmax && *ne; ne++, nd++); /* If no difference, continue to next line. */ if (ofd == oe && nfd == ne) return; wsatend = 1; /* flag for trailing whitespace */ #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { ols = old + _rl_find_prev_mbchar (old, oe - old, MB_FIND_ANY); nls = new + _rl_find_prev_mbchar (new, ne - new, MB_FIND_ANY); while ((ols > ofd) && (nls > nfd)) { memset (&ps_old, 0, sizeof (mbstate_t)); memset (&ps_new, 0, sizeof (mbstate_t)); #if 0 /* On advice from jir@yamato.ibm.com */ _rl_adjust_point (old, ols - old, &ps_old); _rl_adjust_point (new, nls - new, &ps_new); #endif if (_rl_compare_chars (old, ols - old, &ps_old, new, nls - new, &ps_new) == 0) break; if (*ols == ' ') wsatend = 0; ols = old + _rl_find_prev_mbchar (old, ols - old, MB_FIND_ANY); nls = new + _rl_find_prev_mbchar (new, nls - new, MB_FIND_ANY); } } else { #endif /* HANDLE_MULTIBYTE */ ols = oe - 1; /* find last same */ nls = ne - 1; while ((ols > ofd) && (nls > nfd) && (*ols == *nls)) { if (*ols != ' ') wsatend = 0; ols--; nls--; } #if defined (HANDLE_MULTIBYTE) } #endif if (wsatend) { ols = oe; nls = ne; } #if defined (HANDLE_MULTIBYTE) /* This may not work for stateful encoding, but who cares? To handle stateful encoding properly, we have to scan each string from the beginning and compare. */ else if (_rl_compare_chars (ols, 0, NULL, nls, 0, NULL) == 0) #else else if (*ols != *nls) #endif { if (*ols) /* don't step past the NUL */ { if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ols = old + _rl_find_next_mbchar (old, ols - old, 1, MB_FIND_ANY); else ols++; } if (*nls) { if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) nls = new + _rl_find_next_mbchar (new, nls - new, 1, MB_FIND_ANY); else nls++; } } /* count of invisible characters in the current invisible line. */ current_invis_chars = W_OFFSET (current_line, wrap_offset); if (_rl_last_v_pos != current_line) { _rl_move_vert (current_line); if ((MB_CUR_MAX == 1 || rl_byte_oriented) && current_line == 0 && visible_wrap_offset) _rl_last_c_pos += visible_wrap_offset; } /* If this is the first line and there are invisible characters in the prompt string, and the prompt string has not changed, and the current cursor position is before the last invisible character in the prompt, and the index of the character to move to is past the end of the prompt string, then redraw the entire prompt string. We can only do this reliably if the terminal supports a `cr' capability. This is not an efficiency hack -- there is a problem with redrawing portions of the prompt string if they contain terminal escape sequences (like drawing the `unbold' sequence without a corresponding `bold') that manifests itself on certain terminals. */ lendiff = local_prompt_len; od = ofd - old; /* index of first difference in visible line */ if (current_line == 0 && !_rl_horizontal_scroll_mode && _rl_term_cr && lendiff > prompt_visible_length && _rl_last_c_pos > 0 && od >= lendiff && _rl_last_c_pos < PROMPT_ENDING_INDEX) { #if defined (__MSDOS__) putc ('\r', rl_outstream); #else tputs (_rl_term_cr, 1, _rl_output_character_function); #endif if (modmark) _rl_output_some_chars ("*", 1); _rl_output_some_chars (local_prompt, lendiff); if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { /* We take wrap_offset into account here so we can pass correct information to _rl_move_cursor_relative. */ _rl_last_c_pos = _rl_col_width (local_prompt, 0, lendiff, 1) - wrap_offset + modmark; cpos_adjusted = 1; } else _rl_last_c_pos = lendiff + modmark; } o_cpos = _rl_last_c_pos; /* When this function returns, _rl_last_c_pos is correct, and an absolute cursor postion in multibyte mode, but a buffer index when not in a multibyte locale. */ _rl_move_cursor_relative (od, old); #if 1 #if defined (HANDLE_MULTIBYTE) /* We need to indicate that the cursor position is correct in the presence of invisible characters in the prompt string. Let's see if setting this when we make sure we're at the end of the drawn prompt string works. */ if (current_line == 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0 && (_rl_last_c_pos > 0 || o_cpos > 0) && _rl_last_c_pos == prompt_physical_chars) cpos_adjusted = 1; #endif #endif /* if (len (new) > len (old)) lendiff == difference in buffer col_lendiff == difference on screen When not using multibyte characters, these are equal */ lendiff = (nls - nfd) - (ols - ofd); if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) col_lendiff = _rl_col_width (new, nfd - new, nls - new, 1) - _rl_col_width (old, ofd - old, ols - old, 1); else col_lendiff = lendiff; /* If we are changing the number of invisible characters in a line, and the spot of first difference is before the end of the invisible chars, lendiff needs to be adjusted. */ if (current_line == 0 && !_rl_horizontal_scroll_mode && current_invis_chars != visible_wrap_offset) { if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { lendiff += visible_wrap_offset - current_invis_chars; col_lendiff += visible_wrap_offset - current_invis_chars; } else { lendiff += visible_wrap_offset - current_invis_chars; col_lendiff = lendiff; } } /* Insert (diff (len (old), len (new)) ch. */ temp = ne - nfd; if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) col_temp = _rl_col_width (new, nfd - new, ne - new, 1); else col_temp = temp; if (col_lendiff > 0) /* XXX - was lendiff */ { /* Non-zero if we're increasing the number of lines. */ int gl = current_line >= _rl_vis_botlin && inv_botlin > _rl_vis_botlin; /* If col_lendiff is > 0, implying that the new string takes up more screen real estate than the old, but lendiff is < 0, meaning that it takes fewer bytes, we need to just output the characters starting from the first difference. These will overwrite what is on the display, so there's no reason to do a smart update. This can really only happen in a multibyte environment. */ if (lendiff < 0) { _rl_output_some_chars (nfd, temp); _rl_last_c_pos += _rl_col_width (nfd, 0, temp, 1); /* If nfd begins before any invisible characters in the prompt, adjust _rl_last_c_pos to account for wrap_offset and set cpos_adjusted to let the caller know. */ if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible)) { _rl_last_c_pos -= wrap_offset; cpos_adjusted = 1; } return; } /* Sometimes it is cheaper to print the characters rather than use the terminal's capabilities. If we're growing the number of lines, make sure we actually cause the new line to wrap around on auto-wrapping terminals. */ else if (_rl_terminal_can_insert && ((2 * col_temp) >= col_lendiff || _rl_term_IC) && (!_rl_term_autowrap || !gl)) { /* If lendiff > prompt_visible_length and _rl_last_c_pos == 0 and _rl_horizontal_scroll_mode == 1, inserting the characters with _rl_term_IC or _rl_term_ic will screw up the screen because of the invisible characters. We need to just draw them. */ /* The same thing happens if we're trying to draw before the last invisible character in the prompt string or we're increasing the number of invisible characters in the line and we're not drawing the entire prompt string. */ if (*ols && ((_rl_horizontal_scroll_mode && _rl_last_c_pos == 0 && lendiff > prompt_visible_length && current_invis_chars > 0) == 0) && (((MB_CUR_MAX > 1 && rl_byte_oriented == 0) && current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible) && (col_lendiff < prompt_visible_length)) == 0) && (visible_wrap_offset >= current_invis_chars)) { insert_some_chars (nfd, lendiff, col_lendiff); _rl_last_c_pos += col_lendiff; } #if 0 /* XXX - for now */ else if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) && _rl_last_c_pos == 0 && wrap_offset && (nfd-new) <= prompt_last_invisible && col_lendiff < prompt_visible_length && visible_wrap_offset >= current_invis_chars) { _rl_output_some_chars (nfd, lendiff); _rl_last_c_pos += col_lendiff; } #endif else if ((MB_CUR_MAX == 1 || rl_byte_oriented != 0) && *ols == 0 && lendiff > 0) { /* At the end of a line the characters do not have to be "inserted". They can just be placed on the screen. */ /* However, this screws up the rest of this block, which assumes you've done the insert because you can. */ _rl_output_some_chars (nfd, lendiff); _rl_last_c_pos += col_lendiff; } else { _rl_output_some_chars (nfd, temp); _rl_last_c_pos += col_temp; /* If nfd begins before the last invisible character in the prompt, adjust _rl_last_c_pos to account for wrap_offset and set cpos_adjusted to let the caller know. */ if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) && current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible)) { _rl_last_c_pos -= wrap_offset; cpos_adjusted = 1; } return; } /* Copy (new) chars to screen from first diff to last match. */ temp = nls - nfd; if ((temp - lendiff) > 0) { _rl_output_some_chars (nfd + lendiff, temp - lendiff); /* XXX -- this bears closer inspection. Fixes a redisplay bug reported against bash-3.0-alpha by Andreas Schwab involving multibyte characters and prompt strings with invisible characters, but was previously disabled. */ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) twidth = _rl_col_width (nfd+lendiff, 0, temp-col_lendiff, 1); else twidth = temp - lendiff; _rl_last_c_pos += twidth; /* If nfd begins before the last invisible character in the prompt, adjust _rl_last_c_pos to account for wrap_offset and set cpos_adjusted to let the caller know. */ if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) && current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible)) { _rl_last_c_pos -= wrap_offset; cpos_adjusted = 1; } } } else { /* cannot insert chars, write to EOL */ _rl_output_some_chars (nfd, temp); _rl_last_c_pos += col_temp; /* If we're in a multibyte locale and were before the last invisible char in the current line (which implies we just output some invisible characters) we need to adjust _rl_last_c_pos, since it represents a physical character position. */ if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) && current_line == prompt_last_screen_line && wrap_offset && wrap_offset != prompt_invis_chars_first_line && ((nfd-new) < (prompt_last_invisible-(current_line*_rl_screenwidth)))) { _rl_last_c_pos -= wrap_offset - prompt_invis_chars_first_line; cpos_adjusted = 1; } } } else /* Delete characters from line. */ { /* If possible and inexpensive to use terminal deletion, then do so. */ if (_rl_term_dc && (2 * col_temp) >= -col_lendiff) { /* If all we're doing is erasing the invisible characters in the prompt string, don't bother. It screws up the assumptions about what's on the screen. */ if (_rl_horizontal_scroll_mode && _rl_last_c_pos == 0 && -lendiff == visible_wrap_offset) col_lendiff = 0; if (col_lendiff) delete_chars (-col_lendiff); /* delete (diff) characters */ /* Copy (new) chars to screen from first diff to last match */ temp = nls - nfd; if (temp > 0) { /* If nfd begins at the prompt, or before the invisible characters in the prompt, we need to adjust _rl_last_c_pos in a multibyte locale to account for the wrap offset and set cpos_adjusted accordingly. */ _rl_output_some_chars (nfd, temp); if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { _rl_last_c_pos += _rl_col_width (nfd, 0, temp, 1); if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible)) { _rl_last_c_pos -= wrap_offset; cpos_adjusted = 1; } } else _rl_last_c_pos += temp; } } /* Otherwise, print over the existing material. */ else { if (temp > 0) { /* If nfd begins at the prompt, or before the invisible characters in the prompt, we need to adjust _rl_last_c_pos in a multibyte locale to account for the wrap offset and set cpos_adjusted accordingly. */ _rl_output_some_chars (nfd, temp); _rl_last_c_pos += col_temp; /* XXX */ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible)) { _rl_last_c_pos -= wrap_offset; cpos_adjusted = 1; } } } lendiff = (oe - old) - (ne - new); if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) col_lendiff = _rl_col_width (old, 0, oe - old, 1) - _rl_col_width (new, 0, ne - new, 1); else col_lendiff = lendiff; #if 0 if (col_lendiff) #else /* If we've already printed over the entire width of the screen, including the old material, then col_lendiff doesn't matter and space_to_eol will insert too many spaces. XXX - maybe we should adjust col_lendiff based on the difference between _rl_last_c_pos and _rl_screenwidth */ if (col_lendiff && ((MB_CUR_MAX == 1 || rl_byte_oriented) || (_rl_last_c_pos < _rl_screenwidth))) #endif { if (_rl_term_autowrap && current_line < inv_botlin) space_to_eol (col_lendiff); else _rl_clear_to_eol (col_lendiff); } } } } /* Tell the update routines that we have moved onto a new (empty) line. */ int rl_on_new_line () { if (visible_line) visible_line[0] = '\0'; _rl_last_c_pos = _rl_last_v_pos = 0; _rl_vis_botlin = last_lmargin = 0; if (vis_lbreaks) vis_lbreaks[0] = vis_lbreaks[1] = 0; visible_wrap_offset = 0; return 0; } /* Tell the update routines that we have moved onto a new line with the prompt already displayed. Code originally from the version of readline distributed with CLISP. rl_expand_prompt must have already been called (explicitly or implicitly). This still doesn't work exactly right. */ int rl_on_new_line_with_prompt () { int prompt_size, i, l, real_screenwidth, newlines; char *prompt_last_line, *lprompt; /* Initialize visible_line and invisible_line to ensure that they can hold the already-displayed prompt. */ prompt_size = strlen (rl_prompt) + 1; init_line_structures (prompt_size); /* Make sure the line structures hold the already-displayed prompt for redisplay. */ lprompt = local_prompt ? local_prompt : rl_prompt; strcpy (visible_line, lprompt); strcpy (invisible_line, lprompt); /* If the prompt contains newlines, take the last tail. */ prompt_last_line = strrchr (rl_prompt, '\n'); if (!prompt_last_line) prompt_last_line = rl_prompt; l = strlen (prompt_last_line); if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) _rl_last_c_pos = _rl_col_width (prompt_last_line, 0, l, 1); /* XXX */ else _rl_last_c_pos = l; /* Dissect prompt_last_line into screen lines. Note that here we have to use the real screenwidth. Readline's notion of screenwidth might be one less, see terminal.c. */ real_screenwidth = _rl_screenwidth + (_rl_term_autowrap ? 0 : 1); _rl_last_v_pos = l / real_screenwidth; /* If the prompt length is a multiple of real_screenwidth, we don't know whether the cursor is at the end of the last line, or already at the beginning of the next line. Output a newline just to be safe. */ if (l > 0 && (l % real_screenwidth) == 0) _rl_output_some_chars ("\n", 1); last_lmargin = 0; newlines = 0; i = 0; while (i <= l) { _rl_vis_botlin = newlines; vis_lbreaks[newlines++] = i; i += real_screenwidth; } vis_lbreaks[newlines] = l; visible_wrap_offset = 0; rl_display_prompt = rl_prompt; /* XXX - make sure it's set */ return 0; } /* Actually update the display, period. */ int rl_forced_update_display () { register char *temp; if (visible_line) { temp = visible_line; while (*temp) *temp++ = '\0'; } rl_on_new_line (); forced_display++; (*rl_redisplay_function) (); return 0; } /* Move the cursor from _rl_last_c_pos to NEW, which are buffer indices. (Well, when we don't have multibyte characters, _rl_last_c_pos is a buffer index.) DATA is the contents of the screen line of interest; i.e., where the movement is being done. */ void _rl_move_cursor_relative (new, data) int new; const char *data; { register int i; int woff; /* number of invisible chars on current line */ int cpos, dpos; /* current and desired cursor positions */ int adjust; woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset); cpos = _rl_last_c_pos; if (cpos == 0 && cpos == new) return; #if defined (HANDLE_MULTIBYTE) /* If we have multibyte characters, NEW is indexed by the buffer point in a multibyte string, but _rl_last_c_pos is the display position. In this case, NEW's display position is not obvious and must be calculated. We need to account for invisible characters in this line, as long as we are past them and they are counted by _rl_col_width. */ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { adjust = 1; /* Try to short-circuit common cases and eliminate a bunch of multibyte character function calls. */ /* 1. prompt string */ if (new == local_prompt_len && memcmp (data, local_prompt, new) == 0) { dpos = prompt_physical_chars; cpos_adjusted = 1; adjust = 0; } /* 2. prompt_string + line contents */ else if (new > local_prompt_len && local_prompt && memcmp (data, local_prompt, local_prompt_len) == 0) { dpos = prompt_physical_chars + _rl_col_width (data, local_prompt_len, new, 1); cpos_adjusted = 1; adjust = 0; } else dpos = _rl_col_width (data, 0, new, 1); /* Use NEW when comparing against the last invisible character in the prompt string, since they're both buffer indices and DPOS is a desired display position. */ if (adjust && ((new > prompt_last_invisible) || /* XXX - don't use woff here */ (prompt_physical_chars >= _rl_screenwidth && _rl_last_v_pos == prompt_last_screen_line && wrap_offset >= woff && dpos >= woff && new > (prompt_last_invisible-(_rl_screenwidth*_rl_last_v_pos)-wrap_offset)))) /* XXX last comparison might need to be >= */ { dpos -= woff; /* Since this will be assigned to _rl_last_c_pos at the end (more precisely, _rl_last_c_pos == dpos when this function returns), let the caller know. */ cpos_adjusted = 1; } } else #endif dpos = new; /* If we don't have to do anything, then return. */ if (cpos == dpos) return; /* It may be faster to output a CR, and then move forwards instead of moving backwards. */ /* i == current physical cursor position. */ #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) i = _rl_last_c_pos; else #endif i = _rl_last_c_pos - woff; if (dpos == 0 || CR_FASTER (dpos, _rl_last_c_pos) || (_rl_term_autowrap && i == _rl_screenwidth)) { #if defined (__MSDOS__) putc ('\r', rl_outstream); #else tputs (_rl_term_cr, 1, _rl_output_character_function); #endif /* !__MSDOS__ */ cpos = _rl_last_c_pos = 0; } if (cpos < dpos) { /* Move the cursor forward. We do it by printing the command to move the cursor forward if there is one, else print that portion of the output buffer again. Which is cheaper? */ /* The above comment is left here for posterity. It is faster to print one character (non-control) than to print a control sequence telling the terminal to move forward one character. That kind of control is for people who don't know what the data is underneath the cursor. */ /* However, we need a handle on where the current display position is in the buffer for the immediately preceding comment to be true. In multibyte locales, we don't currently have that info available. Without it, we don't know where the data we have to display begins in the buffer and we have to go back to the beginning of the screen line. In this case, we can use the terminal sequence to move forward if it's available. */ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { if (_rl_term_forward_char) { for (i = cpos; i < dpos; i++) tputs (_rl_term_forward_char, 1, _rl_output_character_function); } else { tputs (_rl_term_cr, 1, _rl_output_character_function); for (i = 0; i < new; i++) putc (data[i], rl_outstream); } } else for (i = cpos; i < new; i++) putc (data[i], rl_outstream); } #if defined (HANDLE_MULTIBYTE) /* NEW points to the buffer point, but _rl_last_c_pos is the display point. The byte length of the string is probably bigger than the column width of the string, which means that if NEW == _rl_last_c_pos, then NEW's display point is less than _rl_last_c_pos. */ #endif else if (cpos > dpos) _rl_backspace (cpos - dpos); _rl_last_c_pos = dpos; } /* PWP: move the cursor up or down. */ void _rl_move_vert (to) int to; { register int delta, i; if (_rl_last_v_pos == to || to > _rl_screenheight) return; if ((delta = to - _rl_last_v_pos) > 0) { for (i = 0; i < delta; i++) putc ('\n', rl_outstream); #if defined (__MSDOS__) putc ('\r', rl_outstream); #else tputs (_rl_term_cr, 1, _rl_output_character_function); #endif _rl_last_c_pos = 0; } else { /* delta < 0 */ #ifdef __MSDOS__ int row, col; fflush (rl_outstream); /* make sure the cursor pos is current! */ ScreenGetCursor (&row, &col); ScreenSetCursor (row + delta, col); i = -delta; /* in case someone wants to use it after the loop */ #else /* !__MSDOS__ */ if (_rl_term_up && *_rl_term_up) for (i = 0; i < -delta; i++) tputs (_rl_term_up, 1, _rl_output_character_function); #endif /* !__MSDOS__ */ } _rl_last_v_pos = to; /* Now TO is here */ } /* Physically print C on rl_outstream. This is for functions which know how to optimize the display. Return the number of characters output. */ int rl_show_char (c) int c; { int n = 1; if (META_CHAR (c) && (_rl_output_meta_chars == 0)) { fprintf (rl_outstream, "M-"); n += 2; c = UNMETA (c); } #if defined (DISPLAY_TABS) if ((CTRL_CHAR (c) && c != '\t') || c == RUBOUT) #else if (CTRL_CHAR (c) || c == RUBOUT) #endif /* !DISPLAY_TABS */ { fprintf (rl_outstream, "C-"); n += 2; c = CTRL_CHAR (c) ? UNCTRL (c) : '?'; } putc (c, rl_outstream); fflush (rl_outstream); return n; } int rl_character_len (c, pos) register int c, pos; { unsigned char uc; uc = (unsigned char)c; if (META_CHAR (uc)) return ((_rl_output_meta_chars == 0) ? 4 : 1); if (uc == '\t') { #if defined (DISPLAY_TABS) return (((pos | 7) + 1) - pos); #else return (2); #endif /* !DISPLAY_TABS */ } if (CTRL_CHAR (c) || c == RUBOUT) return (2); return ((ISPRINT (uc)) ? 1 : 2); } /* How to print things in the "echo-area". The prompt is treated as a mini-modeline. */ static int msg_saved_prompt = 0; #if defined (USE_VARARGS) int #if defined (PREFER_STDARG) rl_message (const char *format, ...) #else rl_message (va_alist) va_dcl #endif { va_list args; #if defined (PREFER_VARARGS) char *format; #endif #if defined (PREFER_STDARG) va_start (args, format); #else va_start (args); format = va_arg (args, char *); #endif #if defined (HAVE_VSNPRINTF) vsnprintf (msg_buf, sizeof (msg_buf) - 1, format, args); #else vsprintf (msg_buf, format, args); msg_buf[sizeof(msg_buf) - 1] = '\0'; /* overflow? */ #endif va_end (args); if (saved_local_prompt == 0) { rl_save_prompt (); msg_saved_prompt = 1; } rl_display_prompt = msg_buf; local_prompt = expand_prompt (msg_buf, &prompt_visible_length, &prompt_last_invisible, &prompt_invis_chars_first_line, &prompt_physical_chars); local_prompt_prefix = (char *)NULL; local_prompt_len = local_prompt ? strlen (local_prompt) : 0; (*rl_redisplay_function) (); return 0; } #else /* !USE_VARARGS */ int rl_message (format, arg1, arg2) char *format; { sprintf (msg_buf, format, arg1, arg2); msg_buf[sizeof(msg_buf) - 1] = '\0'; /* overflow? */ rl_display_prompt = msg_buf; if (saved_local_prompt == 0) { rl_save_prompt (); msg_saved_prompt = 1; } local_prompt = expand_prompt (msg_buf, &prompt_visible_length, &prompt_last_invisible, &prompt_invis_chars_first_line, &prompt_physical_chars); local_prompt_prefix = (char *)NULL; local_prompt_len = local_prompt ? strlen (local_prompt) : 0; (*rl_redisplay_function) (); return 0; } #endif /* !USE_VARARGS */ /* How to clear things from the "echo-area". */ int rl_clear_message () { rl_display_prompt = rl_prompt; if (msg_saved_prompt) { rl_restore_prompt (); msg_saved_prompt = 0; } (*rl_redisplay_function) (); return 0; } int rl_reset_line_state () { rl_on_new_line (); rl_display_prompt = rl_prompt ? rl_prompt : ""; forced_display = 1; return 0; } void rl_save_prompt () { saved_local_prompt = local_prompt; saved_local_prefix = local_prompt_prefix; saved_prefix_length = prompt_prefix_length; saved_local_length = local_prompt_len; saved_last_invisible = prompt_last_invisible; saved_visible_length = prompt_visible_length; saved_invis_chars_first_line = prompt_invis_chars_first_line; saved_physical_chars = prompt_physical_chars; local_prompt = local_prompt_prefix = (char *)0; local_prompt_len = 0; prompt_last_invisible = prompt_visible_length = prompt_prefix_length = 0; prompt_invis_chars_first_line = prompt_physical_chars = 0; } void rl_restore_prompt () { FREE (local_prompt); FREE (local_prompt_prefix); local_prompt = saved_local_prompt; local_prompt_prefix = saved_local_prefix; local_prompt_len = saved_local_length; prompt_prefix_length = saved_prefix_length; prompt_last_invisible = saved_last_invisible; prompt_visible_length = saved_visible_length; prompt_invis_chars_first_line = saved_invis_chars_first_line; prompt_physical_chars = saved_physical_chars; /* can test saved_local_prompt to see if prompt info has been saved. */ saved_local_prompt = saved_local_prefix = (char *)0; saved_local_length = 0; saved_last_invisible = saved_visible_length = saved_prefix_length = 0; saved_invis_chars_first_line = saved_physical_chars = 0; } char * _rl_make_prompt_for_search (pchar) int pchar; { int len; char *pmt, *p; rl_save_prompt (); /* We've saved the prompt, and can do anything with the various prompt strings we need before they're restored. We want the unexpanded portion of the prompt string after any final newline. */ p = rl_prompt ? strrchr (rl_prompt, '\n') : 0; if (p == 0) { len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0; pmt = (char *)xmalloc (len + 2); if (len) strcpy (pmt, rl_prompt); pmt[len] = pchar; pmt[len+1] = '\0'; } else { p++; len = strlen (p); pmt = (char *)xmalloc (len + 2); if (len) strcpy (pmt, p); pmt[len] = pchar; pmt[len+1] = '\0'; } /* will be overwritten by expand_prompt, called from rl_message */ prompt_physical_chars = saved_physical_chars + 1; return pmt; } /* Quick redisplay hack when erasing characters at the end of the line. */ void _rl_erase_at_end_of_line (l) int l; { register int i; _rl_backspace (l); for (i = 0; i < l; i++) putc (' ', rl_outstream); _rl_backspace (l); for (i = 0; i < l; i++) visible_line[--_rl_last_c_pos] = '\0'; rl_display_fixed++; } /* Clear to the end of the line. COUNT is the minimum number of character spaces to clear, */ void _rl_clear_to_eol (count) int count; { #ifndef __MSDOS__ if (_rl_term_clreol) tputs (_rl_term_clreol, 1, _rl_output_character_function); else #endif if (count) space_to_eol (count); } /* Clear to the end of the line using spaces. COUNT is the minimum number of character spaces to clear, */ static void space_to_eol (count) int count; { register int i; for (i = 0; i < count; i++) putc (' ', rl_outstream); _rl_last_c_pos += count; } void _rl_clear_screen () { #if defined (__GO32__) ScreenClear (); /* FIXME: only works in text modes */ ScreenSetCursor (0, 0); /* term_clrpag is "cl" which homes the cursor */ #else if (_rl_term_clrpag) tputs (_rl_term_clrpag, 1, _rl_output_character_function); else rl_crlf (); #endif } /* Insert COUNT characters from STRING to the output stream at column COL. */ static void insert_some_chars (string, count, col) char *string; int count, col; { #if defined (__MSDOS__) || defined (__MINGW32__) _rl_output_some_chars (string, count); #else /* DEBUGGING */ if (MB_CUR_MAX == 1 || rl_byte_oriented) if (count != col) _rl_ttymsg ("debug: insert_some_chars: count (%d) != col (%d)", count, col); /* If IC is defined, then we do not have to "enter" insert mode. */ if (_rl_term_IC) { char *buffer; buffer = tgoto (_rl_term_IC, 0, col); tputs (buffer, 1, _rl_output_character_function); _rl_output_some_chars (string, count); } else { register int i; /* If we have to turn on insert-mode, then do so. */ if (_rl_term_im && *_rl_term_im) tputs (_rl_term_im, 1, _rl_output_character_function); /* If there is a special command for inserting characters, then use that first to open up the space. */ if (_rl_term_ic && *_rl_term_ic) { for (i = col; i--; ) tputs (_rl_term_ic, 1, _rl_output_character_function); } /* Print the text. */ _rl_output_some_chars (string, count); /* If there is a string to turn off insert mode, we had best use it now. */ if (_rl_term_ei && *_rl_term_ei) tputs (_rl_term_ei, 1, _rl_output_character_function); } #endif /* __MSDOS__ || __MINGW32__ */ } /* Delete COUNT characters from the display line. */ static void delete_chars (count) int count; { if (count > _rl_screenwidth) /* XXX */ return; #if !defined (__MSDOS__) && !defined (__MINGW32__) if (_rl_term_DC && *_rl_term_DC) { char *buffer; buffer = tgoto (_rl_term_DC, count, count); tputs (buffer, count, _rl_output_character_function); } else { if (_rl_term_dc && *_rl_term_dc) while (count--) tputs (_rl_term_dc, 1, _rl_output_character_function); } #endif /* !__MSDOS__ && !__MINGW32__ */ } void _rl_update_final () { int full_lines; full_lines = 0; /* If the cursor is the only thing on an otherwise-blank last line, compensate so we don't print an extra CRLF. */ if (_rl_vis_botlin && _rl_last_c_pos == 0 && visible_line[vis_lbreaks[_rl_vis_botlin]] == 0) { _rl_vis_botlin--; full_lines = 1; } _rl_move_vert (_rl_vis_botlin); /* If we've wrapped lines, remove the final xterm line-wrap flag. */ if (full_lines && _rl_term_autowrap && (VIS_LLEN(_rl_vis_botlin) == _rl_screenwidth)) { char *last_line; last_line = &visible_line[vis_lbreaks[_rl_vis_botlin]]; cpos_buffer_position = -1; /* don't know where we are in buffer */ _rl_move_cursor_relative (_rl_screenwidth - 1, last_line); /* XXX */ _rl_clear_to_eol (0); putc (last_line[_rl_screenwidth - 1], rl_outstream); } _rl_vis_botlin = 0; rl_crlf (); fflush (rl_outstream); rl_display_fixed++; } /* Move to the start of the current line. */ static void cr () { if (_rl_term_cr) { #if defined (__MSDOS__) putc ('\r', rl_outstream); #else tputs (_rl_term_cr, 1, _rl_output_character_function); #endif _rl_last_c_pos = 0; } } /* Redraw the last line of a multi-line prompt that may possibly contain terminal escape sequences. Called with the cursor at column 0 of the line to draw the prompt on. */ static void redraw_prompt (t) char *t; { char *oldp; oldp = rl_display_prompt; rl_save_prompt (); rl_display_prompt = t; local_prompt = expand_prompt (t, &prompt_visible_length, &prompt_last_invisible, &prompt_invis_chars_first_line, &prompt_physical_chars); local_prompt_prefix = (char *)NULL; local_prompt_len = local_prompt ? strlen (local_prompt) : 0; rl_forced_update_display (); rl_display_prompt = oldp; rl_restore_prompt(); } /* Redisplay the current line after a SIGWINCH is received. */ void _rl_redisplay_after_sigwinch () { char *t; /* Clear the last line (assuming that the screen size change will result in either more or fewer characters on that line only) and put the cursor at column 0. Make sure the right thing happens if we have wrapped to a new screen line. */ if (_rl_term_cr) { _rl_move_vert (_rl_vis_botlin); #if defined (__MSDOS__) putc ('\r', rl_outstream); #else tputs (_rl_term_cr, 1, _rl_output_character_function); #endif _rl_last_c_pos = 0; #if defined (__MSDOS__) space_to_eol (_rl_screenwidth); putc ('\r', rl_outstream); #else if (_rl_term_clreol) tputs (_rl_term_clreol, 1, _rl_output_character_function); else { space_to_eol (_rl_screenwidth); tputs (_rl_term_cr, 1, _rl_output_character_function); } #endif if (_rl_last_v_pos > 0) _rl_move_vert (0); } else rl_crlf (); /* Redraw only the last line of a multi-line prompt. */ t = strrchr (rl_display_prompt, '\n'); if (t) redraw_prompt (++t); else rl_forced_update_display (); } void _rl_clean_up_for_exit () { if (_rl_echoing_p) { _rl_move_vert (_rl_vis_botlin); _rl_vis_botlin = 0; fflush (rl_outstream); rl_restart_output (1, 0); } } void _rl_erase_entire_line () { cr (); _rl_clear_to_eol (0); cr (); fflush (rl_outstream); } /* return the `current display line' of the cursor -- the number of lines to move up to get to the first screen line of the current readline line. */ int _rl_current_display_line () { int ret, nleft; /* Find out whether or not there might be invisible characters in the editing buffer. */ if (rl_display_prompt == rl_prompt) nleft = _rl_last_c_pos - _rl_screenwidth - rl_visible_prompt_length; else nleft = _rl_last_c_pos - _rl_screenwidth; if (nleft > 0) ret = 1 + nleft / _rl_screenwidth; else ret = 0; return ret; } #if defined (HANDLE_MULTIBYTE) /* Calculate the number of screen columns occupied by STR from START to END. In the case of multibyte characters with stateful encoding, we have to scan from the beginning of the string to take the state into account. */ static int _rl_col_width (str, start, end, flags) const char *str; int start, end, flags; { wchar_t wc; mbstate_t ps; int tmp, point, width, max; if (end <= start) return 0; if (MB_CUR_MAX == 1 || rl_byte_oriented) { _rl_ttymsg ("_rl_col_width: called with MB_CUR_MAX == 1"); return (end - start); } memset (&ps, 0, sizeof (mbstate_t)); point = 0; max = end; /* Try to short-circuit common cases. The adjustment to remove wrap_offset is done by the caller. */ /* 1. prompt string */ if (flags && start == 0 && end == local_prompt_len && memcmp (str, local_prompt, local_prompt_len) == 0) return (prompt_physical_chars + wrap_offset); /* 2. prompt string + line contents */ else if (flags && start == 0 && local_prompt_len > 0 && end > local_prompt_len && local_prompt && memcmp (str, local_prompt, local_prompt_len) == 0) { tmp = prompt_physical_chars + wrap_offset; /* XXX - try to call ourselves recursively with non-prompt portion */ tmp += _rl_col_width (str, local_prompt_len, end, flags); return (tmp); } while (point < start) { tmp = mbrlen (str + point, max, &ps); if (MB_INVALIDCH ((size_t)tmp)) { /* In this case, the bytes are invalid or too short to compose a multibyte character, so we assume that the first byte represents a single character. */ point++; max--; /* Clear the state of the byte sequence, because in this case the effect of mbstate is undefined. */ memset (&ps, 0, sizeof (mbstate_t)); } else if (MB_NULLWCH (tmp)) break; /* Found '\0' */ else { point += tmp; max -= tmp; } } /* If START is not a byte that starts a character, then POINT will be greater than START. In this case, assume that (POINT - START) gives a byte count that is the number of columns of difference. */ width = point - start; while (point < end) { tmp = mbrtowc (&wc, str + point, max, &ps); if (MB_INVALIDCH ((size_t)tmp)) { /* In this case, the bytes are invalid or too short to compose a multibyte character, so we assume that the first byte represents a single character. */ point++; max--; /* and assume that the byte occupies a single column. */ width++; /* Clear the state of the byte sequence, because in this case the effect of mbstate is undefined. */ memset (&ps, 0, sizeof (mbstate_t)); } else if (MB_NULLWCH (tmp)) break; /* Found '\0' */ else { point += tmp; max -= tmp; tmp = wcwidth(wc); width += (tmp >= 0) ? tmp : 1; } } width += point - end; return width; } #endif /* HANDLE_MULTIBYTE */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/cross-build/�����������������������������������������������������������������0000755�0001750�0001750�00000000000�12266504076�016104� 5����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/cross-build/cygwin.cache�����������������������������������������������������0000644�0001750�0001750�00000004340�12250770610�020362� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This file is a shell script that caches the results of configure # tests for CYGWIN32 so they don't need to be done when cross-compiling. # AC_FUNC_GETPGRP should also define GETPGRP_VOID ac_cv_func_getpgrp_void=${ac_cv_func_getpgrp_void='yes'} # AC_FUNC_SETVBUF_REVERSED should not define anything else ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed='no'} # on CYGWIN32, system calls do not restart ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls='no'} bash_cv_sys_restartable_syscalls=${bash_cv_sys_restartable_syscalls='no'} # these may be necessary, but they are currently commented out #ac_cv_c_bigendian=${ac_cv_c_bigendian='no'} ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p='4'} ac_cv_sizeof_int=${ac_cv_sizeof_int='4'} ac_cv_sizeof_long=${ac_cv_sizeof_long='4'} bash_cv_dup2_broken=${bash_cv_dup2_broken='no'} bash_cv_pgrp_pipe=${bash_cv_pgrp_pipe='no'} bash_cv_type_rlimit=${bash_cv_type_rlimit='long'} bash_cv_decl_under_sys_siglist=${bash_cv_decl_under_sys_siglist='no'} bash_cv_under_sys_siglist=${bash_cv_under_sys_siglist='no'} bash_cv_sys_siglist=${bash_cv_sys_siglist='no'} bash_cv_opendir_not_robust=${bash_cv_opendir_not_robust='no'} bash_cv_getenv_redef=${bash_cv_getenv_redef='yes'} bash_cv_printf_declared=${bash_cv_printf_declared='yes'} bash_cv_ulimit_maxfds=${bash_cv_ulimit_maxfds='no'} bash_cv_getcwd_calls_popen=${bash_cv_getcwd_calls_popen='no'} bash_cv_must_reinstall_sighandlers=${bash_cv_must_reinstall_sighandlers='no'} bash_cv_job_control_missing=${bash_cv_job_control_missing='present'} bash_cv_sys_named_pipes=${bash_cv_sys_named_pipes='missing'} bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp='present'} bash_cv_mail_dir=${bash_cv_mail_dir='unknown'} bash_cv_func_strcoll_broken=${bash_cv_func_strcoll_broken='no'} bash_cv_have_mbstate_t=${bash_cv_have_mbstate_t='yes'} bash_cv_type_int32_t=${bash_cv_type_int32_t='int'} bash_cv_type_u_int32_t=${bash_cv_type_u_int32_t='int'} ac_cv_header_termcap_h=${ac_cv_header_termcap_h='yes'} ac_cv_header_termios_h=${ac_cv_header_termios_h='yes'} bash_cv_termcap_lib=${bash_cv_termcap_lib='-ltermcap'} bash_cv_tiocgwinsz_in_ioctl=${bash_cv_tiocgwinsz_in_ioctl='yes'} ac_cv_lib_termcap_tgetent=${ac_cv_lib_termcap_tgetent='yes'} # end of cross-build/cygwin32.cache ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/histlib.h��������������������������������������������������������������������0000644�0001750�0001750�00000004424�12250770610�015461� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* histlib.h -- internal definitions for the history library. */ /* Copyright (C) 1989-2009 Free Software Foundation, Inc. This file contains the GNU History Library (History), a set of routines for managing the text of previously typed lines. History 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 3 of the License, or (at your option) any later version. History 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 History. If not, see <http://www.gnu.org/licenses/>. */ #if !defined (_HISTLIB_H_) #define _HISTLIB_H_ #if defined (HAVE_STRING_H) # include <string.h> #else # include <strings.h> #endif /* !HAVE_STRING_H */ #if !defined (STREQ) #define STREQ(a, b) (((a)[0] == (b)[0]) && (strcmp ((a), (b)) == 0)) #define STREQN(a, b, n) (((n) == 0) ? (1) \ : ((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0)) #endif #ifndef savestring #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) #endif #ifndef whitespace #define whitespace(c) (((c) == ' ') || ((c) == '\t')) #endif #ifndef _rl_digit_p #define _rl_digit_p(c) ((c) >= '0' && (c) <= '9') #endif #ifndef _rl_digit_value #define _rl_digit_value(c) ((c) - '0') #endif #ifndef member # ifndef strchr extern char *strchr (); # endif #define member(c, s) ((c) ? ((char *)strchr ((s), (c)) != (char *)NULL) : 0) #endif #ifndef FREE # define FREE(x) if (x) free (x) #endif /* Possible history errors passed to hist_error. */ #define EVENT_NOT_FOUND 0 #define BAD_WORD_SPEC 1 #define SUBST_FAILED 2 #define BAD_MODIFIER 3 #define NO_PREV_SUBST 4 /* Possible definitions for history starting point specification. */ #define ANCHORED_SEARCH 1 #define NON_ANCHORED_SEARCH 0 /* Possible definitions for what style of writing the history file we want. */ #define HISTORY_APPEND 0 #define HISTORY_OVERWRITE 1 /* Some variable definitions shared across history source files. */ extern int history_offset; #endif /* !_HISTLIB_H_ */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/config.h.in������������������������������������������������������������������0000644�0001750�0001750�00000013730�12250770610�015675� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* config.h.in. Maintained by hand. */ /* Define NO_MULTIBYTE_SUPPORT to not compile in support for multibyte characters, even if the OS supports them. */ #undef NO_MULTIBYTE_SUPPORT #undef _FILE_OFFSET_BITS /* Define if on MINIX. */ #undef _MINIX /* Define as the return type of signal handlers (int or void). */ #undef RETSIGTYPE #undef VOID_SIGHANDLER /* Characteristics of the compiler. */ #undef sig_atomic_t #undef size_t #undef ssize_t #undef const #undef volatile #undef PROTOTYPES #undef __CHAR_UNSIGNED__ /* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */ #undef STAT_MACROS_BROKEN /* Define if you have the fcntl function. */ #undef HAVE_FCNTL /* Define if you have the getpwent function. */ #undef HAVE_GETPWENT /* Define if you have the getpwnam function. */ #undef HAVE_GETPWNAM /* Define if you have the getpwuid function. */ #undef HAVE_GETPWUID /* Define if you have the isascii function. */ #undef HAVE_ISASCII /* Define if you have the iswctype function. */ #undef HAVE_ISWCTYPE /* Define if you have the iswlower function. */ #undef HAVE_ISWLOWER /* Define if you have the iswupper function. */ #undef HAVE_ISWUPPER /* Define if you have the isxdigit function. */ #undef HAVE_ISXDIGIT /* Define if you have the kill function. */ #undef HAVE_KILL /* Define if you have the lstat function. */ #undef HAVE_LSTAT /* Define if you have the mbrlen function. */ #undef HAVE_MBRLEN /* Define if you have the mbrtowc function. */ #undef HAVE_MBRTOWC /* Define if you have the mbsrtowcs function. */ #undef HAVE_MBSRTOWCS /* Define if you have the memmove function. */ #undef HAVE_MEMMOVE /* Define if you have the putenv function. */ #undef HAVE_PUTENV /* Define if you have the select function. */ #undef HAVE_SELECT /* Define if you have the setenv function. */ #undef HAVE_SETENV /* Define if you have the setlocale function. */ #undef HAVE_SETLOCALE /* Define if you have the strcasecmp function. */ #undef HAVE_STRCASECMP /* Define if you have the strcoll function. */ #undef HAVE_STRCOLL #undef STRCOLL_BROKEN /* Define if you have the strpbrk function. */ #undef HAVE_STRPBRK /* Define if you have the tcgetattr function. */ #undef HAVE_TCGETATTR /* Define if you have the towlower function. */ #undef HAVE_TOWLOWER /* Define if you have the towupper function. */ #undef HAVE_TOWUPPER /* Define if you have the vsnprintf function. */ #undef HAVE_VSNPRINTF /* Define if you have the wcrtomb function. */ #undef HAVE_WCRTOMB /* Define if you have the wcscoll function. */ #undef HAVE_WCSCOLL /* Define if you have the wctype function. */ #undef HAVE_WCTYPE /* Define if you have the wcwidth function. */ #undef HAVE_WCWIDTH #undef STDC_HEADERS /* Define if you have the <dirent.h> header file. */ #undef HAVE_DIRENT_H /* Define if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H /* Define if you have the <langinfo.h> header file. */ #undef HAVE_LANGINFO_H /* Define if you have the <limits.h> header file. */ #undef HAVE_LIMITS_H /* Define if you have the <locale.h> header file. */ #undef HAVE_LOCALE_H /* Define if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H /* Define if you have the <ndir.h> header file. */ #undef HAVE_NDIR_H /* Define if you have the <pwd.h> header file. */ #undef HAVE_PWD_H /* Define if you have the <stdarg.h> header file. */ #undef HAVE_STDARG_H /* Define if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H /* Define if you have the <string.h> header file. */ #undef HAVE_STRING_H /* Define if you have the <strings.h> header file. */ #undef HAVE_STRINGS_H /* Define if you have the <sys/dir.h> header file. */ #undef HAVE_SYS_DIR_H /* Define if you have the <sys/file.h> header file. */ #undef HAVE_SYS_FILE_H /* Define if you have the <sys/ndir.h> header file. */ #undef HAVE_SYS_NDIR_H /* Define if you have the <sys/pte.h> header file. */ #undef HAVE_SYS_PTE_H /* Define if you have the <sys/ptem.h> header file. */ #undef HAVE_SYS_PTEM_H /* Define if you have the <sys/select.h> header file. */ #undef HAVE_SYS_SELECT_H /* Define if you have the <sys/stream.h> header file. */ #undef HAVE_SYS_STREAM_H /* Define if you have the <termcap.h> header file. */ #undef HAVE_TERMCAP_H /* Define if you have the <termio.h> header file. */ #undef HAVE_TERMIO_H /* Define if you have the <termios.h> header file. */ #undef HAVE_TERMIOS_H /* Define if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H /* Define if you have the <varargs.h> header file. */ #undef HAVE_VARARGS_H /* Define if you have the <wchar.h> header file. */ #undef HAVE_WCHAR_H /* Define if you have the <wctype.h> header file. */ #undef HAVE_WCTYPE_H #undef HAVE_MBSTATE_T /* Define if you have wchar_t in <wctype.h>. */ #undef HAVE_WCHAR_T /* Define if you have wctype_t in <wctype.h>. */ #undef HAVE_WCTYPE_T /* Define if you have wint_t in <wctype.h>. */ #undef HAVE_WINT_T /* Define if you have <langinfo.h> and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Definitions pulled in from aclocal.m4. */ #undef VOID_SIGHANDLER #undef GWINSZ_IN_SYS_IOCTL #undef STRUCT_WINSIZE_IN_SYS_IOCTL #undef STRUCT_WINSIZE_IN_TERMIOS #undef TIOCSTAT_IN_SYS_IOCTL #undef FIONREAD_IN_SYS_IOCTL #undef SPEED_T_IN_SYS_TYPES #undef HAVE_GETPW_DECLS #undef STRUCT_DIRENT_HAS_D_INO #undef STRUCT_DIRENT_HAS_D_FILENO #undef HAVE_BSD_SIGNALS #undef HAVE_POSIX_SIGNALS #undef HAVE_USG_SIGHOLD #undef MUST_REINSTALL_SIGHANDLERS #undef HAVE_POSIX_SIGSETJMP #undef CTYPE_NON_ASCII /* modify settings or make new ones based on what autoconf tells us. */ /* Ultrix botches type-ahead when switching from canonical to non-canonical mode, at least through version 4.3 */ #if !defined (HAVE_TERMIOS_H) || !defined (HAVE_TCGETATTR) || defined (ultrix) # define TERMIOS_MISSING #endif #if defined (__STDC__) && defined (HAVE_STDARG_H) # define PREFER_STDARG # define USE_VARARGS #else # if defined (HAVE_VARARGS_H) # define PREFER_VARARGS # define USE_VARARGS # endif #endif ����������������������������������������gdb-doc-7.6.2/readline/funmap.c���������������������������������������������������������������������0000644�0001750�0001750�00000021700�12250770610�015300� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* funmap.c -- attach names to functions. */ /* Copyright (C) 1987-2010 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include <config.h> #endif #if !defined (BUFSIZ) #include <stdio.h> #endif /* BUFSIZ */ #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #include "rlconf.h" #include "readline.h" #include "xmalloc.h" #ifdef __STDC__ typedef int QSFUNC (const void *, const void *); #else typedef int QSFUNC (); #endif extern int _rl_qsort_string_compare PARAMS((char **, char **)); FUNMAP **funmap; static int funmap_size; static int funmap_entry; /* After initializing the function map, this is the index of the first program specific function. */ int funmap_program_specific_entry_start; static const FUNMAP default_funmap[] = { { "abort", rl_abort }, { "accept-line", rl_newline }, { "arrow-key-prefix", rl_arrow_keys }, { "backward-byte", rl_backward_byte }, { "backward-char", rl_backward_char }, { "backward-delete-char", rl_rubout }, { "backward-kill-line", rl_backward_kill_line }, { "backward-kill-word", rl_backward_kill_word }, { "backward-word", rl_backward_word }, { "beginning-of-history", rl_beginning_of_history }, { "beginning-of-line", rl_beg_of_line }, { "call-last-kbd-macro", rl_call_last_kbd_macro }, { "capitalize-word", rl_capitalize_word }, { "character-search", rl_char_search }, { "character-search-backward", rl_backward_char_search }, { "clear-screen", rl_clear_screen }, { "complete", rl_complete }, { "copy-backward-word", rl_copy_backward_word }, { "copy-forward-word", rl_copy_forward_word }, { "copy-region-as-kill", rl_copy_region_to_kill }, { "delete-char", rl_delete }, { "delete-char-or-list", rl_delete_or_show_completions }, { "delete-horizontal-space", rl_delete_horizontal_space }, { "digit-argument", rl_digit_argument }, { "do-lowercase-version", rl_do_lowercase_version }, { "downcase-word", rl_downcase_word }, { "dump-functions", rl_dump_functions }, { "dump-macros", rl_dump_macros }, { "dump-variables", rl_dump_variables }, { "emacs-editing-mode", rl_emacs_editing_mode }, { "end-kbd-macro", rl_end_kbd_macro }, { "end-of-history", rl_end_of_history }, { "end-of-line", rl_end_of_line }, { "exchange-point-and-mark", rl_exchange_point_and_mark }, { "forward-backward-delete-char", rl_rubout_or_delete }, { "forward-byte", rl_forward_byte }, { "forward-char", rl_forward_char }, { "forward-search-history", rl_forward_search_history }, { "forward-word", rl_forward_word }, { "history-search-backward", rl_history_search_backward }, { "history-search-forward", rl_history_search_forward }, { "insert-comment", rl_insert_comment }, { "insert-completions", rl_insert_completions }, { "kill-whole-line", rl_kill_full_line }, { "kill-line", rl_kill_line }, { "kill-region", rl_kill_region }, { "kill-word", rl_kill_word }, { "menu-complete", rl_menu_complete }, { "menu-complete-backward", rl_backward_menu_complete }, { "next-history", rl_get_next_history }, { "non-incremental-forward-search-history", rl_noninc_forward_search }, { "non-incremental-reverse-search-history", rl_noninc_reverse_search }, { "non-incremental-forward-search-history-again", rl_noninc_forward_search_again }, { "non-incremental-reverse-search-history-again", rl_noninc_reverse_search_again }, { "old-menu-complete", rl_old_menu_complete }, { "overwrite-mode", rl_overwrite_mode }, #ifdef __CYGWIN__ { "paste-from-clipboard", rl_paste_from_clipboard }, #endif { "possible-completions", rl_possible_completions }, { "previous-history", rl_get_previous_history }, { "quoted-insert", rl_quoted_insert }, { "re-read-init-file", rl_re_read_init_file }, { "redraw-current-line", rl_refresh_line}, { "reverse-search-history", rl_reverse_search_history }, { "revert-line", rl_revert_line }, { "self-insert", rl_insert }, { "set-mark", rl_set_mark }, { "skip-csi-sequence", rl_skip_csi_sequence }, { "start-kbd-macro", rl_start_kbd_macro }, { "tab-insert", rl_tab_insert }, { "tilde-expand", rl_tilde_expand }, { "transpose-chars", rl_transpose_chars }, { "transpose-words", rl_transpose_words }, { "tty-status", rl_tty_status }, { "undo", rl_undo_command }, { "universal-argument", rl_universal_argument }, { "unix-filename-rubout", rl_unix_filename_rubout }, { "unix-line-discard", rl_unix_line_discard }, { "unix-word-rubout", rl_unix_word_rubout }, { "upcase-word", rl_upcase_word }, { "yank", rl_yank }, { "yank-last-arg", rl_yank_last_arg }, { "yank-nth-arg", rl_yank_nth_arg }, { "yank-pop", rl_yank_pop }, #if defined (VI_MODE) { "vi-append-eol", rl_vi_append_eol }, { "vi-append-mode", rl_vi_append_mode }, { "vi-arg-digit", rl_vi_arg_digit }, { "vi-back-to-indent", rl_vi_back_to_indent }, { "vi-backward-bigword", rl_vi_bWord }, { "vi-backward-word", rl_vi_bword }, { "vi-bWord", rl_vi_bWord }, { "vi-bword", rl_vi_bword }, { "vi-change-case", rl_vi_change_case }, { "vi-change-char", rl_vi_change_char }, { "vi-change-to", rl_vi_change_to }, { "vi-char-search", rl_vi_char_search }, { "vi-column", rl_vi_column }, { "vi-complete", rl_vi_complete }, { "vi-delete", rl_vi_delete }, { "vi-delete-to", rl_vi_delete_to }, { "vi-eWord", rl_vi_eWord }, { "vi-editing-mode", rl_vi_editing_mode }, { "vi-end-bigword", rl_vi_eWord }, { "vi-end-word", rl_vi_end_word }, { "vi-eof-maybe", rl_vi_eof_maybe }, { "vi-eword", rl_vi_eword }, { "vi-fWord", rl_vi_fWord }, { "vi-fetch-history", rl_vi_fetch_history }, { "vi-first-print", rl_vi_first_print }, { "vi-forward-bigword", rl_vi_fWord }, { "vi-forward-word", rl_vi_fword }, { "vi-fword", rl_vi_fword }, { "vi-goto-mark", rl_vi_goto_mark }, { "vi-insert-beg", rl_vi_insert_beg }, { "vi-insertion-mode", rl_vi_insertion_mode }, { "vi-match", rl_vi_match }, { "vi-movement-mode", rl_vi_movement_mode }, { "vi-next-word", rl_vi_next_word }, { "vi-overstrike", rl_vi_overstrike }, { "vi-overstrike-delete", rl_vi_overstrike_delete }, { "vi-prev-word", rl_vi_prev_word }, { "vi-put", rl_vi_put }, { "vi-redo", rl_vi_redo }, { "vi-replace", rl_vi_replace }, { "vi-rubout", rl_vi_rubout }, { "vi-search", rl_vi_search }, { "vi-search-again", rl_vi_search_again }, { "vi-set-mark", rl_vi_set_mark }, { "vi-subst", rl_vi_subst }, { "vi-tilde-expand", rl_vi_tilde_expand }, { "vi-yank-arg", rl_vi_yank_arg }, { "vi-yank-to", rl_vi_yank_to }, #endif /* VI_MODE */ {(char *)NULL, (rl_command_func_t *)NULL } }; int rl_add_funmap_entry (name, function) const char *name; rl_command_func_t *function; { if (funmap_entry + 2 >= funmap_size) { funmap_size += 64; funmap = (FUNMAP **)xrealloc (funmap, funmap_size * sizeof (FUNMAP *)); } funmap[funmap_entry] = (FUNMAP *)xmalloc (sizeof (FUNMAP)); funmap[funmap_entry]->name = name; funmap[funmap_entry]->function = function; funmap[++funmap_entry] = (FUNMAP *)NULL; return funmap_entry; } static int funmap_initialized; /* Make the funmap contain all of the default entries. */ void rl_initialize_funmap () { register int i; if (funmap_initialized) return; for (i = 0; default_funmap[i].name; i++) rl_add_funmap_entry (default_funmap[i].name, default_funmap[i].function); funmap_initialized = 1; funmap_program_specific_entry_start = i; } /* Produce a NULL terminated array of known function names. The array is sorted. The array itself is allocated, but not the strings inside. You should free () the array when you done, but not the pointrs. */ const char ** rl_funmap_names () { const char **result; int result_size, result_index; /* Make sure that the function map has been initialized. */ rl_initialize_funmap (); for (result_index = result_size = 0, result = (const char **)NULL; funmap[result_index]; result_index++) { if (result_index + 2 > result_size) { result_size += 20; result = (const char **)xrealloc (result, result_size * sizeof (char *)); } result[result_index] = funmap[result_index]->name; result[result_index + 1] = (char *)NULL; } qsort (result, result_index, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare); return (result); } ����������������������������������������������������������������gdb-doc-7.6.2/readline/tilde.h����������������������������������������������������������������������0000644�0001750�0001750�00000005746�12250770610�015134� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* tilde.h: Externally available variables and function in libtilde.a. */ /* Copyright (C) 1992-2009 Free Software Foundation, Inc. This file contains the Readline Library (Readline), a set of routines for providing Emacs style line input to programs that ask for it. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #if !defined (_TILDE_H_) # define _TILDE_H_ #ifdef __cplusplus extern "C" { #endif /* A function can be defined using prototypes and compile on both ANSI C and traditional C compilers with something like this: extern char *func PARAMS((char *, char *, int)); */ #if !defined (PARAMS) # if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) # define PARAMS(protos) protos # else # define PARAMS(protos) () # endif #endif typedef char *tilde_hook_func_t PARAMS((char *)); /* If non-null, this contains the address of a function that the application wants called before trying the standard tilde expansions. The function is called with the text sans tilde, and returns a malloc()'ed string which is the expansion, or a NULL pointer if the expansion fails. */ extern tilde_hook_func_t *tilde_expansion_preexpansion_hook; /* If non-null, this contains the address of a function to call if the standard meaning for expanding a tilde fails. The function is called with the text (sans tilde, as in "foo"), and returns a malloc()'ed string which is the expansion, or a NULL pointer if there is no expansion. */ extern tilde_hook_func_t *tilde_expansion_failure_hook; /* When non-null, this is a NULL terminated array of strings which are duplicates for a tilde prefix. Bash uses this to expand `=~' and `:~'. */ extern char **tilde_additional_prefixes; /* When non-null, this is a NULL terminated array of strings which match the end of a username, instead of just "/". Bash sets this to `:' and `=~'. */ extern char **tilde_additional_suffixes; /* Return a new string which is the result of tilde expanding STRING. */ extern char *tilde_expand PARAMS((const char *)); /* Do the work of tilde expansion on FILENAME. FILENAME starts with a tilde. If there is no expansion, call tilde_expansion_failure_hook. */ extern char *tilde_expand_word PARAMS((const char *)); /* Find the portion of the string beginning with ~ that should be expanded. */ extern char *tilde_find_word PARAMS((const char *, int, int *)); #ifdef __cplusplus } #endif #endif /* _TILDE_H_ */ ��������������������������gdb-doc-7.6.2/readline/MANIFEST���������������������������������������������������������������������0000644�0001750�0001750�00000005152�12250770610�015002� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Master distribution manifest for the standalone readline distribution # doc d examples d examples/autoconf d examples/rlfe d support d shlib d COPYING f README f MANIFEST f INSTALL f CHANGELOG f CHANGES f NEWS f USAGE f aclocal.m4 f config.h.in f configure f configure.in f Makefile.in f ansi_stdlib.h f chardefs.h f history.h f histlib.h f keymaps.h f posixdir.h f posixjmp.h f posixselect.h f posixstat.h f readline.h f rlconf.h f rldefs.h f rlmbutil.h f rlprivate.h f rlshell.h f rlstdc.h f rltty.h f rltypedefs.h f rlwinsize.h f tcap.h f tilde.h f xmalloc.h f bind.c f callback.c f compat.c f complete.c f display.c f emacs_keymap.c f funmap.c f input.c f isearch.c f keymaps.c f kill.c f macro.c f mbutil.c f misc.c f nls.c f parens.c f readline.c f rltty.c f savestring.c f search.c f shell.c f signals.c f terminal.c f text.c f tilde.c f undo.c f util.c f vi_keymap.c f vi_mode.c f xfree.c f xmalloc.c f history.c f histexpand.c f histfile.c f histsearch.c f patchlevel f shlib/Makefile.in f support/config.guess f support/config.rpath f support/config.sub f support/install.sh f support/mkdirs f support/mkdist f support/mkinstalldirs f support/shobj-conf f support/shlib-install f support/wcwidth.c f doc/Makefile.in f doc/texinfo.tex f doc/version.texi f doc/fdl.texi f doc/rlman.texi f doc/rltech.texi f doc/rluser.texi f doc/rluserman.texi f doc/history.texi f doc/hstech.texi f doc/hsuser.texi f doc/readline.3 f doc/history.3 f doc/texi2dvi f doc/texi2html f examples/Makefile.in f examples/excallback.c f examples/fileman.c f examples/manexamp.c f examples/readlinebuf.h f examples/rl-fgets.c f examples/rlcat.c f examples/rlevent.c f examples/rltest.c f examples/rl.c f examples/rlptytest.c f examples/rlversion.c f examples/histexamp.c f examples/Inputrc f examples/autoconf/BASH_CHECK_LIB_TERMCAP f examples/autoconf/RL_LIB_READLINE_VERSION f examples/autoconf/wi_LIB_READLINE f examples/rlfe/ChangeLog f examples/rlfe/Makefile.in f examples/rlfe/README f examples/rlfe/config.h.in f examples/rlfe/configure f examples/rlfe/configure.in f examples/rlfe/extern.h f examples/rlfe/os.h f examples/rlfe/pty.c f examples/rlfe/rlfe.c f examples/rlfe/screen.h f examples/rlwrap-0.30.tar.gz f # formatted documentation, from MANIFEST.doc doc/readline.ps f doc/history.ps f doc/rluserman.ps f doc/readline.dvi f doc/history.dvi f doc/rluserman.dvi f doc/readline.info f doc/history.info f doc/rluserman.info f doc/readline.html f doc/history.html f doc/rluserman.html f doc/readline.0 f doc/history.0 f doc/readline_3.ps f doc/history_3.ps f doc/history.pdf f doc/readline.pdf f doc/rluserman.pdf f ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/search.c���������������������������������������������������������������������0000644�0001750�0001750�00000034304�12250770610�015263� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* search.c - code for non-incremental searching in emacs and vi modes. */ /* Copyright (C) 1992-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include <config.h> #endif #include <sys/types.h> #include <stdio.h> #if defined (HAVE_UNISTD_H) # include <unistd.h> #endif #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif #include "rldefs.h" #include "rlmbutil.h" #include "readline.h" #include "history.h" #include "rlprivate.h" #include "xmalloc.h" #ifdef abs # undef abs #endif #define abs(x) (((x) >= 0) ? (x) : -(x)) _rl_search_cxt *_rl_nscxt = 0; extern HIST_ENTRY *_rl_saved_line_for_history; /* Functions imported from the rest of the library. */ extern int _rl_free_history_entry PARAMS((HIST_ENTRY *)); static char *noninc_search_string = (char *) NULL; static int noninc_history_pos; static char *prev_line_found = (char *) NULL; static int rl_history_search_len; static int rl_history_search_pos; static char *history_search_string; static int history_string_size; static void make_history_line_current PARAMS((HIST_ENTRY *)); static int noninc_search_from_pos PARAMS((char *, int, int)); static int noninc_dosearch PARAMS((char *, int)); static int noninc_search PARAMS((int, int)); static int rl_history_search_internal PARAMS((int, int)); static void rl_history_search_reinit PARAMS((void)); static _rl_search_cxt *_rl_nsearch_init PARAMS((int, int)); static int _rl_nsearch_cleanup PARAMS((_rl_search_cxt *, int)); static void _rl_nsearch_abort PARAMS((_rl_search_cxt *)); static int _rl_nsearch_dispatch PARAMS((_rl_search_cxt *, int)); /* Make the data from the history entry ENTRY be the contents of the current line. This doesn't do anything with rl_point; the caller must set it. */ static void make_history_line_current (entry) HIST_ENTRY *entry; { _rl_replace_text (entry->line, 0, rl_end); _rl_fix_point (1); #if defined (VI_MODE) if (rl_editing_mode == vi_mode) /* POSIX.2 says that the `U' command doesn't affect the copy of any command lines to the edit line. We're going to implement that by making the undo list start after the matching line is copied to the current editing buffer. */ rl_free_undo_list (); #endif if (_rl_saved_line_for_history) _rl_free_history_entry (_rl_saved_line_for_history); _rl_saved_line_for_history = (HIST_ENTRY *)NULL; } /* Search the history list for STRING starting at absolute history position POS. If STRING begins with `^', the search must match STRING at the beginning of a history line, otherwise a full substring match is performed for STRING. DIR < 0 means to search backwards through the history list, DIR >= 0 means to search forward. */ static int noninc_search_from_pos (string, pos, dir) char *string; int pos, dir; { int ret, old; if (pos < 0) return -1; old = where_history (); if (history_set_pos (pos) == 0) return -1; RL_SETSTATE(RL_STATE_SEARCH); if (*string == '^') ret = history_search_prefix (string + 1, dir); else ret = history_search (string, dir); RL_UNSETSTATE(RL_STATE_SEARCH); if (ret != -1) ret = where_history (); history_set_pos (old); return (ret); } /* Search for a line in the history containing STRING. If DIR is < 0, the search is backwards through previous entries, else through subsequent entries. Returns 1 if the search was successful, 0 otherwise. */ static int noninc_dosearch (string, dir) char *string; int dir; { int oldpos, pos; HIST_ENTRY *entry; if (string == 0 || *string == '\0' || noninc_history_pos < 0) { rl_ding (); return 0; } pos = noninc_search_from_pos (string, noninc_history_pos + dir, dir); if (pos == -1) { /* Search failed, current history position unchanged. */ rl_maybe_unsave_line (); rl_clear_message (); rl_point = 0; rl_ding (); return 0; } noninc_history_pos = pos; oldpos = where_history (); history_set_pos (noninc_history_pos); entry = current_history (); #if defined (VI_MODE) if (rl_editing_mode != vi_mode) #endif history_set_pos (oldpos); make_history_line_current (entry); rl_point = 0; rl_mark = rl_end; rl_clear_message (); return 1; } static _rl_search_cxt * _rl_nsearch_init (dir, pchar) int dir, pchar; { _rl_search_cxt *cxt; char *p; cxt = _rl_scxt_alloc (RL_SEARCH_NSEARCH, 0); if (dir < 0) cxt->sflags |= SF_REVERSE; /* not strictly needed */ cxt->direction = dir; cxt->history_pos = cxt->save_line; rl_maybe_save_line (); /* Clear the undo list, since reading the search string should create its own undo list, and the whole list will end up being freed when we finish reading the search string. */ rl_undo_list = 0; /* Use the line buffer to read the search string. */ rl_line_buffer[0] = 0; rl_end = rl_point = 0; p = _rl_make_prompt_for_search (pchar ? pchar : ':'); rl_message ("%s", p, 0); xfree (p); RL_SETSTATE(RL_STATE_NSEARCH); _rl_nscxt = cxt; return cxt; } static int _rl_nsearch_cleanup (cxt, r) _rl_search_cxt *cxt; int r; { _rl_scxt_dispose (cxt, 0); _rl_nscxt = 0; RL_UNSETSTATE(RL_STATE_NSEARCH); return (r != 1); } static void _rl_nsearch_abort (cxt) _rl_search_cxt *cxt; { rl_maybe_unsave_line (); rl_clear_message (); rl_point = cxt->save_point; rl_mark = cxt->save_mark; rl_restore_prompt (); RL_UNSETSTATE (RL_STATE_NSEARCH); } /* Process just-read character C according to search context CXT. Return -1 if the caller should abort the search, 0 if we should break out of the loop, and 1 if we should continue to read characters. */ static int _rl_nsearch_dispatch (cxt, c) _rl_search_cxt *cxt; int c; { switch (c) { case CTRL('W'): rl_unix_word_rubout (1, c); break; case CTRL('U'): rl_unix_line_discard (1, c); break; case RETURN: case NEWLINE: return 0; case CTRL('H'): case RUBOUT: if (rl_point == 0) { _rl_nsearch_abort (cxt); return -1; } _rl_rubout_char (1, c); break; case CTRL('C'): case CTRL('G'): rl_ding (); _rl_nsearch_abort (cxt); return -1; default: #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) rl_insert_text (cxt->mb); else #endif _rl_insert_char (1, c); break; } (*rl_redisplay_function) (); return 1; } /* Perform one search according to CXT, using NONINC_SEARCH_STRING. Return -1 if the search should be aborted, any other value means to clean up using _rl_nsearch_cleanup (). Returns 1 if the search was successful, 0 otherwise. */ static int _rl_nsearch_dosearch (cxt) _rl_search_cxt *cxt; { rl_mark = cxt->save_mark; /* If rl_point == 0, we want to re-use the previous search string and start from the saved history position. If there's no previous search string, punt. */ if (rl_point == 0) { if (noninc_search_string == 0) { rl_ding (); rl_restore_prompt (); RL_UNSETSTATE (RL_STATE_NSEARCH); return -1; } } else { /* We want to start the search from the current history position. */ noninc_history_pos = cxt->save_line; FREE (noninc_search_string); noninc_search_string = savestring (rl_line_buffer); /* If we don't want the subsequent undo list generated by the search matching a history line to include the contents of the search string, we need to clear rl_line_buffer here. For now, we just clear the undo list generated by reading the search string. (If the search fails, the old undo list will be restored by rl_maybe_unsave_line.) */ rl_free_undo_list (); } rl_restore_prompt (); return (noninc_dosearch (noninc_search_string, cxt->direction)); } /* Search non-interactively through the history list. DIR < 0 means to search backwards through the history of previous commands; otherwise the search is for commands subsequent to the current position in the history list. PCHAR is the character to use for prompting when reading the search string; if not specified (0), it defaults to `:'. */ static int noninc_search (dir, pchar) int dir; int pchar; { _rl_search_cxt *cxt; int c, r; cxt = _rl_nsearch_init (dir, pchar); if (RL_ISSTATE (RL_STATE_CALLBACK)) return (0); /* Read the search string. */ r = 0; while (1) { c = _rl_search_getchar (cxt); if (c == 0) break; r = _rl_nsearch_dispatch (cxt, c); if (r < 0) return 1; else if (r == 0) break; } r = _rl_nsearch_dosearch (cxt); return ((r >= 0) ? _rl_nsearch_cleanup (cxt, r) : (r != 1)); } /* Search forward through the history list for a string. If the vi-mode code calls this, KEY will be `?'. */ int rl_noninc_forward_search (count, key) int count, key; { return noninc_search (1, (key == '?') ? '?' : 0); } /* Reverse search the history list for a string. If the vi-mode code calls this, KEY will be `/'. */ int rl_noninc_reverse_search (count, key) int count, key; { return noninc_search (-1, (key == '/') ? '/' : 0); } /* Search forward through the history list for the last string searched for. If there is no saved search string, abort. */ int rl_noninc_forward_search_again (count, key) int count, key; { int r; if (!noninc_search_string) { rl_ding (); return (-1); } r = noninc_dosearch (noninc_search_string, 1); return (r != 1); } /* Reverse search in the history list for the last string searched for. If there is no saved search string, abort. */ int rl_noninc_reverse_search_again (count, key) int count, key; { int r; if (!noninc_search_string) { rl_ding (); return (-1); } r = noninc_dosearch (noninc_search_string, -1); return (r != 1); } #if defined (READLINE_CALLBACKS) int _rl_nsearch_callback (cxt) _rl_search_cxt *cxt; { int c, r; c = _rl_search_getchar (cxt); r = _rl_nsearch_dispatch (cxt, c); if (r != 0) return 1; r = _rl_nsearch_dosearch (cxt); return ((r >= 0) ? _rl_nsearch_cleanup (cxt, r) : (r != 1)); } #endif static int rl_history_search_internal (count, dir) int count, dir; { HIST_ENTRY *temp; int ret, oldpos; rl_maybe_save_line (); temp = (HIST_ENTRY *)NULL; /* Search COUNT times through the history for a line whose prefix matches history_search_string. When this loop finishes, TEMP, if non-null, is the history line to copy into the line buffer. */ while (count) { ret = noninc_search_from_pos (history_search_string, rl_history_search_pos + dir, dir); if (ret == -1) break; /* Get the history entry we found. */ rl_history_search_pos = ret; oldpos = where_history (); history_set_pos (rl_history_search_pos); temp = current_history (); history_set_pos (oldpos); /* Don't find multiple instances of the same line. */ if (prev_line_found && STREQ (prev_line_found, temp->line)) continue; prev_line_found = temp->line; count--; } /* If we didn't find anything at all, return. */ if (temp == 0) { rl_maybe_unsave_line (); rl_ding (); /* If you don't want the saved history line (last match) to show up in the line buffer after the search fails, change the #if 0 to #if 1 */ #if 0 if (rl_point > rl_history_search_len) { rl_point = rl_end = rl_history_search_len; rl_line_buffer[rl_end] = '\0'; rl_mark = 0; } #else rl_point = rl_history_search_len; /* rl_maybe_unsave_line changes it */ rl_mark = rl_end; #endif return 1; } /* Copy the line we found into the current line buffer. */ make_history_line_current (temp); rl_point = rl_history_search_len; rl_mark = rl_end; return 0; } static void rl_history_search_reinit () { rl_history_search_pos = where_history (); rl_history_search_len = rl_point; prev_line_found = (char *)NULL; if (rl_point) { if (rl_history_search_len >= history_string_size - 2) { history_string_size = rl_history_search_len + 2; history_search_string = (char *)xrealloc (history_search_string, history_string_size); } history_search_string[0] = '^'; strncpy (history_search_string + 1, rl_line_buffer, rl_point); history_search_string[rl_point + 1] = '\0'; } _rl_free_saved_history_line (); } /* Search forward in the history for the string of characters from the start of the line to rl_point. This is a non-incremental search. */ int rl_history_search_forward (count, ignore) int count, ignore; { if (count == 0) return (0); if (rl_last_func != rl_history_search_forward && rl_last_func != rl_history_search_backward) rl_history_search_reinit (); if (rl_history_search_len == 0) return (rl_get_next_history (count, ignore)); return (rl_history_search_internal (abs (count), (count > 0) ? 1 : -1)); } /* Search backward through the history for the string of characters from the start of the line to rl_point. This is a non-incremental search. */ int rl_history_search_backward (count, ignore) int count, ignore; { if (count == 0) return (0); if (rl_last_func != rl_history_search_forward && rl_last_func != rl_history_search_backward) rl_history_search_reinit (); if (rl_history_search_len == 0) return (rl_get_previous_history (count, ignore)); return (rl_history_search_internal (abs (count), (count > 0) ? -1 : 1)); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/terminal.c�������������������������������������������������������������������0000644�0001750�0001750�00000046722�12250770610�015640� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* terminal.c -- controlling the terminal with termcap. */ /* Copyright (C) 1996-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include <config.h> #endif #include <sys/types.h> #include "posixstat.h" #include <fcntl.h> #if defined (HAVE_SYS_FILE_H) # include <sys/file.h> #endif /* HAVE_SYS_FILE_H */ #if defined (HAVE_UNISTD_H) # include <unistd.h> #endif /* HAVE_UNISTD_H */ #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #if defined (HAVE_LOCALE_H) # include <locale.h> #endif #include <stdio.h> /* System-specific feature definitions and include files. */ #include "rldefs.h" #if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ) # include <sys/ioctl.h> #endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */ #ifdef __MSDOS__ # include <pc.h> #endif #include "rltty.h" #include "tcap.h" /* Some standard library routines. */ #include "readline.h" #include "history.h" #include "rlprivate.h" #include "rlshell.h" #include "xmalloc.h" #if defined (__MINGW32__) # include <windows.h> # include <wincon.h> static void _win_get_screensize PARAMS((int *, int *)); #endif #if defined (__EMX__) static void _emx_get_screensize PARAMS((int *, int *)); #endif #define CUSTOM_REDISPLAY_FUNC() (rl_redisplay_function != rl_redisplay) #define CUSTOM_INPUT_FUNC() (rl_getc_function != rl_getc) /* If the calling application sets this to a non-zero value, readline will use the $LINES and $COLUMNS environment variables to set its idea of the window size before interrogating the kernel. */ int rl_prefer_env_winsize = 0; /* **************************************************************** */ /* */ /* Terminal and Termcap */ /* */ /* **************************************************************** */ #ifndef __MSDOS__ static char *term_buffer = (char *)NULL; static char *term_string_buffer = (char *)NULL; #endif /* !__MSDOS__ */ static int tcap_initialized; #if !defined (__linux__) && !defined (NCURSES_VERSION) # if defined (__EMX__) || defined (NEED_EXTERN_PC) extern # endif /* __EMX__ || NEED_EXTERN_PC */ char PC, *BC, *UP; #endif /* !__linux__ && !NCURSES_VERSION */ /* Some strings to control terminal actions. These are output by tputs (). */ char *_rl_term_clreol; char *_rl_term_clrpag; char *_rl_term_cr; char *_rl_term_backspace; char *_rl_term_goto; char *_rl_term_pc; /* Non-zero if we determine that the terminal can do character insertion. */ int _rl_terminal_can_insert = 0; /* How to insert characters. */ char *_rl_term_im; char *_rl_term_ei; char *_rl_term_ic; char *_rl_term_ip; char *_rl_term_IC; /* How to delete characters. */ char *_rl_term_dc; char *_rl_term_DC; char *_rl_term_forward_char; /* How to go up a line. */ char *_rl_term_up; /* A visible bell; char if the terminal can be made to flash the screen. */ static char *_rl_visible_bell; /* Non-zero means the terminal can auto-wrap lines. */ int _rl_term_autowrap = -1; /* Non-zero means that this terminal has a meta key. */ static int term_has_meta; /* The sequences to write to turn on and off the meta key, if this terminal has one. */ static char *_rl_term_mm; static char *_rl_term_mo; /* The key sequences output by the arrow keys, if this terminal has any. */ static char *_rl_term_ku; static char *_rl_term_kd; static char *_rl_term_kr; static char *_rl_term_kl; /* How to initialize and reset the arrow keys, if this terminal has any. */ static char *_rl_term_ks; static char *_rl_term_ke; /* The key sequences sent by the Home and End keys, if any. */ static char *_rl_term_kh; static char *_rl_term_kH; static char *_rl_term_at7; /* @7 */ /* Delete key */ static char *_rl_term_kD; /* Insert key */ static char *_rl_term_kI; /* Cursor control */ static char *_rl_term_vs; /* very visible */ static char *_rl_term_ve; /* normal */ static void bind_termcap_arrow_keys PARAMS((Keymap)); /* Variables that hold the screen dimensions, used by the display code. */ int _rl_screenwidth, _rl_screenheight, _rl_screenchars; /* Non-zero means the user wants to enable the keypad. */ int _rl_enable_keypad; /* Non-zero means the user wants to enable a meta key. */ int _rl_enable_meta = 1; #if defined (__EMX__) static void _emx_get_screensize (swp, shp) int *swp, *shp; { int sz[2]; _scrsize (sz); if (swp) *swp = sz[0]; if (shp) *shp = sz[1]; } #endif #if defined (__MINGW32__) static void _win_get_screensize (swp, shp) int *swp, *shp; { HANDLE hConOut; CONSOLE_SCREEN_BUFFER_INFO scr; hConOut = GetStdHandle (STD_OUTPUT_HANDLE); if (hConOut != INVALID_HANDLE_VALUE) { if (GetConsoleScreenBufferInfo (hConOut, &scr)) { *swp = scr.dwSize.X; *shp = scr.srWindow.Bottom - scr.srWindow.Top + 1; } } } #endif /* Get readline's idea of the screen size. TTY is a file descriptor open to the terminal. If IGNORE_ENV is true, we do not pay attention to the values of $LINES and $COLUMNS. The tests for TERM_STRING_BUFFER being non-null serve to check whether or not we have initialized termcap. */ void _rl_get_screen_size (tty, ignore_env) int tty, ignore_env; { char *ss; #if defined (TIOCGWINSZ) struct winsize window_size; #endif /* TIOCGWINSZ */ int wr, wc; wr = wc = -1; #if defined (TIOCGWINSZ) if (ioctl (tty, TIOCGWINSZ, &window_size) == 0) { wc = (int) window_size.ws_col; wr = (int) window_size.ws_row; } #endif /* TIOCGWINSZ */ #if defined (__EMX__) _emx_get_screensize (&wc, &wr); #elif defined (__MINGW32__) _win_get_screensize (&wc, &wr); #endif if (ignore_env || rl_prefer_env_winsize == 0) { _rl_screenwidth = wc; _rl_screenheight = wr; } else _rl_screenwidth = _rl_screenheight = -1; /* Environment variable COLUMNS overrides setting of "co" if IGNORE_ENV is unset. If we prefer the environment, check it first before assigning the value returned by the kernel. */ if (_rl_screenwidth <= 0) { if (ignore_env == 0 && (ss = sh_get_env_value ("COLUMNS"))) _rl_screenwidth = atoi (ss); if (_rl_screenwidth <= 0) _rl_screenwidth = wc; #if defined (__DJGPP__) if (_rl_screenwidth <= 0) _rl_screenwidth = ScreenCols (); #else if (_rl_screenwidth <= 0 && term_string_buffer) _rl_screenwidth = tgetnum ("co"); #endif } /* Environment variable LINES overrides setting of "li" if IGNORE_ENV is unset. */ if (_rl_screenheight <= 0) { if (ignore_env == 0 && (ss = sh_get_env_value ("LINES"))) _rl_screenheight = atoi (ss); if (_rl_screenheight <= 0) _rl_screenheight = wr; #if defined (__DJGPP__) if (_rl_screenheight <= 0) _rl_screenheight = ScreenRows (); #else if (_rl_screenheight <= 0 && term_string_buffer) _rl_screenheight = tgetnum ("li"); #endif } /* If all else fails, default to 80x24 terminal. */ if (_rl_screenwidth <= 1) _rl_screenwidth = 80; if (_rl_screenheight <= 0) _rl_screenheight = 24; /* If we're being compiled as part of bash, set the environment variables $LINES and $COLUMNS to new values. Otherwise, just do a pair of putenv () or setenv () calls. */ sh_set_lines_and_columns (_rl_screenheight, _rl_screenwidth); if (_rl_term_autowrap == 0) _rl_screenwidth--; _rl_screenchars = _rl_screenwidth * _rl_screenheight; } void _rl_set_screen_size (rows, cols) int rows, cols; { if (_rl_term_autowrap == -1) _rl_init_terminal_io (rl_terminal_name); if (rows > 0) _rl_screenheight = rows; if (cols > 0) { _rl_screenwidth = cols; if (_rl_term_autowrap == 0) _rl_screenwidth--; } if (rows > 0 || cols > 0) _rl_screenchars = _rl_screenwidth * _rl_screenheight; } void rl_set_screen_size (rows, cols) int rows, cols; { _rl_set_screen_size (rows, cols); } void rl_get_screen_size (rows, cols) int *rows, *cols; { if (rows) *rows = _rl_screenheight; if (cols) *cols = _rl_screenwidth; } void rl_reset_screen_size () { _rl_get_screen_size (fileno (rl_instream), 0); } void rl_resize_terminal () { _rl_get_screen_size (fileno (rl_instream), 1); if (_rl_echoing_p) { if (CUSTOM_REDISPLAY_FUNC ()) rl_forced_update_display (); else if (RL_ISSTATE(RL_STATE_REDISPLAYING) == 0) _rl_redisplay_after_sigwinch (); } } struct _tc_string { const char * const tc_var; char **tc_value; }; /* This should be kept sorted, just in case we decide to change the search algorithm to something smarter. */ static const struct _tc_string tc_strings[] = { { "@7", &_rl_term_at7 }, { "DC", &_rl_term_DC }, { "IC", &_rl_term_IC }, { "ce", &_rl_term_clreol }, { "cl", &_rl_term_clrpag }, { "cr", &_rl_term_cr }, { "dc", &_rl_term_dc }, { "ei", &_rl_term_ei }, { "ic", &_rl_term_ic }, { "im", &_rl_term_im }, { "kD", &_rl_term_kD }, /* delete */ { "kH", &_rl_term_kH }, /* home down ?? */ { "kI", &_rl_term_kI }, /* insert */ { "kd", &_rl_term_kd }, { "ke", &_rl_term_ke }, /* end keypad mode */ { "kh", &_rl_term_kh }, /* home */ { "kl", &_rl_term_kl }, { "kr", &_rl_term_kr }, { "ks", &_rl_term_ks }, /* start keypad mode */ { "ku", &_rl_term_ku }, { "le", &_rl_term_backspace }, { "mm", &_rl_term_mm }, { "mo", &_rl_term_mo }, { "nd", &_rl_term_forward_char }, { "pc", &_rl_term_pc }, { "up", &_rl_term_up }, { "vb", &_rl_visible_bell }, { "vs", &_rl_term_vs }, { "ve", &_rl_term_ve }, }; #define NUM_TC_STRINGS (sizeof (tc_strings) / sizeof (struct _tc_string)) /* Read the desired terminal capability strings into BP. The capabilities are described in the TC_STRINGS table. */ static void get_term_capabilities (bp) char **bp; { #if !defined (__DJGPP__) /* XXX - doesn't DJGPP have a termcap library? */ register int i; for (i = 0; i < NUM_TC_STRINGS; i++) *(tc_strings[i].tc_value) = tgetstr ((char *)tc_strings[i].tc_var, bp); #endif tcap_initialized = 1; } int _rl_init_terminal_io (terminal_name) const char *terminal_name; { const char *term; char *buffer; int tty, tgetent_ret; term = terminal_name ? terminal_name : sh_get_env_value ("TERM"); _rl_term_clrpag = _rl_term_cr = _rl_term_clreol = (char *)NULL; tty = rl_instream ? fileno (rl_instream) : 0; if (term == 0) term = "dumb"; #ifdef __MSDOS__ _rl_term_im = _rl_term_ei = _rl_term_ic = _rl_term_IC = (char *)NULL; _rl_term_up = _rl_term_dc = _rl_term_DC = _rl_visible_bell = (char *)NULL; _rl_term_ku = _rl_term_kd = _rl_term_kl = _rl_term_kr = (char *)NULL; _rl_term_mm = _rl_term_mo = (char *)NULL; _rl_terminal_can_insert = term_has_meta = _rl_term_autowrap = 0; _rl_term_cr = "\r"; _rl_term_clreol = _rl_term_clrpag = _rl_term_backspace = (char *)NULL; _rl_term_goto = _rl_term_pc = _rl_term_ip = (char *)NULL; _rl_term_ks = _rl_term_ke =_rl_term_vs = _rl_term_ve = (char *)NULL; _rl_term_kh = _rl_term_kH = _rl_term_at7 = _rl_term_kI = (char *)NULL; #if defined(HACK_TERMCAP_MOTION) _rl_term_forward_char = (char *)NULL; #endif _rl_get_screen_size (tty, 0); #else /* !__MSDOS__ */ /* I've separated this out for later work on not calling tgetent at all if the calling application has supplied a custom redisplay function, (and possibly if the application has supplied a custom input function). */ if (CUSTOM_REDISPLAY_FUNC()) { tgetent_ret = -1; } else { if (term_string_buffer == 0) term_string_buffer = (char *)xmalloc(2032); if (term_buffer == 0) term_buffer = (char *)xmalloc(4080); buffer = term_string_buffer; tgetent_ret = tgetent (term_buffer, term); } if (tgetent_ret <= 0) { FREE (term_string_buffer); FREE (term_buffer); buffer = term_buffer = term_string_buffer = (char *)NULL; _rl_term_autowrap = 0; /* used by _rl_get_screen_size */ /* Allow calling application to set default height and width, using rl_set_screen_size */ if (_rl_screenwidth <= 0 || _rl_screenheight <= 0) { #if defined (__EMX__) _emx_get_screensize (&_rl_screenwidth, &_rl_screenheight); _rl_screenwidth--; #else /* !__EMX__ */ _rl_get_screen_size (tty, 0); #endif /* !__EMX__ */ } /* Defaults. */ if (_rl_screenwidth <= 0 || _rl_screenheight <= 0) { _rl_screenwidth = 79; _rl_screenheight = 24; } /* Everything below here is used by the redisplay code (tputs). */ _rl_screenchars = _rl_screenwidth * _rl_screenheight; _rl_term_cr = "\r"; _rl_term_im = _rl_term_ei = _rl_term_ic = _rl_term_IC = (char *)NULL; _rl_term_up = _rl_term_dc = _rl_term_DC = _rl_visible_bell = (char *)NULL; _rl_term_ku = _rl_term_kd = _rl_term_kl = _rl_term_kr = (char *)NULL; _rl_term_kh = _rl_term_kH = _rl_term_kI = _rl_term_kD = (char *)NULL; _rl_term_ks = _rl_term_ke = _rl_term_at7 = (char *)NULL; _rl_term_mm = _rl_term_mo = (char *)NULL; _rl_term_ve = _rl_term_vs = (char *)NULL; _rl_term_forward_char = (char *)NULL; _rl_terminal_can_insert = term_has_meta = 0; /* Reasonable defaults for tgoto(). Readline currently only uses tgoto if _rl_term_IC or _rl_term_DC is defined, but just in case we change that later... */ PC = '\0'; BC = _rl_term_backspace = "\b"; UP = _rl_term_up; return 0; } get_term_capabilities (&buffer); /* Set up the variables that the termcap library expects the application to provide. */ PC = _rl_term_pc ? *_rl_term_pc : 0; BC = _rl_term_backspace; UP = _rl_term_up; if (!_rl_term_cr) _rl_term_cr = "\r"; _rl_term_autowrap = tgetflag ("am") && tgetflag ("xn"); /* Allow calling application to set default height and width, using rl_set_screen_size */ if (_rl_screenwidth <= 0 || _rl_screenheight <= 0) _rl_get_screen_size (tty, 0); /* "An application program can assume that the terminal can do character insertion if *any one of* the capabilities `IC', `im', `ic' or `ip' is provided." But we can't do anything if only `ip' is provided, so... */ _rl_terminal_can_insert = (_rl_term_IC || _rl_term_im || _rl_term_ic); /* Check to see if this terminal has a meta key and clear the capability variables if there is none. */ term_has_meta = tgetflag ("km") != 0; if (term_has_meta == 0) _rl_term_mm = _rl_term_mo = (char *)NULL; #endif /* !__MSDOS__ */ /* Attempt to find and bind the arrow keys. Do not override already bound keys in an overzealous attempt, however. */ bind_termcap_arrow_keys (emacs_standard_keymap); #if defined (VI_MODE) bind_termcap_arrow_keys (vi_movement_keymap); bind_termcap_arrow_keys (vi_insertion_keymap); #endif /* VI_MODE */ return 0; } /* Bind the arrow key sequences from the termcap description in MAP. */ static void bind_termcap_arrow_keys (map) Keymap map; { Keymap xkeymap; xkeymap = _rl_keymap; _rl_keymap = map; rl_bind_keyseq_if_unbound (_rl_term_ku, rl_get_previous_history); rl_bind_keyseq_if_unbound (_rl_term_kd, rl_get_next_history); rl_bind_keyseq_if_unbound (_rl_term_kr, rl_forward_char); rl_bind_keyseq_if_unbound (_rl_term_kl, rl_backward_char); rl_bind_keyseq_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */ rl_bind_keyseq_if_unbound (_rl_term_at7, rl_end_of_line); /* End */ rl_bind_keyseq_if_unbound (_rl_term_kD, rl_delete); _rl_keymap = xkeymap; } char * rl_get_termcap (cap) const char *cap; { register int i; if (tcap_initialized == 0) return ((char *)NULL); for (i = 0; i < NUM_TC_STRINGS; i++) { if (tc_strings[i].tc_var[0] == cap[0] && strcmp (tc_strings[i].tc_var, cap) == 0) return *(tc_strings[i].tc_value); } return ((char *)NULL); } /* Re-initialize the terminal considering that the TERM/TERMCAP variable has changed. */ int rl_reset_terminal (terminal_name) const char *terminal_name; { _rl_screenwidth = _rl_screenheight = 0; _rl_init_terminal_io (terminal_name); return 0; } /* A function for the use of tputs () */ #ifdef _MINIX void _rl_output_character_function (c) int c; { putc (c, _rl_out_stream); } #else /* !_MINIX */ int _rl_output_character_function (c) int c; { return putc (c, _rl_out_stream); } #endif /* !_MINIX */ /* Write COUNT characters from STRING to the output stream. */ void _rl_output_some_chars (string, count) const char *string; int count; { fwrite (string, 1, count, _rl_out_stream); } /* Move the cursor back. */ int _rl_backspace (count) int count; { register int i; #ifndef __MSDOS__ if (_rl_term_backspace) for (i = 0; i < count; i++) tputs (_rl_term_backspace, 1, _rl_output_character_function); else #endif for (i = 0; i < count; i++) putc ('\b', _rl_out_stream); return 0; } /* Move to the start of the next line. */ int rl_crlf () { #if defined (NEW_TTY_DRIVER) || defined (__MINT__) if (_rl_term_cr) tputs (_rl_term_cr, 1, _rl_output_character_function); #endif /* NEW_TTY_DRIVER || __MINT__ */ putc ('\n', _rl_out_stream); return 0; } /* Ring the terminal bell. */ int rl_ding () { if (_rl_echoing_p) { switch (_rl_bell_preference) { case NO_BELL: default: break; case VISIBLE_BELL: #ifdef __MSDOS__ ScreenVisualBell (); break; #else if (_rl_visible_bell) { tputs (_rl_visible_bell, 1, _rl_output_character_function); break; } /* FALLTHROUGH */ #endif case AUDIBLE_BELL: fprintf (stderr, "\007"); fflush (stderr); break; } return (0); } return (-1); } /* **************************************************************** */ /* */ /* Controlling the Meta Key and Keypad */ /* */ /* **************************************************************** */ void _rl_enable_meta_key () { #if !defined (__DJGPP__) if (term_has_meta && _rl_term_mm) tputs (_rl_term_mm, 1, _rl_output_character_function); #endif } void _rl_control_keypad (on) int on; { #if !defined (__DJGPP__) if (on && _rl_term_ks) tputs (_rl_term_ks, 1, _rl_output_character_function); else if (!on && _rl_term_ke) tputs (_rl_term_ke, 1, _rl_output_character_function); #endif } /* **************************************************************** */ /* */ /* Controlling the Cursor */ /* */ /* **************************************************************** */ /* Set the cursor appropriately depending on IM, which is one of the insert modes (insert or overwrite). Insert mode gets the normal cursor. Overwrite mode gets a very visible cursor. Only does anything if we have both capabilities. */ void _rl_set_cursor (im, force) int im, force; { #ifndef __MSDOS__ if (_rl_term_ve && _rl_term_vs) { if (force || im != rl_insert_mode) { if (im == RL_IM_OVERWRITE) tputs (_rl_term_vs, 1, _rl_output_character_function); else tputs (_rl_term_ve, 1, _rl_output_character_function); } } #endif } ����������������������������������������������gdb-doc-7.6.2/readline/rltty.h����������������������������������������������������������������������0000644�0001750�0001750�00000004743�12250770610�015205� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* rltty.h - tty driver-related definitions used by some library files. */ /* Copyright (C) 1995-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #if !defined (_RLTTY_H_) #define _RLTTY_H_ /* Posix systems use termios and the Posix signal functions. */ #if defined (TERMIOS_TTY_DRIVER) # include <termios.h> #endif /* TERMIOS_TTY_DRIVER */ /* System V machines use termio. */ #if defined (TERMIO_TTY_DRIVER) # include <termio.h> # if !defined (TCOON) # define TCOON 1 # endif #endif /* TERMIO_TTY_DRIVER */ /* Other (BSD) machines use sgtty. */ #if defined (NEW_TTY_DRIVER) # include <sgtty.h> #endif #include "rlwinsize.h" /* Define _POSIX_VDISABLE if we are not using the `new' tty driver and it is not already defined. It is used both to determine if a special character is disabled and to disable certain special characters. Posix systems should set to 0, USG systems to -1. */ #if !defined (NEW_TTY_DRIVER) && !defined (_POSIX_VDISABLE) # if defined (_SVR4_VDISABLE) # define _POSIX_VDISABLE _SVR4_VDISABLE # else # if defined (_POSIX_VERSION) # define _POSIX_VDISABLE 0 # else /* !_POSIX_VERSION */ # define _POSIX_VDISABLE -1 # endif /* !_POSIX_VERSION */ # endif /* !_SVR4_DISABLE */ #endif /* !NEW_TTY_DRIVER && !_POSIX_VDISABLE */ typedef struct _rl_tty_chars { unsigned char t_eof; unsigned char t_eol; unsigned char t_eol2; unsigned char t_erase; unsigned char t_werase; unsigned char t_kill; unsigned char t_reprint; unsigned char t_intr; unsigned char t_quit; unsigned char t_susp; unsigned char t_dsusp; unsigned char t_start; unsigned char t_stop; unsigned char t_lnext; unsigned char t_flush; unsigned char t_status; } _RL_TTY_CHARS; #endif /* _RLTTY_H_ */ �����������������������������gdb-doc-7.6.2/readline/COPYING����������������������������������������������������������������������0000644�0001750�0001750�00000104513�12250770610�014705� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> 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 3 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, see <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: <program> Copyright (C) <year> <name of author> This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>. �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/complete.c�������������������������������������������������������������������0000644�0001750�0001750�00000234271�12250770610�015633� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* complete.c -- filename completion for readline. */ /* Copyright (C) 1987-2011 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include <config.h> #endif #include <sys/types.h> #include <fcntl.h> #if defined (HAVE_SYS_FILE_H) # include <sys/file.h> #endif #if defined (HAVE_UNISTD_H) # include <unistd.h> #endif /* HAVE_UNISTD_H */ #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #include <stdio.h> #include <errno.h> #if !defined (errno) extern int errno; #endif /* !errno */ #if defined (HAVE_PWD_H) #include <pwd.h> #endif #include "posixdir.h" #include "posixstat.h" /* System-specific feature definitions and include files. */ #include "rldefs.h" #include "rlmbutil.h" /* Some standard library routines. */ #include "readline.h" #include "xmalloc.h" #include "rlprivate.h" #ifdef __STDC__ typedef int QSFUNC (const void *, const void *); #else typedef int QSFUNC (); #endif #ifdef HAVE_LSTAT # define LSTAT lstat #else # define LSTAT stat #endif /* Unix version of a hidden file. Could be different on other systems. */ #define HIDDEN_FILE(fname) ((fname)[0] == '.') /* Most systems don't declare getpwent in <pwd.h> if _POSIX_SOURCE is defined. */ #if defined (HAVE_GETPWENT) && (!defined (HAVE_GETPW_DECLS) || defined (_POSIX_SOURCE)) extern struct passwd *getpwent PARAMS((void)); #endif /* HAVE_GETPWENT && (!HAVE_GETPW_DECLS || _POSIX_SOURCE) */ /* If non-zero, then this is the address of a function to call when completing a word would normally display the list of possible matches. This function is called instead of actually doing the display. It takes three arguments: (char **matches, int num_matches, int max_length) where MATCHES is the array of strings that matched, NUM_MATCHES is the number of strings in that array, and MAX_LENGTH is the length of the longest string in that array. */ rl_compdisp_func_t *rl_completion_display_matches_hook = (rl_compdisp_func_t *)NULL; #if defined (VISIBLE_STATS) # if !defined (X_OK) # define X_OK 1 # endif static int stat_char PARAMS((char *)); #endif static int path_isdir PARAMS((const char *)); static char *rl_quote_filename PARAMS((char *, int, char *)); static void set_completion_defaults PARAMS((int)); static int get_y_or_n PARAMS((int)); static int _rl_internal_pager PARAMS((int)); static char *printable_part PARAMS((char *)); static int fnwidth PARAMS((const char *)); static int fnprint PARAMS((const char *, int)); static int print_filename PARAMS((char *, char *, int)); static char **gen_completion_matches PARAMS((char *, int, int, rl_compentry_func_t *, int, int)); static char **remove_duplicate_matches PARAMS((char **)); static void insert_match PARAMS((char *, int, int, char *)); static int append_to_match PARAMS((char *, int, int, int)); static void insert_all_matches PARAMS((char **, int, char *)); static int complete_fncmp PARAMS((const char *, int, const char *, int)); static void display_matches PARAMS((char **)); static int compute_lcd_of_matches PARAMS((char **, int, const char *)); static int postprocess_matches PARAMS((char ***, int)); static int complete_get_screenwidth PARAMS((void)); static char *make_quoted_replacement PARAMS((char *, int, char *)); /* **************************************************************** */ /* */ /* Completion matching, from readline's point of view. */ /* */ /* **************************************************************** */ /* Variables known only to the readline library. */ /* If non-zero, non-unique completions always show the list of matches. */ int _rl_complete_show_all = 0; /* If non-zero, non-unique completions show the list of matches, unless it is not possible to do partial completion and modify the line. */ int _rl_complete_show_unmodified = 0; /* If non-zero, completed directory names have a slash appended. */ int _rl_complete_mark_directories = 1; /* If non-zero, the symlinked directory completion behavior introduced in readline-4.2a is disabled, and symlinks that point to directories have a slash appended (subject to the value of _rl_complete_mark_directories). This is user-settable via the mark-symlinked-directories variable. */ int _rl_complete_mark_symlink_dirs = 0; /* If non-zero, completions are printed horizontally in alphabetical order, like `ls -x'. */ int _rl_print_completions_horizontally; /* Non-zero means that case is not significant in filename completion. */ #if defined (__MSDOS__) && !defined (__DJGPP__) int _rl_completion_case_fold = 1; #else int _rl_completion_case_fold = 0; #endif /* Non-zero means that `-' and `_' are equivalent when comparing filenames for completion. */ int _rl_completion_case_map = 0; /* If zero, don't match hidden files (filenames beginning with a `.' on Unix) when doing filename completion. */ int _rl_match_hidden_files = 1; /* Length in characters of a common prefix replaced with an ellipsis (`...') when displaying completion matches. Matches whose printable portion has more than this number of displaying characters in common will have the common display prefix replaced with an ellipsis. */ int _rl_completion_prefix_display_length = 0; /* The readline-private number of screen columns to use when displaying matches. If < 0 or > _rl_screenwidth, it is ignored. */ int _rl_completion_columns = -1; /* Global variables available to applications using readline. */ #if defined (VISIBLE_STATS) /* Non-zero means add an additional character to each filename displayed during listing completion iff rl_filename_completion_desired which helps to indicate the type of file being listed. */ int rl_visible_stats = 0; #endif /* VISIBLE_STATS */ /* If non-zero, when completing in the middle of a word, don't insert characters from the match that match characters following point in the word. This means, for instance, completing when the cursor is after the `e' in `Makefile' won't result in `Makefilefile'. */ int _rl_skip_completed_text = 0; /* If non-zero, menu completion displays the common prefix first in the cycle of possible completions instead of the last. */ int _rl_menu_complete_prefix_first = 0; /* If non-zero, then this is the address of a function to call when completing on a directory name. The function is called with the address of a string (the current directory name) as an arg. */ rl_icppfunc_t *rl_directory_completion_hook = (rl_icppfunc_t *)NULL; rl_icppfunc_t *rl_directory_rewrite_hook = (rl_icppfunc_t *)NULL; /* If non-zero, this is the address of a function to call when reading directory entries from the filesystem for completion and comparing them to the partial word to be completed. The function should either return its first argument (if no conversion takes place) or newly-allocated memory. This can, for instance, convert filenames between character sets for comparison against what's typed at the keyboard. The returned value is what is added to the list of matches. The second argument is the length of the filename to be converted. */ rl_dequote_func_t *rl_filename_rewrite_hook = (rl_dequote_func_t *)NULL; /* Non-zero means readline completion functions perform tilde expansion. */ int rl_complete_with_tilde_expansion = 0; /* Pointer to the generator function for completion_matches (). NULL means to use rl_filename_completion_function (), the default filename completer. */ rl_compentry_func_t *rl_completion_entry_function = (rl_compentry_func_t *)NULL; /* Pointer to generator function for rl_menu_complete (). NULL means to use *rl_completion_entry_function (see above). */ rl_compentry_func_t *rl_menu_completion_entry_function = (rl_compentry_func_t *)NULL; /* Pointer to alternative function to create matches. Function is called with TEXT, START, and END. START and END are indices in RL_LINE_BUFFER saying what the boundaries of TEXT are. If this function exists and returns NULL then call the value of rl_completion_entry_function to try to match, otherwise use the array of strings returned. */ rl_completion_func_t *rl_attempted_completion_function = (rl_completion_func_t *)NULL; /* Non-zero means to suppress normal filename completion after the user-specified completion function has been called. */ int rl_attempted_completion_over = 0; /* Set to a character indicating the type of completion being performed by rl_complete_internal, available for use by application completion functions. */ int rl_completion_type = 0; /* Up to this many items will be displayed in response to a possible-completions call. After that, we ask the user if she is sure she wants to see them all. A negative value means don't ask. */ int rl_completion_query_items = 100; int _rl_page_completions = 1; /* The basic list of characters that signal a break between words for the completer routine. The contents of this variable is what breaks words in the shell, i.e. " \t\n\"\\'`@$><=" */ const char *rl_basic_word_break_characters = " \t\n\"\\'`@$><=;|&{("; /* }) */ /* List of basic quoting characters. */ const char *rl_basic_quote_characters = "\"'"; /* The list of characters that signal a break between words for rl_complete_internal. The default list is the contents of rl_basic_word_break_characters. */ /*const*/ char *rl_completer_word_break_characters = (/*const*/ char *)NULL; /* Hook function to allow an application to set the completion word break characters before readline breaks up the line. Allows position-dependent word break characters. */ rl_cpvfunc_t *rl_completion_word_break_hook = (rl_cpvfunc_t *)NULL; /* List of characters which can be used to quote a substring of the line. Completion occurs on the entire substring, and within the substring rl_completer_word_break_characters are treated as any other character, unless they also appear within this list. */ const char *rl_completer_quote_characters = (const char *)NULL; /* List of characters that should be quoted in filenames by the completer. */ const char *rl_filename_quote_characters = (const char *)NULL; /* List of characters that are word break characters, but should be left in TEXT when it is passed to the completion function. The shell uses this to help determine what kind of completing to do. */ const char *rl_special_prefixes = (const char *)NULL; /* If non-zero, then disallow duplicates in the matches. */ int rl_ignore_completion_duplicates = 1; /* Non-zero means that the results of the matches are to be treated as filenames. This is ALWAYS zero on entry, and can only be changed within a completion entry finder function. */ int rl_filename_completion_desired = 0; /* Non-zero means that the results of the matches are to be quoted using double quotes (or an application-specific quoting mechanism) if the filename contains any characters in rl_filename_quote_chars. This is ALWAYS non-zero on entry, and can only be changed within a completion entry finder function. */ int rl_filename_quoting_desired = 1; /* This function, if defined, is called by the completer when real filename completion is done, after all the matching names have been generated. It is passed a (char**) known as matches in the code below. It consists of a NULL-terminated array of pointers to potential matching strings. The 1st element (matches[0]) is the maximal substring that is common to all matches. This function can re-arrange the list of matches as required, but all elements of the array must be free()'d if they are deleted. The main intent of this function is to implement FIGNORE a la SunOS csh. */ rl_compignore_func_t *rl_ignore_some_completions_function = (rl_compignore_func_t *)NULL; /* Set to a function to quote a filename in an application-specific fashion. Called with the text to quote, the type of match found (single or multiple) and a pointer to the quoting character to be used, which the function can reset if desired. */ rl_quote_func_t *rl_filename_quoting_function = rl_quote_filename; /* Function to call to remove quoting characters from a filename. Called before completion is attempted, so the embedded quotes do not interfere with matching names in the file system. Readline doesn't do anything with this; it's set only by applications. */ rl_dequote_func_t *rl_filename_dequoting_function = (rl_dequote_func_t *)NULL; /* Function to call to decide whether or not a word break character is quoted. If a character is quoted, it does not break words for the completer. */ rl_linebuf_func_t *rl_char_is_quoted_p = (rl_linebuf_func_t *)NULL; /* If non-zero, the completion functions don't append anything except a possible closing quote. This is set to 0 by rl_complete_internal and may be changed by an application-specific completion function. */ int rl_completion_suppress_append = 0; /* Character appended to completed words when at the end of the line. The default is a space. */ int rl_completion_append_character = ' '; /* If non-zero, the completion functions don't append any closing quote. This is set to 0 by rl_complete_internal and may be changed by an application-specific completion function. */ int rl_completion_suppress_quote = 0; /* Set to any quote character readline thinks it finds before any application completion function is called. */ int rl_completion_quote_character; /* Set to a non-zero value if readline found quoting anywhere in the word to be completed; set before any application completion function is called. */ int rl_completion_found_quote; /* If non-zero, a slash will be appended to completed filenames that are symbolic links to directory names, subject to the value of the mark-directories variable (which is user-settable). This exists so that application completion functions can override the user's preference (set via the mark-symlinked-directories variable) if appropriate. It's set to the value of _rl_complete_mark_symlink_dirs in rl_complete_internal before any application-specific completion function is called, so without that function doing anything, the user's preferences are honored. */ int rl_completion_mark_symlink_dirs; /* If non-zero, inhibit completion (temporarily). */ int rl_inhibit_completion; /* Set to the last key used to invoke one of the completion functions */ int rl_completion_invoking_key; /* If non-zero, sort the completion matches. On by default. */ int rl_sort_completion_matches = 1; /* Variables local to this file. */ /* Local variable states what happened during the last completion attempt. */ static int completion_changed_buffer; /* The result of the query to the user about displaying completion matches */ static int completion_y_or_n; /*************************************/ /* */ /* Bindable completion functions */ /* */ /*************************************/ /* Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm (see rl_completion_matches ()). The default is to do filename completion. */ int rl_complete (ignore, invoking_key) int ignore, invoking_key; { rl_completion_invoking_key = invoking_key; if (rl_inhibit_completion) return (_rl_insert_char (ignore, invoking_key)); else if (rl_last_func == rl_complete && !completion_changed_buffer) return (rl_complete_internal ('?')); else if (_rl_complete_show_all) return (rl_complete_internal ('!')); else if (_rl_complete_show_unmodified) return (rl_complete_internal ('@')); else return (rl_complete_internal (TAB)); } /* List the possible completions. See description of rl_complete (). */ int rl_possible_completions (ignore, invoking_key) int ignore, invoking_key; { rl_completion_invoking_key = invoking_key; return (rl_complete_internal ('?')); } int rl_insert_completions (ignore, invoking_key) int ignore, invoking_key; { rl_completion_invoking_key = invoking_key; return (rl_complete_internal ('*')); } /* Return the correct value to pass to rl_complete_internal performing the same tests as rl_complete. This allows consecutive calls to an application's completion function to list possible completions and for an application-specific completion function to honor the show-all-if-ambiguous readline variable. */ int rl_completion_mode (cfunc) rl_command_func_t *cfunc; { if (rl_last_func == cfunc && !completion_changed_buffer) return '?'; else if (_rl_complete_show_all) return '!'; else if (_rl_complete_show_unmodified) return '@'; else return TAB; } /************************************/ /* */ /* Completion utility functions */ /* */ /************************************/ /* Reset readline state on a signal or other event. */ void _rl_reset_completion_state () { rl_completion_found_quote = 0; rl_completion_quote_character = 0; } /* Set default values for readline word completion. These are the variables that application completion functions can change or inspect. */ static void set_completion_defaults (what_to_do) int what_to_do; { /* Only the completion entry function can change these. */ rl_filename_completion_desired = 0; rl_filename_quoting_desired = 1; rl_completion_type = what_to_do; rl_completion_suppress_append = rl_completion_suppress_quote = 0; rl_completion_append_character = ' '; /* The completion entry function may optionally change this. */ rl_completion_mark_symlink_dirs = _rl_complete_mark_symlink_dirs; } /* The user must press "y" or "n". Non-zero return means "y" pressed. */ static int get_y_or_n (for_pager) int for_pager; { int c; /* Disabled for GDB due to the gdb.base/readline-ask.exp regression. [patch] testsuite: Test readline-6.2 "ask" regression http://sourceware.org/ml/gdb-patches/2011-05/msg00002.html */ #if 0 /* For now, disable pager in callback mode, until we later convert to state driven functions. Have to wait until next major version to add new state definition, since it will change value of RL_STATE_DONE. */ #if defined (READLINE_CALLBACKS) if (RL_ISSTATE (RL_STATE_CALLBACK)) return 1; #endif #endif for (;;) { RL_SETSTATE(RL_STATE_MOREINPUT); c = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); if (c == 'y' || c == 'Y' || c == ' ') return (1); if (c == 'n' || c == 'N' || c == RUBOUT) return (0); if (c == ABORT_CHAR || c < 0) _rl_abort_internal (); if (for_pager && (c == NEWLINE || c == RETURN)) return (2); if (for_pager && (c == 'q' || c == 'Q')) return (0); rl_ding (); } } static int _rl_internal_pager (lines) int lines; { int i; fprintf (rl_outstream, "--More--"); fflush (rl_outstream); i = get_y_or_n (1); _rl_erase_entire_line (); if (i == 0) return -1; else if (i == 2) return (lines - 1); else return 0; } static int path_isdir (filename) const char *filename; { struct stat finfo; return (stat (filename, &finfo) == 0 && S_ISDIR (finfo.st_mode)); } #if defined (VISIBLE_STATS) /* Return the character which best describes FILENAME. `@' for symbolic links `/' for directories `*' for executables `=' for sockets `|' for FIFOs `%' for character special devices `#' for block special devices */ static int stat_char (filename) char *filename; { struct stat finfo; int character, r; /* Short-circuit a //server on cygwin, since that will always behave as a directory. */ #if __CYGWIN__ if (filename[0] == '/' && filename[1] == '/' && strchr (filename+2, '/') == 0) return '/'; #endif #if defined (HAVE_LSTAT) && defined (S_ISLNK) r = lstat (filename, &finfo); #else r = stat (filename, &finfo); #endif if (r == -1) return (0); character = 0; if (S_ISDIR (finfo.st_mode)) character = '/'; #if defined (S_ISCHR) else if (S_ISCHR (finfo.st_mode)) character = '%'; #endif /* S_ISCHR */ #if defined (S_ISBLK) else if (S_ISBLK (finfo.st_mode)) character = '#'; #endif /* S_ISBLK */ #if defined (S_ISLNK) else if (S_ISLNK (finfo.st_mode)) character = '@'; #endif /* S_ISLNK */ #if defined (S_ISSOCK) else if (S_ISSOCK (finfo.st_mode)) character = '='; #endif /* S_ISSOCK */ #if defined (S_ISFIFO) else if (S_ISFIFO (finfo.st_mode)) character = '|'; #endif else if (S_ISREG (finfo.st_mode)) { if (access (filename, X_OK) == 0) character = '*'; } return (character); } #endif /* VISIBLE_STATS */ /* Return the portion of PATHNAME that should be output when listing possible completions. If we are hacking filename completion, we are only interested in the basename, the portion following the final slash. Otherwise, we return what we were passed. Since printing empty strings is not very informative, if we're doing filename completion, and the basename is the empty string, we look for the previous slash and return the portion following that. If there's no previous slash, we just return what we were passed. */ static char * printable_part (pathname) char *pathname; { char *temp, *x; if (rl_filename_completion_desired == 0) /* don't need to do anything */ return (pathname); temp = strrchr (pathname, '/'); #if defined (__MSDOS__) if (temp == 0 && ISALPHA ((unsigned char)pathname[0]) && pathname[1] == ':') temp = pathname + 1; #endif if (temp == 0 || *temp == '\0') return (pathname); /* If the basename is NULL, we might have a pathname like '/usr/src/'. Look for a previous slash and, if one is found, return the portion following that slash. If there's no previous slash, just return the pathname we were passed. */ else if (temp[1] == '\0') { for (x = temp - 1; x > pathname; x--) if (*x == '/') break; return ((*x == '/') ? x + 1 : pathname); } else return ++temp; } /* Compute width of STRING when displayed on screen by print_filename */ static int fnwidth (string) const char *string; { int width, pos; #if defined (HANDLE_MULTIBYTE) mbstate_t ps; int left, w; size_t clen; wchar_t wc; left = strlen (string) + 1; memset (&ps, 0, sizeof (mbstate_t)); #endif width = pos = 0; while (string[pos]) { if (CTRL_CHAR (string[pos]) || string[pos] == RUBOUT) { width += 2; pos++; } else { #if defined (HANDLE_MULTIBYTE) clen = mbrtowc (&wc, string + pos, left - pos, &ps); if (MB_INVALIDCH (clen)) { width++; pos++; memset (&ps, 0, sizeof (mbstate_t)); } else if (MB_NULLWCH (clen)) break; else { pos += clen; w = wcwidth (wc); width += (w >= 0) ? w : 1; } #else width++; pos++; #endif } } return width; } #define ELLIPSIS_LEN 3 static int fnprint (to_print, prefix_bytes) const char *to_print; int prefix_bytes; { int printed_len, w; const char *s; #if defined (HANDLE_MULTIBYTE) mbstate_t ps; const char *end; size_t tlen; int width; wchar_t wc; end = to_print + strlen (to_print) + 1; memset (&ps, 0, sizeof (mbstate_t)); #endif printed_len = 0; /* Don't print only the ellipsis if the common prefix is one of the possible completions */ if (to_print[prefix_bytes] == '\0') prefix_bytes = 0; if (prefix_bytes) { char ellipsis; ellipsis = (to_print[prefix_bytes] == '.') ? '_' : '.'; for (w = 0; w < ELLIPSIS_LEN; w++) putc (ellipsis, rl_outstream); printed_len = ELLIPSIS_LEN; } s = to_print + prefix_bytes; while (*s) { if (CTRL_CHAR (*s)) { putc ('^', rl_outstream); putc (UNCTRL (*s), rl_outstream); printed_len += 2; s++; #if defined (HANDLE_MULTIBYTE) memset (&ps, 0, sizeof (mbstate_t)); #endif } else if (*s == RUBOUT) { putc ('^', rl_outstream); putc ('?', rl_outstream); printed_len += 2; s++; #if defined (HANDLE_MULTIBYTE) memset (&ps, 0, sizeof (mbstate_t)); #endif } else { #if defined (HANDLE_MULTIBYTE) tlen = mbrtowc (&wc, s, end - s, &ps); if (MB_INVALIDCH (tlen)) { tlen = 1; width = 1; memset (&ps, 0, sizeof (mbstate_t)); } else if (MB_NULLWCH (tlen)) break; else { w = wcwidth (wc); width = (w >= 0) ? w : 1; } fwrite (s, 1, tlen, rl_outstream); s += tlen; printed_len += width; #else putc (*s, rl_outstream); s++; printed_len++; #endif } } return printed_len; } /* Output TO_PRINT to rl_outstream. If VISIBLE_STATS is defined and we are using it, check for and output a single character for `special' filenames. Return the number of characters we output. */ static int print_filename (to_print, full_pathname, prefix_bytes) char *to_print, *full_pathname; int prefix_bytes; { int printed_len, extension_char, slen, tlen; char *s, c, *new_full_pathname, *dn; extension_char = 0; printed_len = fnprint (to_print, prefix_bytes); #if defined (VISIBLE_STATS) if (rl_filename_completion_desired && (rl_visible_stats || _rl_complete_mark_directories)) #else if (rl_filename_completion_desired && _rl_complete_mark_directories) #endif { /* If to_print != full_pathname, to_print is the basename of the path passed. In this case, we try to expand the directory name before checking for the stat character. */ if (to_print != full_pathname) { /* Terminate the directory name. */ c = to_print[-1]; to_print[-1] = '\0'; /* If setting the last slash in full_pathname to a NUL results in full_pathname being the empty string, we are trying to complete files in the root directory. If we pass a null string to the bash directory completion hook, for example, it will expand it to the current directory. We just want the `/'. */ if (full_pathname == 0 || *full_pathname == 0) dn = "/"; else if (full_pathname[0] != '/') dn = full_pathname; else if (full_pathname[1] == 0) dn = "//"; /* restore trailing slash to `//' */ else if (full_pathname[1] == '/' && full_pathname[2] == 0) dn = "/"; /* don't turn /// into // */ else dn = full_pathname; s = tilde_expand (dn); if (rl_directory_completion_hook) (*rl_directory_completion_hook) (&s); slen = strlen (s); tlen = strlen (to_print); new_full_pathname = (char *)xmalloc (slen + tlen + 2); strcpy (new_full_pathname, s); if (s[slen - 1] == '/') slen--; else new_full_pathname[slen] = '/'; new_full_pathname[slen] = '/'; strcpy (new_full_pathname + slen + 1, to_print); #if defined (VISIBLE_STATS) if (rl_visible_stats) extension_char = stat_char (new_full_pathname); else #endif if (path_isdir (new_full_pathname)) extension_char = '/'; xfree (new_full_pathname); to_print[-1] = c; } else { s = tilde_expand (full_pathname); #if defined (VISIBLE_STATS) if (rl_visible_stats) extension_char = stat_char (s); else #endif if (path_isdir (s)) extension_char = '/'; } xfree (s); if (extension_char) { putc (extension_char, rl_outstream); printed_len++; } } return printed_len; } static char * rl_quote_filename (s, rtype, qcp) char *s; int rtype; char *qcp; { char *r; r = (char *)xmalloc (strlen (s) + 2); *r = *rl_completer_quote_characters; strcpy (r + 1, s); if (qcp) *qcp = *rl_completer_quote_characters; return r; } /* Find the bounds of the current word for completion purposes, and leave rl_point set to the end of the word. This function skips quoted substrings (characters between matched pairs of characters in rl_completer_quote_characters). First we try to find an unclosed quoted substring on which to do matching. If one is not found, we use the word break characters to find the boundaries of the current word. We call an application-specific function to decide whether or not a particular word break character is quoted; if that function returns a non-zero result, the character does not break a word. This function returns the opening quote character if we found an unclosed quoted substring, '\0' otherwise. FP, if non-null, is set to a value saying which (shell-like) quote characters we found (single quote, double quote, or backslash) anywhere in the string. DP, if non-null, is set to the value of the delimiter character that caused a word break. */ char _rl_find_completion_word (fp, dp) int *fp, *dp; { int scan, end, found_quote, delimiter, pass_next, isbrk; char quote_char, *brkchars; end = rl_point; found_quote = delimiter = 0; quote_char = '\0'; brkchars = 0; if (rl_completion_word_break_hook) brkchars = (*rl_completion_word_break_hook) (); if (brkchars == 0) brkchars = rl_completer_word_break_characters; if (rl_completer_quote_characters) { /* We have a list of characters which can be used in pairs to quote substrings for the completer. Try to find the start of an unclosed quoted substring. */ /* FOUND_QUOTE is set so we know what kind of quotes we found. */ for (scan = pass_next = 0; scan < end; scan = MB_NEXTCHAR (rl_line_buffer, scan, 1, MB_FIND_ANY)) { if (pass_next) { pass_next = 0; continue; } /* Shell-like semantics for single quotes -- don't allow backslash to quote anything in single quotes, especially not the closing quote. If you don't like this, take out the check on the value of quote_char. */ if (quote_char != '\'' && rl_line_buffer[scan] == '\\') { pass_next = 1; found_quote |= RL_QF_BACKSLASH; continue; } if (quote_char != '\0') { /* Ignore everything until the matching close quote char. */ if (rl_line_buffer[scan] == quote_char) { /* Found matching close. Abandon this substring. */ quote_char = '\0'; rl_point = end; } } else if (strchr (rl_completer_quote_characters, rl_line_buffer[scan])) { /* Found start of a quoted substring. */ quote_char = rl_line_buffer[scan]; rl_point = scan + 1; /* Shell-like quoting conventions. */ if (quote_char == '\'') found_quote |= RL_QF_SINGLE_QUOTE; else if (quote_char == '"') found_quote |= RL_QF_DOUBLE_QUOTE; else found_quote |= RL_QF_OTHER_QUOTE; } } } if (rl_point == end && quote_char == '\0') { /* We didn't find an unclosed quoted substring upon which to do completion, so use the word break characters to find the substring on which to complete. */ while (rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_ANY)) { scan = rl_line_buffer[rl_point]; if (strchr (brkchars, scan) == 0) continue; /* Call the application-specific function to tell us whether this word break character is quoted and should be skipped. */ if (rl_char_is_quoted_p && found_quote && (*rl_char_is_quoted_p) (rl_line_buffer, rl_point)) continue; /* Convoluted code, but it avoids an n^2 algorithm with calls to char_is_quoted. */ break; } } /* If we are at an unquoted word break, then advance past it. */ scan = rl_line_buffer[rl_point]; /* If there is an application-specific function to say whether or not a character is quoted and we found a quote character, let that function decide whether or not a character is a word break, even if it is found in rl_completer_word_break_characters. Don't bother if we're at the end of the line, though. */ if (scan) { if (rl_char_is_quoted_p) isbrk = (found_quote == 0 || (*rl_char_is_quoted_p) (rl_line_buffer, rl_point) == 0) && strchr (brkchars, scan) != 0; else isbrk = strchr (brkchars, scan) != 0; if (isbrk) { /* If the character that caused the word break was a quoting character, then remember it as the delimiter. */ if (rl_basic_quote_characters && strchr (rl_basic_quote_characters, scan) && (end - rl_point) > 1) delimiter = scan; /* If the character isn't needed to determine something special about what kind of completion to perform, then advance past it. */ if (rl_special_prefixes == 0 || strchr (rl_special_prefixes, scan) == 0) rl_point++; } } if (fp) *fp = found_quote; if (dp) *dp = delimiter; return (quote_char); } static char ** gen_completion_matches (text, start, end, our_func, found_quote, quote_char) char *text; int start, end; rl_compentry_func_t *our_func; int found_quote, quote_char; { char **matches; rl_completion_found_quote = found_quote; rl_completion_quote_character = quote_char; /* If the user wants to TRY to complete, but then wants to give up and use the default completion function, they set the variable rl_attempted_completion_function. */ if (rl_attempted_completion_function) { _rl_interrupt_immediately++; matches = (*rl_attempted_completion_function) (text, start, end); if (_rl_interrupt_immediately > 0) _rl_interrupt_immediately--; if (matches || rl_attempted_completion_over) { rl_attempted_completion_over = 0; return (matches); } } /* XXX -- filename dequoting moved into rl_filename_completion_function */ matches = rl_completion_matches (text, our_func); return matches; } /* Filter out duplicates in MATCHES. This frees up the strings in MATCHES. */ static char ** remove_duplicate_matches (matches) char **matches; { char *lowest_common; int i, j, newlen; char dead_slot; char **temp_array; /* Sort the items. */ for (i = 0; matches[i]; i++) ; /* Sort the array without matches[0], since we need it to stay in place no matter what. */ if (i && rl_sort_completion_matches) qsort (matches+1, i-1, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare); /* Remember the lowest common denominator for it may be unique. */ lowest_common = savestring (matches[0]); for (i = newlen = 0; matches[i + 1]; i++) { if (strcmp (matches[i], matches[i + 1]) == 0) { xfree (matches[i]); matches[i] = (char *)&dead_slot; } else newlen++; } /* We have marked all the dead slots with (char *)&dead_slot. Copy all the non-dead entries into a new array. */ temp_array = (char **)xmalloc ((3 + newlen) * sizeof (char *)); for (i = j = 1; matches[i]; i++) { if (matches[i] != (char *)&dead_slot) temp_array[j++] = matches[i]; } temp_array[j] = (char *)NULL; if (matches[0] != (char *)&dead_slot) xfree (matches[0]); /* Place the lowest common denominator back in [0]. */ temp_array[0] = lowest_common; /* If there is one string left, and it is identical to the lowest common denominator, then the LCD is the string to insert. */ if (j == 2 && strcmp (temp_array[0], temp_array[1]) == 0) { xfree (temp_array[1]); temp_array[1] = (char *)NULL; } return (temp_array); } /* Find the common prefix of the list of matches, and put it into matches[0]. */ static int compute_lcd_of_matches (match_list, matches, text) char **match_list; int matches; const char *text; { register int i, c1, c2, si; int low; /* Count of max-matched characters. */ char *dtext; /* dequoted TEXT, if needed */ #if defined (HANDLE_MULTIBYTE) int v; mbstate_t ps1, ps2; wchar_t wc1, wc2; #endif /* If only one match, just use that. Otherwise, compare each member of the list with the next, finding out where they stop matching. */ if (matches == 1) { match_list[0] = match_list[1]; match_list[1] = (char *)NULL; return 1; } for (i = 1, low = 100000; i < matches; i++) { #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { memset (&ps1, 0, sizeof (mbstate_t)); memset (&ps2, 0, sizeof (mbstate_t)); } #endif if (_rl_completion_case_fold) { for (si = 0; (c1 = _rl_to_lower(match_list[i][si])) && (c2 = _rl_to_lower(match_list[i + 1][si])); si++) #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { v = mbrtowc (&wc1, match_list[i]+si, strlen (match_list[i]+si), &ps1); mbrtowc (&wc2, match_list[i+1]+si, strlen (match_list[i+1]+si), &ps2); wc1 = towlower (wc1); wc2 = towlower (wc2); if (wc1 != wc2) break; else if (v > 1) si += v - 1; } else #endif if (c1 != c2) break; } else { for (si = 0; (c1 = match_list[i][si]) && (c2 = match_list[i + 1][si]); si++) #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { mbstate_t ps_back; ps_back = ps1; if (!_rl_compare_chars (match_list[i], si, &ps1, match_list[i+1], si, &ps2)) break; else if ((v = _rl_get_char_len (&match_list[i][si], &ps_back)) > 1) si += v - 1; } else #endif if (c1 != c2) break; } if (low > si) low = si; } /* If there were multiple matches, but none matched up to even the first character, and the user typed something, use that as the value of matches[0]. */ if (low == 0 && text && *text) { match_list[0] = (char *)xmalloc (strlen (text) + 1); strcpy (match_list[0], text); } else { match_list[0] = (char *)xmalloc (low + 1); /* XXX - this might need changes in the presence of multibyte chars */ /* If we are ignoring case, try to preserve the case of the string the user typed in the face of multiple matches differing in case. */ if (_rl_completion_case_fold) { /* We're making an assumption here: IF we're completing filenames AND the application has defined a filename dequoting function AND we found a quote character AND the application has requested filename quoting THEN we assume that TEXT was dequoted before checking against the file system and needs to be dequoted here before we check against the list of matches FI */ dtext = (char *)NULL; if (rl_filename_completion_desired && rl_filename_dequoting_function && rl_completion_found_quote && rl_filename_quoting_desired) { dtext = (*rl_filename_dequoting_function) ((char *)text, rl_completion_quote_character); text = dtext; } /* sort the list to get consistent answers. */ qsort (match_list+1, matches, sizeof(char *), (QSFUNC *)_rl_qsort_string_compare); si = strlen (text); if (si <= low) { for (i = 1; i <= matches; i++) if (strncmp (match_list[i], text, si) == 0) { strncpy (match_list[0], match_list[i], low); break; } /* no casematch, use first entry */ if (i > matches) strncpy (match_list[0], match_list[1], low); } else /* otherwise, just use the text the user typed. */ strncpy (match_list[0], text, low); FREE (dtext); } else strncpy (match_list[0], match_list[1], low); match_list[0][low] = '\0'; } return matches; } static int postprocess_matches (matchesp, matching_filenames) char ***matchesp; int matching_filenames; { char *t, **matches, **temp_matches; int nmatch, i; matches = *matchesp; if (matches == 0) return 0; /* It seems to me that in all the cases we handle we would like to ignore duplicate possiblilities. Scan for the text to insert being identical to the other completions. */ if (rl_ignore_completion_duplicates) { temp_matches = remove_duplicate_matches (matches); xfree (matches); matches = temp_matches; } /* If we are matching filenames, then here is our chance to do clever processing by re-examining the list. Call the ignore function with the array as a parameter. It can munge the array, deleting matches as it desires. */ if (rl_ignore_some_completions_function && matching_filenames) { for (nmatch = 1; matches[nmatch]; nmatch++) ; (void)(*rl_ignore_some_completions_function) (matches); if (matches == 0 || matches[0] == 0) { FREE (matches); *matchesp = (char **)0; return 0; } else { /* If we removed some matches, recompute the common prefix. */ for (i = 1; matches[i]; i++) ; if (i > 1 && i < nmatch) { t = matches[0]; compute_lcd_of_matches (matches, i - 1, t); FREE (t); } } } *matchesp = matches; return (1); } static int complete_get_screenwidth () { int cols; char *envcols; cols = _rl_completion_columns; if (cols >= 0 && cols <= _rl_screenwidth) return cols; envcols = getenv ("COLUMNS"); if (envcols && *envcols) cols = atoi (envcols); if (cols >= 0 && cols <= _rl_screenwidth) return cols; return _rl_screenwidth; } /* A convenience function for displaying a list of strings in columnar format on readline's output stream. MATCHES is the list of strings, in argv format, LEN is the number of strings in MATCHES, and MAX is the length of the longest string in MATCHES. */ void rl_display_match_list (matches, len, max) char **matches; int len, max; { int count, limit, printed_len, lines, cols; int i, j, k, l, common_length, sind; char *temp, *t; /* Find the length of the prefix common to all items: length as displayed characters (common_length) and as a byte index into the matches (sind) */ common_length = sind = 0; if (_rl_completion_prefix_display_length > 0) { t = printable_part (matches[0]); temp = strrchr (t, '/'); common_length = temp ? fnwidth (temp) : fnwidth (t); sind = temp ? strlen (temp) : strlen (t); if (common_length > _rl_completion_prefix_display_length && common_length > ELLIPSIS_LEN) max -= common_length - ELLIPSIS_LEN; else common_length = sind = 0; } /* How many items of MAX length can we fit in the screen window? */ cols = complete_get_screenwidth (); max += 2; limit = cols / max; if (limit != 1 && (limit * max == cols)) limit--; /* If cols == 0, limit will end up -1 */ if (cols < _rl_screenwidth && limit < 0) limit = 1; /* Avoid a possible floating exception. If max > cols, limit will be 0 and a divide-by-zero fault will result. */ if (limit == 0) limit = 1; /* How many iterations of the printing loop? */ count = (len + (limit - 1)) / limit; /* Watch out for special case. If LEN is less than LIMIT, then just do the inner printing loop. 0 < len <= limit implies count = 1. */ /* Sort the items if they are not already sorted. */ if (rl_ignore_completion_duplicates == 0 && rl_sort_completion_matches) qsort (matches + 1, len, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare); rl_crlf (); lines = 0; if (_rl_print_completions_horizontally == 0) { /* Print the sorted items, up-and-down alphabetically, like ls. */ for (i = 1; i <= count; i++) { for (j = 0, l = i; j < limit; j++) { if (l > len || matches[l] == 0) break; else { temp = printable_part (matches[l]); printed_len = print_filename (temp, matches[l], sind); if (j + 1 < limit) for (k = 0; k < max - printed_len; k++) putc (' ', rl_outstream); } l += count; } rl_crlf (); lines++; if (_rl_page_completions && lines >= (_rl_screenheight - 1) && i < count) { lines = _rl_internal_pager (lines); if (lines < 0) return; } } } else { /* Print the sorted items, across alphabetically, like ls -x. */ for (i = 1; matches[i]; i++) { temp = printable_part (matches[i]); printed_len = print_filename (temp, matches[i], sind); /* Have we reached the end of this line? */ if (matches[i+1]) { if (i && (limit > 1) && (i % limit) == 0) { rl_crlf (); lines++; if (_rl_page_completions && lines >= _rl_screenheight - 1) { lines = _rl_internal_pager (lines); if (lines < 0) return; } } else for (k = 0; k < max - printed_len; k++) putc (' ', rl_outstream); } } rl_crlf (); } } /* Display MATCHES, a list of matching filenames in argv format. This handles the simple case -- a single match -- first. If there is more than one match, we compute the number of strings in the list and the length of the longest string, which will be needed by the display function. If the application wants to handle displaying the list of matches itself, it sets RL_COMPLETION_DISPLAY_MATCHES_HOOK to the address of a function, and we just call it. If we're handling the display ourselves, we just call rl_display_match_list. We also check that the list of matches doesn't exceed the user-settable threshold, and ask the user if he wants to see the list if there are more matches than RL_COMPLETION_QUERY_ITEMS. */ static void display_matches (matches) char **matches; { int len, max, i; char *temp; /* Move to the last visible line of a possibly-multiple-line command. */ _rl_move_vert (_rl_vis_botlin); /* Handle simple case first. What if there is only one answer? */ if (matches[1] == 0) { temp = printable_part (matches[0]); rl_crlf (); print_filename (temp, matches[0], 0); rl_crlf (); rl_forced_update_display (); rl_display_fixed = 1; return; } /* There is more than one answer. Find out how many there are, and find the maximum printed length of a single entry. */ for (max = 0, i = 1; matches[i]; i++) { temp = printable_part (matches[i]); len = fnwidth (temp); if (len > max) max = len; } len = i - 1; /* If the caller has defined a display hook, then call that now. */ if (rl_completion_display_matches_hook) { (*rl_completion_display_matches_hook) (matches, len, max); return; } /* If there are many items, then ask the user if she really wants to see them all. */ if (rl_completion_query_items > 0 && len >= rl_completion_query_items) { rl_crlf (); fprintf (rl_outstream, "Display all %d possibilities? (y or n)", len); fflush (rl_outstream); if ((completion_y_or_n = get_y_or_n (0)) == 0) { rl_crlf (); rl_forced_update_display (); rl_display_fixed = 1; return; } } rl_display_match_list (matches, len, max); rl_forced_update_display (); rl_display_fixed = 1; } static char * make_quoted_replacement (match, mtype, qc) char *match; int mtype; char *qc; /* Pointer to quoting character, if any */ { int should_quote, do_replace; char *replacement; /* If we are doing completion on quoted substrings, and any matches contain any of the completer_word_break_characters, then auto- matically prepend the substring with a quote character (just pick the first one from the list of such) if it does not already begin with a quote string. FIXME: Need to remove any such automatically inserted quote character when it no longer is necessary, such as if we change the string we are completing on and the new set of matches don't require a quoted substring. */ replacement = match; should_quote = match && rl_completer_quote_characters && rl_filename_completion_desired && rl_filename_quoting_desired; if (should_quote) should_quote = should_quote && (!qc || !*qc || (rl_completer_quote_characters && strchr (rl_completer_quote_characters, *qc))); if (should_quote) { /* If there is a single match, see if we need to quote it. This also checks whether the common prefix of several matches needs to be quoted. */ should_quote = rl_filename_quote_characters ? (_rl_strpbrk (match, rl_filename_quote_characters) != 0) : 0; do_replace = should_quote ? mtype : NO_MATCH; /* Quote the replacement, since we found an embedded word break character in a potential match. */ if (do_replace != NO_MATCH && rl_filename_quoting_function) replacement = (*rl_filename_quoting_function) (match, do_replace, qc); } return (replacement); } static void insert_match (match, start, mtype, qc) char *match; int start, mtype; char *qc; { char *replacement, *r; char oqc; int end, rlen; oqc = qc ? *qc : '\0'; replacement = make_quoted_replacement (match, mtype, qc); /* Now insert the match. */ if (replacement) { rlen = strlen (replacement); /* Don't double an opening quote character. */ if (qc && *qc && start && rl_line_buffer[start - 1] == *qc && replacement[0] == *qc) start--; /* If make_quoted_replacement changed the quoting character, remove the opening quote and insert the (fully-quoted) replacement. */ else if (qc && (*qc != oqc) && start && rl_line_buffer[start - 1] == oqc && replacement[0] != oqc) start--; end = rl_point - 1; /* Don't double a closing quote character */ if (qc && *qc && end && rl_line_buffer[rl_point] == *qc && replacement[rlen - 1] == *qc) end++; if (_rl_skip_completed_text) { r = replacement; while (start < rl_end && *r && rl_line_buffer[start] == *r) { start++; r++; } if (start <= end || *r) _rl_replace_text (r, start, end); rl_point = start + strlen (r); } else _rl_replace_text (replacement, start, end); if (replacement != match) xfree (replacement); } } /* Append any necessary closing quote and a separator character to the just-inserted match. If the user has specified that directories should be marked by a trailing `/', append one of those instead. The default trailing character is a space. Returns the number of characters appended. If NONTRIVIAL_MATCH is set, we test for a symlink (if the OS has them) and don't add a suffix for a symlink to a directory. A nontrivial match is one that actually adds to the word being completed. The variable rl_completion_mark_symlink_dirs controls this behavior (it's initially set to the what the user has chosen, indicated by the value of _rl_complete_mark_symlink_dirs, but may be modified by an application's completion function). */ static int append_to_match (text, delimiter, quote_char, nontrivial_match) char *text; int delimiter, quote_char, nontrivial_match; { char temp_string[4], *filename; int temp_string_index, s; struct stat finfo; temp_string_index = 0; if (quote_char && rl_point && rl_completion_suppress_quote == 0 && rl_line_buffer[rl_point - 1] != quote_char) temp_string[temp_string_index++] = quote_char; if (delimiter) temp_string[temp_string_index++] = delimiter; else if (rl_completion_suppress_append == 0 && rl_completion_append_character) temp_string[temp_string_index++] = rl_completion_append_character; temp_string[temp_string_index++] = '\0'; if (rl_filename_completion_desired) { filename = tilde_expand (text); s = (nontrivial_match && rl_completion_mark_symlink_dirs == 0) ? LSTAT (filename, &finfo) : stat (filename, &finfo); if (s == 0 && S_ISDIR (finfo.st_mode)) { if (_rl_complete_mark_directories /* && rl_completion_suppress_append == 0 */) { /* This is clumsy. Avoid putting in a double slash if point is at the end of the line and the previous character is a slash. */ if (rl_point && rl_line_buffer[rl_point] == '\0' && rl_line_buffer[rl_point - 1] == '/') ; else if (rl_line_buffer[rl_point] != '/') rl_insert_text ("/"); } } #ifdef S_ISLNK /* Don't add anything if the filename is a symlink and resolves to a directory. */ else if (s == 0 && S_ISLNK (finfo.st_mode) && stat (filename, &finfo) == 0 && S_ISDIR (finfo.st_mode)) ; #endif else { if (rl_point == rl_end && temp_string_index) rl_insert_text (temp_string); } xfree (filename); } else { if (rl_point == rl_end && temp_string_index) rl_insert_text (temp_string); } return (temp_string_index); } static void insert_all_matches (matches, point, qc) char **matches; int point; char *qc; { int i; char *rp; rl_begin_undo_group (); /* remove any opening quote character; make_quoted_replacement will add it back. */ if (qc && *qc && point && rl_line_buffer[point - 1] == *qc) point--; rl_delete_text (point, rl_point); rl_point = point; if (matches[1]) { for (i = 1; matches[i]; i++) { rp = make_quoted_replacement (matches[i], SINGLE_MATCH, qc); rl_insert_text (rp); rl_insert_text (" "); if (rp != matches[i]) xfree (rp); } } else { rp = make_quoted_replacement (matches[0], SINGLE_MATCH, qc); rl_insert_text (rp); rl_insert_text (" "); if (rp != matches[0]) xfree (rp); } rl_end_undo_group (); } void _rl_free_match_list (matches) char **matches; { register int i; if (matches == 0) return; for (i = 0; matches[i]; i++) xfree (matches[i]); xfree (matches); } /* Complete the word at or before point. WHAT_TO_DO says what to do with the completion. `?' means list the possible completions. TAB means do standard completion. `*' means insert all of the possible completions. `!' means to do standard completion, and list all possible completions if there is more than one. `@' means to do standard completion, and list all possible completions if there is more than one and partial completion is not possible. */ int rl_complete_internal (what_to_do) int what_to_do; { char **matches; rl_compentry_func_t *our_func; int start, end, delimiter, found_quote, i, nontrivial_lcd; char *text, *saved_line_buffer; char quote_char; #if 1 int tlen, mlen; #endif RL_SETSTATE(RL_STATE_COMPLETING); set_completion_defaults (what_to_do); saved_line_buffer = rl_line_buffer ? savestring (rl_line_buffer) : (char *)NULL; our_func = rl_completion_entry_function ? rl_completion_entry_function : rl_filename_completion_function; /* We now look backwards for the start of a filename/variable word. */ end = rl_point; found_quote = delimiter = 0; quote_char = '\0'; if (rl_point) /* This (possibly) changes rl_point. If it returns a non-zero char, we know we have an open quote. */ quote_char = _rl_find_completion_word (&found_quote, &delimiter); start = rl_point; rl_point = end; text = rl_copy_text (start, end); matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char); /* nontrivial_lcd is set if the common prefix adds something to the word being completed. */ nontrivial_lcd = matches && strcmp (text, matches[0]) != 0; #if 1 if (what_to_do == '!' || what_to_do == '@') tlen = strlen (text); #endif xfree (text); if (matches == 0) { rl_ding (); FREE (saved_line_buffer); completion_changed_buffer = 0; RL_UNSETSTATE(RL_STATE_COMPLETING); _rl_reset_completion_state (); return (0); } /* If we are matching filenames, the attempted completion function will have set rl_filename_completion_desired to a non-zero value. The basic rl_filename_completion_function does this. */ i = rl_filename_completion_desired; if (postprocess_matches (&matches, i) == 0) { rl_ding (); FREE (saved_line_buffer); completion_changed_buffer = 0; RL_UNSETSTATE(RL_STATE_COMPLETING); _rl_reset_completion_state (); return (0); } switch (what_to_do) { case TAB: case '!': case '@': /* Insert the first match with proper quoting. */ #if 0 if (*matches[0]) insert_match (matches[0], start, matches[1] ? MULT_MATCH : SINGLE_MATCH, "e_char); #else if (what_to_do == TAB) { if (*matches[0]) insert_match (matches[0], start, matches[1] ? MULT_MATCH : SINGLE_MATCH, "e_char); } else if (*matches[0] && matches[1] == 0) /* should we perform the check only if there are multiple matches? */ insert_match (matches[0], start, matches[1] ? MULT_MATCH : SINGLE_MATCH, "e_char); else if (*matches[0]) /* what_to_do != TAB && multiple matches */ { mlen = *matches[0] ? strlen (matches[0]) : 0; if (mlen >= tlen) insert_match (matches[0], start, matches[1] ? MULT_MATCH : SINGLE_MATCH, "e_char); } #endif /* If there are more matches, ring the bell to indicate. If we are in vi mode, Posix.2 says to not ring the bell. If the `show-all-if-ambiguous' variable is set, display all the matches immediately. Otherwise, if this was the only match, and we are hacking files, check the file to see if it was a directory. If so, and the `mark-directories' variable is set, add a '/' to the name. If not, and we are at the end of the line, then add a space. */ if (matches[1]) { if (what_to_do == '!') { display_matches (matches); break; } else if (what_to_do == '@') { if (nontrivial_lcd == 0) display_matches (matches); break; } else if (rl_editing_mode != vi_mode) rl_ding (); /* There are other matches remaining. */ } else append_to_match (matches[0], delimiter, quote_char, nontrivial_lcd); break; case '*': insert_all_matches (matches, start, "e_char); break; case '?': display_matches (matches); break; default: _rl_ttymsg ("bad value %d for what_to_do in rl_complete", what_to_do); rl_ding (); FREE (saved_line_buffer); RL_UNSETSTATE(RL_STATE_COMPLETING); _rl_reset_completion_state (); return 1; } _rl_free_match_list (matches); /* Check to see if the line has changed through all of this manipulation. */ if (saved_line_buffer) { completion_changed_buffer = strcmp (rl_line_buffer, saved_line_buffer) != 0; xfree (saved_line_buffer); } RL_UNSETSTATE(RL_STATE_COMPLETING); _rl_reset_completion_state (); return 0; } /***************************************************************/ /* */ /* Application-callable completion match generator functions */ /* */ /***************************************************************/ /* Return an array of (char *) which is a list of completions for TEXT. If there are no completions, return a NULL pointer. The first entry in the returned array is the substitution for TEXT. The remaining entries are the possible completions. The array is terminated with a NULL pointer. ENTRY_FUNCTION is a function of two args, and returns a (char *). The first argument is TEXT. The second is a state argument; it should be zero on the first call, and non-zero on subsequent calls. It returns a NULL pointer to the caller when there are no more matches. */ char ** rl_completion_matches (text, entry_function) const char *text; rl_compentry_func_t *entry_function; { /* Number of slots in match_list. */ int match_list_size; /* The list of matches. */ char **match_list; /* Number of matches actually found. */ int matches; /* Temporary string binder. */ char *string; matches = 0; match_list_size = 10; match_list = (char **)xmalloc ((match_list_size + 1) * sizeof (char *)); match_list[1] = (char *)NULL; _rl_interrupt_immediately++; while (string = (*entry_function) (text, matches)) { if (matches + 1 == match_list_size) match_list = (char **)xrealloc (match_list, ((match_list_size += 10) + 1) * sizeof (char *)); match_list[++matches] = string; match_list[matches + 1] = (char *)NULL; } if (_rl_interrupt_immediately > 0) _rl_interrupt_immediately--; /* If there were any matches, then look through them finding out the lowest common denominator. That then becomes match_list[0]. */ if (matches) compute_lcd_of_matches (match_list, matches, text); else /* There were no matches. */ { xfree (match_list); match_list = (char **)NULL; } return (match_list); } /* A completion function for usernames. TEXT contains a partial username preceded by a random character (usually `~'). */ char * rl_username_completion_function (text, state) const char *text; int state; { #if defined (__WIN32__) || defined (__OPENNT) return (char *)NULL; #else /* !__WIN32__ && !__OPENNT) */ static char *username = (char *)NULL; static struct passwd *entry; static int namelen, first_char, first_char_loc; char *value; if (state == 0) { FREE (username); first_char = *text; first_char_loc = first_char == '~'; username = savestring (&text[first_char_loc]); namelen = strlen (username); setpwent (); } #if defined (HAVE_GETPWENT) while (entry = getpwent ()) { /* Null usernames should result in all users as possible completions. */ if (namelen == 0 || (STREQN (username, entry->pw_name, namelen))) break; } #endif if (entry == 0) { #if defined (HAVE_GETPWENT) endpwent (); #endif return ((char *)NULL); } else { value = (char *)xmalloc (2 + strlen (entry->pw_name)); *value = *text; strcpy (value + first_char_loc, entry->pw_name); if (first_char == '~') rl_filename_completion_desired = 1; return (value); } #endif /* !__WIN32__ && !__OPENNT */ } /* Return non-zero if CONVFN matches FILENAME up to the length of FILENAME (FILENAME_LEN). If _rl_completion_case_fold is set, compare without regard to the alphabetic case of characters. CONVFN is the possibly- converted directory entry; FILENAME is what the user typed. */ static int complete_fncmp (convfn, convlen, filename, filename_len) const char *convfn; int convlen; const char *filename; int filename_len; { register char *s1, *s2; int d, len; /* Otherwise, if these match up to the length of filename, then it is a match. */ if (_rl_completion_case_fold && _rl_completion_case_map) { /* Case-insensitive comparison treating _ and - as equivalent */ if (filename_len == 0) return 1; if (convlen < filename_len) return 0; s1 = (char *)convfn; s2 = (char *)filename; len = filename_len; do { d = _rl_to_lower (*s1) - _rl_to_lower (*s2); /* *s1 == [-_] && *s2 == [-_] */ if ((*s1 == '-' || *s1 == '_') && (*s2 == '-' || *s2 == '_')) d = 0; if (d != 0) return 0; s1++; s2++; /* already checked convlen >= filename_len */ } while (--len != 0); return 1; } else if (_rl_completion_case_fold) { if ((_rl_to_lower (convfn[0]) == _rl_to_lower (filename[0])) && (convlen >= filename_len) && (_rl_strnicmp (filename, convfn, filename_len) == 0)) return 1; } else { if ((convfn[0] == filename[0]) && (convlen >= filename_len) && (strncmp (filename, convfn, filename_len) == 0)) return 1; } return 0; } /* Okay, now we write the entry_function for filename completion. In the general case. Note that completion in the shell is a little different because of all the pathnames that must be followed when looking up the completion for a command. */ char * rl_filename_completion_function (text, state) const char *text; int state; { static DIR *directory = (DIR *)NULL; static char *filename = (char *)NULL; static char *dirname = (char *)NULL; static char *users_dirname = (char *)NULL; static int filename_len; char *temp, *dentry, *convfn; int dirlen, dentlen, convlen; struct dirent *entry; /* If we don't have any state, then do some initialization. */ if (state == 0) { /* If we were interrupted before closing the directory or reading all of its contents, close it. */ if (directory) { closedir (directory); directory = (DIR *)NULL; } FREE (dirname); FREE (filename); FREE (users_dirname); filename = savestring (text); if (*text == 0) text = "."; dirname = savestring (text); temp = strrchr (dirname, '/'); #if defined (__MSDOS__) /* special hack for //X/... */ if (dirname[0] == '/' && dirname[1] == '/' && ISALPHA ((unsigned char)dirname[2]) && dirname[3] == '/') temp = strrchr (dirname + 3, '/'); #endif if (temp) { strcpy (filename, ++temp); *temp = '\0'; } #if defined (__MSDOS__) /* searches from current directory on the drive */ else if (ISALPHA ((unsigned char)dirname[0]) && dirname[1] == ':') { strcpy (filename, dirname + 2); dirname[2] = '\0'; } #endif else { dirname[0] = '.'; dirname[1] = '\0'; } /* We aren't done yet. We also support the "~user" syntax. */ /* Save the version of the directory that the user typed, dequoting it if necessary. */ if (rl_completion_found_quote && rl_filename_dequoting_function) users_dirname = (*rl_filename_dequoting_function) (dirname, rl_completion_quote_character); else users_dirname = savestring (dirname); if (*dirname == '~') { temp = tilde_expand (dirname); xfree (dirname); dirname = temp; } /* We have saved the possibly-dequoted version of the directory name the user typed. Now transform the directory name we're going to pass to opendir(2). The directory rewrite hook modifies only the directory name; the directory completion hook modifies both the directory name passed to opendir(2) and the version the user typed. Both the directory completion and rewrite hooks should perform any necessary dequoting. The hook functions return 1 if they modify the directory name argument. If either hook returns 0, it should not modify the directory name pointer passed as an argument. */ if (rl_directory_rewrite_hook) (*rl_directory_rewrite_hook) (&dirname); else if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&dirname)) { xfree (users_dirname); users_dirname = savestring (dirname); } else if (rl_completion_found_quote && rl_filename_dequoting_function) { /* delete single and double quotes */ xfree (dirname); dirname = savestring (users_dirname); } directory = opendir (dirname); /* Now dequote a non-null filename. */ if (filename && *filename && rl_completion_found_quote && rl_filename_dequoting_function) { /* delete single and double quotes */ temp = (*rl_filename_dequoting_function) (filename, rl_completion_quote_character); xfree (filename); filename = temp; } filename_len = strlen (filename); rl_filename_completion_desired = 1; } /* At this point we should entertain the possibility of hacking wildcarded filenames, like /usr/man/man<WILD>/te<TAB>. If the directory name contains globbing characters, then build an array of directories, and then map over that list while completing. */ /* *** UNIMPLEMENTED *** */ /* Now that we have some state, we can read the directory. */ entry = (struct dirent *)NULL; while (directory && (entry = readdir (directory))) { convfn = dentry = entry->d_name; convlen = dentlen = D_NAMLEN (entry); if (rl_filename_rewrite_hook) { convfn = (*rl_filename_rewrite_hook) (dentry, dentlen); convlen = (convfn == dentry) ? dentlen : strlen (convfn); } /* Special case for no filename. If the user has disabled the `match-hidden-files' variable, skip filenames beginning with `.'. All other entries except "." and ".." match. */ if (filename_len == 0) { if (_rl_match_hidden_files == 0 && HIDDEN_FILE (convfn)) continue; if (convfn[0] != '.' || (convfn[1] && (convfn[1] != '.' || convfn[2]))) break; } else { if (complete_fncmp (convfn, convlen, filename, filename_len)) break; } } if (entry == 0) { if (directory) { closedir (directory); directory = (DIR *)NULL; } if (dirname) { xfree (dirname); dirname = (char *)NULL; } if (filename) { xfree (filename); filename = (char *)NULL; } if (users_dirname) { xfree (users_dirname); users_dirname = (char *)NULL; } return (char *)NULL; } else { /* dirname && (strcmp (dirname, ".") != 0) */ if (dirname && (dirname[0] != '.' || dirname[1])) { if (rl_complete_with_tilde_expansion && *users_dirname == '~') { dirlen = strlen (dirname); temp = (char *)xmalloc (2 + dirlen + D_NAMLEN (entry)); strcpy (temp, dirname); /* Canonicalization cuts off any final slash present. We may need to add it back. */ if (dirname[dirlen - 1] != '/') { temp[dirlen++] = '/'; temp[dirlen] = '\0'; } } else { dirlen = strlen (users_dirname); temp = (char *)xmalloc (2 + dirlen + D_NAMLEN (entry)); strcpy (temp, users_dirname); /* Make sure that temp has a trailing slash here. */ if (users_dirname[dirlen - 1] != '/') temp[dirlen++] = '/'; } strcpy (temp + dirlen, convfn); } else temp = savestring (convfn); if (convfn != dentry) xfree (convfn); return (temp); } } /* An initial implementation of a menu completion function a la tcsh. The first time (if the last readline command was not rl_old_menu_complete), we generate the list of matches. This code is very similar to the code in rl_complete_internal -- there should be a way to combine the two. Then, for each item in the list of matches, we insert the match in an undoable fashion, with the appropriate character appended (this happens on the second and subsequent consecutive calls to rl_old_menu_complete). When we hit the end of the match list, we restore the original unmatched text, ring the bell, and reset the counter to zero. */ int rl_old_menu_complete (count, invoking_key) int count, invoking_key; { rl_compentry_func_t *our_func; int matching_filenames, found_quote; static char *orig_text; static char **matches = (char **)0; static int match_list_index = 0; static int match_list_size = 0; static int orig_start, orig_end; static char quote_char; static int delimiter; /* The first time through, we generate the list of matches and set things up to insert them. */ if (rl_last_func != rl_old_menu_complete) { /* Clean up from previous call, if any. */ FREE (orig_text); if (matches) _rl_free_match_list (matches); match_list_index = match_list_size = 0; matches = (char **)NULL; rl_completion_invoking_key = invoking_key; RL_SETSTATE(RL_STATE_COMPLETING); /* Only the completion entry function can change these. */ set_completion_defaults ('%'); our_func = rl_menu_completion_entry_function; if (our_func == 0) our_func = rl_completion_entry_function ? rl_completion_entry_function : rl_filename_completion_function; /* We now look backwards for the start of a filename/variable word. */ orig_end = rl_point; found_quote = delimiter = 0; quote_char = '\0'; if (rl_point) /* This (possibly) changes rl_point. If it returns a non-zero char, we know we have an open quote. */ quote_char = _rl_find_completion_word (&found_quote, &delimiter); orig_start = rl_point; rl_point = orig_end; orig_text = rl_copy_text (orig_start, orig_end); matches = gen_completion_matches (orig_text, orig_start, orig_end, our_func, found_quote, quote_char); /* If we are matching filenames, the attempted completion function will have set rl_filename_completion_desired to a non-zero value. The basic rl_filename_completion_function does this. */ matching_filenames = rl_filename_completion_desired; if (matches == 0 || postprocess_matches (&matches, matching_filenames) == 0) { rl_ding (); FREE (matches); matches = (char **)0; FREE (orig_text); orig_text = (char *)0; completion_changed_buffer = 0; RL_UNSETSTATE(RL_STATE_COMPLETING); return (0); } RL_UNSETSTATE(RL_STATE_COMPLETING); for (match_list_size = 0; matches[match_list_size]; match_list_size++) ; /* matches[0] is lcd if match_list_size > 1, but the circular buffer code below should take care of it. */ if (match_list_size > 1 && _rl_complete_show_all) display_matches (matches); } /* Now we have the list of matches. Replace the text between rl_line_buffer[orig_start] and rl_line_buffer[rl_point] with matches[match_list_index], and add any necessary closing char. */ if (matches == 0 || match_list_size == 0) { rl_ding (); FREE (matches); matches = (char **)0; completion_changed_buffer = 0; return (0); } match_list_index += count; if (match_list_index < 0) { while (match_list_index < 0) match_list_index += match_list_size; } else match_list_index %= match_list_size; if (match_list_index == 0 && match_list_size > 1) { rl_ding (); insert_match (orig_text, orig_start, MULT_MATCH, "e_char); } else { insert_match (matches[match_list_index], orig_start, SINGLE_MATCH, "e_char); append_to_match (matches[match_list_index], delimiter, quote_char, strcmp (orig_text, matches[match_list_index])); } completion_changed_buffer = 1; return (0); } int rl_menu_complete (count, ignore) int count, ignore; { rl_compentry_func_t *our_func; int matching_filenames, found_quote; static char *orig_text; static char **matches = (char **)0; static int match_list_index = 0; static int match_list_size = 0; static int nontrivial_lcd = 0; static int full_completion = 0; /* set to 1 if menu completion should reinitialize on next call */ static int orig_start, orig_end; static char quote_char; static int delimiter, cstate; /* The first time through, we generate the list of matches and set things up to insert them. */ if ((rl_last_func != rl_menu_complete && rl_last_func != rl_backward_menu_complete) || full_completion) { /* Clean up from previous call, if any. */ FREE (orig_text); if (matches) _rl_free_match_list (matches); match_list_index = match_list_size = 0; matches = (char **)NULL; full_completion = 0; RL_SETSTATE(RL_STATE_COMPLETING); /* Only the completion entry function can change these. */ set_completion_defaults ('%'); our_func = rl_menu_completion_entry_function; if (our_func == 0) our_func = rl_completion_entry_function ? rl_completion_entry_function : rl_filename_completion_function; /* We now look backwards for the start of a filename/variable word. */ orig_end = rl_point; found_quote = delimiter = 0; quote_char = '\0'; if (rl_point) /* This (possibly) changes rl_point. If it returns a non-zero char, we know we have an open quote. */ quote_char = _rl_find_completion_word (&found_quote, &delimiter); orig_start = rl_point; rl_point = orig_end; orig_text = rl_copy_text (orig_start, orig_end); matches = gen_completion_matches (orig_text, orig_start, orig_end, our_func, found_quote, quote_char); nontrivial_lcd = matches && strcmp (orig_text, matches[0]) != 0; /* If we are matching filenames, the attempted completion function will have set rl_filename_completion_desired to a non-zero value. The basic rl_filename_completion_function does this. */ matching_filenames = rl_filename_completion_desired; if (matches == 0 || postprocess_matches (&matches, matching_filenames) == 0) { rl_ding (); FREE (matches); matches = (char **)0; FREE (orig_text); orig_text = (char *)0; completion_changed_buffer = 0; RL_UNSETSTATE(RL_STATE_COMPLETING); return (0); } RL_UNSETSTATE(RL_STATE_COMPLETING); for (match_list_size = 0; matches[match_list_size]; match_list_size++) ; if (match_list_size == 0) { rl_ding (); FREE (matches); matches = (char **)0; match_list_index = 0; completion_changed_buffer = 0; return (0); } /* matches[0] is lcd if match_list_size > 1, but the circular buffer code below should take care of it. */ if (*matches[0]) { insert_match (matches[0], orig_start, matches[1] ? MULT_MATCH : SINGLE_MATCH, "e_char); orig_end = orig_start + strlen (matches[0]); completion_changed_buffer = STREQ (orig_text, matches[0]) == 0; } if (match_list_size > 1 && _rl_complete_show_all) { display_matches (matches); /* If there are so many matches that the user has to be asked whether or not he wants to see the matches, menu completion is unwieldy. */ if (rl_completion_query_items > 0 && match_list_size >= rl_completion_query_items) { rl_ding (); FREE (matches); matches = (char **)0; full_completion = 1; return (0); } } else if (match_list_size <= 1) { append_to_match (matches[0], delimiter, quote_char, nontrivial_lcd); full_completion = 1; return (0); } else if (_rl_menu_complete_prefix_first && match_list_size > 1) { rl_ding (); return (0); } } /* Now we have the list of matches. Replace the text between rl_line_buffer[orig_start] and rl_line_buffer[rl_point] with matches[match_list_index], and add any necessary closing char. */ if (matches == 0 || match_list_size == 0) { rl_ding (); FREE (matches); matches = (char **)0; completion_changed_buffer = 0; return (0); } match_list_index += count; if (match_list_index < 0) { while (match_list_index < 0) match_list_index += match_list_size; } else match_list_index %= match_list_size; if (match_list_index == 0 && match_list_size > 1) { rl_ding (); insert_match (matches[0], orig_start, MULT_MATCH, "e_char); } else { insert_match (matches[match_list_index], orig_start, SINGLE_MATCH, "e_char); append_to_match (matches[match_list_index], delimiter, quote_char, strcmp (orig_text, matches[match_list_index])); } completion_changed_buffer = 1; return (0); } int rl_backward_menu_complete (count, key) int count, key; { /* Positive arguments to backward-menu-complete translate into negative arguments for menu-complete, and vice versa. */ return (rl_menu_complete (-count, key)); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/nls.c������������������������������������������������������������������������0000644�0001750�0001750�00000013712�12250770610�014612� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* nls.c -- skeletal internationalization code. */ /* Copyright (C) 1996-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include <config.h> #endif #include <sys/types.h> #include <stdio.h> #if defined (HAVE_UNISTD_H) # include <unistd.h> #endif /* HAVE_UNISTD_H */ #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #if defined (HAVE_LOCALE_H) # include <locale.h> #endif #include <ctype.h> #include "rldefs.h" #include "readline.h" #include "rlshell.h" #include "rlprivate.h" #if !defined (HAVE_SETLOCALE) /* A list of legal values for the LANG or LC_CTYPE environment variables. If a locale name in this list is the value for the LC_ALL, LC_CTYPE, or LANG environment variable (using the first of those with a value), readline eight-bit mode is enabled. */ static char *legal_lang_values[] = { "iso88591", "iso88592", "iso88593", "iso88594", "iso88595", "iso88596", "iso88597", "iso88598", "iso88599", "iso885910", "koi8r", 0 }; static char *normalize_codeset PARAMS((char *)); static char *find_codeset PARAMS((char *, size_t *)); #endif /* !HAVE_SETLOCALE */ static char *_rl_get_locale_var PARAMS((const char *)); static char * _rl_get_locale_var (v) const char *v; { char *lspec; lspec = sh_get_env_value ("LC_ALL"); if (lspec == 0 || *lspec == 0) lspec = sh_get_env_value (v); if (lspec == 0 || *lspec == 0) lspec = sh_get_env_value ("LANG"); return lspec; } /* Check for LC_ALL, LC_CTYPE, and LANG and use the first with a value to decide the defaults for 8-bit character input and output. Returns 1 if we set eight-bit mode. */ int _rl_init_eightbit () { /* If we have setlocale(3), just check the current LC_CTYPE category value, and go into eight-bit mode if it's not C or POSIX. */ #if defined (HAVE_SETLOCALE) char *lspec, *t; /* Set the LC_CTYPE locale category from environment variables. */ lspec = _rl_get_locale_var ("LC_CTYPE"); /* Since _rl_get_locale_var queries the right environment variables, we query the current locale settings with setlocale(), and, if that doesn't return anything, we set lspec to the empty string to force the subsequent call to setlocale() to define the `native' environment. */ if (lspec == 0 || *lspec == 0) lspec = setlocale (LC_CTYPE, (char *)NULL); if (lspec == 0) lspec = ""; t = setlocale (LC_CTYPE, lspec); if (t && *t && (t[0] != 'C' || t[1]) && (STREQ (t, "POSIX") == 0)) { _rl_meta_flag = 1; _rl_convert_meta_chars_to_ascii = 0; _rl_output_meta_chars = 1; return (1); } else return (0); #else /* !HAVE_SETLOCALE */ char *lspec, *t; int i; /* We don't have setlocale. Finesse it. Check the environment for the appropriate variables and set eight-bit mode if they have the right values. */ lspec = _rl_get_locale_var ("LC_CTYPE"); if (lspec == 0 || (t = normalize_codeset (lspec)) == 0) return (0); for (i = 0; t && legal_lang_values[i]; i++) if (STREQ (t, legal_lang_values[i])) { _rl_meta_flag = 1; _rl_convert_meta_chars_to_ascii = 0; _rl_output_meta_chars = 1; break; } xfree (t); return (legal_lang_values[i] ? 1 : 0); #endif /* !HAVE_SETLOCALE */ } #if !defined (HAVE_SETLOCALE) static char * normalize_codeset (codeset) char *codeset; { size_t namelen, i; int len, all_digits; char *wp, *retval; codeset = find_codeset (codeset, &namelen); if (codeset == 0) return (codeset); all_digits = 1; for (len = 0, i = 0; i < namelen; i++) { if (ISALNUM ((unsigned char)codeset[i])) { len++; all_digits &= _rl_digit_p (codeset[i]); } } retval = (char *)malloc ((all_digits ? 3 : 0) + len + 1); if (retval == 0) return ((char *)0); wp = retval; /* Add `iso' to beginning of an all-digit codeset */ if (all_digits) { *wp++ = 'i'; *wp++ = 's'; *wp++ = 'o'; } for (i = 0; i < namelen; i++) if (ISALPHA ((unsigned char)codeset[i])) *wp++ = _rl_to_lower (codeset[i]); else if (_rl_digit_p (codeset[i])) *wp++ = codeset[i]; *wp = '\0'; return retval; } /* Isolate codeset portion of locale specification. */ static char * find_codeset (name, lenp) char *name; size_t *lenp; { char *cp, *language, *result; cp = language = name; result = (char *)0; while (*cp && *cp != '_' && *cp != '@' && *cp != '+' && *cp != ',') cp++; /* This does not make sense: language has to be specified. As an exception we allow the variable to contain only the codeset name. Perhaps there are funny codeset names. */ if (language == cp) { *lenp = strlen (language); result = language; } else { /* Next is the territory. */ if (*cp == '_') do ++cp; while (*cp && *cp != '.' && *cp != '@' && *cp != '+' && *cp != ',' && *cp != '_'); /* Now, finally, is the codeset. */ result = cp; if (*cp == '.') do ++cp; while (*cp && *cp != '@'); if (cp - result > 2) { result++; *lenp = cp - result; } else { *lenp = strlen (language); result = language; } } return result; } #endif /* !HAVE_SETLOCALE */ ������������������������������������������������������gdb-doc-7.6.2/readline/vi_mode.c��������������������������������������������������������������������0000644�0001750�0001750�00000130163�12250770610�015440� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* vi_mode.c -- A vi emulation mode for Bash. Derived from code written by Jeff Sparkes (jsparkes@bnr.ca). */ /* Copyright (C) 1987-2010 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see <http://www.gnu.org/licenses/>. */ #define READLINE_LIBRARY /* **************************************************************** */ /* */ /* VI Emulation Mode */ /* */ /* **************************************************************** */ #include "rlconf.h" #if defined (VI_MODE) #if defined (HAVE_CONFIG_H) # include <config.h> #endif #include <sys/types.h> #if defined (HAVE_STDLIB_H) # include <stdlib.h> #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #if defined (HAVE_UNISTD_H) # include <unistd.h> #endif #include <stdio.h> /* Some standard library routines. */ #include "rldefs.h" #include "rlmbutil.h" #include "readline.h" #include "history.h" #include "rlprivate.h" #include "xmalloc.h" #ifndef member #define member(c, s) ((c) ? (char *)strchr ((s), (c)) != (char *)NULL : 0) #endif int _rl_vi_last_command = 'i'; /* default `.' puts you in insert mode */ _rl_vimotion_cxt *_rl_vimvcxt = 0; /* Non-zero means enter insertion mode. */ static int _rl_vi_doing_insert; /* Command keys which do movement for xxx_to commands. */ static const char * const vi_motion = " hl^$0ftFT;,%wbeWBE|`"; /* Keymap used for vi replace characters. Created dynamically since rarely used. */ static Keymap vi_replace_map; /* The number of characters inserted in the last replace operation. */ static int vi_replace_count; /* If non-zero, we have text inserted after a c[motion] command that put us implicitly into insert mode. Some people want this text to be attached to the command so that it is `redoable' with `.'. */ static int vi_continued_command; static char *vi_insert_buffer; static int vi_insert_buffer_size; static int _rl_vi_last_repeat = 1; static int _rl_vi_last_arg_sign = 1; static int _rl_vi_last_motion; #if defined (HANDLE_MULTIBYTE) static char _rl_vi_last_search_mbchar[MB_LEN_MAX]; static int _rl_vi_last_search_mblen; #else static int _rl_vi_last_search_char; #endif static int _rl_vi_last_replacement; static int _rl_vi_last_key_before_insert; static int vi_redoing; /* Text modification commands. These are the `redoable' commands. */ static const char * const vi_textmod = "_*\\AaIiCcDdPpYyRrSsXx~"; /* Arrays for the saved marks. */ static int vi_mark_chars['z' - 'a' + 1]; static void _rl_vi_stuff_insert PARAMS((int)); static void _rl_vi_save_insert PARAMS((UNDO_LIST *)); static void _rl_vi_backup PARAMS((void)); static int _rl_vi_arg_dispatch PARAMS((int)); static int rl_digit_loop1 PARAMS((void)); static int _rl_vi_set_mark PARAMS((void)); static int _rl_vi_goto_mark PARAMS((void)); static void _rl_vi_append_forward PARAMS((int)); static int _rl_vi_callback_getchar PARAMS((char *, int)); #if defined (READLINE_CALLBACKS) static int _rl_vi_callback_set_mark PARAMS((_rl_callback_generic_arg *)); static int _rl_vi_callback_goto_mark PARAMS((_rl_callback_generic_arg *)); static int _rl_vi_callback_change_char PARAMS((_rl_callback_generic_arg *)); static int _rl_vi_callback_char_search PARAMS((_rl_callback_generic_arg *)); #endif static int rl_domove_read_callback PARAMS((_rl_vimotion_cxt *)); static int rl_domove_motion_callback PARAMS((_rl_vimotion_cxt *)); static int rl_vi_domove_getchar PARAMS((_rl_vimotion_cxt *)); static int vi_change_dispatch PARAMS((_rl_vimotion_cxt *)); static int vi_delete_dispatch PARAMS((_rl_vimotion_cxt *)); static int vi_yank_dispatch PARAMS((_rl_vimotion_cxt *)); static int vidomove_dispatch PARAMS((_rl_vimotion_cxt *)); void _rl_vi_initialize_line () { register int i, n; n = sizeof (vi_mark_chars) / sizeof (vi_mark_chars[0]); for (i = 0; i < n; i++) vi_mark_chars[i] = -1; RL_UNSETSTATE(RL_STATE_VICMDONCE); } void _rl_vi_reset_last () { _rl_vi_last_command = 'i'; _rl_vi_last_repeat = 1; _rl_vi_last_arg_sign = 1; _rl_vi_last_motion = 0; } void _rl_vi_set_last (key, repeat, sign) int key, repeat, sign; { _rl_vi_last_command = key; _rl_vi_last_repeat = repeat; _rl_vi_last_arg_sign = sign; } /* A convenience function that calls _rl_vi_set_last to save the last command information and enters insertion mode. */ void rl_vi_start_inserting (key, repeat, sign) int key, repeat, sign; { _rl_vi_set_last (key, repeat, sign); rl_vi_insertion_mode (1, key); } /* Is the command C a VI mode text modification command? */ int _rl_vi_textmod_command (c) int c; { return (member (c, vi_textmod)); } static void _rl_vi_stuff_insert (count) int count; { rl_begin_undo_group (); while (count--) rl_insert_text (vi_insert_buffer); rl_end_undo_group (); } /* Bound to `.'. Called from command mode, so we know that we have to redo a text modification command. The default for _rl_vi_last_command puts you back into insert mode. */ int rl_vi_redo (count, c) int count, c; { int r; if (!rl_explicit_arg) { rl_numeric_arg = _rl_vi_last_repeat; rl_arg_sign = _rl_vi_last_arg_sign; } r = 0; vi_redoing = 1; /* If we're redoing an insert with `i', stuff in the inserted text and do not go into insertion mode. */ if (_rl_vi_last_command == 'i' && vi_insert_buffer && *vi_insert_buffer) { _rl_vi_stuff_insert (count); /* And back up point over the last character inserted. */ if (rl_point > 0) _rl_vi_backup (); } /* Ditto for redoing an insert with `I', but move to the beginning of the line like the `I' command does. */ else if (_rl_vi_last_command == 'I' && vi_insert_buffer && *vi_insert_buffer) { rl_beg_of_line (1, 'I'); _rl_vi_stuff_insert (count); if (rl_point > 0) _rl_vi_backup (); } /* Ditto for redoing an insert with `a', but move forward a character first like the `a' command does. */ else if (_rl_vi_last_command == 'a' && vi_insert_buffer && *vi_insert_buffer) { _rl_vi_append_forward ('a'); _rl_vi_stuff_insert (count); if (rl_point > 0) _rl_vi_backup (); } /* Ditto for redoing an insert with `A', but move to the end of the line like the `A' command does. */ else if (_rl_vi_last_command == 'A' && vi_insert_buffer && *vi_insert_buffer) { rl_end_of_line (1, 'A'); _rl_vi_stuff_insert (count); if (rl_point > 0) _rl_vi_backup (); } else r = _rl_dispatch (_rl_vi_last_command, _rl_keymap); vi_redoing = 0; return (r); } /* A placeholder for further expansion. */ int rl_vi_undo (count, key) int count, key; { return (rl_undo_command (count, key)); } /* Yank the nth arg from the previous line into this line at point. */ int rl_vi_yank_arg (count, key) int count, key; { /* Readline thinks that the first word on a line is the 0th, while vi thinks the first word on a line is the 1st. Compensate. */ if (rl_explicit_arg) rl_yank_nth_arg (count - 1, 0); else rl_yank_nth_arg ('$', 0); return (0); } /* With an argument, move back that many history lines, else move to the beginning of history. */ int rl_vi_fetch_history (count, c) int count, c; { int wanted; /* Giving an argument of n means we want the nth command in the history file. The command number is interpreted the same way that the bash `history' command does it -- that is, giving an argument count of 450 to this command would get the command listed as number 450 in the output of `history'. */ if (rl_explicit_arg) { wanted = history_base + where_history () - count; if (wanted <= 0) rl_beginning_of_history (0, 0); else rl_get_previous_history (wanted, c); } else rl_beginning_of_history (count, 0); return (0); } /* Search again for the last thing searched for. */ int rl_vi_search_again (count, key) int count, key; { switch (key) { case 'n': rl_noninc_reverse_search_again (count, key); break; case 'N': rl_noninc_forward_search_again (count, key); break; } return (0); } /* Do a vi style search. */ int rl_vi_search (count, key) int count, key; { switch (key) { case '?': _rl_free_saved_history_line (); rl_noninc_forward_search (count, key); break; case '/': _rl_free_saved_history_line (); rl_noninc_reverse_search (count, key); break; default: rl_ding (); break; } return (0); } /* Completion, from vi's point of view. */ int rl_vi_complete (ignore, key) int ignore, key; { if ((rl_point < rl_end) && (!whitespace (rl_line_buffer[rl_point]))) { if (!whitespace (rl_line_buffer[rl_point + 1])) rl_vi_end_word (1, 'E'); rl_point++; } if (key == '*') rl_complete_internal ('*'); /* Expansion and replacement. */ else if (key == '=') rl_complete_internal ('?'); /* List possible completions. */ else if (key == '\\') rl_complete_internal (TAB); /* Standard Readline completion. */ else rl_complete (0, key); if (key == '*' || key == '\\') rl_vi_start_inserting (key, 1, rl_arg_sign); return (0); } /* Tilde expansion for vi mode. */ int rl_vi_tilde_expand (ignore, key) int ignore, key; { rl_tilde_expand (0, key); rl_vi_start_inserting (key, 1, rl_arg_sign); return (0); } /* Previous word in vi mode. */ int rl_vi_prev_word (count, key) int count, key; { if (count < 0) return (rl_vi_next_word (-count, key)); if (rl_point == 0) { rl_ding (); return (0); } if (_rl_uppercase_p (key)) rl_vi_bWord (count, key); else rl_vi_bword (count, key); return (0); } /* Next word in vi mode. */ int rl_vi_next_word (count, key) int count, key; { if (count < 0) return (rl_vi_prev_word (-count, key)); if (rl_point >= (rl_end - 1)) { rl_ding (); return (0); } if (_rl_uppercase_p (key)) rl_vi_fWord (count, key); else rl_vi_fword (count, key); return (0); } /* Move to the end of the ?next? word. */ int rl_vi_end_word (count, key) int count, key; { if (count < 0) { rl_ding (); return -1; } if (_rl_uppercase_p (key)) rl_vi_eWord (count, key); else rl_vi_eword (count, key); return (0); } /* Move forward a word the way that 'W' does. */ int rl_vi_fWord (count, ignore) int count, ignore; { while (count-- && rl_point < (rl_end - 1)) { /* Skip until whitespace. */ while (!whitespace (rl_line_buffer[rl_point]) && rl_point < rl_end) rl_point++; /* Now skip whitespace. */ while (whitespace (rl_line_buffer[rl_point]) && rl_point < rl_end) rl_point++; } return (0); } int rl_vi_bWord (count, ignore) int count, ignore; { while (count-- && rl_point > 0) { /* If we are at the start of a word, move back to whitespace so we will go back to the start of the previous word. */ if (!whitespace (rl_line_buffer[rl_point]) && whitespace (rl_line_buffer[rl_point - 1])) rl_point--; while (rl_point > 0 && whitespace (rl_line_buffer[rl_point])) rl_point--; if (rl_point > 0) { while (--rl_point >= 0 && !whitespace (rl_line_buffer[rl_point])); rl_point++; } } return (0); } int rl_vi_eWord (count, ignore) int count, ignore; { while (count-- && rl_point < (rl_end - 1)) { if (!whitespace (rl_line_buffer[rl_point])) rl_point++; /* Move to the next non-whitespace character (to the start of the next word). */ while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point])) rl_point++; if (rl_point && rl_point < rl_end) { /* Skip whitespace. */ while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point])) rl_point++; /* Skip until whitespace. */ while (rl_point < rl_end && !whitespace (rl_line_buffer[rl_point])) rl_point++; /* Move back to the last character of the word. */ rl_point--; } } return (0); } int rl_vi_fword (count, ignore) int count, ignore; { while (count-- && rl_point < (rl_end - 1)) { /* Move to white space (really non-identifer). */ if (_rl_isident (rl_line_buffer[rl_point])) { while (_rl_isident (rl_line_buffer[rl_point]) && rl_point < rl_end) rl_point++; } else /* if (!whitespace (rl_line_buffer[rl_point])) */ { while (!_rl_isident (rl_line_buffer[rl_point]) && !whitespace (rl_line_buffer[rl_point]) && rl_point < rl_end) rl_point++; } /* Move past whitespace. */ while (whitespace (rl_line_buffer[rl_point]) && rl_point < rl_end) rl_point++; } return (0); } int rl_vi_bword (count, ignore) int count, ignore; { while (count-- && rl_point > 0) { int last_is_ident; /* If we are at the start of a word, move back to whitespace so we will go back to the start of the previous word. */ if (!whitespace (rl_line_buffer[rl_point]) && whitespace (rl_line_buffer[rl_point - 1])) rl_point--; /* If this character and the previous character are `opposite', move back so we don't get messed up by the rl_point++ down there in the while loop. Without this code, words like `l;' screw up the function. */ last_is_ident = _rl_isident (rl_line_buffer[rl_point - 1]); if ((_rl_isident (rl_line_buffer[rl_point]) && !last_is_ident) || (!_rl_isident (rl_line_buffer[rl_point]) && last_is_ident)) rl_point--; while (rl_point > 0 && whitespace (rl_line_buffer[rl_point])) rl_point--; if (rl_point > 0) { if (_rl_isident (rl_line_buffer[rl_point])) while (--rl_point >= 0 && _rl_isident (rl_line_buffer[rl_point])); else while (--rl_point >= 0 && !_rl_isident (rl_line_buffer[rl_point]) && !whitespace (rl_line_buffer[rl_point])); rl_point++; } } return (0); } int rl_vi_eword (count, ignore) int count, ignore; { while (count-- && rl_point < rl_end - 1) { if (!whitespace (rl_line_buffer[rl_point])) rl_point++; while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point])) rl_point++; if (rl_point < rl_end) { if (_rl_isident (rl_line_buffer[rl_point])) while (++rl_point < rl_end && _rl_isident (rl_line_buffer[rl_point])); else while (++rl_point < rl_end && !_rl_isident (rl_line_buffer[rl_point]) && !whitespace (rl_line_buffer[rl_point])); } rl_point--; } return (0); } int rl_vi_insert_beg (count, key) int count, key; { rl_beg_of_line (1, key); rl_vi_insert_mode (1, key); return (0); } static void _rl_vi_append_forward (key) int key; { int point; if (rl_point < rl_end) { if (MB_CUR_MAX == 1 || rl_byte_oriented) rl_point++; else { point = rl_point; #if 0 rl_forward_char (1, key); #else rl_point = _rl_forward_char_internal (1); #endif if (point == rl_point) rl_point = rl_end; } } } int rl_vi_append_mode (count, key) int count, key; { _rl_vi_append_forward (key); rl_vi_start_inserting (key, 1, rl_arg_sign); return (0); } int rl_vi_append_eol (count, key) int count, key; { rl_end_of_line (1, key); rl_vi_append_mode (1, key); return (0); } /* What to do in the case of C-d. */ int rl_vi_eof_maybe (count, c) int count, c; { return (rl_newline (1, '\n')); } /* Insertion mode stuff. */ /* Switching from one mode to the other really just involves switching keymaps. */ int rl_vi_insertion_mode (count, key) int count, key; { _rl_keymap = vi_insertion_keymap; _rl_vi_last_key_before_insert = key; return (0); } int rl_vi_insert_mode (count, key) int count, key; { rl_vi_start_inserting (key, 1, rl_arg_sign); return (0); } static void _rl_vi_save_insert (up) UNDO_LIST *up; { int len, start, end; if (up == 0 || up->what != UNDO_INSERT) { if (vi_insert_buffer_size >= 1) vi_insert_buffer[0] = '\0'; return; } start = up->start; end = up->end; len = end - start + 1; if (len >= vi_insert_buffer_size) { vi_insert_buffer_size += (len + 32) - (len % 32); vi_insert_buffer = (char *)xrealloc (vi_insert_buffer, vi_insert_buffer_size); } strncpy (vi_insert_buffer, rl_line_buffer + start, len - 1); vi_insert_buffer[len-1] = '\0'; } void _rl_vi_done_inserting () { if (_rl_vi_doing_insert) { /* The `C', `s', and `S' commands set this. */ rl_end_undo_group (); /* Now, the text between rl_undo_list->next->start and rl_undo_list->next->end is what was inserted while in insert mode. It gets copied to VI_INSERT_BUFFER because it depends on absolute indices into the line which may change (though they probably will not). */ _rl_vi_doing_insert = 0; _rl_vi_save_insert (rl_undo_list->next); vi_continued_command = 1; } else { if (rl_undo_list && (_rl_vi_last_key_before_insert == 'i' || _rl_vi_last_key_before_insert == 'a' || _rl_vi_last_key_before_insert == 'I' || _rl_vi_last_key_before_insert == 'A')) _rl_vi_save_insert (rl_undo_list); /* XXX - Other keys probably need to be checked. */ else if (_rl_vi_last_key_before_insert == 'C') rl_end_undo_group (); while (_rl_undo_group_level > 0) rl_end_undo_group (); vi_continued_command = 0; } } int rl_vi_movement_mode (count, key) int count, key; { if (rl_point > 0) rl_backward_char (1, key); _rl_keymap = vi_movement_keymap; _rl_vi_done_inserting (); /* This is how POSIX.2 says `U' should behave -- everything up until the first time you go into command mode should not be undone. */ if (RL_ISSTATE (RL_STATE_VICMDONCE) == 0) rl_free_undo_list (); RL_SETSTATE (RL_STATE_VICMDONCE); return (0); } int rl_vi_arg_digit (count, c) int count, c; { if (c == '0' && rl_numeric_arg == 1 && !rl_explicit_arg) return (rl_beg_of_line (1, c)); else return (rl_digit_argument (count, c)); } /* Change the case of the next COUNT characters. */ #if defined (HANDLE_MULTIBYTE) static int _rl_vi_change_mbchar_case (count) int count; { wchar_t wc; char mb[MB_LEN_MAX+1]; int mlen, p; size_t m; mbstate_t ps; memset (&ps, 0, sizeof (mbstate_t)); if (_rl_adjust_point (rl_line_buffer, rl_point, &ps) > 0) count--; while (count-- && rl_point < rl_end) { m = mbrtowc (&wc, rl_line_buffer + rl_point, rl_end - rl_point, &ps); if (MB_INVALIDCH (m)) wc = (wchar_t)rl_line_buffer[rl_point]; else if (MB_NULLWCH (m)) wc = L'\0'; if (iswupper (wc)) wc = towlower (wc); else if (iswlower (wc)) wc = towupper (wc); else { /* Just skip over chars neither upper nor lower case */ rl_forward_char (1, 0); continue; } /* Vi is kind of strange here. */ if (wc) { p = rl_point; mlen = wcrtomb (mb, wc, &ps); if (mlen >= 0) mb[mlen] = '\0'; rl_begin_undo_group (); rl_vi_delete (1, 0); if (rl_point < p) /* Did we retreat at EOL? */ rl_point++; /* XXX - should we advance more than 1 for mbchar? */ rl_insert_text (mb); rl_end_undo_group (); rl_vi_check (); } else rl_forward_char (1, 0); } return 0; } #endif int rl_vi_change_case (count, ignore) int count, ignore; { int c, p; /* Don't try this on an empty line. */ if (rl_point >= rl_end) return (0); c = 0; #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) return (_rl_vi_change_mbchar_case (count)); #endif while (count-- && rl_point < rl_end) { if (_rl_uppercase_p (rl_line_buffer[rl_point])) c = _rl_to_lower (rl_line_buffer[rl_point]); else if (_rl_lowercase_p (rl_line_buffer[rl_point])) c = _rl_to_upper (rl_line_buffer[rl_point]); else { /* Just skip over characters neither upper nor lower case. */ rl_forward_char (1, c); continue; } /* Vi is kind of strange here. */ if (c) { p = rl_point; rl_begin_undo_group (); rl_vi_delete (1, c); if (rl_point < p) /* Did we retreat at EOL? */ rl_point++; _rl_insert_char (1, c); rl_end_undo_group (); rl_vi_check (); } else rl_forward_char (1, c); } return (0); } int rl_vi_put (count, key) int count, key; { if (!_rl_uppercase_p (key) && (rl_point + 1 <= rl_end)) rl_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); while (count--) rl_yank (1, key); rl_backward_char (1, key); return (0); } static void _rl_vi_backup () { if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO); else rl_point--; } int rl_vi_check () { if (rl_point && rl_point == rl_end) { if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO); else rl_point--; } return (0); } int rl_vi_column (count, key) int count, key; { if (count > rl_end) rl_end_of_line (1, key); else rl_point = count - 1; return (0); } /* Process C as part of the current numeric argument. Return -1 if the argument should be aborted, 0 if we should not read any more chars, and 1 if we should continue to read chars. */ static int _rl_vi_arg_dispatch (c) int c; { int key; key = c; if (c >= 0 && _rl_keymap[c].type == ISFUNC && _rl_keymap[c].function == rl_universal_argument) { rl_numeric_arg *= 4; return 1; } c = UNMETA (c); if (_rl_digit_p (c)) { if (rl_explicit_arg) rl_numeric_arg = (rl_numeric_arg * 10) + _rl_digit_value (c); else rl_numeric_arg = _rl_digit_value (c); rl_explicit_arg = 1; return 1; /* keep going */ } else { rl_clear_message (); rl_stuff_char (key); return 0; /* done */ } } /* A simplified loop for vi. Don't dispatch key at end. Don't recognize minus sign? Should this do rl_save_prompt/rl_restore_prompt? */ static int rl_digit_loop1 () { int c, r; while (1) { if (_rl_arg_overflow ()) return 1; c = _rl_arg_getchar (); r = _rl_vi_arg_dispatch (c); if (r <= 0) break; } RL_UNSETSTATE(RL_STATE_NUMERICARG); return (0); } static void _rl_mvcxt_init (m, op, key) _rl_vimotion_cxt *m; int op, key; { m->op = op; m->state = m->flags = 0; m->ncxt = 0; m->numeric_arg = -1; m->start = rl_point; m->end = rl_end; m->key = key; m->motion = -1; } static _rl_vimotion_cxt * _rl_mvcxt_alloc (op, key) int op, key; { _rl_vimotion_cxt *m; m = xmalloc (sizeof (_rl_vimotion_cxt)); _rl_mvcxt_init (m, op, key); return m; } static void _rl_mvcxt_dispose (m) _rl_vimotion_cxt *m; { xfree (m); } static int rl_domove_motion_callback (m) _rl_vimotion_cxt *m; { int c, save, r; int old_end; _rl_vi_last_motion = c = m->motion; /* Append a blank character temporarily so that the motion routines work right at the end of the line. */ old_end = rl_end; rl_line_buffer[rl_end++] = ' '; rl_line_buffer[rl_end] = '\0'; _rl_dispatch (c, _rl_keymap); /* Remove the blank that we added. */ rl_end = old_end; rl_line_buffer[rl_end] = '\0'; if (rl_point > rl_end) rl_point = rl_end; /* No change in position means the command failed. */ if (rl_mark == rl_point) return (-1); /* rl_vi_f[wW]ord () leaves the cursor on the first character of the next word. If we are not at the end of the line, and we are on a non-whitespace character, move back one (presumably to whitespace). */ if ((_rl_to_upper (c) == 'W') && rl_point < rl_end && rl_point > rl_mark && !whitespace (rl_line_buffer[rl_point])) rl_point--; /* If cw or cW, back up to the end of a word, so the behaviour of ce or cE is the actual result. Brute-force, no subtlety. */ if (m->key == 'c' && rl_point >= rl_mark && (_rl_to_upper (c) == 'W')) { /* Don't move farther back than where we started. */ while (rl_point > rl_mark && whitespace (rl_line_buffer[rl_point])) rl_point--; /* Posix.2 says that if cw or cW moves the cursor towards the end of the line, the character under the cursor should be deleted. */ if (rl_point == rl_mark) rl_point++; else { /* Move past the end of the word so that the kill doesn't remove the last letter of the previous word. Only do this if we are not at the end of the line. */ if (rl_point >= 0 && rl_point < (rl_end - 1) && !whitespace (rl_line_buffer[rl_point])) rl_point++; } } if (rl_mark < rl_point) SWAP (rl_point, rl_mark); #if defined (READLINE_CALLBACKS) if (RL_ISSTATE (RL_STATE_CALLBACK)) (*rl_redisplay_function)(); /* make sure motion is displayed */ #endif r = vidomove_dispatch (m); return (r); } #define RL_VIMOVENUMARG() (RL_ISSTATE (RL_STATE_VIMOTION) && RL_ISSTATE (RL_STATE_NUMERICARG)) static int rl_domove_read_callback (m) _rl_vimotion_cxt *m; { int c, save; c = m->motion; if (member (c, vi_motion)) { #if defined (READLINE_CALLBACKS) /* If we just read a vi-mode motion command numeric argument, turn off the `reading numeric arg' state */ if (RL_ISSTATE (RL_STATE_CALLBACK) && RL_VIMOVENUMARG()) RL_UNSETSTATE (RL_STATE_NUMERICARG); #endif /* Should do everything, including turning off RL_STATE_VIMOTION */ return (rl_domove_motion_callback (m)); } else if (m->key == c && (m->key == 'd' || m->key == 'y' || m->key == 'c')) { rl_mark = rl_end; rl_beg_of_line (1, c); _rl_vi_last_motion = c; RL_UNSETSTATE (RL_STATE_VIMOTION); return (vidomove_dispatch (m)); } #if defined (READLINE_CALLBACKS) /* XXX - these need to handle rl_universal_argument bindings */ /* Reading vi motion char continuing numeric argument */ else if (_rl_digit_p (c) && RL_ISSTATE (RL_STATE_CALLBACK) && RL_VIMOVENUMARG()) { return (_rl_vi_arg_dispatch (c)); } /* Readine vi motion char starting numeric argument */ else if (_rl_digit_p (c) && RL_ISSTATE (RL_STATE_CALLBACK) && RL_ISSTATE (RL_STATE_VIMOTION) && (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)) { RL_SETSTATE (RL_STATE_NUMERICARG); return (_rl_vi_arg_dispatch (c)); } #endif else if (_rl_digit_p (c)) { /* This code path taken when not in callback mode */ save = rl_numeric_arg; rl_numeric_arg = _rl_digit_value (c); rl_explicit_arg = 1; RL_SETSTATE (RL_STATE_NUMERICARG); rl_digit_loop1 (); rl_numeric_arg *= save; c = rl_vi_domove_getchar (m); if (c < 0) { m->motion = 0; return -1; } m->motion = c; return (rl_domove_motion_callback (m)); } else { RL_UNSETSTATE (RL_STATE_VIMOTION); RL_UNSETSTATE (RL_STATE_NUMERICARG); return (1); } } static int rl_vi_domove_getchar (m) _rl_vimotion_cxt *m; { int c; RL_SETSTATE(RL_STATE_MOREINPUT); c = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); return c; } #if defined (READLINE_CALLBACKS) int _rl_vi_domove_callback (m) _rl_vimotion_cxt *m; { int c, r; m->motion = c = rl_vi_domove_getchar (m); /* XXX - what to do if this returns -1? Should we return 1 for eof to callback code? */ r = rl_domove_read_callback (m); return ((r == 0) ? r : 1); /* normalize return values */ } #endif /* This code path taken when not in callback mode. */ int rl_vi_domove (x, ignore) int x, *ignore; { int r; _rl_vimotion_cxt *m; m = _rl_vimvcxt; *ignore = m->motion = rl_vi_domove_getchar (m); if (m->motion < 0) { m->motion = 0; return -1; } return (rl_domove_read_callback (m)); } static int vi_delete_dispatch (m) _rl_vimotion_cxt *m; { /* These are the motion commands that do not require adjusting the mark. */ if (((strchr (" l|h^0bBFT`", m->motion) == 0) && (rl_point >= m->start)) && (rl_mark < rl_end)) rl_mark++; rl_kill_text (rl_point, rl_mark); return (0); } int rl_vi_delete_to (count, key) int count, key; { int c, r; _rl_vimvcxt = _rl_mvcxt_alloc (VIM_DELETE, key); _rl_vimvcxt->start = rl_point; rl_mark = rl_point; if (_rl_uppercase_p (key)) { _rl_vimvcxt->motion = '$'; r = rl_domove_motion_callback (_rl_vimvcxt); } else if (vi_redoing) { _rl_vimvcxt->motion = _rl_vi_last_motion; r = rl_domove_motion_callback (_rl_vimvcxt); } #if defined (READLINE_CALLBACKS) else if (RL_ISSTATE (RL_STATE_CALLBACK)) { RL_SETSTATE (RL_STATE_VIMOTION); return (0); } #endif else r = rl_vi_domove (key, &c); if (r < 0) { rl_ding (); r = -1; } _rl_mvcxt_dispose (_rl_vimvcxt); _rl_vimvcxt = 0; return r; } static int vi_change_dispatch (m) _rl_vimotion_cxt *m; { /* These are the motion commands that do not require adjusting the mark. c[wW] are handled by special-case code in rl_vi_domove(), and already leave the mark at the correct location. */ if (((strchr (" l|hwW^0bBFT`", m->motion) == 0) && (rl_point >= m->start)) && (rl_mark < rl_end)) rl_mark++; /* The cursor never moves with c[wW]. */ if ((_rl_to_upper (m->motion) == 'W') && rl_point < m->start) rl_point = m->start; if (vi_redoing) { if (vi_insert_buffer && *vi_insert_buffer) rl_begin_undo_group (); rl_delete_text (rl_point, rl_mark); if (vi_insert_buffer && *vi_insert_buffer) { rl_insert_text (vi_insert_buffer); rl_end_undo_group (); } } else { rl_begin_undo_group (); /* to make the `u' command work */ rl_kill_text (rl_point, rl_mark); /* `C' does not save the text inserted for undoing or redoing. */ if (_rl_uppercase_p (m->key) == 0) _rl_vi_doing_insert = 1; /* XXX -- TODO -- use m->numericarg? */ rl_vi_start_inserting (m->key, rl_numeric_arg, rl_arg_sign); } return (0); } int rl_vi_change_to (count, key) int count, key; { int c, r; _rl_vimvcxt = _rl_mvcxt_alloc (VIM_CHANGE, key); _rl_vimvcxt->start = rl_point; rl_mark = rl_point; if (_rl_uppercase_p (key)) { _rl_vimvcxt->motion = '$'; r = rl_domove_motion_callback (_rl_vimvcxt); } else if (vi_redoing) { _rl_vimvcxt->motion = _rl_vi_last_motion; r = rl_domove_motion_callback (_rl_vimvcxt); } #if defined (READLINE_CALLBACKS) else if (RL_ISSTATE (RL_STATE_CALLBACK)) { RL_SETSTATE (RL_STATE_VIMOTION); return (0); } #endif else r = rl_vi_domove (key, &c); if (r < 0) { rl_ding (); r = -1; /* normalize return value */ } _rl_mvcxt_dispose (_rl_vimvcxt); _rl_vimvcxt = 0; return r; } static int vi_yank_dispatch (m) _rl_vimotion_cxt *m; { /* These are the motion commands that do not require adjusting the mark. */ if (((strchr (" l|h^0%bBFT`", m->motion) == 0) && (rl_point >= m->start)) && (rl_mark < rl_end)) rl_mark++; rl_begin_undo_group (); rl_kill_text (rl_point, rl_mark); rl_end_undo_group (); rl_do_undo (); rl_point = m->start; return (0); } int rl_vi_yank_to (count, key) int count, key; { int c, r; _rl_vimvcxt = _rl_mvcxt_alloc (VIM_YANK, key); _rl_vimvcxt->start = rl_point; rl_mark = rl_point; if (_rl_uppercase_p (key)) { _rl_vimvcxt->motion = '$'; r = rl_domove_motion_callback (_rl_vimvcxt); } #if defined (READLINE_CALLBACKS) else if (RL_ISSTATE (RL_STATE_CALLBACK)) { RL_SETSTATE (RL_STATE_VIMOTION); return (0); } #endif else r = rl_vi_domove (key, &c); if (r < 0) { rl_ding (); r = -1; } _rl_mvcxt_dispose (_rl_vimvcxt); _rl_vimvcxt = 0; return r; } static int vidomove_dispatch (m) _rl_vimotion_cxt *m; { int r; switch (m->op) { case VIM_DELETE: r = vi_delete_dispatch (m); break; case VIM_CHANGE: r = vi_change_dispatch (m); break; case VIM_YANK: r = vi_yank_dispatch (m); break; default: _rl_errmsg ("vidomove_dispatch: unknown operator %d", m->op); r = 1; break; } RL_UNSETSTATE (RL_STATE_VIMOTION); return r; } int rl_vi_rubout (count, key) int count, key; { int opoint; if (count < 0) return (rl_vi_delete (-count, key)); if (rl_point == 0) { rl_ding (); return -1; } opoint = rl_point; if (count > 1 && MB_CUR_MAX > 1 && rl_byte_oriented == 0) rl_backward_char (count, key); else if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO); else rl_point -= count; if (rl_point < 0) rl_point = 0; rl_kill_text (rl_point, opoint); return (0); } int rl_vi_delete (count, key) int count, key; { int end; if (count < 0) return (rl_vi_rubout (-count, key)); if (rl_end == 0) { rl_ding (); return -1; } if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) end = _rl_find_next_mbchar (rl_line_buffer, rl_point, count, MB_FIND_NONZERO); else end = rl_point + count; if (end >= rl_end) end = rl_end; rl_kill_text (rl_point, end); if (rl_point > 0 && rl_point == rl_end) rl_backward_char (1, key); return (0); } int rl_vi_back_to_indent (count, key) int count, key; { rl_beg_of_line (1, key); while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point])) rl_point++; return (0); } int rl_vi_first_print (count, key) int count, key; { return (rl_vi_back_to_indent (1, key)); } static int _rl_cs_dir, _rl_cs_orig_dir; #if defined (READLINE_CALLBACKS) static int _rl_vi_callback_char_search (data) _rl_callback_generic_arg *data; { int c; #if defined (HANDLE_MULTIBYTE) c = _rl_vi_last_search_mblen = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX); #else RL_SETSTATE(RL_STATE_MOREINPUT); c = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); #endif if (c <= 0) return -1; #if !defined (HANDLE_MULTIBYTE) _rl_vi_last_search_char = c; #endif _rl_callback_func = 0; _rl_want_redisplay = 1; #if defined (HANDLE_MULTIBYTE) return (_rl_char_search_internal (data->count, _rl_cs_dir, _rl_vi_last_search_mbchar, _rl_vi_last_search_mblen)); #else return (_rl_char_search_internal (data->count, _rl_cs_dir, _rl_vi_last_search_char)); #endif } #endif int rl_vi_char_search (count, key) int count, key; { int c; #if defined (HANDLE_MULTIBYTE) static char *target; static int tlen; #else static char target; #endif if (key == ';' || key == ',') { if (_rl_cs_orig_dir == 0) return -1; #if defined (HANDLE_MULTIBYTE) if (_rl_vi_last_search_mblen == 0) return -1; #else if (_rl_vi_last_search_char == 0) return -1; #endif _rl_cs_dir = (key == ';') ? _rl_cs_orig_dir : -_rl_cs_orig_dir; } else { switch (key) { case 't': _rl_cs_orig_dir = _rl_cs_dir = FTO; break; case 'T': _rl_cs_orig_dir = _rl_cs_dir = BTO; break; case 'f': _rl_cs_orig_dir = _rl_cs_dir = FFIND; break; case 'F': _rl_cs_orig_dir = _rl_cs_dir = BFIND; break; } if (vi_redoing) { /* set target and tlen below */ } #if defined (READLINE_CALLBACKS) else if (RL_ISSTATE (RL_STATE_CALLBACK)) { _rl_callback_data = _rl_callback_data_alloc (count); _rl_callback_data->i1 = _rl_cs_dir; _rl_callback_func = _rl_vi_callback_char_search; return (0); } #endif else { #if defined (HANDLE_MULTIBYTE) c = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX); if (c <= 0) return -1; _rl_vi_last_search_mblen = c; #else RL_SETSTATE(RL_STATE_MOREINPUT); c = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); if (c < 0) return -1; _rl_vi_last_search_char = c; #endif } } #if defined (HANDLE_MULTIBYTE) target = _rl_vi_last_search_mbchar; tlen = _rl_vi_last_search_mblen; #else target = _rl_vi_last_search_char; #endif #if defined (HANDLE_MULTIBYTE) return (_rl_char_search_internal (count, _rl_cs_dir, target, tlen)); #else return (_rl_char_search_internal (count, _rl_cs_dir, target)); #endif } /* Match brackets */ int rl_vi_match (ignore, key) int ignore, key; { int count = 1, brack, pos, tmp, pre; pos = rl_point; if ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0) { if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { while ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0) { pre = rl_point; rl_forward_char (1, key); if (pre == rl_point) break; } } else while ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0 && rl_point < rl_end - 1) rl_forward_char (1, key); if (brack <= 0) { rl_point = pos; rl_ding (); return -1; } } pos = rl_point; if (brack < 0) { while (count) { tmp = pos; if (MB_CUR_MAX == 1 || rl_byte_oriented) pos--; else { pos = _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY); if (tmp == pos) pos--; } if (pos >= 0) { int b = rl_vi_bracktype (rl_line_buffer[pos]); if (b == -brack) count--; else if (b == brack) count++; } else { rl_ding (); return -1; } } } else { /* brack > 0 */ while (count) { if (MB_CUR_MAX == 1 || rl_byte_oriented) pos++; else pos = _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY); if (pos < rl_end) { int b = rl_vi_bracktype (rl_line_buffer[pos]); if (b == -brack) count--; else if (b == brack) count++; } else { rl_ding (); return -1; } } } rl_point = pos; return (0); } int rl_vi_bracktype (c) int c; { switch (c) { case '(': return 1; case ')': return -1; case '[': return 2; case ']': return -2; case '{': return 3; case '}': return -3; default: return 0; } } static int _rl_vi_change_char (count, c, mb) int count, c; char *mb; { int p; if (c == '\033' || c == CTRL ('C')) return -1; rl_begin_undo_group (); while (count-- && rl_point < rl_end) { p = rl_point; rl_vi_delete (1, c); if (rl_point < p) /* Did we retreat at EOL? */ rl_point++; #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) rl_insert_text (mb); else #endif _rl_insert_char (1, c); } /* The cursor shall be left on the last character changed. */ rl_backward_char (1, c); rl_end_undo_group (); return (0); } static int _rl_vi_callback_getchar (mb, mlen) char *mb; int mlen; { int c; RL_SETSTATE(RL_STATE_MOREINPUT); c = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); if (c < 0) return -1; #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) c = _rl_read_mbstring (c, mb, mlen); #endif return c; } #if defined (READLINE_CALLBACKS) static int _rl_vi_callback_change_char (data) _rl_callback_generic_arg *data; { int c; char mb[MB_LEN_MAX]; _rl_vi_last_replacement = c = _rl_vi_callback_getchar (mb, MB_LEN_MAX); if (c < 0) return -1; _rl_callback_func = 0; _rl_want_redisplay = 1; return (_rl_vi_change_char (data->count, c, mb)); } #endif int rl_vi_change_char (count, key) int count, key; { int c; char mb[MB_LEN_MAX]; if (vi_redoing) { c = _rl_vi_last_replacement; mb[0] = c; mb[1] = '\0'; } #if defined (READLINE_CALLBACKS) else if (RL_ISSTATE (RL_STATE_CALLBACK)) { _rl_callback_data = _rl_callback_data_alloc (count); _rl_callback_func = _rl_vi_callback_change_char; return (0); } #endif else _rl_vi_last_replacement = c = _rl_vi_callback_getchar (mb, MB_LEN_MAX); if (c < 0) return -1; return (_rl_vi_change_char (count, c, mb)); } int rl_vi_subst (count, key) int count, key; { /* If we are redoing, rl_vi_change_to will stuff the last motion char */ if (vi_redoing == 0) rl_stuff_char ((key == 'S') ? 'c' : 'l'); /* `S' == `cc', `s' == `cl' */ return (rl_vi_change_to (count, 'c')); } int rl_vi_overstrike (count, key) int count, key; { if (_rl_vi_doing_insert == 0) { _rl_vi_doing_insert = 1; rl_begin_undo_group (); } if (count > 0) { _rl_overwrite_char (count, key); vi_replace_count += count; } return (0); } int rl_vi_overstrike_delete (count, key) int count, key; { int i, s; for (i = 0; i < count; i++) { if (vi_replace_count == 0) { rl_ding (); break; } s = rl_point; if (rl_do_undo ()) vi_replace_count--; if (rl_point == s) rl_backward_char (1, key); } if (vi_replace_count == 0 && _rl_vi_doing_insert) { rl_end_undo_group (); rl_do_undo (); _rl_vi_doing_insert = 0; } return (0); } int rl_vi_replace (count, key) int count, key; { int i; vi_replace_count = 0; if (!vi_replace_map) { vi_replace_map = rl_make_bare_keymap (); for (i = ' '; i < KEYMAP_SIZE; i++) vi_replace_map[i].function = rl_vi_overstrike; vi_replace_map[RUBOUT].function = rl_vi_overstrike_delete; vi_replace_map[ESC].function = rl_vi_movement_mode; vi_replace_map[RETURN].function = rl_newline; vi_replace_map[NEWLINE].function = rl_newline; /* If the normal vi insertion keymap has ^H bound to erase, do the same here. Probably should remove the assignment to RUBOUT up there, but I don't think it will make a difference in real life. */ if (vi_insertion_keymap[CTRL ('H')].type == ISFUNC && vi_insertion_keymap[CTRL ('H')].function == rl_rubout) vi_replace_map[CTRL ('H')].function = rl_vi_overstrike_delete; } _rl_keymap = vi_replace_map; return (0); } #if 0 /* Try to complete the word we are standing on or the word that ends with the previous character. A space matches everything. Word delimiters are space and ;. */ int rl_vi_possible_completions() { int save_pos = rl_point; if (rl_line_buffer[rl_point] != ' ' && rl_line_buffer[rl_point] != ';') { while (rl_point < rl_end && rl_line_buffer[rl_point] != ' ' && rl_line_buffer[rl_point] != ';') rl_point++; } else if (rl_line_buffer[rl_point - 1] == ';') { rl_ding (); return (0); } rl_possible_completions (); rl_point = save_pos; return (0); } #endif /* Functions to save and restore marks. */ static int _rl_vi_set_mark () { int ch; RL_SETSTATE(RL_STATE_MOREINPUT); ch = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); if (ch < 0 || ch < 'a' || ch > 'z') /* make test against 0 explicit */ { rl_ding (); return -1; } ch -= 'a'; vi_mark_chars[ch] = rl_point; return 0; } #if defined (READLINE_CALLBACKS) static int _rl_vi_callback_set_mark (data) _rl_callback_generic_arg *data; { _rl_callback_func = 0; _rl_want_redisplay = 1; return (_rl_vi_set_mark ()); } #endif int rl_vi_set_mark (count, key) int count, key; { #if defined (READLINE_CALLBACKS) if (RL_ISSTATE (RL_STATE_CALLBACK)) { _rl_callback_data = 0; _rl_callback_func = _rl_vi_callback_set_mark; return (0); } #endif return (_rl_vi_set_mark ()); } static int _rl_vi_goto_mark () { int ch; RL_SETSTATE(RL_STATE_MOREINPUT); ch = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); if (ch == '`') { rl_point = rl_mark; return 0; } else if (ch < 0 || ch < 'a' || ch > 'z') /* make test against 0 explicit */ { rl_ding (); return -1; } ch -= 'a'; if (vi_mark_chars[ch] == -1) { rl_ding (); return -1; } rl_point = vi_mark_chars[ch]; return 0; } #if defined (READLINE_CALLBACKS) static int _rl_vi_callback_goto_mark (data) _rl_callback_generic_arg *data; { _rl_callback_func = 0; _rl_want_redisplay = 1; return (_rl_vi_goto_mark ()); } #endif int rl_vi_goto_mark (count, key) int count, key; { #if defined (READLINE_CALLBACKS) if (RL_ISSTATE (RL_STATE_CALLBACK)) { _rl_callback_data = 0; _rl_callback_func = _rl_vi_callback_goto_mark; return (0); } #endif return (_rl_vi_goto_mark ()); } #endif /* VI_MODE */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/doc/�������������������������������������������������������������������������0000755�0001750�0001750�00000000000�12266504076�014423� 5����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/doc/Makefile.in��������������������������������������������������������������0000644�0001750�0001750�00000016452�12250770610�016470� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This makefile for Readline library documentation is in -*- text -*- mode. # Emacs likes it that way. # Copyright (C) 1996-2009 Free Software Foundation, Inc. # 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 3 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, see <http://www.gnu.org/licenses/>. topdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ prefix = @prefix@ datarootdir = @datarootdir@ infodir = @infodir@ mandir = @mandir@ manpfx = man man1ext = .1 man1dir = $(mandir)/$(manpfx)1 man3ext = .3 man3dir = $(mandir)/$(manpfx)3 # set this to a value to have the HTML documentation installed htmldir = # Support an alternate destination root directory for package building DESTDIR = SHELL = @MAKE_SHELL@ RM = rm -f INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ BUILD_DIR = @BUILD_DIR@ TEXINPUTDIR = $(srcdir) MAKEINFO = LANGUAGE= makeinfo TEXI2DVI = $(srcdir)/texi2dvi TEXI2HTML = $(srcdir)/texi2html QUIETPS = #set this to -q to shut up dvips PAPERSIZE = letter PSDPI = 600 DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky # These tools might not be available; they're not required DVIPDF = dvipdfm -o $@ -p ${PAPERSIZE} PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ RLSRC = $(srcdir)/rlman.texi $(srcdir)/rluser.texi \ $(srcdir)/rltech.texi $(srcdir)/version.texi \ $(srcdir)/rluserman.texi $(srcdir)/fdl.texi HISTSRC = $(srcdir)/history.texi $(srcdir)/hsuser.texi \ $(srcdir)/hstech.texi $(srcdir)/version.texi $(srcdir)/fdl.texi # This should be a program that converts troff to an ascii-readable format NROFF = groff -Tascii # This should be a program that converts troff to postscript GROFF = groff DVIOBJ = readline.dvi history.dvi rluserman.dvi INFOOBJ = readline.info history.info rluserman.info PSOBJ = readline.ps history.ps rluserman.ps readline_3.ps history_3.ps HTMLOBJ = readline.html history.html rluserman.html TEXTOBJ = readline.0 history.0 PDFOBJ = readline.pdf history.pdf rluserman.pdf INTERMEDIATE_OBJ = rlman.dvi DIST_DOCS = $(DVIOBJ) $(PSOBJ) $(HTMLOBJ) $(INFOOBJ) $(TEXTOBJ) $(PDFOBJ) .SUFFIXES: .0 .3 .ps .txt .dvi .html .pdf .3.0: $(RM) $@ -${NROFF} -man $< > $@ .ps.pdf: $(RM) $@ -${PSPDF} $< .dvi.pdf: $(RM) $@ -${DVIPDF} $< all: info dvi html ps text pdf nodvi: info html text xdist: $(DIST_DOCS) info: $(INFOOBJ) dvi: $(DVIOBJ) ps: $(PSOBJ) html: $(HTMLOBJ) text: $(TEXTOBJ) pdf: $(PDFOBJ) readline.dvi: $(RLSRC) TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texi mv rlman.dvi readline.dvi readline.info: $(RLSRC) $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texi rluserman.dvi: $(RLSRC) TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rluserman.texi rluserman.info: $(RLSRC) $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rluserman.texi history.dvi: ${HISTSRC} TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/history.texi history.info: ${HISTSRC} $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/history.texi readline.ps: readline.dvi $(RM) $@ $(DVIPS) readline.dvi rluserman.ps: rluserman.dvi $(RM) $@ $(DVIPS) rluserman.dvi history.ps: history.dvi $(RM) $@ $(DVIPS) history.dvi # # This leaves readline.html and rlman.html -- rlman.html is for www.gnu.org # readline.html: ${RLSRC} $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texi sed -e 's:rlman.html:readline.html:g' rlman.html > readline.html $(RM) rlman.html rluserman.html: ${RLSRC} $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rluserman.texi history.html: ${HISTSRC} $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/history.texi readline.0: readline.3 readline_3.ps: $(srcdir)/readline.3 ${RM} $@ ${GROFF} -man < $(srcdir)/readline.3 > $@ history.0: history.3 history_3.ps: $(srcdir)/history.3 ${RM} $@ ${GROFF} -man < $(srcdir)/history.3 > $@ readline.pdf: readline.dvi history.pdf: history.dvi rluserman.pdf: rluserman.dvi clean: $(RM) *.aux *.bak *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \ *.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o \ core *.core mostlyclean: clean distclean: clean maybe-clean $(RM) $(INTERMEDIATE_OBJ) $(RM) Makefile maybe-clean: -if test "X$(topdir)" != "X.." && test "X$(topdir)" != "X$(BUILD_DIR)"; then \ $(RM) $(DIST_DOCS); \ fi maintainer-clean: clean $(RM) $(DIST_DOCS) $(RM) $(INTERMEDIATE_OBJ) $(RM) $(PDFOBJ) $(RM) Makefile installdirs: $(topdir)/support/mkdirs -$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) -if test -n "${htmldir}" ; then \ $(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(htmldir) ; \ fi install: installdirs if test -f readline.info; then \ ${INSTALL_DATA} readline.info $(DESTDIR)$(infodir)/readline.info; \ else \ ${INSTALL_DATA} $(srcdir)/readline.info $(DESTDIR)$(infodir)/readline.info; \ fi if test -f rluserman.info; then \ ${INSTALL_DATA} rluserman.info $(DESTDIR)$(infodir)/rluserman.info; \ else \ ${INSTALL_DATA} $(srcdir)/rluserman.info $(DESTDIR)$(infodir)/rluserman.info; \ fi if test -f history.info; then \ ${INSTALL_DATA} history.info $(DESTDIR)$(infodir)/history.info; \ else \ ${INSTALL_DATA} $(srcdir)/history.info $(DESTDIR)$(infodir)/history.info; \ fi -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ install-info --dir-file=$(DESTDIR)$(infodir)/dir \ $(DESTDIR)$(infodir)/readline.info ; \ install-info --dir-file=$(DESTDIR)$(infodir)/dir \ $(DESTDIR)$(infodir)/history.info ; \ install-info --dir-file=$(DESTDIR)$(infodir)/dir \ $(DESTDIR)$(infodir)/rluserman.info ; \ else true; fi -${INSTALL_DATA} $(srcdir)/readline.3 $(DESTDIR)$(man3dir)/readline$(man3ext) -${INSTALL_DATA} $(srcdir)/history.3 $(DESTDIR)$(man3dir)/history$(man3ext) -if test -n "${htmldir}" ; then \ if test -f readline.html; then \ ${INSTALL_DATA} readline.html $(DESTDIR)$(htmldir)/readline.html; \ else \ ${INSTALL_DATA} $(srcdir)/readline.html $(DESTDIR)$(htmldir)/readline.html; \ fi ; \ if test -f history.html; then \ ${INSTALL_DATA} history.html $(DESTDIR)$(htmldir)/history.html; \ else \ ${INSTALL_DATA} $(srcdir)/history.html $(DESTDIR)$(htmldir)/history.html; \ fi ; \ if test -f rluserman.html; then \ ${INSTALL_DATA} rluserman.html $(DESTDIR)$(htmldir)/rluserman.html; \ else \ ${INSTALL_DATA} $(srcdir)/rluserman.html $(DESTDIR)$(htmldir)/rluserman.html; \ fi ; \ fi uninstall: $(RM) $(DESTDIR)$(infodir)/readline.info $(RM) $(DESTDIR)$(infodir)/rluserman.info $(RM) $(DESTDIR)$(infodir)/history.info $(RM) $(DESTDIR)$(man3dir)/readline$(man3ext) $(RM) $(DESTDIR)$(man3dir)/history$(man3ext) -if test -n "${htmldir}" ; then \ $(RM) $(DESTDIR)$(htmldir)/readline.html ; \ $(RM) $(DESTDIR)$(htmldir)/rluserman.html ; \ $(RM) $(DESTDIR)$(htmldir)/history.html ; \ fi ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/doc/rlman.texi���������������������������������������������������������������0000644�0001750�0001750�00000005415�12250770610�016424� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������\input texinfo @c -*-texinfo-*- @comment %**start of header (This is for running Texinfo on a region.) @setfilename readline.info @settitle GNU Readline Library @comment %**end of header (This is for running Texinfo on a region.) @synindex vr fn @include version.texi @copying This manual describes the GNU Readline Library (version @value{VERSION}, @value{UPDATED}), a library which aids in the consistency of user interface across discrete programs which provide a command line interface. Copyright @copyright{} 1988--2011 Free Software Foundation, Inc. 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. @quotation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover texts being ``A GNU Manual'', and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled ``GNU Free Documentation License''. (a) The FSF's Back-Cover Text is: You are free to copy and modify this GNU manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom.'' @end quotation @end copying @dircategory Libraries @direntry * Readline: (readline). The GNU readline library API. @end direntry @titlepage @title GNU Readline Library @subtitle Edition @value{EDITION}, for @code{Readline Library} Version @value{VERSION}. @subtitle @value{UPDATED-MONTH} @author Chet Ramey, Case Western Reserve University @author Brian Fox, Free Software Foundation @page @vskip 0pt plus 1filll @insertcopying @sp 1 Published by the Free Software Foundation @* 59 Temple Place, Suite 330, @* Boston, MA 02111-1307 @* USA @* @end titlepage @contents @ifnottex @node Top @top GNU Readline Library This document describes the GNU Readline Library, a utility which aids in the consistency of user interface across discrete programs which provide a command line interface. @menu * Command Line Editing:: GNU Readline User's Manual. * Programming with GNU Readline:: GNU Readline Programmer's Manual. * GNU Free Documentation License:: License for copying this manual. * Concept Index:: Index of concepts described in this manual. * Function and Variable Index:: Index of externally visible functions and variables. @end menu @end ifnottex @include rluser.texi @include rltech.texi @node GNU Free Documentation License @appendix GNU Free Documentation License @include fdl.texi @node Concept Index @unnumbered Concept Index @printindex cp @node Function and Variable Index @unnumbered Function and Variable Index @printindex fn @bye ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/doc/fdl.texi�����������������������������������������������������������������0000644�0001750�0001750�00000056015�12250770610�016062� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@c The GNU Free Documentation License. @center Version 1.3, 3 November 2008 @c This file is intended to be included within another document, @c hence no sectioning command or @node. @display Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. @uref{http://fsf.org/} Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @end display @enumerate 0 @item PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document @dfn{free} in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of ``copyleft'', which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. @item APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The ``Document'', below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as ``you''. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A ``Modified Version'' of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A ``Secondary Section'' is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The ``Invariant Sections'' are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The ``Cover Texts'' are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A ``Transparent'' copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not ``Transparent'' is called ``Opaque''. Examples of suitable formats for Transparent copies include plain @sc{ascii} without markup, Texinfo input format, La@TeX{} input format, @acronym{SGML} or @acronym{XML} using a publicly available @acronym{DTD}, and standard-conforming simple @acronym{HTML}, PostScript or @acronym{PDF} designed for human modification. Examples of transparent image formats include @acronym{PNG}, @acronym{XCF} and @acronym{JPG}. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, @acronym{SGML} or @acronym{XML} for which the @acronym{DTD} and/or processing tools are not generally available, and the machine-generated @acronym{HTML}, PostScript or @acronym{PDF} produced by some word processors for output purposes only. The ``Title Page'' means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, ``Title Page'' means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. The ``publisher'' means any person or entity that distributes copies of the Document to the public. A section ``Entitled XYZ'' means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as ``Acknowledgements'', ``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' of such a section when you modify the Document means that it remains a section ``Entitled XYZ'' according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. @item VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. @item COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. @item MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: @enumerate A @item Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. @item List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. @item State on the Title page the name of the publisher of the Modified Version, as the publisher. @item Preserve all the copyright notices of the Document. @item Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. @item Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. @item Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. @item Include an unaltered copy of this License. @item Preserve the section Entitled ``History'', Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled ``History'' in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. @item Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the ``History'' section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. @item For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. @item Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. @item Delete any section Entitled ``Endorsements''. Such a section may not be included in the Modified Version. @item Do not retitle any existing section to be Entitled ``Endorsements'' or to conflict in title with any Invariant Section. @item Preserve any Warranty Disclaimers. @end enumerate If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled ``Endorsements'', provided it contains nothing but endorsements of your Modified Version by various parties---for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. @item COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled ``History'' in the various original documents, forming one section Entitled ``History''; likewise combine any sections Entitled ``Acknowledgements'', and any sections Entitled ``Dedications''. You must delete all sections Entitled ``Endorsements.'' @item COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. @item AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an ``aggregate'' if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. @item TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled ``Acknowledgements'', ``Dedications'', or ``History'', the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. @item TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. @item FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See @uref{http://www.gnu.org/copyleft/}. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License ``or any later version'' applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. @item RELICENSING ``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A ``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the site means any set of copyrightable works thus published on the MMC site. ``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. ``Incorporate'' means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is ``eligible for relicensing'' if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. @end enumerate @page @heading ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: @smallexample @group Copyright (C) @var{year} @var{your name}. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end group @end smallexample If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the ``with@dots{}Texts.'' line with this: @smallexample @group with the Invariant Sections being @var{list their titles}, with the Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}. @end group @end smallexample If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. @c Local Variables: @c ispell-local-pdict: "ispell-dict" @c End: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/doc/ChangeLog.gdb������������������������������������������������������������0000644�0001750�0001750�00000005472�12250770610�016730� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������2011-05-11 Jan Kratochvil <jan.kratochvil@redhat.com> * hsuser.texi (Using History Interactively): Disable !BashFeatures @defcodeindex. Make the `Programming with GNU History' reference external. * inc-hist.texinfo: Remove. 2011-05-11 Jan Kratochvil <jan.kratochvil@redhat.com> Imported readline 6.2, and upstream patch 001. 2006-04-24 Daniel Jacobowitz <dan@codesourcery.com> Imported readline 5.1, and upstream patches 001-004. 2003-09-14 Andrew Cagney <cagney@redhat.com> * history.0: Delete generated file. 2002-02-24 Elena Zannoni <ezannoni@redhat.com> * ChangeLog.gdb: Renamed from ChangeLog. 2002-01-20 Eli Zaretskii <eliz@is.elta.co.il> * rluser.texinfo (Sample Init File): Prevent overfull hboxes. From Brian Youmans <3diff@gnu.org>. 2000-07-09 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * Removed generated files rluserman.{dvi, info, html, ps}. 2000-07-07 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * Import of readline 4.1. Regenerated inc-hist.texinfo as copy of hsuser.texinfo, for inclusion in the gdb manual. New file: rluserman.texinfo Tue Apr 18 15:43:52 2000 Andrew Cagney <cagney@b1.cygnus.com> * readline.0: Delete. Generated by Makefile, deleted by distclean rule. Tue Mar 28 16:06:22 2000 Andrew Cagney <cagney@b1.cygnus.com> * inc-hist.texinfo, rluser.texinfo: Revert change Fri Mar 24 18:04:32 2000 Andrew Cagney <cagney@b1.cygnus.com>. Unconditionally provide @chapter and @node. Fri Mar 24 18:04:32 2000 Andrew Cagney <cagney@b1.cygnus.com> * inc-hist.texinfo: When GDBN omit the chapter/node. * rluser.texinfo (Command Line Editing): Ditto. 1999-08-10 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * hsuser.texinfo (Bash History Builtins): Comment out btindex commands. * inc-hist.texinfo: New file. Same as hsuser.texinfo, but w/o cross reference to GNU History Manual. Tue Dec 22 10:07:58 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com> * hsuser.texinfo (Bash History Builtins): comment out btindex commands. * Import of Readline 2.2.1. New files: readline.0, readline.3, texi2dvi, texi2html. 1998-12-17 Felix Lee <flee@cygnus.com> * inc-hist.texi: @node line "Using History" was wrong. Thu Jul 9 17:03:26 1998 Edith Epstein <eepstein@sophia.cygnus.com> * inc-hist.texi: one line change. Wed Sep 20 12:57:29 1995 Ian Lance Taylor <ian@cygnus.com> * Makefile.in (maintainer-clean): New synonym for realclean. Tue Feb 2 11:40:04 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) * Makefile.in: configurable (and useable) Makefile template * Makefile: removed, replaced with configurable Makefile.in * texindex.c texinfo.tex: remove, replacing w/refs to tools elsewhere in distribution tree * configure.in: pro forma configure stub * ChangeLog: new file ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/doc/rltech.texi��������������������������������������������������������������0000644�0001750�0001750�00000260632�12250770610�016600� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������@comment %**start of header (This is for running Texinfo on a region.) @setfilename rltech.info @comment %**end of header (This is for running Texinfo on a region.) @ifinfo This document describes the GNU Readline Library, a utility for aiding in the consistency of user interface across discrete programs that need to provide a command line interface. Copyright (C) 1988--2011 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice pare preserved on all copies. @ignore 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). @end ignore Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, 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, except that this permission notice may be stated in a translation approved by the Foundation. @end ifinfo @node Programming with GNU Readline @chapter Programming with GNU Readline This chapter describes the interface between the @sc{gnu} Readline Library and other programs. If you are a programmer, and you wish to include the features found in @sc{gnu} Readline such as completion, line editing, and interactive history manipulation in your own programs, this section is for you. @menu * Basic Behavior:: Using the default behavior of Readline. * Custom Functions:: Adding your own functions to Readline. * Readline Variables:: Variables accessible to custom functions. * Readline Convenience Functions:: Functions which Readline supplies to aid in writing your own custom functions. * Readline Signal Handling:: How Readline behaves when it receives signals. * Custom Completers:: Supplanting or supplementing Readline's completion functions. @end menu @node Basic Behavior @section Basic Behavior Many programs provide a command line interface, such as @code{mail}, @code{ftp}, and @code{sh}. For such programs, the default behaviour of Readline is sufficient. This section describes how to use Readline in the simplest way possible, perhaps to replace calls in your code to @code{gets()} or @code{fgets()}. @findex readline @cindex readline, function The function @code{readline()} prints a prompt @var{prompt} and then reads and returns a single line of text from the user. If @var{prompt} is @code{NULL} or the empty string, no prompt is displayed. The line @code{readline} returns is allocated with @code{malloc()}; the caller should @code{free()} the line when it has finished with it. The declaration for @code{readline} in ANSI C is @example @code{char *readline (const char *@var{prompt});} @end example @noindent So, one might say @example @code{char *line = readline ("Enter a line: ");} @end example @noindent in order to read a line of text from the user. The line returned has the final newline removed, so only the text remains. If @code{readline} encounters an @code{EOF} while reading the line, and the line is empty at that point, then @code{(char *)NULL} is returned. Otherwise, the line is ended just as if a newline had been typed. If you want the user to be able to get at the line later, (with @key{C-p} for example), you must call @code{add_history()} to save the line away in a @dfn{history} list of such lines. @example @code{add_history (line)}; @end example @noindent For full details on the GNU History Library, see the associated manual. It is preferable to avoid saving empty lines on the history list, since users rarely have a burning need to reuse a blank line. Here is a function which usefully replaces the standard @code{gets()} library function, and has the advantage of no static buffer to overflow: @example /* A static variable for holding the line. */ static char *line_read = (char *)NULL; /* Read a string, and return a pointer to it. Returns NULL on EOF. */ char * rl_gets () @{ /* If the buffer has already been allocated, return the memory to the free pool. */ if (line_read) @{ free (line_read); line_read = (char *)NULL; @} /* Get a line from the user. */ line_read = readline (""); /* If the line has any text in it, save it on the history. */ if (line_read && *line_read) add_history (line_read); return (line_read); @} @end example This function gives the user the default behaviour of @key{TAB} completion: completion on file names. If you do not want Readline to complete on filenames, you can change the binding of the @key{TAB} key with @code{rl_bind_key()}. @example @code{int rl_bind_key (int @var{key}, rl_command_func_t *@var{function});} @end example @code{rl_bind_key()} takes two arguments: @var{key} is the character that you want to bind, and @var{function} is the address of the function to call when @var{key} is pressed. Binding @key{TAB} to @code{rl_insert()} makes @key{TAB} insert itself. @code{rl_bind_key()} returns non-zero if @var{key} is not a valid ASCII character code (between 0 and 255). Thus, to disable the default @key{TAB} behavior, the following suffices: @example @code{rl_bind_key ('\t', rl_insert);} @end example This code should be executed once at the start of your program; you might write a function called @code{initialize_readline()} which performs this and other desired initializations, such as installing custom completers (@pxref{Custom Completers}). @node Custom Functions @section Custom Functions Readline provides many functions for manipulating the text of the line, but it isn't possible to anticipate the needs of all programs. This section describes the various functions and variables defined within the Readline library which allow a user program to add customized functionality to Readline. Before declaring any functions that customize Readline's behavior, or using any functionality Readline provides in other code, an application writer should include the file @code{<readline/readline.h>} in any file that uses Readline's features. Since some of the definitions in @code{readline.h} use the @code{stdio} library, the file @code{<stdio.h>} should be included before @code{readline.h}. @code{readline.h} defines a C preprocessor variable that should be treated as an integer, @code{RL_READLINE_VERSION}, which may be used to conditionally compile application code depending on the installed Readline version. The value is a hexadecimal encoding of the major and minor version numbers of the library, of the form 0x@var{MMmm}. @var{MM} is the two-digit major version number; @var{mm} is the two-digit minor version number. For Readline 4.2, for example, the value of @code{RL_READLINE_VERSION} would be @code{0x0402}. @menu * Readline Typedefs:: C declarations to make code readable. * Function Writing:: Variables and calling conventions. @end menu @node Readline Typedefs @subsection Readline Typedefs For readabilty, we declare a number of new object types, all pointers to functions. The reason for declaring these new types is to make it easier to write code describing pointers to C functions with appropriately prototyped arguments and return values. For instance, say we want to declare a variable @var{func} as a pointer to a function which takes two @code{int} arguments and returns an @code{int} (this is the type of all of the Readline bindable functions). Instead of the classic C declaration @code{int (*func)();} @noindent or the ANSI-C style declaration @code{int (*func)(int, int);} @noindent we may write @code{rl_command_func_t *func;} The full list of function pointer types available is @table @code @item typedef int rl_command_func_t (int, int); @item typedef char *rl_compentry_func_t (const char *, int); @item typedef char **rl_completion_func_t (const char *, int, int); @item typedef char *rl_quote_func_t (char *, int, char *); @item typedef char *rl_dequote_func_t (char *, int); @item typedef int rl_compignore_func_t (char **); @item typedef void rl_compdisp_func_t (char **, int, int); @item typedef int rl_hook_func_t (void); @item typedef int rl_getc_func_t (FILE *); @item typedef int rl_linebuf_func_t (char *, int); @item typedef int rl_intfunc_t (int); @item #define rl_ivoidfunc_t rl_hook_func_t @item typedef int rl_icpfunc_t (char *); @item typedef int rl_icppfunc_t (char **); @item typedef void rl_voidfunc_t (void); @item typedef void rl_vintfunc_t (int); @item typedef void rl_vcpfunc_t (char *); @item typedef void rl_vcppfunc_t (char **); @end table @node Function Writing @subsection Writing a New Function In order to write new functions for Readline, you need to know the calling conventions for keyboard-invoked functions, and the names of the variables that describe the current state of the line read so far. The calling sequence for a command @code{foo} looks like @example @code{int foo (int count, int key)} @end example @noindent where @var{count} is the numeric argument (or 1 if defaulted) and @var{key} is the key that invoked this function. It is completely up to the function as to what should be done with the numeric argument. Some functions use it as a repeat count, some as a flag, and others to choose alternate behavior (refreshing the current line as opposed to refreshing the screen, for example). Some choose to ignore it. In general, if a function uses the numeric argument as a repeat count, it should be able to do something useful with both negative and positive arguments. At the very least, it should be aware that it can be passed a negative argument. A command function should return 0 if its action completes successfully, and a non-zero value if some error occurs. This is the convention obeyed by all of the builtin Readline bindable command functions. @node Readline Variables @section Readline Variables These variables are available to function writers. @deftypevar {char *} rl_line_buffer This is the line gathered so far. You are welcome to modify the contents of the line, but see @ref{Allowing Undoing}. The function @code{rl_extend_line_buffer} is available to increase the memory allocated to @code{rl_line_buffer}. @end deftypevar @deftypevar int rl_point The offset of the current cursor position in @code{rl_line_buffer} (the @emph{point}). @end deftypevar @deftypevar int rl_end The number of characters present in @code{rl_line_buffer}. When @code{rl_point} is at the end of the line, @code{rl_point} and @code{rl_end} are equal. @end deftypevar @deftypevar int rl_mark The @var{mark} (saved position) in the current line. If set, the mark and point define a @emph{region}. @end deftypevar @deftypevar int rl_done Setting this to a non-zero value causes Readline to return the current line immediately. @end deftypevar @deftypevar int rl_num_chars_to_read Setting this to a positive value before calling @code{readline()} causes Readline to return after accepting that many characters, rather than reading up to a character bound to @code{accept-line}. @end deftypevar @deftypevar int rl_pending_input Setting this to a value makes it the next keystroke read. This is a way to stuff a single character into the input stream. @end deftypevar @deftypevar int rl_dispatching Set to a non-zero value if a function is being called from a key binding; zero otherwise. Application functions can test this to discover whether they were called directly or by Readline's dispatching mechanism. @end deftypevar @deftypevar int rl_erase_empty_line Setting this to a non-zero value causes Readline to completely erase the current line, including any prompt, any time a newline is typed as the only character on an otherwise-empty line. The cursor is moved to the beginning of the newly-blank line. @end deftypevar @deftypevar {char *} rl_prompt The prompt Readline uses. This is set from the argument to @code{readline()}, and should not be assigned to directly. The @code{rl_set_prompt()} function (@pxref{Redisplay}) may be used to modify the prompt string after calling @code{readline()}. @end deftypevar @deftypevar {char *} rl_display_prompt The string displayed as the prompt. This is usually identical to @var{rl_prompt}, but may be changed temporarily by functions that use the prompt string as a message area, such as incremental search. @end deftypevar @deftypevar int rl_already_prompted If an application wishes to display the prompt itself, rather than have Readline do it the first time @code{readline()} is called, it should set this variable to a non-zero value after displaying the prompt. The prompt must also be passed as the argument to @code{readline()} so the redisplay functions can update the display properly. The calling application is responsible for managing the value; Readline never sets it. @end deftypevar @deftypevar {const char *} rl_library_version The version number of this revision of the library. @end deftypevar @deftypevar int rl_readline_version An integer encoding the current version of the library. The encoding is of the form 0x@var{MMmm}, where @var{MM} is the two-digit major version number, and @var{mm} is the two-digit minor version number. For example, for Readline-4.2, @code{rl_readline_version} would have the value 0x0402. @end deftypevar @deftypevar {int} rl_gnu_readline_p Always set to 1, denoting that this is @sc{gnu} readline rather than some emulation. @end deftypevar @deftypevar {const char *} rl_terminal_name The terminal type, used for initialization. If not set by the application, Readline sets this to the value of the @env{TERM} environment variable the first time it is called. @end deftypevar @deftypevar {const char *} rl_readline_name This variable is set to a unique name by each application using Readline. The value allows conditional parsing of the inputrc file (@pxref{Conditional Init Constructs}). @end deftypevar @deftypevar {FILE *} rl_instream The stdio stream from which Readline reads input. If @code{NULL}, Readline defaults to @var{stdin}. @end deftypevar @deftypevar {FILE *} rl_outstream The stdio stream to which Readline performs output. If @code{NULL}, Readline defaults to @var{stdout}. @end deftypevar @deftypevar int rl_prefer_env_winsize If non-zero, Readline gives values found in the @env{LINES} and @env{COLUMNS} environment variables greater precedence than values fetched from the kernel when computing the screen dimensions. @end deftypevar @deftypevar {rl_command_func_t *} rl_last_func The address of the last command function Readline executed. May be used to test whether or not a function is being executed twice in succession, for example. @end deftypevar @deftypevar {rl_hook_func_t *} rl_startup_hook If non-zero, this is the address of a function to call just before @code{readline} prints the first prompt. @end deftypevar @deftypevar {rl_hook_func_t *} rl_pre_input_hook If non-zero, this is the address of a function to call after the first prompt has been printed and just before @code{readline} starts reading input characters. @end deftypevar @deftypevar {rl_hook_func_t *} rl_event_hook If non-zero, this is the address of a function to call periodically when Readline is waiting for terminal input. By default, this will be called at most ten times a second if there is no keyboard input. @end deftypevar @deftypevar {rl_getc_func_t *} rl_getc_function If non-zero, Readline will call indirectly through this pointer to get a character from the input stream. By default, it is set to @code{rl_getc}, the default Readline character input function (@pxref{Character Input}). @end deftypevar @deftypevar {rl_voidfunc_t *} rl_redisplay_function If non-zero, Readline will call indirectly through this pointer to update the display with the current contents of the editing buffer. By default, it is set to @code{rl_redisplay}, the default Readline redisplay function (@pxref{Redisplay}). @end deftypevar @deftypevar {rl_vintfunc_t *} rl_prep_term_function If non-zero, Readline will call indirectly through this pointer to initialize the terminal. The function takes a single argument, an @code{int} flag that says whether or not to use eight-bit characters. By default, this is set to @code{rl_prep_terminal} (@pxref{Terminal Management}). @end deftypevar @deftypevar {rl_voidfunc_t *} rl_deprep_term_function If non-zero, Readline will call indirectly through this pointer to reset the terminal. This function should undo the effects of @code{rl_prep_term_function}. By default, this is set to @code{rl_deprep_terminal} (@pxref{Terminal Management}). @end deftypevar @deftypevar {Keymap} rl_executing_keymap This variable is set to the keymap (@pxref{Keymaps}) in which the currently executing readline function was found. @end deftypevar @deftypevar {Keymap} rl_binding_keymap This variable is set to the keymap (@pxref{Keymaps}) in which the last key binding occurred. @end deftypevar @deftypevar {char *} rl_executing_macro This variable is set to the text of any currently-executing macro. @end deftypevar @deftypevar {int} rl_readline_state A variable with bit values that encapsulate the current Readline state. A bit is set with the @code{RL_SETSTATE} macro, and unset with the @code{RL_UNSETSTATE} macro. Use the @code{RL_ISSTATE} macro to test whether a particular state bit is set. Current state bits include: @table @code @item RL_STATE_NONE Readline has not yet been called, nor has it begun to intialize. @item RL_STATE_INITIALIZING Readline is initializing its internal data structures. @item RL_STATE_INITIALIZED Readline has completed its initialization. @item RL_STATE_TERMPREPPED Readline has modified the terminal modes to do its own input and redisplay. @item RL_STATE_READCMD Readline is reading a command from the keyboard. @item RL_STATE_METANEXT Readline is reading more input after reading the meta-prefix character. @item RL_STATE_DISPATCHING Readline is dispatching to a command. @item RL_STATE_MOREINPUT Readline is reading more input while executing an editing command. @item RL_STATE_ISEARCH Readline is performing an incremental history search. @item RL_STATE_NSEARCH Readline is performing a non-incremental history search. @item RL_STATE_SEARCH Readline is searching backward or forward through the history for a string. @item RL_STATE_NUMERICARG Readline is reading a numeric argument. @item RL_STATE_MACROINPUT Readline is currently getting its input from a previously-defined keyboard macro. @item RL_STATE_MACRODEF Readline is currently reading characters defining a keyboard macro. @item RL_STATE_OVERWRITE Readline is in overwrite mode. @item RL_STATE_COMPLETING Readline is performing word completion. @item RL_STATE_SIGHANDLER Readline is currently executing the readline signal handler. @item RL_STATE_UNDOING Readline is performing an undo. @item RL_STATE_INPUTPENDING Readline has input pending due to a call to @code{rl_execute_next()}. @item RL_STATE_TTYCSAVED Readline has saved the values of the terminal's special characters. @item RL_STATE_CALLBACK Readline is currently using the alternate (callback) interface (@pxref{Alternate Interface}). @item RL_STATE_VIMOTION Readline is reading the argument to a vi-mode "motion" command. @item RL_STATE_MULTIKEY Readline is reading a multiple-keystroke command. @item RL_STATE_VICMDONCE Readline has entered vi command (movement) mode at least one time during the current call to @code{readline()}. @item RL_STATE_DONE Readline has read a key sequence bound to @code{accept-line} and is about to return the line to the caller. @end table @end deftypevar @deftypevar {int} rl_explicit_arg Set to a non-zero value if an explicit numeric argument was specified by the user. Only valid in a bindable command function. @end deftypevar @deftypevar {int} rl_numeric_arg Set to the value of any numeric argument explicitly specified by the user before executing the current Readline function. Only valid in a bindable command function. @end deftypevar @deftypevar {int} rl_editing_mode Set to a value denoting Readline's current editing mode. A value of @var{1} means Readline is currently in emacs mode; @var{0} means that vi mode is active. @end deftypevar @node Readline Convenience Functions @section Readline Convenience Functions @menu * Function Naming:: How to give a function you write a name. * Keymaps:: Making keymaps. * Binding Keys:: Changing Keymaps. * Associating Function Names and Bindings:: Translate function names to key sequences. * Allowing Undoing:: How to make your functions undoable. * Redisplay:: Functions to control line display. * Modifying Text:: Functions to modify @code{rl_line_buffer}. * Character Input:: Functions to read keyboard input. * Terminal Management:: Functions to manage terminal settings. * Utility Functions:: Generally useful functions and hooks. * Miscellaneous Functions:: Functions that don't fall into any category. * Alternate Interface:: Using Readline in a `callback' fashion. * A Readline Example:: An example Readline function. @end menu @node Function Naming @subsection Naming a Function The user can dynamically change the bindings of keys while using Readline. This is done by representing the function with a descriptive name. The user is able to type the descriptive name when referring to the function. Thus, in an init file, one might find @example Meta-Rubout: backward-kill-word @end example This binds the keystroke @key{Meta-Rubout} to the function @emph{descriptively} named @code{backward-kill-word}. You, as the programmer, should bind the functions you write to descriptive names as well. Readline provides a function for doing that: @deftypefun int rl_add_defun (const char *name, rl_command_func_t *function, int key) Add @var{name} to the list of named functions. Make @var{function} be the function that gets called. If @var{key} is not -1, then bind it to @var{function} using @code{rl_bind_key()}. @end deftypefun Using this function alone is sufficient for most applications. It is the recommended way to add a few functions to the default functions that Readline has built in. If you need to do something other than adding a function to Readline, you may need to use the underlying functions described below. @node Keymaps @subsection Selecting a Keymap Key bindings take place on a @dfn{keymap}. The keymap is the association between the keys that the user types and the functions that get run. You can make your own keymaps, copy existing keymaps, and tell Readline which keymap to use. @deftypefun Keymap rl_make_bare_keymap (void) Returns a new, empty keymap. The space for the keymap is allocated with @code{malloc()}; the caller should free it by calling @code{rl_free_keymap()} when done. @end deftypefun @deftypefun Keymap rl_copy_keymap (Keymap map) Return a new keymap which is a copy of @var{map}. @end deftypefun @deftypefun Keymap rl_make_keymap (void) Return a new keymap with the printing characters bound to rl_insert, the lowercase Meta characters bound to run their equivalents, and the Meta digits bound to produce numeric arguments. @end deftypefun @deftypefun void rl_discard_keymap (Keymap keymap) Free the storage associated with the data in @var{keymap}. The caller should free @var{keymap}. @end deftypefun @deftypefun void rl_free_keymap (Keymap keymap) Free all storage associated with @var{keymap}. This calls @code{rl_discard_keymap} to free subordindate keymaps and macros. @end deftypefun Readline has several internal keymaps. These functions allow you to change which keymap is active. @deftypefun Keymap rl_get_keymap (void) Returns the currently active keymap. @end deftypefun @deftypefun void rl_set_keymap (Keymap keymap) Makes @var{keymap} the currently active keymap. @end deftypefun @deftypefun Keymap rl_get_keymap_by_name (const char *name) Return the keymap matching @var{name}. @var{name} is one which would be supplied in a @code{set keymap} inputrc line (@pxref{Readline Init File}). @end deftypefun @deftypefun {char *} rl_get_keymap_name (Keymap keymap) Return the name matching @var{keymap}. @var{name} is one which would be supplied in a @code{set keymap} inputrc line (@pxref{Readline Init File}). @end deftypefun @node Binding Keys @subsection Binding Keys Key sequences are associate with functions through the keymap. Readline has several internal keymaps: @code{emacs_standard_keymap}, @code{emacs_meta_keymap}, @code{emacs_ctlx_keymap}, @code{vi_movement_keymap}, and @code{vi_insertion_keymap}. @code{emacs_standard_keymap} is the default, and the examples in this manual assume that. Since @code{readline()} installs a set of default key bindings the first time it is called, there is always the danger that a custom binding installed before the first call to @code{readline()} will be overridden. An alternate mechanism is to install custom key bindings in an initialization function assigned to the @code{rl_startup_hook} variable (@pxref{Readline Variables}). These functions manage key bindings. @deftypefun int rl_bind_key (int key, rl_command_func_t *function) Binds @var{key} to @var{function} in the currently active keymap. Returns non-zero in the case of an invalid @var{key}. @end deftypefun @deftypefun int rl_bind_key_in_map (int key, rl_command_func_t *function, Keymap map) Bind @var{key} to @var{function} in @var{map}. Returns non-zero in the case of an invalid @var{key}. @end deftypefun @deftypefun int rl_bind_key_if_unbound (int key, rl_command_func_t *function) Binds @var{key} to @var{function} if it is not already bound in the currently active keymap. Returns non-zero in the case of an invalid @var{key} or if @var{key} is already bound. @end deftypefun @deftypefun int rl_bind_key_if_unbound_in_map (int key, rl_command_func_t *function, Keymap map) Binds @var{key} to @var{function} if it is not already bound in @var{map}. Returns non-zero in the case of an invalid @var{key} or if @var{key} is already bound. @end deftypefun @deftypefun int rl_unbind_key (int key) Bind @var{key} to the null function in the currently active keymap. Returns non-zero in case of error. @end deftypefun @deftypefun int rl_unbind_key_in_map (int key, Keymap map) Bind @var{key} to the null function in @var{map}. Returns non-zero in case of error. @end deftypefun @deftypefun int rl_unbind_function_in_map (rl_command_func_t *function, Keymap map) Unbind all keys that execute @var{function} in @var{map}. @end deftypefun @deftypefun int rl_unbind_command_in_map (const char *command, Keymap map) Unbind all keys that are bound to @var{command} in @var{map}. @end deftypefun @deftypefun int rl_bind_keyseq (const char *keyseq, rl_command_func_t *function) Bind the key sequence represented by the string @var{keyseq} to the function @var{function}, beginning in the current keymap. This makes new keymaps as necessary. The return value is non-zero if @var{keyseq} is invalid. @end deftypefun @deftypefun int rl_bind_keyseq_in_map (const char *keyseq, rl_command_func_t *function, Keymap map) Bind the key sequence represented by the string @var{keyseq} to the function @var{function}. This makes new keymaps as necessary. Initial bindings are performed in @var{map}. The return value is non-zero if @var{keyseq} is invalid. @end deftypefun @deftypefun int rl_set_key (const char *keyseq, rl_command_func_t *function, Keymap map) Equivalent to @code{rl_bind_keyseq_in_map}. @end deftypefun @deftypefun int rl_bind_keyseq_if_unbound (const char *keyseq, rl_command_func_t *function) Binds @var{keyseq} to @var{function} if it is not already bound in the currently active keymap. Returns non-zero in the case of an invalid @var{keyseq} or if @var{keyseq} is already bound. @end deftypefun @deftypefun int rl_bind_keyseq_if_unbound_in_map (const char *keyseq, rl_command_func_t *function, Keymap map) Binds @var{keyseq} to @var{function} if it is not already bound in @var{map}. Returns non-zero in the case of an invalid @var{keyseq} or if @var{keyseq} is already bound. @end deftypefun @deftypefun int rl_generic_bind (int type, const char *keyseq, char *data, Keymap map) Bind the key sequence represented by the string @var{keyseq} to the arbitrary pointer @var{data}. @var{type} says what kind of data is pointed to by @var{data}; this can be a function (@code{ISFUNC}), a macro (@code{ISMACR}), or a keymap (@code{ISKMAP}). This makes new keymaps as necessary. The initial keymap in which to do bindings is @var{map}. @end deftypefun @deftypefun int rl_parse_and_bind (char *line) Parse @var{line} as if it had been read from the @code{inputrc} file and perform any key bindings and variable assignments found (@pxref{Readline Init File}). @end deftypefun @deftypefun int rl_read_init_file (const char *filename) Read keybindings and variable assignments from @var{filename} (@pxref{Readline Init File}). @end deftypefun @node Associating Function Names and Bindings @subsection Associating Function Names and Bindings These functions allow you to find out what keys invoke named functions and the functions invoked by a particular key sequence. You may also associate a new function name with an arbitrary function. @deftypefun {rl_command_func_t *} rl_named_function (const char *name) Return the function with name @var{name}. @end deftypefun @deftypefun {rl_command_func_t *} rl_function_of_keyseq (const char *keyseq, Keymap map, int *type) Return the function invoked by @var{keyseq} in keymap @var{map}. If @var{map} is @code{NULL}, the current keymap is used. If @var{type} is not @code{NULL}, the type of the object is returned in the @code{int} variable it points to (one of @code{ISFUNC}, @code{ISKMAP}, or @code{ISMACR}). @end deftypefun @deftypefun {char **} rl_invoking_keyseqs (rl_command_func_t *function) Return an array of strings representing the key sequences used to invoke @var{function} in the current keymap. @end deftypefun @deftypefun {char **} rl_invoking_keyseqs_in_map (rl_command_func_t *function, Keymap map) Return an array of strings representing the key sequences used to invoke @var{function} in the keymap @var{map}. @end deftypefun @deftypefun void rl_function_dumper (int readable) Print the readline function names and the key sequences currently bound to them to @code{rl_outstream}. If @var{readable} is non-zero, the list is formatted in such a way that it can be made part of an @code{inputrc} file and re-read. @end deftypefun @deftypefun void rl_list_funmap_names (void) Print the names of all bindable Readline functions to @code{rl_outstream}. @end deftypefun @deftypefun {const char **} rl_funmap_names (void) Return a NULL terminated array of known function names. The array is sorted. The array itself is allocated, but not the strings inside. You should free the array, but not the pointers, using @code{free} or @code{rl_free} when you are done. @end deftypefun @deftypefun int rl_add_funmap_entry (const char *name, rl_command_func_t *function) Add @var{name} to the list of bindable Readline command names, and make @var{function} the function to be called when @var{name} is invoked. @end deftypefun @node Allowing Undoing @subsection Allowing Undoing Supporting the undo command is a painless thing, and makes your functions much more useful. It is certainly easy to try something if you know you can undo it. If your function simply inserts text once, or deletes text once, and uses @code{rl_insert_text()} or @code{rl_delete_text()} to do it, then undoing is already done for you automatically. If you do multiple insertions or multiple deletions, or any combination of these operations, you should group them together into one operation. This is done with @code{rl_begin_undo_group()} and @code{rl_end_undo_group()}. The types of events that can be undone are: @smallexample enum undo_code @{ UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END @}; @end smallexample Notice that @code{UNDO_DELETE} means to insert some text, and @code{UNDO_INSERT} means to delete some text. That is, the undo code tells what to undo, not how to undo it. @code{UNDO_BEGIN} and @code{UNDO_END} are tags added by @code{rl_begin_undo_group()} and @code{rl_end_undo_group()}. @deftypefun int rl_begin_undo_group (void) Begins saving undo information in a group construct. The undo information usually comes from calls to @code{rl_insert_text()} and @code{rl_delete_text()}, but could be the result of calls to @code{rl_add_undo()}. @end deftypefun @deftypefun int rl_end_undo_group (void) Closes the current undo group started with @code{rl_begin_undo_group ()}. There should be one call to @code{rl_end_undo_group()} for each call to @code{rl_begin_undo_group()}. @end deftypefun @deftypefun void rl_add_undo (enum undo_code what, int start, int end, char *text) Remember how to undo an event (according to @var{what}). The affected text runs from @var{start} to @var{end}, and encompasses @var{text}. @end deftypefun @deftypefun void rl_free_undo_list (void) Free the existing undo list. @end deftypefun @deftypefun int rl_do_undo (void) Undo the first thing on the undo list. Returns @code{0} if there was nothing to undo, non-zero if something was undone. @end deftypefun Finally, if you neither insert nor delete text, but directly modify the existing text (e.g., change its case), call @code{rl_modifying()} once, just before you modify the text. You must supply the indices of the text range that you are going to modify. @deftypefun int rl_modifying (int start, int end) Tell Readline to save the text between @var{start} and @var{end} as a single undo unit. It is assumed that you will subsequently modify that text. @end deftypefun @node Redisplay @subsection Redisplay @deftypefun void rl_redisplay (void) Change what's displayed on the screen to reflect the current contents of @code{rl_line_buffer}. @end deftypefun @deftypefun int rl_forced_update_display (void) Force the line to be updated and redisplayed, whether or not Readline thinks the screen display is correct. @end deftypefun @deftypefun int rl_on_new_line (void) Tell the update functions that we have moved onto a new (empty) line, usually after ouputting a newline. @end deftypefun @deftypefun int rl_on_new_line_with_prompt (void) Tell the update functions that we have moved onto a new line, with @var{rl_prompt} already displayed. This could be used by applications that want to output the prompt string themselves, but still need Readline to know the prompt string length for redisplay. It should be used after setting @var{rl_already_prompted}. @end deftypefun @deftypefun int rl_reset_line_state (void) Reset the display state to a clean state and redisplay the current line starting on a new line. @end deftypefun @deftypefun int rl_crlf (void) Move the cursor to the start of the next screen line. @end deftypefun @deftypefun int rl_show_char (int c) Display character @var{c} on @code{rl_outstream}. If Readline has not been set to display meta characters directly, this will convert meta characters to a meta-prefixed key sequence. This is intended for use by applications which wish to do their own redisplay. @end deftypefun @deftypefun int rl_message (const char *, @dots{}) The arguments are a format string as would be supplied to @code{printf}, possibly containing conversion specifications such as @samp{%d}, and any additional arguments necessary to satisfy the conversion specifications. The resulting string is displayed in the @dfn{echo area}. The echo area is also used to display numeric arguments and search strings. You should call @code{rl_save_prompt} to save the prompt information before calling this function. @end deftypefun @deftypefun int rl_clear_message (void) Clear the message in the echo area. If the prompt was saved with a call to @code{rl_save_prompt} before the last call to @code{rl_message}, call @code{rl_restore_prompt} before calling this function. @end deftypefun @deftypefun void rl_save_prompt (void) Save the local Readline prompt display state in preparation for displaying a new message in the message area with @code{rl_message()}. @end deftypefun @deftypefun void rl_restore_prompt (void) Restore the local Readline prompt display state saved by the most recent call to @code{rl_save_prompt}. if @code{rl_save_prompt} was called to save the prompt before a call to @code{rl_message}, this function should be called before the corresponding call to @code{rl_clear_message}. @end deftypefun @deftypefun int rl_expand_prompt (char *prompt) Expand any special character sequences in @var{prompt} and set up the local Readline prompt redisplay variables. This function is called by @code{readline()}. It may also be called to expand the primary prompt if the @code{rl_on_new_line_with_prompt()} function or @code{rl_already_prompted} variable is used. It returns the number of visible characters on the last line of the (possibly multi-line) prompt. Applications may indicate that the prompt contains characters that take up no physical screen space when displayed by bracketing a sequence of such characters with the special markers @code{RL_PROMPT_START_IGNORE} and @code{RL_PROMPT_END_IGNORE} (declared in @file{readline.h}. This may be used to embed terminal-specific escape sequences in prompts. @end deftypefun @deftypefun int rl_set_prompt (const char *prompt) Make Readline use @var{prompt} for subsequent redisplay. This calls @code{rl_expand_prompt()} to expand the prompt and sets @code{rl_prompt} to the result. @end deftypefun @node Modifying Text @subsection Modifying Text @deftypefun int rl_insert_text (const char *text) Insert @var{text} into the line at the current cursor position. Returns the number of characters inserted. @end deftypefun @deftypefun int rl_delete_text (int start, int end) Delete the text between @var{start} and @var{end} in the current line. Returns the number of characters deleted. @end deftypefun @deftypefun {char *} rl_copy_text (int start, int end) Return a copy of the text between @var{start} and @var{end} in the current line. @end deftypefun @deftypefun int rl_kill_text (int start, int end) Copy the text between @var{start} and @var{end} in the current line to the kill ring, appending or prepending to the last kill if the last command was a kill command. The text is deleted. If @var{start} is less than @var{end}, the text is appended, otherwise prepended. If the last command was not a kill, a new kill ring slot is used. @end deftypefun @deftypefun int rl_push_macro_input (char *macro) Cause @var{macro} to be inserted into the line, as if it had been invoked by a key bound to a macro. Not especially useful; use @code{rl_insert_text()} instead. @end deftypefun @node Character Input @subsection Character Input @deftypefun int rl_read_key (void) Return the next character available from Readline's current input stream. This handles input inserted into the input stream via @var{rl_pending_input} (@pxref{Readline Variables}) and @code{rl_stuff_char()}, macros, and characters read from the keyboard. While waiting for input, this function will call any function assigned to the @code{rl_event_hook} variable. @end deftypefun @deftypefun int rl_getc (FILE *stream) Return the next character available from @var{stream}, which is assumed to be the keyboard. @end deftypefun @deftypefun int rl_stuff_char (int c) Insert @var{c} into the Readline input stream. It will be "read" before Readline attempts to read characters from the terminal with @code{rl_read_key()}. Up to 512 characters may be pushed back. @code{rl_stuff_char} returns 1 if the character was successfully inserted; 0 otherwise. @end deftypefun @deftypefun int rl_execute_next (int c) Make @var{c} be the next command to be executed when @code{rl_read_key()} is called. This sets @var{rl_pending_input}. @end deftypefun @deftypefun int rl_clear_pending_input (void) Unset @var{rl_pending_input}, effectively negating the effect of any previous call to @code{rl_execute_next()}. This works only if the pending input has not already been read with @code{rl_read_key()}. @end deftypefun @deftypefun int rl_set_keyboard_input_timeout (int u) While waiting for keyboard input in @code{rl_read_key()}, Readline will wait for @var{u} microseconds for input before calling any function assigned to @code{rl_event_hook}. @var{u} must be greater than or equal to zero (a zero-length timeout is equivalent to a poll). The default waiting period is one-tenth of a second. Returns the old timeout value. @end deftypefun @node Terminal Management @subsection Terminal Management @deftypefun void rl_prep_terminal (int meta_flag) Modify the terminal settings for Readline's use, so @code{readline()} can read a single character at a time from the keyboard. The @var{meta_flag} argument should be non-zero if Readline should read eight-bit input. @end deftypefun @deftypefun void rl_deprep_terminal (void) Undo the effects of @code{rl_prep_terminal()}, leaving the terminal in the state in which it was before the most recent call to @code{rl_prep_terminal()}. @end deftypefun @deftypefun void rl_tty_set_default_bindings (Keymap kmap) Read the operating system's terminal editing characters (as would be displayed by @code{stty}) to their Readline equivalents. The bindings are performed in @var{kmap}. @end deftypefun @deftypefun void rl_tty_unset_default_bindings (Keymap kmap) Reset the bindings manipulated by @code{rl_tty_set_default_bindings} so that the terminal editing characters are bound to @code{rl_insert}. The bindings are performed in @var{kmap}. @end deftypefun @deftypefun int rl_reset_terminal (const char *terminal_name) Reinitialize Readline's idea of the terminal settings using @var{terminal_name} as the terminal type (e.g., @code{vt100}). If @var{terminal_name} is @code{NULL}, the value of the @code{TERM} environment variable is used. @end deftypefun @node Utility Functions @subsection Utility Functions @deftypefun int rl_save_state (struct readline_state *sp) Save a snapshot of Readline's internal state to @var{sp}. The contents of the @var{readline_state} structure are documented in @file{readline.h}. The caller is responsible for allocating the structure. @end deftypefun @deftypefun int rl_restore_state (struct readline_state *sp) Restore Readline's internal state to that stored in @var{sp}, which must have been saved by a call to @code{rl_save_state}. The contents of the @var{readline_state} structure are documented in @file{readline.h}. The caller is responsible for freeing the structure. @end deftypefun @deftypefun void rl_free (void *mem) Deallocate the memory pointed to by @var{mem}. @var{mem} must have been allocated by @code{malloc}. @end deftypefun @deftypefun void rl_replace_line (const char *text, int clear_undo) Replace the contents of @code{rl_line_buffer} with @var{text}. The point and mark are preserved, if possible. If @var{clear_undo} is non-zero, the undo list associated with the current line is cleared. @end deftypefun @deftypefun void rl_extend_line_buffer (int len) Ensure that @code{rl_line_buffer} has enough space to hold @var{len} characters, possibly reallocating it if necessary. @end deftypefun @deftypefun int rl_initialize (void) Initialize or re-initialize Readline's internal state. It's not strictly necessary to call this; @code{readline()} calls it before reading any input. @end deftypefun @deftypefun int rl_ding (void) Ring the terminal bell, obeying the setting of @code{bell-style}. @end deftypefun @deftypefun int rl_alphabetic (int c) Return 1 if @var{c} is an alphabetic character. @end deftypefun @deftypefun void rl_display_match_list (char **matches, int len, int max) A convenience function for displaying a list of strings in columnar format on Readline's output stream. @code{matches} is the list of strings, in argv format, such as a list of completion matches. @code{len} is the number of strings in @code{matches}, and @code{max} is the length of the longest string in @code{matches}. This function uses the setting of @code{print-completions-horizontally} to select how the matches are displayed (@pxref{Readline Init File Syntax}). When displaying completions, this function sets the number of columns used for display to the value of @code{completion-display-width}, the value of the environment variable @env{COLUMNS}, or the screen width, in that order. @end deftypefun The following are implemented as macros, defined in @code{chardefs.h}. Applications should refrain from using them. @deftypefun int _rl_uppercase_p (int c) Return 1 if @var{c} is an uppercase alphabetic character. @end deftypefun @deftypefun int _rl_lowercase_p (int c) Return 1 if @var{c} is a lowercase alphabetic character. @end deftypefun @deftypefun int _rl_digit_p (int c) Return 1 if @var{c} is a numeric character. @end deftypefun @deftypefun int _rl_to_upper (int c) If @var{c} is a lowercase alphabetic character, return the corresponding uppercase character. @end deftypefun @deftypefun int _rl_to_lower (int c) If @var{c} is an uppercase alphabetic character, return the corresponding lowercase character. @end deftypefun @deftypefun int _rl_digit_value (int c) If @var{c} is a number, return the value it represents. @end deftypefun @node Miscellaneous Functions @subsection Miscellaneous Functions @deftypefun int rl_macro_bind (const char *keyseq, const char *macro, Keymap map) Bind the key sequence @var{keyseq} to invoke the macro @var{macro}. The binding is performed in @var{map}. When @var{keyseq} is invoked, the @var{macro} will be inserted into the line. This function is deprecated; use @code{rl_generic_bind()} instead. @end deftypefun @deftypefun void rl_macro_dumper (int readable) Print the key sequences bound to macros and their values, using the current keymap, to @code{rl_outstream}. If @var{readable} is non-zero, the list is formatted in such a way that it can be made part of an @code{inputrc} file and re-read. @end deftypefun @deftypefun int rl_variable_bind (const char *variable, const char *value) Make the Readline variable @var{variable} have @var{value}. This behaves as if the readline command @samp{set @var{variable} @var{value}} had been executed in an @code{inputrc} file (@pxref{Readline Init File Syntax}). @end deftypefun @deftypefun {char *} rl_variable_value (const char *variable) Return a string representing the value of the Readline variable @var{variable}. For boolean variables, this string is either @samp{on} or @samp{off}. @end deftypefun @deftypefun void rl_variable_dumper (int readable) Print the readline variable names and their current values to @code{rl_outstream}. If @var{readable} is non-zero, the list is formatted in such a way that it can be made part of an @code{inputrc} file and re-read. @end deftypefun @deftypefun int rl_set_paren_blink_timeout (int u) Set the time interval (in microseconds) that Readline waits when showing a balancing character when @code{blink-matching-paren} has been enabled. @end deftypefun @deftypefun {char *} rl_get_termcap (const char *cap) Retrieve the string value of the termcap capability @var{cap}. Readline fetches the termcap entry for the current terminal name and uses those capabilities to move around the screen line and perform other terminal-specific operations, like erasing a line. Readline does not use all of a terminal's capabilities, and this function will return values for only those capabilities Readline uses. @end deftypefun @node Alternate Interface @subsection Alternate Interface An alternate interface is available to plain @code{readline()}. Some applications need to interleave keyboard I/O with file, device, or window system I/O, typically by using a main loop to @code{select()} on various file descriptors. To accomodate this need, readline can also be invoked as a `callback' function from an event loop. There are functions available to make this easy. @deftypefun void rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *lhandler) Set up the terminal for readline I/O and display the initial expanded value of @var{prompt}. Save the value of @var{lhandler} to use as a function to call when a complete line of input has been entered. The function takes the text of the line as an argument. @end deftypefun @deftypefun void rl_callback_read_char (void) Whenever an application determines that keyboard input is available, it should call @code{rl_callback_read_char()}, which will read the next character from the current input source. If that character completes the line, @code{rl_callback_read_char} will invoke the @var{lhandler} function saved by @code{rl_callback_handler_install} to process the line. Before calling the @var{lhandler} function, the terminal settings are reset to the values they had before calling @code{rl_callback_handler_install}. If the @var{lhandler} function returns, the terminal settings are modified for Readline's use again. @code{EOF} is indicated by calling @var{lhandler} with a @code{NULL} line. @end deftypefun @deftypefun void rl_callback_handler_remove (void) Restore the terminal to its initial state and remove the line handler. This may be called from within a callback as well as independently. If the @var{lhandler} installed by @code{rl_callback_handler_install} does not exit the program, either this function or the function referred to by the value of @code{rl_deprep_term_function} should be called before the program exits to reset the terminal settings. @end deftypefun @node A Readline Example @subsection A Readline Example Here is a function which changes lowercase characters to their uppercase equivalents, and uppercase characters to lowercase. If this function was bound to @samp{M-c}, then typing @samp{M-c} would change the case of the character under point. Typing @samp{M-1 0 M-c} would change the case of the following 10 characters, leaving the cursor on the last character changed. @example /* Invert the case of the COUNT following characters. */ int invert_case_line (count, key) int count, key; @{ register int start, end, i; start = rl_point; if (rl_point >= rl_end) return (0); if (count < 0) @{ direction = -1; count = -count; @} else direction = 1; /* Find the end of the range to modify. */ end = start + (count * direction); /* Force it to be within range. */ if (end > rl_end) end = rl_end; else if (end < 0) end = 0; if (start == end) return (0); if (start > end) @{ int temp = start; start = end; end = temp; @} /* Tell readline that we are modifying the line, so it will save the undo information. */ rl_modifying (start, end); for (i = start; i != end; i++) @{ if (_rl_uppercase_p (rl_line_buffer[i])) rl_line_buffer[i] = _rl_to_lower (rl_line_buffer[i]); else if (_rl_lowercase_p (rl_line_buffer[i])) rl_line_buffer[i] = _rl_to_upper (rl_line_buffer[i]); @} /* Move point to on top of the last character changed. */ rl_point = (direction == 1) ? end - 1 : start; return (0); @} @end example @node Readline Signal Handling @section Readline Signal Handling Signals are asynchronous events sent to a process by the Unix kernel, sometimes on behalf of another process. They are intended to indicate exceptional events, like a user pressing the interrupt key on his terminal, or a network connection being broken. There is a class of signals that can be sent to the process currently reading input from the keyboard. Since Readline changes the terminal attributes when it is called, it needs to perform special processing when such a signal is received in order to restore the terminal to a sane state, or provide application writers with functions to do so manually. Readline contains an internal signal handler that is installed for a number of signals (@code{SIGINT}, @code{SIGQUIT}, @code{SIGTERM}, @code{SIGALRM}, @code{SIGTSTP}, @code{SIGTTIN}, and @code{SIGTTOU}). When one of these signals is received, the signal handler will reset the terminal attributes to those that were in effect before @code{readline()} was called, reset the signal handling to what it was before @code{readline()} was called, and resend the signal to the calling application. If and when the calling application's signal handler returns, Readline will reinitialize the terminal and continue to accept input. When a @code{SIGINT} is received, the Readline signal handler performs some additional work, which will cause any partially-entered line to be aborted (see the description of @code{rl_free_line_state()} below). There is an additional Readline signal handler, for @code{SIGWINCH}, which the kernel sends to a process whenever the terminal's size changes (for example, if a user resizes an @code{xterm}). The Readline @code{SIGWINCH} handler updates Readline's internal screen size information, and then calls any @code{SIGWINCH} signal handler the calling application has installed. Readline calls the application's @code{SIGWINCH} signal handler without resetting the terminal to its original state. If the application's signal handler does more than update its idea of the terminal size and return (for example, a @code{longjmp} back to a main processing loop), it @emph{must} call @code{rl_cleanup_after_signal()} (described below), to restore the terminal state. Readline provides two variables that allow application writers to control whether or not it will catch certain signals and act on them when they are received. It is important that applications change the values of these variables only when calling @code{readline()}, not in a signal handler, so Readline's internal signal state is not corrupted. @deftypevar int rl_catch_signals If this variable is non-zero, Readline will install signal handlers for @code{SIGINT}, @code{SIGQUIT}, @code{SIGTERM}, @code{SIGALRM}, @code{SIGTSTP}, @code{SIGTTIN}, and @code{SIGTTOU}. The default value of @code{rl_catch_signals} is 1. @end deftypevar @deftypevar int rl_catch_sigwinch If this variable is non-zero, Readline will install a signal handler for @code{SIGWINCH}. The default value of @code{rl_catch_sigwinch} is 1. @end deftypevar If an application does not wish to have Readline catch any signals, or to handle signals other than those Readline catches (@code{SIGHUP}, for example), Readline provides convenience functions to do the necessary terminal and internal state cleanup upon receipt of a signal. @deftypefun void rl_cleanup_after_signal (void) This function will reset the state of the terminal to what it was before @code{readline()} was called, and remove the Readline signal handlers for all signals, depending on the values of @code{rl_catch_signals} and @code{rl_catch_sigwinch}. @end deftypefun @deftypefun void rl_free_line_state (void) This will free any partial state associated with the current input line (undo information, any partial history entry, any partially-entered keyboard macro, and any partially-entered numeric argument). This should be called before @code{rl_cleanup_after_signal()}. The Readline signal handler for @code{SIGINT} calls this to abort the current input line. @end deftypefun @deftypefun void rl_reset_after_signal (void) This will reinitialize the terminal and reinstall any Readline signal handlers, depending on the values of @code{rl_catch_signals} and @code{rl_catch_sigwinch}. @end deftypefun If an application does not wish Readline to catch @code{SIGWINCH}, it may call @code{rl_resize_terminal()} or @code{rl_set_screen_size()} to force Readline to update its idea of the terminal size when a @code{SIGWINCH} is received. @deftypefun void rl_echo_signal_char (int sig) If an application wishes to install its own signal handlers, but still have readline display characters that generate signals, calling this function with @var{sig} set to @code{SIGINT}, @code{SIGQUIT}, or @code{SIGTSTP} will display the character generating that signal. @end deftypefun @deftypefun void rl_resize_terminal (void) Update Readline's internal screen size by reading values from the kernel. @end deftypefun @deftypefun void rl_set_screen_size (int rows, int cols) Set Readline's idea of the terminal size to @var{rows} rows and @var{cols} columns. If either @var{rows} or @var{columns} is less than or equal to 0, Readline's idea of that terminal dimension is unchanged. @end deftypefun If an application does not want to install a @code{SIGWINCH} handler, but is still interested in the screen dimensions, Readline's idea of the screen size may be queried. @deftypefun void rl_get_screen_size (int *rows, int *cols) Return Readline's idea of the terminal's size in the variables pointed to by the arguments. @end deftypefun @deftypefun void rl_reset_screen_size (void) Cause Readline to reobtain the screen size and recalculate its dimensions. @end deftypefun The following functions install and remove Readline's signal handlers. @deftypefun int rl_set_signals (void) Install Readline's signal handler for @code{SIGINT}, @code{SIGQUIT}, @code{SIGTERM}, @code{SIGALRM}, @code{SIGTSTP}, @code{SIGTTIN}, @code{SIGTTOU}, and @code{SIGWINCH}, depending on the values of @code{rl_catch_signals} and @code{rl_catch_sigwinch}. @end deftypefun @deftypefun int rl_clear_signals (void) Remove all of the Readline signal handlers installed by @code{rl_set_signals()}. @end deftypefun @node Custom Completers @section Custom Completers @cindex application-specific completion functions Typically, a program that reads commands from the user has a way of disambiguating commands and data. If your program is one of these, then it can provide completion for commands, data, or both. The following sections describe how your program and Readline cooperate to provide this service. @menu * How Completing Works:: The logic used to do completion. * Completion Functions:: Functions provided by Readline. * Completion Variables:: Variables which control completion. * A Short Completion Example:: An example of writing completer subroutines. @end menu @node How Completing Works @subsection How Completing Works In order to complete some text, the full list of possible completions must be available. That is, it is not possible to accurately expand a partial word without knowing all of the possible words which make sense in that context. The Readline library provides the user interface to completion, and two of the most common completion functions: filename and username. For completing other types of text, you must write your own completion function. This section describes exactly what such functions must do, and provides an example. There are three major functions used to perform completion: @enumerate @item The user-interface function @code{rl_complete()}. This function is called with the same arguments as other bindable Readline functions: @var{count} and @var{invoking_key}. It isolates the word to be completed and calls @code{rl_completion_matches()} to generate a list of possible completions. It then either lists the possible completions, inserts the possible completions, or actually performs the completion, depending on which behavior is desired. @item The internal function @code{rl_completion_matches()} uses an application-supplied @dfn{generator} function to generate the list of possible matches, and then returns the array of these matches. The caller should place the address of its generator function in @code{rl_completion_entry_function}. @item The generator function is called repeatedly from @code{rl_completion_matches()}, returning a string each time. The arguments to the generator function are @var{text} and @var{state}. @var{text} is the partial word to be completed. @var{state} is zero the first time the function is called, allowing the generator to perform any necessary initialization, and a positive non-zero integer for each subsequent call. The generator function returns @code{(char *)NULL} to inform @code{rl_completion_matches()} that there are no more possibilities left. Usually the generator function computes the list of possible completions when @var{state} is zero, and returns them one at a time on subsequent calls. Each string the generator function returns as a match must be allocated with @code{malloc()}; Readline frees the strings when it has finished with them. Such a generator function is referred to as an @dfn{application-specific completion function}. @end enumerate @deftypefun int rl_complete (int ignore, int invoking_key) Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm (see @code{rl_completion_matches()}). The default is to do filename completion. @end deftypefun @deftypevar {rl_compentry_func_t *} rl_completion_entry_function This is a pointer to the generator function for @code{rl_completion_matches()}. If the value of @code{rl_completion_entry_function} is @code{NULL} then the default filename generator function, @code{rl_filename_completion_function()}, is used. An @dfn{application-specific completion function} is a function whose address is assigned to @code{rl_completion_entry_function} and whose return values are used to generate possible completions. @end deftypevar @node Completion Functions @subsection Completion Functions Here is the complete list of callable completion functions present in Readline. @deftypefun int rl_complete_internal (int what_to_do) Complete the word at or before point. @var{what_to_do} says what to do with the completion. A value of @samp{?} means list the possible completions. @samp{TAB} means do standard completion. @samp{*} means insert all of the possible completions. @samp{!} means to display all of the possible completions, if there is more than one, as well as performing partial completion. @samp{@@} is similar to @samp{!}, but possible completions are not listed if the possible completions share a common prefix. @end deftypefun @deftypefun int rl_complete (int ignore, int invoking_key) Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm (see @code{rl_completion_matches()} and @code{rl_completion_entry_function}). The default is to do filename completion. This calls @code{rl_complete_internal()} with an argument depending on @var{invoking_key}. @end deftypefun @deftypefun int rl_possible_completions (int count, int invoking_key) List the possible completions. See description of @code{rl_complete ()}. This calls @code{rl_complete_internal()} with an argument of @samp{?}. @end deftypefun @deftypefun int rl_insert_completions (int count, int invoking_key) Insert the list of possible completions into the line, deleting the partially-completed word. See description of @code{rl_complete()}. This calls @code{rl_complete_internal()} with an argument of @samp{*}. @end deftypefun @deftypefun int rl_completion_mode (rl_command_func_t *cfunc) Returns the apppriate value to pass to @code{rl_complete_internal()} depending on whether @var{cfunc} was called twice in succession and the values of the @code{show-all-if-ambiguous} and @code{show-all-if-unmodified} variables. Application-specific completion functions may use this function to present the same interface as @code{rl_complete()}. @end deftypefun @deftypefun {char **} rl_completion_matches (const char *text, rl_compentry_func_t *entry_func) Returns an array of strings which is a list of completions for @var{text}. If there are no completions, returns @code{NULL}. The first entry in the returned array is the substitution for @var{text}. The remaining entries are the possible completions. The array is terminated with a @code{NULL} pointer. @var{entry_func} is a function of two args, and returns a @code{char *}. The first argument is @var{text}. The second is a state argument; it is zero on the first call, and non-zero on subsequent calls. @var{entry_func} returns a @code{NULL} pointer to the caller when there are no more matches. @end deftypefun @deftypefun {char *} rl_filename_completion_function (const char *text, int state) A generator function for filename completion in the general case. @var{text} is a partial filename. The Bash source is a useful reference for writing application-specific completion functions (the Bash completion functions call this and other Readline functions). @end deftypefun @deftypefun {char *} rl_username_completion_function (const char *text, int state) A completion generator for usernames. @var{text} contains a partial username preceded by a random character (usually @samp{~}). As with all completion generators, @var{state} is zero on the first call and non-zero for subsequent calls. @end deftypefun @node Completion Variables @subsection Completion Variables @deftypevar {rl_compentry_func_t *} rl_completion_entry_function A pointer to the generator function for @code{rl_completion_matches()}. @code{NULL} means to use @code{rl_filename_completion_function()}, the default filename completer. @end deftypevar @deftypevar {rl_completion_func_t *} rl_attempted_completion_function A pointer to an alternative function to create matches. The function is called with @var{text}, @var{start}, and @var{end}. @var{start} and @var{end} are indices in @code{rl_line_buffer} defining the boundaries of @var{text}, which is a character string. If this function exists and returns @code{NULL}, or if this variable is set to @code{NULL}, then @code{rl_complete()} will call the value of @code{rl_completion_entry_function} to generate matches, otherwise the array of strings returned will be used. If this function sets the @code{rl_attempted_completion_over} variable to a non-zero value, Readline will not perform its default completion even if this function returns no matches. @end deftypevar @deftypevar {rl_quote_func_t *} rl_filename_quoting_function A pointer to a function that will quote a filename in an application-specific fashion. This is called if filename completion is being attempted and one of the characters in @code{rl_filename_quote_characters} appears in a completed filename. The function is called with @var{text}, @var{match_type}, and @var{quote_pointer}. The @var{text} is the filename to be quoted. The @var{match_type} is either @code{SINGLE_MATCH}, if there is only one completion match, or @code{MULT_MATCH}. Some functions use this to decide whether or not to insert a closing quote character. The @var{quote_pointer} is a pointer to any opening quote character the user typed. Some functions choose to reset this character. @end deftypevar @deftypevar {rl_dequote_func_t *} rl_filename_dequoting_function A pointer to a function that will remove application-specific quoting characters from a filename before completion is attempted, so those characters do not interfere with matching the text against names in the filesystem. It is called with @var{text}, the text of the word to be dequoted, and @var{quote_char}, which is the quoting character that delimits the filename (usually @samp{'} or @samp{"}). If @var{quote_char} is zero, the filename was not in an embedded string. @end deftypevar @deftypevar {rl_linebuf_func_t *} rl_char_is_quoted_p A pointer to a function to call that determines whether or not a specific character in the line buffer is quoted, according to whatever quoting mechanism the program calling Readline uses. The function is called with two arguments: @var{text}, the text of the line, and @var{index}, the index of the character in the line. It is used to decide whether a character found in @code{rl_completer_word_break_characters} should be used to break words for the completer. @end deftypevar @deftypevar {rl_compignore_func_t *} rl_ignore_some_completions_function This function, if defined, is called by the completer when real filename completion is done, after all the matching names have been generated. It is passed a @code{NULL} terminated array of matches. The first element (@code{matches[0]}) is the maximal substring common to all matches. This function can re-arrange the list of matches as required, but each element deleted from the array must be freed. @end deftypevar @deftypevar {rl_icppfunc_t *} rl_directory_completion_hook This function, if defined, is allowed to modify the directory portion of filenames Readline completes. It could be used to expand symbolic links or shell variables in pathnames. It is called with the address of a string (the current directory name) as an argument, and may modify that string. If the string is replaced with a new string, the old value should be freed. Any modified directory name should have a trailing slash. The modified value will be used as part of the completion, replacing the directory portion of the pathname the user typed. At the least, even if no other expansion is performed, this function should remove any quote characters from the directory name, because its result will be passed directly to @code{opendir()}. The directory completion hook returns an integer that should be non-zero if the function modifies its directory argument. The function should not modify the directory argument if it returns 0. @end deftypevar @ignore @deftypevar extern rl_icppfunc_t *rl_directory_rewrite_hook; If non-zero, this is the address of a function to call when completing a directory name. This function takes the address of the directory name to be modified as an argument. Unlike @code{rl_directory_completion_hook}, it only modifies the directory name used in @code{opendir}, not what is displayed when the possible completions are printed or inserted. It is called before rl_directory_completion_hook. I'm not happy with how this works yet, so it's undocumented. @end deftypevar @end ignore @deftypevar {rl_dequote_func_t *} rl_filename_rewrite_hook If non-zero, this is the address of a function called when reading directory entries from the filesystem for completion and comparing them to the partial word to be completed. The function should perform any necesary application or system-specific conversion on the filename, such as converting between character sets or converting from a filesystem format to a character input format. The function takes two arguments: @var{fname}, the filename to be converted, and @var{fnlen}, its length in bytes. It must either return its first argument (if no conversion takes place) or the converted filename in newly-allocated memory. The converted form is used to compare against the word to be completed, and, if it matches, is added to the list of matches. Readline will free the allocated string. @end deftypevar @deftypevar {rl_compdisp_func_t *} rl_completion_display_matches_hook If non-zero, then this is the address of a function to call when completing a word would normally display the list of possible matches. This function is called in lieu of Readline displaying the list. It takes three arguments: (@code{char **}@var{matches}, @code{int} @var{num_matches}, @code{int} @var{max_length}) where @var{matches} is the array of matching strings, @var{num_matches} is the number of strings in that array, and @var{max_length} is the length of the longest string in that array. Readline provides a convenience function, @code{rl_display_match_list}, that takes care of doing the display to Readline's output stream. That function may be called from this hook. @end deftypevar @deftypevar {const char *} rl_basic_word_break_characters The basic list of characters that signal a break between words for the completer routine. The default value of this variable is the characters which break words for completion in Bash: @code{" \t\n\"\\'`@@$><=;|&@{("}. @end deftypevar @deftypevar {const char *} rl_basic_quote_characters A list of quote characters which can cause a word break. @end deftypevar @deftypevar {const char *} rl_completer_word_break_characters The list of characters that signal a break between words for @code{rl_complete_internal()}. The default list is the value of @code{rl_basic_word_break_characters}. @end deftypevar @deftypevar {rl_cpvfunc_t *} rl_completion_word_break_hook If non-zero, this is the address of a function to call when Readline is deciding where to separate words for word completion. It should return a character string like @code{rl_completer_word_break_characters} to be used to perform the current completion. The function may choose to set @code{rl_completer_word_break_characters} itself. If the function returns @code{NULL}, @code{rl_completer_word_break_characters} is used. @end deftypevar @deftypevar {const char *} rl_completer_quote_characters A list of characters which can be used to quote a substring of the line. Completion occurs on the entire substring, and within the substring @code{rl_completer_word_break_characters} are treated as any other character, unless they also appear within this list. @end deftypevar @deftypevar {const char *} rl_filename_quote_characters A list of characters that cause a filename to be quoted by the completer when they appear in a completed filename. The default is the null string. @end deftypevar @deftypevar {const char *} rl_special_prefixes The list of characters that are word break characters, but should be left in @var{text} when it is passed to the completion function. Programs can use this to help determine what kind of completing to do. For instance, Bash sets this variable to "$@@" so that it can complete shell variables and hostnames. @end deftypevar @deftypevar int rl_completion_query_items Up to this many items will be displayed in response to a possible-completions call. After that, readline asks the user if she is sure she wants to see them all. The default value is 100. A negative value indicates that Readline should never ask the user. @end deftypevar @deftypevar {int} rl_completion_append_character When a single completion alternative matches at the end of the command line, this character is appended to the inserted completion text. The default is a space character (@samp{ }). Setting this to the null character (@samp{\0}) prevents anything being appended automatically. This can be changed in application-specific completion functions to provide the ``most sensible word separator character'' according to an application-specific command line syntax specification. @end deftypevar @deftypevar int rl_completion_suppress_append If non-zero, @var{rl_completion_append_character} is not appended to matches at the end of the command line, as described above. It is set to 0 before any application-specific completion function is called, and may only be changed within such a function. @end deftypevar @deftypevar int rl_completion_quote_character When Readline is completing quoted text, as delimited by one of the characters in @var{rl_completer_quote_characters}, it sets this variable to the quoting character found. This is set before any application-specific completion function is called. @end deftypevar @deftypevar int rl_completion_suppress_quote If non-zero, Readline does not append a matching quote character when performing completion on a quoted string. It is set to 0 before any application-specific completion function is called, and may only be changed within such a function. @end deftypevar @deftypevar int rl_completion_found_quote When Readline is completing quoted text, it sets this variable to a non-zero value if the word being completed contains or is delimited by any quoting characters, including backslashes. This is set before any application-specific completion function is called. @end deftypevar @deftypevar int rl_completion_mark_symlink_dirs If non-zero, a slash will be appended to completed filenames that are symbolic links to directory names, subject to the value of the user-settable @var{mark-directories} variable. This variable exists so that application-specific completion functions can override the user's global preference (set via the @var{mark-symlinked-directories} Readline variable) if appropriate. This variable is set to the user's preference before any application-specific completion function is called, so unless that function modifies the value, the user's preferences are honored. @end deftypevar @deftypevar int rl_ignore_completion_duplicates If non-zero, then duplicates in the matches are removed. The default is 1. @end deftypevar @deftypevar int rl_filename_completion_desired Non-zero means that the results of the matches are to be treated as filenames. This is @emph{always} zero when completion is attempted, and can only be changed within an application-specific completion function. If it is set to a non-zero value by such a function, directory names have a slash appended and Readline attempts to quote completed filenames if they contain any characters in @code{rl_filename_quote_characters} and @code{rl_filename_quoting_desired} is set to a non-zero value. @end deftypevar @deftypevar int rl_filename_quoting_desired Non-zero means that the results of the matches are to be quoted using double quotes (or an application-specific quoting mechanism) if the completed filename contains any characters in @code{rl_filename_quote_chars}. This is @emph{always} non-zero when completion is attempted, and can only be changed within an application-specific completion function. The quoting is effected via a call to the function pointed to by @code{rl_filename_quoting_function}. @end deftypevar @deftypevar int rl_attempted_completion_over If an application-specific completion function assigned to @code{rl_attempted_completion_function} sets this variable to a non-zero value, Readline will not perform its default filename completion even if the application's completion function returns no matches. It should be set only by an application's completion function. @end deftypevar @deftypevar int rl_sort_completion_matches If an application sets this variable to 0, Readline will not sort the list of completions (which implies that it cannot remove any duplicate completions). The default value is 1, which means that Readline will sort the completions and, depending on the value of @code{rl_ignore_completion_duplicates}, will attempt to remove duplicate matches. @end deftypevar @deftypevar int rl_completion_type Set to a character describing the type of completion Readline is currently attempting; see the description of @code{rl_complete_internal()} (@pxref{Completion Functions}) for the list of characters. This is set to the appropriate value before any application-specific completion function is called, allowing such functions to present the same interface as @code{rl_complete()}. @end deftypevar @deftypevar int rl_completion_invoking_key Set to the final character in the key sequence that invoked one of the completion functions that call @code{rl_complete_internal()}. This is set to the appropriate value before any application-specific completion function is called. @end deftypevar @deftypevar int rl_inhibit_completion If this variable is non-zero, completion is inhibited. The completion character will be inserted as any other bound to @code{self-insert}. @end deftypevar @node A Short Completion Example @subsection A Short Completion Example Here is a small application demonstrating the use of the GNU Readline library. It is called @code{fileman}, and the source code resides in @file{examples/fileman.c}. This sample application provides completion of command names, line editing features, and access to the history list. @page @smallexample /* fileman.c -- A tiny application which demonstrates how to use the GNU Readline library. This application interactively allows users to manipulate files and their modes. */ #ifdef HAVE_CONFIG_H # include <config.h> #endif #include <sys/types.h> #ifdef HAVE_SYS_FILE_H # include <sys/file.h> #endif #include <sys/stat.h> #ifdef HAVE_UNISTD_H # include <unistd.h> #endif #include <fcntl.h> #include <stdio.h> #include <errno.h> #if defined (HAVE_STRING_H) # include <string.h> #else /* !HAVE_STRING_H */ # include <strings.h> #endif /* !HAVE_STRING_H */ #ifdef HAVE_STDLIB_H # include <stdlib.h> #endif #include <time.h> #include <readline/readline.h> #include <readline/history.h> extern char *xmalloc PARAMS((size_t)); /* The names of functions that actually do the manipulation. */ int com_list PARAMS((char *)); int com_view PARAMS((char *)); int com_rename PARAMS((char *)); int com_stat PARAMS((char *)); int com_pwd PARAMS((char *)); int com_delete PARAMS((char *)); int com_help PARAMS((char *)); int com_cd PARAMS((char *)); int com_quit PARAMS((char *)); /* A structure which contains information on the commands this program can understand. */ typedef struct @{ char *name; /* User printable name of the function. */ rl_icpfunc_t *func; /* Function to call to do the job. */ char *doc; /* Documentation for this function. */ @} COMMAND; COMMAND commands[] = @{ @{ "cd", com_cd, "Change to directory DIR" @}, @{ "delete", com_delete, "Delete FILE" @}, @{ "help", com_help, "Display this text" @}, @{ "?", com_help, "Synonym for `help'" @}, @{ "list", com_list, "List files in DIR" @}, @{ "ls", com_list, "Synonym for `list'" @}, @{ "pwd", com_pwd, "Print the current working directory" @}, @{ "quit", com_quit, "Quit using Fileman" @}, @{ "rename", com_rename, "Rename FILE to NEWNAME" @}, @{ "stat", com_stat, "Print out statistics on FILE" @}, @{ "view", com_view, "View the contents of FILE" @}, @{ (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL @} @}; /* Forward declarations. */ char *stripwhite (); COMMAND *find_command (); /* The name of this program, as taken from argv[0]. */ char *progname; /* When non-zero, this global means the user is done using this program. */ int done; char * dupstr (s) char *s; @{ char *r; r = xmalloc (strlen (s) + 1); strcpy (r, s); return (r); @} main (argc, argv) int argc; char **argv; @{ char *line, *s; progname = argv[0]; initialize_readline (); /* Bind our completer. */ /* Loop reading and executing lines until the user quits. */ for ( ; done == 0; ) @{ line = readline ("FileMan: "); if (!line) break; /* Remove leading and trailing whitespace from the line. Then, if there is anything left, add it to the history list and execute it. */ s = stripwhite (line); if (*s) @{ add_history (s); execute_line (s); @} free (line); @} exit (0); @} /* Execute a command line. */ int execute_line (line) char *line; @{ register int i; COMMAND *command; char *word; /* Isolate the command word. */ i = 0; while (line[i] && whitespace (line[i])) i++; word = line + i; while (line[i] && !whitespace (line[i])) i++; if (line[i]) line[i++] = '\0'; command = find_command (word); if (!command) @{ fprintf (stderr, "%s: No such command for FileMan.\n", word); return (-1); @} /* Get argument to command, if any. */ while (whitespace (line[i])) i++; word = line + i; /* Call the function. */ return ((*(command->func)) (word)); @} /* Look up NAME as the name of a command, and return a pointer to that command. Return a NULL pointer if NAME isn't a command name. */ COMMAND * find_command (name) char *name; @{ register int i; for (i = 0; commands[i].name; i++) if (strcmp (name, commands[i].name) == 0) return (&commands[i]); return ((COMMAND *)NULL); @} /* Strip whitespace from the start and end of STRING. Return a pointer into STRING. */ char * stripwhite (string) char *string; @{ register char *s, *t; for (s = string; whitespace (*s); s++) ; if (*s == 0) return (s); t = s + strlen (s) - 1; while (t > s && whitespace (*t)) t--; *++t = '\0'; return s; @} /* **************************************************************** */ /* */ /* Interface to Readline Completion */ /* */ /* **************************************************************** */ char *command_generator PARAMS((const char *, int)); char **fileman_completion PARAMS((const char *, int, int)); /* Tell the GNU Readline library how to complete. We want to try to complete on command names if this is the first word in the line, or on filenames if not. */ initialize_readline () @{ /* Allow conditional parsing of the ~/.inputrc file. */ rl_readline_name = "FileMan"; /* Tell the completer that we want a crack first. */ rl_attempted_completion_function = fileman_completion; @} /* Attempt to complete on the contents of TEXT. START and END bound the region of rl_line_buffer that contains the word to complete. TEXT is the word to complete. We can use the entire contents of rl_line_buffer in case we want to do some simple parsing. Return the array of matches, or NULL if there aren't any. */ char ** fileman_completion (text, start, end) const char *text; int start, end; @{ char **matches; matches = (char **)NULL; /* If this word is at the start of the line, then it is a command to complete. Otherwise it is the name of a file in the current directory. */ if (start == 0) matches = rl_completion_matches (text, command_generator); return (matches); @} /* Generator function for command completion. STATE lets us know whether to start from scratch; without any state (i.e. STATE == 0), then we start at the top of the list. */ char * command_generator (text, state) const char *text; int state; @{ static int list_index, len; char *name; /* If this is a new word to complete, initialize now. This includes saving the length of TEXT for efficiency, and initializing the index variable to 0. */ if (!state) @{ list_index = 0; len = strlen (text); @} /* Return the next name which partially matches from the command list. */ while (name = commands[list_index].name) @{ list_index++; if (strncmp (name, text, len) == 0) return (dupstr(name)); @} /* If no names matched, then return NULL. */ return ((char *)NULL); @} /* **************************************************************** */ /* */ /* FileMan Commands */ /* */ /* **************************************************************** */ /* String to pass to system (). This is for the LIST, VIEW and RENAME commands. */ static char syscom[1024]; /* List the file(s) named in arg. */ com_list (arg) char *arg; @{ if (!arg) arg = ""; sprintf (syscom, "ls -FClg %s", arg); return (system (syscom)); @} com_view (arg) char *arg; @{ if (!valid_argument ("view", arg)) return 1; #if defined (__MSDOS__) /* more.com doesn't grok slashes in pathnames */ sprintf (syscom, "less %s", arg); #else sprintf (syscom, "more %s", arg); #endif return (system (syscom)); @} com_rename (arg) char *arg; @{ too_dangerous ("rename"); return (1); @} com_stat (arg) char *arg; @{ struct stat finfo; if (!valid_argument ("stat", arg)) return (1); if (stat (arg, &finfo) == -1) @{ perror (arg); return (1); @} printf ("Statistics for `%s':\n", arg); printf ("%s has %d link%s, and is %d byte%s in length.\n", arg, finfo.st_nlink, (finfo.st_nlink == 1) ? "" : "s", finfo.st_size, (finfo.st_size == 1) ? "" : "s"); printf ("Inode Last Change at: %s", ctime (&finfo.st_ctime)); printf (" Last access at: %s", ctime (&finfo.st_atime)); printf (" Last modified at: %s", ctime (&finfo.st_mtime)); return (0); @} com_delete (arg) char *arg; @{ too_dangerous ("delete"); return (1); @} /* Print out help for ARG, or for all of the commands if ARG is not present. */ com_help (arg) char *arg; @{ register int i; int printed = 0; for (i = 0; commands[i].name; i++) @{ if (!*arg || (strcmp (arg, commands[i].name) == 0)) @{ printf ("%s\t\t%s.\n", commands[i].name, commands[i].doc); printed++; @} @} if (!printed) @{ printf ("No commands match `%s'. Possibilties are:\n", arg); for (i = 0; commands[i].name; i++) @{ /* Print in six columns. */ if (printed == 6) @{ printed = 0; printf ("\n"); @} printf ("%s\t", commands[i].name); printed++; @} if (printed) printf ("\n"); @} return (0); @} /* Change to the directory ARG. */ com_cd (arg) char *arg; @{ if (chdir (arg) == -1) @{ perror (arg); return 1; @} com_pwd (""); return (0); @} /* Print out the current working directory. */ com_pwd (ignore) char *ignore; @{ char dir[1024], *s; s = getcwd (dir, sizeof(dir) - 1); if (s == 0) @{ printf ("Error getting pwd: %s\n", dir); return 1; @} printf ("Current directory is %s\n", dir); return 0; @} /* The user wishes to quit using this program. Just set DONE non-zero. */ com_quit (arg) char *arg; @{ done = 1; return (0); @} /* Function which tells you that you can't do this. */ too_dangerous (caller) char *caller; @{ fprintf (stderr, "%s: Too dangerous for me to distribute. Write it yourself.\n", caller); @} /* Return non-zero if ARG is a valid argument for CALLER, else print an error message and return zero. */ int valid_argument (caller, arg) char *caller, *arg; @{ if (!arg || !*arg) @{ fprintf (stderr, "%s: Argument required.\n", caller); return (0); @} return (1); @} @end smallexample ������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/doc/history.3����������������������������������������������������������������0000644�0001750�0001750�00000053241�12250770610�016205� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.\" .\" MAN PAGE COMMENTS to .\" .\" Chet Ramey .\" Information Network Services .\" Case Western Reserve University .\" chet@ins.CWRU.Edu .\" .\" Last Change: Thu Aug 12 22:24:41 EDT 2010 .\" .TH HISTORY 3 "2010 August 12" "GNU History 6.2" .\" .\" File Name macro. This used to be `.PN', for Path Name, .\" but Sun doesn't seem to like that very much. .\" .de FN \fI\|\\$1\|\fP .. .ds lp \fR\|(\fP .ds rp \fR\|)\fP .\" FnN return-value fun-name N arguments .de Fn1 \fI\\$1\fP \fB\\$2\fP \\*(lp\fI\\$3\fP\\*(rp .br .. .de Fn2 .if t \fI\\$1\fP \fB\\$2\fP \\*(lp\fI\\$3,\|\\$4\fP\\*(rp .if n \fI\\$1\fP \fB\\$2\fP \\*(lp\fI\\$3, \\$4\fP\\*(rp .br .. .de Fn3 .if t \fI\\$1\fP \fB\\$2\fP \\*(lp\fI\\$3,\|\\$4,\|\\$5\fP\|\\*(rp .if n \fI\\$1\fP \fB\\$2\fP \\*(lp\fI\\$3, \\$4, \\$5\fP\\*(rp .br .. .de Vb \fI\\$1\fP \fB\\$2\fP .br .. .SH NAME history \- GNU History Library .SH COPYRIGHT .if t The GNU History Library is Copyright \(co 1989-2011 by the Free Software Foundation, Inc. .if n The GNU History Library is Copyright (C) 1989-2011 by the Free Software Foundation, Inc. .SH DESCRIPTION Many programs read input from the user a line at a time. The GNU History library is able to keep track of those lines, associate arbitrary data with each line, and utilize information from previous lines in composing new ones. .PP .SH "HISTORY EXPANSION" .PP The history library supports a history expansion feature that is identical to the history expansion in .BR bash. This section describes what syntax features are available. .PP 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. .PP History expansion is usually performed immediately after a complete line is read. It takes place in two parts. The first is to determine which line from the history list to use during substitution. The second is to select portions of that line for inclusion into the current one. The line selected from the history is the \fIevent\fP, and the portions of that line that are acted upon are \fIwords\fP. Various \fImodifiers\fP are available to manipulate the selected words. The line is broken into words in the same fashion as \fBbash\fP does when reading input, so that several words that would otherwise be separated are considered one word when surrounded by quotes (see the description of \fBhistory_tokenize()\fP below). History expansions are introduced by the appearance of the history expansion character, which is \^\fB!\fP\^ by default. Only backslash (\^\fB\e\fP\^) and single quotes can quote the history expansion character. .SS Event Designators .PP An event designator is a reference to a command line entry in the history list. Unless the reference is absolute, events are relative to the current position in the history list. .PP .PD 0 .TP .B ! Start a history substitution, except when followed by a .BR blank , newline, = or (. .TP .B !\fIn\fR Refer to command line .IR n . .TP .B !\-\fIn\fR Refer to the current command minus .IR n . .TP .B !! Refer to the previous command. This is a synonym for `!\-1'. .TP .B !\fIstring\fR Refer to the most recent command preceding the current position in the history list starting with .IR string . .TP .B !?\fIstring\fR\fB[?]\fR Refer to the most recent command preceding the current postition in the history list containing .IR string . The trailing \fB?\fP may be omitted if .I string is followed immediately by a newline. .TP .B \d\s+2^\s-2\u\fIstring1\fP\d\s+2^\s-2\u\fIstring2\fP\d\s+2^\s-2\u Quick substitution. Repeat the last command, replacing .I string1 with .IR string2 . Equivalent to ``!!:s/\fIstring1\fP/\fIstring2\fP/'' (see \fBModifiers\fP below). .TP .B !# The entire command line typed so far. .PD .SS Word Designators .PP Word designators are used to select desired words from the event. A .B : separates the event specification from the word designator. It may be omitted if the word designator begins with a .BR ^ , .BR $ , .BR * , .BR \- , or .BR % . 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. .PP .PD 0 .TP .B 0 (zero) The zeroth word. For the shell, this is the command word. .TP .I n The \fIn\fRth word. .TP .B ^ The first argument. That is, word 1. .TP .B $ The last argument. .TP .B % The word matched by the most recent `?\fIstring\fR?' search. .TP .I x\fB\-\fPy A range of words; `\-\fIy\fR' abbreviates `0\-\fIy\fR'. .TP .B * All of the words but the zeroth. This is a synonym for `\fI1\-$\fP'. It is not an error to use .B * if there is just one word in the event; the empty string is returned in that case. .TP .B x* Abbreviates \fIx\-$\fP. .TP .B x\- Abbreviates \fIx\-$\fP like \fBx*\fP, but omits the last word. .PD .PP If a word designator is supplied without an event specification, the previous command is used as the event. .SS Modifiers .PP After the optional word designator, there may appear a sequence of one or more of the following modifiers, each preceded by a `:'. .PP .PD 0 .PP .TP .B h Remove a trailing file name component, leaving only the head. .TP .B t Remove all leading file name components, leaving the tail. .TP .B r Remove a trailing suffix of the form \fI.xxx\fP, leaving the basename. .TP .B e Remove all but the trailing suffix. .TP .B p Print the new command but do not execute it. .TP .B q Quote the substituted words, escaping further substitutions. .TP .B x Quote the substituted words as with .BR q , but break into words at .B blanks and newlines. .TP .B s/\fIold\fP/\fInew\fP/ Substitute .I new for the first occurrence of .I old in the event line. Any delimiter can be used in place of /. The final delimiter is optional if it is the last character of the event line. The delimiter may be quoted in .I old and .I new with a single backslash. If & appears in .IR new , it is replaced by .IR old . A single backslash will quote the &. If .I old is null, it is set to the last .I old substituted, or, if no previous history substitutions took place, the last .I string in a .B !?\fIstring\fR\fB[?]\fR search. .TP .B & Repeat the previous substitution. .TP .B g Cause changes to be applied over the entire event line. This is used in conjunction with `\fB:s\fP' (e.g., `\fB:gs/\fIold\fP/\fInew\fP/\fR') or `\fB:&\fP'. If used with `\fB:s\fP', any delimiter can be used in place of /, and the final delimiter is optional if it is the last character of the event line. An \fBa\fP may be used as a synonym for \fBg\fP. .TP .B G Apply the following `\fBs\fP' modifier once to each word in the event line. .PD .SH "PROGRAMMING WITH HISTORY FUNCTIONS" This section describes how to use the History library in other programs. .SS Introduction to History .PP The programmer using the History library has available functions for remembering lines on a history list, associating arbitrary data with a line, removing lines from the list, searching through the list for a line containing an arbitrary text string, and referencing any line in the list directly. In addition, a history \fIexpansion\fP function is available which provides for a consistent user interface across different programs. .PP The user using programs written with the History library has the benefit of a consistent user interface with a set of well-known commands for manipulating the text of previous lines and using that text in new commands. The basic history manipulation commands are identical to the history substitution provided by \fBbash\fP. .PP If the programmer desires, he can use the Readline library, which includes some history manipulation by default, and has the added advantage of command line editing. .PP Before declaring any functions using any functionality the History library provides in other code, an application writer should include the file .FN <readline/history.h> in any file that uses the History library's features. It supplies extern declarations for all of the library's public functions and variables, and declares all of the public data structures. .SS History Storage .PP The history list is an array of history entries. A history entry is declared as follows: .PP .Vb "typedef void *" histdata_t; .PP .nf typedef struct _hist_entry { char *line; char *timestamp; histdata_t data; } HIST_ENTRY; .fi .PP The history list itself might therefore be declared as .PP .Vb "HIST_ENTRY **" the_history_list; .PP The state of the History library is encapsulated into a single structure: .PP .nf /* * A structure used to pass around the current state of the history. */ typedef struct _hist_state { HIST_ENTRY **entries; /* Pointer to the entries themselves. */ int offset; /* The location pointer within this array. */ int length; /* Number of elements within this array. */ int size; /* Number of slots allocated to this array. */ int flags; } HISTORY_STATE; .fi .PP If the flags member includes \fBHS_STIFLED\fP, the history has been stifled. .SH "History Functions" .PP This section describes the calling sequence for the various functions exported by the GNU History library. .SS Initializing History and State Management This section describes functions used to initialize and manage the state of the History library when you want to use the history functions in your program. .Fn1 void using_history void Begin a session in which the history functions might be used. This initializes the interactive variables. .Fn1 "HISTORY_STATE *" history_get_history_state void Return a structure describing the current state of the input history. .Fn1 void history_set_history_state "HISTORY_STATE *state" Set the state of the history list according to \fIstate\fP. .SS History List Management These functions manage individual entries on the history list, or set parameters managing the list itself. .Fn1 void add_history "const char *string" Place \fIstring\fP at the end of the history list. The associated data field (if any) is set to \fBNULL\fP. .Fn1 void add_history_time "const char *string" Change the time stamp associated with the most recent history entry to \fIstring\fP. .Fn1 "HIST_ENTRY *" remove_history "int which" Remove history entry at offset \fIwhich\fP from the history. The removed element is returned so you can free the line, data, and containing structure. .Fn1 "histdata_t" free_history_entry "HIST_ENTRY *histent" Free the history entry \fIhistent\fP and any history library private data associated with it. Returns the application-specific data so the caller can dispose of it. .Fn3 "HIST_ENTRY *" replace_history_entry "int which" "const char *line" "histdata_t data" Make the history entry at offset \fIwhich\fP have \fIline\fP and \fIdata\fP. This returns the old entry so the caller can dispose of any application-specific data. In the case of an invalid \fIwhich\fP, a \fBNULL\fP pointer is returned. .Fn1 void clear_history "void" Clear the history list by deleting all the entries. .Fn1 void stifle_history "int max" Stifle the history list, remembering only the last \fImax\fP entries. .Fn1 int unstifle_history "void" Stop stifling the history. This returns the previously-set maximum number of history entries (as set by \fBstifle_history()\fP). history was stifled. The value is positive if the history was stifled, negative if it wasn't. .Fn1 int history_is_stifled "void" Returns non-zero if the history is stifled, zero if it is not. .SS Information About the History List These functions return information about the entire history list or individual list entries. .Fn1 "HIST_ENTRY **" history_list "void" Return a \fBNULL\fP terminated array of \fIHIST_ENTRY *\fP which is the current input history. Element 0 of this list is the beginning of time. If there is no history, return \fBNULL\fP. .Fn1 int where_history "void" Returns the offset of the current history element. .Fn1 "HIST_ENTRY *" current_history "void" Return the history entry at the current position, as determined by \fBwhere_history()\fP. If there is no entry there, return a \fBNULL\fP pointer. .Fn1 "HIST_ENTRY *" history_get "int offset" Return the history entry at position \fIoffset\fP, starting from \fBhistory_base\fP. If there is no entry there, or if \fIoffset\fP is greater than the history length, return a \fBNULL\fP pointer. .Fn1 "time_t" history_get_time "HIST_ENTRY *" Return the time stamp associated with the history entry passed as the argument. .Fn1 int history_total_bytes "void" Return the number of bytes that the primary history entries are using. This function returns the sum of the lengths of all the lines in the history. .SS Moving Around the History List These functions allow the current index into the history list to be set or changed. .Fn1 int history_set_pos "int pos" Set the current history offset to \fIpos\fP, an absolute index into the list. Returns 1 on success, 0 if \fIpos\fP is less than zero or greater than the number of history entries. .Fn1 "HIST_ENTRY *" previous_history "void" Back up the current history offset to the previous history entry, and return a pointer to that entry. If there is no previous entry, return a \fBNULL\fP pointer. .Fn1 "HIST_ENTRY *" next_history "void" Move the current history offset forward to the next history entry, and return the a pointer to that entry. If there is no next entry, return a \fBNULL\fP pointer. .SS Searching the History List These functions allow searching of the history list for entries containing a specific string. Searching may be performed both forward and backward from the current history position. The search may be \fIanchored\fP, meaning that the string must match at the beginning of the history entry. .Fn2 int history_search "const char *string" "int direction" Search the history for \fIstring\fP, starting at the current history offset. If \fIdirection\fP is less than 0, then the search is through previous entries, otherwise through subsequent entries. If \fIstring\fP is found, then the current history index is set to that history entry, and the value returned is the offset in the line of the entry where \fIstring\fP was found. Otherwise, nothing is changed, and a -1 is returned. .Fn2 int history_search_prefix "const char *string" "int direction" Search the history for \fIstring\fP, starting at the current history offset. The search is anchored: matching lines must begin with \fIstring\fP. If \fIdirection\fP is less than 0, then the search is through previous entries, otherwise through subsequent entries. If \fIstring\fP is found, then the current history index is set to that entry, and the return value is 0. Otherwise, nothing is changed, and a -1 is returned. .Fn3 int history_search_pos "const char *string" "int direction" "int pos" Search for \fIstring\fP in the history list, starting at \fIpos\fP, an absolute index into the list. If \fIdirection\fP is negative, the search proceeds backward from \fIpos\fP, otherwise forward. Returns the absolute index of the history element where \fIstring\fP was found, or -1 otherwise. .SS Managing the History File The History library can read the history from and write it to a file. This section documents the functions for managing a history file. .Fn1 int read_history "const char *filename" Add the contents of \fIfilename\fP to the history list, a line at a time. If \fIfilename\fP is \fBNULL\fP, then read from \fI~/.history\fP. Returns 0 if successful, or \fBerrno\fP if not. .Fn3 int read_history_range "const char *filename" "int from" "int to" Read a range of lines from \fIfilename\fP, adding them to the history list. Start reading at line \fIfrom\fP and end at \fIto\fP. If \fIfrom\fP is zero, start at the beginning. If \fIto\fP is less than \fIfrom\fP, then read until the end of the file. If \fIfilename\fP is \fBNULL\fP, then read from \fI~/.history\fP. Returns 0 if successful, or \fBerrno\fP if not. .Fn1 int write_history "const char *filename" Write the current history to \fIfilename\fP, overwriting \fIfilename\fP if necessary. If \fIfilename\fP is \fBNULL\fP, then write the history list to \fI~/.history\fP. Returns 0 on success, or \fBerrno\fP on a read or write error. .Fn2 int append_history "int nelements" "const char *filename" Append the last \fInelements\fP of the history list to \fIfilename\fP. If \fIfilename\fP is \fBNULL\fP, then append to \fI~/.history\fP. Returns 0 on success, or \fBerrno\fP on a read or write error. .Fn2 int history_truncate_file "const char *filename" "int nlines" Truncate the history file \fIfilename\fP, leaving only the last \fInlines\fP lines. If \fIfilename\fP is \fBNULL\fP, then \fI~/.history\fP is truncated. Returns 0 on success, or \fBerrno\fP on failure. .SS History Expansion These functions implement history expansion. .Fn2 int history_expand "char *string" "char **output" Expand \fIstring\fP, placing the result into \fIoutput\fP, a pointer to a string. Returns: .RS .PD 0 .TP 0 If no expansions took place (or, if the only change in the text was the removal of escape characters preceding the history expansion character); .TP 1 if expansions did take place; .TP -1 if there was an error in expansion; .TP 2 if the returned line should be displayed, but not executed, as with the \fB:p\fP modifier. .PD .RE If an error ocurred in expansion, then \fIoutput\fP contains a descriptive error message. .Fn3 "char *" get_history_event "const char *string" "int *cindex" "int qchar" Returns the text of the history event beginning at \fIstring\fP + \fI*cindex\fP. \fI*cindex\fP is modified to point to after the event specifier. At function entry, \fIcindex\fP points to the index into \fIstring\fP where the history event specification begins. \fIqchar\fP is a character that is allowed to end the event specification in addition to the ``normal'' terminating characters. .Fn1 "char **" history_tokenize "const char *string" Return an array of tokens parsed out of \fIstring\fP, much as the shell might. The tokens are split on the characters in the \fBhistory_word_delimiters\fP variable, and shell quoting conventions are obeyed. .Fn3 "char *" history_arg_extract "int first" "int last" "const char *string" Extract a string segment consisting of the \fIfirst\fP through \fIlast\fP arguments present in \fIstring\fP. Arguments are split using \fBhistory_tokenize()\fP. .SS History Variables This section describes the externally-visible variables exported by the GNU History Library. .Vb int history_base The logical offset of the first entry in the history list. .Vb int history_length The number of entries currently stored in the history list. .Vb int history_max_entries The maximum number of history entries. This must be changed using \fBstifle_history()\fP. .Vb int history_wite_timestamps If non-zero, timestamps are written to the history file, so they can be preserved between sessions. The default value is 0, meaning that timestamps are not saved. The current timestamp format uses the value of \fIhistory_comment_char\fP to delimit timestamp entries in the history file. If that variable does not have a value (the default), timestamps will not be written. .Vb char history_expansion_char The character that introduces a history event. The default is \fB!\fP. Setting this to 0 inhibits history expansion. .Vb char history_subst_char The character that invokes word substitution if found at the start of a line. The default is \fB^\fP. .Vb char history_comment_char During tokenization, if this character is seen as the first character of a word, then it and all subsequent characters up to a newline are ignored, suppressing history expansion for the remainder of the line. This is disabled by default. .Vb "char *" history_word_delimiters The characters that separate tokens for \fBhistory_tokenize()\fP. The default value is \fB"\ \et\en()<>;&|"\fP. .Vb "char *" history_no_expand_chars The list of characters which inhibit history expansion if found immediately following \fBhistory_expansion_char\fP. The default is space, tab, newline, \fB\er\fP, and \fB=\fP. .Vb "char *" history_search_delimiter_chars The list of additional characters which can delimit a history search string, in addition to space, tab, \fI:\fP and \fI?\fP in the case of a substring search. The default is empty. .Vb int history_quotes_inhibit_expansion If non-zero, single-quoted words are not scanned for the history expansion character. The default value is 0. .Vb "rl_linebuf_func_t *" history_inhibit_expansion_function This should be set to the address of a function that takes two arguments: a \fBchar *\fP (\fIstring\fP) and an \fBint\fP index into that string (\fIi\fP). It should return a non-zero value if the history expansion starting at \fIstring[i]\fP should not be performed; zero if the expansion should be done. It is intended for use by applications like \fBbash\fP that use the history expansion character for additional purposes. By default, this variable is set to \fBNULL\fP. .SH FILES .PD 0 .TP .FN ~/.history Default filename for reading and writing saved history .PD .SH "SEE ALSO" .PD 0 .TP \fIThe Gnu Readline Library\fP, Brian Fox and Chet Ramey .TP \fIThe Gnu History Library\fP, Brian Fox and Chet Ramey .TP \fIbash\fP(1) .TP \fIreadline\fP(3) .PD .SH AUTHORS Brian Fox, Free Software Foundation .br bfox@gnu.org .PP Chet Ramey, Case Western Reserve University .br chet@ins.CWRU.Edu .SH BUG REPORTS If you find a bug in the .B history library, you should report it. But first, you should make sure that it really is a bug, and that it appears in the latest version of the .B history library that you have. .PP Once you have determined that a bug actually exists, mail a bug report to \fIbug\-readline\fP@\fIgnu.org\fP. If you have a fix, you are welcome to mail that as well! Suggestions and `philosophical' bug reports may be mailed to \fPbug-readline\fP@\fIgnu.org\fP or posted to the Usenet newsgroup .BR gnu.bash.bug . .PP Comments and bug reports concerning this manual page should be directed to .IR chet@ins.CWRU.Edu . ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdb-doc-7.6.2/readline/doc/readline.3���������������������������������������������������������������0000644�0001750�0001750�00000121766�12250770610�016277� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������.\" .\" MAN PAGE COMMENTS to .\" .\" Chet Ramey .\" Information Network Services .\" Case Western Reserve University .\" chet@ins.CWRU.Edu .\" .\" Last Change: Sat Aug 28 18:56:32 EDT 2010 .\" .TH READLINE 3 "2010 August 28" "GNU Readline 6.2" .\" .\" File Name macro. This used to be `.PN', for Path Name, .\" but Sun doesn't seem to like that very much. .\" .de FN \fI\|\\$1\|\fP .. .SH NAME readline \- get a line from a user with editing .SH SYNOPSIS .LP .nf .ft B #include <stdio.h> #include <readline/readline.h> #include <readline/history.h> .ft .fi .LP .nf \fIchar *\fP .br \fBreadline\fP (\fIconst char *prompt\fP); .fi .SH COPYRIGHT .if n Readline is Copyright (C) 1989\-2011 Free Software Foundation, Inc. .if t Readline is Copyright \(co 1989\-2011 Free Software Foundation, Inc. .SH DESCRIPTION .LP .B readline will read a line from the terminal and return it, using .B prompt as a prompt. If .B prompt is \fBNULL\fP or the empty string, no prompt is issued. The line returned is allocated with .IR malloc (3); the caller must free it when finished. The line returned has the final newline removed, so only the text of the line remains. .LP .B readline offers editing capabilities while the user is entering the line. By default, the line editing commands are similar to those of emacs. A vi\-style line editing interface is also available. .LP This manual page describes only the most basic use of \fBreadline\fP. Much more functionality is available; see \fIThe GNU Readline Library\fP and \fIThe GNU History Library\fP for additional information. .SH RETURN VALUE .LP .B readline returns the text of the line read. A blank line returns the empty string. If .B EOF is encountered while reading a line, and the line is empty, .B NULL is returned. If an .B EOF is read with a non\-empty line, it is treated as a newline. .SH NOTATION .LP An Emacs-style notation is used to denote keystrokes. Control keys are denoted by C\-\fIkey\fR, e.g., C\-n means Control\-N. Similarly, .I meta keys are denoted by M\-\fIkey\fR, so M\-x means Meta\-X. (On keyboards without a .I meta key, M\-\fIx\fP means ESC \fIx\fP, i.e., press the Escape key then the .I x key. This makes ESC the \fImeta prefix\fP. The combination M\-C\-\fIx\fP means ESC\-Control\-\fIx\fP, or press the Escape key then hold the Control key while pressing the .I x key.) .PP Readline commands may be given numeric .IR arguments , which normally act as a repeat count. Sometimes, however, it is the sign of the argument that is significant. Passing a negative argument to a command that acts in the forward direction (e.g., \fBkill\-line\fP) causes that command to act in a backward direction. Commands whose behavior with arguments deviates from this are noted. .PP When a command is described as \fIkilling\fP text, the text deleted is saved for possible future retrieval (\fIyanking\fP). The killed text is saved in a \fIkill ring\fP. Consecutive kills cause the text to be accumulated into one unit, which can be yanked all at once. Commands which do not kill text separate the chunks of text on the kill ring. .SH INITIALIZATION FILE .LP Readline is customized by putting commands in an initialization file (the \fIinputrc\fP file). The name of this file is taken from the value of the .B INPUTRC environment variable. If that variable is unset, the default is .IR ~/.inputrc . If that file does not exist or cannot be read, the ultimate default is .IR /etc/inputrc . When a program which uses the readline library starts up, the init file is read, and the key bindings and variables are set. There are only a few basic constructs allowed in the readline init file. Blank lines are ignored. Lines beginning with a \fB#\fP are comments. Lines beginning with a \fB$\fP indicate conditional constructs. Other lines denote key bindings and variable settings. Each program using this library may add its own commands and bindings. .PP For example, placing .RS .PP M\-Control\-u: universal\-argument .RE or .RS C\-Meta\-u: universal\-argument .RE .sp into the .I inputrc would make M\-C\-u execute the readline command .IR universal\-argument . .PP The following symbolic character names are recognized while processing key bindings: .IR DEL , .IR ESC , .IR ESCAPE , .IR LFD , .IR NEWLINE , .IR RET , .IR RETURN , .IR RUBOUT , .IR SPACE , .IR SPC , and .IR TAB . .PP In addition to command names, readline allows keys to be bound to a string that is inserted when the key is pressed (a \fImacro\fP). .PP .SS Key Bindings .PP The syntax for controlling key bindings in the .I inputrc file is simple. All that is required is the name of the command or the text of a macro and a key sequence to which it should be bound. The name may be specified in one of two ways: as a symbolic key name, possibly with \fIMeta\-\fP or \fIControl\-\fP prefixes, or as a key sequence. The name and key sequence are separated by a colon. There can be no whitespace between the name and the colon. .PP When using the form \fBkeyname\fP:\^\fIfunction-name\fP or \fImacro\fP, .I keyname is the name of a key spelled out in English. For example: .sp .RS Control\-u: universal\-argument .br Meta\-Rubout: backward\-kill\-word .br Control\-o: "> output" .RE .LP In the above example, .I C\-u is bound to the function .BR universal\-argument , .I M-DEL is bound to the function .BR backward\-kill\-word , and .I C\-o is bound to run the macro expressed on the right hand side (that is, to insert the text .if t \f(CW> output\fP .if n ``> output'' into the line). .PP In the second form, \fB"keyseq"\fP:\^\fIfunction\-name\fP or \fImacro\fP, .B keyseq differs from .B keyname above in that strings denoting an entire key sequence may be specified by placing the sequence within double quotes. Some GNU Emacs style key escapes can be used, as in the following example, but the symbolic character names are not recognized. .sp .RS "\eC\-u": universal\-argument .br "\eC\-x\eC\-r": re\-read\-init\-file .br "\ee[11~": "Function Key 1" .RE .PP In this example, .I C-u is again bound to the function .BR universal\-argument . .I "C-x C-r" is bound to the function .BR re\-read\-init\-file , and .I "ESC [ 1 1 ~" is bound to insert the text .if t \f(CWFunction Key 1\fP. .if n ``Function Key 1''. .PP The full set of GNU Emacs style escape sequences available when specifying key sequences is .RS .PD 0 .TP .B \eC\- control prefix .TP .B \eM\- meta prefix .TP .B \ee an escape character .TP .B \e\e backslash .TP .B \e" literal ", a double quote .TP .B \e' literal ', a single quote .RE .PD .PP In addition to the GNU Emacs style escape sequences, a second set of backslash escapes is available: .RS .PD 0 .TP .B \ea alert (bell) .TP .B \eb backspace .TP .B \ed delete .TP .B \ef form feed .TP .B \en newline .TP .B \er carriage return .TP .B \et horizontal tab .TP .B \ev vertical tab .TP .B \e\fInnn\fP the eight-bit character whose value is the octal value \fInnn\fP (one to three digits) .TP .B \ex\fIHH\fP the eight-bit character whose value is the hexadecimal value \fIHH\fP (one or two hex digits) .RE .PD .PP When entering the text of a macro, single or double quotes should 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 " and '. .PP .B Bash allows the current readline key bindings to be displayed or modified with the .B bind builtin command. The editing mode may be switched during interactive use by using the .B \-o option to the .B set builtin command. Other programs using this library provide similar mechanisms. The .I inputrc file may be edited and re-read if a program does not provide any other means to incorporate new bindings. .SS Variables .PP Readline has variables that can be used to further customize its behavior. A variable may be set in the .I inputrc file with a statement of the form .RS .PP \fBset\fP \fIvariable\-name\fP \fIvalue\fP .RE .PP Except where noted, readline variables can take the values .B On or .B Off (without regard to case). Unrecognized variable names are ignored. When a variable value is read, empty or null values, "on" (case-insensitive), and "1" are equivalent to \fBOn\fP. All other values are equivalent to \fBOff\fP. The variables and their default values are: .PP .PD 0 .TP .B bell\-style (audible) Controls what happens when readline wants to ring the terminal bell. If set to \fBnone\fP, readline never rings the bell. If set to \fBvisible\fP, readline uses a visible bell if one is available. If set to \fBaudible\fP, readline attempts to ring the terminal's bell. .TP .B bind\-tty\-special\-chars (On) If set to \fBOn\fP, readline attempts to bind the control characters treated specially by the kernel's terminal driver to their readline equivalents. .TP .B comment\-begin (``#'') The string that is inserted in \fBvi\fP mode when the .B insert\-comment command is executed. This command is bound to .B M\-# in emacs mode and to .B # in vi command mode. .TP .B completion\-display\-width (-1) The number of screen columns used to display possible matches when performing completion. The value is ignored if it is less than 0 or greater than the terminal screen width. A value of 0 will cause matches to be displayed one per line. The default value is -1. .TP .B completion\-ignore\-case (Off) If set to \fBOn\fP, readline performs filename matching and completion in a case\-insensitive fashion. .TP .B completion\-map\-case (Off) If set to \fBOn\fP, and \fBcompletion\-ignore\-case\fP is enabled, readline treats hyphens (\fI\-\fP) and underscores (\fI_\fP) as equivalent when performing case\-insensitive filename matching and completion. .TP .B completion\-prefix\-display\-length (0) The length in characters of the common prefix of a list of possible completions that is displayed without modification. When set to a value greater than zero, common prefixes longer than this value are replaced with an ellipsis when displaying possible completions. .TP .B completion\-query\-items (100) This determines when the user is queried about viewing the number of possible completions generated by the \fBpossible\-completions\fP command. It may be set to any integer value greater than or equal to zero. If the number of possible completions is greater than or equal to the value of this variable, the user is asked whether or not he wishes to view them; otherwise they are simply listed on the terminal. A negative value causes readline to never ask. .TP .B convert\-meta (On) If set to \fBOn\fP, readline will convert characters with the eighth bit set to an ASCII key sequence by stripping the eighth bit and prefixing it with an escape character (in effect, using escape as the \fImeta prefix\fP). .TP .B disable\-completion (Off) If set to \fBOn\fP, readline will inhibit word completion. Completion characters will be inserted into the line as if they had been mapped to \fBself-insert\fP. .TP .B editing\-mode (emacs) Controls whether readline begins with a set of key bindings similar to \fIEmacs\fP or \fIvi\fP. .B editing\-mode can be set to either .B emacs or .BR vi . .TP .B echo\-control\-characters (On) When set to \fBOn\fP, on operating systems that indicate they support it, readline echoes a character corresponding to a signal generated from the keyboard. .TP .B enable\-keypad (Off) When set to \fBOn\fP, readline will try to enable the application keypad when it is called. Some systems need this to enable the arrow keys. .TP .B enable\-meta\-key (On) When set to \fBOn\fP, readline will try to enable any meta modifier key the terminal claims to support when it is called. On many terminals, the meta key is used to send eight-bit characters. .TP .B expand\-tilde (Off) If set to \fBOn\fP, tilde expansion is performed when readline attempts word completion. .TP .B history\-preserve\-point (Off) If set to \fBOn\fP, the history code attempts to place point at the same location on each history line retrieved with \fBprevious-history\fP or \fBnext-history\fP. .TP .B history\-size (0) Set the maximum number of history entries saved in the history list. If set to zero, the number of entries in the history list is not limited. .TP .B horizontal\-scroll\-mode (Off) When set to \fBOn\fP, makes readline use a single line for display, scrolling the input horizontally on a single screen line when it becomes longer than the screen width rather than wrapping to a new line. .TP .B input\-meta (Off) If set to \fBOn\fP, readline will enable eight-bit input (that is, it will not clear the eighth bit in the characters it reads), regardless of what the terminal claims it can support. The name .B meta\-flag is a synonym for this variable. .TP .B isearch\-terminators (``C\-[ C\-J'') The string of characters that should terminate an incremental search without subsequently executing the character as a command. If this variable has not been given a value, the characters \fIESC\fP and \fIC\-J\fP will terminate an incremental search. .TP .B keymap (emacs) Set the current readline keymap. The set of legal keymap names is \fIemacs, emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move, vi-command\fP, and .IR vi-insert . \fIvi\fP is equivalent to \fIvi-command\fP; \fIemacs\fP is equivalent to \fIemacs-standard\fP. The default value is .IR emacs . The value of .B editing\-mode also affects the default keymap. .TP .B mark\-directories (On) If set to \fBOn\fP, completed directory names have a slash appended. .TP .B mark\-modified\-lines (Off) If set to \fBOn\fP, history lines that have been modified are displayed with a preceding asterisk (\fB*\fP). .TP .B mark\-symlinked\-directories (Off) If set to \fBOn\fP, completed names which are symbolic links to directories have a slash appended (subject to the value of \fBmark\-directories\fP). .TP .B match\-hidden\-files (On) This variable, when set to \fBOn\fP, causes readline to match files whose names begin with a `.' (hidden files) when performing filename completion. If set to \fBOff\fP, the leading `.' must be supplied by the user in the filename to be completed. .TP .B menu\-complete\-display\-prefix (Off) If set to \fBOn\fP, menu completion displays the common prefix of the list of possible completions (which may be empty) before cycling through the list. .TP .B output\-meta (Off) If set to \fBOn\fP, readline will display characters with the eighth bit set directly rather than as a meta-prefixed escape sequence. .TP .B page\-completions (On) If set to \fBOn\fP, readline uses an internal \fImore\fP-like pager to display a screenful of possible completions at a time. .TP .B print\-completions\-horizontally (Off) If set to \fBOn\fP, readline will display completions with matches sorted horizontally in alphabetical order, rather than down the screen. .TP .B revert\-all\-at\-newline (Off) If set to \fBOn\fP, readline will undo all changes to history lines before returning when \fBaccept\-line\fP is executed. By default, history lines may be modified and retain individual undo lists across calls to \fBreadline\fP. .TP .B show\-all\-if\-ambiguous (Off) This alters the default behavior of the completion functions. If set to .BR On , words which have more than one possible completion cause the matches to be listed immediately instead of ringing the bell. .TP .B show\-all\-if\-unmodified (Off) This alters the default behavior of the completion functions in a fashion similar to \fBshow\-all\-if\-ambiguous\fP. If set to .BR On , words which have more than one possible completion without any possible partial completion (the possible completions don't share a common prefix) cause the matches to be listed immediately instead of ringing the bell. .TP .B skip\-completed\-text (Off) If set to \fBOn\fP, this alters the default completion behavior when inserting a single match into the line. It's only active when performing completion in the middle of a word. If enabled, readline does not insert characters from the completion that match characters after point in the word being completed, so portions of the word following the cursor are not duplicated. .TP .B visible\-stats (Off) If set to \fBOn\fP, a character denoting a file's type as reported by \fIstat\fP(2) is appended to the filename when listing possible completions. .PD .SS Conditional Constructs .PP 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. .IP \fB$if\fP The .B $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. .RS .IP \fBmode\fP The \fBmode=\fP form of the \fB$if\fP directive is used to test whether readline is in emacs or vi mode. This may be used in conjunction with the \fBset keymap\fP command, for instance, to set bindings in the \fIemacs-standard\fP and \fIemacs-ctlx\fP keymaps only if readline is starting out in emacs mode. .IP \fBterm\fP The \fBterm=\fP 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 .B = is tested against the full name of the terminal and the portion of the terminal name before the first \fB\-\fP. This allows .I sun to match both .I sun and .IR sun\-cmd , for instance. .IP \fBapplication\fP The \fBapplication\fP construct is used to include application-specific settings. Each program using the readline library sets the \fIapplication name\fP, and an initialization file 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 \fBbash\fP: .sp 1 .RS .nf \fB$if\fP Bash # Quote the current or previous word "\eC-xq": "\eeb\e"\eef\e"" \fB$endif\fP .fi .RE .RE .IP \fB$endif\fP This command, as seen in the previous example, terminates an \fB$if\fP command. .IP \fB$else\fP Commands in this branch of the \fB$if\fP directive are executed if the test fails. .IP \fB$include\fP This directive takes a single filename as an argument and reads commands and bindings from that file. For example, the following directive would read \fI/etc/inputrc\fP: .sp 1 .RS .nf \fB$include\fP \^ \fI/etc/inputrc\fP .fi .RE .SH SEARCHING .PP Readline provides commands for searching through the command history for lines containing a specified string. There are two search modes: .I incremental and .IR non-incremental . .PP 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 \fBC\-r\fP. Typing \fBC\-s\fP searches forward through the history. The characters present in the value of the \fBisearch-terminators\fP variable are used to terminate an incremental search. If that variable has not been assigned a value the \fIEscape\fP and \fBC\-J\fP characters will terminate an incremental search. \fBC\-G\fP 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. .PP To find other matching entries in the history list, type \fBC\-s\fP or \fBC\-r\fP as appropriate. This will search backward or forward in the history for the next line 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 newline 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. .PP 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. .SH EDITING COMMANDS .PP The following is a list of the names of the commands and the default key sequences to which they are bound. Command names without an accompanying key sequence are unbound by default. .PP In the following descriptions, \fIpoint\fP refers to the current cursor position, and \fImark\fP refers to a cursor position saved by the \fBset\-mark\fP command. The text between the point and mark is referred to as the \fIregion\fP. .SS Commands for Moving .PP .PD 0 .TP .B beginning\-of\-line (C\-a) Move to the start of the current line. .TP .B end\-of\-line (C\-e) Move to the end of the line. .TP .B forward\-char (C\-f) Move forward a character. .TP .B backward\-char (C\-b) Move back a character. .TP .B forward\-word (M\-f) Move forward to the end of the next word. Words are composed of alphanumeric characters (letters and digits). .TP .B backward\-word (M\-b) Move back to the start of the current or previous word. Words are composed of alphanumeric characters (letters and digits). .TP .B clear\-screen (C\-l) Clear the screen leaving the current line at the top of the screen. With an argument, refresh the current line without clearing the screen. .TP .B redraw\-current\-line Refresh the current line. .PD .SS Commands for Manipulating the History .PP .PD 0 .TP .B accept\-line (Newline, Return) 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 \fBadd_history()\fP. If the line is a modified history line, the history line is restored to its original state. .TP .B previous\-history (C\-p) Fetch the previous command from the history list, moving back in the list. .TP .B next\-history (C\-n) Fetch the next command from the history list, moving forward in the list. .TP .B beginning\-of\-history (M\-<) Move to the first line in the history. .TP .B end\-of\-history (M\->) Move to the end of the input history, i.e., the line currently being entered. .TP .B 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. .TP .B forward\-search\-history (C\-s) Search forward starting at the current line and moving `down' through the history as necessary. This is an incremental search. .TP .B non\-incremental\-reverse\-search\-history (M\-p) Search backward through the history starting at the current line using a non-incremental search for a string supplied by the user. .TP .B non\-incremental\-forward\-search\-history (M\-n) Search forward through the history using a non-incremental search for a string supplied by the user. .TP .B history\-search\-forward Search forward through the history for the string of characters between the start of the current line and the current cursor position (the \fIpoint\fP). This is a non-incremental search. .TP .B 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. .TP .B 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 .IR n , insert the \fIn\fPth word from the previous command (the words in the previous command begin with word 0). A negative argument inserts the \fIn\fPth word from the end of the previous command. Once the argument \fIn\fP is computed, the argument is extracted as if the "!\fIn\fP" history expansion had been specified. .TP .B yank\-last\-arg (M\-.\^, M\-_\^) Insert the last argument to the previous command (the last word of the previous history entry). With a numeric argument, behave exactly like \fByank\-nth\-arg\fP. Successive calls to \fByank\-last\-arg\fP move back through the history list, inserting the last word (or the word specified by the argument to the first call) of each line in turn. Any numeric argument supplied to these successive calls determines the direction to move through the history. A negative argument switches the direction through the history (back or forward). The history expansion facilities are used to extract the last argument, as if the "!$" history expansion had been specified. .PD .SS Commands for Changing Text .PP .PD 0 .TP .B 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 \fBdelete\-char\fP, then return .SM .BR EOF . .TP .B backward\-delete\-char (Rubout) Delete the character behind the cursor. When given a numeric argument, save the deleted text on the kill ring. .TP .B 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. .TP .B quoted\-insert (C\-q, C\-v) Add the next character that you type to the line verbatim. This is how to insert characters like \fBC\-q\fP, for example. .TP .B tab\-insert (M-TAB) Insert a tab character. .TP .B self\-insert (a,\ b,\ A,\ 1,\ !,\ ...) Insert the character typed. .TP .B transpose\-chars (C\-t) Drag the character before point forward over the character at point, moving point forward as well. If point is at the end of the line, then this transposes the two characters before point. Negative arguments have no effect. .TP .B transpose\-words (M\-t) Drag the word before point past the word after point, moving point over that word as well. If point is at the end of the line, this transposes the last two words on the line. .TP .B upcase\-word (M\-u) Uppercase the current (or following) word. With a negative argument, uppercase the previous word, but do not move point. .TP .B downcase\-word (M\-l) Lowercase the current (or following) word. With a negative argument, lowercase the previous word, but do not move point. .TP .B capitalize\-word (M\-c) Capitalize the current (or following) word. With a negative argument, capitalize the previous word, but do not move point. .TP .B 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 \fBemacs\fP mode; \fBvi\fP mode does overwrite differently. Each call to \fIreadline()\fP starts in insert mode. In overwrite mode, characters bound to \fBself\-insert\fP replace the text at point rather than pushing the text to the right. Characters bound to \fBbackward\-delete\-char\fP replace the character before point with a space. By default, this command is unbound. .PD .SS Killing and Yanking .PP .PD 0 .TP .B kill\-line (C\-k) Kill the text from point to the end of the line. .TP .B backward\-kill\-line (C\-x Rubout) Kill backward to the beginning of the line. .TP .B unix\-line\-discard (C\-u) Kill backward from point to the beginning of the line. The killed text is saved on the kill-ring. .\" There is no real difference between this and backward-kill-line .TP .B kill\-whole\-line Kill all characters on the current line, no matter where point is. .TP .B kill\-word (M\-d) Kill from point 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 \fBforward\-word\fP. .TP .B backward\-kill\-word (M\-Rubout) Kill the word behind point. Word boundaries are the same as those used by \fBbackward\-word\fP. .TP .B 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. .TP .B unix\-filename\-rubout Kill the word behind point, using white space and the slash character as the word boundaries. The killed text is saved on the kill-ring. .TP .B delete\-horizontal\-space (M\-\e) Delete all spaces and tabs around point. .TP .B kill\-region Kill the text between the point and \fImark\fP (saved cursor position). This text is referred to as the \fIregion\fP. .TP .B copy\-region\-as\-kill Copy the text in the region to the kill buffer. .TP .B copy\-backward\-word Copy the word before point to the kill buffer. The word boundaries are the same as \fBbackward\-word\fP. .TP .B copy\-forward\-word Copy the word following point to the kill buffer. The word boundaries are the same as \fBforward\-word\fP. .TP .B yank (C\-y) Yank the top of the kill ring into the buffer at point. .TP .B yank\-pop (M\-y) Rotate the kill ring, and yank the new top. Only works following .B yank or .BR yank\-pop . .PD .SS Numeric Arguments .PP .PD 0 .TP .B digit\-argument (M\-0, M\-1, ..., M\-\-) Add this digit to the argument already accumulating, or start a new argument. M\-\- starts a negative argument. .TP .B 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 .B 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. .PD .SS Completing .PP .PD 0 .TP .B complete (TAB) Attempt to perform completion on the text before point. The actual completion performed is application-specific. .BR Bash , for instance, attempts completion treating the text as a variable (if the text begins with \fB$\fP), username (if the text begins with \fB~\fP), hostname (if the text begins with \fB@\fP), or command (including aliases and functions) in turn. If none of these produces a match, filename completion is attempted. .BR Gdb , on the other hand, allows completion of program functions and variables, and only attempts filename completion under certain circumstances. .TP .B possible\-completions (M\-?) List the possible completions of the text before point. When displaying completions, readline sets the number of columns used for display to the value of \fBcompletion-display-width\fP, the value of the environment variable .SM .BR COLUMNS , or the screen width, in that order. .TP .B insert\-completions (M\-*) Insert all completions of the text before point that would have been generated by \fBpossible\-completions\fP. .TP .B menu\-complete Similar to \fBcomplete\fP, but replaces the word to be completed with a single match from the list of possible completions. Repeated execution of \fBmenu\-complete\fP 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 \fBbell\-style\fP) and the original text is restored. An argument of \fIn\fP moves \fIn\fP 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 \fBTAB\fP, but is unbound by default. .TP .B menu\-complete\-backward Identical to \fBmenu\-complete\fP, but moves backward through the list of possible completions, as if \fBmenu\-complete\fP had been given a negative argument. This command is unbound by default. .TP .B delete\-char\-or\-list Deletes the character under the cursor if not at the beginning or end of the line (like \fBdelete-char\fP). If at the end of the line, behaves identically to \fBpossible-completions\fP. .PD .SS Keyboard Macros .PP .PD 0 .TP .B start\-kbd\-macro (C\-x (\^) Begin saving the characters typed into the current keyboard macro. .TP .B end\-kbd\-macro (C\-x )\^) Stop saving the characters typed into the current keyboard macro and store the definition. .TP .B 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. .PD .SS Miscellaneous .PP .PD 0 .TP .B re\-read\-init\-file (C\-x C\-r) Read in the contents of the \fIinputrc\fP file, and incorporate any bindings or variable assignments found there. .TP .B abort (C\-g) Abort the current editing command and ring the terminal's bell (subject to the setting of .BR bell\-style ). .TP .B do\-uppercase\-version (M\-a, M\-b, M\-\fIx\fP, ...) If the metafied character \fIx\fP is lowercase, run the command that is bound to the corresponding uppercase character. .TP .B prefix\-meta (ESC) Metafy the next character typed. .SM .B ESC .B f is equivalent to .BR Meta\-f . .TP .B undo (C\-_, C\-x C\-u) Incremental undo, separately remembered for each line. .TP .B revert\-line (M\-r) Undo all changes made to this line. This is like executing the .B undo command enough times to return the line to its initial state. .TP .B tilde\-expand (M\-&) Perform tilde expansion on the current word. .TP .B set\-mark (C\-@, M\-<space>) Set the mark to the point. If a numeric argument is supplied, the mark is set to that position. .TP .B 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. .TP .B 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. .TP .B 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. .TP .B skip\-csi\-sequence Read enough characters to consume a multi-key sequence such as those defined for keys like Home and End. Such sequences begin with a Control Sequence Indicator (CSI), usually ESC\-[. If this sequence is bound to "\e[", keys producing such sequences will have no effect unless explicitly bound to a readline command, instead of inserting stray characters into the editing buffer. This is unbound by default, but usually bound to ESC\-[. .TP .B insert\-comment (M\-#) Without a numeric argument, the value of the readline .B 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 \fBcomment\-begin\fP, the value is inserted, otherwise the characters in \fBcomment-begin\fP are deleted from the beginning of the line. In either case, the line is accepted as if a newline had been typed. The default value of .B comment\-begin makes 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. .TP .B 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 \fIinputrc\fP file. .TP .B 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 \fIinputrc\fP file. .TP .B 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 \fIinputrc\fP file. .TP .B emacs\-editing\-mode (C\-e) When in .B vi command mode, this causes a switch to .B emacs editing mode. .TP .B vi\-editing\-mode (M\-C\-j) When in .B emacs editing mode, this causes a switch to .B vi editing mode. .PD .SH DEFAULT KEY BINDINGS .LP The following is a list of the default emacs and vi bindings. Characters with the eighth bit set are written as M\-<character>, and are referred to as .I metafied characters. The printable ASCII characters not mentioned in the list of emacs standard bindings are bound to the .B self\-insert function, which just inserts the given character into the input line. In vi insertion mode, all characters not specifically mentioned are bound to .BR self\-insert . Characters assigned to signal generation by .IR stty (1) or the terminal driver, such as C-Z or C-C, retain that function. Upper and lower case metafied characters are bound to the same function in the emacs mode meta keymap. The remaining characters are unbound, which causes readline to ring the bell (subject to the setting of the .B bell\-style variable). .SS Emacs Mode .RS +.6i .nf .ta 2.5i .sp Emacs Standard bindings .sp "C-@" set-mark "C-A" beginning-of-line "C-B" backward-char "C-D" delete-char "C-E" end-of-line "C-F" forward-char "C-G" abort "C-H" backward-delete-char "C-I" complete "C-J" accept-line "C-K" kill-line "C-L" clear-screen "C-M" accept-line "C-N" next-history "C-P" previous-history "C-Q" quoted-insert "C-R" reverse-search-history "C-S" forward-search-history "C-T" transpose-chars "C-U" unix-line-discard "C-V" quoted-insert "C-W" unix-word-rubout "C-Y" yank "C-]" character-search "C-_" undo "\^ " to "/" self-insert "0" to "9" self-insert ":" to "~" self-insert "C-?" backward-delete-char .PP Emacs Meta bindings .sp "M-C-G" abort "M-C-H" backward-kill-word "M-C-I" tab-insert "M-C-J" vi-editing-mode "M-C-M" vi-editing-mode "M-C-R" revert-line "M-C-Y" yank-nth-arg "M-C-[" complete "M-C-]" character-search-backward "M-space" set-mark "M-#" insert-comment "M-&" tilde-expand "M-*" insert-completions "M--" digit-argument "M-." yank-last-arg "M-0" digit-argument "M-1" digit-argument "M-2" digit-argument "M-3" digit-argument "M-4" digit-argument "M-5" digit-argument "M-6" digit-argument "M-7" digit-argument "M-8" digit-argument "M-9" digit-argument "M-<" beginning-of-history "M-=" possible-completions "M->" end-of-history "M-?" possible-completions "M-B" backward-word "M-C" capitalize-word "M-D" kill-word "M-F" forward-word "M-L" downcase-word "M-N" non-incremental-forward-search-history "M-P" non-incremental-reverse-search-history "M-R" revert-line "M-T" transpose-words "M-U" upcase-word "M-Y" yank-pop "M-\e" delete-horizontal-space "M-~" tilde-expand "M-C-?" backward-kill-word "M-_" yank-last-arg .PP Emacs Control-X bindings .sp "C-XC-G" abort "C-XC-R" re-read-init-file "C-XC-U" undo "C-XC-X" exchange-point-and-mark "C-X(" start-kbd-macro "C-X)" end-kbd-macro "C-XE" call-last-kbd-macro "C-XC-?" backward-kill-line .sp .RE .SS VI Mode bindings .RS +.6i .nf .ta 2.5i .sp .PP VI Insert Mode functions .sp "C-D" vi-eof-maybe "C-H" backward-delete-char "C-I" complete "C-J" accept-line "C-M" accept-line "C-R" reverse-search-history "C-S" forward-search-history "C-T" transpose-chars "C-U" unix-line-discard "C-V" quoted-insert "C-W" unix-word-rubout "C-Y" yank "C-[" vi-movement-mode "C-_" undo "\^ " to "~" self-insert "C-?" backward-delete-char .PP VI Command Mode functions .sp "C-D" vi-eof-maybe "C-E" emacs-editing-mode "C-G" abort "C-H" backward-char "C-J" accept-line "C-K" kill-line "C-L" clear-screen "C-M" accept-line "C-N" next-history "C-P" previous-history "C-Q" quoted-insert "C-R" reverse-search-history "C-S" forward-search-history "C-T" transpose-chars "C-U" unix-line-discard "C-V" quoted-insert "C-W" unix-word-rubout "C-Y" yank "C-_" vi-undo "\^ " forward-char "#" insert-comment "$" end-of-line "%" vi-match "&" vi-tilde-expand "*" vi-complete "+" next-history "," vi-char-search "-" previous-history "." vi-redo "/" vi-search "0" beginning-of-line "1" to "9" vi-arg-digit ";" vi-char-search "=" vi-complete "?" vi-search "A" vi-append-eol "B" vi-prev-word "C" vi-change-to "D" vi-delete-to "E" vi-end-word "F" vi-char-search "G" vi-fetch-history "I" vi-insert-beg "N" vi-search-again "P" vi-put "R" vi-replace "S" vi-subst "T" vi-char-search "U" revert-line "W" vi-next-word "X" backward-delete-char "Y" vi-yank-to "\e" vi-complete "^" vi-first-print "_" vi-yank-arg "`" vi-goto-mark "a" vi-append-mode "b" vi-prev-word "c" vi-change-to "d" vi-delete-to "e" vi-end-word "f" vi-char-search "h" backward-char "i" vi-insertion-mode "j" next-history "k" prev-history "l" forward-char "m" vi-set-mark "n" vi-search-again "p" vi-put "r" vi-change-char "s" vi-subst "t" vi-char-search "u" vi-undo "w" vi-next-word "x" vi-delete "y" vi-yank-to "|" vi-column "~" vi-change-case .RE .SH "SEE ALSO" .PD 0 .TP \fIThe Gnu Readline Library\fP, Brian Fox and Chet Ramey .TP \fIThe Gnu History Library\fP, Brian Fox and Chet Ramey .TP \fIbash\fP(1) .PD .SH FILES .PD 0 .TP .FN ~/.inputrc Individual \fBreadline\fP initialization file .PD .SH AUTHORS Brian Fox, Free Software Foundation .br bfox@gnu.org .PP Chet Ramey, Case Western Reserve University .br chet@ins.CWRU.Edu .SH BUG REPORTS If you find a bug in .B readline, you should report it. But first, you should make sure that it really is a bug, and that it appears in the latest version of the .B readline library that you have. .PP Once you have determined that a bug actually exists, mail a bug report to \fIbug\-readline\fP@\fIgnu.org\fP. If you have a fix, you are welcome to mail that as well! Suggestions and `philosophical' bug reports may be mailed to \fPbug-readline\fP@\fIgnu.org\fP or posted to the Usenet newsgroup .BR gnu.bash.bug . .PP Comments and bug reports concerning this manual page should be directed to .IR chet@ins.CWRU.Edu . .SH BUGS .PP It's too big and too slow. ����������gdb-doc-7.6.2/readline/doc/rluserman.texi�����������������������������������������������������������0000644�0001750�0001750�00000004670�12250770610�017325� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������\input texinfo @c -*-texinfo-*- @comment %**start of header (This is for running Texinfo on a region.) @setfilename rluserman.info @settitle GNU Readline Library @comment %**end of header (This is for running Texinfo on a region.) @include version.texi @copying This manual describes the end user interface of the GNU Readline Library (version @value{VERSION}, @value{UPDATED}), a library which aids in the consistency of user interface across discrete programs which provide a command line interface. Copyright @copyright{} 1988--2011 Free Software Foundation, Inc. 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. @quotation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover texts being ``A GNU Manual'', and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled ``GNU Free Documentation License''. (a) The FSF's Back-Cover Text is: You are free to copy and modify this GNU manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom.'' @end quotation @end copying @dircategory Libraries @direntry * RLuserman: (rluserman). The GNU readline library User's Manual. @end direntry @titlepage @title GNU Readline Library User Interface @subtitle Edition @value{EDITION}, for @code{Readline Library} Version @value{VERSION}. @subtitle @value{UPDATED-MONTH} @author Chet Ramey, Case Western Reserve University @author Brian Fox, Free Software Foundation @page @vskip 0pt plus 1filll @insertcopying @sp 1 Published by the Free Software Foundation @* 59 Temple Place, Suite 330, @* Boston, MA 02111-1307 @* USA @* @end titlepage @contents @ifnottex @node Top @top GNU Readline Library This document describes the end user interface of the GNU Readline Library, a utility which aids in the consistency of user interface across discrete programs which provide a command line interface. @menu * Command Line Editing:: GNU Readline User's Manual. * GNU Free Documentation License:: License for copying this manual. @end menu @end ifnottex @include rluser.texi @node GNU Free Documentation License @appendix GNU Free Documentation License @include fdl.texi @bye ������������������������������������������������������������������������gdb-doc-7.6.2/readline/doc/texi2html����������������������������������������������������������������0000755�0001750�0001750�00000424307�12250770610�016273� 0����������������������������������������������������������������������������������������������������ustar �zumbi���������������������������zumbi������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /usr/bin/perl 'di '; 'ig 00 '; #+############################################################################## # # texi2html: Program to transform Texinfo documents to HTML # # Copyright (C) 1999, 2000 Free Software Foundation, Inc. # # 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 3 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, see <http://www.gnu.org/licenses/>. # #-############################################################################## # This requires perl version 5 or higher require 5.0; #++############################################################################## # # NOTE FOR DEBUGGING THIS SCRIPT: # You can run 'perl texi2html.pl' directly, provided you have # the environment variable T2H_HOME set to the directory containing # the texi2html.init file # #--############################################################################## # CVS version: # $Id$ # Homepage: $T2H_HOMEPAGE = <<EOT; http://www.mathematik.uni-kl.de/~obachman/Texi2html EOT # Authors: $T2H_AUTHORS = <<EOT; Written by: Lionel Cons <Lionel.Cons\@cern.ch> (original author) Karl Berry <karl\@freefriends.org> Olaf Bachmann <obachman\@mathematik.uni-kl.de> and many others. Maintained by: Olaf Bachmann <obachman\@mathematik.uni-kl.de> Send bugs and suggestions to <texi2html\@mathematik.uni-kl.de> EOT # Version: set in configure.in $THISVERSION = '1.64'; $THISPROG = "texi2html $THISVERSION"; # program name and version # The man page for this program is included at the end of this file and can be # viewed using the command 'nroff -man texi2html'. # Identity: $T2H_TODAY = &pretty_date; # like "20 September 1993" # the eval prevents this from breaking on system which do not have # a proper getpwuid implemented eval { ($T2H_USER = (getpwuid ($<))[6]) =~ s/,.*//;}; # Who am i #+++############################################################################ # # # Initialization # # Pasted content of File $(srcdir)/texi2html.init: Default initializations # # # #---############################################################################ # leave this within comments, and keep the require statement # This way, you can directly run texi2html.pl, if $ENV{T2H_HOME}/texi2html.init # exists. # # -*-perl-*- ###################################################################### # File: texi2html.init # # Sets default values for command-line arguments and for various customizable # procedures # # A copy of this file is pasted into the beginning of texi2html by # 'make texi2html' # # Copy this file and make changes to it, if you like. # Afterwards, either, load it with command-line option -init_file <your_init_file> # # $Id$ ###################################################################### # stuff which can also be set by command-line options # # # Note: values set here, overwrite values set by the command-line # options before -init_file and might still be overwritten by # command-line arguments following the -init_file option # # T2H_OPTIONS is a hash whose keys are the (long) names of valid # command-line options and whose values are a hash with the following keys: # type ==> one of !|=i|:i|=s|:s (see GetOpt::Long for more info) # linkage ==> ref to scalar, array, or subroutine (see GetOpt::Long for more info) # verbose ==> short description of option (displayed by -h) # noHelp ==> if 1 -> for "not so important options": only print description on -h 1 # 2 -> for obsolete options: only print description on -h 2 $T2H_DEBUG = 0; $T2H_OPTIONS -> {debug} = { type => '=i', linkage => \$main::T2H_DEBUG, verbose => 'output HTML with debuging information', }; $T2H_DOCTYPE = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'; $T2H_OPTIONS -> {doctype} = { type => '=s', linkage => \$main::T2H_DOCTYPE, verbose => 'document type which is output in header of HTML files', noHelp => 1 }; $T2H_CHECK = 0; $T2H_OPTIONS -> {check} = { type => '!', linkage => \$main::T2H_CHECK, verbose => 'if set, only check files and output all things that may be Texinfo commands', noHelp => 1 }; # -expand # if set to "tex" (or, "info") expand @iftex and @tex (or, @ifinfo) sections # else, neither expand @iftex, @tex, nor @ifinfo sections $T2H_EXPAND = "info"; $T2H_OPTIONS -> {expand} = { type => '=s', linkage => \$T2H_EXPAND, verbose => 'Expand info|tex|none section of texinfo source', }; # - glossary #if set, uses section named `Footnotes' for glossary $T2H_USE_GLOSSARY = 0; T2H_OPTIONS -> {glossary} = { type => '!', linkage => \$T2H_USE_GLOSSARY, verbose => "if set, uses section named `Footnotes' for glossary", noHelp => 1, }; # -invisible # $T2H_INVISIBLE_MARK is the text used to create invisible destination # anchors for index links (you can for instance use the invisible.xbm # file shipped with this program). This is a workaround for a known # bug of many WWW browsers, including netscape. # For me, it works fine without it -- on the contrary: if there, it # inserts space between headers and start of text (obachman 3/99) $T2H_INVISIBLE_MARK = ''; # $T2H_INVISIBLE_MARK = ' '; $T2H_OPTIONS -> {invisible} = { type => '=s', linkage => \$T2H_INVISIBLE_MARK, verbose => 'use text in invisble anchot', noHelp => 1, }; # -iso # if set, ISO8879 characters are used for special symbols (like copyright, etc) $T2H_USE_ISO = 0; $T2H_OPTIONS -> {iso} = { type => 'iso', linkage => \$T2H_USE_ISO, verbose => 'if set, ISO8879 characters are used for special symbols (like copyright, etc)', noHelp => 1, }; # -I # list directories where @include files are searched for (besides the # directory of the doc file) additional '-I' args add to this list @T2H_INCLUDE_DIRS = ("."); $T2H_OPTIONS -> {I} = { type => '=s', linkage => \@T2H_INCLUDE_DIRS, verbose => 'append $s to the @include search path', }; # -top_file # uses file of this name for top-level file # extension is manipulated appropriately, if necessary. # If empty, <basename of document>.html is used # Typically, you would set this to "index.html". $T2H_TOP_FILE = ''; $T2H_OPTIONS -> {top_file} = { type => '=s', linkage => \$T2H_TOP_FILE, verbose => 'use $s as top file, instead of <docname>.html', }; # -toc_file # uses file of this name for table of contents file # extension is manipulated appropriately, if necessary. # If empty, <basename of document>_toc.html is used $T2H_TOC_FILE = ''; $T2H_OPTIONS -> {toc_file} = { type => '=s', linkage => \$T2H_TOC_FILE, verbose => 'use $s as ToC file, instead of <docname>_toc.html', }; # -frames # if set, output two additional files which use HTML 4.0 "frames". $T2H_FRAMES = 0; $T2H_OPTIONS -> {frames} = { type => '!', linkage => \$T2H_FRAMES, verbose => 'output files which use HTML 4.0 frames (experimental)', noHelp => 1, }; # -menu | -nomenu # if set, show the Texinfo menus $T2H_SHOW_MENU = 1; $T2H_OPTIONS -> {menu} = { type => '!', linkage => \$T2H_SHOW_MENU, verbose => 'ouput Texinfo menus', }; # -number | -nonumber # if set, number sections and show section names and numbers in references # and menus $T2H_NUMBER_SECTIONS = 1; $T2H_OPTIONS -> {number} = { type => '!', linkage => \$T2H_NUMBER_SECTIONS, verbose => 'use numbered sections' }; # if set, and T2H_NUMBER_SECTIONS is set, then use node names in menu # entries, instead of section names $T2H_NODE_NAME_IN_MENU = 0; # if set and menu entry equals menu descr, then do not print menu descr. # Likewise, if node name equals entry name, do not print entry name. $T2H_AVOID_MENU_REDUNDANCY = 1; # -split section|chapter|none # if set to 'section' (resp. 'chapter') create one html file per (sub)section # (resp. chapter) and separate pages for Top, ToC, Overview, Index, # Glossary, About. # otherwise, create monolithic html file which contains whole document #$T2H_SPLIT = 'section'; $T2H_SPLIT = ''; $T2H_OPTIONS -> {split} = { type => '=s', linkage => \$T2H_SPLIT, verbose => 'split document on section|chapter else no splitting', }; # -section_navigation|-no-section_navigation # if set, then navigation panels are printed at the beginning of each section # and, possibly at the end (depending on whether or not there were more than # $T2H_WORDS_IN_PAGE words on page # This is most useful if you do not want to have section navigation # on -split chapter $T2H_SECTION_NAVIGATION = 1; $T2H_OPTIONS -> {sec_nav} = { type => '!', linkage => \$T2H_SECTION_NAVIGATION, verbose => 'output navigation panels for each section', }; # -subdir # if set put result files in this directory # if not set result files are put into current directory #$T2H_SUBDIR = 'html'; $T2H_SUBDIR = ''; $T2H_OPTIONS -> {subdir} = { type => '=s', linkage => \$T2H_SUBDIR, verbose => 'put HTML files in directory $s, instead of $cwd', }; # -short_extn # If this is set all HTML file will have extension ".htm" instead of # ".html". This is helpful when shipping the document to PC systems. $T2H_SHORTEXTN = 0; $T2H_OPTIONS -> {short_ext} = { type => '!', linkage => \$T2H_SHORTEXTN, verbose => 'use "htm" extension for output HTML files', }; # -prefix # Set the output file prefix, prepended to all .html, .gif and .pl files. # By default, this is the basename of the document $T2H_PREFIX = ''; $T2H_OPTIONS -> {prefix} = { type => '=s', linkage => \$T2H_PREFIX, verbose => 'use as prefix for output files, instead of <docname>', }; # -o filename # If set, generate monolithic document output html into $filename $T2H_OUT = ''; $T2H_OPTIONS -> {out_file} = { type => '=s', linkage => sub {$main::T2H_OUT = @_[1]; $T2H_SPLIT = '';}, verbose => 'if set, all HTML output goes into file $s', }; # -short_ref #if set cross-references are given without section numbers $T2H_SHORT_REF = ''; $T2H_OPTIONS -> {short_ref} = { type => '!', linkage => \$T2H_SHORT_REF, verbose => 'if set, references are without section numbers', }; # -idx_sum # if value is set, then for each @prinindex $what # $docu_name_$what.idx is created which contains lines of the form # $key\t$ref sorted alphabetically (case matters) $T2H_IDX_SUMMARY = 0; $T2H_OPTIONS -> {idx_sum} = { type => '!', linkage => \$T2H_IDX_SUMMARY, verbose => 'if set, also output index summary', noHelp => 1, }; # -verbose # if set, chatter about what we are doing $T2H_VERBOSE = ''; $T2H_OPTIONS -> {Verbose} = { type => '!', linkage => \$T2H_VERBOSE, verbose => 'print progress info to stdout', }; # -lang # For page titles use $T2H_WORDS->{$T2H_LANG}->{...} as title. # To add a new language, supply list of titles (see $T2H_WORDS below). # and use ISO 639 language codes (see e.g. perl module Locale-Codes-1.02 # for definitions) # Default's to 'en' if not set or no @documentlanguage is specified $T2H_LANG = ''; $T2H_OPTIONS -> {lang} = { type => '=s', linkage => sub {SetDocumentLanguage($_[1])}, verbose => 'use $s as document language (ISO 639 encoding)', }; # -l2h # if set, uses latex2html for generation of math content $T2H_L2H = ''; $T2H_OPTIONS -> {l2h} = { type => '!', linkage => \$T2H_L2H, verbose => 'if set, uses latex2html for @math and @tex', }; ###################### # The following options are only relevant if $T2H_L2H is set # # -l2h_l2h # name/location of latex2html progam $T2H_L2H_L2H = "latex2html"; $T2H_OPTIONS -> {l2h_l2h} = { type => '=s', linkage => \$T2H_L2H_L2H, verbose => 'program to use for latex2html translation', noHelp => 1, }; # -l2h_skip # if set, skips actual call to latex2html tries to reuse previously generated # content, instead $T2H_L2H_SKIP = ''; $T2H_OPTIONS -> {l2h_skip} = { type => '!', linkage => \$T2H_L2H_SKIP, verbose => 'if set, tries to reuse previously latex2html output', noHelp => 1, }; # -l2h_tmp # if set, l2h uses this directory for temporarary files. The path # leading to this directory may not contain a dot (i.e., a "."), # otherwise, l2h will fail $T2H_L2H_TMP = ''; $T2H_OPTIONS -> {l2h_tmp} = { type => '=s', linkage => \$T2H_L2H_TMP, verbose => 'if set, uses $s as temporary latex2html directory', noHelp => 1, }; # if set, cleans intermediate files (they all have the prefix $doc_l2h_) # of l2h $T2H_L2H_CLEAN = 1; $T2H_OPTIONS -> {l2h_clean} = { type => '!', linkage => \$T2H_L2H_CLEAN, verbose => 'if set, do not keep intermediate latex2html files for later reuse', noHelp => 1, }; $T2H_OPTIONS -> {D} = { type => '=s', linkage => sub {$main::value{@_[1]} = 1;}, verbose => 'equivalent to Texinfo "@set $s 1"', noHelp => 1, }; $T2H_OPTIONS -> {init_file} = { type => '=s', linkage => \&LoadInitFile, verbose => 'load init file $s' }; ############################################################################## # # The following can only be set in the init file # ############################################################################## # if set, center @image by default # otherwise, do not center by default $T2H_CENTER_IMAGE = 1; # used as identation for block enclosing command @example, etc # If not empty, must be enclosed in <td></td> $T2H_EXAMPLE_INDENT_CELL = '<td> </td>'; # same as above, only for @small $T2H_SMALL_EXAMPLE_INDENT_CELL = '<td> </td>'; # font size for @small $T2H_SMALL_FONT_SIZE = '-1'; # if non-empty, and no @..heading appeared in Top node, then # use this as header for top node/section, otherwise use value of # @settitle or @shorttitle (in that order) $T2H_TOP_HEADING = ''; # if set, use this chapter for 'Index' button, else # use first chapter whose name matches 'index' (case insensitive) $T2H_INDEX_CHAPTER = ''; # if set and $T2H_SPLIT is set, then split index pages at the next letter # after they have more than that many entries $T2H_SPLIT_INDEX = 100; # if set (e.g., to index.html) replace hrefs to this file # (i.e., to index.html) by ./ $T2H_HREF_DIR_INSTEAD_FILE = ''; ######################################################################## # Language dependencies: # To add a new language extend T2H_WORDS hash and create $T2H_<...>_WORDS hash # To redefine one word, simply do: # $T2H_WORDS->{<language>}->{<word>} = 'whatever' in your personal init file. # $T2H_WORDS_EN = { # titles of pages 'ToC_Title' => 'Table of Contents', 'Overview_Title' => 'Short Table of Contents', 'Index_Title' => 'Index', 'About_Title' => 'About this document', 'Footnotes_Title' => 'Footnotes', 'See' => 'See', 'see' => 'see', 'section' => 'section', # If necessary, we could extend this as follows: # # text for buttons # 'Top_Button' => 'Top', # 'ToC_Button' => 'Contents', # 'Overview_Button' => 'Overview', # 'Index_button' => 'Index', # 'Back_Button' => 'Back', # 'FastBack_Button' => 'FastBack', # 'Prev_Button' => 'Prev', # 'Up_Button' => 'Up', # 'Next_Button' => 'Next', # 'Forward_Button' =>'Forward', # 'FastWorward_Button' => 'FastForward', # 'First_Button' => 'First', # 'Last_Button' => 'Last', # 'About_Button' => 'About' }; $T2H_WORD_DE = { 'ToC_Title' => 'Inhaltsverzeichniss', 'Overview_Title' => 'Kurzes Inhaltsverzeichniss', 'Index_Title' => 'Index', 'About_Title' => 'Über dieses Dokument', 'Footnotes_Title' => 'Fußnoten', 'See' => 'Siehe', 'see' => 'siehe', 'section' => 'Abschnitt', }; $T2H_WORD_NL = { 'ToC_Title' => 'Inhoudsopgave', 'Overview_Title' => 'Korte inhoudsopgave', 'Index_Title' => 'Index', #Not sure ;-) 'About_Title' => 'No translation available!', #No translation available! 'Footnotes_Title' => 'No translation available!', #No translation available! 'See' => 'Zie', 'see' => 'zie', 'section' => 'sectie', }; $T2H_WORD_ES = { 'ToC_Title' => 'índice General', 'Overview_Title' => 'Resumen del Contenido', 'Index_Title' => 'Index', #Not sure ;-) 'About_Title' => 'No translation available!', #No translation available! 'Footnotes_Title' => 'Fußnoten', 'See' => 'Véase', 'see' => 'véase', 'section' => 'sección', }; $T2H_WORD_NO = { 'ToC_Title' => 'Innholdsfortegnelse', 'Overview_Title' => 'Kort innholdsfortegnelse', 'Index_Title' => 'Indeks', #Not sure ;-) 'About_Title' => 'No translation available!', #No translation available! 'Footnotes_Title' => 'No translation available!', 'See' => 'Se', 'see' => 'se', 'section' => 'avsnitt', }; $T2H_WORD_PT = { 'ToC_Title' => 'Sumário', 'Overview_Title' => 'Breve Sumário', 'Index_Title' => 'Índice', #Not sure ;-) 'About_Title' => 'No translation available!', #No translation available! 'Footnotes_Title' => 'No translation available!', 'See' => 'Veja', 'see' => 'veja', 'section' => 'Seção', }; $T2H_WORDS = { 'en' => $T2H_WORDS_EN, 'de' => $T2H_WORDS_DE, 'nl' => $T2H_WORDS_NL, 'es' => $T2H_WORDS_ES, 'no' => $T2H_WORDS_NO, 'pt' => $T2H_WORDS_PT }; @MONTH_NAMES_EN = ( 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ); @MONTH_NAMES_DE = ( 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember' ); @MONTH_NAMES_NL = ( 'Januari', 'Februari', 'Maart', 'April', 'Mei', 'Juni', 'Juli', 'Augustus', 'September', 'Oktober', 'November', 'December' ); @MONTH_NAMES_ES = ( 'enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre' ); @MONTH_NAMES_NO = ( 'januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember' ); @MONTH_NAMES_PT = ( 'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro' ); $MONTH_NAMES = { 'en' => \@MONTH_NAMES_EN, 'de' => \@MONTH_NAMES_DE, 'es' => \@MONTH_NAMES_ES, 'nl' => \@MONTH_NAMES_NL, 'no' => \@MONTH_NAMES_NO, 'pt' => \@MONTH_NAMES_PT }; ######################################################################## # Control of Page layout: # You can make changes of the Page layout at two levels: # 1.) For small changes, it is often enough to change the value of # some global string/hash/array variables # 2.) For larger changes, reimplement one of the T2H_DEFAULT_<fnc>* routines, # give them another name, and assign them to the respective # $T2H_<fnc> variable. # As a general interface, the hashes T2H_HREF, T2H_NAME, T2H_NODE hold # href, html-name, node-name of # This -- current section (resp. html page) # Top -- top page ($T2H_TOP_FILE) # Contents -- Table of contents # Overview -- Short table of contents # Index -- Index page # About -- page which explain "navigation buttons" # First -- first node # Last -- last node # # Whether or not the following hash values are set, depends on the context # (all values are w.r.t. 'This' section) # Next -- next node of texinfo # Prev -- previous node of texinfo # Up -- up node of texinfo # Forward -- next node in reading order # Back -- previous node in reading order # FastForward -- if leave node, up and next, else next node # FastBackward-- if leave node, up and prev, else prev node # # Furthermore, the following global variabels are set: # $T2H_THISDOC{title} -- title as set by @setttile # $T2H_THISDOC{fulltitle} -- full title as set by @title... # $T2H_THISDOC{subtitle} -- subtitle as set by @subtitle # $T2H_THISDOC{author} -- author as set by @author # # and pointer to arrays of lines which need to be printed by t2h_print_lines # $T2H_OVERVIEW -- lines of short table of contents # $T2H_TOC -- lines of table of contents # $T2H_TOP -- lines of Top texinfo node # $T2H_THIS_SECTION -- lines of 'This' section # # There are the following subs which control the layout: # $T2H_print_section = \&T2H_DEFAULT_print_section; $T2H_print_Top_header = \&T2H_DEFAULT_print_Top_header; $T2H_print_Top_footer = \&T2H_DEFAULT_print_Top_footer; $T2H_print_Top = \&T2H_DEFAULT_print_Top; $T2H_print_Toc = \&T2H_DEFAULT_print_Toc; $T2H_print_Overview = \&T2H_DEFAULT_print_Overview; $T2H_print_Footnotes = \&T2H_DEFAULT_print_Footnotes; $T2H_print_About = \&T2H_DEFAULT_print_About; $T2H_print_misc_header = \&T2H_DEFAULT_print_misc_header; $T2H_print_misc_footer = \&T2H_DEFAULT_print_misc_footer; $T2H_print_misc = \&T2H_DEFAULT_print_misc; $T2H_print_chapter_header = \&T2H_DEFAULT_print_chapter_header; $T2H_print_chapter_footer = \&T2H_DEFAULT_print_chapter_footer; $T2H_print_page_head = \&T2H_DEFAULT_print_page_head; $T2H_print_page_foot = \&T2H_DEFAULT_print_page_foot; $T2H_print_head_navigation = \&T2H_DEFAULT_print_head_navigation; $T2H_print_foot_navigation = \&T2H_DEFAULT_print_foot_navigation; $T2H_button_icon_img = \&T2H_DEFAULT_button_icon_img; $T2H_print_navigation = \&T2H_DEFAULT_print_navigation; $T2H_about_body = \&T2H_DEFAULT_about_body; $T2H_print_frame = \&T2H_DEFAULT_print_frame; $T2H_print_toc_frame = \&T2H_DEFAULT_print_toc_frame; ######################################################################## # Layout for html for every sections # sub T2H_DEFAULT_print_section { my $fh = shift; local $T2H_BUTTONS = \@T2H_SECTION_BUTTONS; &$T2H_print_head_navigation($fh) if $T2H_SECTION_NAVIGATION; my $nw = t2h_print_lines($fh); if ($T2H_SPLIT eq 'section' && $T2H_SECTION_NAVIGATION) { &$T2H_print_foot_navigation($fh, $nw); } else { print $fh '<HR SIZE="6">' . "\n"; } } ################################################################### # Layout of top-page I recommend that you use @ifnothtml, @ifhtml, # @html within the Top texinfo node to specify content of top-level # page. # # If you enclose everything in @ifnothtml, then title, subtitle, # author and overview is printed # T2H_HREF of Next, Prev, Up, Forward, Back are not defined # if $T2H_SPLIT then Top page is in its own html file sub T2H_DEFAULT_print_Top_header { &$T2H_print_page_head(@_) if $T2H_SPLIT; t2h_print_label(@_); # this needs to be called, otherwise no label set &$T2H_print_head_navigation(@_); } sub T2H_DEFAULT_print_Top_footer { &$T2H_print_foot_navigation(@_); &$T2H_print_page_foot(@_) if $T2H_SPLIT; } sub T2H_DEFAULT_print_Top { my $fh = shift; # for redefining navigation buttons use: # local $T2H_BUTTONS = [...]; # as it is, 'Top', 'Contents', 'Index', 'About' are printed local $T2H_BUTTONS = \@T2H_MISC_BUTTONS; &$T2H_print_Top_header($fh); if ($T2H_THIS_SECTION) { # if top-level node has content, then print it with extra header print $fh "<H1>$T2H_NAME{Top}</H1>" unless ($T2H_HAS_TOP_HEADING); t2h_print_lines($fh, $T2H_THIS_SECTION) } else { # top-level node is fully enclosed in @ifnothtml # print fulltitle, subtitle, author, Overview print $fh "<CENTER>\n<H1>" . join("</H1>\n<H1>", split(/\n/, $T2H_THISDOC{fulltitle})) . "</H1>\n"; print $fh "<H2>$T2H_THISDOC{subtitle}</H2>\n" if $T2H_THISDOC{subtitle}; print $fh "$T2H_THISDOC{author}\n" if $T2H_THISDOC{author}; print $fh <<EOT; </CENTER> <HR> <P></P> <H2> Overview: </H2> <BLOCKQUOTE> EOT t2h_print_lines($fh, $T2H_OVERVIEW); print $fh "</BLOCKQUOTE>\n"; } &$T2H_print_Top_footer($fh); } ################################################################### # Layout of Toc, Overview, and Footnotes pages # By default, we use "normal" layout # T2H_HREF of Next, Prev, Up, Forward, Back, etc are not defined # use: local $T2H_BUTTONS = [...] to redefine navigation buttons sub T2H_DEFAULT_print_Toc { return &$T2H_print_misc(@_); } sub T2H_DEFAULT_print_Overview { return &$T2H_print_misc(@_); } sub T2H_DEFAULT_print_Footnotes { return &$T2H_print_misc(@_); } sub T2H_DEFAULT_print_About { return &$T2H_print_misc(@_); } sub T2H_DEFAULT_print_misc_header { &$T2H_print_page_head(@_) if $T2H_SPLIT; # this needs to be called, otherwise, no labels are set t2h_print_label(@_); &$T2H_print_head_navigation(@_); } sub T2H_DEFAULT_print_misc_footer { &$T2H_print_foot_navigation(@_); &$T2H_print_page_foot(@_) if $T2H_SPLIT; } sub T2H_DEFAULT_print_misc { my $fh = shift; local $T2H_BUTTONS = \@T2H_MISC_BUTTONS; &$T2H_print_misc_header($fh); print $fh "<H1>$T2H_NAME{This}</H1>\n"; t2h_print_lines($fh); &$T2H_print_misc_footer($fh); } ################################################################### # chapter_header and chapter_footer are only called if # T2H_SPLIT eq 'chapter' # chapter_header: after print_page_header, before print_section # chapter_footer: after print_section of last section, before print_page_footer # # If you want to get rid of navigation stuff after each section, # redefine print_section such that it does not call print_navigation, # and put print_navigation into print_chapter_header @T2H_CHAPTER_BUTTONS = ( 'FastBack', 'FastForward', ' ', ' ', ' ', ' ', ' ', 'Top', 'Contents', 'Index', 'About', ); sub T2H_DEFAULT_print_chapter_header { # nothing to do there, by default if (! $T2H_SECTION_NAVIGATION) { my $fh = shift; local $T2H_BUTTONS = \@T2H_CHAPTER_BUTTONS; &$T2H_print_navigation($fh); print $fh "\n<HR SIZE=2>\n"; } } sub T2H_DEFAULT_print_chapter_footer { local $T2H_BUTTONS = \@T2H_CHAPTER_BUTTONS; &$T2H_print_navigation(@_); } ################################################################### $T2H_TODAY = &pretty_date; # like "20 September 1993" sub pretty_date { local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst); ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time); $year += ($year < 70) ? 2000 : 1900; # obachman: Let's do it as the Americans do return($MONTH_NAMES->{$T2H_LANG}[$mon] . ", " . $mday . " " . $year); } ################################################################### # Layout of standard header and footer # # Set the default body text, inserted between <BODY ... > ###$T2H_BODYTEXT = 'LANG="EN" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"'; $T2H_BODYTEXT = 'LANG="' . $T2H_LANG . '" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"'; # text inserted after <BODY ...> $T2H_AFTER_BODY_OPEN = ''; #text inserted before </BODY> $T2H_PRE_BODY_CLOSE = ''; # this is used in footer $T2H_ADDRESS = "by <I>$T2H_USER</I> " if $T2H_USER; $T2H_ADDRESS .= "on <I>$T2H_TODAY</I>"; # this is added inside <HEAD></HEAD> after <TITLE> and some META NAME stuff # can be used for <style> <script>, <meta> tags $T2H_EXTRA_HEAD = ''; sub T2H_DEFAULT_print_page_head { my $fh = shift; my $longtitle = "$T2H_THISDOC{title}: $T2H_NAME{This}"; print $fh <<EOT; <HTML> $T2H_DOCTYPE <!-- Created on $T2H_TODAY by $THISPROG --> <!-- $T2H_AUTHORS --> <HEAD> <TITLE>$longtitle $T2H_EXTRA_HEAD $T2H_AFTER_BODY_OPEN EOT } sub T2H_DEFAULT_print_page_foot { my $fh = shift; print $fh < This document was generated $T2H_ADDRESS using texi2html $T2H_PRE_BODY_CLOSE EOT } ################################################################### # Layout of navigation panel # if this is set, then a vertical navigation panel is used $T2H_VERTICAL_HEAD_NAVIGATION = 0; sub T2H_DEFAULT_print_head_navigation { my $fh = shift; if ($T2H_VERTICAL_HEAD_NAVIGATION) { print $fh <
EOT } &$T2H_print_navigation($fh, $T2H_VERTICAL_HEAD_NAVIGATION); if ($T2H_VERTICAL_HEAD_NAVIGATION) { print $fh < EOT } elsif ($T2H_SPLIT eq 'section') { print $fh "
\n"; } } # Specifies the minimum page length required before a navigation panel # is placed at the bottom of a page (the default is that of latex2html) # T2H_THIS_WORDS_IN_PAGE holds number of words of current page $T2H_WORDS_IN_PAGE = 300; sub T2H_DEFAULT_print_foot_navigation { my $fh = shift; my $nwords = shift; if ($T2H_VERTICAL_HEAD_NAVIGATION) { print $fh <
EOT } print $fh "
\n"; &$T2H_print_navigation($fh) if ($nwords >= $T2H_WORDS_IN_PAGE) } ###################################################################### # navigation panel # # specify in this array which "buttons" should appear in which order # in the navigation panel for sections; use ' ' for empty buttons (space) @T2H_SECTION_BUTTONS = ( 'Back', 'Forward', ' ', 'FastBack', 'Up', 'FastForward', ' ', ' ', ' ', ' ', 'Top', 'Contents', 'Index', 'About', ); # buttons for misc stuff @T2H_MISC_BUTTONS = ('Top', 'Contents', 'Index', 'About'); # insert here name of icon images for buttons # Icons are used, if $T2H_ICONS and resp. value are set %T2H_ACTIVE_ICONS = ( 'Top', '', 'Contents', '', 'Overview', '', 'Index', '', 'Back', '', 'FastBack', '', 'Prev', '', 'Up', '', 'Next', '', 'Forward', '', 'FastForward', '', 'About' , '', 'First', '', 'Last', '', ' ', '' ); # insert here name of icon images for these, if button is inactive %T2H_PASSIVE_ICONS = ( 'Top', '', 'Contents', '', 'Overview', '', 'Index', '', 'Back', '', 'FastBack', '', 'Prev', '', 'Up', '', 'Next', '', 'Forward', '', 'FastForward', '', 'About', '', 'First', '', 'Last', '', ); # how to create IMG tag sub T2H_DEFAULT_button_icon_img { my $button = shift; my $icon = shift; my $name = shift; return qq{$button: $name}; } # Names of text as alternative for icons %T2H_NAVIGATION_TEXT = ( 'Top', 'Top', 'Contents', 'Contents', 'Overview', 'Overview', 'Index', 'Index', ' ', '   ', 'Back', ' < ', 'FastBack', ' << ', 'Prev', 'Prev', 'Up', ' Up ', 'Next', 'Next', 'Forward', ' > ', 'FastForward', ' >> ', 'About', ' ? ', 'First', ' |< ', 'Last', ' >| ' ); sub T2H_DEFAULT_print_navigation { my $fh = shift; my $vertical = shift; my $spacing = 1; print $fh "\n"; print $fh "" unless $vertical; for $button (@$T2H_BUTTONS) { print $fh qq{\n} if $vertical; print $fh qq{\n"; print $fh "\n" if $vertical; } print $fh "" unless $vertical; print $fh "
}; if (ref($button) eq 'CODE') { &$button($fh, $vertical); } elsif ($button eq ' ') { # handle space button print $fh $T2H_ICONS && $T2H_ACTIVE_ICONS{' '} ? &$T2H_button_icon_img($button, $T2H_ACTIVE_ICONS{' '}) : $T2H_NAVIGATION_TEXT{' '}; next; } elsif ($T2H_HREF{$button}) { # button is active print $fh $T2H_ICONS && $T2H_ACTIVE_ICONS{$button} ? # use icon ? t2h_anchor('', $T2H_HREF{$button}, # yes &$T2H_button_icon_img($button, $T2H_ACTIVE_ICONS{$button}, $T2H_NAME{$button})) : # use text "[" . t2h_anchor('', $T2H_HREF{$button}, $T2H_NAVIGATION_TEXT{$button}) . "]"; } else { # button is passive print $fh $T2H_ICONS && $T2H_PASSIVE_ICONS{$button} ? &$T2H_button_icon_img($button, $T2H_PASSIVE_ICONS{$button}, $T2H_NAME{$button}) : "[" . $T2H_NAVIGATION_TEXT{$button} . "]"; } print $fh "
\n"; } ###################################################################### # Frames: this is from "Richard Y. Kim" # Should be improved to be more conforming to other _print* functions sub T2H_DEFAULT_print_frame { my $fh = shift; print $fh < $T2H_THISDOC{title} EOT } sub T2H_DEFAULT_print_toc_frame { my $fh = shift; &$T2H_print_page_head($fh); print $fh <Content EOT print $fh map {s/HREF=/target=\"main\" HREF=/; $_;} @stoc_lines; print $fh "\n"; } ###################################################################### # About page # # T2H_PRE_ABOUT might be a function $T2H_PRE_ABOUT = <texi2html

EOT $T2H_AFTER_ABOUT = ''; sub T2H_DEFAULT_about_body { my $about; if (ref($T2H_PRE_ABOUT) eq 'CODE') { $about = &$T2H_PRE_ABOUT(); } else { $about = $T2H_PRE_ABOUT; } $about .= <

EOT for $button (@T2H_SECTION_BUTTONS) { next if $button eq ' ' || ref($button) eq 'CODE'; $about .= < EOT } $about .= <

where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:
  • 1. Section One
    • 1.1 Subsection One-One
      • ...
    • 1.2 Subsection One-Two
      • 1.2.1 Subsubsection One-Two-One
      • 1.2.2 Subsubsection One-Two-Two
      • 1.2.3 Subsubsection One-Two-Three     <== Current Position
      • 1.2.4 Subsubsection One-Two-Four
    • 1.3 Subsection One-Three
      • ...
    • 1.4 Subsection One-Four
$T2H_AFTER_ABOUT EOT return $about; } %T2H_BUTTONS_GOTO = ( 'Top', 'cover (top) of document', 'Contents', 'table of contents', 'Overview', 'short table of contents', 'Index', 'concept index', 'Back', 'previous section in reading order', 'FastBack', 'previous or up-and-previous section ', 'Prev', 'previous section same level', 'Up', 'up section', 'Next', 'next section same level', 'Forward', 'next section in reading order', 'FastForward', 'next or up-and-next section', 'About' , 'this page', 'First', 'first section in reading order', 'Last', 'last section in reading order', ); %T2H_BUTTONS_EXAMPLE = ( 'Top', '   ', 'Contents', '   ', 'Overview', '   ', 'Index', '   ', 'Back', '1.2.2', 'FastBack', '1.1', 'Prev', '1.2.2', 'Up', '1.2', 'Next', '1.2.4', 'Forward', '1.2.4', 'FastForward', '1.3', 'About', '   ', 'First', '1.', 'Last', '1.2.4', ); ###################################################################### # from here on, its l2h init stuff # ## initialization for latex2html as for Singular manual generation ## obachman 3/99 # # Options controlling Titles, File-Names, Tracing and Sectioning # $TITLE = ''; $SHORTEXTN = 0; $LONG_TITLES = 0; $DESTDIR = ''; # should be overwritten by cmd-line argument $NO_SUBDIR = 0;# should be overwritten by cmd-line argument $PREFIX = ''; # should be overwritten by cmd-line argument $AUTO_PREFIX = 0; # this is needed, so that prefix settings are used $AUTO_LINK = 0; $SPLIT = 0; $MAX_LINK_DEPTH = 0; $TMP = ''; # should be overwritten by cmd-line argument $DEBUG = 0; $VERBOSE = 1; # # Options controlling Extensions and Special Features # $HTML_VERSION = "3.2"; $TEXDEFS = 1; # we absolutely need that $EXTERNAL_FILE = ''; $SCALABLE_FONTS = 1; $NO_SIMPLE_MATH = 1; $LOCAL_ICONS = 1; $SHORT_INDEX = 0; $NO_FOOTNODE = 1; $ADDRESS = ''; $INFO = ''; # # Switches controlling Image Generation # $ASCII_MODE = 0; $NOLATEX = 0; $EXTERNAL_IMAGES = 0; $PS_IMAGES = 0; $NO_IMAGES = 0; $IMAGES_ONLY = 0; $REUSE = 2; $ANTI_ALIAS = 1; $ANTI_ALIAS_TEXT = 1; # #Switches controlling Navigation Panels # $NO_NAVIGATION = 1; $ADDRESS = ''; $INFO = 0; # 0 = do not make a "About this document..." section # #Switches for Linking to other documents # # actuall -- we don't care $MAX_SPLIT_DEPTH = 0; # Stop making separate files at this depth $MAX_LINK_DEPTH = 0; # Stop showing child nodes at this depth $NOLATEX = 0; # 1 = do not pass unknown environments to Latex $EXTERNAL_IMAGES = 0; # 1 = leave the images outside the document $ASCII_MODE = 0; # 1 = do not use any icons or internal images # 1 = use links to external postscript images rather than inlined bitmap # images. $PS_IMAGES = 0; $SHOW_SECTION_NUMBERS = 0; ### Other global variables ############################################### $CHILDLINE = ""; # This is the line width measured in pixels and it is used to right justify # equations and equation arrays; $LINE_WIDTH = 500; # Used in conjunction with AUTO_NAVIGATION $WORDS_IN_PAGE = 300; # Affects ONLY the way accents are processed $default_language = 'english'; # The value of this variable determines how many words to use in each # title that is added to the navigation panel (see below) # $WORDS_IN_NAVIGATION_PANEL_TITLES = 0; # This number will determine the size of the equations, special characters, # and anything which will be converted into an inlined image # *except* "image generating environments" such as "figure", "table" # or "minipage". # Effective values are those greater than 0. # Sensible values are between 0.1 - 4. $MATH_SCALE_FACTOR = 1.5; # This number will determine the size of # image generating environments such as "figure", "table" or "minipage". # Effective values are those greater than 0. # Sensible values are between 0.1 - 4. $FIGURE_SCALE_FACTOR = 1.6; # If both of the following two variables are set then the "Up" button # of the navigation panel in the first node/page of a converted document # will point to $EXTERNAL_UP_LINK. $EXTERNAL_UP_TITLE should be set # to some text which describes this external link. $EXTERNAL_UP_LINK = ""; $EXTERNAL_UP_TITLE = ""; # If this is set then the resulting HTML will look marginally better if viewed # with Netscape. $NETSCAPE_HTML = 1; # Valid paper sizes are "letter", "legal", "a4","a3","a2" and "a0" # Paper sizes has no effect other than in the time it takes to create inlined # images and in whether large images can be created at all ie # - larger paper sizes *MAY* help with large image problems # - smaller paper sizes are quicker to handle $PAPERSIZE = "a4"; # Replace "english" with another language in order to tell LaTeX2HTML that you # want some generated section titles (eg "Table of Contents" or "References") # to appear in a different language. Currently only "english" and "french" # is supported but it is very easy to add your own. See the example in the # file "latex2html.config" $TITLES_LANGUAGE = "english"; 1; # This must be the last non-comment line # End File texi2html.init ###################################################################### require "$ENV{T2H_HOME}/texi2html.init" if ($0 =~ /\.pl$/ && -e "$ENV{T2H_HOME}/texi2html.init" && -r "$ENV{T2H_HOME}/texi2html.init"); #+++############################################################################ # # # Initialization # # Pasted content of File $(srcdir)/MySimple.pm: Command-line processing # # # #---############################################################################ # leave this within comments, and keep the require statement # This way, you can directly run texi2html.pl, if $ENV{T2H_HOME}/texi2html.init # exists. # package Getopt::MySimple; # Name: # Getopt::MySimple. # # Documentation: # POD-style (incomplete) documentation is in file MySimple.pod # # Tabs: # 4 spaces || die. # # Author: # Ron Savage rpsavage@ozemail.com.au. # 1.00 19-Aug-97 Initial version. # 1.10 13-Oct-97 Add arrays of switches (eg '=s@'). # 1.20 3-Dec-97 Add 'Help' on a per-switch basis. # 1.30 11-Dec-97 Change 'Help' to 'verbose'. Make all hash keys lowercase. # 1.40 10-Nov-98 Change width of help report. Restructure tests. # 1-Jul-00 Modifications for Texi2html # -------------------------------------------------------------------------- # Locally modified by obachman (Display type instead of env, order by cmp) # $Id$ # use strict; # no strict 'refs'; use vars qw(@EXPORT @EXPORT_OK @ISA); use vars qw($fieldWidth $opt $VERSION); use Exporter(); use Getopt::Long; @ISA = qw(Exporter); @EXPORT = qw(); @EXPORT_OK = qw($opt); # An alias for $self -> {'opt'}. # -------------------------------------------------------------------------- $fieldWidth = 20; $VERSION = '1.41'; # -------------------------------------------------------------------------- sub byOrder { my($self) = @_; return uc($a) cmp (uc($b)); } # -------------------------------------------------------------------------- sub dumpOptions { my($self) = @_; print 'Option', ' ' x ($fieldWidth - length('Option') ), "Value\n"; for (sort byOrder keys(%{$self -> {'opt'} }) ) { print "-$_", ' ' x ($fieldWidth - (1 + length) ), "${$self->{'opt'} }{$_}\n"; } print "\n"; } # End of dumpOptions. # -------------------------------------------------------------------------- # Return: # 0 -> Error. # 1 -> Ok. sub getOptions { push(@_, 0) if ($#_ == 2); # Default for $ignoreCase is 0. push(@_, 1) if ($#_ == 3); # Default for $helpThenExit is 1. my($self, $default, $helpText, $versionText, $helpThenExit, $versionThenExit, $ignoreCase) = @_; $helpThenExit = 1 unless (defined($helpThenExit)); $versionThenExit = 1 unless (defined($versionThenExit)); $ignoreCase = 0 unless (defined($ignoreCase)); $self -> {'default'} = $default; $self -> {'helpText'} = $helpText; $self -> {'versionText'} = $versionText; $Getopt::Long::ignorecase = $ignoreCase; unless (defined($self -> {'default'}{'help'})) { $self -> {'default'}{'help'} = { type => ':i', default => '', linkage => sub {$self->helpOptions($_[1]); exit (0) if $helpThenExit;}, verbose => "print help and exit" }; } unless (defined($self -> {'default'}{'version'})) { $self -> {'default'}{'version'} = { type => '', default => '', linkage => sub {print $self->{'versionText'}; exit (0) if versionTheExit;}, verbose => "print version and exit" }; } for (keys(%{$self -> {'default'} }) ) { my $type = ${$self -> {'default'} }{$_}{'type'}; push(@{$self -> {'type'} }, "$_$type"); $self->{'opt'}->{$_} = ${$self -> {'default'} }{$_}{'linkage'} if ${$self -> {'default'} }{$_}{'linkage'}; } my($result) = &GetOptions($self -> {'opt'}, @{$self -> {'type'} }); return $result unless $result; for (keys(%{$self -> {'default'} }) ) { if (! defined(${$self -> {'opt'} }{$_})) #{ { ${$self -> {'opt'} }{$_} = ${$self -> {'default'} }{$_}{'default'}; } } $result; } # End of getOptions. # -------------------------------------------------------------------------- sub helpOptions { my($self) = shift; my($noHelp) = shift; $noHelp = 0 unless $noHelp; my($optwidth, $typewidth, $defaultwidth, $maxlinewidth, $valind, $valwidth) = (10, 5, 9, 78, 4, 11); print "$self->{'helpText'}" if ($self -> {'helpText'}); print ' Option', ' ' x ($optwidth - length('Option') -1 ), 'Type', ' ' x ($typewidth - length('Type') + 1), 'Default', ' ' x ($defaultwidth - length('Default') ), "Description\n"; for (sort byOrder keys(%{$self -> {'default'} }) ) { my($line, $help, $option, $val); $option = $_; next if ${$self->{'default'} }{$_}{'noHelp'} && ${$self->{'default'} }{$_}{'noHelp'} > $noHelp; $line = " -$_ " . ' ' x ($optwidth - (2 + length) ) . "${$self->{'default'} }{$_}{'type'} ". ' ' x ($typewidth - (1+length(${$self -> {'default'} }{$_}{'type'}) )); $val = ${$self->{'default'} }{$_}{'linkage'}; if ($val) { if (ref($val) eq 'SCALAR') { $val = $$val; } else { $val = ''; } } else { $val = ${$self->{'default'} }{$_}{'default'}; } $line .= "$val "; $line .= ' ' x ($optwidth + $typewidth + $defaultwidth + 1 - length($line)); if (defined(${$self -> {'default'} }{$_}{'verbose'}) && ${$self -> {'default'} }{$_}{'verbose'} ne '') { $help = "${$self->{'default'} }{$_}{'verbose'}"; } else { $help = ' '; } if ((length("$line") + length($help)) < $maxlinewidth) { print $line , $help, "\n"; } else { print $line, "\n", ' ' x $valind, $help, "\n"; } for $val (sort byOrder keys(%{${$self->{'default'}}{$option}{'values'}})) { print ' ' x ($valind + 2); print $val, ' ', ' ' x ($valwidth - length($val) - 2); print ${$self->{'default'}}{$option}{'values'}{$val}, "\n"; } } print <| ! no argument: variable is set to 1 on -foo (or, to 0 on -nofoo) =s | :s mandatory (or, optional) string argument =i | :i mandatory (or, optional) integer argument EOT } # End of helpOptions. #------------------------------------------------------------------- sub new { my($class) = @_; my($self) = {}; $self -> {'default'} = {}; $self -> {'helpText'} = ''; $self -> {'opt'} = {}; $opt = $self -> {'opt'}; # An alias for $self -> {'opt'}. $self -> {'type'} = (); return bless $self, $class; } # End of new. # -------------------------------------------------------------------------- 1; # End MySimple.pm require "$ENV{T2H_HOME}/MySimple.pm" if ($0 =~ /\.pl$/ && -e "$ENV{T2H_HOME}/texi2html.init" && -r "$ENV{T2H_HOME}/texi2html.init"); package main; #+++############################################################################ # # # Constants # # # #---############################################################################ $DEBUG_TOC = 1; $DEBUG_INDEX = 2; $DEBUG_BIB = 4; $DEBUG_GLOSS = 8; $DEBUG_DEF = 16; $DEBUG_HTML = 32; $DEBUG_USER = 64; $DEBUG_L2H = 128; $BIBRE = '\[[\w\/-]+\]'; # RE for a bibliography reference $FILERE = '[\/\w.+-]+'; # RE for a file name $VARRE = '[^\s\{\}]+'; # RE for a variable name $NODERE = '[^,:]+'; # RE for a node name $NODESRE = '[^:]+'; # RE for a list of node names $ERROR = "***"; # prefix for errors $WARN = "**"; # prefix for warnings # program home page $PROTECTTAG = "_ThisIsProtected_"; # tag to recognize protected sections $CHAPTEREND = "\n"; # to know where a chpater ends $SECTIONEND = "\n"; # to know where section ends $TOPEND = "\n"; # to know where top ends # # pre-defined indices # $index_properties = { 'c' => { name => 'cp'}, 'f' => { name => 'fn', code => 1}, 'v' => { name => 'vr', code => 1}, 'k' => { name => 'ky', code => 1}, 'p' => { name => 'pg', code => 1}, 't' => { name => 'tp', code => 1} }; %predefined_index = ( 'cp', 'c', 'fn', 'f', 'vr', 'v', 'ky', 'k', 'pg', 'p', 'tp', 't', ); # # valid indices # %valid_index = ( 'c', 1, 'f', 1, 'v', 1, 'k', 1, 'p', 1, 't', 1, ); # # texinfo section names to level # %sec2level = ( 'top', 0, 'chapter', 1, 'unnumbered', 1, 'majorheading', 1, 'chapheading', 1, 'appendix', 1, 'section', 2, 'unnumberedsec', 2, 'heading', 2, 'appendixsec', 2, 'appendixsection', 2, 'subsection', 3, 'unnumberedsubsec', 3, 'subheading', 3, 'appendixsubsec', 3, 'subsubsection', 4, 'unnumberedsubsubsec', 4, 'subsubheading', 4, 'appendixsubsubsec', 4, ); # # accent map, TeX command to ISO name # %accent_map = ( '"', 'uml', '~', 'tilde', '^', 'circ', '`', 'grave', '\'', 'acute', ); # # texinfo "simple things" (@foo) to HTML ones # %simple_map = ( # cf. makeinfo.c "*", "
", # HTML+ " ", " ", "\t", " ", "-", "­", # soft hyphen "\n", "\n", "|", "", 'tab', '<\/TD>
Button Name Go to From 1.2.3 go to
EOT $about .= ($T2H_ICONS && $T2H_ACTIVE_ICONS{$button} ? &$T2H_button_icon_img($button, $T2H_ACTIVE_ICONS{$button}) : " [" . $T2H_NAVIGATION_TEXT{$button} . "] "); $about .= < $button $T2H_BUTTONS_GOTO{$button} $T2H_BUTTONS_EXAMPLE{$button}
', # spacing commands ":", "", "!", "!", "?", "?", ".", ".", "-", "", ); # # texinfo "things" (@foo{}) to HTML ones # %things_map = ( 'TeX', 'TeX', 'br', '

', # paragraph break 'bullet', '*', 'copyright', '(C)', 'dots', '...<\/small>', 'enddots', '....<\/small>', 'equiv', '==', 'error', 'error-->', 'expansion', '==>', 'minus', '-', 'point', '-!-', 'print', '-|', 'result', '=>', 'today', $T2H_TODAY, 'aa', 'å', 'AA', 'Å', 'ae', 'æ', 'oe', 'œ', 'AE', 'Æ', 'OE', 'Œ', 'o', 'ø', 'O', 'Ø', 'ss', 'ß', 'l', '\/l', 'L', '\/L', 'exclamdown', '¡', 'questiondown', '¿', 'pounds', '£' ); # # texinfo styles (@foo{bar}) to HTML ones # %style_map = ( 'acronym', '&do_acronym', 'asis', '', 'b', 'B', 'cite', 'CITE', 'code', 'CODE', 'command', 'CODE', 'ctrl', '&do_ctrl', # special case 'dfn', 'EM', # DFN tag is illegal in the standard 'dmn', '', # useless 'email', '&do_email', # insert a clickable email address 'emph', 'EM', 'env', 'CODE', 'file', '"TT', # will put quotes, cf. &apply_style 'i', 'I', 'kbd', 'KBD', 'key', 'KBD', 'math', '&do_math', 'option', '"SAMP', # will put quotes, cf. &apply_style 'r', '', # unsupported 'samp', '"SAMP', # will put quotes, cf. &apply_style 'sc', '&do_sc', # special case 'strong', 'STRONG', 't', 'TT', 'titlefont', '', # useless 'uref', '&do_uref', # insert a clickable URL 'url', '&do_url', # insert a clickable URL 'var', 'VAR', 'w', '', # unsupported 'H', '&do_accent', 'dotaccent', '&do_accent', 'ringaccent','&do_accent', 'tieaccent', '&do_accent', 'u','&do_accent', 'ubaraccent','&do_accent', 'udotaccent','&do_accent', 'v', '&do_accent', ',', '&do_accent', 'dotless', '&do_accent' ); # # texinfo format (@foo/@end foo) to HTML ones # %format_map = ( 'quotation', 'BLOCKQUOTE', # lists 'itemize', 'UL', 'enumerate', 'OL', # poorly supported 'flushleft', 'PRE', 'flushright', 'PRE', ); # # an eval of these $complex_format_map->{what}->[0] yields beginning # an eval of these $complex_format_map->{what}->[1] yieleds end $complex_format_map = { example => [ q{"$T2H_EXAMPLE_INDENT_CELL
"},
  q{'
'} ], smallexample => [ q{"$T2H_SMALL_EXAMPLE_INDENT_CELL
"},
  q{'
'} ], display => [ q{"$T2H_EXAMPLE_INDENT_CELL
'},
  q{'
'} ], smalldisplay => [ q{"$T2H_SMALL_EXAMPLE_INDENT_CELL
'},
  q{'
'} ] }; $complex_format_map->{lisp} = $complex_format_map->{example}; $complex_format_map->{smalllisp} = $complex_format_map->{smallexample}; $complex_format_map->{format} = $complex_format_map->{display}; $complex_format_map->{smallformat} = $complex_format_map->{smalldisplay}; # # texinfo definition shortcuts to real ones # %def_map = ( # basic commands 'deffn', 0, 'defvr', 0, 'deftypefn', 0, 'deftypevr', 0, 'defcv', 0, 'defop', 0, 'deftp', 0, # basic x commands 'deffnx', 0, 'defvrx', 0, 'deftypefnx', 0, 'deftypevrx', 0, 'defcvx', 0, 'defopx', 0, 'deftpx', 0, # shortcuts 'defun', 'deffn Function', 'defmac', 'deffn Macro', 'defspec', 'deffn {Special Form}', 'defvar', 'defvr Variable', 'defopt', 'defvr {User Option}', 'deftypefun', 'deftypefn Function', 'deftypevar', 'deftypevr Variable', 'defivar', 'defcv {Instance Variable}', 'deftypeivar', 'defcv {Instance Variable}', # NEW: FIXME 'defmethod', 'defop Method', 'deftypemethod', 'defop Method', # NEW:FIXME # x shortcuts 'defunx', 'deffnx Function', 'defmacx', 'deffnx Macro', 'defspecx', 'deffnx {Special Form}', 'defvarx', 'defvrx Variable', 'defoptx', 'defvrx {User Option}', 'deftypefunx', 'deftypefnx Function', 'deftypevarx', 'deftypevrx Variable', 'defivarx', 'defcvx {Instance Variable}', 'defmethodx', 'defopx Method', ); # # things to skip # %to_skip = ( # comments 'c', 1, 'comment', 1, 'ifnotinfo', 1, 'ifnottex', 1, 'ifhtml', 1, 'end ifhtml', 1, 'end ifnotinfo', 1, 'end ifnottex', 1, # useless 'detailmenu', 1, 'direntry', 1, 'contents', 1, 'shortcontents', 1, 'summarycontents', 1, 'footnotestyle', 1, 'end ifclear', 1, 'end ifset', 1, 'titlepage', 1, 'end titlepage', 1, # unsupported commands (formatting) 'afourpaper', 1, 'cropmarks', 1, 'finalout', 1, 'headings', 1, 'sp', 1, 'need', 1, 'page', 1, 'setchapternewpage', 1, 'everyheading', 1, 'everyfooting', 1, 'evenheading', 1, 'evenfooting', 1, 'oddheading', 1, 'oddfooting', 1, 'smallbook', 1, 'vskip', 1, 'filbreak', 1, 'paragraphindent', 1, # unsupported formats 'cartouche', 1, 'end cartouche', 1, 'group', 1, 'end group', 1, ); #+++############################################################################ # # # Argument parsing, initialisation # # # #---############################################################################ # # flush stdout and stderr after every write # select(STDERR); $| = 1; select(STDOUT); $| = 1; %value = (); # hold texinfo variables, see also -D $use_bibliography = 1; $use_acc = 1; # # called on -init-file sub LoadInitFile { my $init_file = shift; # second argument is value of options $init_file = shift; if (-f $init_file) { print "# reading initialization file from $init_file\n" if ($T2H_VERBOSE); require($init_file); } else { print "$ERROR Error: can't read init file $int_file\n"; $init_file = ''; } } # # called on -lang sub SetDocumentLanguage { my $lang = shift; if (! exists($T2H_WORDS->{$lang})) { warn "$ERROR: Language specs for '$lang' do not exists. Reverting to '" . ($T2H_LANG ? T2H_LANG : "en") . "'\n"; } else { print "# using '$lang' as document language\n" if ($T2H_VERBOSE); $T2H_LANG = $lang; } } ## ## obsolete cmd line options ## $T2H_OBSOLETE_OPTIONS -> {'no-section_navigation'} = { type => '!', linkage => sub {$main::T2H_SECTION_NAVIGATION = 0;}, verbose => 'obsolete, use -nosec_nav', noHelp => 2, }; $T2H_OBSOLETE_OPTIONS -> {use_acc} = { type => '!', linkage => \$use_acc, verbose => 'obsolete', noHelp => 2 }; $T2H_OBSOLETE_OPTIONS -> {expandinfo} = { type => '!', linkage => sub {$main::T2H_EXPAND = 'info';}, verbose => 'obsolete, use "-expand info" instead', noHelp => 2, }; $T2H_OBSOLETE_OPTIONS -> {expandtex} = { type => '!', linkage => sub {$main::T2H_EXPAND = 'tex';}, verbose => 'obsolete, use "-expand tex" instead', noHelp => 2, }; $T2H_OBSOLETE_OPTIONS -> {monolithic} = { type => '!', linkage => sub {$main::T2H_SPLIT = '';}, verbose => 'obsolete, use "-split no" instead', noHelp => 2 }; $T2H_OBSOLETE_OPTIONS -> {split_node} = { type => '!', linkage => sub{$main::T2H_SPLIT = 'section';}, verbose => 'obsolete, use "-split section" instead', noHelp => 2, }; $T2H_OBSOLETE_OPTIONS -> {split_chapter} = { type => '!', linkage => sub{$main::T2H_SPLIT = 'chapter';}, verbose => 'obsolete, use "-split chapter" instead', noHelp => 2, }; $T2H_OBSOLETE_OPTIONS -> {no_verbose} = { type => '!', linkage => sub {$main::T2H_VERBOSE = 0;}, verbose => 'obsolete, use -noverbose instead', noHelp => 2, }; $T2H_OBSOLETE_OPTIONS -> {output_file} = { type => '=s', linkage => sub {$main::T2H_OUT = @_[1]; $T2H_SPLIT = '';}, verbose => 'obsolete, use -out_file instead', noHelp => 2 }; $T2H_OBSOLETE_OPTIONS -> {section_navigation} = { type => '!', linkage => \$T2H_SECTION_NAVIGATION, verbose => 'obsolete, use -sec_nav instead', noHelp => 2, }; $T2H_OBSOLETE_OPTIONS -> {verbose} = { type => '!', linkage => \$T2H_VERBOSE, verbose => 'obsolete, use -Verbose instead', noHelp => 2 }; # read initialzation from $sysconfdir/texi2htmlrc or $HOME/.texi2htmlrc my $home = $ENV{HOME}; defined($home) or $home = ''; foreach $i ('/usr/local/etc/texi2htmlrc', "$home/.texi2htmlrc") { if (-f $i) { print "# reading initialization file from $i\n" if ($T2H_VERBOSE); require($i); } } #+++############################################################################ # # # parse command-line options # # #---############################################################################ $T2H_USAGE_TEXT = <getOptions($T2H_OPTIONS, $T2H_USAGE_TEXT, "$THISVERSION\n")) { print $Configure_failed if $Configure_failed; die $T2H_FAILURE_TEXT; } if (@ARGV > 1) { eval {Getopt::Long::Configure("no_pass_through");}; if (! $options->getOptions($T2H_OBSOLETE_OPTIONS, $T2H_USAGE_TEXT, "$THISVERSION\n")) { print $Configure_failed if $Configure_failed; die $T2H_FAILURE_TEXT; } } if ($T2H_CHECK) { die "Need file to check\n$T2H_FAILURE_TEXT" unless @ARGV > 0; ✓ exit; } #+++############################################################################ # # # evaluation of cmd line options # # #---############################################################################ if ($T2H_EXPAND eq 'info') { $to_skip{'ifinfo'} = 1; $to_skip{'end ifinfo'} = 1; } elsif ($T2H_EXPAND eq 'tex') { $to_skip{'iftex'} = 1; $to_skip{'end iftex'} = 1; } $T2H_INVISIBLE_MARK = '' if $T2H_INVISIBLE_MARK eq 'xbm'; # # file name buisness # die "Need exactly one file to translate\n$T2H_FAILURE_TEXT" unless @ARGV == 1; $docu = shift(@ARGV); if ($docu =~ /.*\//) { chop($docu_dir = $&); $docu_name = $'; } else { $docu_dir = '.'; $docu_name = $docu; } unshift(@T2H_INCLUDE_DIRS, $docu_dir); $docu_name =~ s/\.te?x(i|info)?$//; # basename of the document $docu_name = $T2H_PREFIX if ($T2H_PREFIX); # subdir if ($T2H_SUBDIR && ! $T2H_OUT) { $T2H_SUBDIR =~ s|/*$||; unless (-d "$T2H_SUBDIR" && -w "$T2H_SUBDIR") { if ( mkdir($T2H_SUBDIR, oct(755))) { print "# created directory $T2H_SUBDIR\n" if ($T2H_VERBOSE); } else { warn "$ERROR can't create directory $T2H_SUBDIR. Put results into current directory\n"; $T2H_SUBDIR = ''; } } } if ($T2H_SUBDIR && ! $T2H_OUT) { $docu_rdir = "$T2H_SUBDIR/"; print "# putting result files into directory $docu_rdir\n" if ($T2H_VERBOSE); } else { if ($T2H_OUT && $T2H_OUT =~ m|(.*)/|) { $docu_rdir = "$1/"; print "# putting result files into directory $docu_rdir\n" if ($T2H_VERBOSE); } else { print "# putting result files into current directory \n" if ($T2H_VERBOSE); $docu_rdir = ''; } } # extension if ($T2H_SHORTEXTN) { $docu_ext = "htm"; } else { $docu_ext = "html"; } if ($T2H_TOP_FILE =~ /\..*$/) { $T2H_TOP_FILE = $`.".$docu_ext"; } # result files if (! $T2H_OUT && ($T2H_SPLIT =~ /section/i || $T2H_SPLIT =~ /node/i)) { $T2H_SPLIT = 'section'; } elsif (! $T2H_OUT && $T2H_SPLIT =~ /chapter/i) { $T2H_SPLIT = 'chapter' } else { undef $T2H_SPLIT; } $docu_doc = "$docu_name.$docu_ext"; # document's contents $docu_doc_file = "$docu_rdir$docu_doc"; if ($T2H_SPLIT) { $docu_toc = $T2H_TOC_FILE || "${docu_name}_toc.$docu_ext"; # document's table of contents $docu_stoc = "${docu_name}_ovr.$docu_ext"; # document's short toc $docu_foot = "${docu_name}_fot.$docu_ext"; # document's footnotes $docu_about = "${docu_name}_abt.$docu_ext"; # about this document $docu_top = $T2H_TOP_FILE || $docu_doc; } else { if ($T2H_OUT) { $docu_doc = $T2H_OUT; $docu_doc =~ s|.*/||; } $docu_toc = $docu_foot = $docu_stoc = $docu_about = $docu_top = $docu_doc; } $docu_toc_file = "$docu_rdir$docu_toc"; $docu_stoc_file = "$docu_rdir$docu_stoc"; $docu_foot_file = "$docu_rdir$docu_foot"; $docu_about_file = "$docu_rdir$docu_about"; $docu_top_file = "$docu_rdir$docu_top"; $docu_frame_file = "$docu_rdir${docu_name}_frame.$docu_ext"; $docu_toc_frame_file = "$docu_rdir${docu_name}_toc_frame.$docu_ext"; # # variables # $value{'html'} = 1; # predefine html (the output format) $value{'texi2html'} = $THISVERSION; # predefine texi2html (the translator) # _foo: internal to track @foo foreach ('_author', '_title', '_subtitle', '_settitle', '_setfilename', '_shorttitle') { $value{$_} = ''; # prevent -w warnings } %node2sec = (); # node to section name %sec2node = (); # section to node name %sec2number = (); # section to number %number2sec = (); # number to section %idx2node = (); # index keys to node %node2href = (); # node to HREF %node2next = (); # node to next %node2prev = (); # node to prev %node2up = (); # node to up %bib2href = (); # bibliography reference to HREF %gloss2href = (); # glossary term to HREF @sections = (); # list of sections %tag2pro = (); # protected sections # # initial indexes # $bib_num = 0; $foot_num = 0; $gloss_num = 0; $idx_num = 0; $sec_num = 0; $doc_num = 0; $html_num = 0; # # can I use ISO8879 characters? (HTML+) # if ($T2H_USE_ISO) { $things_map{'bullet'} = "•"; $things_map{'copyright'} = "©"; $things_map{'dots'} = "…"; $things_map{'equiv'} = "≡"; $things_map{'expansion'} = "→"; $things_map{'point'} = "∗"; $things_map{'result'} = "⇒"; } # # read texi2html extensions (if any) # $extensions = 'texi2html.ext'; # extensions in working directory if (-f $extensions) { print "# reading extensions from $extensions\n" if $T2H_VERBOSE; require($extensions); } ($progdir = $0) =~ s/[^\/]+$//; if ($progdir && ($progdir ne './')) { $extensions = "${progdir}texi2html.ext"; # extensions in texi2html directory if (-f $extensions) { print "# reading extensions from $extensions\n" if $T2H_VERBOSE; require($extensions); } } print "# reading from $docu\n" if $T2H_VERBOSE; ######################################################################### # # latex2html stuff # # latex2html conversions consist of three stages: # 1) ToLatex: Put "latex" code into a latex file # 2) ToHtml: Use latex2html to generate corresponding html code and images # 3) FromHtml: Extract generated code and images from latex2html run # ########################## # default settings # # defaults for files and names sub l2h_Init { local($root) = @_; return 0 unless ($root); $l2h_name = "${root}_l2h"; $l2h_latex_file = "$docu_rdir${l2h_name}.tex"; $l2h_cache_file = "${docu_rdir}l2h_cache.pm"; $T2H_L2H_L2H = "latex2html" unless ($T2H_L2H_L2H); # destination dir -- generated images are put there, should be the same # as dir of enclosing html document -- $l2h_html_file = "$docu_rdir${l2h_name}.html"; $l2h_prefix = "${l2h_name}_"; return 1; } ########################## # # First stage: Generation of Latex file # Initialize with: l2h_InitToLatex # Add content with: l2h_ToLatex($text) --> HTML placeholder comment # Finish with: l2h_FinishToLatex # $l2h_latex_preample = <$l2h_latex_file")) { warn "$ERROR Error l2h: Can't open latex file '$latex_file' for writing\n"; return 0; } print "# l2h: use ${l2h_latex_file} as latex file\n" if ($T2H_VERBOSE); print L2H_LATEX $l2h_latex_preample; } # open database for caching l2h_InitCache(); $l2h_latex_count = 0; $l2h_to_latex_count = 0; $l2h_cached_count = 0; return 1; } # print text (1st arg) into latex file (if not already there), return # HTML commentary which can be later on replaced by the latex2html # generated text sub l2h_ToLatex { my($text) = @_; my($count); $l2h_to_latex_count++; $text =~ s/(\s*)$//; # try whether we can cache it my $cached_text = l2h_FromCache($text); if ($cached_text) { $l2h_cached_count++; return $cached_text; } # try whether we have text already on things to do unless ($count = $l2h_to_latex{$text}) { $count = $l2h_latex_count; $l2h_latex_count++; $l2h_to_latex{$text} = $count; $l2h_to_latex[$count] = $text; unless ($T2H_L2H_SKIP) { print L2H_LATEX "\\begin{rawhtml}\n"; print L2H_LATEX "\n"; print L2H_LATEX "\\end{rawhtml}\n"; print L2H_LATEX "$text\n"; print L2H_LATEX "\\begin{rawhtml}\n"; print L2H_LATEX "\n"; print L2H_LATEX "\\end{rawhtml}\n"; } } return ""; } # print closing into latex file and close it sub l2h_FinishToLatex { local ($reused); $reused = $l2h_to_latex_count - $l2h_latex_count - $l2h_cached_count; unless ($T2H_L2H_SKIP) { print L2H_LATEX $l2h_latex_closing; close(L2H_LATEX); } print "# l2h: finished to latex ($l2h_cached_count cached, $reused reused, $l2h_latex_count contents)\n" if ($T2H_VERBOSE); unless ($l2h_latex_count) { l2h_Finish(); return 0; } return 1; } ################################### # Second stage: Use latex2html to generate corresponding html code and images # # l2h_ToHtml([$l2h_latex_file, [$l2h_html_dir]]): # Call latex2html on $l2h_latex_file # Put images (prefixed with $l2h_name."_") and html file(s) in $l2h_html_dir # Return 1, on success # 0, otherwise # sub l2h_ToHtml { local($call, $ext, $root, $dotbug); if ($T2H_L2H_SKIP) { print "# l2h: skipping latex2html run\n" if ($T2H_VERBOSE); return 1; } # Check for dot in directory where dvips will work if ($T2H_L2H_TMP) { if ($T2H_L2H_TMP =~ /\./) { warn "$ERROR Warning l2h: l2h_tmp dir contains a dot. Use /tmp, instead\n"; $dotbug = 1; } } else { if (&getcwd =~ /\./) { warn "$ERROR Warning l2h: current dir contains a dot. Use /tmp as l2h_tmp dir \n"; $dotbug = 1; } } # fix it, if necessary and hope that it works $T2H_L2H_TMP = "/tmp" if ($dotbug); $call = $T2H_L2H_L2H; # use init file, if specified $call = $call . " -init_file " . $init_file if ($init_file && -f $init_file); # set output dir $call .= ($docu_rdir ? " -dir $docu_rdir" : " -no_subdir"); # use l2h_tmp, if specified $call = $call . " -tmp $T2H_L2H_TMP" if ($T2H_L2H_TMP); # options we want to be sure of $call = $call ." -address 0 -info 0 -split 0 -no_navigation -no_auto_link"; $call = $call ." -prefix ${l2h_prefix} $l2h_latex_file"; print "# l2h: executing '$call'\n" if ($T2H_VERBOSE); if (system($call)) { warn "l2h ***Error: '${call}' did not succeed\n"; return 0; } else { print "# l2h: latex2html finished successfully\n" if ($T2H_VERBOSE); return 1; } } # this is directly pasted over from latex2html sub getcwd { local($_) = `pwd`; die "'pwd' failed (out of memory?)\n" unless length; chop; $_; } ########################## # Third stage: Extract generated contents from latex2html run # Initialize with: l2h_InitFromHtml # open $l2h_html_file for reading # reads in contents into array indexed by numbers # return 1, on success -- 0, otherwise # Extract Html code with: l2h_FromHtml($text) # replaces in $text all previosuly inserted comments by generated html code # returns (possibly changed) $text # Finish with: l2h_FinishFromHtml # closes $l2h_html_dir/$l2h_name.".$docu_ext" sub l2h_InitFromHtml { local($h_line, $h_content, $count, %l2h_img); if (! open(L2H_HTML, "<${l2h_html_file}")) { print "$ERROR Error l2h: Can't open ${l2h_html_file} for reading\n"; return 0; } print "# l2h: use ${l2h_html_file} as html file\n" if ($T2H_VERBOSE); $l2h_html_count = 0; while ($h_line = ) { if ($h_line =~ /^/) { $count = $1; $h_content = ""; while ($h_line = ) { if ($h_line =~ /^/) { chomp $h_content; chomp $h_content; $l2h_html_count++; $h_content = l2h_ToCache($count, $h_content); $l2h_from_html[$count] = $h_content; $h_content = ''; last; } $h_content = $h_content.$h_line; } if ($hcontent) { print "$ERROR Warning l2h: l2h_end $l2h_name $count not found\n" if ($T2H_VERBOSE); close(L2H_HTML); return 0; } } } print "# l2h: Got $l2h_html_count of $l2h_latex_count html contents\n" if ($T2H_VERBOSE); close(L2H_HTML); return 1; } sub l2h_FromHtml { local($text) = @_; local($done, $to_do, $count); $to_do = $text; while ($to_do =~ /([^\000]*)([^\000]*)/) { $to_do = $1; $count = $2; $done = $3.$done; $done = "".$done if ($T2H_DEBUG & $DEBUG_L2H); $done = &l2h_ExtractFromHtml($count) . $done; $done = "".$done if ($T2H_DEBUG & $DEBUG_L2H); } return $to_do.$done; } sub l2h_ExtractFromHtml { local($count) = @_; return $l2h_from_html[$count] if ($l2h_from_html[$count]); if ($count >= 0 && $count < $l2h_latex_count) { # now we are in trouble local($l_l2h, $_); $l2h_extract_error++; print "$ERROR l2h: can't extract content $count from html\n" if ($T2H_VERBOSE); # try simple (ordinary) substition (without l2h) $l_l2h = $T2H_L2H; $T2H_L2H = 0; $_ = $l2h_to_latex{$count}; $_ = &substitute_style($_); &unprotect_texi; $_ = "" . $_ if ($T2H_DEBUG & $DEBUG_L2H); $T2H_L2H = $l_l2h; return $_; } else { # now we have been incorrectly called $l2h_range_error++; print "$ERROR l2h: Request of $count content which is out of valide range [0,$l2h_latex_count)\n"; return "" if ($T2H_DEBUG & $DEBUG_L2H); return ""; } } sub l2h_FinishFromHtml { if ($T2H_VERBOSE) { if ($l2h_extract_error + $l2h_range_error) { print "# l2h: finished from html ($l2h_extract_error extract and $l2h_range_error errors)\n"; } else { print "# l2h: finished from html (no errors)\n"; } } } sub l2h_Finish { l2h_StoreCache(); if ($T2H_L2H_CLEAN) { print "# l2h: removing temporary files generated by l2h extension\n" if $T2H_VERBOSE; while (<"$docu_rdir$l2h_name"*>) { unlink $_; } } print "# l2h: Finished\n" if $T2H_VERBOSE; return 1; } ############################## # stuff for l2h caching # # I tried doing this with a dbm data base, but it did not store all # keys/values. Hence, I did as latex2html does it sub l2h_InitCache { if (-r "$l2h_cache_file") { my $rdo = do "$l2h_cache_file"; warn("$ERROR l2h Error: could not load $docu_rdir$l2h_cache_file: $@\n") unless ($rdo); } } sub l2h_StoreCache { return unless $l2h_latex_count; my ($key, $value); open(FH, ">$l2h_cache_file") || return warn"$ERROR l2h Error: could not open $docu_rdir$l2h_cache_file for writing: $!\n"; while (($key, $value) = each %l2h_cache) { # escape stuff $key =~ s|/|\\/|g; $key =~ s|\\\\/|\\/|g; # weird, a \ at the end of the key results in an error # maybe this also broke the dbm database stuff $key =~ s|\\$|\\\\|; $value =~ s/\|/\\\|/g; $value =~ s/\\\\\|/\\\|/g; $value =~ s|\\\\|\\\\\\\\|g; print FH "\n\$l2h_cache_key = q/$key/;\n"; print FH "\$l2h_cache{\$l2h_cache_key} = q|$value|;\n"; } print FH "1;"; close(FH); } # return cached html, if it exists for text, and if all pictures # are there, as well sub l2h_FromCache { my $text = shift; my $cached = $l2h_cache{$text}; if ($cached) { while ($cached =~ m/SRC="(.*?)"/g) { unless (-e "$docu_rdir$1") { return undef; } } return $cached; } return undef; } # insert generated html into cache, move away images, # return transformed html $maximage = 1; sub l2h_ToCache { my $count = shift; my $content = shift; my @images = ($content =~ /SRC="(.*?)"/g); my ($src, $dest); for $src (@images) { $dest = $l2h_img{$src}; unless ($dest) { my $ext; if ($src =~ /.*\.(.*)$/ && $1 ne $docu_ext) { $ext = $1; } else { warn "$ERROR: L2h image $src has invalid extension\n"; next; } while (-e "$docu_rdir${docu_name}_$maximage.$ext") { $maximage++;} $dest = "${docu_name}_$maximage.$ext"; system("cp -f $docu_rdir$src $docu_rdir$dest"); $l2h_img{$src} = $dest; unlink "$docu_rdir$src" unless ($DEBUG & DEBUG_L2H); } $content =~ s/$src/$dest/g; } $l2h_cache{$l2h_to_latex[$count]} = $content; return $content; } #+++############################################################################ # # # Pass 1: read source, handle command, variable, simple substitution # # # #---############################################################################ @lines = (); # whole document @toc_lines = (); # table of contents @stoc_lines = (); # table of contents $curlevel = 0; # current level in TOC $node = ''; # current node name $node_next = ''; # current node next name $node_prev = ''; # current node prev name $node_up = ''; # current node up name $in_table = 0; # am I inside a table $table_type = ''; # type of table ('', 'f', 'v', 'multi') @tables = (); # nested table support $in_bibliography = 0; # am I inside a bibliography $in_glossary = 0; # am I inside a glossary $in_top = 0; # am I inside the top node $has_top = 0; # did I see a top node? $has_top_command = 0; # did I see @top for automatic pointers? $in_pre = 0; # am I inside a preformatted section $in_list = 0; # am I inside a list $in_html = 0; # am I inside an HTML section $first_line = 1; # is it the first line $dont_html = 0; # don't protect HTML on this line $deferred_ref = ''; # deferred reference for indexes @html_stack = (); # HTML elements stack $html_element = ''; # current HTML element &html_reset; %macros = (); # macros # init l2h $T2H_L2H = &l2h_Init($docu_name) if ($T2H_L2H); $T2H_L2H = &l2h_InitToLatex if ($T2H_L2H); # build code for simple substitutions # the maps used (%simple_map and %things_map) MUST be aware of this # watch out for regexps, / and escaped characters! $subst_code = ''; foreach (keys(%simple_map)) { ($re = $_) =~ s/(\W)/\\$1/g; # protect regexp chars $subst_code .= "s/\\\@$re/$simple_map{$_}/g;\n"; } foreach (keys(%things_map)) { $subst_code .= "s/\\\@$_\\{\\}/$things_map{$_}/g;\n"; } if ($use_acc) { # accentuated characters foreach (keys(%accent_map)) { if ($_ eq "`") { $subst_code .= "s/$;3"; } elsif ($_ eq "'") { $subst_code .= "s/$;4"; } else { $subst_code .= "s/\\\@\\$_"; } $subst_code .= "([a-z])/&\${1}$accent_map{$_};/gi;\n"; } } eval("sub simple_substitutions { $subst_code }"); &init_input; INPUT_LINE: while ($_ = &next_line) { # # remove \input on the first lines only # if ($first_line) { next if /^\\input/; $first_line = 0; } # non-@ substitutions cf. texinfmt.el # # parse texinfo tags # $tag = ''; $end_tag = ''; if (/^\s*\@end\s+(\w+)\b/) { $end_tag = $1; } elsif (/^\s*\@(\w+)\b/) { $tag = $1; } # # handle @html / @end html # if ($in_html) { if ($end_tag eq 'html') { $in_html = 0; } else { $tag2pro{$in_html} .= $_; } next; } elsif ($tag eq 'html') { $in_html = $PROTECTTAG . ++$html_num; push(@lines, $in_html); next; } # # try to remove inlined comments # syntax from tex-mode.el comment-start-skip # s/((^|[^\@])(\@\@)*)\@c(omment | |\{|$).*/$1/; # Sometimes I use @c right at the end of a line ( to suppress the line feed ) # s/((^|[^\@])(\@\@)*)\@c(omment)?$/$1/; # s/((^|[^\@])(\@\@)*)\@c(omment)? .*/$1/; # s/(.*)\@c{.*?}(.*)/$1$2/; # s/(.*)\@comment{.*?}(.*)/$1$2/; # s/^(.*)\@c /$1/; # s/^(.*)\@comment /$1/; ############################################################# # value substitution before macro expansion, so that # it works in macro arguments s/\@value{($VARRE)}/$value{$1}/eg; ############################################################# # macro substitution while (/\@(\w+)/g) { if (exists($macros->{$1})) { my $before = $`; my $name = $1; my $after = $'; my @args; my $args; if ($after =~ /^\s*{(.*?[^\\])}(.*)/) { $args = $1; $after = $2; } elsif (@{$macros->{$name}->{Args}} == 1) { $args = $after; $args =~ s/^\s*//; $args =~ s/\s*$//; $after = ''; } $args =~ s|\\\\|\\|g; $args =~ s|\\{|{|g; $args =~ s|\\}|}|g; if (@{$macros->{$name}->{Args}} > 1) { $args =~ s/(^|[^\\]),/$1$;/g ; $args =~ s|\\,|,|g; @args = split(/$;\s*/, $args) if (@{$macros->{$name}->{Args}} > 1); } else { $args =~ s|\\,|,|g; @args = ($args); } my $macrobody = $macros->{$name}->{Body}; for ($i=0; $i<=$#args; $i++) { $macrobody =~ s|\\$macros->{$name}->{Args}->[$i]\\|$args[$i]|g; } $macrobody =~ s|\\\\|\\|g; $_ = $before . $macrobody . $after; unshift @input_spool, map {$_ = $_."\n"} split(/\n/, $_); next INPUT_LINE; } } # # # try to skip the line # if ($end_tag) { $in_titlepage = 0 if $end_tag eq 'titlepage'; next if $to_skip{"end $end_tag"}; } elsif ($tag) { $in_titlepage = 1 if $tag eq 'titlepage'; next if $to_skip{$tag}; last if $tag eq 'bye'; } if ($in_top) { # parsing the top node if ($tag eq 'node' || ($sec2level{$tag} && $tag !~ /unnumbered/ && $tag !~ /heading/)) { # no more in top $in_top = 0; push(@lines, $TOPEND); } } unless ($in_pre) { s/``/\"/g; s/''/\"/g; s/([\w ])---([\w ])/$1--$2/g; } # # analyze the tag # if ($tag) { # skip lines &skip_until($tag), next if $tag eq 'ignore'; &skip_until($tag), next if $tag eq 'ifnothtml'; if ($tag eq 'ifinfo') { &skip_until($tag), next unless $T2H_EXPAND eq 'info'; } if ($tag eq 'iftex') { &skip_until($tag), next unless $T2H_EXPAND eq 'tex'; } if ($tag eq 'tex') { # add to latex2html file if ($T2H_EXPAND eq 'tex' && $T2H_L2H && ! $in_pre) { # add space to the end -- tex(i2dvi) does this, as well push(@lines, &l2h_ToLatex(&string_until($tag) . " ")); } else { &skip_until($tag); } next; } if ($tag eq 'titlepage') { next; } # handle special tables if ($tag =~ /^(|f|v|multi)table$/) { $table_type = $1; $tag = 'table'; } # special cases if ($tag eq 'top' || ($tag eq 'node' && /^\@node\s+top\s*,/i)) { $in_top = 1; $has_top = 1; $has_top_command = 1 if $tag eq 'top'; @lines = (); # ignore all lines before top (title page garbage) next; } elsif ($tag eq 'node') { if ($in_top) { $in_top = 0; push(@lines, $TOPEND); } warn "$ERROR Bad node line: $_" unless $_ =~ /^\@node\s$NODESRE$/o; # request of "Richard Y. Kim" s/^\@node\s+//; $_ = &protect_html($_); # if node contains '&' for instance ($node, $node_next, $node_prev, $node_up) = split(/,/); &normalise_node($node); &normalise_node($node_next); &normalise_node($node_prev); &normalise_node($node_up); $node =~ /\"/ ? push @lines, &html_debug("\n", __LINE__) : push @lines, &html_debug("\n", __LINE__); next; } elsif ($tag eq 'include') { if (/^\@include\s+($FILERE)\s*$/o) { $file = LocateIncludeFile($1); if ($file && -e $file) { &open($file); print "# including $file\n" if $T2H_VERBOSE; } else { warn "$ERROR Can't find $1, skipping"; } } else { warn "$ERROR Bad include line: $_"; } next; } elsif ($tag eq 'ifclear') { if (/^\@ifclear\s+($VARRE)\s*$/o) { next unless defined($value{$1}); &skip_until($tag); } else { warn "$ERROR Bad ifclear line: $_"; } next; } elsif ($tag eq 'ifset') { if (/^\@ifset\s+($VARRE)\s*$/o) { next if defined($value{$1}); &skip_until($tag); } else { warn "$ERROR Bad ifset line: $_"; } next; } elsif ($tag eq 'menu') { unless ($T2H_SHOW_MENU) { &skip_until($tag); next; } &html_push_if($tag); push(@lines, &html_debug('', __LINE__)); } elsif ($format_map{$tag}) { $in_pre = 1 if $format_map{$tag} eq 'PRE'; &html_push_if($format_map{$tag}); push(@lines, &html_debug('', __LINE__)); $in_list++ if $format_map{$tag} eq 'UL' || $format_map{$tag} eq 'OL' ; # push(@lines, &debug("

\n", __LINE__)) # if $tag =~ /example/i; # sunshine@sunshineco.com:
bla
looks better than #
\nbla
(at least on NeXTstep browser push(@lines, &debug("<$format_map{$tag}>" . ($in_pre ? '' : "\n"), __LINE__)); next; } elsif (exists $complex_format_map->{$tag}) { my $start = eval $complex_format_map->{$tag}->[0]; if ($@) { print "$ERROR: eval of complex_format_map->{$tag}->[0] $complex_format_map->{$tag}->[0]: $@"; $start = '
'
	  }
	  $in_pre = 1 if $start =~ /
\n", __LINE__));
		    &html_push_if('TABLE');
		} else {
		    push(@lines, &debug("
\n", __LINE__)); &html_push_if('DL'); } push(@lines, &html_debug('', __LINE__)); } else { warn "$ERROR Bad table line: $_"; } next; } elsif ($tag eq 'synindex' || $tag eq 'syncodeindex') { if (/^\@$tag\s+(\w+)\s+(\w+)\s*$/) { my $from = $1; my $to = $2; my $prefix_from = IndexName2Prefix($from); my $prefix_to = IndexName2Prefix($to); warn("$ERROR unknown from index name $from ind syn*index line: $_"), next unless $prefix_from; warn("$ERROR unknown to index name $to ind syn*index line: $_"), next unless $prefix_to; if ($tag eq 'syncodeindex') { $index_properties->{$prefix_to}->{'from_code'}->{$prefix_from} = 1; } else { $index_properties->{$prefix_to}->{'from'}->{$prefix_from} = 1; } } else { warn "$ERROR Bad syn*index line: $_"; } next; } elsif ($tag eq 'defindex' || $tag eq 'defcodeindex') { if (/^\@$tag\s+(\w+)\s*$/) { my $name = $1; $index_properties->{$name}->{name} = $name; $index_properties->{$name}->{code} = 1 if $tag eq 'defcodeindex'; } else { warn "$ERROR Bad defindex line: $_"; } next; } elsif (/^\@printindex/) { push (@lines, "$_"); next; } elsif ($tag eq 'sp') { push(@lines, &debug("

\n", __LINE__)); next; } elsif ($tag eq 'center') { push(@lines, &debug("

\n", __LINE__)); s/\@center//; } elsif ($tag eq 'setref') { &protect_html; # if setref contains '&' for instance if (/^\@$tag\s*{($NODERE)}\s*$/) { $setref = $1; $setref =~ s/\s+/ /g; # normalize $setref =~ s/ $//; $node2sec{$setref} = $name; $sec2node{$name} = $setref; $node2href{$setref} = "$docu_doc#$docid"; } else { warn "$ERROR Bad setref line: $_"; } next; } elsif ($tag eq 'lowersections') { local ($sec, $level); while (($sec, $level) = each %sec2level) { $sec2level{$sec} = $level + 1; } next; } elsif ($tag eq 'raisesections') { local ($sec, $level); while (($sec, $level) = each %sec2level) { $sec2level{$sec} = $level - 1; } next; } elsif ($tag eq 'macro' || $tag eq 'rmacro') { if (/^\@$tag\s*(\w+)\s*(.*)/) { my $name = $1; my @args; @args = split(/\s*,\s*/ , $1) if ($2 =~ /^\s*{(.*)}\s*/); $macros->{$name}->{Args} = \@args; $macros->{$name}->{Body} = ''; while (($_ = &next_line) && $_ !~ /\@end $tag/) { $macros->{$name}->{Body} .= $_; } die "ERROR: No closing '\@end $tag' found for macro definition of '$name'\n" unless (/\@end $tag/); chomp $macros->{$name}->{Body}; } else { warn "$ERROR: Bad macro defintion $_" } next; } elsif ($tag eq 'unmacro') { delete $macros->{$1} if (/^\@unmacro\s*(\w+)/); next; } elsif ($tag eq 'documentlanguage') { SetDocumentLanguage($1) if (!$T2H_LANG && /documentlanguage\s*(\w+)/); } elsif (defined($def_map{$tag})) { if ($def_map{$tag}) { s/^\@$tag\s+//; $tag = $def_map{$tag}; $_ = "\@$tag $_"; $tag =~ s/\s.*//; } } elsif (defined($user_sub{$tag})) { s/^\@$tag\s+//; $sub = $user_sub{$tag}; print "# user $tag = $sub, arg: $_" if $T2H_DEBUG & $DEBUG_USER; if (defined(&$sub)) { chop($_); &$sub($_); } else { warn "$ERROR Bad user sub for $tag: $sub\n"; } next; } if (defined($def_map{$tag})) { s/^\@$tag\s+//; if ($tag =~ /x$/) { # extra definition line $tag = $`; $is_extra = 1; } else { $is_extra = 0; } while (/\{([^\{\}]*)\}/) { # this is a {} construct ($before, $contents, $after) = ($`, $1, $'); # protect spaces $contents =~ s/\s+/$;9/g; # restore $_ protecting {} $_ = "$before$;7$contents$;8$after"; } @args = split(/\s+/, &protect_html($_)); foreach (@args) { s/$;9/ /g; # unprotect spaces s/$;7/\{/g; # ... { s/$;8/\}/g; # ... } } $type = shift(@args); $type =~ s/^\{(.*)\}$/$1/; print "# def ($tag): {$type} ", join(', ', @args), "\n" if $T2H_DEBUG & $DEBUG_DEF; $type .= ':'; # it's nicer like this my $name = shift(@args); $name =~ s/^\{(.*)\}$/$1/; if ($is_extra) { $_ = &debug("
", __LINE__); } else { $_ = &debug("
\n
", __LINE__); } if ($tag eq 'deffn' || $tag eq 'defvr' || $tag eq 'deftp') { $_ .= "$type $name"; $_ .= " @args" if @args; } elsif ($tag eq 'deftypefn' || $tag eq 'deftypevr' || $tag eq 'defcv' || $tag eq 'defop') { $ftype = $name; $name = shift(@args); $name =~ s/^\{(.*)\}$/$1/; $_ .= "$type $ftype $name"; $_ .= " @args" if @args; } else { warn "$ERROR Unknown definition type: $tag\n"; $_ .= "$type $name"; $_ .= " @args" if @args; } $_ .= &debug("\n
", __LINE__); $name = &unprotect_html($name); if ($tag eq 'deffn' || $tag eq 'deftypefn') { EnterIndexEntry('f', $name, $docu_doc, $section, \@lines); # unshift(@input_spool, "\@findex $name\n"); } elsif ($tag eq 'defop') { EnterIndexEntry('f', "$name on $ftype", $docu_doc, $section, \@lines); # unshift(@input_spool, "\@findex $name on $ftype\n"); } elsif ($tag eq 'defvr' || $tag eq 'deftypevr' || $tag eq 'defcv') { EnterIndexEntry('v', $name, $docu_doc, $section, \@lines); # unshift(@input_spool, "\@vindex $name\n"); } else { EnterIndexEntry('t', $name, $docu_doc, $section, \@lines); # unshift(@input_spool, "\@tindex $name\n"); } $dont_html = 1; } } elsif ($end_tag) { if ($format_map{$end_tag}) { $in_pre = 0 if $format_map{$end_tag} eq 'PRE'; $in_list-- if $format_map{$end_tag} eq 'UL' || $format_map{$end_tag} eq 'OL' ; &html_pop_if('P'); &html_pop_if('LI'); &html_pop_if(); push(@lines, &debug("\n", __LINE__)); push(@lines, &html_debug('', __LINE__)); } elsif (exists $complex_format_map->{$end_tag}) { my $end = eval $complex_format_map->{$end_tag}->[1]; if ($@) { print "$ERROR: eval of complex_format_map->{$end_tag}->[1] $complex_format_map->{$end_tag}->[0]: $@"; $end = '
' } $in_pre = 0 if $end =~ m|
|; push(@lines, html_debug($end, __LINE__)); } elsif ($end_tag =~ /^(|f|v|multi)table$/) { unless (@tables) { warn "$ERROR \@end $end_tag without \@*table\n"; next; } &html_pop_if('P'); ($table_type, $in_table) = split($;, shift(@tables)); unless ($1 eq $table_type) { warn "$ERROR \@end $end_tag without matching \@$end_tag\n"; next; } if ($table_type eq "multi") { push(@lines, "
\n"); &html_pop_if('TR'); } else { push(@lines, "\n"); &html_pop_if('DD'); } &html_pop_if(); if (@tables) { ($table_type, $in_table) = split($;, $tables[0]); } else { $in_table = 0; } } elsif (defined($def_map{$end_tag})) { push(@lines, &debug("\n", __LINE__)); } elsif ($end_tag eq 'menu') { &html_pop_if(); push(@lines, $_); # must keep it for pass 2 } next; } ############################################################# # anchor insertion while (/\@anchor\s*\{(.*?)\}/) { $_ = $`.$'; my $anchor = $1; $anchor = &normalise_node($anchor); push @lines, &html_debug("\n"); $node2href{$anchor} = "$docu_doc#$anchor"; next INPUT_LINE if $_ =~ /^\s*$/; } ############################################################# # index entry generation, after value substitutions if (/^\@(\w+?)index\s+/) { EnterIndexEntry($1, $', $docu_doc, $section, \@lines); next; } # # protect texi and HTML things &protect_texi; $_ = &protect_html($_) unless $dont_html; $dont_html = 0; # substitution (unsupported things) s/^\@exdent\s+//g; s/\@noindent\s+//g; s/\@refill\s+//g; # other substitutions &simple_substitutions; s/\@footnote\{/\@footnote$docu_doc\{/g; # mark footnotes, cf. pass 4 # # analyze the tag again # if ($tag) { if (defined($sec2level{$tag}) && $sec2level{$tag} > 0) { if (/^\@$tag\s+(.+)$/) { $name = $1; $name = &normalise_node($name); $level = $sec2level{$tag}; # check for index $first_index_chapter = $node if ($level == 1 && !$first_index_chapter && $name =~ /index/i); if ($in_top && /heading/){ $T2H_HAS_TOP_HEADING = 1; $_ = &debug("$name\n", __LINE__); &html_push_if('body'); print "# top heading, section $name, level $level\n" if $T2H_DEBUG & $DEBUG_TOC; } else { unless (/^\@\w*heading/) { unless (/^\@unnumbered/) { my $number = &update_sec_num($tag, $level); $name = $number. ' ' . $name if $T2H_NUMBER_SECTIONS; $sec2number{$name} = $number; $number2sec{$number} = $name; } if (defined($toplevel)) { push @lines, ($level==$toplevel ? $CHAPTEREND : $SECTIONEND); } else { # first time we see a "section" unless ($level == 1) { warn "$WARN The first section found is not of level 1: $_"; } $toplevel = $level; } push(@sections, $name); next_doc() if ($T2H_SPLIT eq 'section' || $T2H_SPLIT && $level == $toplevel); } $sec_num++; $docid = "SEC$sec_num"; $tocid = (/^\@\w*heading/ ? undef : "TOC$sec_num"); # check biblio and glossary $in_bibliography = ($name =~ /^([A-Z]|\d+)?(\.\d+)*\s*bibliography$/i); $in_glossary = ($name =~ /^([A-Z]|\d+)?(\.\d+)*\s*glossary$/i); # check node if ($node) { warn "$ERROR Duplicate node found: $node\n" if ($node2sec{$node}); } else { $name .= ' ' while ($node2sec{$name}); $node = $name; } $name .= ' ' while ($sec2node{$name}); $section = $name; $node2sec{$node} = $name; $sec2node{$name} = $node; $node2href{$node} = "$docu_doc#$docid"; $node2next{$node} = $node_next; $node2prev{$node} = $node_prev; $node2up{$node} = $node_up; print "# node $node, section $name, level $level\n" if $T2H_DEBUG & $DEBUG_TOC; $node = ''; $node_next = ''; $node_prev = ''; $node_next = ''; if ($tocid) { # update TOC while ($level > $curlevel) { $curlevel++; push(@toc_lines, "
    \n"); } while ($level < $curlevel) { $curlevel--; push(@toc_lines, "
\n"); } $_ = &t2h_anchor($tocid, "$docu_doc#$docid", $name, 1); $_ = &substitute_style($_); push(@stoc_lines, "$_
\n") if ($level == 1); if ($T2H_NUMBER_SECTIONS) { push(@toc_lines, $_ . "
\n") } else { push(@toc_lines, "
  • " . $_ ."
  • "); } } else { push(@lines, &html_debug("\n", __LINE__)); } # update DOC push(@lines, &html_debug('', __LINE__)); &html_reset; $_ = " $name \n\n"; $_ = &debug($_, __LINE__); push(@lines, &html_debug('', __LINE__)); } # update DOC foreach $line (split(/\n+/, $_)) { push(@lines, "$line\n"); } next; } else { warn "$ERROR Bad section line: $_"; } } else { # track variables $value{$1} = Unprotect_texi($2), next if /^\@set\s+($VARRE)\s+(.*)$/o; delete $value{$1}, next if /^\@clear\s+($VARRE)\s*$/o; # store things $value{'_shorttitle'} = Unprotect_texi($1), next if /^\@shorttitle\s+(.*)$/; $value{'_setfilename'} = Unprotect_texi($1), next if /^\@setfilename\s+(.*)$/; $value{'_settitle'} = Unprotect_texi($1), next if /^\@settitle\s+(.*)$/; $value{'_author'} .= Unprotect_texi($1)."\n", next if /^\@author\s+(.*)$/; $value{'_subtitle'} .= Unprotect_texi($1)."\n", next if /^\@subtitle\s+(.*)$/; $value{'_title'} .= Unprotect_texi($1)."\n", next if /^\@title\s+(.*)$/; # list item if (/^\s*\@itemx?\s+/) { $what = $'; $what =~ s/\s+$//; if ($in_bibliography && $use_bibliography) { if ($what =~ /^$BIBRE$/o) { $id = 'BIB' . ++$bib_num; $bib2href{$what} = "$docu_doc#$id"; print "# found bibliography for '$what' id $id\n" if $T2H_DEBUG & $DEBUG_BIB; $what = &t2h_anchor($id, '', $what); } } elsif ($in_glossary && $T2H_USE_GLOSSARY) { $id = 'GLOSS' . ++$gloss_num; $entry = $what; $entry =~ tr/A-Z/a-z/ unless $entry =~ /^[A-Z\s]+$/; $gloss2href{$entry} = "$docu_doc#$id"; print "# found glossary for '$entry' id $id\n" if $T2H_DEBUG & $DEBUG_GLOSS; $what = &t2h_anchor($id, '', $what); } elsif ($in_table && ($table_type eq 'f' || $table_type eq 'v')) { EnterIndexEntry($table_type, $what, $docu_doc, $section, \@lines); } &html_pop_if('P'); if ($html_element eq 'DL' || $html_element eq 'DD') { if ($things_map{$in_table} && !$what) { # special case to allow @table @bullet for instance push(@lines, &debug("
    $things_map{$in_table}\n", __LINE__)); } else { push(@lines, &debug("
    \@$in_table\{$what\}\n", __LINE__)); } push(@lines, "
    "); &html_push('DD') unless $html_element eq 'DD'; if ($table_type) { # add also an index unshift(@input_spool, "\@${table_type}index $what\n"); } } elsif ($html_element eq 'TABLE') { push(@lines, &debug("$what\n", __LINE__)); &html_push('TR'); } elsif ($html_element eq 'TR') { push(@lines, &debug("\n", __LINE__)); push(@lines, &debug("$what\n", __LINE__)); } else { push(@lines, &debug("
  • $what\n", __LINE__)); &html_push('LI') unless $html_element eq 'LI'; } push(@lines, &html_debug('', __LINE__)); if ($deferred_ref) { push(@lines, &debug("$deferred_ref\n", __LINE__)); $deferred_ref = ''; } next; } elsif (/^\@tab\s+(.*)$/) { push(@lines, "$1\n"); next; } } } # paragraph separator if ($_ eq "\n" && ! $in_pre) { next if $#lines >= 0 && $lines[$#lines] eq "\n"; if ($html_element eq 'P') { push (@lines, &debug("

    \n", __LINE__)); } # else # { # push(@lines, "

    \n"); # $_ = &debug("

    \n", __LINE__); # } elsif ($html_element eq 'body' || $html_element eq 'BLOCKQUOTE' || $html_element eq 'DD' || $html_element eq 'LI') { &html_push('P'); push(@lines, &debug("

    \n", __LINE__)); } } # otherwise push(@lines, $_) unless $in_titlepage; push(@lines, &debug("\n", __LINE__)) if ($tag eq 'center'); } # finish TOC $level = 0; while ($level < $curlevel) { $curlevel--; push(@toc_lines, "\n"); } print "# end of pass 1\n" if $T2H_VERBOSE; SetDocumentLanguage('en') unless ($T2H_LANG); #+++############################################################################ # # # Stuff related to Index generation # # # #---############################################################################ sub EnterIndexEntry { my $prefix = shift; my $key = shift; my $docu_doc = shift; my $section = shift; my $lines = shift; local $_; warn "$ERROR Undefined index command: $_", next unless (exists ($index_properties->{$prefix})); $key =~ s/\s+$//; $_ = $key; &protect_texi; $key = $_; $_ = &protect_html($_); my $html_key = substitute_style($_); my $id; $key = remove_style($key); $key = remove_things($key); $_ = $key; &unprotect_texi; $key = $_; while (exists $index->{$prefix}->{$key}) {$key .= ' '}; if ($lines->[$#lines] =~ /^$/) { $id = $1; } else { $id = 'IDX' . ++$idx_num; push(@$lines, &t2h_anchor($id, '', $T2H_INVISIBLE_MARK, !$in_pre)); } $index->{$prefix}->{$key}->{html_key} = $html_key; $index->{$prefix}->{$key}->{section} = $section; $index->{$prefix}->{$key}->{href} = "$docu_doc#$id"; print "# found ${prefix}index for '$key' with id $id\n" if $T2H_DEBUG & $DEBUG_INDEX; } sub IndexName2Prefix { my $name = shift; my $prefix; for $prefix (keys %$index_properties) { return $prefix if ($index_properties->{$prefix}->{name} eq $name); } return undef; } sub GetIndexEntries { my $normal = shift; my $code = shift; my ($entries, $prefix, $key) = ({}); for $prefix (keys %$normal) { for $key (keys %{$index->{$prefix}}) { $entries->{$key} = {%{$index->{$prefix}->{$key}}}; } } if (defined($code)) { for $prefix (keys %$code) { unless (exists $normal->{$keys}) { for $key (keys %{$index->{$prefix}}) { $entries->{$key} = {%{$index->{$prefix}->{$key}}}; $entries->{$key}->{html_key} = "$entries->{$key}->{html_key}"; } } } } return $entries; } sub byAlpha { if ($a =~ /^[A-Za-z]/) { if ($b =~ /^[A-Za-z]/) { return lc($a) cmp lc($b); } else { return 1; } } elsif ($b =~ /^[A-Za-z]/) { return -1; } else { return lc($a) cmp lc($b); } } sub GetIndexPages { my $entries = shift; my (@Letters, $key); my ($EntriesByLetter, $Pages, $page) = ({}, [], {}); my @keys = sort byAlpha keys %$entries; for $key (@keys) { push @{$EntriesByLetter->{uc(substr($key,0, 1))}} , $entries->{$key}; } @Letters = sort byAlpha keys %$EntriesByLetter; $T2H_SPLIT_INDEX = 0 unless ($T2H_SPLIT); unless ($T2H_SPLIT_INDEX) { $page->{First} = $Letters[0]; $page->{Last} = $Letters[$#Letters]; $page->{Letters} = \@Letters; $page->{EntriesByLetter} = $EntriesByLetter; push @$Pages, $page; return $Pages; } if ($T2H_SPLIT_INDEX =~ /^\d+$/) { my $i = 0; my ($prev_letter, $letter); $page->{First} = $Letters[0]; for $letter (@Letters) { if ($i > $T2H_SPLIT_INDEX) { $page->{Last} = $prev_letter; push @$Pages, {%$page}; $page->{Letters} = []; $page->{EntriesByLetter} = {}; $page->{First} = $letter; $i=0; } push @{$page->{Letters}}, $letter; $page->{EntriesByLetter}->{$letter} = [@{$EntriesByLetter->{$letter}}]; $i += scalar(@{$EntriesByLetter->{$letter}}); $prev_letter = $letter; } $page->{Last} = $Letters[$#Letters]; push @$Pages, {%$page}; } return $Pages; } sub GetIndexSummary { my $first_page = shift; my $Pages = shift; my $name = shift; my ($page, $letter, $summary, $i, $l1, $l2, $l); $i = 0; $summary = '
    Jump to:   '; for $page ($first_page, @$Pages) { for $letter (@{$page->{Letters}}) { $l = t2h_anchor('', "$page->{href}#${name}_$letter", "$letter", 0, 'style="text-decoration:none"') . "\n   \n"; if ($letter =~ /^[A-Za-z]/) { $l2 .= $l; } else { $l1 .= $l; } } } $summary .= $l1 . "
    \n" if ($l1); $summary .= $l2 . '

    '; return $summary; } sub PrintIndexPage { my $lines = shift; my $summary = shift; my $page = shift; my $name = shift; push @$lines, $summary; push @$lines , <

    EOT for $letter (@{$page->{Letters}}) { push @$lines, "\n"; for $entry (@{$page->{EntriesByLetter}->{$letter}}) { push @$lines, "\n"; } push @$lines, "\n"; } push @$lines, "
    Index Entry Section

    $letter
    " . t2h_anchor('', $entry->{href}, $entry->{html_key}) . "" . t2h_anchor('', sec_href($entry->{section}), clean_name($entry->{section})) . "

    "; push @$lines, $summary; } sub PrintIndex { my $lines = shift; my $name = shift; my $section = shift; $section = 'Top' unless $section; my $prefix = IndexName2Prefix($name); warn ("$ERROR printindex: bad index name: $name"), return unless $prefix; if ($index_properties->{$prefix}->{code}) { $index_properties->{$prefix}->{from_code}->{$prefix} = 1; } else { $index_properties->{$prefix}->{from}->{$prefix}= 1; } my $Entries = GetIndexEntries($index_properties->{$prefix}->{from}, $index_properties->{$prefix}->{from_code}); return unless %$Entries; if ($T2H_IDX_SUMMARY) { my $key; open(FHIDX, ">$docu_rdir$docu_name" . "_$name.idx") || die "Can't open > $docu_rdir$docu_name" . "_$name.idx for writing: $!\n"; print "# writing $name index summary in $docu_rdir$docu_name" . "_$name.idx...\n" if $T2H_VERBOSE; for $key (sort keys %$Entries) { print FHIDX "$key\t$Entries->{$key}->{href}\n"; } } my $Pages = GetIndexPages($Entries); my $page; my $first_page = shift @$Pages; my $sec_name = $section; # remove section number $sec_name =~ s/.*? // if $sec_name =~ /^([A-Z]|\d+)\./; ($first_page->{href} = sec_href($section)) =~ s/\#.*$//; # Update tree structure of document if (@$Pages) { my $sec; my @after; while (@sections && $sections[$#sections] ne $section) { unshift @after, pop @sections; } for $page (@$Pages) { my $node = ($page->{First} ne $page->{Last} ? "$sec_name: $page->{First} -- $page->{Last}" : "$sec_name: $page->{First}"); push @sections, $node; $node2sec{$node} = $node; $sec2node{$node} = $node; $node2up{$node} = $section; $page->{href} = next_doc(); $page->{name} = $node; $node2href{$node} = $page->{href}; if ($prev_node) { $node2next{$prev_node} = $node; $node2prev{$node} = $prev_node; } $prev_node = $node; } push @sections, @after; } my $summary = GetIndexSummary($first_page, $Pages, $name); PrintIndexPage($lines, $summary, $first_page, $name); for $page (@$Pages) { push @$lines, ($T2H_SPLIT eq 'chapter' ? $CHAPTEREND : $SECTIONEND); push @$lines, "

    $page->{name}

    \n"; PrintIndexPage($lines, $summary, $page, $name); } } #+++############################################################################ # # # Pass 2/3: handle style, menu, index, cross-reference # # # #---############################################################################ @lines2 = (); # whole document (2nd pass) @lines3 = (); # whole document (3rd pass) $in_menu = 0; # am I inside a menu while (@lines) { $_ = shift(@lines); # # special case (protected sections) # if (/^$PROTECTTAG/o) { push(@lines2, $_); next; } # # menu # if (/^\@menu\b/) { $in_menu = 1; $in_menu_listing = 1; push(@lines2, &debug("
    \n", __LINE__)); next; } if (/^\@end\s+menu\b/) { if ($in_menu_listing) { push(@lines2, &debug("
    \n", __LINE__)); } else { push(@lines2, &debug("\n", __LINE__)); } $in_menu = 0; $in_menu_listing = 0; next; } if ($in_menu) { my ($node, $name, $descr); if (/^\*\s+($NODERE)::/o) { $node = $1; $descr = $'; } elsif (/^\*\s+(.+):\s+([^\t,\.\n]+)[\t,\.\n]/) { $name = $1; $node = $2; $descr = $'; } elsif (/^\*/) { warn "$ERROR Bad menu line: $_"; } else { if ($in_menu_listing) { $in_menu_listing = 0; push(@lines2, &debug("\n", __LINE__)); } # should be like verbatim -- preseve spaces, etc s/ /\ /g; $_ .= "
    \n"; push(@lines2, $_); } if ($node) { if (! $in_menu_listing) { $in_menu_listing = 1; push(@lines2, &debug("\n", __LINE__)); } # look for continuation while ($lines[0] =~ /^\s+\w+/) { $descr .= shift(@lines); } &menu_entry($node, $name, $descr); } next; } # # printindex # PrintIndex(\@lines2, $2, $1), next if (/^\@printindex\s+(\w+)/); # # simple style substitutions # $_ = &substitute_style($_); # # xref # while (/\@(x|px|info|)ref{([^{}]+)(}?)/) { # note: Texinfo may accept other characters ($type, $nodes, $full) = ($1, $2, $3); ($before, $after) = ($`, $'); if (! $full && $after) { warn "$ERROR Bad xref (no ending } on line): $_"; $_ = "$before$;0${type}ref\{$nodes$after"; next; # while xref } if ($type eq 'x') { $type = "$T2H_WORDS->{$T2H_LANG}->{'See'} "; } elsif ($type eq 'px') { $type = "$T2H_WORDS->{$T2H_LANG}->{'see'} "; } elsif ($type eq 'info') { $type = "$T2H_WORDS->{$T2H_LANG}->{'See'} Info"; } else { $type = ''; } unless ($full) { $next = shift(@lines); $next = &substitute_style($next); chop($nodes); # remove final newline if ($next =~ /\}/) { # split on 2 lines $nodes .= " $`"; $after = $'; } else { $nodes .= " $next"; $next = shift(@lines); $next = &substitute_style($next); chop($nodes); if ($next =~ /\}/) { # split on 3 lines $nodes .= " $`"; $after = $'; } else { warn "$ERROR Bad xref (no ending }): $_"; $_ = "$before$;0xref\{$nodes$after"; unshift(@lines, $next); next; # while xref } } } $nodes =~ s/\s+/ /g; # remove useless spaces @args = split(/\s*,\s*/, $nodes); $node = $args[0]; # the node is always the first arg $node = &normalise_node($node); $sec = $args[2] || $args[1] || $node2sec{$node}; $href = $node2href{$node}; if (@args == 5) { # reference to another manual $sec = $args[2] || $node; $man = $args[4] || $args[3]; $_ = "${before}${type}$T2H_WORDS->{$T2H_LANG}->{'section'} `$sec' in \@cite{$man}$after"; } elsif ($type =~ /Info/) { # inforef warn "$ERROR Wrong number of arguments: $_" unless @args == 3; ($nn, $_, $in) = @args; $_ = "${before}${type} file `$in', node `$nn'$after"; } elsif ($sec && $href && ! $T2H_SHORT_REF) { $_ = "${before}${type}"; $_ .= "$T2H_WORDS->{$T2H_LANG}->{'section'} " if ${type}; $_ .= &t2h_anchor('', $href, $sec) . $after; } elsif ($href) { $_ = "${before}${type} " . &t2h_anchor('', $href, $args[2] || $args[1] || $node) . $after; } else { warn "$ERROR Undefined node ($node): $_"; $_ = "$before$;0xref{$nodes}$after"; } } # replace images s[\@image\s*{(.+?)}] { my @args = split (/\s*,\s*/, $1); my $base = $args[0]; my $image = LocateIncludeFile("$base.png") || LocateIncludeFile("$base.jpg") || LocateIncludeFile("$base.gif"); warn "$ERROR no image file for $base: $_" unless ($image && -e $image); "\"$base\""; ($T2H_CENTER_IMAGE ? "
    \"$base\"
    " : "\"$base\""); }eg; # # try to guess bibliography references or glossary terms # unless (/^/) { $done .= $pre . &t2h_anchor('', $href, $what); } else { $done .= "$pre$what"; } $_ = $post; } $_ = $done . $_; } if ($T2H_USE_GLOSSARY) { $done = ''; while (/\b\w+\b/) { ($pre, $what, $post) = ($`, $&, $'); $entry = $what; $entry =~ tr/A-Z/a-z/ unless $entry =~ /^[A-Z\s]+$/; $href = $gloss2href{$entry}; if (defined($href) && $post !~ /^[^<]*<\/A>/) { $done .= $pre . &t2h_anchor('', $href, $what); } else { $done .= "$pre$what"; } $_ = $post; } $_ = $done . $_; } } # otherwise push(@lines2, $_); } print "# end of pass 2\n" if $T2H_VERBOSE; # # split style substitutions # while (@lines2) { $_ = shift(@lines2); # # special case (protected sections) # if (/^$PROTECTTAG/o) { push(@lines3, $_); next; } # # split style substitutions # $old = ''; while ($old ne $_) { $old = $_; if (/\@(\w+)\{/) { ($before, $style, $after) = ($`, $1, $'); if (defined($style_map{$style})) { $_ = $after; $text = ''; $after = ''; $failed = 1; while (@lines2) { if (/\}/) { $text .= $`; $after = $'; $failed = 0; last; } else { $text .= $_; $_ = shift(@lines2); } } if ($failed) { die "* Bad syntax (\@$style) after: $before\n"; } else { $text = &apply_style($style, $text); $_ = "$before$text$after"; } } } } # otherwise push(@lines3, $_); } print "# end of pass 3\n" if $T2H_VERBOSE; #+++############################################################################ # # # Pass 4: foot notes, final cleanup # # # #---############################################################################ @foot_lines = (); # footnotes @doc_lines = (); # final document $end_of_para = 0; # true if last line is

    while (@lines3) { $_ = shift(@lines3); # # special case (protected sections) # if (/^$PROTECTTAG/o) { push(@doc_lines, $_); $end_of_para = 0; next; } # # footnotes # while (/\@footnote([^\{\s]+)\{/) { ($before, $d, $after) = ($`, $1, $'); $_ = $after; $text = ''; $after = ''; $failed = 1; while (@lines3) { if (/\}/) { $text .= $`; $after = $'; $failed = 0; last; } else { $text .= $_; $_ = shift(@lines3); } } if ($failed) { die "* Bad syntax (\@footnote) after: $before\n"; } else { $foot_num++; $docid = "DOCF$foot_num"; $footid = "FOOT$foot_num"; $foot = "($foot_num)"; push(@foot_lines, "

    " . &t2h_anchor($footid, "$d#$docid", $foot) . "

    \n"); $text = "

    $text" unless $text =~ /^\s*

    /; push(@foot_lines, "$text\n"); $_ = $before . &t2h_anchor($docid, "$docu_foot#$footid", $foot) . $after; } } # # remove unnecessary

    # if (/^\s*

    \s*$/) { next if $end_of_para++; } else { $end_of_para = 0; } # otherwise push(@doc_lines, $_); } print "# end of pass 4\n" if $T2H_VERBOSE; #+++############################################################################ # # # Pass 5: print things # # # #---############################################################################ $T2H_L2H = &l2h_FinishToLatex if ($T2H_L2H); $T2H_L2H = &l2h_ToHtml if ($T2H_L2H); $T2H_L2H = &l2h_InitFromHtml if ($T2H_L2H); # fix node2up, node2prev, node2next, if desired if ($has_top_command) { for $section (keys %sec2number) { $node = $sec2node{$section}; $node2up{$node} = Sec2UpNode($section) unless $node2up{$node}; $node2prev{$node} = Sec2PrevNode($section) unless $node2prev{$node}; $node2next{$node} = Sec2NextNode($section) unless $node2next{$node}; } } # prepare %T2H_THISDOC $T2H_THISDOC{fulltitle} = $value{'_title'} || $value{'_settitle'} || "Untitled Document"; $T2H_THISDOC{title} = $value{'_settitle'} || $T2H_THISDOC{fulltitle}; $T2H_THISDOC{author} = $value{'_author'}; $T2H_THISDOC{subtitle} = $value{'_subtitle'}; $T2H_THISDOC{shorttitle} = $value{'_shorttitle'}; for $key (keys %T2H_THISDOC) { $_ = &substitute_style($T2H_THISDOC{$key}); &unprotect_texi; s/\s*$//; $T2H_THISDOC{$key} = $_; } # if no sections, then simply print document as is unless (@sections) { print "# Writing content into $docu_top_file \n" if $T2H_VERBOSE; open(FILE, "> $docu_top_file") || die "$ERROR: Can't open $docu_top_file for writing: $!\n"; &$T2H_print_page_head(\*FILE); $T2H_THIS_SECTION = \@doc_lines; t2h_print_lines(\*FILE); &$T2H_print_foot_navigation(\*FILE); &$T2H_print_page_foot(\*FILE); close(FILE); goto Finish; } # initialize $T2H_HREF, $T2H_NAME %T2H_HREF = ( 'First' , sec_href($sections[0]), 'Last', sec_href($sections[$#sections]), 'About', $docu_about. '#SEC_About', ); # prepare TOC, OVERVIEW, TOP $T2H_TOC = \@toc_lines; $T2H_OVERVIEW = \@stoc_lines; if ($has_top) { while (1) { $_ = shift @doc_lines; last if /$TOPEND/; push @$T2H_TOP, $_; } $T2H_HREF{'Top'} = $docu_top . '#SEC_Top'; } else { $T2H_HREF{'Top'} = $T2H_HREF{First}; } $node2href{Top} = $T2H_HREF{Top}; $T2H_HREF{Contents} = $docu_toc.'#SEC_Contents' if @toc_lines; $T2H_HREF{Overview} = $docu_stoc.'#SEC_OVERVIEW' if @stoc_lines; # settle on index if ($T2H_INDEX_CHAPTER) { $T2H_HREF{Index} = $node2href{normalise_node($T2H_INDEX_CHAPTER)}; warn "$ERROR T2H_INDEX_CHAPTER '$T2H_INDEX_CHAPTER' not found\n" unless $T2H_HREF{Index}; } if (! $T2H_HREF{Index} && $first_index_chapter) { $T2H_INDEX_CHAPTER = $first_index_chapter; $T2H_HREF{Index} = $node2href{$T2H_INDEX_CHAPTER}; } print "# Using '" . clean_name($T2H_INDEX_CHAPTER) . "' as index page\n" if ($T2H_VERBOSE && $T2H_HREF{Index}); %T2H_NAME = ( 'First', clean_name($sec2node{$sections[0]}), 'Last', clean_name($sec2node{$sections[$#sections]}), 'About', $T2H_WORDS->{$T2H_LANG}->{'About_Title'}, 'Contents', $T2H_WORDS->{$T2H_LANG}->{'ToC_Title'}, 'Overview', $T2H_WORDS->{$T2H_LANG}->{'Overview_Title'}, 'Index' , clean_name($T2H_INDEX_CHAPTER), 'Top', clean_name($T2H_TOP_HEADING || $T2H_THISDOC{'title'} || $T2H_THISDOC{'shorttitle'}), ); ############################################################################# # print frame and frame toc file # if ( $T2H_FRAMES ) { open(FILE, "> $docu_frame_file") || die "$ERROR: Can't open $docu_frame_file for writing: $!\n"; print "# Creating frame in $docu_frame_file ...\n" if $T2H_VERBOSE; &$T2H_print_frame(\*FILE); close(FILE); open(FILE, "> $docu_toc_frame_file") || die "$ERROR: Can't open $docu_toc_frame_file for writing: $!\n"; print "# Creating toc frame in $docu_frame_file ...\n" if $T2H_VERBOSE; &$T2H_print_toc_frame(\*FILE); close(FILE); } ############################################################################# # print Top # open(FILE, "> $docu_top_file") || die "$ERROR: Can't open $docu_top_file for writing: $!\n"; &$T2H_print_page_head(\*FILE) unless ($T2H_SPLIT); if ($has_top) { print "# Creating Top in $docu_top_file ...\n" if $T2H_VERBOSE; $T2H_THIS_SECTION = $T2H_TOP; $T2H_HREF{This} = $T2H_HREF{Top}; $T2H_NAME{This} = $T2H_NAME{Top}; &$T2H_print_Top(\*FILE); } close(FILE) if $T2H_SPLIT; ############################################################################# # Print sections # $T2H_NODE{Forward} = $sec2node{$sections[0]}; $T2H_NAME{Forward} = &clean_name($sec2node{$sections[0]}); $T2H_HREF{Forward} = sec_href($sections[0]); $T2H_NODE{This} = 'Top'; $T2H_NAME{This} = $T2H_NAME{Top}; $T2H_HREF{This} = $T2H_HREF{Top}; if ($T2H_SPLIT) { print "# writing " . scalar(@sections) . " sections in $docu_rdir$docu_name"."_[1..$doc_num]" if $T2H_VERBOSE; $previous = ($T2H_SPLIT eq 'chapter' ? $CHAPTEREND : $SECTIONEND); undef $FH; $doc_num = 0; } else { print "# writing " . scalar(@sections) . " sections in $docu_top_file ..." if $T2H_VERBOSE; $FH = \*FILE; $previous = ''; } $counter = 0; # loop through sections while ($section = shift(@sections)) { if ($T2H_SPLIT && ($T2H_SPLIT eq 'section' || $previous eq $CHAPTEREND)) { if ($FH) { #close previous page &$T2H_print_chapter_footer($FH) if $T2H_SPLIT eq 'chapter'; &$T2H_print_page_foot($FH); close($FH); undef $FH; } } $T2H_NAME{Back} = $T2H_NAME{This}; $T2H_HREF{Back} = $T2H_HREF{This}; $T2H_NODE{Back} = $T2H_NODE{This}; $T2H_NAME{This} = $T2H_NAME{Forward}; $T2H_HREF{This} = $T2H_HREF{Forward}; $T2H_NODE{This} = $T2H_NODE{Forward}; if ($sections[0]) { $T2H_NODE{Forward} = $sec2node{$sections[0]}; $T2H_NAME{Forward} = &clean_name($T2H_NODE{Forward}); $T2H_HREF{Forward} = sec_href($sections[0]); } else { undef $T2H_HREF{Forward}, $T2H_NODE{Forward}, $T2H_NAME{Forward}; } $node = $node2up{$T2H_NODE{This}}; $T2H_HREF{Up} = $node2href{$node}; if ($T2H_HREF{Up} eq $T2H_HREF{This} || ! $T2H_HREF{Up}) { $T2H_NAME{Up} = $T2H_NAME{Top}; $T2H_HREF{Up} = $T2H_HREF{Top}; $T2H_NODE{Up} = 'Up'; } else { $T2H_NAME{Up} = &clean_name($node); $T2H_NODE{Up} = $node; } $node = $T2H_NODE{This}; $node = $node2prev{$node}; $T2H_NAME{Prev} = &clean_name($node); $T2H_HREF{Prev} = $node2href{$node}; $T2H_NODE{Prev} = $node; $node = $T2H_NODE{This}; if ($node2up{$node} && $node2up{$node} ne 'Top'&& ($node2prev{$node} eq $T2H_NODE{Back} || ! $node2prev{$node})) { $node = $node2up{$node}; while ($node && $node ne $node2up{$node} && ! $node2prev{$node}) { $node = $node2up{$node}; } $node = $node2prev{$node} unless $node2up{$node} eq 'Top' || ! $node2up{$node}; } else { $node = $node2prev{$node}; } $T2H_NAME{FastBack} = &clean_name($node); $T2H_HREF{FastBack} = $node2href{$node}; $T2H_NODE{FastBack} = $node; $node = $T2H_NODE{This}; $node = $node2next{$node}; $T2H_NAME{Next} = &clean_name($node); $T2H_HREF{Next} = $node2href{$node}; $T2H_NODE{Next} = $node; $node = $T2H_NODE{This}; if ($node2up{$node} && $node2up{$node} ne 'Top'&& ($node2next{$node} eq $T2H_NODE{Forward} || ! $node2next{$node})) { $node = $node2up{$node}; while ($node && $node ne $node2up{$node} && ! $node2next{$node}) { $node = $node2up{$node}; } } $node = $node2next{$node}; $T2H_NAME{FastForward} = &clean_name($node); $T2H_HREF{FastForward} = $node2href{$node}; $T2H_NODE{FastForward} = $node; if (! defined($FH)) { my $file = $T2H_HREF{This}; $file =~ s/\#.*$//; open(FILE, "> $docu_rdir$file") || die "$ERROR: Can't open $docu_rdir$file for writing: $!\n"; $FH = \*FILE; &$T2H_print_page_head($FH); t2h_print_label($FH); &$T2H_print_chapter_header($FH) if $T2H_SPLIT eq 'chapter'; } else { t2h_print_label($FH); } $T2H_THIS_SECTION = []; while (@doc_lines) { $_ = shift(@doc_lines); last if ($_ eq $SECTIONEND || $_ eq $CHAPTEREND); push(@$T2H_THIS_SECTION, $_); } $previous = $_; &$T2H_print_section($FH); if ($T2H_VERBOSE) { $counter++; print "." if $counter =~ /00$/; } } if ($T2H_SPLIT) { &$T2H_print_chapter_footer($FH) if $T2H_SPLIT eq 'chapter'; &$T2H_print_page_foot($FH); close($FH); } print "\n" if $T2H_VERBOSE; ############################################################################# # Print ToC, Overview, Footnotes # undef $T2H_HREF{Prev}; undef $T2H_HREF{Next}; undef $T2H_HREF{Back}; undef $T2H_HREF{Forward}; undef $T2H_HREF{Up}; if (@foot_lines) { print "# writing Footnotes in $docu_foot_file...\n" if $T2H_VERBOSE; open (FILE, "> $docu_foot_file") || die "$ERROR: Can't open $docu_foot_file for writing: $!\n" if $T2H_SPLIT; $T2H_HREF{This} = $docu_foot; $T2H_NAME{This} = $T2H_WORDS->{$T2H_LANG}->{'Footnotes_Title'}; $T2H_THIS_SECTION = \@foot_lines; &$T2H_print_Footnotes(\*FILE); close(FILE) if $T2H_SPLIT; } if (@toc_lines) { print "# writing Toc in $docu_toc_file...\n" if $T2H_VERBOSE; open (FILE, "> $docu_toc_file") || die "$ERROR: Can't open $docu_toc_file for writing: $!\n" if $T2H_SPLIT; $T2H_HREF{This} = $T2H_HREF{Contents}; $T2H_NAME{This} = $T2H_NAME{Contents}; $T2H_THIS_SECTION = \@toc_lines; &$T2H_print_Toc(\*FILE); close(FILE) if $T2H_SPLIT; } if (@stoc_lines) { print "# writing Overview in $docu_stoc_file...\n" if $T2H_VERBOSE; open (FILE, "> $docu_stoc_file") || die "$ERROR: Can't open $docu_stoc_file for writing: $!\n" if $T2H_SPLIT; $T2H_HREF{This} = $T2H_HREF{Overview}; $T2H_NAME{This} = $T2H_NAME{Overview}; $T2H_THIS_SECTION = \@stoc_lines; unshift @$T2H_THIS_SECTION, "

    \n"; push @$T2H_THIS_SECTION, "\n
    \n"; &$T2H_print_Overview(\*FILE); close(FILE) if $T2H_SPLIT; } if ($about_body = &$T2H_about_body()) { print "# writing About in $docu_about_file...\n" if $T2H_VERBOSE; open (FILE, "> $docu_about_file") || die "$ERROR: Can't open $docu_about_file for writing: $!\n" if $T2H_SPLIT; $T2H_HREF{This} = $T2H_HREF{About}; $T2H_NAME{This} = $T2H_NAME{About}; $T2H_THIS_SECTION = [$about_body]; &$T2H_print_About(\*FILE); close(FILE) if $T2H_SPLIT; } unless ($T2H_SPLIT) { &$T2H_print_page_foot(\*FILE); close (FILE); } Finish: &l2h_FinishFromHtml if ($T2H_L2H); &l2h_Finish if($T2H_L2H); print "# that's all folks\n" if $T2H_VERBOSE; exit(0); #+++############################################################################ # # # Low level functions # # # #---############################################################################ sub LocateIncludeFile { my $file = shift; my $dir; return $file if (-e $file && -r $file); foreach $dir (@T2H_INCLUDE_DIRS) { return "$dir/$file" if (-e "$dir/$file" && -r "$dir/$file"); } return undef; } sub clean_name { local ($_); $_ = &remove_style($_[0]); &unprotect_texi; return $_; } sub update_sec_num { local($name, $level) = @_; my $ret; $level--; # here we start at 0 if ($name =~ /^appendix/ || defined(@appendix_sec_num)) { # appendix style if (defined(@appendix_sec_num)) { &incr_sec_num($level, @appendix_sec_num); } else { @appendix_sec_num = ('A', 0, 0, 0); } $ret = join('.', @appendix_sec_num[0..$level]); } else { # normal style if (defined(@normal_sec_num)) { &incr_sec_num($level, @normal_sec_num); } else { @normal_sec_num = (1, 0, 0, 0); } $ret = join('.', @normal_sec_num[0..$level]); } $ret .= "." if $level == 0; return $ret; } sub incr_sec_num { local($level, $l); $level = shift(@_); $_[$level]++; foreach $l ($level+1 .. 3) { $_[$l] = 0; } } sub Sec2UpNode { my $sec = shift; my $num = $sec2number{$sec}; return '' unless $num; return 'Top' unless $num =~ /\.\d+/; $num =~ s/\.[^\.]*$//; $num = $num . '.' unless $num =~ /\./; return $sec2node{$number2sec{$num}}; } sub Sec2PrevNode { my $sec = shift; my $num = $sec2number{$sec}; my ($i, $post); if ($num =~ /(\w+)(\.$|$)/) { $num = $`; $i = $1; $post = $2; if ($i eq 'A') { $i = $normal_sec_num[0]; } elsif ($i ne '1') { # unfortunately, -- operator is not magical $i = chr(ord($i) + 1); } else { return ''; } return $sec2node{$number2sec{$num . $i . $post}} } return ''; } sub Sec2NextNode { my $sec = shift; my $num = $sec2number{$sec}; my $i; if ($num =~ /(\w+)(\.$|$)/) { $num = $`; $i = $1; $post = $2; if ($post eq '.' && $i eq $normal_sec_num[0]) { $i = 'A'; } else { $i++; } return $sec2node{$number2sec{$num . $i . $post}} } return ''; } sub check { local($_, %seen, %context, $before, $match, $after); while (<>) { if (/\@(\*|\.|\:|\@|\{|\})/) { $seen{$&}++; $context{$&} .= "> $_" if $T2H_VERBOSE; $_ = "$`XX$'"; redo; } if (/\@(\w+)/) { ($before, $match, $after) = ($`, $&, $'); if ($before =~ /\b[\w-]+$/ && $after =~ /^[\w-.]*\b/) { # e-mail address $seen{'e-mail address'}++; $context{'e-mail address'} .= "> $_" if $T2H_VERBOSE; } else { $seen{$match}++; $context{$match} .= "> $_" if $T2H_VERBOSE; } $match =~ s/^\@/X/; $_ = "$before$match$after"; redo; } } foreach (sort(keys(%seen))) { if ($T2H_VERBOSE) { print "$_\n"; print $context{$_}; } else { print "$_ ($seen{$_})\n"; } } } sub open { local($name) = @_; ++$fh_name; if (open($fh_name, $name)) { unshift(@fhs, $fh_name); } else { warn "$ERROR Can't read file $name: $!\n"; } } sub init_input { @fhs = (); # hold the file handles to read @input_spool = (); # spooled lines to read $fh_name = 'FH000'; &open($docu); } sub next_line { local($fh, $line); if (@input_spool) { $line = shift(@input_spool); return($line); } while (@fhs) { $fh = $fhs[0]; $line = <$fh>; return($line) if $line; close($fh); shift(@fhs); } return(undef); } # used in pass 1, use &next_line sub skip_until { local($tag) = @_; local($_); while ($_ = &next_line) { return if /^\@end\s+$tag\s*$/; } die "* Failed to find '$tag' after: " . $lines[$#lines]; } # used in pass 1 for l2h use &next_line sub string_until { local($tag) = @_; local($_, $string); while ($_ = &next_line) { return $string if /^\@end\s+$tag\s*$/; # $_ =~ s/hbox/mbox/g; $string = $string.$_; } die "* Failed to find '$tag' after: " . $lines[$#lines]; } # # HTML stacking to have a better HTML output # sub html_reset { @html_stack = ('html'); $html_element = 'body'; } sub html_push { local($what) = @_; push(@html_stack, $html_element); $html_element = $what; } sub html_push_if { local($what) = @_; push(@html_stack, $html_element) if ($html_element && $html_element ne 'P'); $html_element = $what; } sub html_pop { $html_element = pop(@html_stack); } sub html_pop_if { local($elt); if (@_) { foreach $elt (@_) { if ($elt eq $html_element) { $html_element = pop(@html_stack) if @html_stack; last; } } } else { $html_element = pop(@html_stack) if @html_stack; } } sub html_debug { local($what, $line) = @_; if ($T2H_DEBUG & $DEBUG_HTML) { $what = "\n" unless $what; return("$what") } return($what); } # to debug the output... sub debug { local($what, $line) = @_; return("$what") if $T2H_DEBUG & $DEBUG_HTML; return($what); } sub SimpleTexi2Html { local $_ = $_[0]; &protect_texi; &protect_html; $_ = substitute_style($_); $_[0] = $_; } sub normalise_node { local $_ = $_[0]; s/\s+/ /g; s/ $//; s/^ //; &protect_texi; &protect_html; $_ = substitute_style($_); $_[0] = $_; } sub menu_entry { my ($node, $name, $descr) = @_; my ($href, $entry); &normalise_node($node); $href = $node2href{$node}; if ($href) { $descr =~ s/^\s+//; $descr =~ s/\s*$//; $descr = SimpleTexi2Html($descr); if ($T2H_NUMBER_SECTIONS && !$T2H_NODE_NAME_IN_MENU && $node2sec{$node}) { $entry = $node2sec{$node}; $name = ''; } else { &normalise_node($name); $entry = ($name && ($name ne $node || ! $T2H_AVOID_MENU_REDUNDANCY) ? "$name : $node" : $node); } if ($T2H_AVOID_MENU_REDUNDANCY && $descr) { my $clean_entry = $entry; $clean_entry =~ s/^.*? // if ($clean_entry =~ /^([A-Z]|\d+)\.[\d\.]* /); $clean_entry =~ s/[^\w]//g; my $clean_descr = $descr; $clean_descr =~ s/[^\w]//g; $descr = '' if ($clean_entry eq $clean_descr) } push(@lines2,&debug('
    \n", __LINE__)); } elsif ($node =~ /^\(.*\)\w+/) { push(@lines2,&debug('\n", __LINE__)) } else { warn "$ERROR Undefined node of menu_entry ($node): $_"; } } sub do_ctrl { "^$_[0]" } sub do_email { local($addr, $text) = split(/,\s*/, $_[0]); $text = $addr unless $text; &t2h_anchor('', "mailto:$addr", $text); } sub do_sc { # l2h does this much better return &l2h_ToLatex("{\\sc ".&unprotect_html($_[0])."}") if ($T2H_L2H); return "\U$_[0]\E"; } sub do_math { return &l2h_ToLatex("\$".&unprotect_html($_[0])."\$") if ($T2H_L2H); return "".$text.""; } sub do_uref { local($url, $text, $only_text) = split(/,\s*/, $_[0]); $text = $only_text if $only_text; $text = $url unless $text; &t2h_anchor('', $url, $text); } sub do_url { &t2h_anchor('', $_[0], $_[0]) } sub do_acronym { return '' . $_[0] . ''; } sub do_accent { return "&$_[0]acute;" if $_[1] eq 'H'; return "$_[0]." if $_[1] eq 'dotaccent'; return "$_[0]*" if $_[1] eq 'ringaccent'; return "$_[0]".'[' if $_[1] eq 'tieaccent'; return "$_[0]".'(' if $_[1] eq 'u'; return "$_[0]_" if $_[1] eq 'ubaraccent'; return ".$_[0]" if $_[1] eq 'udotaccent'; return "$_[0]<" if $_[1] eq 'v'; return "&$_[0]cedil;" if $_[1] eq ','; return "$_[0]" if $_[1] eq 'dotless'; return undef; } sub apply_style { local($texi_style, $text) = @_; local($style); $style = $style_map{$texi_style}; if (defined($style)) { # known style if ($style =~ /^\"/) { # add quotes $style = $'; $text = "\`$text\'"; } if ($style =~ /^\&/) { # custom $style = $'; $text = &$style($text, $texi_style); } elsif ($style) { # good style $text = "<$style>$text"; } else { # no style } } else { # unknown style $text = undef; } return($text); } # remove Texinfo styles sub remove_style { local($_) = @_; 1 while(s/\@\w+{([^\{\}]+)}/$1/g); return($_); } sub remove_things { local ($_) = @_; s|\@(\w+)\{\}|$1|g; return $_; } sub substitute_style { local($_) = @_; local($changed, $done, $style, $text); &simple_substitutions; $changed = 1; while ($changed) { $changed = 0; $done = ''; while (/\@(\w+){([^\{\}]+)}/ || /\@(,){([^\{\}]+)}/) { $text = &apply_style($1, $2); if ($text) { $_ = "$`$text$'"; $changed = 1; } else { $done .= "$`\@$1"; $_ = "{$2}$'"; } } $_ = $done . $_; } return($_); } sub t2h_anchor { local($name, $href, $text, $newline, $extra_attribs) = @_; local($result); $result = " $what =~ s/\&/\&\#38;/g; $what =~ s/\/\&\#62;/g; # restore anything in quotes # this fixes my problem where I had: # < IMG SRC="leftarrow.gif" ALT="<--" > but what if I wanted < in my ALT text ?? # maybe byte stuffing or some other technique should be used. $what =~ s/\"([^\&]+)\&\#60;(.*)\"/"$1<$2"/g; $what =~ s/\"([^\&]+)\&\#62;(.*)\"/"$1>$2"/g; $what =~ s/\"([^\&]+)\&\#38;(.*)\"/"$1&$2"/g; # but recognize some HTML things $what =~ s/\&\#60;\/A\&\#62;/<\/A>/g; # $what =~ s/\&\#60;A ([^\&]+)\&\#62;//g; # $what =~ s/\&\#60;IMG ([^\&]+)\&\#62;//g; # return($what); } sub unprotect_texi { s/$;0/\@/go; s/$;1/\{/go; s/$;2/\}/go; s/$;3/\`/go; s/$;4/\'/go; } sub Unprotect_texi { local $_ = shift; &unprotect_texi; return($_); } sub unprotect_html { local($what) = @_; $what =~ s/\&\#38;/\&/g; $what =~ s/\&\#60;/\/g; return($what); } sub t2h_print_label { my $fh = shift; my $href = shift || $T2H_HREF{This}; $href =~ s/.*#(.*)$/$1/; print $fh qq{\n}; } ############################################################################## # These next few lines are legal in both Perl and nroff. .00 ; # finish .ig 'di \" finish diversion--previous line must be blank .nr nl 0-1 \" fake up transition to first page again .nr % 0 \" start at page 1 '; __END__ ############# From here on it's a standard manual page ############ .so /usr/local/man/man1/texi2html.1 gdb-doc-7.6.2/readline/doc/history.texi0000644000175000017500000000533312250770610017013 0ustar zumbizumbi\input texinfo @c -*-texinfo-*- @c %**start of header (This is for running Texinfo on a region.) @setfilename history.info @settitle GNU History Library @c %**end of header (This is for running Texinfo on a region.) @include version.texi @copying This document describes the GNU History library (version @value{VERSION}, @value{UPDATED}), a programming tool that provides a consistent user interface for recalling lines of previously typed input. Copyright @copyright{} 1988--2011 Free Software Foundation, Inc. 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. @quotation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover texts being ``A GNU Manual'', and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled ``GNU Free Documentation License''. (a) The FSF's Back-Cover Text is: You are free to copy and modify this GNU manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom.'' @end quotation @end copying @dircategory Libraries @direntry * History: (history). The GNU history library API. @end direntry @titlepage @title GNU History Library @subtitle Edition @value{EDITION}, for @code{History Library} Version @value{VERSION}. @subtitle @value{UPDATED-MONTH} @author Chet Ramey, Case Western Reserve University @author Brian Fox, Free Software Foundation @page @vskip 0pt plus 1filll @insertcopying @sp 1 Published by the Free Software Foundation @* 59 Temple Place, Suite 330, @* Boston, MA 02111-1307 @* USA @* @end titlepage @contents @ifnottex @node Top @top GNU History Library This document describes the GNU History library, a programming tool that provides a consistent user interface for recalling lines of previously typed input. @menu * Using History Interactively:: GNU History User's Manual. * Programming with GNU History:: GNU History Programmer's Manual. * GNU Free Documentation License:: License for copying this manual. * Concept Index:: Index of concepts described in this manual. * Function and Variable Index:: Index of externally visible functions and variables. @end menu @end ifnottex @syncodeindex fn vr @include hsuser.texi @include hstech.texi @node GNU Free Documentation License @appendix GNU Free Documentation License @include fdl.texi @node Concept Index @appendix Concept Index @printindex cp @node Function and Variable Index @appendix Function and Variable Index @printindex vr @bye gdb-doc-7.6.2/readline/doc/version.texi0000644000175000017500000000033512250770610016774 0ustar zumbizumbi@ignore Copyright (C) 1988-2011 Free Software Foundation, Inc. @end ignore @set EDITION 6.2 @set VERSION 6.2 @set UPDATED September 6 2010 @set UPDATED-MONTH September 2010 @set LASTCHANGE Mon Sep 6 22:07:10 EDT 2010 gdb-doc-7.6.2/readline/doc/rluser.texi0000644000175000017500000022001112250770610016616 0ustar zumbizumbi@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.) @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--2011 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. Command line editing is enabled by default when using an interactive shell, unless the @option{--noediting} option is supplied at shell invocation. Line editing is also used when using the @option{-e} option to the @code{read} builtin command (@pxref{Bash Builtins}). By default, the line editing commands are similar to those of Emacs. A vi-style line editing interface is also available. Line editing can be enabled at any time using the @option{-o emacs} or @option{-o vi} options to the @code{set} builtin command (@pxref{The Set Builtin}), or disabled using the @option{+o emacs} or @option{+o vi} options to @code{set}. @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}. If that file does not exist or cannot be read, the ultimate default is @file{/etc/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. Unrecognized variable names are ignored. Boolean variables (those that can be set to on or off) are set to on if the value is null or empty, @var{on} (case-insensitive), or 1. Any other value results in the variable being set to off. @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 bind-tty-special-chars @vindex bind-tty-special-chars If set to @samp{on}, Readline attempts to bind the control characters treated specially by the kernel's terminal driver to their Readline equivalents. @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-display-width @vindex completion-display-width The number of screen columns used to display possible matches when performing completion. The value is ignored if it is less than 0 or greater than the terminal screen width. A value of 0 will cause matches to be displayed one per line. The default value is -1. @item completion-ignore-case @vindex 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-map-case @vindex completion-map-case If set to @samp{on}, and @var{completion-ignore-case} is enabled, Readline treats hyphens (@samp{-}) and underscores (@samp{_}) as equivalent when performing case-insensitive filename matching and completion. @item completion-prefix-display-length @vindex completion-prefix-display-length The length in characters of the common prefix of a list of possible completions that is displayed without modification. When set to a value greater than zero, common prefixes longer than this value are replaced with an ellipsis when displaying possible completions. @item completion-query-items @vindex completion-query-items The number of possible completions that determines when the user is asked whether the list of possibilities should be displayed. 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. A negative value means Readline should never ask. 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 echo-control-characters When set to @samp{on}, on operating systems that indicate they support it, readline echoes a character corresponding to a signal generated from the keyboard. The default is @samp{on}. @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 enable-meta-key When set to @samp{on}, Readline will try to enable any meta modifier key the terminal claims to support when it is called. On many terminals, the meta key is used to send eight-bit characters. The default is @samp{on}. @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}. @item history-preserve-point @vindex history-preserve-point If set to @samp{on}, the history code attempts to place the point (the current cursor position) at the same location on each history line retrieved with @code{previous-history} or @code{next-history}. The default is @samp{off}. @item history-size @vindex history-size Set the maximum number of history entries saved in the history list. If set to zero, the number of entries in the history list is not limited. @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. If set to @samp{off}, the leading @samp{.} must be supplied by the user in the filename to be completed. This variable is @samp{on} by default. @item menu-complete-display-prefix @vindex menu-complete-display-prefix If set to @samp{on}, menu completion displays the common prefix of the list of possible completions (which may be empty) before cycling through the list. The default is @samp{off}. @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 revert-all-at-newline @vindex revert-all-at-newline If set to @samp{on}, Readline will undo all changes to history lines before returning when @code{accept-line} is executed. By default, history lines may be modified and retain individual undo lists across calls to @code{readline}. 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 show-all-if-unmodified @vindex show-all-if-unmodified This alters the default behavior of the completion functions in a fashion similar to @var{show-all-if-ambiguous}. If set to @samp{on}, words which have more than one possible completion without any possible partial completion (the possible completions don't share a common prefix) cause the matches to be listed immediately instead of ringing the bell. The default value is @samp{off}. @item skip-completed-text @vindex skip-completed-text If set to @samp{on}, this alters the default completion behavior when inserting a single match into the line. It's only active when performing completion in the middle of a word. If enabled, readline does not insert characters from the completion that match characters after point in the word being completed, so portions of the word following the cursor are not duplicated. For instance, if this is enabled, attempting completion when the cursor is after the @samp{e} in @samp{Makefile} will result in @samp{Makefile} rather than @samp{Makefilefile}, assuming there is a single possible completion. 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. There can be no space between the key name and the colon -- that will be interpreted as part of the key name. 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. @ifset BashFeatures @item shell-forward-word () Move forward to the end of the next word. Words are delimited by non-quoted shell metacharacters. @item shell-backward-word () Move back to the start of the current or previous word. Words are delimited by non-quoted shell metacharacters. @end ifset @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. Once the argument @var{n} is computed, the argument is extracted as if the @samp{!@var{n}} history expansion had been specified. @item yank-last-arg (M-. or M-_) Insert last argument to the previous command (the last word of the previous history entry). With a numeric argument, behave exactly like @code{yank-nth-arg}. Successive calls to @code{yank-last-arg} move back through the history list, inserting the last word (or the word specified by the argument to the first call) of each line in turn. Any numeric argument supplied to these successive calls determines the direction to move through the history. A negative argument switches the direction through the history (back or forward). The history expansion facilities are used to extract the last argument, as if the @samp{!$} history expansion had been specified. @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}. @ifset BashFeatures @item shell-kill-word () 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{shell-forward-word}. @item shell-backward-kill-word () Kill the word behind point. Word boundaries are the same as @code{shell-backward-word}. @end ifset @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 unix-filename-rubout () Kill the word behind point, using white space and the slash character as the word boundaries. 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. When displaying completions, Readline sets the number of columns used for display to the value of @code{completion-display-width}, the value of the environment variable @env{COLUMNS}, or the screen width, in that order. @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 menu-complete-backward () Identical to @code{menu-complete}, but moves backward through the list of possible completions, as if @code{menu-complete} had been given a negative argument. @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 dabbrev-expand () Attempt menu 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 skip-csi-sequence () Read enough characters to consume a multi-key sequence such as those defined for keys like Home and End. Such sequences begin with a Control Sequence Indicator (CSI), usually ESC-[. If this sequence is bound to "\e[", keys producing such sequences will have no effect unless explicitly bound to a readline command, instead of inserting stray characters into the editing buffer. This is unbound by default, but usually bound to ESC-[. @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{$VISUAL}, @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} 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 the empty string (completion attempted at the beginning of an empty line), any compspec defined with the @option{-E} option to @code{complete} is used. 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. If those searches do not result in a compspec, any compspec defined with the @option{-D} option to @code{complete} is used as the default. 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, and arithmetic 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}, @env{COMP_POINT}, @env{COMP_KEY}, and @env{COMP_TYPE} 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} and @code{compopt} builtins 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. If the @option{-o plusdirs} option was supplied to @code{complete} when the compspec was defined, directory name completion is attempted and any matches are added to the results of the other actions. 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 bashdefault} option was supplied to @code{complete} when the compspec was defined, the default Bash completions are attempted if the compspec generates no matches. 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 (and, if attempted, the default Bash completions) generate 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. There is some support for dynamically modifying completions. This is most useful when used in combination with a default completion specified with @option{-D}. It's possible for shell functions executed as completion handlers to indicate that completion should be retried by returning an exit status of 124. If a shell function returns 124, and changes the compspec associated with the command on which completion is being attempted (supplied as the first argument when the function is executed), programmable completion restarts from the beginning, with an attempt to find a new compspec for that command. This allows a set of completions to be built dynamically as completion is attempted, rather than being loaded all at once. For instance, assuming that there is a library of compspecs, each kept in a file corresponding to the name of the command, the following default completion function would load completions dynamically: @example _completion_loader() @{ . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124 @} complete -D -F _completion_loader @end example @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}] [-DE] [-A @var{action}] [-G @var{globpat}] [-W @var{wordlist}] [-F @var{function}] [-C @var{command}] [-X @var{filterpat}] [-P @var{prefix}] [-S @var{suffix}] @var{name} [@var{name} @dots{}]} @code{complete -pr [-DE] [@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 @option{-D} option indicates that the remaining options and actions should apply to the ``default'' command completion; that is, completion attempted on a command for which no completion has previously been defined. The @option{-E} option indicates that the remaining options and actions should apply to ``empty'' command completion; that is, completion attempted on a blank line. The process of applying these completion specifications when word completion is attempted is described above (@pxref{Programmable Completion}). The @option{-D} option takes precedence over @option{-E}. 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 bashdefault Perform the rest of the default Bash completions if the compspec generates no matches. @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 quoting special characters, 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. @item plusdirs After any matches defined by the compspec are generated, directory name completion is attempted and any matches are added to the results of the other actions. @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 -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 -G @var{globpat} The filename expansion pattern @var{globpat} is expanded to generate the possible completions. @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. @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 -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. @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. @item compopt @btindex compopt @example @code{compopt} [-o @var{option}] [-DE] [+o @var{option}] [@var{name}] @end example Modify completion options for each @var{name} according to the @var{option}s, or for the currently-executing completion if no @var{name}s are supplied. If no @var{option}s are given, display the completion options for each @var{name} or the current completion. The possible values of @var{option} are those valid for the @code{complete} builtin described above. The @option{-D} option indicates that the remaining options should apply to the ``default'' command completion; that is, completion attempted on a command for which no completion has previously been defined. The @option{-E} option indicates that the remaining options should apply to ``empty'' command completion; that is, completion attempted on a blank line. The @option{-D} option takes precedence over @option{-E}. The return value is true unless an invalid option is supplied, an attempt is made to modify the options for a @var{name} for which no completion specification exists, or an output error occurs. @end table @end ifset gdb-doc-7.6.2/readline/doc/hstech.texi0000644000175000017500000005047612250770610016600 0ustar zumbizumbi@ignore This file documents the user interface to the GNU History library. Copyright (C) 1988-2011 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 Programming with GNU History @chapter Programming with GNU History This chapter describes how to interface programs that you write with the @sc{gnu} History Library. It should be considered a technical guide. For information on the interactive use of @sc{gnu} History, @pxref{Using History Interactively}. @menu * Introduction to History:: What is the GNU History library for? * History Storage:: How information is stored. * History Functions:: Functions that you can use. * History Variables:: Variables that control behaviour. * History Programming Example:: Example of using the GNU History Library. @end menu @node Introduction to History @section Introduction to History Many programs read input from the user a line at a time. The @sc{gnu} History library is able to keep track of those lines, associate arbitrary data with each line, and utilize information from previous lines in composing new ones. The programmer using the History library has available functions for remembering lines on a history list, associating arbitrary data with a line, removing lines from the list, searching through the list for a line containing an arbitrary text string, and referencing any line in the list directly. In addition, a history @dfn{expansion} function is available which provides for a consistent user interface across different programs. The user using programs written with the History library has the benefit of a consistent user interface with a set of well-known commands for manipulating the text of previous lines and using that text in new commands. The basic history manipulation commands are similar to the history substitution provided by @code{csh}. If the programmer desires, he can use the Readline library, which includes some history manipulation by default, and has the added advantage of command line editing. Before declaring any functions using any functionality the History library provides in other code, an application writer should include the file @code{} in any file that uses the History library's features. It supplies extern declarations for all of the library's public functions and variables, and declares all of the public data structures. @node History Storage @section History Storage The history list is an array of history entries. A history entry is declared as follows: @example typedef void *histdata_t; typedef struct _hist_entry @{ char *line; char *timestamp; histdata_t data; @} HIST_ENTRY; @end example The history list itself might therefore be declared as @example HIST_ENTRY **the_history_list; @end example The state of the History library is encapsulated into a single structure: @example /* * A structure used to pass around the current state of the history. */ typedef struct _hist_state @{ HIST_ENTRY **entries; /* Pointer to the entries themselves. */ int offset; /* The location pointer within this array. */ int length; /* Number of elements within this array. */ int size; /* Number of slots allocated to this array. */ int flags; @} HISTORY_STATE; @end example If the flags member includes @code{HS_STIFLED}, the history has been stifled. @node History Functions @section History Functions This section describes the calling sequence for the various functions exported by the @sc{gnu} History library. @menu * Initializing History and State Management:: Functions to call when you want to use history in a program. * History List Management:: Functions used to manage the list of history entries. * Information About the History List:: Functions returning information about the history list. * Moving Around the History List:: Functions used to change the position in the history list. * Searching the History List:: Functions to search the history list for entries containing a string. * Managing the History File:: Functions that read and write a file containing the history list. * History Expansion:: Functions to perform csh-like history expansion. @end menu @node Initializing History and State Management @subsection Initializing History and State Management This section describes functions used to initialize and manage the state of the History library when you want to use the history functions in your program. @deftypefun void using_history (void) Begin a session in which the history functions might be used. This initializes the interactive variables. @end deftypefun @deftypefun {HISTORY_STATE *} history_get_history_state (void) Return a structure describing the current state of the input history. @end deftypefun @deftypefun void history_set_history_state (HISTORY_STATE *state) Set the state of the history list according to @var{state}. @end deftypefun @node History List Management @subsection History List Management These functions manage individual entries on the history list, or set parameters managing the list itself. @deftypefun void add_history (const char *string) Place @var{string} at the end of the history list. The associated data field (if any) is set to @code{NULL}. @end deftypefun @deftypefun void add_history_time (const char *string) Change the time stamp associated with the most recent history entry to @var{string}. @end deftypefun @deftypefun {HIST_ENTRY *} remove_history (int which) Remove history entry at offset @var{which} from the history. The removed element is returned so you can free the line, data, and containing structure. @end deftypefun @deftypefun {histdata_t} free_history_entry (HIST_ENTRY *histent) Free the history entry @var{histent} and any history library private data associated with it. Returns the application-specific data so the caller can dispose of it. @end deftypefun @deftypefun {HIST_ENTRY *} replace_history_entry (int which, const char *line, histdata_t data) Make the history entry at offset @var{which} have @var{line} and @var{data}. This returns the old entry so the caller can dispose of any application-specific data. In the case of an invalid @var{which}, a @code{NULL} pointer is returned. @end deftypefun @deftypefun void clear_history (void) Clear the history list by deleting all the entries. @end deftypefun @deftypefun void stifle_history (int max) Stifle the history list, remembering only the last @var{max} entries. @end deftypefun @deftypefun int unstifle_history (void) Stop stifling the history. This returns the previously-set maximum number of history entries (as set by @code{stifle_history()}). The value is positive if the history was stifled, negative if it wasn't. @end deftypefun @deftypefun int history_is_stifled (void) Returns non-zero if the history is stifled, zero if it is not. @end deftypefun @node Information About the History List @subsection Information About the History List These functions return information about the entire history list or individual list entries. @deftypefun {HIST_ENTRY **} history_list (void) Return a @code{NULL} terminated array of @code{HIST_ENTRY *} which is the current input history. Element 0 of this list is the beginning of time. If there is no history, return @code{NULL}. @end deftypefun @deftypefun int where_history (void) Returns the offset of the current history element. @end deftypefun @deftypefun {HIST_ENTRY *} current_history (void) Return the history entry at the current position, as determined by @code{where_history()}. If there is no entry there, return a @code{NULL} pointer. @end deftypefun @deftypefun {HIST_ENTRY *} history_get (int offset) Return the history entry at position @var{offset}, starting from @code{history_base} (@pxref{History Variables}). If there is no entry there, or if @var{offset} is greater than the history length, return a @code{NULL} pointer. @end deftypefun @deftypefun time_t history_get_time (HIST_ENTRY *entry) Return the time stamp associated with the history entry @var{entry}. @end deftypefun @deftypefun int history_total_bytes (void) Return the number of bytes that the primary history entries are using. This function returns the sum of the lengths of all the lines in the history. @end deftypefun @node Moving Around the History List @subsection Moving Around the History List These functions allow the current index into the history list to be set or changed. @deftypefun int history_set_pos (int pos) Set the current history offset to @var{pos}, an absolute index into the list. Returns 1 on success, 0 if @var{pos} is less than zero or greater than the number of history entries. @end deftypefun @deftypefun {HIST_ENTRY *} previous_history (void) Back up the current history offset to the previous history entry, and return a pointer to that entry. If there is no previous entry, return a @code{NULL} pointer. @end deftypefun @deftypefun {HIST_ENTRY *} next_history (void) Move the current history offset forward to the next history entry, and return the a pointer to that entry. If there is no next entry, return a @code{NULL} pointer. @end deftypefun @node Searching the History List @subsection Searching the History List @cindex History Searching These functions allow searching of the history list for entries containing a specific string. Searching may be performed both forward and backward from the current history position. The search may be @dfn{anchored}, meaning that the string must match at the beginning of the history entry. @cindex anchored search @deftypefun int history_search (const char *string, int direction) Search the history for @var{string}, starting at the current history offset. If @var{direction} is less than 0, then the search is through previous entries, otherwise through subsequent entries. If @var{string} is found, then the current history index is set to that history entry, and the value returned is the offset in the line of the entry where @var{string} was found. Otherwise, nothing is changed, and a -1 is returned. @end deftypefun @deftypefun int history_search_prefix (const char *string, int direction) Search the history for @var{string}, starting at the current history offset. The search is anchored: matching lines must begin with @var{string}. If @var{direction} is less than 0, then the search is through previous entries, otherwise through subsequent entries. If @var{string} is found, then the current history index is set to that entry, and the return value is 0. Otherwise, nothing is changed, and a -1 is returned. @end deftypefun @deftypefun int history_search_pos (const char *string, int direction, int pos) Search for @var{string} in the history list, starting at @var{pos}, an absolute index into the list. If @var{direction} is negative, the search proceeds backward from @var{pos}, otherwise forward. Returns the absolute index of the history element where @var{string} was found, or -1 otherwise. @end deftypefun @node Managing the History File @subsection Managing the History File The History library can read the history from and write it to a file. This section documents the functions for managing a history file. @deftypefun int read_history (const char *filename) Add the contents of @var{filename} to the history list, a line at a time. If @var{filename} is @code{NULL}, then read from @file{~/.history}. Returns 0 if successful, or @code{errno} if not. @end deftypefun @deftypefun int read_history_range (const char *filename, int from, int to) Read a range of lines from @var{filename}, adding them to the history list. Start reading at line @var{from} and end at @var{to}. If @var{from} is zero, start at the beginning. If @var{to} is less than @var{from}, then read until the end of the file. If @var{filename} is @code{NULL}, then read from @file{~/.history}. Returns 0 if successful, or @code{errno} if not. @end deftypefun @deftypefun int write_history (const char *filename) Write the current history to @var{filename}, overwriting @var{filename} if necessary. If @var{filename} is @code{NULL}, then write the history list to @file{~/.history}. Returns 0 on success, or @code{errno} on a read or write error. @end deftypefun @deftypefun int append_history (int nelements, const char *filename) Append the last @var{nelements} of the history list to @var{filename}. If @var{filename} is @code{NULL}, then append to @file{~/.history}. Returns 0 on success, or @code{errno} on a read or write error. @end deftypefun @deftypefun int history_truncate_file (const char *filename, int nlines) Truncate the history file @var{filename}, leaving only the last @var{nlines} lines. If @var{filename} is @code{NULL}, then @file{~/.history} is truncated. Returns 0 on success, or @code{errno} on failure. @end deftypefun @node History Expansion @subsection History Expansion These functions implement history expansion. @deftypefun int history_expand (char *string, char **output) Expand @var{string}, placing the result into @var{output}, a pointer to a string (@pxref{History Interaction}). Returns: @table @code @item 0 If no expansions took place (or, if the only change in the text was the removal of escape characters preceding the history expansion character); @item 1 if expansions did take place; @item -1 if there was an error in expansion; @item 2 if the returned line should be displayed, but not executed, as with the @code{:p} modifier (@pxref{Modifiers}). @end table If an error ocurred in expansion, then @var{output} contains a descriptive error message. @end deftypefun @deftypefun {char *} get_history_event (const char *string, int *cindex, int qchar) Returns the text of the history event beginning at @var{string} + @var{*cindex}. @var{*cindex} is modified to point to after the event specifier. At function entry, @var{cindex} points to the index into @var{string} where the history event specification begins. @var{qchar} is a character that is allowed to end the event specification in addition to the ``normal'' terminating characters. @end deftypefun @deftypefun {char **} history_tokenize (const char *string) Return an array of tokens parsed out of @var{string}, much as the shell might. The tokens are split on the characters in the @var{history_word_delimiters} variable, and shell quoting conventions are obeyed. @end deftypefun @deftypefun {char *} history_arg_extract (int first, int last, const char *string) Extract a string segment consisting of the @var{first} through @var{last} arguments present in @var{string}. Arguments are split using @code{history_tokenize}. @end deftypefun @node History Variables @section History Variables This section describes the externally-visible variables exported by the @sc{gnu} History Library. @deftypevar int history_base The logical offset of the first entry in the history list. @end deftypevar @deftypevar int history_length The number of entries currently stored in the history list. @end deftypevar @deftypevar int history_max_entries The maximum number of history entries. This must be changed using @code{stifle_history()}. @end deftypevar @deftypevar int history_write_timestamps If non-zero, timestamps are written to the history file, so they can be preserved between sessions. The default value is 0, meaning that timestamps are not saved. The current timestamp format uses the value of @var{history_comment_char} to delimit timestamp entries in the history file. If that variable does not have a value (the default), timestamps will not be written. @end deftypevar @deftypevar char history_expansion_char The character that introduces a history event. The default is @samp{!}. Setting this to 0 inhibits history expansion. @end deftypevar @deftypevar char history_subst_char The character that invokes word substitution if found at the start of a line. The default is @samp{^}. @end deftypevar @deftypevar char history_comment_char During tokenization, if this character is seen as the first character of a word, then it and all subsequent characters up to a newline are ignored, suppressing history expansion for the remainder of the line. This is disabled by default. @end deftypevar @deftypevar {char *} history_word_delimiters The characters that separate tokens for @code{history_tokenize()}. The default value is @code{" \t\n()<>;&|"}. @end deftypevar @deftypevar {char *} history_search_delimiter_chars The list of additional characters which can delimit a history search string, in addition to space, TAB, @samp{:} and @samp{?} in the case of a substring search. The default is empty. @end deftypevar @deftypevar {char *} history_no_expand_chars The list of characters which inhibit history expansion if found immediately following @var{history_expansion_char}. The default is space, tab, newline, carriage return, and @samp{=}. @end deftypevar @deftypevar int history_quotes_inhibit_expansion If non-zero, single-quoted words are not scanned for the history expansion character. The default value is 0. @end deftypevar @deftypevar {rl_linebuf_func_t *} history_inhibit_expansion_function This should be set to the address of a function that takes two arguments: a @code{char *} (@var{string}) and an @code{int} index into that string (@var{i}). It should return a non-zero value if the history expansion starting at @var{string[i]} should not be performed; zero if the expansion should be done. It is intended for use by applications like Bash that use the history expansion character for additional purposes. By default, this variable is set to @code{NULL}. @end deftypevar @node History Programming Example @section History Programming Example The following program demonstrates simple use of the @sc{gnu} History Library. @smallexample #include #include main (argc, argv) int argc; char **argv; @{ char line[1024], *t; int len, done = 0; line[0] = 0; using_history (); while (!done) @{ printf ("history$ "); fflush (stdout); t = fgets (line, sizeof (line) - 1, stdin); if (t && *t) @{ len = strlen (t); if (t[len - 1] == '\n') t[len - 1] = '\0'; @} if (!t) strcpy (line, "quit"); if (line[0]) @{ char *expansion; int result; result = history_expand (line, &expansion); if (result) fprintf (stderr, "%s\n", expansion); if (result < 0 || result == 2) @{ free (expansion); continue; @} add_history (expansion); strncpy (line, expansion, sizeof (line) - 1); free (expansion); @} if (strcmp (line, "quit") == 0) done = 1; else if (strcmp (line, "save") == 0) write_history ("history_file"); else if (strcmp (line, "read") == 0) read_history ("history_file"); else if (strcmp (line, "list") == 0) @{ register HIST_ENTRY **the_list; register int i; the_list = history_list (); if (the_list) for (i = 0; the_list[i]; i++) printf ("%d: %s\n", i + history_base, the_list[i]->line); @} else if (strncmp (line, "delete", 6) == 0) @{ int which; if ((sscanf (line + 6, "%d", &which)) == 1) @{ HIST_ENTRY *entry = remove_history (which); if (!entry) fprintf (stderr, "No such entry %d\n", which); else @{ free (entry->line); free (entry); @} @} else @{ fprintf (stderr, "non-numeric arg given to `delete'\n"); @} @} @} @} @end smallexample gdb-doc-7.6.2/readline/doc/texi2dvi0000755000175000017500000005557112250770610016114 0ustar zumbizumbi#! /bin/sh # texi2dvi --- produce DVI (or PDF) files from Texinfo (or LaTeX) sources. # $Id$ # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, # 2002, 2003 Free Software Foundation, Inc. # # 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 3 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, see . # # Original author: Noah Friedman . # # Please send bug reports, etc. to bug-texinfo@gnu.org. # If possible, please send a copy of the output of the script called with # the `--debug' option when making a bug report. # This string is expanded by rcs automatically when this file is checked out. rcs_revision='$Revision$' rcs_version=`set - $rcs_revision; echo $2` program=`echo $0 | sed -e 's!.*/!!'` version="texi2dvi (GNU Texinfo 4.5) $rcs_version Copyright (C) 2003 Free Software Foundation, Inc. There is NO warranty. You may redistribute this software under the terms of the GNU General Public License. For more information about these matters, see the files named COPYING." usage="Usage: $program [OPTION]... FILE... Run each Texinfo or LaTeX FILE through TeX in turn until all cross-references are resolved, building all indices. The directory containing each FILE is searched for included files. The suffix of FILE is used to determine its language (LaTeX or Texinfo). Makeinfo is used to perform Texinfo macro expansion before running TeX when needed. Operation modes: -b, --batch no interaction -c, --clean remove all auxiliary files -D, --debug turn on shell debugging (set -x) -h, --help display this help and exit successfully -o, --output=OFILE leave output in OFILE (implies --clean); Only one input FILE may be specified in this case -q, --quiet no output unless errors (implies --batch) -s, --silent same as --quiet -v, --version display version information and exit successfully -V, --verbose report on what is done TeX tuning: -@ use @input instead of \input; for preloaded Texinfo -e, -E, --expand force macro expansion using makeinfo -I DIR search DIR for Texinfo files -l, --language=LANG specify the LANG of FILE (LaTeX or Texinfo) -p, --pdf use pdftex or pdflatex for processing -t, --texinfo=CMD insert CMD after @setfilename in copy of input file multiple values accumulate The values of the BIBTEX, LATEX (or PDFLATEX), MAKEINDEX, MAKEINFO, TEX (or PDFTEX), and TEXINDEX environment variables are used to run those commands, if they are set. Email bug reports to , general questions and discussion to . Texinfo home page: http://www.gnu.org/software/texinfo/" # Initialize variables for option overriding and otherwise. # Don't use `unset' since old bourne shells don't have this command. # Instead, assign them an empty value. batch=false # eval for batch mode clean= debug= escape='\' expand= # t for expansion via makeinfo miincludes= # makeinfo include path oformat=dvi oname= # --output quiet= # by default let the tools' message be displayed set_language= textra= tmpdir=${TMPDIR:-/tmp}/t2d$$ # avoid collisions on 8.3 filesystems. txincludes= # TEXINPUTS extensions, with trailing colon txiprereq=19990129 # minimum texinfo.tex version to have macro expansion verbose=false # echo for verbose mode orig_pwd=`pwd` # Systems which define $COMSPEC or $ComSpec use semicolons to separate # directories in TEXINPUTS. if test -n "$COMSPEC$ComSpec"; then path_sep=";" else path_sep=":" fi # Pacify verbose cds. CDPATH=${ZSH_VERSION+.}$path_sep # In case someone crazy insists on using grep -E. : ${EGREP=egrep} # Save this so we can construct a new TEXINPUTS path for each file. TEXINPUTS_orig="$TEXINPUTS" # Unfortunately makeindex does not read TEXINPUTS. INDEXSTYLE_orig="$INDEXSTYLE" export TEXINPUTS INDEXSTYLE # Push a token among the arguments that will be used to notice when we # ended options/arguments parsing. # Use "set dummy ...; shift" rather than 'set - ..." because on # Solaris set - turns off set -x (but keeps set -e). # Use ${1+"$@"} rather than "$@" because Digital Unix and Ultrix 4.3 # still expand "$@" to a single argument (the empty string) rather # than nothing at all. arg_sep="$$--$$" set dummy ${1+"$@"} "$arg_sep"; shift # # Parse command line arguments. while test x"$1" != x"$arg_sep"; do # Handle --option=value by splitting apart and putting back on argv. case "$1" in --*=*) opt=`echo "$1" | sed -e 's/=.*//'` val=`echo "$1" | sed -e 's/[^=]*=//'` shift set dummy "$opt" "$val" ${1+"$@"}; shift ;; esac # This recognizes --quark as --quiet. So what. case "$1" in -@ ) escape=@;; # Silently and without documentation accept -b and --b[atch] as synonyms. -b | --b*) batch=eval;; -q | -s | --q* | --s*) quiet=t; batch=eval;; -c | --c*) clean=t;; -D | --d*) debug=t;; -e | -E | --e*) expand=t;; -h | --h*) echo "$usage"; exit 0;; -I | --I*) shift miincludes="$miincludes -I $1" txincludes="$txincludes$1$path_sep" ;; -l | --l*) shift; set_language=$1;; -o | --o*) shift clean=t case "$1" in /* | ?:/*) oname=$1;; *) oname="$orig_pwd/$1";; esac;; -p | --p*) oformat=pdf;; -t | --t*) shift; textra="$textra\\ $1";; -v | --vers*) echo "$version"; exit 0;; -V | --verb*) verbose=echo;; --) # What remains are not options. shift while test x"$1" != x"$arg_sep"; do set dummy ${1+"$@"} "$1"; shift shift done break;; -*) echo "$0: Unknown or ambiguous option \`$1'." >&2 echo "$0: Try \`--help' for more information." >&2 exit 1;; *) set dummy ${1+"$@"} "$1"; shift;; esac shift done # Pop the token shift # Interpret remaining command line args as filenames. case $# in 0) echo "$0: Missing file arguments." >&2 echo "$0: Try \`--help' for more information." >&2 exit 2 ;; 1) ;; *) if test -n "$oname"; then echo "$0: Can't use option \`--output' with more than one argument." >&2 exit 2 fi ;; esac # Prepare the temporary directory. Remove it at exit, unless debugging. if test -z "$debug"; then trap "cd / && rm -rf $tmpdir" 0 1 2 15 fi # Create the temporary directory with strict rights (umask 077 && mkdir $tmpdir) || exit 1 # Prepare the tools we might need. This may be extra work in some # cases, but improves the readibility of the script. utildir=$tmpdir/utils mkdir $utildir || exit 1 # A sed script that preprocesses Texinfo sources in order to keep the # iftex sections only. We want to remove non TeX sections, and # comment (with `@c texi2dvi') TeX sections so that makeinfo does not # try to parse them. Nevertheless, while commenting TeX sections, # don't comment @macro/@end macro so that makeinfo does propagate # them. Unfortunately makeinfo --iftex --no-ifhtml --no-ifinfo # doesn't work well enough (yet) to use that, so work around with sed. comment_iftex_sed=$utildir/comment.sed cat <$comment_iftex_sed /^@tex/,/^@end tex/{ s/^/@c texi2dvi/ } /^@iftex/,/^@end iftex/{ s/^/@c texi2dvi/ /^@c texi2dvi@macro/,/^@c texi2dvi@end macro/{ s/^@c texi2dvi// } } /^@html/,/^@end html/{ s/^/@c (texi2dvi)/ } /^@ifhtml/,/^@end ifhtml/{ s/^/@c (texi2dvi)/ } /^@ifnottex/,/^@end ifnottex/{ s/^/@c (texi2dvi)/ } /^@ifinfo/,/^@end ifinfo/{ /^@node/p /^@menu/,/^@end menu/p t s/^/@c (texi2dvi)/ } s/^@ifnotinfo/@c texi2dvi@ifnotinfo/ s/^@end ifnotinfo/@c texi2dvi@end ifnotinfo/ EOF # Uncommenting is simple: Remove any leading `@c texi2dvi'. uncomment_iftex_sed=$utildir/uncomment.sed cat <$uncomment_iftex_sed s/^@c texi2dvi// EOF # A shell script that computes the list of xref files. # Takes the filename (without extension) of which we look for xref # files as argument. The index files must be reported last. get_xref_files=$utildir/get_xref.sh cat <<\EOF >$get_xref_files #! /bin/sh # Get list of xref files (indexes, tables and lists). # Find all files having root filename with a two-letter extension, # saves the ones that are really Texinfo-related files. .?o? catches # many files: .toc, .log, LaTeX tables and lists, FiXme's .lox, maybe more. for this_file in "$1".?o? "$1".aux "$1".?? "$1".idx; do # If file is empty, skip it. test -s "$this_file" || continue # If the file is not suitable to be an index or xref file, don't # process it. The file can't be if its first character is not a # backslash or single quote. first_character=`sed -n '1s/^\(.\).*$/\1/p;q' $this_file` if test "x$first_character" = "x\\" \ || test "x$first_character" = "x'"; then xref_files="$xref_files ./$this_file" fi done echo "$xref_files" EOF chmod 500 $get_xref_files # File descriptor usage: # 0 standard input # 1 standard output (--verbose messages) # 2 standard error # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 5 tools output (turned off by --quiet) # Tools' output. If quiet, discard, else redirect to the message flow. if test "$quiet" = t; then exec 5>/dev/null else exec 5>&1 fi # Enable tracing test "$debug" = t && set -x # # TeXify files. for command_line_filename in ${1+"$@"}; do $verbose "Processing $command_line_filename ..." # If the COMMAND_LINE_FILENAME is not absolute (e.g., --debug.tex), # prepend `./' in order to avoid that the tools take it as an option. echo "$command_line_filename" | $EGREP '^(/|[A-z]:/)' >/dev/null \ || command_line_filename="./$command_line_filename" # See if the file exists. If it doesn't we're in trouble since, even # though the user may be able to reenter a valid filename at the tex # prompt (assuming they're attending the terminal), this script won't # be able to find the right xref files and so forth. if test ! -r "$command_line_filename"; then echo "$0: Could not read $command_line_filename, skipping." >&2 continue fi # Get the name of the current directory. We want the full path # because in clean mode we are in tmp, in which case a relative # path has no meaning. filename_dir=`echo $command_line_filename | sed 's!/[^/]*$!!;s!^$!.!'` filename_dir=`cd "$filename_dir" >/dev/null && pwd` # Strip directory part but leave extension. filename_ext=`basename "$command_line_filename"` # Strip extension. filename_noext=`echo "$filename_ext" | sed 's/\.[^.]*$//'` ext=`echo "$filename_ext" | sed 's/^.*\.//'` # _src. Use same basename since we want to generate aux files with # the same basename as the manual. If --expand, then output the # macro-expanded file to here, else copy the original file. tmpdir_src=$tmpdir/src filename_src=$tmpdir_src/$filename_noext.$ext # _xtr. The file with the user's extra commands. tmpdir_xtr=$tmpdir/xtr filename_xtr=$tmpdir_xtr/$filename_noext.$ext # _bak. Copies of the previous xref files (another round is run if # they differ from the new one). tmpdir_bak=$tmpdir/bak # Make all those directories and give up if we can't succeed. mkdir $tmpdir_src $tmpdir_xtr $tmpdir_bak || exit 1 # Source file might include additional sources. # We want `.:$orig_pwd' before anything else. (We'll add `.:' later # after all other directories have been turned into absolute paths.) # `.' goes first to ensure that any old .aux, .cps, # etc. files in ${directory} don't get used in preference to fresher # files in `.'. Include orig_pwd in case we are in clean mode, where # we've cd'd to a temp directory. common="$orig_pwd$path_sep$filename_dir$path_sep$txincludes" TEXINPUTS="$common$TEXINPUTS_orig" INDEXSTYLE="$common$INDEXSTYLE_orig" # Convert relative paths to absolute paths, so we can run in another # directory (e.g., in --clean mode, or during the macro-support # detection.) # # Empty path components are meaningful to tex. We rewrite them # as `EMPTY' so they don't get lost when we split on $path_sep. TEXINPUTS=`echo $TEXINPUTS |sed 's/^:/EMPTY:/;s/:$/:EMPTY/;s/::/:EMPTY:/g'` INDEXSTYLE=`echo $INDEXSTYLE |sed 's/^:/EMPTY:/;s/:$/:EMPTY/;s/::/:EMPTY:/g'` save_IFS=$IFS IFS=$path_sep set x $TEXINPUTS; shift TEXINPUTS=. for dir do case $dir in EMPTY) TEXINPUTS=$TEXINPUTS$path_sep ;; [\\/]* | ?:[\\/]*) # Absolute paths don't need to be expansed. TEXINPUTS=$TEXINPUTS$path_sep$dir ;; *) abs=`cd "$dir" && pwd` && TEXINPUTS=$TEXINPUTS$path_sep$abs ;; esac done set x $INDEXSTYLE; shift INDEXSTYLE=. for dir do case $dir in EMPTY) INDEXSTYLE=$INDEXSTYLE$path_sep ;; [\\/]* | ?:[\\/]*) # Absolute paths don't need to be expansed. INDEXSTYLE=$INDEXSTYLE$path_sep$dir ;; *) abs=`cd "$dir" && pwd` && INDEXSTYLE=$INDEXSTYLE$path_sep$abs ;; esac done IFS=$save_IFS # If the user explicitly specified the language, use that. # Otherwise, if the first line is \input texinfo, assume it's texinfo. # Otherwise, guess from the file extension. if test -n "$set_language"; then language=$set_language elif sed 1q "$command_line_filename" | grep 'input texinfo' >/dev/null; then language=texinfo else language= fi # Get the type of the file (latex or texinfo) from the given language # we just guessed, or from the file extension if not set yet. case ${language:-$filename_ext} in [lL]a[tT]e[xX] | *.ltx | *.tex) # Assume a LaTeX file. LaTeX needs bibtex and uses latex for # compilation. No makeinfo. bibtex=${BIBTEX:-bibtex} makeinfo= # no point in running makeinfo on latex source. texindex=${MAKEINDEX:-makeindex} if test $oformat = dvi; then tex=${LATEX:-latex} else tex=${PDFLATEX:-pdflatex} fi ;; *) # Assume a Texinfo file. Texinfo files need makeinfo, texindex and tex. bibtex= texindex=${TEXINDEX:-texindex} if test $oformat = dvi; then tex=${TEX:-tex} else tex=${PDFTEX:-pdftex} fi # Unless required by the user, makeinfo expansion is wanted only # if texinfo.tex is too old. if test "$expand" = t; then makeinfo=${MAKEINFO:-makeinfo} else # Check if texinfo.tex performs macro expansion by looking for # its version. The version is a date of the form YEAR-MO-DA. # We don't need to use [0-9] to match the digits since anyway # the comparison with $txiprereq, a number, will fail with non # digits. txiversion_tex=txiversion.tex echo '\input texinfo.tex @bye' >$tmpdir/$txiversion_tex # Run in the tmpdir to avoid leaving files. eval `cd $tmpdir >/dev/null && $tex $txiversion_tex 2>/dev/null | sed -n 's/^.*\[\(.*\)version \(....\)-\(..\)-\(..\).*$/txiformat=\1 txiversion="\2\3\4"/p'` $verbose "texinfo.tex preloaded as \`$txiformat', version is \`$txiversion' ..." if test "$txiprereq" -le "$txiversion" >/dev/null 2>&1; then makeinfo= else makeinfo=${MAKEINFO:-makeinfo} fi # As long as we had to run TeX, offer the user this convenience if test "$txiformat" = Texinfo; then escape=@ fi fi ;; esac # Expand macro commands in the original source file using Makeinfo. # Always use `end' footnote style, since the `separate' style # generates different output (arguably this is a bug in -E). # Discard main info output, the user asked to run TeX, not makeinfo. if test -n "$makeinfo"; then $verbose "Macro-expanding $command_line_filename to $filename_src ..." sed -f $comment_iftex_sed "$command_line_filename" \ | $makeinfo --footnote-style=end -I "$filename_dir" $miincludes \ -o /dev/null --macro-expand=- \ | sed -f $uncomment_iftex_sed >"$filename_src" filename_input=$filename_src fi # If makeinfo failed (or was not even run), use the original file as input. if test $? -ne 0 \ || test ! -r "$filename_src"; then $verbose "Reverting to $command_line_filename ..." filename_input=$filename_dir/$filename_ext fi # Used most commonly for @finalout, @smallbook, etc. if test -n "$textra"; then $verbose "Inserting extra commands: $textra" sed '/^@setfilename/a\ '"$textra" "$filename_input" >$filename_xtr filename_input=$filename_xtr fi # If clean mode was specified, then move to the temporary directory. if test "$clean" = t; then $verbose "cd $tmpdir_src" cd "$tmpdir_src" || exit 1 fi while :; do # will break out of loop below orig_xref_files=`$get_xref_files "$filename_noext"` # Save copies of originals for later comparison. if test -n "$orig_xref_files"; then $verbose "Backing up xref files: `echo $orig_xref_files | sed 's|\./||g'`" cp $orig_xref_files $tmpdir_bak fi # Run bibtex on current file. # - If its input (AUX) exists. # - If AUX contains both `\bibdata' and `\bibstyle'. # - If some citations are missing (LOG contains `Citation'). # or the LOG complains of a missing .bbl # # We run bibtex first, because I can see reasons for the indexes # to change after bibtex is run, but I see no reason for the # converse. # # Don't try to be too smart. Running bibtex only if the bbl file # exists and is older than the LaTeX file is wrong, since the # document might include files that have changed. Because there # can be several AUX (if there are \include's), but a single LOG, # looking for missing citations in LOG is easier, though we take # the risk to match false messages. if test -n "$bibtex" \ && test -r "$filename_noext.aux" \ && test -r "$filename_noext.log" \ && (grep '^\\bibdata[{]' "$filename_noext.aux" \ && grep '^\\bibstyle[{]' "$filename_noext.aux" \ && (grep 'Warning:.*Citation.*undefined' "$filename_noext.log" \ || grep 'No file .*\.bbl\.' "$filename_noext.log")) \ >/dev/null 2>&1; \ then $verbose "Running $bibtex $filename_noext ..." if $bibtex "$filename_noext" >&5; then :; else echo "$0: $bibtex exited with bad status, quitting." >&2 exit 1 fi fi # What we'll run texindex on -- exclude non-index files. # Since we know index files are last, it is correct to remove everything # before .aux and .?o?. But don't really do o # -- don't match whitespace as . # Otherwise, if orig_xref_files contains something like # foo.xo foo.whatever # the space after the o will get matched. index_files=`echo "$orig_xref_files" \ | sed "s!.*\.aux!!g; s!./$filename_noext\.[^ ]o[^ ]!!g; s/^[ ]*//;s/[ ]*$//"` # Run texindex (or makeindex) on current index files. If they # already exist, and after running TeX a first time the index # files don't change, then there's no reason to run TeX again. # But we won't know that if the index files are out of date or # nonexistent. if test -n "$texindex" && test -n "$index_files"; then $verbose "Running $texindex $index_files ..." if $texindex $index_files 2>&5 1>&2; then :; else echo "$0: $texindex exited with bad status, quitting." >&2 exit 1 fi fi # Finally, run TeX. # Prevent $ESCAPE from being interpreted by the shell if it happens # to be `/'. $batch tex_args="\\${escape}nonstopmode\ \\${escape}input" cmd="$tex $tex_args $filename_input" $verbose "Running $cmd ..." if $cmd >&5; then :; else echo "$0: $tex exited with bad status, quitting." >&2 echo "$0: see $filename_noext.log for errors." >&2 test "$clean" = t \ && cp "$filename_noext.log" "$orig_pwd" exit 1 fi # Decide if looping again is needed. finished=t # LaTeX (and the package changebar) report in the LOG file if it # should be rerun. This is needed for files included from # subdirs, since texi2dvi does not try to compare xref files in # subdirs. Performing xref files test is still good since LaTeX # does not report changes in xref files. if grep "Rerun to get" "$filename_noext.log" >/dev/null 2>&1; then finished= fi # Check if xref files changed. new_xref_files=`$get_xref_files "$filename_noext"` $verbose "Original xref files = `echo $orig_xref_files | sed 's|\./||g'`" $verbose "New xref files = `echo $new_xref_files | sed 's|\./||g'`" # If old and new lists don't at least have the same file list, # then one file or another has definitely changed. test "x$orig_xref_files" != "x$new_xref_files" && finished= # File list is the same. We must compare each file until we find # a difference. if test -n "$finished"; then for this_file in $new_xref_files; do $verbose "Comparing xref file `echo $this_file | sed 's|\./||g'` ..." # cmp -s returns nonzero exit status if files differ. if cmp -s "$this_file" "$tmpdir_bak/$this_file"; then :; else # We only need to keep comparing until we find one that # differs, because we'll have to run texindex & tex again no # matter how many more there might be. finished= $verbose "xref file `echo $this_file | sed 's|\./||g'` differed ..." test "$debug" = t && diff -c "$tmpdir_bak/$this_file" "$this_file" break fi done fi # If finished, exit the loop, else rerun the loop. test -n "$finished" && break done # If we were in clean mode, compilation was in a tmp directory. # Copy the DVI (or PDF) file into the directory where the compilation # has been done. (The temp dir is about to get removed anyway.) # We also return to the original directory so that # - the next file is processed in correct conditions # - the temporary file can be removed if test -n "$clean"; then if test -n "$oname"; then dest=$oname else dest=$orig_pwd fi $verbose "Copying $oformat file from `pwd` to $dest" cp -p "./$filename_noext.$oformat" "$dest" cd / # in case $orig_pwd is on a different drive (for DOS) cd $orig_pwd || exit 1 fi # Remove temporary files. if test "x$debug" = "x"; then $verbose "Removing $tmpdir_src $tmpdir_xtr $tmpdir_bak ..." cd / rm -rf $tmpdir_src $tmpdir_xtr $tmpdir_bak fi done $verbose "$0 done." exit 0 # exit successfully, not however we ended the loop. gdb-doc-7.6.2/readline/doc/hsuser.texi0000644000175000017500000004013112250770610016616 0ustar zumbizumbi@ignore This file documents the user interface to the GNU History library. Copyright (C) 1988--2011 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 GDB bundling modification: @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 @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 your own programs, @c GDB bundling modification: @pxref{Programming with GNU History, , , history, GNU History Library}. @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 @option{-o history} option to the @code{set} builtin is enabled (@pxref{The Set Builtin}), the shell provides access to the @dfn{command history}, the list of commands previously typed. The value of the @env{HISTSIZE} shell variable is used as the number of commands to save in a history list. The text of the last @env{$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 @env{HISTIGNORE} and @env{HISTCONTROL}. When the shell starts up, the history is initialized from the file named by the @env{HISTFILE} variable (default @file{~/.bash_history}). The file named by the value of @env{HISTFILE} is truncated, if necessary, to contain no more than the number of lines specified by the value of the @env{HISTFILESIZE} variable. When an interactive shell exits, the last @env{$HISTSIZE} lines are copied from the history list to the file named by @env{$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 @env{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 @env{$HISTFILESIZE} lines. If @env{HISTFILESIZE} is not set, no truncation is performed. If the @env{HISTTIMEFORMAT} is set, the time stamp information associated with each history entry is written to the history file, marked with the history comment character. When the history file is read, lines beginning with the history comment character followed immediately by a digit are interpreted as timestamps for the previous history line. 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 @env{HISTCONTROL} and @env{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}] [-lnr] [@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 @option{-l} flag is given, the commands are listed on standard output. The @option{-n} flag suppresses the command numbers when listing. The @option{-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 @env{FCEDIT} variable if set, or the value of the @env{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 a @samp{*} have been modified. An argument of @var{n} lists only the last @var{n} lines. If the shell variable @env{HISTTIMEFORMAT} is set and not null, it is used as a format string for @var{strftime} to display the time stamp associated with each displayed history entry. No intervening blank is printed between the formatted time stamp and the history line. 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 @option{-w}, @option{-r}, @option{-a}, or @option{-n} options is used, if @var{filename} is given, then it is used as the history file. If not, then the value of the @env{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 @option{-p} option to the @code{history} builtin command may be used to see what a history expansion will do before using it. The @option{-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, as explained above (@pxref{Bash Variables}). The shell uses the history comment character to mark history timestamps when writing the history file. @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. Unless the reference is absolute, events are relative to the current position in the history list. @cindex history events @table @asis @item @code{!} @ifset BashFeatures Start a history substitution, except when followed by a space, tab, the end of the line, @samp{=} or @samp{(} (when the @code{extglob} shell option is enabled using the @code{shopt} builtin). @end ifset @ifclear BashFeatures Start a history substitution, except when followed by a space, tab, the end of the line, or @samp{=}. @end ifclear @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 preceding the current position in the history list starting with @var{string}. @item @code{!?@var{string}[?]} Refer to the most recent command preceding the current position in the history list 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 @itemx a 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{&}. @item G Apply the following @samp{s} modifier once to each word in the event. @end table gdb-doc-7.6.2/readline/INSTALL0000644000175000017500000003002012250770610014672 0ustar zumbizumbiBasic Installation ================== These are installation instructions for Readline-6.2. The simplest way to compile readline is: 1. `cd' to the directory containing the readline source code and type `./configure' to configure readline for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes some time. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile readline and build the static readline and history libraries. If supported, the shared readline and history libraries will be built also. See below for instructions on compiling the other parts of the distribution. Typing `make everything' will cause the static and shared libraries (if supported) and the example programs to be built. 3. Type `make install' to install the static readline and history libraries, the readline include files, the documentation, and, if supported, the shared readline and history libraries. 4. You can remove the created libraries and object files from the build directory by typing `make clean'. To also remove the files that `configure' created (so you can compile readline for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the readline developers, and should be used with care. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in the build directory, and Makefiles in the `doc', `shlib', and `examples' subdirectories. It also creates a `config.h' file containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile readline, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The readline `configure.in' requires autoconf version 2.50 or newer. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile readline for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile readline for one architecture at a time in the source code directory. After you have installed readline for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the readline libraries in `/usr/local/lib', the include files in `/usr/local/include/readline', the man pages in `/usr/local/man', and the info files in `/usr/local/info'. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH' or by supplying a value for the DESTDIR variable when running `make install'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the readline Makefiles will use PATH as the prefix for installing the libraries. Documentation and other data files will still use the regular prefix. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but need to determine by the type of host readline will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM (e.g., i386-unknown-freebsd4.2). See the file `config.sub' for the possible values of each field. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: the readline `configure' looks for a site script, but not all `configure' scripts do. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. Optional Features ================= The readline `configure' recognizes a single `--with-PACKAGE' option: `--with-curses' This tells readline that it can find the termcap library functions (tgetent, et al.) in the curses library, rather than a separate termcap library. Readline uses the termcap functions, but does not link with the termcap or curses library itself, allowing applications which link with readline the to choose an appropriate library. This option tells readline to link the example programs with the curses library rather than libtermcap. `configure' also recognizes two `--enable-FEATURE' options: `--enable-shared' Build the shared libraries by default on supported platforms. The default is `yes'. `--enable-static' Build the static libraries by default. The default is `yes'. Shared Libraries ================ There is support for building shared versions of the readline and history libraries. The configure script creates a Makefile in the `shlib' subdirectory, and typing `make shared' will cause shared versions of the readline and history libraries to be built on supported platforms. If `configure' is given the `--enable-shared' option, it will attempt to build the shared libraries by default on supported platforms. Configure calls the script support/shobj-conf to test whether or not shared library creation is supported and to generate the values of variables that are substituted into shlib/Makefile. If you try to build shared libraries on an unsupported platform, `make' will display a message asking you to update support/shobj-conf for your platform. If you need to update support/shobj-conf, you will need to create a `stanza' for your operating system and compiler. The script uses the value of host_os and ${CC} as determined by configure. For instance, FreeBSD 4.2 with any version of gcc is identified as `freebsd4.2-gcc*'. In the stanza for your operating system-compiler pair, you will need to define several variables. They are: SHOBJ_CC The C compiler used to compile source files into shareable object files. This is normally set to the value of ${CC} by configure, and should not need to be changed. SHOBJ_CFLAGS Flags to pass to the C compiler ($SHOBJ_CC) to create position-independent code. If you are using gcc, this should probably be set to `-fpic'. SHOBJ_LD The link editor to be used to create the shared library from the object files created by $SHOBJ_CC. If you are using gcc, a value of `gcc' will probably work. SHOBJ_LDFLAGS Flags to pass to SHOBJ_LD to enable shared object creation. If you are using gcc, `-shared' may be all that is necessary. These should be the flags needed for generic shared object creation. SHLIB_XLDFLAGS Additional flags to pass to SHOBJ_LD for shared library creation. Many systems use the -R option to the link editor to embed a path within the library for run-time library searches. A reasonable value for such systems would be `-R$(libdir)'. SHLIB_LIBS Any additional libraries that shared libraries should be linked against when they are created. SHLIB_LIBPREF The prefix to use when generating the filename of the shared library. The default is `lib'; Cygwin uses `cyg'. SHLIB_LIBSUFF The suffix to add to `libreadline' and `libhistory' when generating the filename of the shared library. Many systems use `so'; HP-UX uses `sl'. SHLIB_LIBVERSION The string to append to the filename to indicate the version of the shared library. It should begin with $(SHLIB_LIBSUFF), and possibly include version information that allows the run-time loader to load the version of the shared library appropriate for a particular program. Systems using shared libraries similar to SunOS 4.x use major and minor library version numbers; for those systems a value of `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' is appropriate. Systems based on System V Release 4 don't use minor version numbers; use `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' on those systems. Other Unix versions use different schemes. SHLIB_DLLVERSION The version number for shared libraries that determines API compatibility between readline versions and the underlying system. Used only on Cygwin. Defaults to $SHLIB_MAJOR, but can be overridden at configuration time by defining DLLVERSION in the environment. SHLIB_DOT The character used to separate the name of the shared library from the suffix and version information. The default is `.'; systems like Cygwin which don't separate version information from the library name should set this to the empty string. SHLIB_STATUS Set this to `supported' when you have defined the other necessary variables. Make uses this to determine whether or not shared library creation should be attempted. If shared libraries are not supported, this will be set to `unsupported'. You should look at the existing stanzas in support/shobj-conf for ideas. Once you have updated support/shobj-conf, re-run configure and type `make shared' or `make'. The shared libraries will be created in the shlib subdirectory. If shared libraries are created, `make install' will install them. You may install only the shared libraries by running `make install-shared' from the top-level build directory. Running `make install' in the shlib subdirectory will also work. If you don't want to install any created shared libraries, run `make install-static'. gdb-doc-7.6.2/readline/history.c0000644000175000017500000003066512250770610015525 0ustar zumbizumbi/* history.c -- standalone history library */ /* Copyright (C) 1989-2009 Free Software Foundation, Inc. This file contains the GNU History Library (History), a set of routines for managing the text of previously typed lines. History 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 3 of the License, or (at your option) any later version. History 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 History. If not, see . */ /* The goal is to make the implementation transparent, so that you don't have to know what data types are used, just what functions you can call. I think I have done that. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include #endif #include #if defined (HAVE_STDLIB_H) # include #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #if defined (HAVE_UNISTD_H) # ifdef _MINIX # include # endif # include #endif #include "history.h" #include "histlib.h" #include "xmalloc.h" /* The number of slots to increase the_history by. */ #define DEFAULT_HISTORY_GROW_SIZE 50 static char *hist_inittime PARAMS((void)); /* **************************************************************** */ /* */ /* History Functions */ /* */ /* **************************************************************** */ /* An array of HIST_ENTRY. This is where we store the history. */ static HIST_ENTRY **the_history = (HIST_ENTRY **)NULL; /* Non-zero means that we have enforced a limit on the amount of history that we save. */ static int history_stifled; /* The current number of slots allocated to the input_history. */ static int history_size; /* If HISTORY_STIFLED is non-zero, then this is the maximum number of entries to remember. */ int history_max_entries; int max_input_history; /* backwards compatibility */ /* The current location of the interactive history pointer. Just makes life easier for outside callers. */ int history_offset; /* The number of strings currently stored in the history list. */ int history_length; /* The logical `base' of the history array. It defaults to 1. */ int history_base = 1; /* Return the current HISTORY_STATE of the history. */ HISTORY_STATE * history_get_history_state () { HISTORY_STATE *state; state = (HISTORY_STATE *)xmalloc (sizeof (HISTORY_STATE)); state->entries = the_history; state->offset = history_offset; state->length = history_length; state->size = history_size; state->flags = 0; if (history_stifled) state->flags |= HS_STIFLED; return (state); } /* Set the state of the current history array to STATE. */ void history_set_history_state (state) HISTORY_STATE *state; { the_history = state->entries; history_offset = state->offset; history_length = state->length; history_size = state->size; if (state->flags & HS_STIFLED) history_stifled = 1; } /* Begin a session in which the history functions might be used. This initializes interactive variables. */ void using_history () { history_offset = history_length; } /* Return the number of bytes that the primary history entries are using. This just adds up the lengths of the_history->lines and the associated timestamps. */ int history_total_bytes () { register int i, result; for (i = result = 0; the_history && the_history[i]; i++) result += HISTENT_BYTES (the_history[i]); return (result); } /* Returns the magic number which says what history element we are looking at now. In this implementation, it returns history_offset. */ int where_history () { return (history_offset); } /* Make the current history item be the one at POS, an absolute index. Returns zero if POS is out of range, else non-zero. */ int history_set_pos (pos) int pos; { if (pos > history_length || pos < 0 || !the_history) return (0); history_offset = pos; return (1); } /* Return the current history array. The caller has to be careful, since this is the actual array of data, and could be bashed or made corrupt easily. The array is terminated with a NULL pointer. */ HIST_ENTRY ** history_list () { return (the_history); } /* Return the history entry at the current position, as determined by history_offset. If there is no entry there, return a NULL pointer. */ HIST_ENTRY * current_history () { return ((history_offset == history_length) || the_history == 0) ? (HIST_ENTRY *)NULL : the_history[history_offset]; } /* Back up history_offset to the previous history entry, and return a pointer to that entry. If there is no previous entry then return a NULL pointer. */ HIST_ENTRY * previous_history () { return history_offset ? the_history[--history_offset] : (HIST_ENTRY *)NULL; } /* Move history_offset forward to the next history entry, and return a pointer to that entry. If there is no next entry then return a NULL pointer. */ HIST_ENTRY * next_history () { return (history_offset == history_length) ? (HIST_ENTRY *)NULL : the_history[++history_offset]; } /* Return the history entry which is logically at OFFSET in the history array. OFFSET is relative to history_base. */ HIST_ENTRY * history_get (offset) int offset; { int local_index; local_index = offset - history_base; return (local_index >= history_length || local_index < 0 || the_history == 0) ? (HIST_ENTRY *)NULL : the_history[local_index]; } HIST_ENTRY * alloc_history_entry (string, ts) char *string; char *ts; { HIST_ENTRY *temp; temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); temp->line = string ? savestring (string) : string; temp->data = (char *)NULL; temp->timestamp = ts; return temp; } time_t history_get_time (hist) HIST_ENTRY *hist; { char *ts; time_t t; if (hist == 0 || hist->timestamp == 0) return 0; ts = hist->timestamp; if (ts[0] != history_comment_char) return 0; t = (time_t) atol (ts + 1); /* XXX - should use strtol() here */ return t; } static char * hist_inittime () { time_t t; char ts[64], *ret; t = (time_t) time ((time_t *)0); #if defined (HAVE_VSNPRINTF) /* assume snprintf if vsnprintf exists */ snprintf (ts, sizeof (ts) - 1, "X%lu", (unsigned long) t); #else sprintf (ts, "X%lu", (unsigned long) t); #endif ret = savestring (ts); ret[0] = history_comment_char; return ret; } /* Place STRING at the end of the history list. The data field is set to NULL. */ void add_history (string) const char *string; { HIST_ENTRY *temp; if (history_stifled && (history_length == history_max_entries)) { register int i; /* If the history is stifled, and history_length is zero, and it equals history_max_entries, we don't save items. */ if (history_length == 0) return; /* If there is something in the slot, then remove it. */ if (the_history[0]) (void) free_history_entry (the_history[0]); /* Copy the rest of the entries, moving down one slot. */ for (i = 0; i < history_length; i++) the_history[i] = the_history[i + 1]; history_base++; } else { if (history_size == 0) { history_size = DEFAULT_HISTORY_GROW_SIZE; the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *)); history_length = 1; } else { if (history_length == (history_size - 1)) { history_size += DEFAULT_HISTORY_GROW_SIZE; the_history = (HIST_ENTRY **) xrealloc (the_history, history_size * sizeof (HIST_ENTRY *)); } history_length++; } } temp = alloc_history_entry (string, hist_inittime ()); the_history[history_length] = (HIST_ENTRY *)NULL; the_history[history_length - 1] = temp; } /* Change the time stamp of the most recent history entry to STRING. */ void add_history_time (string) const char *string; { HIST_ENTRY *hs; if (string == 0) return; hs = the_history[history_length - 1]; FREE (hs->timestamp); hs->timestamp = savestring (string); } /* Free HIST and return the data so the calling application can free it if necessary and desired. */ histdata_t free_history_entry (hist) HIST_ENTRY *hist; { histdata_t x; if (hist == 0) return ((histdata_t) 0); FREE (hist->line); FREE (hist->timestamp); x = hist->data; xfree (hist); return (x); } HIST_ENTRY * copy_history_entry (hist) HIST_ENTRY *hist; { HIST_ENTRY *ret; char *ts; if (hist == 0) return hist; ret = alloc_history_entry (hist->line, (char *)NULL); ts = hist->timestamp ? savestring (hist->timestamp) : hist->timestamp; ret->timestamp = ts; ret->data = hist->data; return ret; } /* Make the history entry at WHICH have LINE and DATA. This returns the old entry so you can dispose of the data. In the case of an invalid WHICH, a NULL pointer is returned. */ HIST_ENTRY * replace_history_entry (which, line, data) int which; const char *line; histdata_t data; { HIST_ENTRY *temp, *old_value; if (which < 0 || which >= history_length) return ((HIST_ENTRY *)NULL); temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); old_value = the_history[which]; temp->line = savestring (line); temp->data = data; temp->timestamp = savestring (old_value->timestamp); the_history[which] = temp; return (old_value); } /* Replace the DATA in the specified history entries, replacing OLD with NEW. WHICH says which one(s) to replace: WHICH == -1 means to replace all of the history entries where entry->data == OLD; WHICH == -2 means to replace the `newest' history entry where entry->data == OLD; and WHICH >= 0 means to replace that particular history entry's data, as long as it matches OLD. */ void replace_history_data (which,old, new) int which; histdata_t *old, *new; { HIST_ENTRY *entry; register int i, last; if (which < -2 || which >= history_length || history_length == 0 || the_history == 0) return; if (which >= 0) { entry = the_history[which]; if (entry && entry->data == old) entry->data = new; return; } last = -1; for (i = 0; i < history_length; i++) { entry = the_history[i]; if (entry == 0) continue; if (entry->data == old) { last = i; if (which == -1) entry->data = new; } } if (which == -2 && last >= 0) { entry = the_history[last]; entry->data = new; /* XXX - we don't check entry->old */ } } /* Remove history element WHICH from the history. The removed element is returned to you so you can free the line, data, and containing structure. */ HIST_ENTRY * remove_history (which) int which; { HIST_ENTRY *return_value; register int i; if (which < 0 || which >= history_length || history_length == 0 || the_history == 0) return ((HIST_ENTRY *)NULL); return_value = the_history[which]; for (i = which; i < history_length; i++) the_history[i] = the_history[i + 1]; history_length--; return (return_value); } /* Stifle the history list, remembering only MAX number of lines. */ void stifle_history (max) int max; { register int i, j; if (max < 0) max = 0; if (history_length > max) { /* This loses because we cannot free the data. */ for (i = 0, j = history_length - max; i < j; i++) free_history_entry (the_history[i]); history_base = i; for (j = 0, i = history_length - max; j < max; i++, j++) the_history[j] = the_history[i]; the_history[j] = (HIST_ENTRY *)NULL; history_length = j; } history_stifled = 1; max_input_history = history_max_entries = max; } /* Stop stifling the history. This returns the previous maximum number of history entries. The value is positive if the history was stifled, negative if it wasn't. */ int unstifle_history () { if (history_stifled) { history_stifled = 0; return (history_max_entries); } else return (-history_max_entries); } int history_is_stifled () { return (history_stifled); } void clear_history () { register int i; /* This loses because we cannot free the data. */ for (i = 0; i < history_length; i++) { free_history_entry (the_history[i]); the_history[i] = (HIST_ENTRY *)NULL; } history_offset = history_length = 0; } gdb-doc-7.6.2/readline/kill.c0000644000175000017500000003643212250770610014755 0ustar zumbizumbi/* kill.c -- kill ring management. */ /* Copyright (C) 1994 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include #endif #include #if defined (HAVE_UNISTD_H) # include /* for _POSIX_VERSION */ #endif /* HAVE_UNISTD_H */ #if defined (HAVE_STDLIB_H) # include #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #include /* System-specific feature definitions and include files. */ #include "rldefs.h" /* Some standard library routines. */ #include "readline.h" #include "history.h" #include "rlprivate.h" #include "xmalloc.h" /* **************************************************************** */ /* */ /* Killing Mechanism */ /* */ /* **************************************************************** */ /* What we assume for a max number of kills. */ #define DEFAULT_MAX_KILLS 10 /* The real variable to look at to find out when to flush kills. */ static int rl_max_kills = DEFAULT_MAX_KILLS; /* Where to store killed text. */ static char **rl_kill_ring = (char **)NULL; /* Where we are in the kill ring. */ static int rl_kill_index; /* How many slots we have in the kill ring. */ static int rl_kill_ring_length; static int _rl_copy_to_kill_ring PARAMS((char *, int)); static int region_kill_internal PARAMS((int)); static int _rl_copy_word_as_kill PARAMS((int, int)); static int rl_yank_nth_arg_internal PARAMS((int, int, int)); /* How to say that you only want to save a certain amount of kill material. */ int rl_set_retained_kills (num) int num; { return 0; } /* Add TEXT to the kill ring, allocating a new kill ring slot as necessary. This uses TEXT directly, so the caller must not free it. If APPEND is non-zero, and the last command was a kill, the text is appended to the current kill ring slot, otherwise prepended. */ static int _rl_copy_to_kill_ring (text, append) char *text; int append; { char *old, *new; int slot; /* First, find the slot to work with. */ if (_rl_last_command_was_kill == 0) { /* Get a new slot. */ if (rl_kill_ring == 0) { /* If we don't have any defined, then make one. */ rl_kill_ring = (char **) xmalloc (((rl_kill_ring_length = 1) + 1) * sizeof (char *)); rl_kill_ring[slot = 0] = (char *)NULL; } else { /* We have to add a new slot on the end, unless we have exceeded the max limit for remembering kills. */ slot = rl_kill_ring_length; if (slot == rl_max_kills) { register int i; xfree (rl_kill_ring[0]); for (i = 0; i < slot; i++) rl_kill_ring[i] = rl_kill_ring[i + 1]; } else { slot = rl_kill_ring_length += 1; rl_kill_ring = (char **)xrealloc (rl_kill_ring, slot * sizeof (char *)); } rl_kill_ring[--slot] = (char *)NULL; } } else slot = rl_kill_ring_length - 1; /* If the last command was a kill, prepend or append. */ if (_rl_last_command_was_kill && rl_editing_mode != vi_mode) { old = rl_kill_ring[slot]; new = (char *)xmalloc (1 + strlen (old) + strlen (text)); if (append) { strcpy (new, old); strcat (new, text); } else { strcpy (new, text); strcat (new, old); } xfree (old); xfree (text); rl_kill_ring[slot] = new; } else rl_kill_ring[slot] = text; rl_kill_index = slot; return 0; } /* The way to kill something. This appends or prepends to the last kill, if the last command was a kill command. if FROM is less than TO, then the text is appended, otherwise prepended. If the last command was not a kill command, then a new slot is made for this kill. */ int rl_kill_text (from, to) int from, to; { char *text; /* Is there anything to kill? */ if (from == to) { _rl_last_command_was_kill++; return 0; } text = rl_copy_text (from, to); /* Delete the copied text from the line. */ rl_delete_text (from, to); _rl_copy_to_kill_ring (text, from < to); _rl_last_command_was_kill++; return 0; } /* Now REMEMBER! In order to do prepending or appending correctly, kill commands always make rl_point's original position be the FROM argument, and rl_point's extent be the TO argument. */ /* **************************************************************** */ /* */ /* Killing Commands */ /* */ /* **************************************************************** */ /* Delete the word at point, saving the text in the kill ring. */ int rl_kill_word (count, key) int count, key; { int orig_point; if (count < 0) return (rl_backward_kill_word (-count, key)); else { orig_point = rl_point; rl_forward_word (count, key); if (rl_point != orig_point) rl_kill_text (orig_point, rl_point); rl_point = orig_point; if (rl_editing_mode == emacs_mode) rl_mark = rl_point; } return 0; } /* Rubout the word before point, placing it on the kill ring. */ int rl_backward_kill_word (count, ignore) int count, ignore; { int orig_point; if (count < 0) return (rl_kill_word (-count, ignore)); else { orig_point = rl_point; rl_backward_word (count, ignore); if (rl_point != orig_point) rl_kill_text (orig_point, rl_point); if (rl_editing_mode == emacs_mode) rl_mark = rl_point; } return 0; } /* Kill from here to the end of the line. If DIRECTION is negative, kill back to the line start instead. */ int rl_kill_line (direction, ignore) int direction, ignore; { int orig_point; if (direction < 0) return (rl_backward_kill_line (1, ignore)); else { orig_point = rl_point; rl_end_of_line (1, ignore); if (orig_point != rl_point) rl_kill_text (orig_point, rl_point); rl_point = orig_point; if (rl_editing_mode == emacs_mode) rl_mark = rl_point; } return 0; } /* Kill backwards to the start of the line. If DIRECTION is negative, kill forwards to the line end instead. */ int rl_backward_kill_line (direction, ignore) int direction, ignore; { int orig_point; if (direction < 0) return (rl_kill_line (1, ignore)); else { if (!rl_point) rl_ding (); else { orig_point = rl_point; rl_beg_of_line (1, ignore); if (rl_point != orig_point) rl_kill_text (orig_point, rl_point); if (rl_editing_mode == emacs_mode) rl_mark = rl_point; } } return 0; } /* Kill the whole line, no matter where point is. */ int rl_kill_full_line (count, ignore) int count, ignore; { rl_begin_undo_group (); rl_point = 0; rl_kill_text (rl_point, rl_end); rl_mark = 0; rl_end_undo_group (); return 0; } /* The next two functions mimic unix line editing behaviour, except they save the deleted text on the kill ring. This is safer than not saving it, and since we have a ring, nobody should get screwed. */ /* This does what C-w does in Unix. We can't prevent people from using behaviour that they expect. */ int rl_unix_word_rubout (count, key) int count, key; { int orig_point; if (rl_point == 0) rl_ding (); else { orig_point = rl_point; if (count <= 0) count = 1; while (count--) { while (rl_point && whitespace (rl_line_buffer[rl_point - 1])) rl_point--; while (rl_point && (whitespace (rl_line_buffer[rl_point - 1]) == 0)) rl_point--; } rl_kill_text (orig_point, rl_point); if (rl_editing_mode == emacs_mode) rl_mark = rl_point; } return 0; } /* This deletes one filename component in a Unix pathname. That is, it deletes backward to directory separator (`/') or whitespace. */ int rl_unix_filename_rubout (count, key) int count, key; { int orig_point, c; if (rl_point == 0) rl_ding (); else { orig_point = rl_point; if (count <= 0) count = 1; while (count--) { c = rl_line_buffer[rl_point - 1]; while (rl_point && (whitespace (c) || c == '/')) { rl_point--; c = rl_line_buffer[rl_point - 1]; } while (rl_point && (whitespace (c) == 0) && c != '/') { rl_point--; c = rl_line_buffer[rl_point - 1]; } } rl_kill_text (orig_point, rl_point); if (rl_editing_mode == emacs_mode) rl_mark = rl_point; } return 0; } /* Here is C-u doing what Unix does. You don't *have* to use these key-bindings. We have a choice of killing the entire line, or killing from where we are to the start of the line. We choose the latter, because if you are a Unix weenie, then you haven't backspaced into the line at all, and if you aren't, then you know what you are doing. */ int rl_unix_line_discard (count, key) int count, key; { if (rl_point == 0) rl_ding (); else { rl_kill_text (rl_point, 0); rl_point = 0; if (rl_editing_mode == emacs_mode) rl_mark = rl_point; } return 0; } /* Copy the text in the `region' to the kill ring. If DELETE is non-zero, delete the text from the line as well. */ static int region_kill_internal (delete) int delete; { char *text; if (rl_mark != rl_point) { text = rl_copy_text (rl_point, rl_mark); if (delete) rl_delete_text (rl_point, rl_mark); _rl_copy_to_kill_ring (text, rl_point < rl_mark); } _rl_last_command_was_kill++; return 0; } /* Copy the text in the region to the kill ring. */ int rl_copy_region_to_kill (count, ignore) int count, ignore; { return (region_kill_internal (0)); } /* Kill the text between the point and mark. */ int rl_kill_region (count, ignore) int count, ignore; { int r, npoint; npoint = (rl_point < rl_mark) ? rl_point : rl_mark; r = region_kill_internal (1); _rl_fix_point (1); rl_point = npoint; return r; } /* Copy COUNT words to the kill ring. DIR says which direction we look to find the words. */ static int _rl_copy_word_as_kill (count, dir) int count, dir; { int om, op, r; om = rl_mark; op = rl_point; if (dir > 0) rl_forward_word (count, 0); else rl_backward_word (count, 0); rl_mark = rl_point; if (dir > 0) rl_backward_word (count, 0); else rl_forward_word (count, 0); r = region_kill_internal (0); rl_mark = om; rl_point = op; return r; } int rl_copy_forward_word (count, key) int count, key; { if (count < 0) return (rl_copy_backward_word (-count, key)); return (_rl_copy_word_as_kill (count, 1)); } int rl_copy_backward_word (count, key) int count, key; { if (count < 0) return (rl_copy_forward_word (-count, key)); return (_rl_copy_word_as_kill (count, -1)); } /* Yank back the last killed text. This ignores arguments. */ int rl_yank (count, ignore) int count, ignore; { if (rl_kill_ring == 0) { _rl_abort_internal (); return -1; } _rl_set_mark_at_pos (rl_point); rl_insert_text (rl_kill_ring[rl_kill_index]); return 0; } /* If the last command was yank, or yank_pop, and the text just before point is identical to the current kill item, then delete that text from the line, rotate the index down, and yank back some other text. */ int rl_yank_pop (count, key) int count, key; { int l, n; if (((rl_last_func != rl_yank_pop) && (rl_last_func != rl_yank)) || !rl_kill_ring) { _rl_abort_internal (); return -1; } l = strlen (rl_kill_ring[rl_kill_index]); n = rl_point - l; if (n >= 0 && STREQN (rl_line_buffer + n, rl_kill_ring[rl_kill_index], l)) { rl_delete_text (n, rl_point); rl_point = n; rl_kill_index--; if (rl_kill_index < 0) rl_kill_index = rl_kill_ring_length - 1; rl_yank (1, 0); return 0; } else { _rl_abort_internal (); return -1; } } /* Yank the COUNTh argument from the previous history line, skipping HISTORY_SKIP lines before looking for the `previous line'. */ static int rl_yank_nth_arg_internal (count, ignore, history_skip) int count, ignore, history_skip; { register HIST_ENTRY *entry; char *arg; int i, pos; pos = where_history (); if (history_skip) { for (i = 0; i < history_skip; i++) entry = previous_history (); } entry = previous_history (); history_set_pos (pos); if (entry == 0) { rl_ding (); return -1; } arg = history_arg_extract (count, count, entry->line); if (!arg || !*arg) { rl_ding (); FREE (arg); return -1; } rl_begin_undo_group (); _rl_set_mark_at_pos (rl_point); #if defined (VI_MODE) /* Vi mode always inserts a space before yanking the argument, and it inserts it right *after* rl_point. */ if (rl_editing_mode == vi_mode) { rl_vi_append_mode (1, ignore); rl_insert_text (" "); } #endif /* VI_MODE */ rl_insert_text (arg); xfree (arg); rl_end_undo_group (); return 0; } /* Yank the COUNTth argument from the previous history line. */ int rl_yank_nth_arg (count, ignore) int count, ignore; { return (rl_yank_nth_arg_internal (count, ignore, 0)); } /* Yank the last argument from the previous history line. This `knows' how rl_yank_nth_arg treats a count of `$'. With an argument, this behaves the same as rl_yank_nth_arg. */ int rl_yank_last_arg (count, key) int count, key; { static int history_skip = 0; static int explicit_arg_p = 0; static int count_passed = 1; static int direction = 1; static int undo_needed = 0; int retval; if (rl_last_func != rl_yank_last_arg) { history_skip = 0; explicit_arg_p = rl_explicit_arg; count_passed = count; direction = 1; } else { if (undo_needed) rl_do_undo (); if (count < 0) /* XXX - was < 1 */ direction = -direction; history_skip += direction; if (history_skip < 0) history_skip = 0; } if (explicit_arg_p) retval = rl_yank_nth_arg_internal (count_passed, key, history_skip); else retval = rl_yank_nth_arg_internal ('$', key, history_skip); undo_needed = retval == 0; return retval; } /* A special paste command for users of Cygnus's cygwin32. */ #if defined (__CYGWIN__) #include int rl_paste_from_clipboard (count, key) int count, key; { char *data, *ptr; int len; if (OpenClipboard (NULL) == 0) return (0); data = (char *)GetClipboardData (CF_TEXT); if (data) { ptr = strchr (data, '\r'); if (ptr) { len = ptr - data; ptr = (char *)xmalloc (len + 1); ptr[len] = '\0'; strncpy (ptr, data, len); } else ptr = data; _rl_set_mark_at_pos (rl_point); rl_insert_text (ptr); if (ptr != data) xfree (ptr); CloseClipboard (); } return (0); } #endif /* __CYGWIN__ */ gdb-doc-7.6.2/readline/README0000644000175000017500000001700012250770610014524 0ustar zumbizumbiIntroduction ============ This is the Gnu Readline library, version 6.2. The Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands. The history facilites are also placed into a separate library, the History library, as part of the build process. The History library may be used without Readline in applications which desire its capabilities. The Readline library is free software, distributed under the terms of the [GNU] General Public License as published by the Free Software Foundation, version 3 of the License. For more information, see the file COPYING. To build the library, try typing `./configure', then `make'. The configuration process is automated, so no further intervention should be necessary. Readline builds with `gcc' by default if it is available. If you want to use `cc' instead, type CC=cc ./configure if you are using a Bourne-style shell. If you are not, the following may work: env CC=cc ./configure Read the file INSTALL in this directory for more information about how to customize and control the build process. The file rlconf.h contains C preprocessor defines that enable and disable certain Readline features. The special make target `everything' will build the static and shared libraries (if the target platform supports them) and the examples. Examples ======== There are several example programs that use Readline features in the examples directory. The `rl' program is of particular interest. It is a command-line interface to Readline, suitable for use in shell scripts in place of `read'. Shared Libraries ================ There is skeletal support for building shared versions of the Readline and History libraries. The configure script creates a Makefile in the `shlib' subdirectory, and typing `make shared' will cause shared versions of the Readline and History libraries to be built on supported platforms. If `configure' is given the `--enable-shared' option, it will attempt to build the shared libraries by default on supported platforms. Configure calls the script support/shobj-conf to test whether or not shared library creation is supported and to generate the values of variables that are substituted into shlib/Makefile. If you try to build shared libraries on an unsupported platform, `make' will display a message asking you to update support/shobj-conf for your platform. If you need to update support/shobj-conf, you will need to create a `stanza' for your operating system and compiler. The script uses the value of host_os and ${CC} as determined by configure. For instance, FreeBSD 4.2 with any version of gcc is identified as `freebsd4.2-gcc*'. In the stanza for your operating system-compiler pair, you will need to define several variables. They are: SHOBJ_CC The C compiler used to compile source files into shareable object files. This is normally set to the value of ${CC} by configure, and should not need to be changed. SHOBJ_CFLAGS Flags to pass to the C compiler ($SHOBJ_CC) to create position-independent code. If you are using gcc, this should probably be set to `-fpic'. SHOBJ_LD The link editor to be used to create the shared library from the object files created by $SHOBJ_CC. If you are using gcc, a value of `gcc' will probably work. SHOBJ_LDFLAGS Flags to pass to SHOBJ_LD to enable shared object creation. If you are using gcc, `-shared' may be all that is necessary. These should be the flags needed for generic shared object creation. SHLIB_XLDFLAGS Additional flags to pass to SHOBJ_LD for shared library creation. Many systems use the -R option to the link editor to embed a path within the library for run-time library searches. A reasonable value for such systems would be `-R$(libdir)'. SHLIB_LIBS Any additional libraries that shared libraries should be linked against when they are created. SHLIB_LIBPREF The prefix to use when generating the filename of the shared library. The default is `lib'; Cygwin uses `cyg'. SHLIB_LIBSUFF The suffix to add to `libreadline' and `libhistory' when generating the filename of the shared library. Many systems use `so'; HP-UX uses `sl'. SHLIB_LIBVERSION The string to append to the filename to indicate the version of the shared library. It should begin with $(SHLIB_LIBSUFF), and possibly include version information that allows the run-time loader to load the version of the shared library appropriate for a particular program. Systems using shared libraries similar to SunOS 4.x use major and minor library version numbers; for those systems a value of `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' is appropriate. Systems based on System V Release 4 don't use minor version numbers; use `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' on those systems. Other Unix versions use different schemes. SHLIB_DLLVERSION The version number for shared libraries that determines API compatibility between readline versions and the underlying system. Used only on Cygwin. Defaults to $SHLIB_MAJOR, but can be overridden at configuration time by defining DLLVERSION in the environment. SHLIB_DOT The character used to separate the name of the shared library from the suffix and version information. The default is `.'; systems like Cygwin which don't separate version information from the library name should set this to the empty string. SHLIB_STATUS Set this to `supported' when you have defined the other necessary variables. Make uses this to determine whether or not shared library creation should be attempted. You should look at the existing stanzas in support/shobj-conf for ideas. Once you have updated support/shobj-conf, re-run configure and type `make shared'. The shared libraries will be created in the shlib subdirectory. If shared libraries are created, `make install' will install them. You may install only the shared libraries by running `make install-shared' from the top-level build directory. Running `make install' in the shlib subdirectory will also work. If you don't want to install any created shared libraries, run `make install-static'. Documentation ============= The documentation for the Readline and History libraries appears in the `doc' subdirectory. There are three texinfo files and a Unix-style manual page describing the facilities available in the Readline library. The texinfo files include both user and programmer's manuals. HTML versions of the manuals appear in the `doc' subdirectory as well. Reporting Bugs ============== Bug reports for Readline should be sent to: bug-readline@gnu.org When reporting a bug, please include the following information: * the version number and release status of Readline (e.g., 4.2-release) * the machine and OS that it is running on * a list of the compilation flags or the contents of `config.h', if appropriate * a description of the bug * a recipe for recreating the bug reliably * a fix for the bug if you have one! If you would like to contact the Readline maintainer directly, send mail to bash-maintainers@gnu.org. Since Readline is developed along with bash, the bug-bash@gnu.org mailing list (mirrored to the Usenet newsgroup gnu.bash.bug) often contains Readline bug reports and fixes. Chet Ramey chet.ramey@case.edu gdb-doc-7.6.2/readline/rlstdc.h0000644000175000017500000000301212250770610015306 0ustar zumbizumbi/* stdc.h -- macros to make source compile on both ANSI C and K&R C compilers. */ /* Copyright (C) 1993-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #if !defined (_RL_STDC_H_) #define _RL_STDC_H_ /* Adapted from BSD /usr/include/sys/cdefs.h. */ /* A function can be defined using prototypes and compile on both ANSI C and traditional C compilers with something like this: extern char *func PARAMS((char *, char *, int)); */ #if !defined (PARAMS) # if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) # define PARAMS(protos) protos # else # define PARAMS(protos) () # endif #endif #ifndef __attribute__ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) # define __attribute__(x) # endif #endif #endif /* !_RL_STDC_H_ */ gdb-doc-7.6.2/readline/CHANGES0000644000175000017500000014446512250770610014657 0ustar zumbizumbiThis document details the changes between this version, readline-6.2, and the previous version, readline-6.1. 1. Changes to Readline a. Fixed a bug that caused the unconverted filename to be added to the list of completions when the application specified filename conversion functions. b. Fixed a bug that caused the wrong filename to be passed to opendir when the application has specified a filename dequoting function. c. Fixed a bug when repeating a character search in vi mode in the case where there was no search to repeat. d. When show-all-if-ambiguous is set, the completion routines no longer insert a common match prefix that is shorter than the text being completed. e. The full set of vi editing commands may now be used in callback mode. f. Fixed a bug that caused readline to not update its idea of the terminal dimensions while running in `no-echo' mode. h. Fixed a bug that caused readline to dump core if an application called rl_prep_terminal without setting rl_instream. i. Fixed a bug that caused meta-prefixed characters bound to incremental search forward or backward to not be recognized if they were typed subsequently. j. The incremental search code treats key sequences that map to the same functions as (default) ^G, ^W, and ^Y as equivalent to those characters. k. Fixed a bug in menu-complete that caused it to misbehave with large negative argument. l. Fixed a bug that caused vi-mode yank-last-arg to ring the bell when invoked at the end of the line. m. Fixed a bug that made an explicit argument of 0 to yank-last-arg behave as if it were a negative argument. n. Fixed a bug that caused directory names in words to be completed to not be dequoted correctly. 2. New Features in Readline a. The history library does not try to write the history filename in the current directory if $HOME is unset. This closes a potential security problem if the application does not specify a history filename. b. New bindable variable `completion-display-width' to set the number of columns used when displaying completions. c. New bindable variable `completion-case-map' to cause case-insensitive completion to treat `-' and `_' as identical. d. There are new bindable vi-mode command names to avoid readline's case- insensitive matching not allowing them to be bound separately. e. New bindable variable `menu-complete-display-prefix' causes the menu completion code to display the common prefix of the possible completions before cycling through the list, instead of after. ------------------------------------------------------------------------------- This document details the changes between this version, readline-6.1, and the previous version, readline-6.0. 1. Changes to Readline a. The SIGWINCH signal handler now avoids calling the redisplay code if one arrives while in the middle of redisplay. b. Changes to the timeout code to make sure that timeout values greater than one second are handled better. c. Fixed a bug in the redisplay code that was triggered by a prompt containing invisible characters exactly the width of the screen. d. Fixed a bug in the redisplay code encountered when running in horizontal scroll mode. e. Fixed a bug that prevented menu completion from properly completing filenames. f. Fixed a redisplay bug caused by a multibyte character causing a line to wrap. g. Fixed a bug that caused key sequences of two characters to not be recognized when a longer sequence identical in the first two characters was bound. h. Fixed a bug that caused history expansion to be attempted on $'...' single-quoted strings. i. Fixed a bug that caused incorrect redisplay when the prompt contained multibyte characters in an `invisible' sequence bracketed by \[ and \]. j. Fixed a bug that caused history expansion to short-circuit after encountering a multibyte character. k. Fixed a bug that caused applications using the callback interface to not react to SIGINT (or other signals) until another character arrived. 2. New Features in Readline a. New bindable function: menu-complete-backward. b. In the vi insertion keymap, C-n is now bound to menu-complete by default, and C-p to menu-complete-backward. c. When in vi command mode, repeatedly hitting ESC now does nothing, even when ESC introduces a bound key sequence. This is closer to how historical vi behaves. d. New bindable function: skip-csi-sequence. Can be used as a default to consume key sequences generated by keys like Home and End without having to bind all keys. e. New application-settable function: rl_filename_rewrite_hook. Can be used to rewite or modify filenames read from the file system before they are compared to the word to be completed. f. New bindable variable: skip-completed-text, active when completing in the middle of a word. If enabled, it means that characters in the completion that match characters in the remainder of the word are "skipped" rather than inserted into the line. g. The pre-readline-6.0 version of menu completion is available as "old-menu-complete" for users who do not like the readline-6.0 version. h. New bindable variable: echo-control-characters. If enabled, and the tty ECHOCTL bit is set, controls the echoing of characters corresponding to keyboard-generated signals. i. New bindable variable: enable-meta-key. Controls whether or not readline sends the smm/rmm sequences if the terminal indicates it has a meta key that enables eight-bit characters. ------------------------------------------------------------------------------- This document details the changes between this version, readline-6.0, and the previous version, readline-5.2. 1. Changes to Readline a. Fixed a number of redisplay errors in environments supporting multibyte characters. b. Fixed bugs in vi command mode that caused motion commands to inappropriately set the mark. c. When using the arrow keys in vi insertion mode, readline allows movement beyond the current end of the line (unlike command mode). d. Fixed bugs that caused readline to loop when the terminal has been taken away and reads return -1/EIO. e. Fixed bugs in redisplay occurring when displaying prompts containing invisible characters. f. Fixed a bug that caused the completion append character to not be reset to the default after an application-specified completion function changed it. g. Fixed a problem that caused incorrect positioning of the cursor while in emacs editing mode when moving forward at the end of a line while using a locale supporting multibyte characters. h. Fixed an off-by-one error that caused readline to drop every 511th character of buffered input. i. Fixed a bug that resulted in SIGTERM not being caught or cleaned up. j. Fixed redisplay bugs caused by multiline prompts with invisible characters or no characters following the final newline. k. Fixed redisplay bug caused by prompts consisting solely of invisible characters. l. Fixed a bug in the code that buffers characters received very quickly in succession which caused characters to be dropped. m. Fixed a bug that caused readline to reference uninitialized data structures if it received a SIGWINCH before completing initialzation. n. Fixed a bug that caused the vi-mode `last command' to be set incorrectly and therefore unrepeatable. o. Fixed a bug that caused readline to disable echoing when it was being used with an output file descriptor that was not a terminal. p. Readline now blocks SIGINT while manipulating internal data structures during redisplay. q. Fixed a bug in redisplay that caused readline to segfault when pasting a very long line (over 130,000 characters). r. Fixed bugs in redisplay when using prompts with no visible printing characters. s. Fixed a bug that caused redisplay errors when using prompts with invisible characters and numeric arguments to a command in a multibyte locale. t. Fixed a bug that caused redisplay errors when using prompts with invisible characters spanning more than two physical screen lines. 2. New Features in Readline a. A new variable, rl_sort_completion_matches; allows applications to inhibit match list sorting (but beware: some things don't work right if applications do this). b. A new variable, rl_completion_invoking_key; allows applications to discover the key that invoked rl_complete or rl_menu_complete. c. The functions rl_block_sigint and rl_release_sigint are now public and available to calling applications who want to protect critical sections (like redisplay). d. The functions rl_save_state and rl_restore_state are now public and available to calling applications; documented rest of readline's state flag values. e. A new user-settable variable, `history-size', allows setting the maximum number of entries in the history list. f. There is a new implementation of menu completion, with several improvements over the old; the most notable improvement is a better `completions browsing' mode. g. The menu completion code now uses the rl_menu_completion_entry_function variable, allowing applications to provide their own menu completion generators. h. There is support for replacing a prefix of a pathname with a `...' when displaying possible completions. This is controllable by setting the `completion-prefix-display-length' variable. Matches with a common prefix longer than this value have the common prefix replaced with `...'. i. There is a new `revert-all-at-newline' variable. If enabled, readline will undo all outstanding changes to all history lines when `accept-line' is executed. ------------------------------------------------------------------------------- This document details the changes between this version, readline-5.2, and the previous version, readline-5.1. 1. Changes to Readline a. Fixed a problem that caused segmentation faults when using readline in callback mode and typing consecutive DEL characters on an empty line. b. Fixed several redisplay problems with multibyte characters, all having to do with the different code paths and variable meanings between single-byte and multibyte character redisplay. c. Fixed a problem with key sequence translation when presented with the sequence \M-\C-x. d. Fixed a problem that prevented the `a' command in vi mode from being undone and redone properly. e. Fixed a problem that prevented empty inserts in vi mode from being undone properly. f. Fixed a problem that caused readline to initialize with an incorrect idea of whether or not the terminal can autowrap. g. Fixed output of key bindings (like bash `bind -p') to honor the setting of convert-meta and use \e where appropriate. h. Changed the default filename completion function to call the filename dequoting function if the directory completion hook isn't set. This means that any directory completion hooks need to dequote the directory name, since application-specific hooks need to know how the word was quoted, even if no other changes are made. i. Fixed a bug with creating the prompt for a non-interactive search string when there are non-printing characters in the primary prompt. j. Fixed a bug that caused prompts with invisible characters to be redrawn multiple times in a multibyte locale. k. Fixed a bug that could cause the key sequence scanning code to return the wrong function. l. Fixed a problem with the callback interface that caused it to fail when using multi-character keyboard macros. m. Fixed a bug that could cause a core dump when an edited history entry was re-executed under certain conditions. n. Fixed a bug that caused readline to reference freed memory when attmpting to display a portion of the prompt. o. Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing the prompt and input line multiple times. p. Fixed history expansion to not be confused by here-string redirection. q. Readline no longer treats read errors by converting them to newlines, as it does with EOF. This caused partial lines to be returned from readline(). r. Fixed a redisplay bug that occurred in multibyte-capable locales when the prompt was one character longer than the screen width. 2. New Features in Readline a. Calling applications can now set the keyboard timeout to 0, allowing poll-like behavior. b. The value of SYS_INPUTRC (configurable at compilation time) is now used as the default last-ditch startup file. c. The history file reading functions now allow windows-like \r\n line terminators. ------------------------------------------------------------------------------- This document details the changes between this version, readline-5.1, and the previous version, readline-5.0. 1. Changes to Readline a. Fixed a bug that caused multiliine prompts to be wrapped and displayed incorrectly. b. Fixed a bug that caused ^P/^N in emacs mode to fail to display the current line correctly. c. Fixed a problem in computing the number of invisible characters on the first line of a prompt whose length exceeds the screen width. d. Fixed vi-mode searching so that failure preserves the current line rather than the last line in the history list. e. Fixed the vi-mode `~' command (change-case) to have the correct behavior at end-of-line when manipulating multibyte characters. f. Fixed the vi-mode `r' command (change-char) to have the correct behavior at end-of-line when manipulating multibyte characters. g. Fixed multiple bugs in the redisplay of multibyte characters: displaying prompts longer than the screen width containing multibyte characters, h. Fix the calculation of the number of physical characters in the prompt string when it contains multibyte characters. i. A non-zero value for the `rl_complete_suppress_append' variable now causes no `/' to be appended to a directory name. j. Fixed forward-word and backward-word to work when words contained multibyte characters. k. Fixed a bug in finding the delimiter of a `?' substring when performing history expansion in a locale that supports multibyte characters. l. Fixed a memory leak caused by not freeing the timestamp in a history entry. m. Fixed a bug that caused "\M-x" style key bindings to not obey the setting of the `convert-meta' variable. n. Fixed saving and restoring primary prompt when prompting for incremental and non-incremental searches; search prompts now display multibyte characters correctly. o. Fixed a bug that caused keys originally bound to self-insert but shadowed by a multi-character key sequence to not be inserted. p. Fixed code so rl_prep_term_function and rl_deprep_term_function aren't dereferenced if NULL (matching the documentation). q. Extensive changes to readline to add enough state so that commands requiring additional characters (searches, multi-key sequences, numeric arguments, commands requiring an additional specifier character like vi-mode change-char, etc.) work without synchronously waiting for additional input. r. Lots of changes so readline builds and runs on MinGW. s. Readline no longer tries to modify the terminal settings when running in callback mode. t. The Readline display code no longer sets the location of the last invisible character in the prompt if the \[\] sequence is empty. u. The `change-case' command now correctly changes the case of multibyte characters. v. Changes to the shared library construction scripts to deal with Windows DLL naming conventions for Cygwin. w. Fixed the redisplay code to avoid core dumps resulting from a poorly-timed SIGWINCH. x. Fixed the non-incremental search code in vi mode to dispose of any current undo list when copying a line from the history into the current editing buffer. y. Fixed a bug that caused reversing the incremental search direction to not work correctly. z. Fixed the vi-mode `U' command to only undo up to the first time insert mode was entered, as Posix specifies. aa. Fixed a bug in the vi-mode `r' command that left the cursor in the wrong place. bb. Fixed a redisplay bug caused by moving the cursor vertically to a line with invisible characters in the prompt in a multibyte locale. cc. Fixed a bug that could cause the terminal special chars to be bound in the wrong keymap in vi mode. 2. New Features in Readline a. The key sequence sent by the keypad `delete' key is now automatically bound to delete-char. b. A negative argument to menu-complete now cycles backward through the completion list. c. A new bindable readline variable: bind-tty-special-chars. If non-zero, readline will bind the terminal special characters to their readline equivalents when it's called (on by default). d. New bindable command: vi-rubout. Saves deleted text for possible reinsertion, as with any vi-mode `text modification' command; `X' is bound to this in vi command mode. e. If the rl_completion_query_items is set to a value < 0, readline never asks the user whether or not to view the possible completions. f. The `C-w' binding in incremental search now understands multibyte characters. g. New application-callable auxiliary function, rl_variable_value, returns a string corresponding to a readline variable's value. h. When parsing inputrc files and variable binding commands, the parser strips trailing whitespace from values assigned to boolean variables before checking them. i. A new external application-controllable variable that allows the LINES and COLUMNS environment variables to set the window size regardless of what the kernel returns. ------------------------------------------------------------------------------- This document details the changes between this version, readline-5.0, and the previous version, readline-4.3. 1. Changes to Readline a. Fixes to avoid core dumps because of null pointer references in the multibyte character code. b. Fix to avoid infinite recursion caused by certain key combinations. c. Fixed a bug that caused the vi-mode `last command' to be set incorrectly. d. Readline no longer tries to read ahead more than one line of input, even when more is available. e. Fixed the code that adjusts the point to not mishandle null wide characters. f. Fixed a bug in the history expansion `g' modifier that caused it to skip every other match. g. Fixed a bug that caused the prompt to overwrite previous output when the output doesn't contain a newline and the locale supports multibyte characters. This same change fixes the problem of readline redisplay slowing down dramatically as the line gets longer in multibyte locales. h. History traversal with arrow keys in vi insertion mode causes the cursor to be placed at the end of the new line, like in emacs mode. i. The locale initialization code does a better job of using the right precedence and defaulting when checking the appropriate environment variables. j. Fixed the history word tokenizer to handle <( and >( better when used as part of bash. k. The overwrite mode code received several bug fixes to improve undo. l. Many speedups to the multibyte character redisplay code. m. The callback character reading interface should not hang waiting to read keyboard input. n. Fixed a bug with redoing vi-mode `s' command. o. The code that initializes the terminal tracks changes made to the terminal special characters with stty(1) (or equivalent), so that these changes are reflected in the readline bindings. New application-callable function to make it work: rl_tty_unset_default_bindings(). p. Fixed a bug that could cause garbage to be inserted in the buffer when changing character case in vi mode when using a multibyte locale. q. Fixed a bug in the redisplay code that caused problems on systems supporting multibyte characters when moving between history lines when the new line has more glyphs but fewer bytes. r. Undo and redo now work better after exiting vi insertion mode. s. Make sure system calls are restarted after a SIGWINCH is received using SA_RESTART. t. Improvements to the code that displays possible completions when using multibyte characters. u. Fixed a problem when parsing nested if statements in inputrc files. v. The completer now takes multibyte characters into account when looking for quoted substrings on which to perform completion. w. The history search functions now perform better bounds checking on the history list. x. Change to history expansion functions to treat `^' as equivalent to word one, as the documention states. y. Some changes to the display code to improve display and redisplay of multibyte characters. z. Changes to speed up the multibyte character redisplay code. aa. Fixed a bug in the vi-mode `E' command that caused it to skip over the last character of a word if invoked while point was on the word's next-to-last character. bb. Fixed a bug that could cause incorrect filename quoting when case-insensitive completion was enabled and the word being completed contained backslashes quoting word break characters. cc. Fixed a bug in redisplay triggered when the prompt string contains invisible characters. dd. Fixed some display (and other) bugs encountered in multibyte locales when a non-ascii character was the last character on a line. ee. Fixed some display bugs caused by multibyte characters in prompt strings. ff. Fixed a problem with history expansion caused by non-whitespace characters used as history word delimiters. gg. Fixed a problem that could cause readline to refer to freed memory when moving between history lines while doing searches. hh. Improvements to the code that expands and displays prompt strings containing multibyte characters. ii. Fixed a problem with vi-mode not correctly remembering the numeric argument to the last `c'hange command for later use with `.'. jj. Fixed a bug in vi-mode that caused multi-digit count arguments to work incorrectly. kk. Fixed a problem in vi-mode that caused the last text modification command to not be remembered across different command lines. ll. Fixed problems with changing characters and changing case at the end of the line. mm. Fixed a problem with readline saving the contents of the current line before beginning a non-interactive search. nn. Fixed a problem with EOF detection when using rl_event_hook. oo. Fixed a problem with the vi mode `p' and `P' commands ignoring numeric arguments. 2. New Features in Readline a. History expansion has a new `a' modifier equivalent to the `g' modifier for compatibility with the BSD csh. b. History expansion has a new `G' modifier equivalent to the BSD csh `g' modifier, which performs a substitution once per word. c. All non-incremental search operations may now undo the operation of replacing the current line with the history line. d. The text inserted by an `a' command in vi mode can be reinserted with `.'. e. New bindable variable, `show-all-if-unmodified'. If set, the readline completer will list possible completions immediately if there is more than one completion and partial completion cannot be performed. f. There is a new application-callable `free_history_entry()' function. g. History list entries now contain timestamp information; the history file functions know how to read and write timestamp information associated with each entry. h. Four new key binding functions have been added: rl_bind_key_if_unbound() rl_bind_key_if_unbound_in_map() rl_bind_keyseq_if_unbound() rl_bind_keyseq_if_unbound_in_map() i. New application variable, rl_completion_quote_character, set to any quote character readline finds before it calls the application completion function. j. New application variable, rl_completion_suppress_quote, settable by an application completion function. If set to non-zero, readline does not attempt to append a closing quote to a completed word. k. New application variable, rl_completion_found_quote, set to a non-zero value if readline determines that the word to be completed is quoted. Set before readline calls any application completion function. l. New function hook, rl_completion_word_break_hook, called when readline needs to break a line into words when completion is attempted. Allows the word break characters to vary based on position in the line. m. New bindable command: unix-filename-rubout. Does the same thing as unix-word-rubout, but adds `/' to the set of word delimiters. n. When listing completions, directories have a `/' appended if the `mark-directories' option has been enabled. ------------------------------------------------------------------------------- This document details the changes between this version, readline-4.3, and the previous version, readline-4.2a. 1. Changes to Readline a. Fixed output of comment-begin character when listing variable values. b. Added some default key bindings for common escape sequences produced by HOME and END keys. c. Fixed the mark handling code to be more emacs-compatible. d. A bug was fixed in the code that prints possible completions to keep it from printing empty strings in certain circumstances. e. Change the key sequence printing code to print ESC as M\- if ESC is a meta-prefix character -- it's easier for users to understand than \e. f. Fixed unstifle_history() to return values that match the documentation. g. Fixed the event loop (rl_event_hook) to handle the case where the input file descriptor is invalidated. h. Fixed the prompt display code to work better when the application has a custom redisplay function. i. Changes to make reading and writing the history file a little faster, and to cope with huge history files without calling abort(3) from xmalloc. j. The vi-mode `S' and `s' commands are now undone correctly. k. Fixed a problem which caused the display to be messed up when the last line of a multi-line prompt (possibly containing invisible characters) was longer than the screen width. 2. New Features in Readline a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both be bound to readline functions. Now the arrow keys may be used in vi insert mode. b. When listing completions, and the number of lines displayed is more than the screen length, readline uses an internal pager to display the results. This is controlled by the `page-completions' variable (default on). c. New code to handle editing and displaying multibyte characters. d. The behavior introduced in bash-2.05a of deciding whether or not to append a slash to a completed name that is a symlink to a directory has been made optional, controlled by the `mark-symlinked-directories' variable (default is the 2.05a behavior). e. The `insert-comment' command now acts as a toggle if given a numeric argument: if the first characters on the line don't specify a comment, insert one; if they do, delete the comment text f. New application-settable completion variable: rl_completion_mark_symlink_dirs, allows an application's completion function to temporarily override the user's preference for appending slashes to names which are symlinks to directories. g. New function available to application completion functions: rl_completion_mode, to tell how the completion function was invoked and decide which argument to supply to rl_complete_internal (to list completions, etc.). h. Readline now has an overwrite mode, toggled by the `overwrite-mode' bindable command, which could be bound to `Insert'. i. New application-settable completion variable: rl_completion_suppress_append, inhibits appending of rl_completion_append_character to completed words. j. New key bindings when reading an incremental search string: ^W yanks the currently-matched word out of the current line into the search string; ^Y yanks the rest of the current line into the search string, DEL or ^H deletes characters from the search string. ------------------------------------------------------------------------------- This document details the changes between this version, readline-4.2a, and the previous version, readline-4.2. 1. Changes to Readline a. More `const' and type casting fixes. b. Changed rl_message() to use vsnprintf(3) (if available) to fix buffer overflow problems. c. The completion code no longer appends a `/' or ` ' to a match when completing a symbolic link that resolves to a directory name, unless the match does not add anything to the word being completed. This means that a tab will complete the word up to the full name, but not add anything, and a subsequent tab will add a slash. d. Fixed a trivial typo that made the vi-mode `dT' command not work. e. Fixed the tty code so that ^S and ^Q can be inserted with rl_quoted_insert. f. Fixed the tty code so that ^V works more than once. g. Changed the use of __P((...)) for function prototypes to PARAMS((...)) because the use of __P in typedefs conflicted g++ and glibc. h. The completion code now attempts to do a better job of preserving the case of the word the user typed if ignoring case in completions. i. Readline defaults to not echoing the input and lets the terminal initialization code enable echoing if there is a controlling terminal. j. The key binding code now processes only two hex digits after a `\x' escape sequence, and the documentation was changed to note that the octal and hex escape sequences result in an eight-bit value rather than strict ASCII. k. Fixed a few places where negative array subscripts could have occurred. l. Fixed the vi-mode code to use a better method to determine the bounds of the array used to hold the marks, and to avoid out-of-bounds references. m. Fixed the defines in chardefs.h to work better when chars are signed. n. Fixed configure.in to use the new names for bash autoconf macros. o. Readline no longer attempts to define its own versions of some ctype macros if they are implemented as functions in libc but not as macros in . p. Fixed a problem where rl_backward could possibly set point to before the beginning of the line. q. Fixed Makefile to not put -I/usr/include into CFLAGS, since it can cause include file problems. 2. New Features in Readline a. Added extern declaration for rl_get_termcap to readline.h, making it a public function (it was always there, just not in readline.h). b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402, RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2. c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION. d. New bindable boolean readline variable: match-hidden-files. Controls completion of files beginning with a `.' (on Unix). Enabled by default. e. The history expansion code now allows any character to terminate a `:first-' modifier, like csh. f. The incremental search code remembers the last search string and uses it if ^R^R is typed without a search string. h. New bindable variable `history-preserve-point'. If set, the history code attempts to place the user at the same location on each history line retrived with previous-history or next-history. ------------------------------------------------------------------------------- This document details the changes between this version, readline-4.2, and the previous version, readline-4.1. 1. Changes to Readline a. When setting the terminal attributes on systems using `struct termio', readline waits for output to drain before changing the attributes. b. A fix was made to the history word tokenization code to avoid attempts to dereference a null pointer. c. Readline now defaults rl_terminal_name to $TERM if the calling application has left it unset, and tries to initialize with the resultant value. d. Instead of calling (*rl_getc_function)() directly to get input in certain places, readline now calls rl_read_key() consistently. e. Fixed a bug in the completion code that allowed a backslash to quote a single quote inside a single-quoted string. f. rl_prompt is no longer assigned directly from the argument to readline(), but uses memory allocated by readline. This allows constant strings to be passed to readline without problems arising when the prompt processing code wants to modify the string. g. Fixed a bug that caused non-interactive history searches to return the wrong line when performing multiple searches backward for the same string. h. Many variables, function arguments, and function return values are now declared `const' where appropriate, to improve behavior when linking with C++ code. i. The control character detection code now works better on systems where `char' is unsigned by default. j. The vi-mode numeric argument is now capped at 999999, just like emacs mode. k. The Function, CPFunction, CPPFunction, and VFunction typedefs have been replaced with a set of specific prototyped typedefs, though they are still in the readline header files for backwards compatibility. m. Nearly all of the (undocumented) internal global variables in the library now have an _rl_ prefix -- there were a number that did not, like screenheight, screenwidth, alphabetic, etc. n. The ding() convenience function has been renamed to rl_ding(), though the old function is still defined for backwards compatibility. o. The completion convenience functions filename_completion_function, username_completion_function, and completion_matches now have an rl_ prefix, though the old names are still defined for backwards compatibility. p. The functions shared by readline and bash (linkage is satisfied from bash when compiling with bash, and internally otherwise) now have an sh_ prefix. q. Changed the shared library creation procedure on Linux and BSD/OS 4.x so that the `soname' contains only the major version number rather than the major and minor numbers. r. Fixed a redisplay bug that occurred when the prompt spanned more than one physical line and contained invisible characters. s. Added a missing `includedir' variable to the Makefile. t. When installing the shared libraries, make sure symbolic links are relative. u. Added configure test so that it can set `${MAKE}' appropriately. v. Fixed a bug in rl_forward that could cause the point to be set to before the beginning of the line in vi mode. w. Fixed a bug in the callback read-char interface to make it work when a readline function pushes some input onto the input stream with rl_execute_next (like the incremental search functions). x. Fixed a file descriptor leak in the history file manipulation code that was tripped when attempting to truncate a non-regular file (like /dev/null). y. Changes to make all of the exported readline functions declared in readline.h have an rl_ prefix (rltty_set_default_bindings is now rl_tty_set_default_bindings, crlf is now rl_crlf, etc.) z. The formatted documentation included in the base readline distribution is no longer removed on a `make distclean'. aa. Some changes were made to avoid gcc warnings with -Wall. bb. rl_get_keymap_by_name now finds keymaps case-insensitively, so `set keymap EMACS' works. cc. The history file writing and truncation functions now return a useful status on error. dd. Fixed a bug that could cause applications to dereference a NULL pointer if a NULL second argument was passed to history_expand(). ee. If a hook function assigned to rl_event_hook sets rl_done to a non-zero value, rl_read_key() now immediately returns '\n' (which is assumed to be bound to accept-line). 2. New Features in Readline a. The blink timeout for paren matching is now settable by applications, via the rl_set_paren_blink_timeout() function. b. _rl_executing_macro has been renamed to rl_executing_macro, which means it's now part of the public interface. c. Readline has a new variable, rl_readline_state, which is a bitmap that encapsulates the current state of the library; intended for use by callbacks and hook functions. d. rlfe has a new -l option to log input and output (-a appends to logfile), a new -n option to set the readline application name, and -v and -h options for version and help information. e. rlfe can now perform filename completion for the inferior process if the OS has a /proc//cwd that can be read with readlink(2) to get the inferior's current working directory. f. A new file, rltypedefs.h, contains the new typedefs for function pointers and is installed by `make install'. g. New application-callable function rl_set_prompt(const char *prompt): expands its prompt string argument and sets rl_prompt to the result. h. New application-callable function rl_set_screen_size(int rows, int cols): public method for applications to set readline's idea of the screen dimensions. i. The history example program (examples/histexamp.c) is now built as one of the examples. j. The documentation has been updated to cover nearly all of the public functions and variables declared in readline.h. k. New function, rl_get_screen_size (int *rows, int *columns), returns readline's idea of the screen dimensions. l. The timeout in rl_gather_tyi (readline keyboard input polling function) is now settable via a function (rl_set_keyboard_input_timeout()). m. Renamed the max_input_history variable to history_max_entries; the old variable is maintained for backwards compatibility. n. The list of characters that separate words for the history tokenizer is now settable with a variable: history_word_delimiters. The default value is as before. o. There is a new history.3 manual page documenting the history library. ------------------------------------------------------------------------------- This document details the changes between this version, readline-4.1, and the previous version, readline-4.0. 1. Changes to Readline a. Changed the HTML documents so that the table-of-contents is no longer a separate file. b. Changes to the shared object configuration for: Irix 5.x, Irix 6.x, OSF/1. c. The shared library major and minor versions are now constructed automatically by configure and substituted into the makefiles. d. It's now possible to install the shared libraries separately from the static libraries. e. The history library tries to truncate the history file only if it is a regular file. f. A bug that caused _rl_dispatch to address negative array indices on systems with signed chars was fixed. g. rl-yank-nth-arg now leaves the history position the same as when it was called. h. Changes to the completion code to handle MS-DOS drive-letter:pathname filenames. i. Completion is now case-insensitive by default on MS-DOS. j. Fixes to the history file manipulation code for MS-DOS. k. Readline attempts to bind the arrow keys to appropriate defaults on MS-DOS. l. Some fixes were made to the redisplay code for better operation on MS-DOS. m. The quoted-insert code will now insert tty special chars like ^C. n. A bug was fixed that caused the display code to reference memory before the start of the prompt string. o. More support for __EMX__ (OS/2). p. A bug was fixed in readline's signal handling that could cause infinite recursion in signal handlers. q. A bug was fixed that caused the point to be less than zero when rl_forward was given a very large numeric argument. r. The vi-mode code now gets characters via the application-settable value of rl_getc_function rather than calling rl_getc directly. s. The history file code now uses O_BINARY mode when reading and writing the history file on cygwin32. t. Fixed a bug in the redisplay code for lines with more than 256 line breaks. u. A bug was fixed which caused invisible character markers to not be stripped from the prompt string if the terminal was in no-echo mode. v. Readline no longer tries to get the variables it needs for redisplay from the termcap entry if the calling application has specified its own redisplay function. Readline treats the terminal as `dumb' in this case. w. Fixes to the SIGWINCH code so that a multiple-line prompt with escape sequences is redrawn correctly. x. Changes to the install and install-shared targets so that the libraries and header files are installed separately. 2. New Features in Readline a. A new Readline `user manual' is in doc/rluserman.texinfo. b. Parentheses matching is now always compiled into readline, and enabled or disabled when the value of the `blink-matching-paren' variable is changed. c. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename. d. MS-DOS systems now use ~/_history as the default history file. e. history-search-{forward,backward} now leave the point at the end of the line when the string to search for is empty, like {reverse,forward}-search-history. f. history-search-{forward,backward} now leave the last history line found in the readline buffer if the second or subsequent search fails. g. New function for use by applications: rl_on_new_line_with_prompt, used when an application displays the prompt itself before calling readline(). h. New variable for use by applications: rl_already_prompted. An application that displays the prompt itself before calling readline() must set this to a non-zero value. i. A new variable, rl_gnu_readline_p, always 1. The intent is that an application can verify whether or not it is linked with the `real' readline library or some substitute. j. Per Bothner's `rlfe' (pronounced `Ralphie') readline front-end program is included in the examples subdirectory, though it is not built by default. ------------------------------------------------------------------------------- This document details the changes between this version, readline-4.0, and the previous version, readline-2.2. 1. Changes to Readline a. The version number is now 4.0, to match the major and minor version numbers on the shared readline and history libraries. Future releases will maintain the identical numbering. b. Fixed a typo in the `make install' recipe that copied libreadline.a to libhistory.old right after installing it. c. The readline and history info files are now installed out of the source directory if they are not found in the build directory. d. The library no longer exports a function named `savestring' -- backwards compatibility be damned. e. There is no longer any #ifdef SHELL code in the source files. f. Some changes were made to the key binding code to fix memory leaks and better support Win32 systems. g. Fixed a silly typo in the paren matching code -- it's microseconds, not milliseconds. h. The readline library should be compilable by C++ compilers. i. The readline.h public header file now includes function prototypes for all readline functions, and some changes were made to fix errors in the source files uncovered by the use of prototypes. j. The maximum numeric argument is now clamped at 1000000. k. Fixes to rl_yank_last_arg to make it behave better. l. Fixed a bug in the display code that caused core dumps if the prompt string length exceeded 1024 characters. m. The menu completion code was fixed to properly insert a single completion if there is only one match. n. A bug was fixed that caused the display code to improperly display tabs after newlines. o. A fix was made to the completion code in which a typo caused the wrong value to be passed to the function that computed the longest common prefix of the list of matches. p. The completion code now checks the value of rl_filename_completion_desired, which is set by application-supplied completion functions to indicate that filename completion is being performed, to decide whether or not to call an application-supplied `ignore completions' function. q. Code was added to the history library to catch history substitutions using `&' without a previous history substitution or search having been performed. 2. New Features in Readline a. There is a new script, support/shobj-conf, to do system-specific shared object and library configuration. It generates variables for configure to substitute into makefiles. The README file provides a detailed explanation of the shared library creation process. b. Shared libraries and objects are now built in the `shlib' subdirectory. There is a shlib/Makefile.in to control the build process. `make shared' from the top-level directory is still the right way to build shared versions of the libraries. c. rlconf.h is now installed, so applications can find out which features have been compiled into the installed readline and history libraries. d. rlstdc.h is now an installed header file. e. Many changes to the signal handling: o Readline now catches SIGQUIT and cleans up the tty before returning; o A new variable, rl_catch_signals, is available to application writers to indicate to readline whether or not it should install its own signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP, SIGTTIN, and SIGTTOU; o A new variable, rl_catch_sigwinch, is available to application writers to indicate to readline whether or not it should install its own signal handler for SIGWINCH, which will chain to the calling applications's SIGWINCH handler, if one is installed; o There is a new function, rl_free_line_state, for application signal handlers to call to free up the state associated with the current line after receiving a signal; o There is a new function, rl_cleanup_after_signal, to clean up the display and terminal state after receiving a signal; o There is a new function, rl_reset_after_signal, to reinitialize the terminal and display state after an application signal handler returns and readline continues f. There is a new function, rl_resize_terminal, to reset readline's idea of the screen size after a SIGWINCH. g. New public functions: rl_save_prompt and rl_restore_prompt. These were previously private functions with a `_' prefix. These functions are used when an application wants to write a message to the `message area' with rl_message and have the prompt restored correctly when the message is erased. h. New function hook: rl_pre_input_hook, called just before readline starts reading input, after initialization. i. New function hook: rl_display_matches_hook, called when readline would display the list of completion matches. The new function rl_display_match_list is what readline uses internally, and is available for use by application functions called via this hook. j. New bindable function, delete-char-or-list, like tcsh. k. A new variable, rl_erase_empty_line, which, if set by an application using readline, will cause readline to erase, prompt and all, lines on which the only thing typed was a newline. l. There is a new script, support/shlib-install, to install and uninstall the shared readline and history libraries. m. A new bindable variable, `isearch-terminators', which is a string containing the set of characters that should terminate an incremental search without being executed as a command. n. A new bindable function, forward-backward-delete-char. ------------------------------------------------------------------------------- This document details the changes between this version, readline-2.2, and the previous version, readline-2.1. 1. Changes to Readline a. Added a missing `extern' to a declaration in readline.h that kept readline from compiling cleanly on some systems. b. The history file is now opened with mode 0600 when it is written for better security. c. Changes were made to the SIGWINCH handling code so that prompt redisplay is done better. d. ^G now interrupts incremental searches correctly. e. A bug that caused a core dump when the set of characters to be quoted when completing words was empty was fixed. f. Fixed a problem in the readline test program rltest.c that caused a core dump. g. The code that handles parser directives in inputrc files now displays more error messages. h. The history expansion code was fixed so that the appearance of the history comment character at the beginning of a word inhibits history expansion for that word and the rest of the input line. i. The code that prints completion listings now behaves better if one or more of the filenames contains non-printable characters. j. The time delay when showing matching parentheses is now 0.5 seconds. 2. New Features in Readline a. There is now an option for `iterative' yank-last-arg handline, so a user can keep entering `M-.', yanking the last argument of successive history lines. b. New variable, `print-completions-horizontally', which causes completion matches to be displayed across the screen (like `ls -x') rather than up and down the screen (like `ls'). c. New variable, `completion-ignore-case', which causes filename completion and matching to be performed case-insensitively. d. There is a new bindable command, `magic-space', which causes history expansion to be performed on the current readline buffer and a space to be inserted into the result. e. There is a new bindable command, `menu-complete', which enables tcsh-like menu completion (successive executions of menu-complete insert a single completion match, cycling through the list of possible completions). f. There is a new bindable command, `paste-from-clipboard', for use on Win32 systems, to insert the text from the Win32 clipboard into the editing buffer. g. The key sequence translation code now understands printf-style backslash escape sequences, including \NNN octal escapes. These escape sequences may be used in key sequence definitions or macro values. h. An `$include' inputrc file parser directive has been added. gdb-doc-7.6.2/readline/shell.c0000644000175000017500000001066312250770610015127 0ustar zumbizumbi/* shell.c -- readline utility functions that are normally provided by bash when readline is linked as part of the shell. */ /* Copyright (C) 1997-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include #endif #include #if defined (HAVE_UNISTD_H) # include #endif /* HAVE_UNISTD_H */ #if defined (HAVE_STDLIB_H) # include #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #if defined (HAVE_STRING_H) # include #else # include #endif /* !HAVE_STRING_H */ #if defined (HAVE_LIMITS_H) # include #endif #if defined (HAVE_FCNTL_H) #include #endif #if defined (HAVE_PWD_H) #include #endif #include #include "rlstdc.h" #include "rlshell.h" #include "xmalloc.h" #if defined (HAVE_GETPWUID) && !defined (HAVE_GETPW_DECLS) extern struct passwd *getpwuid PARAMS((uid_t)); #endif /* HAVE_GETPWUID && !HAVE_GETPW_DECLS */ #ifndef NULL # define NULL 0 #endif #ifndef CHAR_BIT # define CHAR_BIT 8 #endif /* Nonzero if the integer type T is signed. */ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) /* Bound on length of the string representing an integer value of type T. Subtract one for the sign bit if T is signed; 302 / 1000 is log10 (2) rounded up; add one for integer division truncation; add one more for a minus sign if t is signed. */ #define INT_STRLEN_BOUND(t) \ ((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 1000 \ + 1 + TYPE_SIGNED (t)) /* All of these functions are resolved from bash if we are linking readline as part of bash. */ /* Does shell-like quoting using single quotes. */ char * sh_single_quote (string) char *string; { register int c; char *result, *r, *s; result = (char *)xmalloc (3 + (4 * strlen (string))); r = result; *r++ = '\''; for (s = string; s && (c = *s); s++) { *r++ = c; if (c == '\'') { *r++ = '\\'; /* insert escaped single quote */ *r++ = '\''; *r++ = '\''; /* start new quoted string */ } } *r++ = '\''; *r = '\0'; return (result); } /* Set the environment variables LINES and COLUMNS to lines and cols, respectively. */ void sh_set_lines_and_columns (lines, cols) int lines, cols; { char *b; #if defined (HAVE_SETENV) b = (char *)xmalloc (INT_STRLEN_BOUND (int) + 1); sprintf (b, "%d", lines); setenv ("LINES", b, 1); xfree (b); b = (char *)xmalloc (INT_STRLEN_BOUND (int) + 1); sprintf (b, "%d", cols); setenv ("COLUMNS", b, 1); xfree (b); #else /* !HAVE_SETENV */ # if defined (HAVE_PUTENV) b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("LINES=") + 1); sprintf (b, "LINES=%d", lines); putenv (b); b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("COLUMNS=") + 1); sprintf (b, "COLUMNS=%d", cols); putenv (b); # endif /* HAVE_PUTENV */ #endif /* !HAVE_SETENV */ } char * sh_get_env_value (varname) const char *varname; { return ((char *)getenv (varname)); } char * sh_get_home_dir () { char *home_dir; struct passwd *entry; home_dir = (char *)NULL; #if defined (HAVE_GETPWUID) entry = getpwuid (getuid ()); if (entry) home_dir = entry->pw_dir; #endif return (home_dir); } #if !defined (O_NDELAY) # if defined (FNDELAY) # define O_NDELAY FNDELAY # endif #endif int sh_unset_nodelay_mode (fd) int fd; { #if defined (HAVE_FCNTL) int flags, bflags; if ((flags = fcntl (fd, F_GETFL, 0)) < 0) return -1; bflags = 0; #ifdef O_NONBLOCK bflags |= O_NONBLOCK; #endif #ifdef O_NDELAY bflags |= O_NDELAY; #endif if (flags & bflags) { flags &= ~bflags; return (fcntl (fd, F_SETFL, flags)); } #endif return 0; } gdb-doc-7.6.2/readline/posixselect.h0000644000175000017500000000252412250770610016364 0ustar zumbizumbi/* posixselect.h -- wrapper for select(2) includes and definitions */ /* Copyright (C) 2009 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash 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 3 of the License, or (at your option) any later version. Bash 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 Bash. If not, see . */ #ifndef _POSIXSELECT_H_ #define _POSIXSELECT_H_ #if defined (FD_SET) && !defined (HAVE_SELECT) # define HAVE_SELECT 1 #endif #if defined (HAVE_SELECT) # if !defined (HAVE_SYS_SELECT_H) || !defined (M_UNIX) # include # endif #endif /* HAVE_SELECT */ #if defined (HAVE_SYS_SELECT_H) # include #endif #ifndef USEC_PER_SEC # define USEC_PER_SEC 1000000 #endif #define USEC_TO_TIMEVAL(us, tv) \ do { \ (tv).tv_sec = (us) / USEC_PER_SEC; \ (tv).tv_usec = (us) % USEC_PER_SEC; \ } while (0) #endif /* _POSIXSELECT_H_ */ gdb-doc-7.6.2/readline/keymaps.h0000644000175000017500000000613312250770610015473 0ustar zumbizumbi/* keymaps.h -- Manipulation of readline keymaps. */ /* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #ifndef _KEYMAPS_H_ #define _KEYMAPS_H_ #ifdef __cplusplus extern "C" { #endif #if defined (READLINE_LIBRARY) # include "rlstdc.h" # include "chardefs.h" # include "rltypedefs.h" #else # include # include # include #endif /* A keymap contains one entry for each key in the ASCII set. Each entry consists of a type and a pointer. FUNCTION is the address of a function to run, or the address of a keymap to indirect through. TYPE says which kind of thing FUNCTION is. */ typedef struct _keymap_entry { char type; rl_command_func_t *function; } KEYMAP_ENTRY; /* This must be large enough to hold bindings for all of the characters in a desired character set (e.g, 128 for ASCII, 256 for ISO Latin-x, and so on) plus one for subsequence matching. */ #define KEYMAP_SIZE 257 #define ANYOTHERKEY KEYMAP_SIZE-1 typedef KEYMAP_ENTRY KEYMAP_ENTRY_ARRAY[KEYMAP_SIZE]; typedef KEYMAP_ENTRY *Keymap; /* The values that TYPE can have in a keymap entry. */ #define ISFUNC 0 #define ISKMAP 1 #define ISMACR 2 extern KEYMAP_ENTRY_ARRAY emacs_standard_keymap, emacs_meta_keymap, emacs_ctlx_keymap; extern KEYMAP_ENTRY_ARRAY vi_insertion_keymap, vi_movement_keymap; /* Return a new, empty keymap. Free it with free() when you are done. */ extern Keymap rl_make_bare_keymap PARAMS((void)); /* Return a new keymap which is a copy of MAP. */ extern Keymap rl_copy_keymap PARAMS((Keymap)); /* Return a new keymap with the printing characters bound to rl_insert, the lowercase Meta characters bound to run their equivalents, and the Meta digits bound to produce numeric arguments. */ extern Keymap rl_make_keymap PARAMS((void)); /* Free the storage associated with a keymap. */ extern void rl_discard_keymap PARAMS((Keymap)); /* These functions actually appear in bind.c */ /* Return the keymap corresponding to a given name. Names look like `emacs' or `emacs-meta' or `vi-insert'. */ extern Keymap rl_get_keymap_by_name PARAMS((const char *)); /* Return the current keymap. */ extern Keymap rl_get_keymap PARAMS((void)); /* Set the current keymap to MAP. */ extern void rl_set_keymap PARAMS((Keymap)); #ifdef __cplusplus } #endif #endif /* _KEYMAPS_H_ */ gdb-doc-7.6.2/readline/shlib/0000755000175000017500000000000012266504076014757 5ustar zumbizumbigdb-doc-7.6.2/readline/shlib/Makefile.in0000644000175000017500000004144412250770610017023 0ustar zumbizumbi## -*- text -*- ## # Makefile for the GNU readline library shared library support. # # Copyright (C) 1998-2009 Free Software Foundation, Inc. # 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 3 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, see . PACKAGE = @PACKAGE_NAME@ VERSION = @PACKAGE_VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_VERSION = @PACKAGE_VERSION@ RL_LIBRARY_VERSION = @LIBVERSION@ RL_LIBRARY_NAME = readline datarootdir = @datarootdir@ srcdir = @srcdir@ VPATH = @top_srcdir@ topdir = @top_srcdir@ BUILD_DIR = @BUILD_DIR@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ CC = @CC@ RANLIB = @RANLIB@ AR = @AR@ ARFLAGS = @ARFLAGS@ RM = rm -f CP = cp MV = mv LN = ln SHELL = @MAKE_SHELL@ host_os = @host_os@ host_vendor = @host_vendor@ prefix = @prefix@ exec_prefix = @exec_prefix@ includedir = @includedir@ bindir = @bindir@ libdir = @libdir@ datadir = @datadir@ localedir = @localedir@ # Support an alternate destination root directory for package building DESTDIR = CFLAGS = @CFLAGS@ LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"' CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@ @CFLAGS@ DEFS = @DEFS@ @CROSS_COMPILE@ LOCAL_DEFS = @LOCAL_DEFS@ # # These values are generated for configure by ${topdir}/support/shobj-conf. # If your system is not supported by that script, but includes facilities for # dynamic loading of shared objects, please update the script and send the # changes to bash-maintainers@gnu.org. # SHOBJ_CC = @SHOBJ_CC@ SHOBJ_CFLAGS = @SHOBJ_CFLAGS@ SHOBJ_LD = @SHOBJ_LD@ SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@ SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@ SHOBJ_LIBS = @SHOBJ_LIBS@ SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@ SHLIB_LIBS = @SHLIB_LIBS@ SHLIB_DOT = @SHLIB_DOT@ SHLIB_LIBPREF = @SHLIB_LIBPREF@ SHLIB_LIBSUFF = @SHLIB_LIBSUFF@ SHLIB_LIBVERSION = @SHLIB_LIBVERSION@ SHLIB_DLLVERSION = @SHLIB_DLLVERSION@ SHLIB_STATUS = @SHLIB_STATUS@ TERMCAP_LIB = @TERMCAP_LIB@ # shared library versioning SHLIB_MAJOR= @SHLIB_MAJOR@ # shared library systems like SVR4's do not use minor versions SHLIB_MINOR= .@SHLIB_MINOR@ # For libraries which include headers from other libraries. INCLUDES = -I. -I.. -I$(topdir) CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) $(LOCAL_CFLAGS) $(CFLAGS) .SUFFIXES: .so .c.so: ${RM} $@ $(SHOBJ_CC) -c $(CCFLAGS) $(SHOBJ_CFLAGS) -o $*.o $< $(MV) $*.o $@ # The name of the main library target. SHARED_READLINE = $(SHLIB_LIBPREF)readline$(SHLIB_DOT)$(SHLIB_LIBVERSION) SHARED_HISTORY = $(SHLIB_LIBPREF)history$(SHLIB_DOT)$(SHLIB_LIBVERSION) SHARED_LIBS = $(SHARED_READLINE) $(SHARED_HISTORY) # The C code source files for this library. CSOURCES = $(topdir)/readline.c $(topdir)/funmap.c $(topdir)/keymaps.c \ $(topdir)/vi_mode.c $(topdir)/parens.c $(topdir)/rltty.c \ $(topdir)/complete.c $(topdir)/bind.c $(topdir)/isearch.c \ $(topdir)/display.c $(topdir)/signals.c $(topdir)/emacs_keymap.c \ $(topdir)/vi_keymap.c $(topdir)/util.c $(topdir)/kill.c \ $(topdir)/undo.c $(topdir)/macro.c $(topdir)/input.c \ $(topdir)/callback.c $(topdir)/terminal.c $(topdir)/xmalloc.c $(topdir)/xfree.c \ $(topdir)/history.c $(topdir)/histsearch.c $(topdir)/histexpand.c \ $(topdir)/histfile.c $(topdir)/nls.c $(topdir)/search.c \ $(topdir)/shell.c $(topdir)/savestring.c $(topdir)/tilde.c \ $(topdir)/text.c $(topdir)/misc.c $(topdir)/compat.c \ $(topdir)/mbutil.c # The header files for this library. HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \ posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \ ansi_stdlib.h tcap.h xmalloc.h rlprivate.h rlshell.h rlmbutil.h SHARED_HISTOBJ = history.so histexpand.so histfile.so histsearch.so shell.so \ mbutil.so SHARED_TILDEOBJ = tilde.so SHARED_OBJ = readline.so vi_mode.so funmap.so keymaps.so parens.so search.so \ rltty.so complete.so bind.so isearch.so display.so signals.so \ util.so kill.so undo.so macro.so input.so callback.so terminal.so \ text.so nls.so misc.so xmalloc.so xfree.so $(SHARED_HISTOBJ) $(SHARED_TILDEOBJ) \ compat.so ########################################################################## all: $(SHLIB_STATUS) supported: $(SHARED_LIBS) unsupported: @echo "Your system and compiler (${host_os}-${CC}) are not supported by the" @echo "${topdir}/support/shobj-conf script." @echo "If your operating system provides facilities for creating" @echo "shared libraries, please update the script and re-run configure." @echo "Please send the changes you made to bash-maintainers@gnu.org" @echo "for inclusion in future bash and readline releases." $(SHARED_READLINE): $(SHARED_OBJ) $(RM) $@ $(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_OBJ) $(SHLIB_LIBS) $(SHARED_HISTORY): $(SHARED_HISTOBJ) xmalloc.so xfree.so $(RM) $@ $(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.so xfree.so $(SHLIB_LIBS) # Since tilde.c is shared between readline and bash, make sure we compile # it with the right flags when it's built as part of readline tilde.so: tilde.c ${RM} $@ $(SHOBJ_CC) -c $(CCFLAGS) $(SHOBJ_CFLAGS) -DREADLINE_LIBRARY -c -o tilde.o $(topdir)/tilde.c $(MV) tilde.o $@ installdirs: $(topdir)/support/mkdirs -$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(libdir) -$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(bindir) install: installdirs $(SHLIB_STATUS) $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_HISTORY) $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_READLINE) @echo install: you may need to run ldconfig uninstall: $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_HISTORY) $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_READLINE) @echo uninstall: you may need to run ldconfig clean mostlyclean: force $(RM) $(SHARED_OBJ) $(SHARED_LIBS) distclean maintainer-clean: clean $(RM) Makefile force: # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: # Dependencies bind.so: $(topdir)/ansi_stdlib.h $(topdir)/posixstat.h bind.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h bind.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h bind.so: $(topdir)/rltypedefs.h bind.so: $(topdir)/tilde.h $(topdir)/history.h compat.so: $(topdir)/rlstdc.h callback.so: $(topdir)/rlconf.h callback.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h callback.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h callback.so: $(topdir)/rltypedefs.h callback.so: $(topdir)/tilde.h complete.so: $(topdir)/ansi_stdlib.h posixdir.h $(topdir)/posixstat.h complete.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h complete.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h complete.so: $(topdir)/rltypedefs.h complete.so: $(topdir)/tilde.h display.so: $(topdir)/ansi_stdlib.h $(topdir)/posixstat.h display.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h display.so: $(topdir)/tcap.h display.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h display.so: $(topdir)/rltypedefs.h display.so: $(topdir)/tilde.h $(topdir)/history.h funmap.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h funmap.so: $(topdir)/rltypedefs.h funmap.so: $(topdir)/rlconf.h $(topdir)/ansi_stdlib.h funmap.so: ${BUILD_DIR}/config.h $(topdir)/tilde.h histexpand.so: $(topdir)/ansi_stdlib.h histexpand.so: $(topdir)/history.h $(topdir)/histlib.h $(topdir)/rltypedefs.h histexpand.so: ${BUILD_DIR}/config.h histfile.so: $(topdir)/ansi_stdlib.h histfile.so: $(topdir)/history.h $(topdir)/histlib.h $(topdir)/rltypedefs.h histfile.so: ${BUILD_DIR}/config.h history.so: $(topdir)/ansi_stdlib.h history.so: $(topdir)/history.h $(topdir)/histlib.h $(topdir)/rltypedefs.h history.so: ${BUILD_DIR}/config.h histsearch.so: $(topdir)/ansi_stdlib.h histsearch.so: $(topdir)/history.h $(topdir)/histlib.h $(topdir)/rltypedefs.h histsearch.so: ${BUILD_DIR}/config.h input.so: $(topdir)/ansi_stdlib.h input.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h input.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h input.so: $(topdir)/rltypedefs.h input.so: $(topdir)/tilde.h isearch.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h isearch.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h isearch.so: $(topdir)/rltypedefs.h isearch.so: $(topdir)/ansi_stdlib.h $(topdir)/history.h $(topdir)/tilde.h keymaps.so: emacs_keymap.c vi_keymap.c keymaps.so: $(topdir)/keymaps.h $(topdir)/chardefs.h $(topdir)/rlconf.h keymaps.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h keymaps.so: $(topdir)/rltypedefs.h keymaps.so: ${BUILD_DIR}/config.h $(topdir)/ansi_stdlib.h $(topdir)/tilde.h kill.so: $(topdir)/ansi_stdlib.h kill.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h kill.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h kill.so: $(topdir)/tilde.h $(topdir)/history.h $(topdir)/rltypedefs.h macro.so: $(topdir)/ansi_stdlib.h macro.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h macro.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h macro.so: $(topdir)/tilde.h $(topdir)/history.h $(topdir)/rltypedefs.h mbutil.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h mbutil.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/rltypedefs.h mbutil.so: $(topdir)/chardefs.h $(topdir)/rlstdc.h misc.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h misc.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h misc.so: $(topdir)/rltypedefs.h misc.so: $(topdir)/history.h $(topdir)/tilde.h $(topdir)/ansi_stdlib.h nls.so: $(topdir)/ansi_stdlib.h nls.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h nls.o: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h nls.o: $(topdir)/rltypedefs.h nls.o: $(topdir)/tilde.h $(topdir)/history.h $(topdir)/rlstdc.h parens.so: $(topdir)/rlconf.h ${BUILD_DIR}/config.h parens.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h parens.so: $(topdir)/rltypedefs.h parens.so: $(topdir)/tilde.h rltty.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h rltty.so: $(topdir)/rltty.h $(topdir)/tilde.h rltty.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h rltty.so: $(topdir)/rltypedefs.h search.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h search.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h search.so: $(topdir)/ansi_stdlib.h $(topdir)/history.h $(topdir)/tilde.h search.so: $(topdir)/rltypedefs.h signals.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h signals.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h signals.so: $(topdir)/history.h $(topdir)/tilde.h signals.so: $(topdir)/rltypedefs.h terminal.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h terminal.so: $(topdir)/tcap.h terminal.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h terminal.so: $(topdir)/tilde.h $(topdir)/history.h terminal.so: $(topdir)/rltypedefs.h text.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h text.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h text.so: $(topdir)/rltypedefs.h text.so: $(topdir)/history.h $(topdir)/tilde.h $(topdir)/ansi_stdlib.h tilde.so: $(topdir)/ansi_stdlib.h ${BUILD_DIR}/config.h $(topdir)/tilde.h undo.so: $(topdir)/ansi_stdlib.h undo.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h undo.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h undo.so: $(topdir)/rltypedefs.h undo.so: $(topdir)/tilde.h $(topdir)/history.h util.so: $(topdir)/posixjmp.h $(topdir)/ansi_stdlib.h util.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h util.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h util.so: $(topdir)/rltypedefs.h $(topdir)/tilde.h vi_mode.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h vi_mode.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h vi_mode.so: $(topdir)/history.h $(topdir)/ansi_stdlib.h $(topdir)/tilde.h vi_mode.so: $(topdir)/rltypedefs.h xfree.so: ${BUILD_DIR}/config.h xfree.so: $(topdir)/ansi_stdlib.h xmalloc.so: ${BUILD_DIR}/config.h xmalloc.so: $(topdir)/ansi_stdlib.h bind.so: $(topdir)/rlshell.h histfile.so: $(topdir)/rlshell.h nls.so: $(topdir)/rlshell.h readline.so: $(topdir)/rlshell.h shell.so: $(topdir)/rlshell.h terminal.so: $(topdir)/rlshell.h histexpand.so: $(topdir)/rlshell.h bind.so: $(topdir)/rlprivate.h callback.so: $(topdir)/rlprivate.h complete.so: $(topdir)/rlprivate.h display.so: $(topdir)/rlprivate.h input.so: $(topdir)/rlprivate.h isearch.so: $(topdir)/rlprivate.h kill.so: $(topdir)/rlprivate.h macro.so: $(topdir)/rlprivate.h mbutil.so: $(topdir)/rlprivate.h misc.so: $(topdir)/rlprivate.h nls.so: $(topdir)/rlprivate.h parens.so: $(topdir)/rlprivate.h readline.so: $(topdir)/rlprivate.h rltty.so: $(topdir)/rlprivate.h search.so: $(topdir)/rlprivate.h signals.so: $(topdir)/rlprivate.h terminal.so: $(topdir)/rlprivate.h text.so: $(topdir)/rlprivate.h undo.so: $(topdir)/rlprivate.h util.so: $(topdir)/rlprivate.h vi_mode.so: $(topdir)/rlprivate.h bind.so: $(topdir)/xmalloc.h complete.so: $(topdir)/xmalloc.h display.so: $(topdir)/xmalloc.h funmap.so: $(topdir)/xmalloc.h histexpand.so: $(topdir)/xmalloc.h histfile.so: $(topdir)/xmalloc.h history.so: $(topdir)/xmalloc.h input.so: $(topdir)/xmalloc.h isearch.so: $(topdir)/xmalloc.h keymaps.so: $(topdir)/xmalloc.h kill.so: $(topdir)/xmalloc.h macro.so: $(topdir)/xmalloc.h mbutil.so: $(topdir)/xmalloc.h misc.so: $(topdir)/xmalloc.h readline.so: $(topdir)/xmalloc.h savestring.so: $(topdir)/xmalloc.h search.so: $(topdir)/xmalloc.h shell.so: $(topdir)/xmalloc.h terminal.so: $(topdir)/xmalloc.h text.so: $(topdir)/xmalloc.h tilde.so: $(topdir)/xmalloc.h undo.so: $(topdir)/xmalloc.h util.so: $(topdir)/xmalloc.h vi_mode.so: $(topdir)/xmalloc.h xfree.so: $(topdir)/xmalloc.h xmalloc.so: $(topdir)/xmalloc.h complete.o: $(topdir)/rlmbutil.h display.o: $(topdir)/rlmbutil.h histexpand.o: $(topdir)/rlmbutil.h input.o: $(topdir)/rlmbutil.h isearch.o: $(topdir)/rlmbutil.h mbutil.o: $(topdir)/rlmbutil.h misc.o: $(topdir)/rlmbutil.h readline.o: $(topdir)/rlmbutil.h search.o: $(topdir)/rlmbutil.h text.o: $(topdir)/rlmbutil.h vi_mode.o: $(topdir)/rlmbutil.h bind.so: $(topdir)/bind.c callback.so: $(topdir)/callback.c compat.so: $(topdir)/compat.c complete.so: $(topdir)/complete.c display.so: $(topdir)/display.c funmap.so: $(topdir)/funmap.c input.so: $(topdir)/input.c isearch.so: $(topdir)/isearch.c keymaps.so: $(topdir)/keymaps.c $(topdir)/emacs_keymap.c $(topdir)/vi_keymap.c kill.so: $(topdir)/kill.c macro.so: $(topdir)/macro.c mbutil.so: $(topdir)/mbutil.c misc.so: $(topdir)/mbutil.c nls.so: $(topdir)/nls.c parens.so: $(topdir)/parens.c readline.so: $(topdir)/readline.c rltty.so: $(topdir)/rltty.c savestring.so: $(topdir)/savestring.c search.so: $(topdir)/search.c shell.so: $(topdir)/shell.c signals.so: $(topdir)/signals.c terminal.so: $(topdir)/terminal.c text.so: $(topdir)/text.c tilde.so: $(topdir)/tilde.c undo.so: $(topdir)/undo.c util.so: $(topdir)/util.c vi_mode.so: $(topdir)/vi_mode.c xfree.so: $(topdir)/xfree.c xmalloc.so: $(topdir)/xmalloc.c histexpand.so: $(topdir)/histexpand.c histfile.so: $(topdir)/histfile.c history.so: $(topdir)/history.c histsearch.so: $(topdir)/histsearch.c bind.so: bind.c callback.so: callback.c comapt.so: compat.c complete.so: complete.c display.so: display.c funmap.so: funmap.c input.so: input.c isearch.so: isearch.c keymaps.so: keymaps.c emacs_keymap.c vi_keymap.c kill.so: kill.c macro.so: macro.c mbutil.so: mbutil.c misc.so: misc.c nls.so: nls.c parens.so: parens.c readline.so: readline.c rltty.so: rltty.c savestring.so: savestring.c search.so: search.c signals.so: signals.c shell.so: shell.c terminal.so: terminal.c text.so: text.c tilde.so: tilde.c undo.so: undo.c util.so: util.c vi_mode.so: vi_mode.c xfree.so: xfree.c xmalloc.so: xmalloc.c histexpand.so: histexpand.c histfile.so: histfile.c history.so: history.c histsearch.so: histsearch.c gdb-doc-7.6.2/readline/CHANGELOG0000644000175000017500000006561412250770610015074 0ustar zumbizumbi[Readline-specific changelog. Descriptions of changes to the source are found in the bash changelog.] 6/9 --- Makefile.in - quote value of ${INSTALL_DATA} when passing it to makes in subdirectories 7/1 --- Makefile.in - don't pass INSTALL_DATA to a make in the `doc' subdirectory; let autoconf set the value itself in the Makefile - removed a stray `-' before $(RANLIB) in the `install' recipe doc/Makefile.in - add a VPATH assignment so the documentation is not remade if it's already up-to-date in the distribution configure.in - call AC_SUBST(LOCAL_LDFLAGS), since Makefile.in contains @LOCAL_LDFLAGS@ 7/9 --- config.h.in - add define lines for STRUCT_WINSIZE_IN_SYS_IOCTL and STRUCT_WINSIZE_IN_TERMIOS configure.in - call BASH_STRUCT_WINSIZE to look for the definition of `struct winsize' 7/17 ---- configure.in - call AC_MINIX config.h.in - add define line for AC_MINIX 7/18 ---- Makefile.in - add `install-shared' and `uninstall-shared' targets 8/4 --- Makefile.in - install and uninstall libhistory.a in the `install' and `uninstall' targets 9/4 --- configure.in - bumped LIBVERSION up to 2.1.1, indicating that this is patch level 1 to release 2.1 9/16 ---- Makefile.in - `make distclean' now descends into the `examples' subdir doc/Makefile.in - the `distclean' and `maintainer-clean' targets should remove Makefile examples/Makefile.in - added the various clean targets 4/2 --- configure.in - bumped LIBVERSION up to 2.2 4/18 ---- [readline-2.2 released] 4/20 ---- Makefile.in - make `libhistory.a' a dependency of `install' - fixed a typo in the recipe for `install' that copied libreadline.a to libhistory.old right after installing it 4/27 ---- doc/Makefile.in - install {readline,history}.info out of the source directory if they are not found in the current (build) directory -- only an issue if the libraries are built in a different directory than the source directory 5/1 --- support/shobj-conf - script from the bash distribution to do shared object and library configuration shlib/Makefile.in - new directory and makefile to handle building shared versions of libreadline and libhistory, controlled by support/shobj-conf 5/7 --- doc/Makefile.in - set SHELL to /bin/sh, rather than relying on make to be correct 5/14 ---- savestring.c - new file, moved from shell.c, for backwards compatibility Makefile.in, shlib/Makefile.in - make sure savestring.c is compiled and added to libreadline and libhistory [THERE ARE NO MORE #ifdef SHELL LINES IN THE C SOURCE FILES.] 5/15 ---- README - updated description of shared library creation for the new scheme [THERE ARE NO MORE #ifdef SHELL LINES IN ANY OF THE SOURCE FILES.] Makefile.in - bumped SHLIB_MAJOR up to 4 since we've augmented the library API - rlconf.h is now one of the installed headers, so applications can find out whether things like vi-mode are available in the installed libreadline 5/20 ---- configure.in - changed RL_LIBRARY_VERSION to 4.0 to match the version of the installed shared libraries 6/5 --- rlstdc.h - new file Makefile.in - rlstdc.h is now one of the installed headers 8/3 --- shlib/Makefile.in - made the suffix rule that creates xx.so from xx.c write the compiler output to `a.o', which is then mv'd to xx.so, because some compilers (Sun WSpro 4.2, for example) don't allow any suffixes other than `.o' for `cc -c' (not even `a.out') 9/15 ---- Makefile.in - AR and ARFLAGS are now substituted by configure, used in recipes that build the libraries configure.in - use AC_CHECK_PROG to check for ar - set ARFLAGS if it has not already been set in the environment 10/5 ---- Makefile.in - removed savestring.o from object file list 10/28 ----- shlib/Makefile.in - don't use a fixed filename in the .c.so suffix rule to avoid problems with parallel makes 12/21 ----- support/shlib-install - new script to install shared readline and history libraries shlib/Makefile.in - changed to call shlib-install for install and uninstall targets [readline-4.0-beta1 frozen] 12/22 ----- configure.in - call AC_SUBST for SHOBJ_XLDFLAGS and SHLIB_LIBS shlib/Makefile.in - SHOBJ_XLDFLAGS and SHLIB_LIBS are now substituted by configure - add $(SHLIB_LIBS) at end of command line that builds the shared libraries (currently needed only by AIX 4.2) 12/31 ----- MANIFEST, MANIFEST.doc - the TOC html files are no longer generated and no longer part of the distribution 2/18/1999 --------- configure.in - set MAKE_SHELL to /bin/sh and substitute into the Makefiles Makefile.in,{doc,examples,shlib}/Makefile.in - set SHELL from @MAKE_SHELL@ [readline-4.0 released] 3/11 ---- doc/Makefile.in - removed references to HTMLTOC, since separate HTML table-of-contents files are no longer created examples/Makefile.in - remove `*.exe' in clean target for MS-DOS Makefile.in - make `readline' target depend on ./libreadline.a - configure now substitutes TERMCAP_LIB into Makefile.in - use ${TERMCAP_LIB} instead of -ltermcap in recipe for `readline' - clean target now removes readline and readline.exe in case they get built configure.in - use `pwd.exe' to set BUILD_DIR on MS-DOS DJGPP 3/15 ---- support/shlib-install - Irix 5.x and Irix 6.x should install shared libraries like Solaris 2 - changes for installing on hp-ux 1[01].x 3/23 ---- configure.in - make sure that the $CC argument to shobj-conf is quoted 4/8 --- xmalloc.h, rlprivate.h, rlshell.h - new files Makefile.in,shlib/Makefile.in - add dependencies on xmalloc.h, rlshell.h - add xmalloc.h, rlprivate.h, rlshell.h to list of header files MANIFEST - add xmalloc.h, rlprivate.h, rlshell.h 4/9 --- Makefile.in,shlib/Makefile.in - add dependencies on rlprivate.h 4/13 ---- doc/Makefile.in - add variable, PSDVI, which is the desired resolution of the generated postscript files. Set to 300 because I don't have any 600-dpi printers - set LANGUAGE= before calling makeinfo, so messages are in English - add rluserman.{info,dvi,ps,html} to appropriate variables - add rules to create rluserman.{info,dvi,ps,html} - install and uninstall rluserman.info, but don't update the directory file in $(infodir) yet MANIFEST - add doc/rluserman.{texinfo,info,dvi,ps,html} 4/30 ---- configure.in - updated library version to 4.1 5/3 --- configure.in - SHLIB_MAJOR and SHLIB_MINOR shared library version numbers are constructed from $LIBRARY_VERSION and substituted into Makefiles 5/5 --- support/shlib-install - OSF/1 installs shared libraries like Solaris Makefile.in - broke the header file install and uninstall into two new targets: install-headers and uninstall-headers - install and uninstall depend on install-headers and uninstall-headers respectively - changed install-shared and uninstall-shared targets to depend on install-headers and uninstall-headers, respectively, so users may choose to install only the shared libraries. I'm not sure about the uninstall one yet -- maybe it should check whether or not the static libraries are installed and not remove the header files if they are 9/3 --- configure.in, config.h.in - added test for memmove (for later use) - changed version to 4.1-beta1 9/13 ---- examples/rlfe.c - Per Bothner's `rlfe' readline front-end program examples/Makefile.in - added rules to build rlfe 9/21 ---- support/shlib-install - changes to handle FreeBSD-3.x elf or a.out shared libraries, which have different semantics and need different naming conventions 1/24/2000 --------- doc/Makefile.in - remove *.bt and *.bts on `make clean' 2/4 --- configure.in - changed LIBVERSION to 4.1-beta5 3/17/2000 --------- [readline-4.1 released] 3/23 ---- Makefile.in - remove the `-t' argument to ranlib in the install recipe; some ranlibs don't have it and attempt to create a file named `-t' 3/27 ---- support/shlib-install - install shared libraries unwritable by anyone on HP-UX - changed symlinks to relative pathnames on all platforms shlib/Makefile.in - added missing `includedir' assignment, substituted by configure Makefile.in - added missing @SET_MAKE@ so configure can set $MAKE appropriately configure.in - add call to AC_PROG_MAKE_SET 8/30 ---- shlib/Makefile.in - change the soname bound into the shared libraries, so it includes only the major version number. If it includes the minor version, programs depending on it must be rebuilt (which may or may not be a bad thing) 9/6 --- examples/rlfe.c - add -l option to log input and output (-a option appends to logfile) - add -n option to set readline application name - add -v, -h options for version and help information - change a few things because getopt() is now used to parse arguments 9/12 ---- support/shlib-install - fix up the libname on HPUX 11 10/18 ----- configure.in - changed library version to 4.2-alpha 10/30 ----- configure.in - add -fsigned-char to LOCAL_CFLAGS for Linux running on the IBM S/390 Makefile.in - added new file, rltypedefs.h, installed by default with `make install' 11/2 ---- compat.c - new file, with backwards-compatibility function definitions Makefile.in,shlib/Makefile.in - make sure that compat.o/compat.so are built and linked apppropriately support/shobj-conf - picked up bash version, which means that shared libs built on linux and BSD/OS 4.x will have an soname that does not include the minor version number 11/13 ----- examples/rlfe.c - rlfe can perform filename completion for relative pathnames in the inferior process's context if the OS supports /proc/PID/cwd (linux does it OK, Solaris is slightly warped, none of the BSDs have it) 11/17/2000 ---------- [readline-4.2-alpha released] 11/27 ----- Makefile.in,shlib/Makefile.in - added dependencies for rltypedefs.h shlib/Makefile.in - changed dependencies on histlib.h to $(topdir)/histlib.h 1/22 ---- configure.in - changed release version to 4.2-beta 2/2 --- examples/Makefile.in - build histexamp as part of the examples 2/5 --- doc/Makefile.in - don't remove the dvi, postscript, html, info, and text `objects' on a `make distclean', only on a `make maintainer-clean' 3/6 --- doc/history.{0,3}, doc/history_3.ps - new manual page for history library doc/Makefile.in - rules to install and uninstall history.3 in ${man3dir} - rules to build history.0 and history_3.ps 4/2 --- configure.in - changed LIBVERSION to `4.2' 4/5 --- [readline-4.2 frozen] 4/9 --- [readline-4.2 released] 5/2 --- Makefile.in,{doc,examples,shlib}/Makefile.in - added support for DESTDIR installation root prefix, to support building packages doc/Makefile.in - add an info `dir' file entry for rluserman.info on `make install' - change man1ext to `.1' and man3ext to `.3' - install man pages with a $(man3ext) extension in the target directory - add support for installing html documentation if `htmldir' has a value Makefile.in - on `make install', install from the `shlib' directory, too - on `make uninstall', uninstall in the `doc' and `shlib' subdirectories, too support/shlib-install - add `freebsdelf*', `freebsdaout*', Hurd, `sysv4*', `sysv5*', `dgux*' targets for symlink creation 5/7 --- configure.in, config.h.in - check for , define HAVE_LIMITS_H if found 5/8 --- aclocal.m4 - pick up change to BASH_CHECK_LIB_TERMCAP that adds check for libtinfo (termcap-specific portion of ncurses-5.2) 5/9 --- configure.in - call AC_C_CONST to find out whether or not the compiler supports `const' config.h.in - placeholder for `const' define, if any 5/10 ---- configure.in - fix AC_CHECK_PROG(ar, ...) test to specify right value for the case where ar is not found; should produce a better error message 5/14 ---- configure.in,config.h.in - check for vsnprintf, define HAVE_VSNPRINTF if found 5/21 ---- configure.in, config.h.in - add checks for size_t, ssize_t 5/30 ---- configure.in - update autoconf to version 2.50, use in AC_PREREQ - changed AC_INIT to new flavor - added AC_CONFIG_SRCDIR - AC_CONFIG_HEADER -> AC_CONFIG_HEADERS - call AC_C_PROTOTYPES - AC_RETSIGTYPE -> AC_TYPE_SIGNAL 8/22 ---- configure.in - updated the version number to 4.2a Makefile.in,shlib/Makefile.in - make sure tilde.o is built -DREADLINE_LIBRARY when being built as part of the standalone library, so it picks up the right include files 8/23 ---- support/shlib-install - support for Darwin/MacOS X shared library installation 9/24 ---- examples/readlinebuf.h - a new file, a C++ streambuf interface that uses readline for I/O. Donated by Dimitris Vyzovitis 10/9 ---- configure.in - replaced call to BASH_HAVE_TIOCGWINSZ with AC_HEADER_TIOCGWINSZ [readline-4.2a-beta1 frozen] 10/15 ----- configure.in, config.h.in - check for , define HAVE_MEMORY_H if found - check for , define HAVE_STRINGS_H if found 10/18 ----- configure.in, config.h.in - check for isascii, define HAVE_ISASCII if found configure.in - changed the macro names from bash as appropriate: BASH_SIGNAL_CHECK -> BASH_SYS_SIGNAL_VINTAGE BASH_REINSTALL_SIGHANDLERS -> BASH_SYS_REINSTALL_SIGHANDLERS BASH_MISC_SPEED_T -> BASH_CHECK_SPEED_T 10/22 ----- configure.in - check for isxdigit with AC_CHECK_FUNCS config.h.in - new define for HAVE_ISXDIGIT 10/29 ----- configure.in, config.h.in - check for strpbrk with AC_CHECK_FUNCS, define HAVE_STRPBRK if found 11/1 ---- Makefile.in - make sure DESTDIR is passed to install and uninstall makes in subdirectories - when saving old copies of installed libraries, make sure we use DESTDIR for the old installation tree [readline-4.2a-rc1 frozen] 11/2 ---- Makefile.in, shlib/Makefile.in - don't put -I$(includedir) into CFLAGS 11/15 ----- [readline-4.2a released] 11/20 ----- examples/rlcat.c - new file examples/Makefile.in - changes for rlcat 11/28 ----- configure.in - default TERMCAP_LIB to -lcurses if $prefer_curses == yes (as when --with-curses is supplied) examples/Makefile.in - substitute @LDFLAGS@ in LDFLAGS assignment 11/29 ----- config.h.in - add necessary defines for multibyte include files and functions - add code to define HANDLE_MULTIBYTE if prerequisites are met configure.in - call BASH_CHECK_MULTIBYTE 12/14 ----- config.h.in - add #undef PROTOTYPES, filled in by AC_C_PROTOTYPES 12/17 ----- config.h.in - moved HANDLE_MULTIBYTE code to rlmbutil.h rlmbutil.h, mbutil.c - new files Makefile.in, shlib/Makefile.in - added rules for mbutil.c 12/20 ----- configure.in - added --enable-shared, --enable-static options to configure to say which libraries are built by default (both default to yes) - if SHLIB_STATUS == 'unsupported', turn off default shared library building - substitute new STATIC_TARGET, SHARED_TARGET, STATIC_INSTALL_TARGET, and SHARED_INSTALL_TARGET Makefile.in - `all' target now depends on (substituted) @STATIC_TARGET@ and @SHARED_TARGET@ - `install' target now depends on (substituted) @STATIC_INSTALL_TARGET@ and @SHARED_INSTALL_TARGET@ INSTALL, README - updated with new info about --enable-shared and --enable-static 1/10/2002 --------- configure.in - bumped the library version number to 4.3 1/24 ---- Makefile.in,shlib/Makefile.in - changes for new file, text.c, with character and text handling functions from readline.c 2/20 ---- {configure.config.h}.in - call AC_C_CHAR_UNSIGNED, define __CHAR_UNSIGNED__ if chars are unsigned by default 5/20 ---- doc/Makefile.in - new maybe-clean target that removes the generated documentation if the build directory differs from the source directory - distclean target now depends on maybe-clean 7/17 ---- [readline-4.3 released] 7/18 ---- shlib/Makefile.in - fix bad dependency: text.so: terminal.c, make it depend on text.c 8/7 --- support/shlib-install - break `linux' out into its own stanza: it seems that linux distributions are all moving to the following scheme: libreadline.so.4.3 installed version libreadline.so.4 -> libreadline.so.4.3 symlink libreadline.so -> libreadline.so.4 symlink 10/29 ----- support/shlib-install - change INSTALL_LINK[12] to use `&&' instead of `;' so it only tries the link if the cd succeeds; put ${echo} in there, too - use $LN instead of `ln -s' so it works on machines without symlinks - change special linux stanza to use cd before ln also - change to use $INSTALL_LINK1 and $INSTALL_LINK2 appropriately instead of explicit commands in various stanzas 2/1 --- config.h.in - add HAVE_MBRTOWC and HAVE_MBRLEN - add NO_MULTIBYTE_SUPPORT for new configure argument - add STDC_HEADERS configure.in - new argument --enable-multibyte (enabled by default), allows multibyte support to be turned off even on systems that support it - add check for ansi stdc headers with call to AC_HEADER_STDC 2/3 --- configure.in - add call to BASH_FUNC_CTYPE_NONASCII config.h.in - add CTYPE_NON_ASCII 2/20 ---- doc/manvers.texinfo - renamed to version.texi to match other GNU software - UPDATE-MONTH variable is now `UPDATED-MONTH' doc/{hist,rlman,rluserman}.texinfo - include version.texi doc/{rltech,rluser,hstech,hsuser}.texi - changed the suffix from `texinfo' to `texi' doc/Makefile.in - made appropriate changes for {{rl,hs}tech,{rl,hs}user}.texi doc/{rlman,rluserman}.texinfo - changed the suffix from `texinfo' to `texi' doc/hist.texinfo - renamed to history.texi to be more consistent 6/11 ---- shlib/Makefile.in - have configure substitute value of `@LDFLAGS@' into the assignment to SHLIB_XLDFLAGS 6/16 ---- configure.in - readline and history libraries are now at version 5.0 8/18 ---- support/shlib-install - support for FreeBSD-gnu (from Robert Millan) 12/4 ---- Makefile.in - add variables for localedir and the PACKAGE_* variables, auto-set by configure 12/9 ---- Makefile.in - use mkinstalldirs instead of mkdirs 4/22 ---- Makefile.in - separate doc install/uninstall out into two new targets: install-doc and uninstall-doc - make install-doc and uninstall-doc prerequisites of appropriate install and uninstall targets examples/rl-fgets.c - new example from Harold Levy that wraps fgets replacement functions that call readline in a shared library that can be interposed with LD_PRELOAD 7/27 ---- [readline-5.0 released] 11/15 ----- examples/rlfe/{ChangeLog,Makefile.in,README,config.h.in,configure,configure.in,extern.h,os.h,pty.c,rlfe.c,screen.h} - new version of rlfe, rlfe-0.4, from Per Bothner; now a standalone application 11/16 ----- shlib/Makefile.in - substitute TERMCAP_LIB in from configure configure.in - if SHLIB_LIBS doesn't include a termcap library (curses, ncurses, termcap, termlib), append the value of $TERMCAP_LIB to it 11/30 ----- configure.in - take out change from 11/16; it doesn't work for some systems (e.g., SunOS 4.x and Solaris 2.6) - add support for --enable-purify configure argument - pass TERMCAP_LIB in environment when calling shobj-conf examples/Makefile.in - add support for building examples with purify 1/23/2005 --------- configure.in - set BUILD_DIR to contain backslashes to escape any spaces in the directory name -- this is what make will accept in targets and prerequisites, so it's better than trying to use double quotes 2/25 ---- configure.in - change check for sys/ptem.h to include sys/stream.h if present, to avoid the `present but cannot be compiled' messages on Solaris and SVR4.2 (does anyone still use SVR4.2?) 5/7 --- configure.in - add cross-compiling support from the bash configure.in, which cygwin and mingw have apparently adopted - add check for pwd.h, fcntl.h - add checks for fcntl, kill system calls - add checks for getpw{ent,nam,uid} C library functions - pass a compile-time option through to Makefiles if cross-compiling config.h.in - add HAVE_PWD_H for , HAVE_FCNTL_H for - add HAVE_FCNTL, HAVE_KILL for respective system calls - add HAVE_GETPW{ENT,NAM,UID} for passwd functions Makefile.in,shlib/Makefile.in - @CROSS_COMPILE@ is substituted into DEFS (equal to -DCROSS_COMPILING if bash is being cross-compiled) 8/2 --- examples/Makefile.in - use $(READLINE_LIB) instead of -lreadline to get around MacOS X 10.4's preference for (incompatible) shared libraries over static libraries in the load path 8/11 ---- support/shobj-conf - new variable: SHLIB_LIBPREF, prefix for shared library name (defaults to `lib' - new variable: SHLIB_DLLVERSION, used on Cygwin to set the library version number - new variable: SHLIB_DOT, separator character between library name and suffix and version information (defaults to `.') - new stanza for cygwin to generate windows-compatible dll support/shlib-install - add new option `-b bindir' for systems like cygwin/windows that require it - new stanza for cygwin that installs a dll into $bindir and an implied link library into $libdir configure.in - substitute new variables from shobj-conf shlib/Makefile.in - substitute bindir, SHLIB_DOT, SHLIB_LIBPREF, SHLIB_DLLVERSION from configure - pass `-b $(bindir)' to shlib-install for install and uninstall targets - library names now use $SHLIB_LIBPREF and $SHLIB_DOT INSTALL,README - document new SHLIB_DOT, SHLIB_LIBPREF, and SHLIB_DLLVERSION variables 10/4 ---- [readline-5.1-beta1 frozen] 12/1 ---- configure.in - changed release status to `release' [readline-5.1 frozen] 12/9 ---- [readline-5.1 released] 12/14 ----- examples/rlfe/Makefile.in - add @LIBS@ to LIBS assignment to pick up extra libraries from configure 1/3/2006 -------- support/shlib-install - Install shared libraries with execute bit set on Linux 6/9 --- [readline-5.2-alpha frozen] 6/26 ---- configure.in - set CROSS_COMPILE to the empty string by default, so we don't inherit a random value from the environment 7/8 --- [readline-5.2-alpha released] [readline-5.2-beta released] 9/12 ---- config.h.in - add defines for wcscoll, iswctype, iswupper, iswlower, towupper, towlower functions - replace define for wctomb with one for wcrtomb - add defines for wchar_t, wint_t, wctype_t types 10/11 ----- [readline-5.2 released] 11/9 ---- examples/rlfe/{configure.in,Makefile.in,config.h.in,rlfe.c,pty.c} - portability fixes from Mike Frysinger 11/21 ----- Makefile.in - add `install-examples' and `uninstall-examples' targets examples/Makefile.in - add correct variables to build examples on Windows - add appropriate rules to install and uninstall example sources in $(datadir)/readline 11/27 ----- config.h.in - move #undef of HAVE_STRCOLL out of config.h.in, since autoconf tries to substitute it based on configure tests 4/27/2007 --------- examples/autoconf - new directory with example autoconf macros to detect readline and return information about the installed version 6/13 ---- support/shlib-install - changes to support AIX 5.x shared library installation 3/20/2008 --------- support/shlib-install - add support for NetBSD and Interix shared library installation 4/22 ---- support/wcwidth.c - updated implementation from 2007-05 7/18 ---- support/shlib-install - support for mingw32, contributed by Carlo Bramix 8/4 --- configure.in - changed to readline-6.0 8/18 ---- support/config.{guess,sub} - updated to newer versions from autoconf-2.62 distribution 3/5/2009 -------- support/shlib-install - take a new -V host_vendor argument - add ${host_vendor} to string tested in case statement for symlink creation section - add support for FreeBSD/gentoo, which uses Linux library naming scheme - change FreeBSD symlink rules, since FreeBSD 7+ has only ELF shared libraries. DragonflyBSD rules are the same. Fix from Timothy Redaelli shlib/Makefile.in - add definition of host_vendor, substituted by configure - add -V host_vendor argument to all invocations of shlib-install. Fix from Timothy Redaelli 3/10 ---- configure.in - add call to AC_SYS_LARGEFILE for readdir and largefile support on Linux config.h.in - add _FILE_OFFSET_BITS define 4/19 ---- Makefile.in - add targets for making and installing documentation required by GNU coding standards. Fix from Joseph Myers posixselect.h - pick up from bash. Inspired by Mike Frysinger 10/28 ----- support/shlib-install - decrease the default version of FreeBSD that installs shared libraries to 4.x. Advice from Peter Jeremy 12/18 ----- [readline-6.1-rc1 released] 12/23 ----- doc/Makefile.in - make sure $(topdir) is not ".." before removing all of the formatted documentation in `make distclean'. $(topdir) is set to `..' if readline is being built in the source directory. Fixes problem noticed by THOUMIN Damien 12/29 ----- [readline-6.1 frozen] 2/5/2010 -------- examples/Makefile.in - make sure to install example C files using $(srcdir)/$$f in case we're building outside the source directory. Bug report and fix from Peter Breitenlohner 7/25 ---- xfree.c - new file with xfree() implementation, moved from xmalloc.c 12/28 ----- {examples,shlib}/Makefile.in - Cygwin-based changes from Eric Blake gdb-doc-7.6.2/readline/xmalloc.h0000644000175000017500000000261512250770610015462 0ustar zumbizumbi/* xmalloc.h -- memory allocation that aborts on errors. */ /* Copyright (C) 1999-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #if !defined (_XMALLOC_H_) #define _XMALLOC_H_ #if defined (READLINE_LIBRARY) # include "rlstdc.h" #else # include #endif #ifndef PTR_T #ifdef __STDC__ # define PTR_T void * #else # define PTR_T char * #endif #endif /* !PTR_T */ /* xmalloc and xrealloc should be also protected from RL_STATE_SIGHANDLER. */ #define xfree xfree_readline extern PTR_T xmalloc PARAMS((size_t)); extern PTR_T xrealloc PARAMS((void *, size_t)); extern void xfree PARAMS((void *)); #endif /* _XMALLOC_H_ */ gdb-doc-7.6.2/readline/patchlevel0000644000175000017500000000006112250770610015715 0ustar zumbizumbi# Do not edit -- exists only for use by patch 1 gdb-doc-7.6.2/readline/histsearch.c0000644000175000017500000001140012250770610016143 0ustar zumbizumbi/* histsearch.c -- searching the history list. */ /* Copyright (C) 1989, 1992-2009 Free Software Foundation, Inc. This file contains the GNU History Library (History), a set of routines for managing the text of previously typed lines. History 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 3 of the License, or (at your option) any later version. History 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 History. If not, see . */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include #endif #include #if defined (HAVE_STDLIB_H) # include #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #if defined (HAVE_UNISTD_H) # ifdef _MINIX # include # endif # include #endif #include "history.h" #include "histlib.h" /* The list of alternate characters that can delimit a history search string. */ char *history_search_delimiter_chars = (char *)NULL; static int history_search_internal PARAMS((const char *, int, int)); /* Search the history for STRING, starting at history_offset. If DIRECTION < 0, then the search is through previous entries, else through subsequent. If ANCHORED is non-zero, the string must appear at the beginning of a history line, otherwise, the string may appear anywhere in the line. If the string is found, then current_history () is the history entry, and the value of this function is the offset in the line of that history entry that the string was found in. Otherwise, nothing is changed, and a -1 is returned. */ static int history_search_internal (string, direction, anchored) const char *string; int direction, anchored; { register int i, reverse; register char *line; register int line_index; int string_len; HIST_ENTRY **the_history; /* local */ i = history_offset; reverse = (direction < 0); /* Take care of trivial cases first. */ if (string == 0 || *string == '\0') return (-1); if (!history_length || ((i >= history_length) && !reverse)) return (-1); if (reverse && (i >= history_length)) i = history_length - 1; #define NEXT_LINE() do { if (reverse) i--; else i++; } while (0) the_history = history_list (); string_len = strlen (string); while (1) { /* Search each line in the history list for STRING. */ /* At limit for direction? */ if ((reverse && i < 0) || (!reverse && i == history_length)) return (-1); line = the_history[i]->line; line_index = strlen (line); /* If STRING is longer than line, no match. */ if (string_len > line_index) { NEXT_LINE (); continue; } /* Handle anchored searches first. */ if (anchored == ANCHORED_SEARCH) { if (STREQN (string, line, string_len)) { history_offset = i; return (0); } NEXT_LINE (); continue; } /* Do substring search. */ if (reverse) { line_index -= string_len; while (line_index >= 0) { if (STREQN (string, line + line_index, string_len)) { history_offset = i; return (line_index); } line_index--; } } else { register int limit; limit = line_index - string_len + 1; line_index = 0; while (line_index < limit) { if (STREQN (string, line + line_index, string_len)) { history_offset = i; return (line_index); } line_index++; } } NEXT_LINE (); } } /* Do a non-anchored search for STRING through the history in DIRECTION. */ int history_search (string, direction) const char *string; int direction; { return (history_search_internal (string, direction, NON_ANCHORED_SEARCH)); } /* Do an anchored search for string through the history in DIRECTION. */ int history_search_prefix (string, direction) const char *string; int direction; { return (history_search_internal (string, direction, ANCHORED_SEARCH)); } /* Search for STRING in the history list. DIR is < 0 for searching backwards. POS is an absolute index into the history list at which point to begin searching. */ int history_search_pos (string, dir, pos) const char *string; int dir, pos; { int ret, old; old = where_history (); history_set_pos (pos); if (history_search (string, dir) == -1) { history_set_pos (old); return (-1); } ret = where_history (); history_set_pos (old); return ret; } gdb-doc-7.6.2/readline/mbutil.c0000644000175000017500000002142012250770610015305 0ustar zumbizumbi/* mbutil.c -- readline multibyte character utility functions */ /* Copyright (C) 2001-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include #endif #include #include #include "posixjmp.h" #if defined (HAVE_UNISTD_H) # include /* for _POSIX_VERSION */ #endif /* HAVE_UNISTD_H */ #if defined (HAVE_STDLIB_H) # include #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #include #include /* System-specific feature definitions and include files. */ #include "rldefs.h" #include "rlmbutil.h" #if defined (TIOCSTAT_IN_SYS_IOCTL) # include #endif /* TIOCSTAT_IN_SYS_IOCTL */ /* Some standard library routines. */ #include "readline.h" #include "rlprivate.h" #include "xmalloc.h" /* Declared here so it can be shared between the readline and history libraries. */ #if defined (HANDLE_MULTIBYTE) int rl_byte_oriented = 0; #else int rl_byte_oriented = 1; #endif /* **************************************************************** */ /* */ /* Multibyte Character Utility Functions */ /* */ /* **************************************************************** */ #if defined(HANDLE_MULTIBYTE) static int _rl_find_next_mbchar_internal (string, seed, count, find_non_zero) char *string; int seed, count, find_non_zero; { size_t tmp, len; mbstate_t ps; int point; wchar_t wc; tmp = 0; memset(&ps, 0, sizeof (mbstate_t)); if (seed < 0) seed = 0; if (count <= 0) return seed; point = seed + _rl_adjust_point (string, seed, &ps); /* if this is true, means that seed was not pointing to a byte indicating the beginning of a multibyte character. Correct the point and consume one char. */ if (seed < point) count--; while (count > 0) { len = strlen (string + point); if (len == 0) break; tmp = mbrtowc (&wc, string+point, len, &ps); if (MB_INVALIDCH ((size_t)tmp)) { /* invalid bytes. assume a byte represents a character */ point++; count--; /* reset states. */ memset(&ps, 0, sizeof(mbstate_t)); } else if (MB_NULLWCH (tmp)) break; /* found wide '\0' */ else { /* valid bytes */ point += tmp; if (find_non_zero) { if (wcwidth (wc) == 0) continue; else count--; } else count--; } } if (find_non_zero) { tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps); while (MB_NULLWCH (tmp) == 0 && MB_INVALIDCH (tmp) == 0 && wcwidth (wc) == 0) { point += tmp; tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps); } } return point; } static int _rl_find_prev_mbchar_internal (string, seed, find_non_zero) char *string; int seed, find_non_zero; { mbstate_t ps; int prev, non_zero_prev, point, length; size_t tmp; wchar_t wc; memset(&ps, 0, sizeof(mbstate_t)); length = strlen(string); if (seed < 0) return 0; else if (length < seed) return length; prev = non_zero_prev = point = 0; while (point < seed) { tmp = mbrtowc (&wc, string + point, length - point, &ps); if (MB_INVALIDCH ((size_t)tmp)) { /* in this case, bytes are invalid or shorted to compose multibyte char, so assume that the first byte represents a single character anyway. */ tmp = 1; /* clear the state of the byte sequence, because in this case effect of mbstate is undefined */ memset(&ps, 0, sizeof (mbstate_t)); /* Since we're assuming that this byte represents a single non-zero-width character, don't forget about it. */ prev = point; } else if (MB_NULLWCH (tmp)) break; /* Found '\0' char. Can this happen? */ else { if (find_non_zero) { if (wcwidth (wc) != 0) prev = point; } else prev = point; } point += tmp; } return prev; } /* return the number of bytes parsed from the multibyte sequence starting at src, if a non-L'\0' wide character was recognized. It returns 0, if a L'\0' wide character was recognized. It returns (size_t)(-1), if an invalid multibyte sequence was encountered. It returns (size_t)(-2) if it couldn't parse a complete multibyte character. */ int _rl_get_char_len (src, ps) char *src; mbstate_t *ps; { size_t tmp; tmp = mbrlen((const char *)src, (size_t)strlen (src), ps); if (tmp == (size_t)(-2)) { /* shorted to compose multibyte char */ if (ps) memset (ps, 0, sizeof(mbstate_t)); return -2; } else if (tmp == (size_t)(-1)) { /* invalid to compose multibyte char */ /* initialize the conversion state */ if (ps) memset (ps, 0, sizeof(mbstate_t)); return -1; } else if (tmp == (size_t)0) return 0; else return (int)tmp; } /* compare the specified two characters. If the characters matched, return 1. Otherwise return 0. */ int _rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2) char *buf1; int pos1; mbstate_t *ps1; char *buf2; int pos2; mbstate_t *ps2; { int i, w1, w2; if ((w1 = _rl_get_char_len (&buf1[pos1], ps1)) <= 0 || (w2 = _rl_get_char_len (&buf2[pos2], ps2)) <= 0 || (w1 != w2) || (buf1[pos1] != buf2[pos2])) return 0; for (i = 1; i < w1; i++) if (buf1[pos1+i] != buf2[pos2+i]) return 0; return 1; } /* adjust pointed byte and find mbstate of the point of string. adjusted point will be point <= adjusted_point, and returns differences of the byte(adjusted_point - point). if point is invalied (point < 0 || more than string length), it returns -1 */ int _rl_adjust_point(string, point, ps) char *string; int point; mbstate_t *ps; { size_t tmp = 0; int length; int pos = 0; length = strlen(string); if (point < 0) return -1; if (length < point) return -1; while (pos < point) { tmp = mbrlen (string + pos, length - pos, ps); if (MB_INVALIDCH ((size_t)tmp)) { /* in this case, bytes are invalid or shorted to compose multibyte char, so assume that the first byte represents a single character anyway. */ pos++; /* clear the state of the byte sequence, because in this case effect of mbstate is undefined */ if (ps) memset (ps, 0, sizeof (mbstate_t)); } else if (MB_NULLWCH (tmp)) pos++; else pos += tmp; } return (pos - point); } int _rl_is_mbchar_matched (string, seed, end, mbchar, length) char *string; int seed, end; char *mbchar; int length; { int i; if ((end - seed) < length) return 0; for (i = 0; i < length; i++) if (string[seed + i] != mbchar[i]) return 0; return 1; } wchar_t _rl_char_value (buf, ind) char *buf; int ind; { size_t tmp; wchar_t wc; mbstate_t ps; int l; if (MB_LEN_MAX == 1 || rl_byte_oriented) return ((wchar_t) buf[ind]); l = strlen (buf); if (ind >= l - 1) return ((wchar_t) buf[ind]); memset (&ps, 0, sizeof (mbstate_t)); tmp = mbrtowc (&wc, buf + ind, l - ind, &ps); if (MB_INVALIDCH (tmp) || MB_NULLWCH (tmp)) return ((wchar_t) buf[ind]); return wc; } #endif /* HANDLE_MULTIBYTE */ /* Find next `count' characters started byte point of the specified seed. If flags is MB_FIND_NONZERO, we look for non-zero-width multibyte characters. */ #undef _rl_find_next_mbchar int _rl_find_next_mbchar (string, seed, count, flags) char *string; int seed, count, flags; { #if defined (HANDLE_MULTIBYTE) return _rl_find_next_mbchar_internal (string, seed, count, flags); #else return (seed + count); #endif } /* Find previous character started byte point of the specified seed. Returned point will be point <= seed. If flags is MB_FIND_NONZERO, we look for non-zero-width multibyte characters. */ #undef _rl_find_prev_mbchar int _rl_find_prev_mbchar (string, seed, flags) char *string; int seed, flags; { #if defined (HANDLE_MULTIBYTE) return _rl_find_prev_mbchar_internal (string, seed, flags); #else return ((seed == 0) ? seed : seed - 1); #endif } gdb-doc-7.6.2/readline/USAGE0000644000175000017500000000375112250770610014443 0ustar zumbizumbiFrom rms@gnu.org Thu Jul 22 20:37:55 1999 Flags: 10 Return-Path: rms@gnu.org Received: from arthur.INS.CWRU.Edu (root@arthur.INS.CWRU.Edu [129.22.8.215]) by odin.INS.CWRU.Edu with ESMTP (8.8.6+cwru/CWRU-2.4-ins) id UAA25349; Thu, 22 Jul 1999 20:37:54 -0400 (EDT) (from rms@gnu.org for ) Received: from nike.ins.cwru.edu (root@nike.INS.CWRU.Edu [129.22.8.219]) by arthur.INS.CWRU.Edu with ESMTP (8.8.8+cwru/CWRU-3.6) id UAA05311; Thu, 22 Jul 1999 20:37:51 -0400 (EDT) (from rms@gnu.org for ) Received: from pele.santafe.edu (pele.santafe.edu [192.12.12.119]) by nike.ins.cwru.edu with ESMTP (8.8.7/CWRU-2.5-bsdi) id UAA13350; Thu, 22 Jul 1999 20:37:50 -0400 (EDT) (from rms@gnu.org for ) Received: from wijiji.santafe.edu (wijiji [192.12.12.5]) by pele.santafe.edu (8.9.1/8.9.1) with ESMTP id SAA10831 for ; Thu, 22 Jul 1999 18:37:47 -0600 (MDT) Received: (from rms@localhost) by wijiji.santafe.edu (8.9.1b+Sun/8.9.1) id SAA01089; Thu, 22 Jul 1999 18:37:46 -0600 (MDT) Date: Thu, 22 Jul 1999 18:37:46 -0600 (MDT) Message-Id: <199907230037.SAA01089@wijiji.santafe.edu> X-Authentication-Warning: wijiji.santafe.edu: rms set sender to rms@gnu.org using -f From: Richard Stallman To: chet@nike.ins.cwru.edu Subject: Use of Readline Reply-to: rms@gnu.org I think Allbery's suggestion is a good one. So please add this text in a suitable place. Please don't put it in the GPL itself; that should be the same as the GPL everywhere else. Putting it in the README and/or the documentation would be a good idea. ====================================================================== Our position on the use of Readline through a shared-library linking mechanism is that there is no legal difference between shared-library linking and static linking--either kind of linking combines various modules into a single larger work. The conditions for using Readline in a larger work are stated in section 3 of the GNU GPL. gdb-doc-7.6.2/readline/rldefs.h0000644000175000017500000001116412250770610015301 0ustar zumbizumbi/* rldefs.h -- an attempt to isolate some of the system-specific defines for readline. This should be included after any files that define system-specific constants like _POSIX_VERSION or USG. */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #if !defined (_RLDEFS_H_) #define _RLDEFS_H_ #if defined (HAVE_CONFIG_H) # include "config.h" #endif #include "rlstdc.h" #if defined (STRCOLL_BROKEN) # undef HAVE_STRCOLL #endif #if defined (_POSIX_VERSION) && !defined (TERMIOS_MISSING) # define TERMIOS_TTY_DRIVER #else # if defined (HAVE_TERMIO_H) # define TERMIO_TTY_DRIVER # else # if !defined (__MINGW32__) # define NEW_TTY_DRIVER # else # define NO_TTY_DRIVER # endif # endif #endif /* Posix macro to check file in statbuf for directory-ness. This requires that be included before this test. */ #if defined (S_IFDIR) && !defined (S_ISDIR) # define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) #endif /* Decide which flavor of the header file describing the C library string functions to include and include it. */ #if defined (HAVE_STRING_H) # include #else /* !HAVE_STRING_H */ # include #endif /* !HAVE_STRING_H */ #if !defined (strchr) && !defined (__STDC__) extern char *strchr (), *strrchr (); #endif /* !strchr && !__STDC__ */ #if defined (PREFER_STDARG) # include #else # if defined (PREFER_VARARGS) # include # endif #endif #if defined (HAVE_STRCASECMP) #define _rl_stricmp strcasecmp #define _rl_strnicmp strncasecmp #else extern int _rl_stricmp PARAMS((char *, char *)); extern int _rl_strnicmp PARAMS((char *, char *, int)); #endif #if defined (HAVE_STRPBRK) && !defined (HAVE_MULTIBYTE) # define _rl_strpbrk(a,b) strpbrk((a),(b)) #else extern char *_rl_strpbrk PARAMS((const char *, const char *)); #endif #if !defined (emacs_mode) # define no_mode -1 # define vi_mode 0 # define emacs_mode 1 #endif #if !defined (RL_IM_INSERT) # define RL_IM_INSERT 1 # define RL_IM_OVERWRITE 0 # # define RL_IM_DEFAULT RL_IM_INSERT #endif /* If you cast map[key].function to type (Keymap) on a Cray, the compiler takes the value of map[key].function and divides it by 4 to convert between pointer types (pointers to functions and pointers to structs are different sizes). This is not what is wanted. */ #if defined (CRAY) # define FUNCTION_TO_KEYMAP(map, key) (Keymap)((int)map[key].function) # define KEYMAP_TO_FUNCTION(data) (rl_command_func_t *)((int)(data)) #else # define FUNCTION_TO_KEYMAP(map, key) (Keymap)(map[key].function) # define KEYMAP_TO_FUNCTION(data) (rl_command_func_t *)(data) #endif #ifndef savestring #define savestring(x) strcpy ((char *)xmalloc (1 + strlen (x)), (x)) #endif /* Possible values for _rl_bell_preference. */ #define NO_BELL 0 #define AUDIBLE_BELL 1 #define VISIBLE_BELL 2 /* Definitions used when searching the line for characters. */ /* NOTE: it is necessary that opposite directions are inverses */ #define FTO 1 /* forward to */ #define BTO -1 /* backward to */ #define FFIND 2 /* forward find */ #define BFIND -2 /* backward find */ /* Possible values for the found_quote flags word used by the completion functions. It says what kind of (shell-like) quoting we found anywhere in the line. */ #define RL_QF_SINGLE_QUOTE 0x01 #define RL_QF_DOUBLE_QUOTE 0x02 #define RL_QF_BACKSLASH 0x04 #define RL_QF_OTHER_QUOTE 0x08 /* Default readline line buffer length. */ #define DEFAULT_BUFFER_SIZE 256 #if !defined (STREQ) #define STREQ(a, b) (((a)[0] == (b)[0]) && (strcmp ((a), (b)) == 0)) #define STREQN(a, b, n) (((n) == 0) ? (1) \ : ((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0)) #endif #if !defined (FREE) # define FREE(x) if (x) free (x) #endif #if !defined (SWAP) # define SWAP(s, e) do { int t; t = s; s = e; e = t; } while (0) #endif /* CONFIGURATION SECTION */ #include "rlconf.h" #endif /* !_RLDEFS_H_ */ gdb-doc-7.6.2/readline/vi_keymap.c0000644000175000017500000010725412250770610016007 0ustar zumbizumbi/* vi_keymap.c -- the keymap for vi_mode in readline (). */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #if !defined (BUFSIZ) #include #endif /* !BUFSIZ */ #include "readline.h" #if 0 extern KEYMAP_ENTRY_ARRAY vi_escape_keymap; #endif /* The keymap arrays for handling vi mode. */ KEYMAP_ENTRY_ARRAY vi_movement_keymap = { /* The regular control keys come first. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-a */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-b */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */ { ISFUNC, rl_vi_eof_maybe }, /* Control-d */ { ISFUNC, rl_emacs_editing_mode }, /* Control-e */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-f */ { ISFUNC, rl_abort }, /* Control-g */ { ISFUNC, rl_backward_char }, /* Control-h */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-i */ { ISFUNC, rl_newline }, /* Control-j */ { ISFUNC, rl_kill_line }, /* Control-k */ { ISFUNC, rl_clear_screen }, /* Control-l */ { ISFUNC, rl_newline }, /* Control-m */ { ISFUNC, rl_get_next_history }, /* Control-n */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */ { ISFUNC, rl_get_previous_history }, /* Control-p */ { ISFUNC, rl_quoted_insert }, /* Control-q */ { ISFUNC, rl_reverse_search_history }, /* Control-r */ { ISFUNC, rl_forward_search_history }, /* Control-s */ { ISFUNC, rl_transpose_chars }, /* Control-t */ { ISFUNC, rl_unix_line_discard }, /* Control-u */ { ISFUNC, rl_quoted_insert }, /* Control-v */ { ISFUNC, rl_unix_word_rubout }, /* Control-w */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-x */ { ISFUNC, rl_yank }, /* Control-y */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-[ */ /* vi_escape_keymap */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-] */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */ { ISFUNC, rl_vi_undo }, /* Control-_ */ /* The start of printing characters. */ { ISFUNC, rl_forward_char }, /* SPACE */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ! */ { ISFUNC, (rl_command_func_t *)0x0 }, /* " */ { ISFUNC, rl_insert_comment }, /* # */ { ISFUNC, rl_end_of_line }, /* $ */ { ISFUNC, rl_vi_match }, /* % */ { ISFUNC, rl_vi_tilde_expand }, /* & */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ' */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ( */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ) */ { ISFUNC, rl_vi_complete }, /* * */ { ISFUNC, rl_get_next_history}, /* + */ { ISFUNC, rl_vi_char_search }, /* , */ { ISFUNC, rl_get_previous_history }, /* - */ { ISFUNC, rl_vi_redo }, /* . */ { ISFUNC, rl_vi_search }, /* / */ /* Regular digits. */ { ISFUNC, rl_beg_of_line }, /* 0 */ { ISFUNC, rl_vi_arg_digit }, /* 1 */ { ISFUNC, rl_vi_arg_digit }, /* 2 */ { ISFUNC, rl_vi_arg_digit }, /* 3 */ { ISFUNC, rl_vi_arg_digit }, /* 4 */ { ISFUNC, rl_vi_arg_digit }, /* 5 */ { ISFUNC, rl_vi_arg_digit }, /* 6 */ { ISFUNC, rl_vi_arg_digit }, /* 7 */ { ISFUNC, rl_vi_arg_digit }, /* 8 */ { ISFUNC, rl_vi_arg_digit }, /* 9 */ /* A little more punctuation. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* : */ { ISFUNC, rl_vi_char_search }, /* ; */ { ISFUNC, (rl_command_func_t *)0x0 }, /* < */ { ISFUNC, rl_vi_complete }, /* = */ { ISFUNC, (rl_command_func_t *)0x0 }, /* > */ { ISFUNC, rl_vi_search }, /* ? */ { ISFUNC, (rl_command_func_t *)0x0 }, /* @ */ /* Uppercase alphabet. */ { ISFUNC, rl_vi_append_eol }, /* A */ { ISFUNC, rl_vi_prev_word}, /* B */ { ISFUNC, rl_vi_change_to }, /* C */ { ISFUNC, rl_vi_delete_to }, /* D */ { ISFUNC, rl_vi_end_word }, /* E */ { ISFUNC, rl_vi_char_search }, /* F */ { ISFUNC, rl_vi_fetch_history }, /* G */ { ISFUNC, (rl_command_func_t *)0x0 }, /* H */ { ISFUNC, rl_vi_insert_beg }, /* I */ { ISFUNC, (rl_command_func_t *)0x0 }, /* J */ { ISFUNC, (rl_command_func_t *)0x0 }, /* K */ { ISFUNC, (rl_command_func_t *)0x0 }, /* L */ { ISFUNC, (rl_command_func_t *)0x0 }, /* M */ { ISFUNC, rl_vi_search_again }, /* N */ { ISFUNC, (rl_command_func_t *)0x0 }, /* O */ { ISFUNC, rl_vi_put }, /* P */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Q */ { ISFUNC, rl_vi_replace }, /* R */ { ISFUNC, rl_vi_subst }, /* S */ { ISFUNC, rl_vi_char_search }, /* T */ { ISFUNC, rl_revert_line }, /* U */ { ISFUNC, (rl_command_func_t *)0x0 }, /* V */ { ISFUNC, rl_vi_next_word }, /* W */ { ISFUNC, rl_vi_rubout }, /* X */ { ISFUNC, rl_vi_yank_to }, /* Y */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Z */ /* Some more punctuation. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* [ */ { ISFUNC, rl_vi_complete }, /* \ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ] */ { ISFUNC, rl_vi_first_print }, /* ^ */ { ISFUNC, rl_vi_yank_arg }, /* _ */ { ISFUNC, rl_vi_goto_mark }, /* ` */ /* Lowercase alphabet. */ { ISFUNC, rl_vi_append_mode }, /* a */ { ISFUNC, rl_vi_prev_word }, /* b */ { ISFUNC, rl_vi_change_to }, /* c */ { ISFUNC, rl_vi_delete_to }, /* d */ { ISFUNC, rl_vi_end_word }, /* e */ { ISFUNC, rl_vi_char_search }, /* f */ { ISFUNC, (rl_command_func_t *)0x0 }, /* g */ { ISFUNC, rl_backward_char }, /* h */ { ISFUNC, rl_vi_insert_mode }, /* i */ { ISFUNC, rl_get_next_history }, /* j */ { ISFUNC, rl_get_previous_history }, /* k */ { ISFUNC, rl_forward_char }, /* l */ { ISFUNC, rl_vi_set_mark }, /* m */ { ISFUNC, rl_vi_search_again }, /* n */ { ISFUNC, (rl_command_func_t *)0x0 }, /* o */ { ISFUNC, rl_vi_put }, /* p */ { ISFUNC, (rl_command_func_t *)0x0 }, /* q */ { ISFUNC, rl_vi_change_char }, /* r */ { ISFUNC, rl_vi_subst }, /* s */ { ISFUNC, rl_vi_char_search }, /* t */ { ISFUNC, rl_vi_undo }, /* u */ { ISFUNC, (rl_command_func_t *)0x0 }, /* v */ { ISFUNC, rl_vi_next_word }, /* w */ { ISFUNC, rl_vi_delete }, /* x */ { ISFUNC, rl_vi_yank_to }, /* y */ { ISFUNC, (rl_command_func_t *)0x0 }, /* z */ /* Final punctuation. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* { */ { ISFUNC, rl_vi_column }, /* | */ { ISFUNC, (rl_command_func_t *)0x0 }, /* } */ { ISFUNC, rl_vi_change_case }, /* ~ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* RUBOUT */ #if KEYMAP_SIZE > 128 /* Undefined keys. */ { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 } #endif /* KEYMAP_SIZE > 128 */ }; KEYMAP_ENTRY_ARRAY vi_insertion_keymap = { /* The regular control keys come first. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */ { ISFUNC, rl_insert }, /* Control-a */ { ISFUNC, rl_insert }, /* Control-b */ { ISFUNC, rl_insert }, /* Control-c */ { ISFUNC, rl_vi_eof_maybe }, /* Control-d */ { ISFUNC, rl_insert }, /* Control-e */ { ISFUNC, rl_insert }, /* Control-f */ { ISFUNC, rl_insert }, /* Control-g */ { ISFUNC, rl_rubout }, /* Control-h */ { ISFUNC, rl_complete }, /* Control-i */ { ISFUNC, rl_newline }, /* Control-j */ { ISFUNC, rl_insert }, /* Control-k */ { ISFUNC, rl_insert }, /* Control-l */ { ISFUNC, rl_newline }, /* Control-m */ { ISFUNC, rl_menu_complete}, /* Control-n */ { ISFUNC, rl_insert }, /* Control-o */ { ISFUNC, rl_backward_menu_complete }, /* Control-p */ { ISFUNC, rl_insert }, /* Control-q */ { ISFUNC, rl_reverse_search_history }, /* Control-r */ { ISFUNC, rl_forward_search_history }, /* Control-s */ { ISFUNC, rl_transpose_chars }, /* Control-t */ { ISFUNC, rl_unix_line_discard }, /* Control-u */ { ISFUNC, rl_quoted_insert }, /* Control-v */ { ISFUNC, rl_unix_word_rubout }, /* Control-w */ { ISFUNC, rl_insert }, /* Control-x */ { ISFUNC, rl_yank }, /* Control-y */ { ISFUNC, rl_insert }, /* Control-z */ { ISFUNC, rl_vi_movement_mode }, /* Control-[ */ { ISFUNC, rl_insert }, /* Control-\ */ { ISFUNC, rl_insert }, /* Control-] */ { ISFUNC, rl_insert }, /* Control-^ */ { ISFUNC, rl_vi_undo }, /* Control-_ */ /* The start of printing characters. */ { ISFUNC, rl_insert }, /* SPACE */ { ISFUNC, rl_insert }, /* ! */ { ISFUNC, rl_insert }, /* " */ { ISFUNC, rl_insert }, /* # */ { ISFUNC, rl_insert }, /* $ */ { ISFUNC, rl_insert }, /* % */ { ISFUNC, rl_insert }, /* & */ { ISFUNC, rl_insert }, /* ' */ { ISFUNC, rl_insert }, /* ( */ { ISFUNC, rl_insert }, /* ) */ { ISFUNC, rl_insert }, /* * */ { ISFUNC, rl_insert }, /* + */ { ISFUNC, rl_insert }, /* , */ { ISFUNC, rl_insert }, /* - */ { ISFUNC, rl_insert }, /* . */ { ISFUNC, rl_insert }, /* / */ /* Regular digits. */ { ISFUNC, rl_insert }, /* 0 */ { ISFUNC, rl_insert }, /* 1 */ { ISFUNC, rl_insert }, /* 2 */ { ISFUNC, rl_insert }, /* 3 */ { ISFUNC, rl_insert }, /* 4 */ { ISFUNC, rl_insert }, /* 5 */ { ISFUNC, rl_insert }, /* 6 */ { ISFUNC, rl_insert }, /* 7 */ { ISFUNC, rl_insert }, /* 8 */ { ISFUNC, rl_insert }, /* 9 */ /* A little more punctuation. */ { ISFUNC, rl_insert }, /* : */ { ISFUNC, rl_insert }, /* ; */ { ISFUNC, rl_insert }, /* < */ { ISFUNC, rl_insert }, /* = */ { ISFUNC, rl_insert }, /* > */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* @ */ /* Uppercase alphabet. */ { ISFUNC, rl_insert }, /* A */ { ISFUNC, rl_insert }, /* B */ { ISFUNC, rl_insert }, /* C */ { ISFUNC, rl_insert }, /* D */ { ISFUNC, rl_insert }, /* E */ { ISFUNC, rl_insert }, /* F */ { ISFUNC, rl_insert }, /* G */ { ISFUNC, rl_insert }, /* H */ { ISFUNC, rl_insert }, /* I */ { ISFUNC, rl_insert }, /* J */ { ISFUNC, rl_insert }, /* K */ { ISFUNC, rl_insert }, /* L */ { ISFUNC, rl_insert }, /* M */ { ISFUNC, rl_insert }, /* N */ { ISFUNC, rl_insert }, /* O */ { ISFUNC, rl_insert }, /* P */ { ISFUNC, rl_insert }, /* Q */ { ISFUNC, rl_insert }, /* R */ { ISFUNC, rl_insert }, /* S */ { ISFUNC, rl_insert }, /* T */ { ISFUNC, rl_insert }, /* U */ { ISFUNC, rl_insert }, /* V */ { ISFUNC, rl_insert }, /* W */ { ISFUNC, rl_insert }, /* X */ { ISFUNC, rl_insert }, /* Y */ { ISFUNC, rl_insert }, /* Z */ /* Some more punctuation. */ { ISFUNC, rl_insert }, /* [ */ { ISFUNC, rl_insert }, /* \ */ { ISFUNC, rl_insert }, /* ] */ { ISFUNC, rl_insert }, /* ^ */ { ISFUNC, rl_insert }, /* _ */ { ISFUNC, rl_insert }, /* ` */ /* Lowercase alphabet. */ { ISFUNC, rl_insert }, /* a */ { ISFUNC, rl_insert }, /* b */ { ISFUNC, rl_insert }, /* c */ { ISFUNC, rl_insert }, /* d */ { ISFUNC, rl_insert }, /* e */ { ISFUNC, rl_insert }, /* f */ { ISFUNC, rl_insert }, /* g */ { ISFUNC, rl_insert }, /* h */ { ISFUNC, rl_insert }, /* i */ { ISFUNC, rl_insert }, /* j */ { ISFUNC, rl_insert }, /* k */ { ISFUNC, rl_insert }, /* l */ { ISFUNC, rl_insert }, /* m */ { ISFUNC, rl_insert }, /* n */ { ISFUNC, rl_insert }, /* o */ { ISFUNC, rl_insert }, /* p */ { ISFUNC, rl_insert }, /* q */ { ISFUNC, rl_insert }, /* r */ { ISFUNC, rl_insert }, /* s */ { ISFUNC, rl_insert }, /* t */ { ISFUNC, rl_insert }, /* u */ { ISFUNC, rl_insert }, /* v */ { ISFUNC, rl_insert }, /* w */ { ISFUNC, rl_insert }, /* x */ { ISFUNC, rl_insert }, /* y */ { ISFUNC, rl_insert }, /* z */ /* Final punctuation. */ { ISFUNC, rl_insert }, /* { */ { ISFUNC, rl_insert }, /* | */ { ISFUNC, rl_insert }, /* } */ { ISFUNC, rl_insert }, /* ~ */ { ISFUNC, rl_rubout }, /* RUBOUT */ #if KEYMAP_SIZE > 128 /* Pure 8-bit characters (128 - 159). These might be used in some character sets. */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ /* ISO Latin-1 characters (160 - 255) */ { ISFUNC, rl_insert }, /* No-break space */ { ISFUNC, rl_insert }, /* Inverted exclamation mark */ { ISFUNC, rl_insert }, /* Cent sign */ { ISFUNC, rl_insert }, /* Pound sign */ { ISFUNC, rl_insert }, /* Currency sign */ { ISFUNC, rl_insert }, /* Yen sign */ { ISFUNC, rl_insert }, /* Broken bar */ { ISFUNC, rl_insert }, /* Section sign */ { ISFUNC, rl_insert }, /* Diaeresis */ { ISFUNC, rl_insert }, /* Copyright sign */ { ISFUNC, rl_insert }, /* Feminine ordinal indicator */ { ISFUNC, rl_insert }, /* Left pointing double angle quotation mark */ { ISFUNC, rl_insert }, /* Not sign */ { ISFUNC, rl_insert }, /* Soft hyphen */ { ISFUNC, rl_insert }, /* Registered sign */ { ISFUNC, rl_insert }, /* Macron */ { ISFUNC, rl_insert }, /* Degree sign */ { ISFUNC, rl_insert }, /* Plus-minus sign */ { ISFUNC, rl_insert }, /* Superscript two */ { ISFUNC, rl_insert }, /* Superscript three */ { ISFUNC, rl_insert }, /* Acute accent */ { ISFUNC, rl_insert }, /* Micro sign */ { ISFUNC, rl_insert }, /* Pilcrow sign */ { ISFUNC, rl_insert }, /* Middle dot */ { ISFUNC, rl_insert }, /* Cedilla */ { ISFUNC, rl_insert }, /* Superscript one */ { ISFUNC, rl_insert }, /* Masculine ordinal indicator */ { ISFUNC, rl_insert }, /* Right pointing double angle quotation mark */ { ISFUNC, rl_insert }, /* Vulgar fraction one quarter */ { ISFUNC, rl_insert }, /* Vulgar fraction one half */ { ISFUNC, rl_insert }, /* Vulgar fraction three quarters */ { ISFUNC, rl_insert }, /* Inverted questionk mark */ { ISFUNC, rl_insert }, /* Latin capital letter a with grave */ { ISFUNC, rl_insert }, /* Latin capital letter a with acute */ { ISFUNC, rl_insert }, /* Latin capital letter a with circumflex */ { ISFUNC, rl_insert }, /* Latin capital letter a with tilde */ { ISFUNC, rl_insert }, /* Latin capital letter a with diaeresis */ { ISFUNC, rl_insert }, /* Latin capital letter a with ring above */ { ISFUNC, rl_insert }, /* Latin capital letter ae */ { ISFUNC, rl_insert }, /* Latin capital letter c with cedilla */ { ISFUNC, rl_insert }, /* Latin capital letter e with grave */ { ISFUNC, rl_insert }, /* Latin capital letter e with acute */ { ISFUNC, rl_insert }, /* Latin capital letter e with circumflex */ { ISFUNC, rl_insert }, /* Latin capital letter e with diaeresis */ { ISFUNC, rl_insert }, /* Latin capital letter i with grave */ { ISFUNC, rl_insert }, /* Latin capital letter i with acute */ { ISFUNC, rl_insert }, /* Latin capital letter i with circumflex */ { ISFUNC, rl_insert }, /* Latin capital letter i with diaeresis */ { ISFUNC, rl_insert }, /* Latin capital letter eth (Icelandic) */ { ISFUNC, rl_insert }, /* Latin capital letter n with tilde */ { ISFUNC, rl_insert }, /* Latin capital letter o with grave */ { ISFUNC, rl_insert }, /* Latin capital letter o with acute */ { ISFUNC, rl_insert }, /* Latin capital letter o with circumflex */ { ISFUNC, rl_insert }, /* Latin capital letter o with tilde */ { ISFUNC, rl_insert }, /* Latin capital letter o with diaeresis */ { ISFUNC, rl_insert }, /* Multiplication sign */ { ISFUNC, rl_insert }, /* Latin capital letter o with stroke */ { ISFUNC, rl_insert }, /* Latin capital letter u with grave */ { ISFUNC, rl_insert }, /* Latin capital letter u with acute */ { ISFUNC, rl_insert }, /* Latin capital letter u with circumflex */ { ISFUNC, rl_insert }, /* Latin capital letter u with diaeresis */ { ISFUNC, rl_insert }, /* Latin capital letter Y with acute */ { ISFUNC, rl_insert }, /* Latin capital letter thorn (Icelandic) */ { ISFUNC, rl_insert }, /* Latin small letter sharp s (German) */ { ISFUNC, rl_insert }, /* Latin small letter a with grave */ { ISFUNC, rl_insert }, /* Latin small letter a with acute */ { ISFUNC, rl_insert }, /* Latin small letter a with circumflex */ { ISFUNC, rl_insert }, /* Latin small letter a with tilde */ { ISFUNC, rl_insert }, /* Latin small letter a with diaeresis */ { ISFUNC, rl_insert }, /* Latin small letter a with ring above */ { ISFUNC, rl_insert }, /* Latin small letter ae */ { ISFUNC, rl_insert }, /* Latin small letter c with cedilla */ { ISFUNC, rl_insert }, /* Latin small letter e with grave */ { ISFUNC, rl_insert }, /* Latin small letter e with acute */ { ISFUNC, rl_insert }, /* Latin small letter e with circumflex */ { ISFUNC, rl_insert }, /* Latin small letter e with diaeresis */ { ISFUNC, rl_insert }, /* Latin small letter i with grave */ { ISFUNC, rl_insert }, /* Latin small letter i with acute */ { ISFUNC, rl_insert }, /* Latin small letter i with circumflex */ { ISFUNC, rl_insert }, /* Latin small letter i with diaeresis */ { ISFUNC, rl_insert }, /* Latin small letter eth (Icelandic) */ { ISFUNC, rl_insert }, /* Latin small letter n with tilde */ { ISFUNC, rl_insert }, /* Latin small letter o with grave */ { ISFUNC, rl_insert }, /* Latin small letter o with acute */ { ISFUNC, rl_insert }, /* Latin small letter o with circumflex */ { ISFUNC, rl_insert }, /* Latin small letter o with tilde */ { ISFUNC, rl_insert }, /* Latin small letter o with diaeresis */ { ISFUNC, rl_insert }, /* Division sign */ { ISFUNC, rl_insert }, /* Latin small letter o with stroke */ { ISFUNC, rl_insert }, /* Latin small letter u with grave */ { ISFUNC, rl_insert }, /* Latin small letter u with acute */ { ISFUNC, rl_insert }, /* Latin small letter u with circumflex */ { ISFUNC, rl_insert }, /* Latin small letter u with diaeresis */ { ISFUNC, rl_insert }, /* Latin small letter y with acute */ { ISFUNC, rl_insert }, /* Latin small letter thorn (Icelandic) */ { ISFUNC, rl_insert } /* Latin small letter y with diaeresis */ #endif /* KEYMAP_SIZE > 128 */ }; /* Unused for the time being. */ #if 0 KEYMAP_ENTRY_ARRAY vi_escape_keymap = { /* The regular control keys come first. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-a */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-b */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-d */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-e */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-f */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-g */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-h */ { ISFUNC, rl_tab_insert}, /* Control-i */ { ISFUNC, rl_emacs_editing_mode}, /* Control-j */ { ISFUNC, rl_kill_line }, /* Control-k */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-l */ { ISFUNC, rl_emacs_editing_mode}, /* Control-m */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-n */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-p */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-q */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-r */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-s */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-t */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-u */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-v */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-w */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-x */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-y */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */ { ISFUNC, rl_vi_movement_mode }, /* Control-[ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-] */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */ { ISFUNC, rl_vi_undo }, /* Control-_ */ /* The start of printing characters. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* SPACE */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ! */ { ISFUNC, (rl_command_func_t *)0x0 }, /* " */ { ISFUNC, (rl_command_func_t *)0x0 }, /* # */ { ISFUNC, (rl_command_func_t *)0x0 }, /* $ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* % */ { ISFUNC, (rl_command_func_t *)0x0 }, /* & */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ' */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ( */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ) */ { ISFUNC, (rl_command_func_t *)0x0 }, /* * */ { ISFUNC, (rl_command_func_t *)0x0 }, /* + */ { ISFUNC, (rl_command_func_t *)0x0 }, /* , */ { ISFUNC, (rl_command_func_t *)0x0 }, /* - */ { ISFUNC, (rl_command_func_t *)0x0 }, /* . */ { ISFUNC, (rl_command_func_t *)0x0 }, /* / */ /* Regular digits. */ { ISFUNC, rl_vi_arg_digit }, /* 0 */ { ISFUNC, rl_vi_arg_digit }, /* 1 */ { ISFUNC, rl_vi_arg_digit }, /* 2 */ { ISFUNC, rl_vi_arg_digit }, /* 3 */ { ISFUNC, rl_vi_arg_digit }, /* 4 */ { ISFUNC, rl_vi_arg_digit }, /* 5 */ { ISFUNC, rl_vi_arg_digit }, /* 6 */ { ISFUNC, rl_vi_arg_digit }, /* 7 */ { ISFUNC, rl_vi_arg_digit }, /* 8 */ { ISFUNC, rl_vi_arg_digit }, /* 9 */ /* A little more punctuation. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* : */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ; */ { ISFUNC, (rl_command_func_t *)0x0 }, /* < */ { ISFUNC, (rl_command_func_t *)0x0 }, /* = */ { ISFUNC, (rl_command_func_t *)0x0 }, /* > */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ? */ { ISFUNC, (rl_command_func_t *)0x0 }, /* @ */ /* Uppercase alphabet. */ { ISFUNC, rl_do_lowercase_version }, /* A */ { ISFUNC, rl_do_lowercase_version }, /* B */ { ISFUNC, rl_do_lowercase_version }, /* C */ { ISFUNC, rl_do_lowercase_version }, /* D */ { ISFUNC, rl_do_lowercase_version }, /* E */ { ISFUNC, rl_do_lowercase_version }, /* F */ { ISFUNC, rl_do_lowercase_version }, /* G */ { ISFUNC, rl_do_lowercase_version }, /* H */ { ISFUNC, rl_do_lowercase_version }, /* I */ { ISFUNC, rl_do_lowercase_version }, /* J */ { ISFUNC, rl_do_lowercase_version }, /* K */ { ISFUNC, rl_do_lowercase_version }, /* L */ { ISFUNC, rl_do_lowercase_version }, /* M */ { ISFUNC, rl_do_lowercase_version }, /* N */ { ISFUNC, rl_do_lowercase_version }, /* O */ { ISFUNC, rl_do_lowercase_version }, /* P */ { ISFUNC, rl_do_lowercase_version }, /* Q */ { ISFUNC, rl_do_lowercase_version }, /* R */ { ISFUNC, rl_do_lowercase_version }, /* S */ { ISFUNC, rl_do_lowercase_version }, /* T */ { ISFUNC, rl_do_lowercase_version }, /* U */ { ISFUNC, rl_do_lowercase_version }, /* V */ { ISFUNC, rl_do_lowercase_version }, /* W */ { ISFUNC, rl_do_lowercase_version }, /* X */ { ISFUNC, rl_do_lowercase_version }, /* Y */ { ISFUNC, rl_do_lowercase_version }, /* Z */ /* Some more punctuation. */ { ISFUNC, rl_arrow_keys }, /* [ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* \ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ] */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ^ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* _ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ` */ /* Lowercase alphabet. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* a */ { ISFUNC, (rl_command_func_t *)0x0 }, /* b */ { ISFUNC, (rl_command_func_t *)0x0 }, /* c */ { ISFUNC, (rl_command_func_t *)0x0 }, /* d */ { ISFUNC, (rl_command_func_t *)0x0 }, /* e */ { ISFUNC, (rl_command_func_t *)0x0 }, /* f */ { ISFUNC, (rl_command_func_t *)0x0 }, /* g */ { ISFUNC, (rl_command_func_t *)0x0 }, /* h */ { ISFUNC, (rl_command_func_t *)0x0 }, /* i */ { ISFUNC, (rl_command_func_t *)0x0 }, /* j */ { ISFUNC, (rl_command_func_t *)0x0 }, /* k */ { ISFUNC, (rl_command_func_t *)0x0 }, /* l */ { ISFUNC, (rl_command_func_t *)0x0 }, /* m */ { ISFUNC, (rl_command_func_t *)0x0 }, /* n */ { ISFUNC, rl_arrow_keys }, /* o */ { ISFUNC, (rl_command_func_t *)0x0 }, /* p */ { ISFUNC, (rl_command_func_t *)0x0 }, /* q */ { ISFUNC, (rl_command_func_t *)0x0 }, /* r */ { ISFUNC, (rl_command_func_t *)0x0 }, /* s */ { ISFUNC, (rl_command_func_t *)0x0 }, /* t */ { ISFUNC, (rl_command_func_t *)0x0 }, /* u */ { ISFUNC, (rl_command_func_t *)0x0 }, /* v */ { ISFUNC, (rl_command_func_t *)0x0 }, /* w */ { ISFUNC, (rl_command_func_t *)0x0 }, /* x */ { ISFUNC, (rl_command_func_t *)0x0 }, /* y */ { ISFUNC, (rl_command_func_t *)0x0 }, /* z */ /* Final punctuation. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* { */ { ISFUNC, (rl_command_func_t *)0x0 }, /* | */ { ISFUNC, (rl_command_func_t *)0x0 }, /* } */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ~ */ { ISFUNC, rl_backward_kill_word }, /* RUBOUT */ #if KEYMAP_SIZE > 128 /* Undefined keys. */ { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 } #endif /* KEYMAP_SIZE > 128 */ }; #endif gdb-doc-7.6.2/readline/rlconf.h0000644000175000017500000000421512250770610015304 0ustar zumbizumbi/* rlconf.h -- readline configuration definitions */ /* Copyright (C) 1992-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #if !defined (_RLCONF_H_) #define _RLCONF_H_ /* Define this if you want the vi-mode editing available. */ #define VI_MODE /* Define this to get an indication of file type when listing completions. */ #define VISIBLE_STATS /* This definition is needed by readline.c, rltty.c, and signals.c. */ /* If on, then readline handles signals in a way that doesn't screw. */ #define HANDLE_SIGNALS /* Ugly but working hack for binding prefix meta. */ #define PREFIX_META_HACK /* The next-to-last-ditch effort file name for a user-specific init file. */ #define DEFAULT_INPUTRC "~/.inputrc" /* The ultimate last-ditch filenname for an init file -- system-wide. */ #define SYS_INPUTRC "/etc/inputrc" /* If defined, expand tabs to spaces. */ #define DISPLAY_TABS /* If defined, use the terminal escape sequence to move the cursor forward over a character when updating the line rather than rewriting it. */ /* #define HACK_TERMCAP_MOTION */ /* The string inserted by the `insert comment' command. */ #define RL_COMMENT_BEGIN_DEFAULT "#" /* Define this if you want code that allows readline to be used in an X `callback' style. */ #define READLINE_CALLBACKS /* Define this if you want the cursor to indicate insert or overwrite mode. */ /* #define CURSOR_MODE */ #endif /* _RLCONF_H_ */ gdb-doc-7.6.2/readline/configure0000755000175000017500000063136112250773212015570 0ustar zumbizumbi#! /bin/sh # From configure.in for Readline 6.2, version 2.67. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.64 for readline 6.2. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software # Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: bug-readline@gnu.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='readline' PACKAGE_TARNAME='readline' PACKAGE_VERSION='6.2' PACKAGE_STRING='readline 6.2' PACKAGE_BUGREPORT='bug-readline@gnu.org' PACKAGE_URL='' ac_unique_file="readline.h" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS TERMCAP_LIB LIBVERSION ARFLAGS LOCAL_DEFS LOCAL_LDFLAGS LOCAL_CFLAGS BUILD_DIR PURIFY SHARED_INSTALL_TARGET STATIC_INSTALL_TARGET SHARED_TARGET STATIC_TARGET SHLIB_MINOR SHLIB_MAJOR SHLIB_LIBS SHLIB_DLLVERSION SHLIB_LIBVERSION SHLIB_LIBSUFF SHLIB_LIBPREF SHLIB_DOT SHLIB_XLDFLAGS SHLIB_STATUS SHOBJ_STATUS SHOBJ_LIBS SHOBJ_XLDFLAGS SHOBJ_LDFLAGS SHOBJ_LD SHOBJ_CFLAGS SHOBJ_CC LIBOBJS MAKE_SHELL RANLIB AR INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM EGREP GREP CPP OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC SET_MAKE CROSS_COMPILE host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking with_curses with_purify enable_multibyte enable_static enable_largefile ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error "unrecognized option: \`$ac_option' Try \`$0 --help' for more information." ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures readline 6.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/readline] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of readline 6.2:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-multibyte enable multibyte characters if OS supports them --enable-static build static libraries [default=YES] --disable-largefile omit support for large files Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-curses use the curses library instead of the termcap library --with-purify configure to postprocess with purify Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF readline configure 6.2 generated by GNU Autoconf 2.64 Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( cat <<\_ASBOX ## ----------------------------------- ## ## Report this to bug-readline@gnu.org ## ## ----------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_type # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} return $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by readline $as_me 6.2, which was generated by GNU Autoconf 2.64. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in `cd $srcdir;pwd`/.. "$srcdir"/`cd $srcdir;pwd`/..; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then as_fn_error "cannot find install-sh, install.sh, or shtool in \`cd $srcdir;pwd\`/.. \"$srcdir\"/\`cd $srcdir;pwd\`/.." "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ac_config_headers="$ac_config_headers config.h" LIBVERSION=6.2 # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac opt_curses=no opt_purify=no # Check whether --with-curses was given. if test "${with_curses+set}" = set; then : withval=$with_curses; opt_curses=$withval fi # Check whether --with-purify was given. if test "${with_purify+set}" = set; then : withval=$with_purify; opt_purify=$withval fi if test "$opt_curses" = "yes"; then prefer_curses=yes fi if test "$opt_purify" = yes; then PURIFY="purify" else PURIFY= fi opt_multibyte=yes opt_static_libs=yes opt_shared_libs=no # Check whether --enable-multibyte was given. if test "${enable_multibyte+set}" = set; then : enableval=$enable_multibyte; opt_multibyte=$enableval fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; opt_static_libs=$enableval fi if test $opt_multibyte = no; then $as_echo "#define NO_MULTIBYTE_SUPPORT 1" >>confdefs.h fi CROSS_COMPILE= if test "x$cross_compiling" = "xyes"; then case "${host}" in *-cygwin*) cross_cache=${srcdir}/cross-build/cygwin.cache ;; *-mingw*) cross_cache=${srcdir}/cross-build/mingw.cache ;; i[3456]86-*-beos*) cross_cache=${srcdir}/cross-build/x86-beos.cache ;; *) echo "configure: cross-compiling for $host is not supported" >&2 ;; esac if test -n "${cross_cache}" && test -r "${cross_cache}"; then echo "loading cross-build cache file ${cross_cache}" . ${cross_cache} fi unset cross_cache CROSS_COMPILE='-DCROSS_COMPILING' fi echo "" echo "Beginning configuration for readline-$LIBVERSION for ${host_cpu}-${host_vendor}-${host_os}" echo "" # We want these before the checks, so the checks can modify their values. test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "no acceptable C compiler found in \$PATH See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 rm -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then : $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { as_fn_set_status 77 as_fn_error "C compiler cannot create executables See \`config.log' for more details." "$LINENO" 5; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "cannot compute suffix of object files: cannot compile See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = x""yes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h # If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS. test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O" if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } if test "${ac_cv_prog_gcc_traditional+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 $as_echo "$ac_cv_prog_gcc_traditional" >&6; } if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ARFLAGS" || ARFLAGS="cr" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi MAKE_SHELL=/bin/sh { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5 $as_echo_n "checking for function prototypes... " >&6; } if test "$ac_cv_prog_cc_c89" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define PROTOTYPES 1" >>confdefs.h $as_echo "#define __PROTOTYPES 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 $as_echo_n "checking whether char is unsigned... " >&6; } if test "${ac_cv_c_char_unsigned+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((char) -1) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_char_unsigned=no else ac_cv_c_char_unsigned=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 $as_echo "$ac_cv_c_char_unsigned" >&6; } if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 $as_echo_n "checking for working volatile... " >&6; } if test "${ac_cv_c_volatile+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { volatile int x; int * volatile y = (int *) 0; return !x && !y; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_volatile=yes else ac_cv_c_volatile=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 $as_echo "$ac_cv_c_volatile" >&6; } if test $ac_cv_c_volatile = no; then $as_echo "#define volatile /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if test "${ac_cv_type_signal+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } if test "${ac_cv_header_stat_broken+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if defined S_ISBLK && defined S_IFDIR extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; #endif #if defined S_ISBLK && defined S_IFCHR extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; #endif #if defined S_ISLNK && defined S_IFREG extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; #endif #if defined S_ISSOCK && defined S_IFREG extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stat_broken=no else ac_cv_header_stat_broken=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 $as_echo "$ac_cv_header_stat_broken" >&6; } if test $ac_cv_header_stat_broken = yes; then $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_ac_Header=yes" else eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if test "${ac_cv_search_opendir+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then : break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if test "${ac_cv_search_opendir+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then : break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi for ac_func in fcntl kill lstat do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in memmove putenv select setenv setlocale \ strcasecmp strpbrk tcgetattr vsnprintf do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in isascii isxdigit do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpwent getpwnam getpwuid do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strcoll" >&5 $as_echo_n "checking for working strcoll... " >&6; } if test "${ac_cv_func_strcoll_works+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_strcoll_works=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { return (strcoll ("abc", "def") >= 0 || strcoll ("ABC", "DEF") >= 0 || strcoll ("123", "456") >= 0) ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_strcoll_works=yes else ac_cv_func_strcoll_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strcoll_works" >&5 $as_echo "$ac_cv_func_strcoll_works" >&6; } if test $ac_cv_func_strcoll_works = yes; then $as_echo "#define HAVE_STRCOLL 1" >>confdefs.h fi for ac_header in fcntl.h unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \ limits.h locale.h pwd.h memory.h termcap.h termios.h termio.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/pte.h sys/stream.h sys/select.h sys/file.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/ptem.h do : ac_fn_c_check_header_compile "$LINENO" "sys/ptem.h" "ac_cv_header_sys_ptem_h" " #if HAVE_SYS_STREAM_H # include #endif " if test "x$ac_cv_header_sys_ptem_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_PTEM_H 1 _ACEOF fi done # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if test "${ac_cv_sys_largefile_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if test "${ac_cv_sys_file_offset_bits+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if test "${ac_cv_sys_large_files+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of signal functions" >&5 $as_echo_n "checking for type of signal functions... " >&6; } if test "${bash_cv_signal_vintage+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { sigset_t ss; struct sigaction sa; sigemptyset(&ss); sigsuspend(&ss); sigaction(SIGINT, &sa, (struct sigaction *) 0); sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : bash_cv_signal_vintage=posix else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int mask = sigmask(SIGINT); sigsetmask(mask); sigblock(mask); sigpause(mask); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : bash_cv_signal_vintage=4.2bsd else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include RETSIGTYPE foo() { } int main () { int mask = sigmask(SIGINT); sigset(SIGINT, foo); sigrelse(SIGINT); sighold(SIGINT); sigpause(SIGINT); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : bash_cv_signal_vintage=svr3 else bash_cv_signal_vintage=v7 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_signal_vintage" >&5 $as_echo "$bash_cv_signal_vintage" >&6; } if test "$bash_cv_signal_vintage" = posix; then $as_echo "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h elif test "$bash_cv_signal_vintage" = "4.2bsd"; then $as_echo "#define HAVE_BSD_SIGNALS 1" >>confdefs.h elif test "$bash_cv_signal_vintage" = svr3; then $as_echo "#define HAVE_USG_SIGHOLD 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if signal handlers must be reinstalled when invoked" >&5 $as_echo_n "checking if signal handlers must be reinstalled when invoked... " >&6; } if test "${bash_cv_must_reinstall_sighandlers+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5 $as_echo "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;} bash_cv_must_reinstall_sighandlers=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef HAVE_UNISTD_H #include #endif typedef RETSIGTYPE sigfunc(); int nsigint; #ifdef HAVE_POSIX_SIGNALS sigfunc * set_signal_handler(sig, handler) int sig; sigfunc *handler; { struct sigaction act, oact; act.sa_handler = handler; act.sa_flags = 0; sigemptyset (&act.sa_mask); sigemptyset (&oact.sa_mask); sigaction (sig, &act, &oact); return (oact.sa_handler); } #else #define set_signal_handler(s, h) signal(s, h) #endif RETSIGTYPE sigint(s) int s; { nsigint++; } main() { nsigint = 0; set_signal_handler(SIGINT, sigint); kill((int)getpid(), SIGINT); kill((int)getpid(), SIGINT); exit(nsigint != 2); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : bash_cv_must_reinstall_sighandlers=no else bash_cv_must_reinstall_sighandlers=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_must_reinstall_sighandlers" >&5 $as_echo "$bash_cv_must_reinstall_sighandlers" >&6; } if test $bash_cv_must_reinstall_sighandlers = yes; then $as_echo "#define MUST_REINSTALL_SIGHANDLERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5 $as_echo_n "checking for presence of POSIX-style sigsetjmp/siglongjmp... " >&6; } if test "${bash_cv_func_sigsetjmp+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&5 $as_echo "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&2;} bash_cv_func_sigsetjmp=missing else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_UNISTD_H #include #endif #include #include #include main() { #if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS) exit (1); #else int code; sigset_t set, oset; sigjmp_buf xx; /* get the mask */ sigemptyset(&set); sigemptyset(&oset); sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set); sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset); /* save it */ code = sigsetjmp(xx, 1); if (code) exit(0); /* could get sigmask and compare to oset here. */ /* change it */ sigaddset(&set, SIGINT); sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL); /* and siglongjmp */ siglongjmp(xx, 10); exit(1); #endif } _ACEOF if ac_fn_c_try_run "$LINENO"; then : bash_cv_func_sigsetjmp=present else bash_cv_func_sigsetjmp=missing fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sigsetjmp" >&5 $as_echo "$bash_cv_func_sigsetjmp" >&6; } if test $bash_cv_func_sigsetjmp = present; then $as_echo "#define HAVE_POSIX_SIGSETJMP 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat" >&5 $as_echo_n "checking for lstat... " >&6; } if test "${bash_cv_func_lstat+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { lstat(".",(struct stat *)0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : bash_cv_func_lstat=yes else bash_cv_func_lstat=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_lstat" >&5 $as_echo "$bash_cv_func_lstat" >&6; } if test $bash_cv_func_lstat = yes; then $as_echo "#define HAVE_LSTAT 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether or not strcoll and strcmp differ" >&5 $as_echo_n "checking whether or not strcoll and strcmp differ... " >&6; } if test "${bash_cv_func_strcoll_broken+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5 $as_echo "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;} bash_cv_func_strcoll_broken=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if defined (HAVE_LOCALE_H) #include #endif main(c, v) int c; char *v[]; { int r1, r2; char *deflocale, *defcoll; #ifdef HAVE_SETLOCALE deflocale = setlocale(LC_ALL, ""); defcoll = setlocale(LC_COLLATE, ""); #endif #ifdef HAVE_STRCOLL /* These two values are taken from tests/glob-test. */ r1 = strcoll("abd", "aXd"); #else r1 = 0; #endif r2 = strcmp("abd", "aXd"); /* These two should both be greater than 0. It is permissible for a system to return different values, as long as the sign is the same. */ /* Exit with 1 (failure) if these two values are both > 0, since this tests whether strcoll(3) is broken with respect to strcmp(3) in the default locale. */ exit (r1 > 0 && r2 > 0); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : bash_cv_func_strcoll_broken=yes else bash_cv_func_strcoll_broken=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strcoll_broken" >&5 $as_echo "$bash_cv_func_strcoll_broken" >&6; } if test $bash_cv_func_strcoll_broken = yes; then $as_echo "#define STRCOLL_BROKEN 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the ctype macros accept non-ascii characters" >&5 $as_echo_n "checking whether the ctype macros accept non-ascii characters... " >&6; } if test "${bash_cv_func_ctype_nonascii+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&5 $as_echo "$as_me: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&2;} bash_cv_func_ctype_nonascii=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_LOCALE_H #include #endif #include #include main(c, v) int c; char *v[]; { char *deflocale; unsigned char x; int r1, r2; #ifdef HAVE_SETLOCALE /* We take a shot here. If that locale is not known, try the system default. We try this one because '\342' (226) is known to be a printable character in that locale. */ deflocale = setlocale(LC_ALL, "en_US.ISO8859-1"); if (deflocale == 0) deflocale = setlocale(LC_ALL, ""); #endif x = '\342'; r1 = isprint(x); x -= 128; r2 = isprint(x); exit (r1 == 0 || r2 == 0); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : bash_cv_func_ctype_nonascii=yes else bash_cv_func_ctype_nonascii=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_ctype_nonascii" >&5 $as_echo "$bash_cv_func_ctype_nonascii" >&6; } if test $bash_cv_func_ctype_nonascii = yes; then $as_echo "#define CTYPE_NON_ASCII 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpw functions are declared in pwd.h" >&5 $as_echo_n "checking whether getpw functions are declared in pwd.h... " >&6; } if test "${bash_cv_getpw_declared+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef HAVE_UNISTD_H # include #endif #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "getpwuid" >/dev/null 2>&1; then : bash_cv_getpw_declared=yes else bash_cv_getpw_declared=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getpw_declared" >&5 $as_echo "$bash_cv_getpw_declared" >&6; } if test $bash_cv_getpw_declared = yes; then $as_echo "#define HAVE_GETPW_DECLS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5 $as_echo_n "checking whether termios.h defines TIOCGWINSZ... " >&6; } if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef TIOCGWINSZ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : ac_cv_sys_tiocgwinsz_in_termios_h=yes else ac_cv_sys_tiocgwinsz_in_termios_h=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5 $as_echo "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; } if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5 $as_echo_n "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; } if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef TIOCGWINSZ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then : ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes else ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5 $as_echo "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; } if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then $as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t in signal.h" >&5 $as_echo_n "checking for sig_atomic_t in signal.h... " >&6; } if test "${ac_cv_have_sig_atomic_t+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { sig_atomic_t x; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_have_sig_atomic_t=yes else ac_cv_have_sig_atomic_t=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sig_atomic_t" >&5 $as_echo "$ac_cv_have_sig_atomic_t" >&6; } if test "$ac_cv_have_sig_atomic_t" = "no" then ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default" if test "x$ac_cv_type_sig_atomic_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define sig_atomic_t int _ACEOF fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signal handlers are of type void" >&5 $as_echo_n "checking whether signal handlers are of type void... " >&6; } if test "${bash_cv_void_sighandler+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef signal #undef signal #endif #ifdef __cplusplus extern "C" #endif void (*signal ()) (); int main () { int i; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : bash_cv_void_sighandler=yes else bash_cv_void_sighandler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_void_sighandler" >&5 $as_echo "$bash_cv_void_sighandler" >&6; } if test $bash_cv_void_sighandler = yes; then $as_echo "#define VOID_SIGHANDLER 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIOCSTAT in sys/ioctl.h" >&5 $as_echo_n "checking for TIOCSTAT in sys/ioctl.h... " >&6; } if test "${bash_cv_tiocstat_in_ioctl+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { int x = TIOCSTAT; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : bash_cv_tiocstat_in_ioctl=yes else bash_cv_tiocstat_in_ioctl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_tiocstat_in_ioctl" >&5 $as_echo "$bash_cv_tiocstat_in_ioctl" >&6; } if test $bash_cv_tiocstat_in_ioctl = yes; then $as_echo "#define TIOCSTAT_IN_SYS_IOCTL 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIONREAD in sys/ioctl.h" >&5 $as_echo_n "checking for FIONREAD in sys/ioctl.h... " >&6; } if test "${bash_cv_fionread_in_ioctl+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { int x = FIONREAD; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : bash_cv_fionread_in_ioctl=yes else bash_cv_fionread_in_ioctl=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fionread_in_ioctl" >&5 $as_echo "$bash_cv_fionread_in_ioctl" >&6; } if test $bash_cv_fionread_in_ioctl = yes; then $as_echo "#define FIONREAD_IN_SYS_IOCTL 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t in sys/types.h" >&5 $as_echo_n "checking for speed_t in sys/types.h... " >&6; } if test "${bash_cv_speed_t_in_sys_types+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { speed_t x; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : bash_cv_speed_t_in_sys_types=yes else bash_cv_speed_t_in_sys_types=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_speed_t_in_sys_types" >&5 $as_echo "$bash_cv_speed_t_in_sys_types" >&6; } if test $bash_cv_speed_t_in_sys_types = yes; then $as_echo "#define SPEED_T_IN_SYS_TYPES 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct winsize in sys/ioctl.h and termios.h" >&5 $as_echo_n "checking for struct winsize in sys/ioctl.h and termios.h... " >&6; } if test "${bash_cv_struct_winsize_header+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct winsize x; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : bash_cv_struct_winsize_header=ioctl_h else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct winsize x; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : bash_cv_struct_winsize_header=termios_h else bash_cv_struct_winsize_header=other fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $bash_cv_struct_winsize_header = ioctl_h; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: sys/ioctl.h" >&5 $as_echo "sys/ioctl.h" >&6; } $as_echo "#define STRUCT_WINSIZE_IN_SYS_IOCTL 1" >>confdefs.h elif test $bash_cv_struct_winsize_header = termios_h; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: termios.h" >&5 $as_echo "termios.h" >&6; } $as_echo "#define STRUCT_WINSIZE_IN_TERMIOS 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_ino" >&5 $as_echo_n "checking for struct dirent.d_ino... " >&6; } if test "${bash_cv_dirent_has_dino+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #if defined(HAVE_DIRENT_H) # include #else # define dirent direct # ifdef HAVE_SYS_NDIR_H # include # endif /* SYSNDIR */ # ifdef HAVE_SYS_DIR_H # include # endif /* SYSDIR */ # ifdef HAVE_NDIR_H # include # endif #endif /* HAVE_DIRENT_H */ int main () { struct dirent d; int z; z = d.d_ino; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : bash_cv_dirent_has_dino=yes else bash_cv_dirent_has_dino=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_dino" >&5 $as_echo "$bash_cv_dirent_has_dino" >&6; } if test $bash_cv_dirent_has_dino = yes; then $as_echo "#define HAVE_STRUCT_DIRENT_D_INO 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_fileno" >&5 $as_echo_n "checking for struct dirent.d_fileno... " >&6; } if test "${bash_cv_dirent_has_d_fileno+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ #if defined(HAVE_DIRENT_H) # include #else # define dirent direct # ifdef HAVE_SYS_NDIR_H # include # endif /* SYSNDIR */ # ifdef HAVE_SYS_DIR_H # include # endif /* SYSDIR */ # ifdef HAVE_NDIR_H # include # endif #endif /* HAVE_DIRENT_H */ int main () { struct dirent d; int z; z = d.d_fileno; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : bash_cv_dirent_has_d_fileno=yes else bash_cv_dirent_has_d_fileno=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_fileno" >&5 $as_echo "$bash_cv_dirent_has_d_fileno" >&6; } if test $bash_cv_dirent_has_d_fileno = yes; then $as_echo "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h fi case "$host_os" in aix*) prefer_curses=yes ;; esac if test "X$bash_cv_termcap_lib" = "X"; then _bash_needmsg=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 $as_echo_n "checking which library has the termcap functions... " >&6; } _bash_needmsg= fi if test "${bash_cv_termcap_lib+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent" if test "x$ac_cv_func_tgetent" = x""yes; then : bash_cv_termcap_lib=libc else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5 $as_echo_n "checking for tgetent in -ltermcap... " >&6; } if test "${ac_cv_lib_termcap_tgetent+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltermcap $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_termcap_tgetent=yes else ac_cv_lib_termcap_tgetent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5 $as_echo "$ac_cv_lib_termcap_tgetent" >&6; } if test "x$ac_cv_lib_termcap_tgetent" = x""yes; then : bash_cv_termcap_lib=libtermcap else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5 $as_echo_n "checking for tgetent in -ltinfo... " >&6; } if test "${ac_cv_lib_tinfo_tgetent+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltinfo $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_tinfo_tgetent=yes else ac_cv_lib_tinfo_tgetent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5 $as_echo "$ac_cv_lib_tinfo_tgetent" >&6; } if test "x$ac_cv_lib_tinfo_tgetent" = x""yes; then : bash_cv_termcap_lib=libtinfo else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5 $as_echo_n "checking for tgetent in -lcurses... " >&6; } if test "${ac_cv_lib_curses_tgetent+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_curses_tgetent=yes else ac_cv_lib_curses_tgetent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5 $as_echo "$ac_cv_lib_curses_tgetent" >&6; } if test "x$ac_cv_lib_curses_tgetent" = x""yes; then : bash_cv_termcap_lib=libcurses else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5 $as_echo_n "checking for tgetent in -lncurses... " >&6; } if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ncurses_tgetent=yes else ac_cv_lib_ncurses_tgetent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5 $as_echo "$ac_cv_lib_ncurses_tgetent" >&6; } if test "x$ac_cv_lib_ncurses_tgetent" = x""yes; then : bash_cv_termcap_lib=libncurses else bash_cv_termcap_lib=gnutermcap fi fi fi fi fi fi if test "X$_bash_needmsg" = "Xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 $as_echo_n "checking which library has the termcap functions... " >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5 $as_echo "using $bash_cv_termcap_lib" >&6; } if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then LDFLAGS="$LDFLAGS -L./lib/termcap" TERMCAP_LIB="./lib/termcap/libtermcap.a" TERMCAP_DEP="./lib/termcap/libtermcap.a" elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then TERMCAP_LIB=-ltermcap TERMCAP_DEP= elif test $bash_cv_termcap_lib = libtinfo; then TERMCAP_LIB=-ltinfo TERMCAP_DEP= elif test $bash_cv_termcap_lib = libncurses; then TERMCAP_LIB=-lncurses TERMCAP_DEP= elif test $bash_cv_termcap_lib = libc; then TERMCAP_LIB= TERMCAP_DEP= else TERMCAP_LIB=-lcurses TERMCAP_DEP= fi if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then if test "$prefer_curses" = yes; then TERMCAP_LIB=-lcurses else TERMCAP_LIB=-ltermcap #default fi fi for ac_header in wctype.h do : ac_fn_c_check_header_mongrel "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default" if test "x$ac_cv_header_wctype_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WCTYPE_H 1 _ACEOF fi done for ac_header in wchar.h do : ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" if test "x$ac_cv_header_wchar_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WCHAR_H 1 _ACEOF fi done for ac_header in langinfo.h do : ac_fn_c_check_header_mongrel "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default" if test "x$ac_cv_header_langinfo_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LANGINFO_H 1 _ACEOF fi done ac_fn_c_check_func "$LINENO" "mbrlen" "ac_cv_func_mbrlen" if test "x$ac_cv_func_mbrlen" = x""yes; then : $as_echo "#define HAVE_MBRLEN 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "mbscasecmp" "ac_cv_func_mbscasecmp" if test "x$ac_cv_func_mbscasecmp" = x""yes; then : $as_echo "#define HAVE_MBSCMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "mbscmp" "ac_cv_func_mbscmp" if test "x$ac_cv_func_mbscmp" = x""yes; then : $as_echo "#define HAVE_MBSCMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "mbsnrtowcs" "ac_cv_func_mbsnrtowcs" if test "x$ac_cv_func_mbsnrtowcs" = x""yes; then : $as_echo "#define HAVE_MBSNRTOWCS 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "mbsrtowcs" "ac_cv_func_mbsrtowcs" if test "x$ac_cv_func_mbsrtowcs" = x""yes; then : $as_echo "#define HAVE_MBSRTOWCS 1" >>confdefs.h fi for ac_func in mbschr do : ac_fn_c_check_func "$LINENO" "mbschr" "ac_cv_func_mbschr" if test "x$ac_cv_func_mbschr" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MBSCHR 1 _ACEOF else case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb" if test "x$ac_cv_func_wcrtomb" = x""yes; then : $as_echo "#define HAVE_WCRTOMB 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wcscoll" "ac_cv_func_wcscoll" if test "x$ac_cv_func_wcscoll" = x""yes; then : $as_echo "#define HAVE_WCSCOLL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wcsdup" "ac_cv_func_wcsdup" if test "x$ac_cv_func_wcsdup" = x""yes; then : $as_echo "#define HAVE_WCSDUP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wcwidth" "ac_cv_func_wcwidth" if test "x$ac_cv_func_wcwidth" = x""yes; then : $as_echo "#define HAVE_WCWIDTH 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" if test "x$ac_cv_func_wctype" = x""yes; then : $as_echo "#define HAVE_WCTYPE 1" >>confdefs.h fi for ac_func in wcswidth do : ac_fn_c_check_func "$LINENO" "wcswidth" "ac_cv_func_wcswidth" if test "x$ac_cv_func_wcswidth" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WCSWIDTH 1 _ACEOF else case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5 $as_echo_n "checking whether mbrtowc and mbstate_t are properly declared... " >&6; } if test "${ac_cv_func_mbrtowc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { wchar_t wc; char const s[] = ""; size_t n = 1; mbstate_t state; return ! (sizeof state && (mbrtowc) (&wc, s, n, &state)); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_mbrtowc=yes else ac_cv_func_mbrtowc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5 $as_echo "$ac_cv_func_mbrtowc" >&6; } if test $ac_cv_func_mbrtowc = yes; then $as_echo "#define HAVE_MBRTOWC 1" >>confdefs.h fi if test $ac_cv_func_mbrtowc = yes; then $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h fi for ac_func in iswlower iswupper towlower towupper iswctype do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } if test "${bash_cv_langinfo_codeset+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char* cs = nl_langinfo(CODESET); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : bash_cv_langinfo_codeset=yes else bash_cv_langinfo_codeset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_langinfo_codeset" >&5 $as_echo "$bash_cv_langinfo_codeset" >&6; } if test $bash_cv_langinfo_codeset = yes; then $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t in wchar.h" >&5 $as_echo_n "checking for wchar_t in wchar.h... " >&6; } if test "${bash_cv_type_wchar_t+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { wchar_t foo; foo = 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : bash_cv_type_wchar_t=yes else bash_cv_type_wchar_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wchar_t" >&5 $as_echo "$bash_cv_type_wchar_t" >&6; } if test $bash_cv_type_wchar_t = yes; then $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t in wctype.h" >&5 $as_echo_n "checking for wctype_t in wctype.h... " >&6; } if test "${bash_cv_type_wctype_t+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { wctype_t foo; foo = 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : bash_cv_type_wctype_t=yes else bash_cv_type_wctype_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wctype_t" >&5 $as_echo "$bash_cv_type_wctype_t" >&6; } if test $bash_cv_type_wctype_t = yes; then $as_echo "#define HAVE_WCTYPE_T 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t in wctype.h" >&5 $as_echo_n "checking for wint_t in wctype.h... " >&6; } if test "${bash_cv_type_wint_t+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { wint_t foo; foo = 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : bash_cv_type_wint_t=yes else bash_cv_type_wint_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wint_t" >&5 $as_echo "$bash_cv_type_wint_t" >&6; } if test $bash_cv_type_wint_t = yes; then $as_echo "#define HAVE_WINT_T 1" >>confdefs.h fi if test "$am_cv_func_iconv" = yes; then OLDLIBS="$LIBS" LIBS="$LIBS $LIBICONV" for ac_func in locale_charset do : ac_fn_c_check_func "$LINENO" "locale_charset" "ac_cv_func_locale_charset" if test "x$ac_cv_func_locale_charset" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LOCALE_CHARSET 1 _ACEOF fi done LIBS="$OLDLIBS" fi case "$host_cpu" in *cray*) LOCAL_CFLAGS=-DCRAY ;; *s390*) LOCAL_CFLAGS=-fsigned-char ;; esac case "$host_os" in isc*) LOCAL_CFLAGS=-Disc386 ;; esac # shared library configuration section # # Shared object configuration section. These values are generated by # ${srcdir}/support/shobj-conf # if test -f ${srcdir}/support/shobj-conf; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking configuration for building shared libraries" >&5 $as_echo_n "checking configuration for building shared libraries... " >&6; } eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}` # case "$SHLIB_LIBS" in # *curses*|*termcap*|*termlib*) ;; # *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;; # esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_STATUS" >&5 $as_echo "$SHLIB_STATUS" >&6; } # SHLIB_STATUS is either `supported' or `unsupported'. If it's # `unsupported', turn off any default shared library building if test "$SHLIB_STATUS" = 'unsupported'; then opt_shared_libs=no fi # shared library versioning # quoted for m4 so I can use character classes SHLIB_MAJOR=`expr "$LIBVERSION" : '\([0-9]\)\..*'` SHLIB_MINOR=`expr "$LIBVERSION" : '[0-9]\.\([0-9]\).*'` fi if test "$opt_static_libs" = "yes"; then STATIC_TARGET=static STATIC_INSTALL_TARGET=install-static fi if test "$opt_shared_libs" = "yes"; then SHARED_TARGET=shared SHARED_INSTALL_TARGET=install-shared fi case "$host_os" in msdosdjgpp*) BUILD_DIR=`pwd.exe` ;; # to prevent //d/path/file *) BUILD_DIR=`pwd` ;; esac case "$BUILD_DIR" in *\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;; *) ;; esac ac_config_files="$ac_config_files Makefile doc/Makefile examples/Makefile shlib/Makefile" ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error ERROR [LINENO LOG_FD] # --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with status $?, using 1 if that was 0. as_fn_error () { as_status=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by readline $as_me 6.2, which was generated by GNU Autoconf 2.64. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ readline config.status 6.2 configured by $0, generated by GNU Autoconf 2.64, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "shlib/Makefile") CONFIG_FILES="$CONFIG_FILES shlib/Makefile" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error "could not create -" "$LINENO" 5 fi ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "default":C) # Makefile uses this timestamp file to record whether config.h is up to date. echo > stamp-h ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi gdb-doc-7.6.2/readline/chardefs.h0000644000175000017500000001070712250770610015603 0ustar zumbizumbi/* chardefs.h -- Character definitions for readline. */ /* Copyright (C) 1994-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #ifndef _CHARDEFS_H_ #define _CHARDEFS_H_ #include #if defined (HAVE_CONFIG_H) # if defined (HAVE_STRING_H) # if ! defined (STDC_HEADERS) && defined (HAVE_MEMORY_H) # include # endif # include # endif /* HAVE_STRING_H */ # if defined (HAVE_STRINGS_H) # include # endif /* HAVE_STRINGS_H */ #else # include #endif /* !HAVE_CONFIG_H */ #ifndef whitespace #define whitespace(c) (((c) == ' ') || ((c) == '\t')) #endif #ifdef CTRL # undef CTRL #endif #ifdef UNCTRL # undef UNCTRL #endif /* Some character stuff. */ #define control_character_threshold 0x020 /* Smaller than this is control. */ #define control_character_mask 0x1f /* 0x20 - 1 */ #define meta_character_threshold 0x07f /* Larger than this is Meta. */ #define control_character_bit 0x40 /* 0x000000, must be off. */ #define meta_character_bit 0x080 /* x0000000, must be on. */ #define largest_char 255 /* Largest character value. */ #define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & 0x80) == 0)) #define META_CHAR(c) ((c) > meta_character_threshold && (c) <= largest_char) #define CTRL(c) ((c) & control_character_mask) #define META(c) ((c) | meta_character_bit) #define UNMETA(c) ((c) & (~meta_character_bit)) #define UNCTRL(c) _rl_to_upper(((c)|control_character_bit)) #if defined STDC_HEADERS || (!defined (isascii) && !defined (HAVE_ISASCII)) # define IN_CTYPE_DOMAIN(c) 1 #else # define IN_CTYPE_DOMAIN(c) isascii(c) #endif #if !defined (isxdigit) && !defined (HAVE_ISXDIGIT) # define isxdigit(c) (isdigit((c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) #endif #if defined (CTYPE_NON_ASCII) # define NON_NEGATIVE(c) 1 #else # define NON_NEGATIVE(c) ((unsigned char)(c) == (c)) #endif /* Some systems define these; we want our definitions. */ #undef ISPRINT /* Beware: these only work with single-byte ASCII characters. */ #define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c)) #define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c)) #define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) #define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c)) #define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c)) #define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c)) #define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (c)) #define _rl_lowercase_p(c) (NON_NEGATIVE(c) && ISLOWER(c)) #define _rl_uppercase_p(c) (NON_NEGATIVE(c) && ISUPPER(c)) #define _rl_digit_p(c) ((c) >= '0' && (c) <= '9') #define _rl_pure_alphabetic(c) (NON_NEGATIVE(c) && ISALPHA(c)) #define ALPHABETIC(c) (NON_NEGATIVE(c) && ISALNUM(c)) #ifndef _rl_to_upper # define _rl_to_upper(c) (_rl_lowercase_p(c) ? toupper((unsigned char)c) : (c)) # define _rl_to_lower(c) (_rl_uppercase_p(c) ? tolower((unsigned char)c) : (c)) #endif #ifndef _rl_digit_value # define _rl_digit_value(x) ((x) - '0') #endif #ifndef _rl_isident # define _rl_isident(c) (ISALNUM(c) || (c) == '_') #endif #ifndef ISOCTAL # define ISOCTAL(c) ((c) >= '0' && (c) <= '7') #endif #define OCTVALUE(c) ((c) - '0') #define HEXVALUE(c) \ (((c) >= 'a' && (c) <= 'f') \ ? (c)-'a'+10 \ : (c) >= 'A' && (c) <= 'F' ? (c)-'A'+10 : (c)-'0') #ifndef NEWLINE #define NEWLINE '\n' #endif #ifndef RETURN #define RETURN CTRL('M') #endif #ifndef RUBOUT #define RUBOUT 0x7f #endif #ifndef TAB #define TAB '\t' #endif #ifdef ABORT_CHAR #undef ABORT_CHAR #endif #define ABORT_CHAR CTRL('G') #ifdef PAGE #undef PAGE #endif #define PAGE CTRL('L') #ifdef SPACE #undef SPACE #endif #define SPACE ' ' /* XXX - was 0x20 */ #ifdef ESC #undef ESC #endif #define ESC CTRL('[') #endif /* _CHARDEFS_H_ */ gdb-doc-7.6.2/readline/configure.in0000644000175000017500000001714512250773212016170 0ustar zumbizumbidnl dnl Configure script for readline library dnl dnl report bugs to chet@po.cwru.edu dnl dnl Process this file with autoconf to produce a configure script. # Copyright (C) 1987-2009 Free Software Foundation, Inc. # 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 3 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, see . AC_REVISION([for Readline 6.2, version 2.67]) m4_include([../config/override.m4]) AC_INIT(readline, 6.2, bug-readline@gnu.org) dnl make sure we are using a recent autoconf version AC_PREREQ(2.50) AC_CONFIG_SRCDIR(readline.h) dnl GDB LOCAL dnl AC_CONFIG_AUX_DIR(./support) AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..) AC_CONFIG_HEADERS(config.h) dnl update the value of RL_READLINE_VERSION in readline.h when this changes LIBVERSION=6.2 AC_CANONICAL_HOST dnl configure defaults opt_curses=no opt_purify=no dnl arguments to configure AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval) AC_ARG_WITH(purify, AC_HELP_STRING([--with-purify], [configure to postprocess with purify]), opt_purify=$withval) if test "$opt_curses" = "yes"; then prefer_curses=yes fi if test "$opt_purify" = yes; then PURIFY="purify" else PURIFY= fi dnl option parsing for optional features opt_multibyte=yes opt_static_libs=yes opt_shared_libs=no AC_ARG_ENABLE(multibyte, AC_HELP_STRING([--enable-multibyte], [enable multibyte characters if OS supports them]), opt_multibyte=$enableval) dnl AC_ARG_ENABLE(shared, AC_HELP_STRING([--enable-shared], [build shared libraries [[default=YES]]]), opt_shared_libs=$enableval) AC_ARG_ENABLE(static, AC_HELP_STRING([--enable-static], [build static libraries [[default=YES]]]), opt_static_libs=$enableval) if test $opt_multibyte = no; then AC_DEFINE(NO_MULTIBYTE_SUPPORT) fi dnl load up the cross-building cache file -- add more cases and cache dnl files as necessary dnl Note that host and target machine are the same, and different than the dnl build machine. CROSS_COMPILE= if test "x$cross_compiling" = "xyes"; then case "${host}" in *-cygwin*) cross_cache=${srcdir}/cross-build/cygwin.cache ;; *-mingw*) cross_cache=${srcdir}/cross-build/mingw.cache ;; i[[3456]]86-*-beos*) cross_cache=${srcdir}/cross-build/x86-beos.cache ;; *) echo "configure: cross-compiling for $host is not supported" >&2 ;; esac if test -n "${cross_cache}" && test -r "${cross_cache}"; then echo "loading cross-build cache file ${cross_cache}" . ${cross_cache} fi unset cross_cache CROSS_COMPILE='-DCROSS_COMPILING' AC_SUBST(CROSS_COMPILE) fi echo "" echo "Beginning configuration for readline-$LIBVERSION for ${host_cpu}-${host_vendor}-${host_os}" echo "" # We want these before the checks, so the checks can modify their values. test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1 AC_PROG_MAKE_SET AC_PROG_CC dnl AC_AIX AC_MINIX # If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS. test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O" AC_PROG_GCC_TRADITIONAL AC_PROG_INSTALL AC_CHECK_PROG(AR, ar, , ar) dnl Set default for ARFLAGS, since autoconf does not have a macro for it. dnl This allows people to set it when running configure or make test -n "$ARFLAGS" || ARFLAGS="cr" AC_PROG_RANLIB MAKE_SHELL=/bin/sh AC_SUBST(MAKE_SHELL) AC_C_CONST AC_C_PROTOTYPES AC_C_CHAR_UNSIGNED AC_C_VOLATILE AC_TYPE_SIGNAL AC_TYPE_SIZE_T AC_CHECK_TYPE(ssize_t, int) AC_HEADER_STDC AC_HEADER_STAT AC_HEADER_DIRENT AC_CHECK_FUNCS(fcntl kill lstat) AC_CHECK_FUNCS(memmove putenv select setenv setlocale \ strcasecmp strpbrk tcgetattr vsnprintf) AC_CHECK_FUNCS(isascii isxdigit) AC_CHECK_FUNCS(getpwent getpwnam getpwuid) AC_FUNC_STRCOLL AC_CHECK_HEADERS(fcntl.h unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \ limits.h locale.h pwd.h memory.h termcap.h termios.h termio.h) AC_CHECK_HEADERS(sys/pte.h sys/stream.h sys/select.h sys/file.h) AC_CHECK_HEADERS(sys/ptem.h,,, [[ #if HAVE_SYS_STREAM_H # include #endif ]]) AC_SYS_LARGEFILE BASH_SYS_SIGNAL_VINTAGE BASH_SYS_REINSTALL_SIGHANDLERS BASH_FUNC_POSIX_SETJMP BASH_FUNC_LSTAT BASH_FUNC_STRCOLL BASH_FUNC_CTYPE_NONASCII BASH_CHECK_GETPW_FUNCS AC_HEADER_TIOCGWINSZ BASH_TYPE_SIG_ATOMIC_T BASH_TYPE_SIGHANDLER BASH_HAVE_TIOCSTAT BASH_HAVE_FIONREAD BASH_CHECK_SPEED_T BASH_STRUCT_WINSIZE BASH_STRUCT_DIRENT_D_INO BASH_STRUCT_DIRENT_D_FILENO dnl yuck case "$host_os" in aix*) prefer_curses=yes ;; esac BASH_CHECK_LIB_TERMCAP if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then if test "$prefer_curses" = yes; then TERMCAP_LIB=-lcurses else TERMCAP_LIB=-ltermcap #default fi fi BASH_CHECK_MULTIBYTE case "$host_cpu" in *cray*) LOCAL_CFLAGS=-DCRAY ;; *s390*) LOCAL_CFLAGS=-fsigned-char ;; esac case "$host_os" in isc*) LOCAL_CFLAGS=-Disc386 ;; esac # shared library configuration section # # Shared object configuration section. These values are generated by # ${srcdir}/support/shobj-conf # if test -f ${srcdir}/support/shobj-conf; then AC_MSG_CHECKING(configuration for building shared libraries) eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}` # case "$SHLIB_LIBS" in # *curses*|*termcap*|*termlib*) ;; # *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;; # esac AC_SUBST(SHOBJ_CC) AC_SUBST(SHOBJ_CFLAGS) AC_SUBST(SHOBJ_LD) AC_SUBST(SHOBJ_LDFLAGS) AC_SUBST(SHOBJ_XLDFLAGS) AC_SUBST(SHOBJ_LIBS) AC_SUBST(SHOBJ_STATUS) AC_SUBST(SHLIB_STATUS) AC_SUBST(SHLIB_XLDFLAGS) AC_SUBST(SHLIB_DOT) AC_SUBST(SHLIB_LIBPREF) AC_SUBST(SHLIB_LIBSUFF) AC_SUBST(SHLIB_LIBVERSION) AC_SUBST(SHLIB_DLLVERSION) AC_SUBST(SHLIB_LIBS) AC_MSG_RESULT($SHLIB_STATUS) # SHLIB_STATUS is either `supported' or `unsupported'. If it's # `unsupported', turn off any default shared library building if test "$SHLIB_STATUS" = 'unsupported'; then opt_shared_libs=no fi # shared library versioning # quoted for m4 so I can use character classes SHLIB_MAJOR=[`expr "$LIBVERSION" : '\([0-9]\)\..*'`] SHLIB_MINOR=[`expr "$LIBVERSION" : '[0-9]\.\([0-9]\).*'`] AC_SUBST(SHLIB_MAJOR) AC_SUBST(SHLIB_MINOR) fi if test "$opt_static_libs" = "yes"; then STATIC_TARGET=static STATIC_INSTALL_TARGET=install-static fi if test "$opt_shared_libs" = "yes"; then SHARED_TARGET=shared SHARED_INSTALL_TARGET=install-shared fi AC_SUBST(STATIC_TARGET) AC_SUBST(SHARED_TARGET) AC_SUBST(STATIC_INSTALL_TARGET) AC_SUBST(SHARED_INSTALL_TARGET) case "$host_os" in msdosdjgpp*) BUILD_DIR=`pwd.exe` ;; # to prevent //d/path/file *) BUILD_DIR=`pwd` ;; esac case "$BUILD_DIR" in *\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;; *) ;; esac AC_SUBST(PURIFY) AC_SUBST(BUILD_DIR) AC_SUBST(CFLAGS) AC_SUBST(LOCAL_CFLAGS) AC_SUBST(LOCAL_LDFLAGS) AC_SUBST(LOCAL_DEFS) AC_SUBST(AR) AC_SUBST(ARFLAGS) AC_SUBST(host_cpu) AC_SUBST(host_os) AC_SUBST(LIBVERSION) AC_SUBST(TERMCAP_LIB) AC_OUTPUT([Makefile doc/Makefile examples/Makefile shlib/Makefile], [ # Makefile uses this timestamp file to record whether config.h is up to date. echo > stamp-h ]) gdb-doc-7.6.2/readline/posixstat.h0000644000175000017500000001033612250770610016060 0ustar zumbizumbi/* posixstat.h -- Posix stat(2) definitions for systems that don't have them. */ /* Copyright (C) 1987,1991 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash 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 3 of the License, or (at your option) any later version. Bash 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 Bash. If not, see . */ /* This file should be included instead of . It relies on the local sys/stat.h to work though. */ #if !defined (_POSIXSTAT_H_) #define _POSIXSTAT_H_ #include #if defined (STAT_MACROS_BROKEN) # undef S_ISBLK # undef S_ISCHR # undef S_ISDIR # undef S_ISFIFO # undef S_ISREG # undef S_ISLNK #endif /* STAT_MACROS_BROKEN */ /* These are guaranteed to work only on isc386 */ #if !defined (S_IFDIR) && !defined (S_ISDIR) # define S_IFDIR 0040000 #endif /* !S_IFDIR && !S_ISDIR */ #if !defined (S_IFMT) # define S_IFMT 0170000 #endif /* !S_IFMT */ /* Posix 1003.1 5.6.1.1 file types */ /* Some Posix-wannabe systems define _S_IF* macros instead of S_IF*, but do not provide the S_IS* macros that Posix requires. */ #if defined (_S_IFMT) && !defined (S_IFMT) #define S_IFMT _S_IFMT #endif #if defined (_S_IFIFO) && !defined (S_IFIFO) #define S_IFIFO _S_IFIFO #endif #if defined (_S_IFCHR) && !defined (S_IFCHR) #define S_IFCHR _S_IFCHR #endif #if defined (_S_IFDIR) && !defined (S_IFDIR) #define S_IFDIR _S_IFDIR #endif #if defined (_S_IFBLK) && !defined (S_IFBLK) #define S_IFBLK _S_IFBLK #endif #if defined (_S_IFREG) && !defined (S_IFREG) #define S_IFREG _S_IFREG #endif #if defined (_S_IFLNK) && !defined (S_IFLNK) #define S_IFLNK _S_IFLNK #endif #if defined (_S_IFSOCK) && !defined (S_IFSOCK) #define S_IFSOCK _S_IFSOCK #endif /* Test for each symbol individually and define the ones necessary (some systems claiming Posix compatibility define some but not all). */ #if defined (S_IFBLK) && !defined (S_ISBLK) #define S_ISBLK(m) (((m)&S_IFMT) == S_IFBLK) /* block device */ #endif #if defined (S_IFCHR) && !defined (S_ISCHR) #define S_ISCHR(m) (((m)&S_IFMT) == S_IFCHR) /* character device */ #endif #if defined (S_IFDIR) && !defined (S_ISDIR) #define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) /* directory */ #endif #if defined (S_IFREG) && !defined (S_ISREG) #define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) /* file */ #endif #if defined (S_IFIFO) && !defined (S_ISFIFO) #define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO) /* fifo - named pipe */ #endif #if defined (S_IFLNK) && !defined (S_ISLNK) #define S_ISLNK(m) (((m)&S_IFMT) == S_IFLNK) /* symbolic link */ #endif #if defined (S_IFSOCK) && !defined (S_ISSOCK) #define S_ISSOCK(m) (((m)&S_IFMT) == S_IFSOCK) /* socket */ #endif /* * POSIX 1003.1 5.6.1.2 File Modes */ #if !defined (S_IRWXU) # if !defined (S_IREAD) # define S_IREAD 00400 # define S_IWRITE 00200 # define S_IEXEC 00100 # endif /* S_IREAD */ # if !defined (S_IRUSR) # define S_IRUSR S_IREAD /* read, owner */ # define S_IWUSR S_IWRITE /* write, owner */ # define S_IXUSR S_IEXEC /* execute, owner */ # define S_IRGRP (S_IREAD >> 3) /* read, group */ # define S_IWGRP (S_IWRITE >> 3) /* write, group */ # define S_IXGRP (S_IEXEC >> 3) /* execute, group */ # define S_IROTH (S_IREAD >> 6) /* read, other */ # define S_IWOTH (S_IWRITE >> 6) /* write, other */ # define S_IXOTH (S_IEXEC >> 6) /* execute, other */ # endif /* !S_IRUSR */ # define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) # define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) # define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) #endif /* !S_IRWXU */ /* These are non-standard, but are used in builtins.c$symbolic_umask() */ #define S_IRUGO (S_IRUSR | S_IRGRP | S_IROTH) #define S_IWUGO (S_IWUSR | S_IWGRP | S_IWOTH) #define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) #endif /* _POSIXSTAT_H_ */ gdb-doc-7.6.2/readline/tcap.h0000644000175000017500000000306312250770610014750 0ustar zumbizumbi/* tcap.h -- termcap library functions and variables. */ /* Copyright (C) 1996-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #if !defined (_RLTCAP_H_) #define _RLTCAP_H_ #if defined (HAVE_CONFIG_H) # include "config.h" #endif #if defined (HAVE_TERMCAP_H) # if defined (__linux__) && !defined (SPEED_T_IN_SYS_TYPES) # include "rltty.h" # endif # include #else /* On Solaris2, sys/types.h #includes sys/reg.h, which #defines PC. Unfortunately, PC is a global variable used by the termcap library. */ #ifdef PC # undef PC #endif extern char PC; extern char *UP, *BC; extern short ospeed; extern int tgetent (); extern int tgetflag (); extern int tgetnum (); extern char *tgetstr (); extern int tputs (); extern char *tgoto (); #endif /* HAVE_TERMCAP_H */ #endif /* !_RLTCAP_H_ */ gdb-doc-7.6.2/readline/isearch.c0000644000175000017500000004707212250770610015442 0ustar zumbizumbi/* isearch.c - incremental searching */ /* **************************************************************** */ /* */ /* I-Search and Searching */ /* */ /* **************************************************************** */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include #endif #include #include #if defined (HAVE_UNISTD_H) # include #endif #if defined (HAVE_STDLIB_H) # include #else # include "ansi_stdlib.h" #endif #include "rldefs.h" #include "rlmbutil.h" #include "readline.h" #include "history.h" #include "rlprivate.h" #include "xmalloc.h" /* Variables exported to other files in the readline library. */ char *_rl_isearch_terminators = (char *)NULL; _rl_search_cxt *_rl_iscxt = 0; /* Variables imported from other files in the readline library. */ extern HIST_ENTRY *_rl_saved_line_for_history; static int rl_search_history PARAMS((int, int)); static _rl_search_cxt *_rl_isearch_init PARAMS((int)); static void _rl_isearch_fini PARAMS((_rl_search_cxt *)); static int _rl_isearch_cleanup PARAMS((_rl_search_cxt *, int)); /* Last line found by the current incremental search, so we don't `find' identical lines many times in a row. Now part of isearch context. */ /* static char *prev_line_found; */ /* Last search string and its length. */ static char *last_isearch_string; static int last_isearch_string_len; static char * const default_isearch_terminators = "\033\012"; _rl_search_cxt * _rl_scxt_alloc (type, flags) int type, flags; { _rl_search_cxt *cxt; cxt = (_rl_search_cxt *)xmalloc (sizeof (_rl_search_cxt)); cxt->type = type; cxt->sflags = flags; cxt->search_string = 0; cxt->search_string_size = cxt->search_string_index = 0; cxt->lines = 0; cxt->allocated_line = 0; cxt->hlen = cxt->hindex = 0; cxt->save_point = rl_point; cxt->save_mark = rl_mark; cxt->save_line = where_history (); cxt->last_found_line = cxt->save_line; cxt->prev_line_found = 0; cxt->save_undo_list = 0; cxt->keymap = _rl_keymap; cxt->okeymap = _rl_keymap; cxt->history_pos = 0; cxt->direction = 0; cxt->lastc = 0; cxt->sline = 0; cxt->sline_len = cxt->sline_index = 0; cxt->search_terminators = 0; return cxt; } void _rl_scxt_dispose (cxt, flags) _rl_search_cxt *cxt; int flags; { FREE (cxt->search_string); FREE (cxt->allocated_line); FREE (cxt->lines); xfree (cxt); } /* Search backwards through the history looking for a string which is typed interactively. Start with the current line. */ int rl_reverse_search_history (sign, key) int sign, key; { return (rl_search_history (-sign, key)); } /* Search forwards through the history looking for a string which is typed interactively. Start with the current line. */ int rl_forward_search_history (sign, key) int sign, key; { return (rl_search_history (sign, key)); } /* Display the current state of the search in the echo-area. SEARCH_STRING contains the string that is being searched for, DIRECTION is zero for forward, or non-zero for reverse, WHERE is the history list number of the current line. If it is -1, then this line is the starting one. */ static void rl_display_search (search_string, reverse_p, where) char *search_string; int reverse_p, where; { char *message; int msglen, searchlen; searchlen = (search_string && *search_string) ? strlen (search_string) : 0; message = (char *)xmalloc (searchlen + 33); msglen = 0; #if defined (NOTDEF) if (where != -1) { sprintf (message, "[%d]", where + history_base); msglen = strlen (message); } #endif /* NOTDEF */ message[msglen++] = '('; if (reverse_p) { strcpy (message + msglen, "reverse-"); msglen += 8; } strcpy (message + msglen, "i-search)`"); msglen += 10; if (search_string) { strcpy (message + msglen, search_string); msglen += searchlen; } strcpy (message + msglen, "': "); rl_message ("%s", message); xfree (message); (*rl_redisplay_function) (); } static _rl_search_cxt * _rl_isearch_init (direction) int direction; { _rl_search_cxt *cxt; register int i; HIST_ENTRY **hlist; cxt = _rl_scxt_alloc (RL_SEARCH_ISEARCH, 0); if (direction < 0) cxt->sflags |= SF_REVERSE; cxt->search_terminators = _rl_isearch_terminators ? _rl_isearch_terminators : default_isearch_terminators; /* Create an arrary of pointers to the lines that we want to search. */ hlist = history_list (); rl_maybe_replace_line (); i = 0; if (hlist) for (i = 0; hlist[i]; i++); /* Allocate space for this many lines, +1 for the current input line, and remember those lines. */ cxt->lines = (char **)xmalloc ((1 + (cxt->hlen = i)) * sizeof (char *)); for (i = 0; i < cxt->hlen; i++) cxt->lines[i] = hlist[i]->line; if (_rl_saved_line_for_history) cxt->lines[i] = _rl_saved_line_for_history->line; else { /* Keep track of this so we can free it. */ cxt->allocated_line = (char *)xmalloc (1 + strlen (rl_line_buffer)); strcpy (cxt->allocated_line, &rl_line_buffer[0]); cxt->lines[i] = cxt->allocated_line; } cxt->hlen++; /* The line where we start the search. */ cxt->history_pos = cxt->save_line; rl_save_prompt (); /* Initialize search parameters. */ cxt->search_string = (char *)xmalloc (cxt->search_string_size = 128); cxt->search_string[cxt->search_string_index = 0] = '\0'; /* Normalize DIRECTION into 1 or -1. */ cxt->direction = (direction >= 0) ? 1 : -1; cxt->sline = rl_line_buffer; cxt->sline_len = strlen (cxt->sline); cxt->sline_index = rl_point; _rl_iscxt = cxt; /* save globally */ return cxt; } static void _rl_isearch_fini (cxt) _rl_search_cxt *cxt; { /* First put back the original state. */ strcpy (rl_line_buffer, cxt->lines[cxt->save_line]); rl_restore_prompt (); /* Save the search string for possible later use. */ FREE (last_isearch_string); last_isearch_string = cxt->search_string; last_isearch_string_len = cxt->search_string_index; cxt->search_string = 0; if (cxt->last_found_line < cxt->save_line) rl_get_previous_history (cxt->save_line - cxt->last_found_line, 0); else rl_get_next_history (cxt->last_found_line - cxt->save_line, 0); /* If the string was not found, put point at the end of the last matching line. If last_found_line == orig_line, we didn't find any matching history lines at all, so put point back in its original position. */ if (cxt->sline_index < 0) { if (cxt->last_found_line == cxt->save_line) cxt->sline_index = cxt->save_point; else cxt->sline_index = strlen (rl_line_buffer); rl_mark = cxt->save_mark; } rl_point = cxt->sline_index; /* Don't worry about where to put the mark here; rl_get_previous_history and rl_get_next_history take care of it. */ rl_clear_message (); } int _rl_search_getchar (cxt) _rl_search_cxt *cxt; { int c; /* Read a key and decide how to proceed. */ RL_SETSTATE(RL_STATE_MOREINPUT); c = cxt->lastc = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) c = cxt->lastc = _rl_read_mbstring (cxt->lastc, cxt->mb, MB_LEN_MAX); #endif return c; } /* Process just-read character C according to isearch context CXT. Return -1 if the caller should just free the context and return, 0 if we should break out of the loop, and 1 if we should continue to read characters. */ int _rl_isearch_dispatch (cxt, c) _rl_search_cxt *cxt; int c; { int n, wstart, wlen, limit, cval; rl_command_func_t *f; f = (rl_command_func_t *)NULL; if (c < 0) { cxt->sflags |= SF_FAILED; cxt->history_pos = cxt->last_found_line; return -1; } /* If we are moving into a new keymap, modify cxt->keymap and go on. This can be a problem if c == ESC and we want to terminate the incremental search, so we check */ if (c >= 0 && cxt->keymap[c].type == ISKMAP && strchr (cxt->search_terminators, cxt->lastc) == 0) { cxt->keymap = FUNCTION_TO_KEYMAP (cxt->keymap, c); cxt->sflags |= SF_CHGKMAP; /* XXX - we should probably save this sequence, so we can do something useful if this doesn't end up mapping to a command. */ return 1; } /* Translate the keys we do something with to opcodes. */ if (c >= 0 && cxt->keymap[c].type == ISFUNC) { f = cxt->keymap[c].function; if (f == rl_reverse_search_history) cxt->lastc = (cxt->sflags & SF_REVERSE) ? -1 : -2; else if (f == rl_forward_search_history) cxt->lastc = (cxt->sflags & SF_REVERSE) ? -2 : -1; else if (f == rl_rubout) cxt->lastc = -3; else if (c == CTRL ('G') || f == rl_abort) cxt->lastc = -4; else if (c == CTRL ('W') || f == rl_unix_word_rubout) /* XXX */ cxt->lastc = -5; else if (c == CTRL ('Y') || f == rl_yank) /* XXX */ cxt->lastc = -6; } /* If we changed the keymap earlier while translating a key sequence into a command, restore it now that we've succeeded. */ if (cxt->sflags & SF_CHGKMAP) { cxt->keymap = cxt->okeymap; cxt->sflags &= ~SF_CHGKMAP; } /* The characters in isearch_terminators (set from the user-settable variable isearch-terminators) are used to terminate the search but not subsequently execute the character as a command. The default value is "\033\012" (ESC and C-J). */ if (cxt->lastc > 0 && strchr (cxt->search_terminators, cxt->lastc)) { /* ESC still terminates the search, but if there is pending input or if input arrives within 0.1 seconds (on systems with select(2)) it is used as a prefix character with rl_execute_next. WATCH OUT FOR THIS! This is intended to allow the arrow keys to be used like ^F and ^B are used to terminate the search and execute the movement command. XXX - since _rl_input_available depends on the application- settable keyboard timeout value, this could alternatively use _rl_input_queued(100000) */ if (cxt->lastc == ESC && _rl_input_available ()) rl_execute_next (ESC); return (0); } #define ENDSRCH_CHAR(c) \ ((CTRL_CHAR (c) || META_CHAR (c) || (c) == RUBOUT) && ((c) != CTRL ('G'))) #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { if (cxt->lastc >= 0 && (cxt->mb[0] && cxt->mb[1] == '\0') && ENDSRCH_CHAR (cxt->lastc)) { /* This sets rl_pending_input to LASTC; it will be picked up the next time rl_read_key is called. */ rl_execute_next (cxt->lastc); return (0); } } else #endif if (cxt->lastc >= 0 && ENDSRCH_CHAR (cxt->lastc)) { /* This sets rl_pending_input to LASTC; it will be picked up the next time rl_read_key is called. */ rl_execute_next (cxt->lastc); return (0); } /* Now dispatch on the character. `Opcodes' affect the search string or state. Other characters are added to the string. */ switch (cxt->lastc) { /* search again */ case -1: if (cxt->search_string_index == 0) { if (last_isearch_string) { cxt->search_string_size = 64 + last_isearch_string_len; cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size); strcpy (cxt->search_string, last_isearch_string); cxt->search_string_index = last_isearch_string_len; rl_display_search (cxt->search_string, (cxt->sflags & SF_REVERSE), -1); break; } return (1); } else if (cxt->sflags & SF_REVERSE) cxt->sline_index--; else if (cxt->sline_index != cxt->sline_len) cxt->sline_index++; else rl_ding (); break; /* switch directions */ case -2: cxt->direction = -cxt->direction; if (cxt->direction < 0) cxt->sflags |= SF_REVERSE; else cxt->sflags &= ~SF_REVERSE; break; /* delete character from search string. */ case -3: /* C-H, DEL */ /* This is tricky. To do this right, we need to keep a stack of search positions for the current search, with sentinels marking the beginning and end. But this will do until we have a real isearch-undo. */ if (cxt->search_string_index == 0) rl_ding (); else cxt->search_string[--cxt->search_string_index] = '\0'; break; case -4: /* C-G, abort */ rl_replace_line (cxt->lines[cxt->save_line], 0); rl_point = cxt->save_point; rl_mark = cxt->save_mark; rl_restore_prompt(); rl_clear_message (); return -1; case -5: /* C-W */ /* skip over portion of line we already matched and yank word */ wstart = rl_point + cxt->search_string_index; if (wstart >= rl_end) { rl_ding (); break; } /* if not in a word, move to one. */ cval = _rl_char_value (rl_line_buffer, wstart); if (_rl_walphabetic (cval) == 0) { rl_ding (); break; } n = MB_NEXTCHAR (rl_line_buffer, wstart, 1, MB_FIND_NONZERO);; while (n < rl_end) { cval = _rl_char_value (rl_line_buffer, n); if (_rl_walphabetic (cval) == 0) break; n = MB_NEXTCHAR (rl_line_buffer, n, 1, MB_FIND_NONZERO);; } wlen = n - wstart + 1; if (cxt->search_string_index + wlen + 1 >= cxt->search_string_size) { cxt->search_string_size += wlen + 1; cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size); } for (; wstart < n; wstart++) cxt->search_string[cxt->search_string_index++] = rl_line_buffer[wstart]; cxt->search_string[cxt->search_string_index] = '\0'; break; case -6: /* C-Y */ /* skip over portion of line we already matched and yank rest */ wstart = rl_point + cxt->search_string_index; if (wstart >= rl_end) { rl_ding (); break; } n = rl_end - wstart + 1; if (cxt->search_string_index + n + 1 >= cxt->search_string_size) { cxt->search_string_size += n + 1; cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size); } for (n = wstart; n < rl_end; n++) cxt->search_string[cxt->search_string_index++] = rl_line_buffer[n]; cxt->search_string[cxt->search_string_index] = '\0'; break; /* Add character to search string and continue search. */ default: if (cxt->search_string_index + 2 >= cxt->search_string_size) { cxt->search_string_size += 128; cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size); } #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { int j, l; for (j = 0, l = strlen (cxt->mb); j < l; ) cxt->search_string[cxt->search_string_index++] = cxt->mb[j++]; } else #endif cxt->search_string[cxt->search_string_index++] = c; cxt->search_string[cxt->search_string_index] = '\0'; break; } for (cxt->sflags &= ~(SF_FOUND|SF_FAILED);; ) { limit = cxt->sline_len - cxt->search_string_index + 1; /* Search the current line. */ while ((cxt->sflags & SF_REVERSE) ? (cxt->sline_index >= 0) : (cxt->sline_index < limit)) { if (STREQN (cxt->search_string, cxt->sline + cxt->sline_index, cxt->search_string_index)) { cxt->sflags |= SF_FOUND; break; } else cxt->sline_index += cxt->direction; } if (cxt->sflags & SF_FOUND) break; /* Move to the next line, but skip new copies of the line we just found and lines shorter than the string we're searching for. */ do { /* Move to the next line. */ cxt->history_pos += cxt->direction; /* At limit for direction? */ if ((cxt->sflags & SF_REVERSE) ? (cxt->history_pos < 0) : (cxt->history_pos == cxt->hlen)) { cxt->sflags |= SF_FAILED; break; } /* We will need these later. */ cxt->sline = cxt->lines[cxt->history_pos]; cxt->sline_len = strlen (cxt->sline); } while ((cxt->prev_line_found && STREQ (cxt->prev_line_found, cxt->lines[cxt->history_pos])) || (cxt->search_string_index > cxt->sline_len)); if (cxt->sflags & SF_FAILED) break; /* Now set up the line for searching... */ cxt->sline_index = (cxt->sflags & SF_REVERSE) ? cxt->sline_len - cxt->search_string_index : 0; } if (cxt->sflags & SF_FAILED) { /* We cannot find the search string. Ding the bell. */ rl_ding (); cxt->history_pos = cxt->last_found_line; return 1; } /* We have found the search string. Just display it. But don't actually move there in the history list until the user accepts the location. */ if (cxt->sflags & SF_FOUND) { cxt->prev_line_found = cxt->lines[cxt->history_pos]; rl_replace_line (cxt->lines[cxt->history_pos], 0); rl_point = cxt->sline_index; cxt->last_found_line = cxt->history_pos; rl_display_search (cxt->search_string, (cxt->sflags & SF_REVERSE), (cxt->history_pos == cxt->save_line) ? -1 : cxt->history_pos); } return 1; } static int _rl_isearch_cleanup (cxt, r) _rl_search_cxt *cxt; int r; { if (r >= 0) _rl_isearch_fini (cxt); _rl_scxt_dispose (cxt, 0); _rl_iscxt = 0; RL_UNSETSTATE(RL_STATE_ISEARCH); return (r != 0); } /* Search through the history looking for an interactively typed string. This is analogous to i-search. We start the search in the current line. DIRECTION is which direction to search; >= 0 means forward, < 0 means backwards. */ static int rl_search_history (direction, invoking_key) int direction, invoking_key; { _rl_search_cxt *cxt; /* local for now, but saved globally */ int c, r; RL_SETSTATE(RL_STATE_ISEARCH); cxt = _rl_isearch_init (direction); rl_display_search (cxt->search_string, (cxt->sflags & SF_REVERSE), -1); /* If we are using the callback interface, all we do is set up here and return. The key is that we leave RL_STATE_ISEARCH set. */ if (RL_ISSTATE (RL_STATE_CALLBACK)) return (0); r = -1; for (;;) { c = _rl_search_getchar (cxt); /* We might want to handle EOF here (c == 0) */ r = _rl_isearch_dispatch (cxt, cxt->lastc); if (r <= 0) break; } /* The searching is over. The user may have found the string that she was looking for, or else she may have exited a failing search. If LINE_INDEX is -1, then that shows that the string searched for was not found. We use this to determine where to place rl_point. */ return (_rl_isearch_cleanup (cxt, r)); } #if defined (READLINE_CALLBACKS) /* Called from the callback functions when we are ready to read a key. The callback functions know to call this because RL_ISSTATE(RL_STATE_ISEARCH). If _rl_isearch_dispatch finishes searching, this function is responsible for turning off RL_STATE_ISEARCH, which it does using _rl_isearch_cleanup. */ int _rl_isearch_callback (cxt) _rl_search_cxt *cxt; { int c, r; c = _rl_search_getchar (cxt); /* We might want to handle EOF here */ r = _rl_isearch_dispatch (cxt, cxt->lastc); return (r <= 0) ? _rl_isearch_cleanup (cxt, r) : 0; } #endif gdb-doc-7.6.2/readline/savestring.c0000644000175000017500000000241212250770610016176 0ustar zumbizumbi/* savestring.c - function version of savestring for backwards compatibility */ /* Copyright (C) 1998,2003 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #define READLINE_LIBRARY #include #ifdef HAVE_STRING_H # include #endif #include "xmalloc.h" /* Backwards compatibility, now that savestring has been removed from all `public' readline header files. */ char * savestring (s) const char *s; { char *ret; ret = (char *)xmalloc (strlen (s) + 1); strcpy (ret, s); return ret; } gdb-doc-7.6.2/readline/posixdir.h0000644000175000017500000000365012250770610015664 0ustar zumbizumbi/* posixdir.h -- Posix directory reading includes and defines. */ /* Copyright (C) 1987,1991 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. Bash 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 3 of the License, or (at your option) any later version. Bash 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 Bash. If not, see . */ /* This file should be included instead of or . */ #if !defined (_POSIXDIR_H_) #define _POSIXDIR_H_ #if defined (HAVE_DIRENT_H) # include # if defined (HAVE_STRUCT_DIRENT_D_NAMLEN) # define D_NAMLEN(d) ((d)->d_namlen) # else # define D_NAMLEN(d) (strlen ((d)->d_name)) # endif /* !HAVE_STRUCT_DIRENT_D_NAMLEN */ #else # if defined (HAVE_SYS_NDIR_H) # include # endif # if defined (HAVE_SYS_DIR_H) # include # endif # if defined (HAVE_NDIR_H) # include # endif # if !defined (dirent) # define dirent direct # endif /* !dirent */ # define D_NAMLEN(d) ((d)->d_namlen) #endif /* !HAVE_DIRENT_H */ #if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (HAVE_STRUCT_DIRENT_D_FILENO) # define d_fileno d_ino #endif #if defined (_POSIX_SOURCE) && (!defined (HAVE_STRUCT_DIRENT_D_INO) || defined (BROKEN_DIRENT_D_INO)) /* Posix does not require that the d_ino field be present, and some systems do not provide it. */ # define REAL_DIR_ENTRY(dp) 1 #else # define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) #endif /* _POSIX_SOURCE */ #endif /* !_POSIXDIR_H_ */ gdb-doc-7.6.2/readline/history.h0000644000175000017500000002353612250770610015531 0ustar zumbizumbi/* history.h -- the names of functions that you can call in history. */ /* Copyright (C) 1989-2009 Free Software Foundation, Inc. This file contains the GNU History Library (History), a set of routines for managing the text of previously typed lines. History 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 3 of the License, or (at your option) any later version. History 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 History. If not, see . */ #ifndef _HISTORY_H_ #define _HISTORY_H_ #ifdef __cplusplus extern "C" { #endif #include /* XXX - for history timestamp code */ #if defined READLINE_LIBRARY # include "rlstdc.h" # include "rltypedefs.h" #else # include # include #endif #ifdef __STDC__ typedef void *histdata_t; #else typedef char *histdata_t; #endif /* The structure used to store a history entry. */ typedef struct _hist_entry { char *line; char *timestamp; /* char * rather than time_t for read/write */ histdata_t data; } HIST_ENTRY; /* Size of the history-library-managed space in history entry HS. */ #define HISTENT_BYTES(hs) (strlen ((hs)->line) + strlen ((hs)->timestamp)) /* A structure used to pass the current state of the history stuff around. */ typedef struct _hist_state { HIST_ENTRY **entries; /* Pointer to the entries themselves. */ int offset; /* The location pointer within this array. */ int length; /* Number of elements within this array. */ int size; /* Number of slots allocated to this array. */ int flags; } HISTORY_STATE; /* Flag values for the `flags' member of HISTORY_STATE. */ #define HS_STIFLED 0x01 /* Initialization and state management. */ /* Begin a session in which the history functions might be used. This just initializes the interactive variables. */ extern void using_history PARAMS((void)); /* Return the current HISTORY_STATE of the history. */ extern HISTORY_STATE *history_get_history_state PARAMS((void)); /* Set the state of the current history array to STATE. */ extern void history_set_history_state PARAMS((HISTORY_STATE *)); /* Manage the history list. */ /* Place STRING at the end of the history list. The associated data field (if any) is set to NULL. */ extern void add_history PARAMS((const char *)); /* Change the timestamp associated with the most recent history entry to STRING. */ extern void add_history_time PARAMS((const char *)); /* A reasonably useless function, only here for completeness. WHICH is the magic number that tells us which element to delete. The elements are numbered from 0. */ extern HIST_ENTRY *remove_history PARAMS((int)); /* Free the history entry H and return any application-specific data associated with it. */ extern histdata_t free_history_entry PARAMS((HIST_ENTRY *)); /* Make the history entry at WHICH have LINE and DATA. This returns the old entry so you can dispose of the data. In the case of an invalid WHICH, a NULL pointer is returned. */ extern HIST_ENTRY *replace_history_entry PARAMS((int, const char *, histdata_t)); /* Clear the history list and start over. */ extern void clear_history PARAMS((void)); /* Stifle the history list, remembering only MAX number of entries. */ extern void stifle_history PARAMS((int)); /* Stop stifling the history. This returns the previous amount the history was stifled by. The value is positive if the history was stifled, negative if it wasn't. */ extern int unstifle_history PARAMS((void)); /* Return 1 if the history is stifled, 0 if it is not. */ extern int history_is_stifled PARAMS((void)); /* Information about the history list. */ /* Return a NULL terminated array of HIST_ENTRY which is the current input history. Element 0 of this list is the beginning of time. If there is no history, return NULL. */ extern HIST_ENTRY **history_list PARAMS((void)); /* Returns the number which says what history element we are now looking at. */ extern int where_history PARAMS((void)); /* Return the history entry at the current position, as determined by history_offset. If there is no entry there, return a NULL pointer. */ extern HIST_ENTRY *current_history PARAMS((void)); /* Return the history entry which is logically at OFFSET in the history array. OFFSET is relative to history_base. */ extern HIST_ENTRY *history_get PARAMS((int)); /* Return the timestamp associated with the HIST_ENTRY * passed as an argument */ extern time_t history_get_time PARAMS((HIST_ENTRY *)); /* Return the number of bytes that the primary history entries are using. This just adds up the lengths of the_history->lines. */ extern int history_total_bytes PARAMS((void)); /* Moving around the history list. */ /* Set the position in the history list to POS. */ extern int history_set_pos PARAMS((int)); /* Back up history_offset to the previous history entry, and return a pointer to that entry. If there is no previous entry, return a NULL pointer. */ extern HIST_ENTRY *previous_history PARAMS((void)); /* Move history_offset forward to the next item in the input_history, and return the a pointer to that entry. If there is no next entry, return a NULL pointer. */ extern HIST_ENTRY *next_history PARAMS((void)); /* Searching the history list. */ /* Search the history for STRING, starting at history_offset. If DIRECTION < 0, then the search is through previous entries, else through subsequent. If the string is found, then current_history () is the history entry, and the value of this function is the offset in the line of that history entry that the string was found in. Otherwise, nothing is changed, and a -1 is returned. */ extern int history_search PARAMS((const char *, int)); /* Search the history for STRING, starting at history_offset. The search is anchored: matching lines must begin with string. DIRECTION is as in history_search(). */ extern int history_search_prefix PARAMS((const char *, int)); /* Search for STRING in the history list, starting at POS, an absolute index into the list. DIR, if negative, says to search backwards from POS, else forwards. Returns the absolute index of the history element where STRING was found, or -1 otherwise. */ extern int history_search_pos PARAMS((const char *, int, int)); /* Managing the history file. */ /* Add the contents of FILENAME to the history list, a line at a time. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ extern int read_history PARAMS((const char *)); /* Read a range of lines from FILENAME, adding them to the history list. Start reading at the FROM'th line and end at the TO'th. If FROM is zero, start at the beginning. If TO is less than FROM, read until the end of the file. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ extern int read_history_range PARAMS((const char *, int, int)); /* Write the current history to FILENAME. If FILENAME is NULL, then write the history list to ~/.history. Values returned are as in read_history (). */ extern int write_history PARAMS((const char *)); /* Append NELEMENT entries to FILENAME. The entries appended are from the end of the list minus NELEMENTs up to the end of the list. */ extern int append_history PARAMS((int, const char *)); /* Truncate the history file, leaving only the last NLINES lines. */ extern int history_truncate_file PARAMS((const char *, int)); /* History expansion. */ /* Expand the string STRING, placing the result into OUTPUT, a pointer to a string. Returns: 0) If no expansions took place (or, if the only change in the text was the de-slashifying of the history expansion character) 1) If expansions did take place -1) If there was an error in expansion. 2) If the returned line should just be printed. If an error ocurred in expansion, then OUTPUT contains a descriptive error message. */ extern int history_expand PARAMS((char *, char **)); /* Extract a string segment consisting of the FIRST through LAST arguments present in STRING. Arguments are broken up as in the shell. */ extern char *history_arg_extract PARAMS((int, int, const char *)); /* Return the text of the history event beginning at the current offset into STRING. Pass STRING with *INDEX equal to the history_expansion_char that begins this specification. DELIMITING_QUOTE is a character that is allowed to end the string specification for what to search for in addition to the normal characters `:', ` ', `\t', `\n', and sometimes `?'. */ extern char *get_history_event PARAMS((const char *, int *, int)); /* Return an array of tokens, much as the shell might. The tokens are parsed out of STRING. */ extern char **history_tokenize PARAMS((const char *)); /* Exported history variables. */ extern int history_base; extern int history_length; extern int history_max_entries; extern char history_expansion_char; extern char history_subst_char; extern char *history_word_delimiters; extern char history_comment_char; extern char *history_no_expand_chars; extern char *history_search_delimiter_chars; extern int history_quotes_inhibit_expansion; extern int history_write_timestamps; /* Backwards compatibility */ extern int max_input_history; /* If set, this function is called to decide whether or not a particular history expansion should be treated as a special case for the calling application and not expanded. */ extern rl_linebuf_func_t *history_inhibit_expansion_function; #ifdef __cplusplus } #endif #endif /* !_HISTORY_H_ */ gdb-doc-7.6.2/readline/emacs_keymap.c0000644000175000017500000011172712250770610016461 0ustar zumbizumbi/* emacs_keymap.c -- the keymap for emacs_mode in readline (). */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #if !defined (BUFSIZ) #include #endif /* !BUFSIZ */ #include "readline.h" /* An array of function pointers, one for each possible key. If the type byte is ISKMAP, then the pointer is the address of a keymap. */ KEYMAP_ENTRY_ARRAY emacs_standard_keymap = { /* Control keys. */ { ISFUNC, rl_set_mark }, /* Control-@ */ { ISFUNC, rl_beg_of_line }, /* Control-a */ { ISFUNC, rl_backward_char }, /* Control-b */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */ { ISFUNC, rl_delete }, /* Control-d */ { ISFUNC, rl_end_of_line }, /* Control-e */ { ISFUNC, rl_forward_char }, /* Control-f */ { ISFUNC, rl_abort }, /* Control-g */ { ISFUNC, rl_rubout }, /* Control-h */ { ISFUNC, rl_complete }, /* Control-i */ { ISFUNC, rl_newline }, /* Control-j */ { ISFUNC, rl_kill_line }, /* Control-k */ { ISFUNC, rl_clear_screen }, /* Control-l */ { ISFUNC, rl_newline }, /* Control-m */ { ISFUNC, rl_get_next_history }, /* Control-n */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */ { ISFUNC, rl_get_previous_history }, /* Control-p */ { ISFUNC, rl_quoted_insert }, /* Control-q */ { ISFUNC, rl_reverse_search_history }, /* Control-r */ { ISFUNC, rl_forward_search_history }, /* Control-s */ { ISFUNC, rl_transpose_chars }, /* Control-t */ { ISFUNC, rl_unix_line_discard }, /* Control-u */ { ISFUNC, rl_quoted_insert }, /* Control-v */ { ISFUNC, rl_unix_word_rubout }, /* Control-w */ { ISKMAP, (rl_command_func_t *)emacs_ctlx_keymap }, /* Control-x */ { ISFUNC, rl_yank }, /* Control-y */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */ { ISKMAP, (rl_command_func_t *)emacs_meta_keymap }, /* Control-[ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */ { ISFUNC, rl_char_search }, /* Control-] */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */ { ISFUNC, rl_undo_command }, /* Control-_ */ /* The start of printing characters. */ { ISFUNC, rl_insert }, /* SPACE */ { ISFUNC, rl_insert }, /* ! */ { ISFUNC, rl_insert }, /* " */ { ISFUNC, rl_insert }, /* # */ { ISFUNC, rl_insert }, /* $ */ { ISFUNC, rl_insert }, /* % */ { ISFUNC, rl_insert }, /* & */ { ISFUNC, rl_insert }, /* ' */ { ISFUNC, rl_insert }, /* ( */ { ISFUNC, rl_insert }, /* ) */ { ISFUNC, rl_insert }, /* * */ { ISFUNC, rl_insert }, /* + */ { ISFUNC, rl_insert }, /* , */ { ISFUNC, rl_insert }, /* - */ { ISFUNC, rl_insert }, /* . */ { ISFUNC, rl_insert }, /* / */ /* Regular digits. */ { ISFUNC, rl_insert }, /* 0 */ { ISFUNC, rl_insert }, /* 1 */ { ISFUNC, rl_insert }, /* 2 */ { ISFUNC, rl_insert }, /* 3 */ { ISFUNC, rl_insert }, /* 4 */ { ISFUNC, rl_insert }, /* 5 */ { ISFUNC, rl_insert }, /* 6 */ { ISFUNC, rl_insert }, /* 7 */ { ISFUNC, rl_insert }, /* 8 */ { ISFUNC, rl_insert }, /* 9 */ /* A little more punctuation. */ { ISFUNC, rl_insert }, /* : */ { ISFUNC, rl_insert }, /* ; */ { ISFUNC, rl_insert }, /* < */ { ISFUNC, rl_insert }, /* = */ { ISFUNC, rl_insert }, /* > */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* @ */ /* Uppercase alphabet. */ { ISFUNC, rl_insert }, /* A */ { ISFUNC, rl_insert }, /* B */ { ISFUNC, rl_insert }, /* C */ { ISFUNC, rl_insert }, /* D */ { ISFUNC, rl_insert }, /* E */ { ISFUNC, rl_insert }, /* F */ { ISFUNC, rl_insert }, /* G */ { ISFUNC, rl_insert }, /* H */ { ISFUNC, rl_insert }, /* I */ { ISFUNC, rl_insert }, /* J */ { ISFUNC, rl_insert }, /* K */ { ISFUNC, rl_insert }, /* L */ { ISFUNC, rl_insert }, /* M */ { ISFUNC, rl_insert }, /* N */ { ISFUNC, rl_insert }, /* O */ { ISFUNC, rl_insert }, /* P */ { ISFUNC, rl_insert }, /* Q */ { ISFUNC, rl_insert }, /* R */ { ISFUNC, rl_insert }, /* S */ { ISFUNC, rl_insert }, /* T */ { ISFUNC, rl_insert }, /* U */ { ISFUNC, rl_insert }, /* V */ { ISFUNC, rl_insert }, /* W */ { ISFUNC, rl_insert }, /* X */ { ISFUNC, rl_insert }, /* Y */ { ISFUNC, rl_insert }, /* Z */ /* Some more punctuation. */ { ISFUNC, rl_insert }, /* [ */ { ISFUNC, rl_insert }, /* \ */ { ISFUNC, rl_insert }, /* ] */ { ISFUNC, rl_insert }, /* ^ */ { ISFUNC, rl_insert }, /* _ */ { ISFUNC, rl_insert }, /* ` */ /* Lowercase alphabet. */ { ISFUNC, rl_insert }, /* a */ { ISFUNC, rl_insert }, /* b */ { ISFUNC, rl_insert }, /* c */ { ISFUNC, rl_insert }, /* d */ { ISFUNC, rl_insert }, /* e */ { ISFUNC, rl_insert }, /* f */ { ISFUNC, rl_insert }, /* g */ { ISFUNC, rl_insert }, /* h */ { ISFUNC, rl_insert }, /* i */ { ISFUNC, rl_insert }, /* j */ { ISFUNC, rl_insert }, /* k */ { ISFUNC, rl_insert }, /* l */ { ISFUNC, rl_insert }, /* m */ { ISFUNC, rl_insert }, /* n */ { ISFUNC, rl_insert }, /* o */ { ISFUNC, rl_insert }, /* p */ { ISFUNC, rl_insert }, /* q */ { ISFUNC, rl_insert }, /* r */ { ISFUNC, rl_insert }, /* s */ { ISFUNC, rl_insert }, /* t */ { ISFUNC, rl_insert }, /* u */ { ISFUNC, rl_insert }, /* v */ { ISFUNC, rl_insert }, /* w */ { ISFUNC, rl_insert }, /* x */ { ISFUNC, rl_insert }, /* y */ { ISFUNC, rl_insert }, /* z */ /* Final punctuation. */ { ISFUNC, rl_insert }, /* { */ { ISFUNC, rl_insert }, /* | */ { ISFUNC, rl_insert }, /* } */ { ISFUNC, rl_insert }, /* ~ */ { ISFUNC, rl_rubout }, /* RUBOUT */ #if KEYMAP_SIZE > 128 /* Pure 8-bit characters (128 - 159). These might be used in some character sets. */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ { ISFUNC, rl_insert }, /* ? */ /* ISO Latin-1 characters (160 - 255) */ { ISFUNC, rl_insert }, /* No-break space */ { ISFUNC, rl_insert }, /* Inverted exclamation mark */ { ISFUNC, rl_insert }, /* Cent sign */ { ISFUNC, rl_insert }, /* Pound sign */ { ISFUNC, rl_insert }, /* Currency sign */ { ISFUNC, rl_insert }, /* Yen sign */ { ISFUNC, rl_insert }, /* Broken bar */ { ISFUNC, rl_insert }, /* Section sign */ { ISFUNC, rl_insert }, /* Diaeresis */ { ISFUNC, rl_insert }, /* Copyright sign */ { ISFUNC, rl_insert }, /* Feminine ordinal indicator */ { ISFUNC, rl_insert }, /* Left pointing double angle quotation mark */ { ISFUNC, rl_insert }, /* Not sign */ { ISFUNC, rl_insert }, /* Soft hyphen */ { ISFUNC, rl_insert }, /* Registered sign */ { ISFUNC, rl_insert }, /* Macron */ { ISFUNC, rl_insert }, /* Degree sign */ { ISFUNC, rl_insert }, /* Plus-minus sign */ { ISFUNC, rl_insert }, /* Superscript two */ { ISFUNC, rl_insert }, /* Superscript three */ { ISFUNC, rl_insert }, /* Acute accent */ { ISFUNC, rl_insert }, /* Micro sign */ { ISFUNC, rl_insert }, /* Pilcrow sign */ { ISFUNC, rl_insert }, /* Middle dot */ { ISFUNC, rl_insert }, /* Cedilla */ { ISFUNC, rl_insert }, /* Superscript one */ { ISFUNC, rl_insert }, /* Masculine ordinal indicator */ { ISFUNC, rl_insert }, /* Right pointing double angle quotation mark */ { ISFUNC, rl_insert }, /* Vulgar fraction one quarter */ { ISFUNC, rl_insert }, /* Vulgar fraction one half */ { ISFUNC, rl_insert }, /* Vulgar fraction three quarters */ { ISFUNC, rl_insert }, /* Inverted questionk mark */ { ISFUNC, rl_insert }, /* Latin capital letter a with grave */ { ISFUNC, rl_insert }, /* Latin capital letter a with acute */ { ISFUNC, rl_insert }, /* Latin capital letter a with circumflex */ { ISFUNC, rl_insert }, /* Latin capital letter a with tilde */ { ISFUNC, rl_insert }, /* Latin capital letter a with diaeresis */ { ISFUNC, rl_insert }, /* Latin capital letter a with ring above */ { ISFUNC, rl_insert }, /* Latin capital letter ae */ { ISFUNC, rl_insert }, /* Latin capital letter c with cedilla */ { ISFUNC, rl_insert }, /* Latin capital letter e with grave */ { ISFUNC, rl_insert }, /* Latin capital letter e with acute */ { ISFUNC, rl_insert }, /* Latin capital letter e with circumflex */ { ISFUNC, rl_insert }, /* Latin capital letter e with diaeresis */ { ISFUNC, rl_insert }, /* Latin capital letter i with grave */ { ISFUNC, rl_insert }, /* Latin capital letter i with acute */ { ISFUNC, rl_insert }, /* Latin capital letter i with circumflex */ { ISFUNC, rl_insert }, /* Latin capital letter i with diaeresis */ { ISFUNC, rl_insert }, /* Latin capital letter eth (Icelandic) */ { ISFUNC, rl_insert }, /* Latin capital letter n with tilde */ { ISFUNC, rl_insert }, /* Latin capital letter o with grave */ { ISFUNC, rl_insert }, /* Latin capital letter o with acute */ { ISFUNC, rl_insert }, /* Latin capital letter o with circumflex */ { ISFUNC, rl_insert }, /* Latin capital letter o with tilde */ { ISFUNC, rl_insert }, /* Latin capital letter o with diaeresis */ { ISFUNC, rl_insert }, /* Multiplication sign */ { ISFUNC, rl_insert }, /* Latin capital letter o with stroke */ { ISFUNC, rl_insert }, /* Latin capital letter u with grave */ { ISFUNC, rl_insert }, /* Latin capital letter u with acute */ { ISFUNC, rl_insert }, /* Latin capital letter u with circumflex */ { ISFUNC, rl_insert }, /* Latin capital letter u with diaeresis */ { ISFUNC, rl_insert }, /* Latin capital letter Y with acute */ { ISFUNC, rl_insert }, /* Latin capital letter thorn (Icelandic) */ { ISFUNC, rl_insert }, /* Latin small letter sharp s (German) */ #ifndef __MINGW32__ { ISFUNC, rl_insert }, /* Latin small letter a with grave */ #else /* Temporary - this is a bug in readline 5.1 that should be fixed in readline 5.2. */ { ISFUNC, 0 }, /* Must leave this unbound for the arrow keys to work. */ #endif { ISFUNC, rl_insert }, /* Latin small letter a with acute */ { ISFUNC, rl_insert }, /* Latin small letter a with circumflex */ { ISFUNC, rl_insert }, /* Latin small letter a with tilde */ { ISFUNC, rl_insert }, /* Latin small letter a with diaeresis */ { ISFUNC, rl_insert }, /* Latin small letter a with ring above */ { ISFUNC, rl_insert }, /* Latin small letter ae */ { ISFUNC, rl_insert }, /* Latin small letter c with cedilla */ { ISFUNC, rl_insert }, /* Latin small letter e with grave */ { ISFUNC, rl_insert }, /* Latin small letter e with acute */ { ISFUNC, rl_insert }, /* Latin small letter e with circumflex */ { ISFUNC, rl_insert }, /* Latin small letter e with diaeresis */ { ISFUNC, rl_insert }, /* Latin small letter i with grave */ { ISFUNC, rl_insert }, /* Latin small letter i with acute */ { ISFUNC, rl_insert }, /* Latin small letter i with circumflex */ { ISFUNC, rl_insert }, /* Latin small letter i with diaeresis */ { ISFUNC, rl_insert }, /* Latin small letter eth (Icelandic) */ { ISFUNC, rl_insert }, /* Latin small letter n with tilde */ { ISFUNC, rl_insert }, /* Latin small letter o with grave */ { ISFUNC, rl_insert }, /* Latin small letter o with acute */ { ISFUNC, rl_insert }, /* Latin small letter o with circumflex */ { ISFUNC, rl_insert }, /* Latin small letter o with tilde */ { ISFUNC, rl_insert }, /* Latin small letter o with diaeresis */ { ISFUNC, rl_insert }, /* Division sign */ { ISFUNC, rl_insert }, /* Latin small letter o with stroke */ { ISFUNC, rl_insert }, /* Latin small letter u with grave */ { ISFUNC, rl_insert }, /* Latin small letter u with acute */ { ISFUNC, rl_insert }, /* Latin small letter u with circumflex */ { ISFUNC, rl_insert }, /* Latin small letter u with diaeresis */ { ISFUNC, rl_insert }, /* Latin small letter y with acute */ { ISFUNC, rl_insert }, /* Latin small letter thorn (Icelandic) */ { ISFUNC, rl_insert } /* Latin small letter y with diaeresis */ #endif /* KEYMAP_SIZE > 128 */ }; KEYMAP_ENTRY_ARRAY emacs_meta_keymap = { /* Meta keys. Just like above, but the high bit is set. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-@ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-a */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-b */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-c */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-d */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-e */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-f */ { ISFUNC, rl_abort }, /* Meta-Control-g */ { ISFUNC, rl_backward_kill_word }, /* Meta-Control-h */ { ISFUNC, rl_tab_insert }, /* Meta-Control-i */ { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-j */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-k */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-l */ { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-m */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-n */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-o */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-p */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-q */ { ISFUNC, rl_revert_line }, /* Meta-Control-r */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-s */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-t */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-u */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-v */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-w */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-x */ { ISFUNC, rl_yank_nth_arg }, /* Meta-Control-y */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-z */ { ISFUNC, rl_complete }, /* Meta-Control-[ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-\ */ { ISFUNC, rl_backward_char_search }, /* Meta-Control-] */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-^ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-_ */ /* The start of printing characters. */ { ISFUNC, rl_set_mark }, /* Meta-SPACE */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-! */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-" */ { ISFUNC, rl_insert_comment }, /* Meta-# */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-$ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-% */ { ISFUNC, rl_tilde_expand }, /* Meta-& */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-' */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-( */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-) */ { ISFUNC, rl_insert_completions }, /* Meta-* */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-+ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-, */ { ISFUNC, rl_digit_argument }, /* Meta-- */ { ISFUNC, rl_yank_last_arg}, /* Meta-. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-/ */ /* Regular digits. */ { ISFUNC, rl_digit_argument }, /* Meta-0 */ { ISFUNC, rl_digit_argument }, /* Meta-1 */ { ISFUNC, rl_digit_argument }, /* Meta-2 */ { ISFUNC, rl_digit_argument }, /* Meta-3 */ { ISFUNC, rl_digit_argument }, /* Meta-4 */ { ISFUNC, rl_digit_argument }, /* Meta-5 */ { ISFUNC, rl_digit_argument }, /* Meta-6 */ { ISFUNC, rl_digit_argument }, /* Meta-7 */ { ISFUNC, rl_digit_argument }, /* Meta-8 */ { ISFUNC, rl_digit_argument }, /* Meta-9 */ /* A little more punctuation. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-: */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-; */ { ISFUNC, rl_beginning_of_history }, /* Meta-< */ { ISFUNC, rl_possible_completions }, /* Meta-= */ { ISFUNC, rl_end_of_history }, /* Meta-> */ { ISFUNC, rl_possible_completions }, /* Meta-? */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-@ */ /* Uppercase alphabet. */ { ISFUNC, rl_do_lowercase_version }, /* Meta-A */ { ISFUNC, rl_do_lowercase_version }, /* Meta-B */ { ISFUNC, rl_do_lowercase_version }, /* Meta-C */ { ISFUNC, rl_do_lowercase_version }, /* Meta-D */ { ISFUNC, rl_do_lowercase_version }, /* Meta-E */ { ISFUNC, rl_do_lowercase_version }, /* Meta-F */ { ISFUNC, rl_do_lowercase_version }, /* Meta-G */ { ISFUNC, rl_do_lowercase_version }, /* Meta-H */ { ISFUNC, rl_do_lowercase_version }, /* Meta-I */ { ISFUNC, rl_do_lowercase_version }, /* Meta-J */ { ISFUNC, rl_do_lowercase_version }, /* Meta-K */ { ISFUNC, rl_do_lowercase_version }, /* Meta-L */ { ISFUNC, rl_do_lowercase_version }, /* Meta-M */ { ISFUNC, rl_do_lowercase_version }, /* Meta-N */ { ISFUNC, rl_do_lowercase_version }, /* Meta-O */ { ISFUNC, rl_do_lowercase_version }, /* Meta-P */ { ISFUNC, rl_do_lowercase_version }, /* Meta-Q */ { ISFUNC, rl_do_lowercase_version }, /* Meta-R */ { ISFUNC, rl_do_lowercase_version }, /* Meta-S */ { ISFUNC, rl_do_lowercase_version }, /* Meta-T */ { ISFUNC, rl_do_lowercase_version }, /* Meta-U */ { ISFUNC, rl_do_lowercase_version }, /* Meta-V */ { ISFUNC, rl_do_lowercase_version }, /* Meta-W */ { ISFUNC, rl_do_lowercase_version }, /* Meta-X */ { ISFUNC, rl_do_lowercase_version }, /* Meta-Y */ { ISFUNC, rl_do_lowercase_version }, /* Meta-Z */ /* Some more punctuation. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-[ */ /* was rl_arrow_keys */ { ISFUNC, rl_delete_horizontal_space }, /* Meta-\ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-] */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-^ */ { ISFUNC, rl_yank_last_arg }, /* Meta-_ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-` */ /* Lowercase alphabet. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-a */ { ISFUNC, rl_backward_word }, /* Meta-b */ { ISFUNC, rl_capitalize_word }, /* Meta-c */ { ISFUNC, rl_kill_word }, /* Meta-d */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-e */ { ISFUNC, rl_forward_word }, /* Meta-f */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-g */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-h */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-i */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-j */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-k */ { ISFUNC, rl_downcase_word }, /* Meta-l */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-m */ { ISFUNC, rl_noninc_forward_search }, /* Meta-n */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-o */ /* was rl_arrow_keys */ { ISFUNC, rl_noninc_reverse_search }, /* Meta-p */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-q */ { ISFUNC, rl_revert_line }, /* Meta-r */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-s */ { ISFUNC, rl_transpose_words }, /* Meta-t */ { ISFUNC, rl_upcase_word }, /* Meta-u */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-v */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-w */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-x */ { ISFUNC, rl_yank_pop }, /* Meta-y */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-z */ /* Final punctuation. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-{ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-| */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-} */ { ISFUNC, rl_tilde_expand }, /* Meta-~ */ { ISFUNC, rl_backward_kill_word }, /* Meta-rubout */ #if KEYMAP_SIZE > 128 /* Undefined keys. */ { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 } #endif /* KEYMAP_SIZE > 128 */ }; KEYMAP_ENTRY_ARRAY emacs_ctlx_keymap = { /* Control keys. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-a */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-b */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-d */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-e */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-f */ { ISFUNC, rl_abort }, /* Control-g */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-h */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-i */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-j */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-k */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-l */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-m */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-n */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-p */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-q */ { ISFUNC, rl_re_read_init_file }, /* Control-r */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-s */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-t */ { ISFUNC, rl_undo_command }, /* Control-u */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-v */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-w */ { ISFUNC, rl_exchange_point_and_mark }, /* Control-x */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-y */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-[ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-] */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-_ */ /* The start of printing characters. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* SPACE */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ! */ { ISFUNC, (rl_command_func_t *)0x0 }, /* " */ { ISFUNC, (rl_command_func_t *)0x0 }, /* # */ { ISFUNC, (rl_command_func_t *)0x0 }, /* $ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* % */ { ISFUNC, (rl_command_func_t *)0x0 }, /* & */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ' */ { ISFUNC, rl_start_kbd_macro }, /* ( */ { ISFUNC, rl_end_kbd_macro }, /* ) */ { ISFUNC, (rl_command_func_t *)0x0 }, /* * */ { ISFUNC, (rl_command_func_t *)0x0 }, /* + */ { ISFUNC, (rl_command_func_t *)0x0 }, /* , */ { ISFUNC, (rl_command_func_t *)0x0 }, /* - */ { ISFUNC, (rl_command_func_t *)0x0 }, /* . */ { ISFUNC, (rl_command_func_t *)0x0 }, /* / */ /* Regular digits. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* 0 */ { ISFUNC, (rl_command_func_t *)0x0 }, /* 1 */ { ISFUNC, (rl_command_func_t *)0x0 }, /* 2 */ { ISFUNC, (rl_command_func_t *)0x0 }, /* 3 */ { ISFUNC, (rl_command_func_t *)0x0 }, /* 4 */ { ISFUNC, (rl_command_func_t *)0x0 }, /* 5 */ { ISFUNC, (rl_command_func_t *)0x0 }, /* 6 */ { ISFUNC, (rl_command_func_t *)0x0 }, /* 7 */ { ISFUNC, (rl_command_func_t *)0x0 }, /* 8 */ { ISFUNC, (rl_command_func_t *)0x0 }, /* 9 */ /* A little more punctuation. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* : */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ; */ { ISFUNC, (rl_command_func_t *)0x0 }, /* < */ { ISFUNC, (rl_command_func_t *)0x0 }, /* = */ { ISFUNC, (rl_command_func_t *)0x0 }, /* > */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ? */ { ISFUNC, (rl_command_func_t *)0x0 }, /* @ */ /* Uppercase alphabet. */ { ISFUNC, rl_do_lowercase_version }, /* A */ { ISFUNC, rl_do_lowercase_version }, /* B */ { ISFUNC, rl_do_lowercase_version }, /* C */ { ISFUNC, rl_do_lowercase_version }, /* D */ { ISFUNC, rl_do_lowercase_version }, /* E */ { ISFUNC, rl_do_lowercase_version }, /* F */ { ISFUNC, rl_do_lowercase_version }, /* G */ { ISFUNC, rl_do_lowercase_version }, /* H */ { ISFUNC, rl_do_lowercase_version }, /* I */ { ISFUNC, rl_do_lowercase_version }, /* J */ { ISFUNC, rl_do_lowercase_version }, /* K */ { ISFUNC, rl_do_lowercase_version }, /* L */ { ISFUNC, rl_do_lowercase_version }, /* M */ { ISFUNC, rl_do_lowercase_version }, /* N */ { ISFUNC, rl_do_lowercase_version }, /* O */ { ISFUNC, rl_do_lowercase_version }, /* P */ { ISFUNC, rl_do_lowercase_version }, /* Q */ { ISFUNC, rl_do_lowercase_version }, /* R */ { ISFUNC, rl_do_lowercase_version }, /* S */ { ISFUNC, rl_do_lowercase_version }, /* T */ { ISFUNC, rl_do_lowercase_version }, /* U */ { ISFUNC, rl_do_lowercase_version }, /* V */ { ISFUNC, rl_do_lowercase_version }, /* W */ { ISFUNC, rl_do_lowercase_version }, /* X */ { ISFUNC, rl_do_lowercase_version }, /* Y */ { ISFUNC, rl_do_lowercase_version }, /* Z */ /* Some more punctuation. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* [ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* \ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ] */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ^ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* _ */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ` */ /* Lowercase alphabet. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* a */ { ISFUNC, (rl_command_func_t *)0x0 }, /* b */ { ISFUNC, (rl_command_func_t *)0x0 }, /* c */ { ISFUNC, (rl_command_func_t *)0x0 }, /* d */ { ISFUNC, rl_call_last_kbd_macro }, /* e */ { ISFUNC, (rl_command_func_t *)0x0 }, /* f */ { ISFUNC, (rl_command_func_t *)0x0 }, /* g */ { ISFUNC, (rl_command_func_t *)0x0 }, /* h */ { ISFUNC, (rl_command_func_t *)0x0 }, /* i */ { ISFUNC, (rl_command_func_t *)0x0 }, /* j */ { ISFUNC, (rl_command_func_t *)0x0 }, /* k */ { ISFUNC, (rl_command_func_t *)0x0 }, /* l */ { ISFUNC, (rl_command_func_t *)0x0 }, /* m */ { ISFUNC, (rl_command_func_t *)0x0 }, /* n */ { ISFUNC, (rl_command_func_t *)0x0 }, /* o */ { ISFUNC, (rl_command_func_t *)0x0 }, /* p */ { ISFUNC, (rl_command_func_t *)0x0 }, /* q */ { ISFUNC, (rl_command_func_t *)0x0 }, /* r */ { ISFUNC, (rl_command_func_t *)0x0 }, /* s */ { ISFUNC, (rl_command_func_t *)0x0 }, /* t */ { ISFUNC, (rl_command_func_t *)0x0 }, /* u */ { ISFUNC, (rl_command_func_t *)0x0 }, /* v */ { ISFUNC, (rl_command_func_t *)0x0 }, /* w */ { ISFUNC, (rl_command_func_t *)0x0 }, /* x */ { ISFUNC, (rl_command_func_t *)0x0 }, /* y */ { ISFUNC, (rl_command_func_t *)0x0 }, /* z */ /* Final punctuation. */ { ISFUNC, (rl_command_func_t *)0x0 }, /* { */ { ISFUNC, (rl_command_func_t *)0x0 }, /* | */ { ISFUNC, (rl_command_func_t *)0x0 }, /* } */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ~ */ { ISFUNC, rl_backward_kill_line }, /* RUBOUT */ #if KEYMAP_SIZE > 128 /* Undefined keys. */ { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 }, { ISFUNC, (rl_command_func_t *)0x0 } #endif /* KEYMAP_SIZE > 128 */ }; gdb-doc-7.6.2/readline/bind.c0000644000175000017500000016311012250770610014730 0ustar zumbizumbi/* bind.c -- key binding and startup file support for the readline library. */ /* Copyright (C) 1987-2010 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #define READLINE_LIBRARY #if defined (__TANDEM) # include #endif #if defined (HAVE_CONFIG_H) # include #endif #include #include #include #if defined (HAVE_SYS_FILE_H) # include #endif /* HAVE_SYS_FILE_H */ #if defined (HAVE_UNISTD_H) # include #endif /* HAVE_UNISTD_H */ #if defined (HAVE_STDLIB_H) # include #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #include #if !defined (errno) extern int errno; #endif /* !errno */ #include "posixstat.h" /* System-specific feature definitions and include files. */ #include "rldefs.h" /* Some standard library routines. */ #include "readline.h" #include "history.h" #include "rlprivate.h" #include "rlshell.h" #include "xmalloc.h" #if !defined (strchr) && !defined (__STDC__) extern char *strchr (), *strrchr (); #endif /* !strchr && !__STDC__ */ /* Variables exported by this file. */ Keymap rl_binding_keymap; static char *_rl_read_file PARAMS((char *, size_t *)); static void _rl_init_file_error PARAMS((const char *)); static int _rl_read_init_file PARAMS((const char *, int)); static int glean_key_from_name PARAMS((char *)); static int find_boolean_var PARAMS((const char *)); static char *_rl_get_string_variable_value PARAMS((const char *)); static int substring_member_of_array PARAMS((const char *, const char * const *)); static int currently_reading_init_file; /* used only in this file */ static int _rl_prefer_visible_bell = 1; /* **************************************************************** */ /* */ /* Binding keys */ /* */ /* **************************************************************** */ /* rl_add_defun (char *name, rl_command_func_t *function, int key) Add NAME to the list of named functions. Make FUNCTION be the function that gets called. If KEY is not -1, then bind it. */ int rl_add_defun (name, function, key) const char *name; rl_command_func_t *function; int key; { if (key != -1) rl_bind_key (key, function); rl_add_funmap_entry (name, function); return 0; } /* Bind KEY to FUNCTION. Returns non-zero if KEY is out of range. */ int rl_bind_key (key, function) int key; rl_command_func_t *function; { if (key < 0) return (key); if (META_CHAR (key) && _rl_convert_meta_chars_to_ascii) { if (_rl_keymap[ESC].type == ISKMAP) { Keymap escmap; escmap = FUNCTION_TO_KEYMAP (_rl_keymap, ESC); key = UNMETA (key); escmap[key].type = ISFUNC; escmap[key].function = function; return (0); } return (key); } _rl_keymap[key].type = ISFUNC; _rl_keymap[key].function = function; rl_binding_keymap = _rl_keymap; return (0); } /* Bind KEY to FUNCTION in MAP. Returns non-zero in case of invalid KEY. */ int rl_bind_key_in_map (key, function, map) int key; rl_command_func_t *function; Keymap map; { int result; Keymap oldmap; oldmap = _rl_keymap; _rl_keymap = map; result = rl_bind_key (key, function); _rl_keymap = oldmap; return (result); } /* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. Right now, this is always used to attempt to bind the arrow keys, hence the check for rl_vi_movement_mode. */ int rl_bind_key_if_unbound_in_map (key, default_func, kmap) int key; rl_command_func_t *default_func; Keymap kmap; { char keyseq[2]; keyseq[0] = (unsigned char)key; keyseq[1] = '\0'; return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, kmap)); } int rl_bind_key_if_unbound (key, default_func) int key; rl_command_func_t *default_func; { char keyseq[2]; keyseq[0] = (unsigned char)key; keyseq[1] = '\0'; return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, _rl_keymap)); } /* Make KEY do nothing in the currently selected keymap. Returns non-zero in case of error. */ int rl_unbind_key (key) int key; { return (rl_bind_key (key, (rl_command_func_t *)NULL)); } /* Make KEY do nothing in MAP. Returns non-zero in case of error. */ int rl_unbind_key_in_map (key, map) int key; Keymap map; { return (rl_bind_key_in_map (key, (rl_command_func_t *)NULL, map)); } /* Unbind all keys bound to FUNCTION in MAP. */ int rl_unbind_function_in_map (func, map) rl_command_func_t *func; Keymap map; { register int i, rval; for (i = rval = 0; i < KEYMAP_SIZE; i++) { if (map[i].type == ISFUNC && map[i].function == func) { map[i].function = (rl_command_func_t *)NULL; rval = 1; } } return rval; } int rl_unbind_command_in_map (command, map) const char *command; Keymap map; { rl_command_func_t *func; func = rl_named_function (command); if (func == 0) return 0; return (rl_unbind_function_in_map (func, map)); } /* Bind the key sequence represented by the string KEYSEQ to FUNCTION, starting in the current keymap. This makes new keymaps as necessary. */ int rl_bind_keyseq (keyseq, function) const char *keyseq; rl_command_func_t *function; { return (rl_generic_bind (ISFUNC, keyseq, (char *)function, _rl_keymap)); } /* Bind the key sequence represented by the string KEYSEQ to FUNCTION. This makes new keymaps as necessary. The initial place to do bindings is in MAP. */ int rl_bind_keyseq_in_map (keyseq, function, map) const char *keyseq; rl_command_func_t *function; Keymap map; { return (rl_generic_bind (ISFUNC, keyseq, (char *)function, map)); } /* Backwards compatibility; equivalent to rl_bind_keyseq_in_map() */ int rl_set_key (keyseq, function, map) const char *keyseq; rl_command_func_t *function; Keymap map; { return (rl_generic_bind (ISFUNC, keyseq, (char *)function, map)); } /* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. Right now, this is always used to attempt to bind the arrow keys, hence the check for rl_vi_movement_mode. */ int rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, kmap) const char *keyseq; rl_command_func_t *default_func; Keymap kmap; { rl_command_func_t *func; if (keyseq) { func = rl_function_of_keyseq (keyseq, kmap, (int *)NULL); #if defined (VI_MODE) if (!func || func == rl_do_lowercase_version || func == rl_vi_movement_mode) #else if (!func || func == rl_do_lowercase_version) #endif return (rl_bind_keyseq_in_map (keyseq, default_func, kmap)); else return 1; } return 0; } int rl_bind_keyseq_if_unbound (keyseq, default_func) const char *keyseq; rl_command_func_t *default_func; { return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, _rl_keymap)); } /* Bind the key sequence represented by the string KEYSEQ to the string of characters MACRO. This makes new keymaps as necessary. The initial place to do bindings is in MAP. */ int rl_macro_bind (keyseq, macro, map) const char *keyseq, *macro; Keymap map; { char *macro_keys; int macro_keys_len; macro_keys = (char *)xmalloc ((2 * strlen (macro)) + 1); if (rl_translate_keyseq (macro, macro_keys, ¯o_keys_len)) { xfree (macro_keys); return -1; } rl_generic_bind (ISMACR, keyseq, macro_keys, map); return 0; } /* Bind the key sequence represented by the string KEYSEQ to the arbitrary pointer DATA. TYPE says what kind of data is pointed to by DATA, right now this can be a function (ISFUNC), a macro (ISMACR), or a keymap (ISKMAP). This makes new keymaps as necessary. The initial place to do bindings is in MAP. */ int rl_generic_bind (type, keyseq, data, map) int type; const char *keyseq; char *data; Keymap map; { char *keys; int keys_len; register int i; KEYMAP_ENTRY k; k.function = 0; /* If no keys to bind to, exit right away. */ if (keyseq == 0 || *keyseq == 0) { if (type == ISMACR) xfree (data); return -1; } keys = (char *)xmalloc (1 + (2 * strlen (keyseq))); /* Translate the ASCII representation of KEYSEQ into an array of characters. Stuff the characters into KEYS, and the length of KEYS into KEYS_LEN. */ if (rl_translate_keyseq (keyseq, keys, &keys_len)) { xfree (keys); return -1; } /* Bind keys, making new keymaps as necessary. */ for (i = 0; i < keys_len; i++) { unsigned char uc = keys[i]; int ic; ic = uc; if (ic < 0 || ic >= KEYMAP_SIZE) { xfree (keys); return -1; } if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii) { ic = UNMETA (ic); if (map[ESC].type == ISKMAP) map = FUNCTION_TO_KEYMAP (map, ESC); } if ((i + 1) < keys_len) { if (map[ic].type != ISKMAP) { /* We allow subsequences of keys. If a keymap is being created that will `shadow' an existing function or macro key binding, we save that keybinding into the ANYOTHERKEY index in the new map. The dispatch code will look there to find the function to execute if the subsequence is not matched. ANYOTHERKEY was chosen to be greater than UCHAR_MAX. */ k = map[ic]; map[ic].type = ISKMAP; map[ic].function = KEYMAP_TO_FUNCTION (rl_make_bare_keymap()); } map = FUNCTION_TO_KEYMAP (map, ic); /* The dispatch code will return this function if no matching key sequence is found in the keymap. This (with a little help from the dispatch code in readline.c) allows `a' to be mapped to something, `abc' to be mapped to something else, and the function bound to `a' to be executed when the user types `abx', leaving `bx' in the input queue. */ if (k.function && ((k.type == ISFUNC && k.function != rl_do_lowercase_version) || k.type == ISMACR)) { map[ANYOTHERKEY] = k; k.function = 0; } } else { if (map[ic].type == ISMACR) xfree ((char *)map[ic].function); else if (map[ic].type == ISKMAP) { map = FUNCTION_TO_KEYMAP (map, ic); ic = ANYOTHERKEY; /* If we're trying to override a keymap with a null function (e.g., trying to unbind it), we can't use a null pointer here because that's indistinguishable from having not been overridden. We use a special bindable function that does nothing. */ if (type == ISFUNC && data == 0) data = (char *)_rl_null_function; } map[ic].function = KEYMAP_TO_FUNCTION (data); map[ic].type = type; } rl_binding_keymap = map; } xfree (keys); return 0; } /* Translate the ASCII representation of SEQ, stuffing the values into ARRAY, an array of characters. LEN gets the final length of ARRAY. Return non-zero if there was an error parsing SEQ. */ int rl_translate_keyseq (seq, array, len) const char *seq; char *array; int *len; { register int i, c, l, temp; for (i = l = 0; c = seq[i]; i++) { if (c == '\\') { c = seq[++i]; if (c == 0) break; /* Handle \C- and \M- prefixes. */ if ((c == 'C' || c == 'M') && seq[i + 1] == '-') { /* Handle special case of backwards define. */ if (strncmp (&seq[i], "C-\\M-", 5) == 0) { array[l++] = ESC; /* ESC is meta-prefix */ i += 5; array[l++] = CTRL (_rl_to_upper (seq[i])); if (seq[i] == '\0') i--; } else if (c == 'M') { i++; /* seq[i] == '-' */ /* XXX - obey convert-meta setting */ if (_rl_convert_meta_chars_to_ascii && _rl_keymap[ESC].type == ISKMAP) array[l++] = ESC; /* ESC is meta-prefix */ else if (seq[i+1] == '\\' && seq[i+2] == 'C' && seq[i+3] == '-') { i += 4; temp = (seq[i] == '?') ? RUBOUT : CTRL (_rl_to_upper (seq[i])); array[l++] = META (temp); } else { /* This doesn't yet handle things like \M-\a, which may or may not have any reasonable meaning. You're probably better off using straight octal or hex. */ i++; array[l++] = META (seq[i]); } } else if (c == 'C') { i += 2; /* Special hack for C-?... */ array[l++] = (seq[i] == '?') ? RUBOUT : CTRL (_rl_to_upper (seq[i])); } continue; } /* Translate other backslash-escaped characters. These are the same escape sequences that bash's `echo' and `printf' builtins handle, with the addition of \d -> RUBOUT. A backslash preceding a character that is not special is stripped. */ switch (c) { case 'a': array[l++] = '\007'; break; case 'b': array[l++] = '\b'; break; case 'd': array[l++] = RUBOUT; /* readline-specific */ break; case 'e': array[l++] = ESC; break; case 'f': array[l++] = '\f'; break; case 'n': array[l++] = NEWLINE; break; case 'r': array[l++] = RETURN; break; case 't': array[l++] = TAB; break; case 'v': array[l++] = 0x0B; break; case '\\': array[l++] = '\\'; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': i++; for (temp = 2, c -= '0'; ISOCTAL (seq[i]) && temp--; i++) c = (c * 8) + OCTVALUE (seq[i]); i--; /* auto-increment in for loop */ array[l++] = c & largest_char; break; case 'x': i++; for (temp = 2, c = 0; ISXDIGIT ((unsigned char)seq[i]) && temp--; i++) c = (c * 16) + HEXVALUE (seq[i]); if (temp == 2) c = 'x'; i--; /* auto-increment in for loop */ array[l++] = c & largest_char; break; default: /* backslashes before non-special chars just add the char */ array[l++] = c; break; /* the backslash is stripped */ } continue; } array[l++] = c; } *len = l; array[l] = '\0'; return (0); } char * rl_untranslate_keyseq (seq) int seq; { static char kseq[16]; int i, c; i = 0; c = seq; if (META_CHAR (c)) { kseq[i++] = '\\'; kseq[i++] = 'M'; kseq[i++] = '-'; c = UNMETA (c); } else if (c == ESC) { kseq[i++] = '\\'; c = 'e'; } else if (CTRL_CHAR (c)) { kseq[i++] = '\\'; kseq[i++] = 'C'; kseq[i++] = '-'; c = _rl_to_lower (UNCTRL (c)); } else if (c == RUBOUT) { kseq[i++] = '\\'; kseq[i++] = 'C'; kseq[i++] = '-'; c = '?'; } if (c == ESC) { kseq[i++] = '\\'; c = 'e'; } else if (c == '\\' || c == '"') { kseq[i++] = '\\'; } kseq[i++] = (unsigned char) c; kseq[i] = '\0'; return kseq; } static char * _rl_untranslate_macro_value (seq) char *seq; { char *ret, *r, *s; int c; r = ret = (char *)xmalloc (7 * strlen (seq) + 1); for (s = seq; *s; s++) { c = *s; if (META_CHAR (c)) { *r++ = '\\'; *r++ = 'M'; *r++ = '-'; c = UNMETA (c); } else if (c == ESC) { *r++ = '\\'; c = 'e'; } else if (CTRL_CHAR (c)) { *r++ = '\\'; *r++ = 'C'; *r++ = '-'; c = _rl_to_lower (UNCTRL (c)); } else if (c == RUBOUT) { *r++ = '\\'; *r++ = 'C'; *r++ = '-'; c = '?'; } if (c == ESC) { *r++ = '\\'; c = 'e'; } else if (c == '\\' || c == '"') *r++ = '\\'; *r++ = (unsigned char)c; } *r = '\0'; return ret; } /* Return a pointer to the function that STRING represents. If STRING doesn't have a matching function, then a NULL pointer is returned. */ rl_command_func_t * rl_named_function (string) const char *string; { register int i; rl_initialize_funmap (); for (i = 0; funmap[i]; i++) if (_rl_stricmp (funmap[i]->name, string) == 0) return (funmap[i]->function); return ((rl_command_func_t *)NULL); } /* Return the function (or macro) definition which would be invoked via KEYSEQ if executed in MAP. If MAP is NULL, then the current keymap is used. TYPE, if non-NULL, is a pointer to an int which will receive the type of the object pointed to. One of ISFUNC (function), ISKMAP (keymap), or ISMACR (macro). */ rl_command_func_t * rl_function_of_keyseq (keyseq, map, type) const char *keyseq; Keymap map; int *type; { register int i; if (map == 0) map = _rl_keymap; for (i = 0; keyseq && keyseq[i]; i++) { unsigned char ic = keyseq[i]; if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii) { if (map[ESC].type == ISKMAP) { map = FUNCTION_TO_KEYMAP (map, ESC); ic = UNMETA (ic); } /* XXX - should we just return NULL here, since this obviously doesn't match? */ else { if (type) *type = map[ESC].type; return (map[ESC].function); } } if (map[ic].type == ISKMAP) { /* If this is the last key in the key sequence, return the map. */ if (keyseq[i + 1] == '\0') { if (type) *type = ISKMAP; return (map[ic].function); } else map = FUNCTION_TO_KEYMAP (map, ic); } /* If we're not at the end of the key sequence, and the current key is bound to something other than a keymap, then the entire key sequence is not bound. */ else if (map[ic].type != ISKMAP && keyseq[i+1]) return ((rl_command_func_t *)NULL); else /* map[ic].type != ISKMAP && keyseq[i+1] == 0 */ { if (type) *type = map[ic].type; return (map[ic].function); } } return ((rl_command_func_t *) NULL); } /* The last key bindings file read. */ static char *last_readline_init_file = (char *)NULL; /* The file we're currently reading key bindings from. */ static const char *current_readline_init_file; static int current_readline_init_include_level; static int current_readline_init_lineno; /* Read FILENAME into a locally-allocated buffer and return the buffer. The size of the buffer is returned in *SIZEP. Returns NULL if any errors were encountered. */ static char * _rl_read_file (filename, sizep) char *filename; size_t *sizep; { struct stat finfo; size_t file_size; char *buffer; int i, file; if ((stat (filename, &finfo) < 0) || (file = open (filename, O_RDONLY, 0666)) < 0) return ((char *)NULL); file_size = (size_t)finfo.st_size; /* check for overflow on very large files */ if (file_size != finfo.st_size || file_size + 1 < file_size) { if (file >= 0) close (file); #if defined (EFBIG) errno = EFBIG; #endif return ((char *)NULL); } /* Read the file into BUFFER. */ buffer = (char *)xmalloc (file_size + 1); i = read (file, buffer, file_size); close (file); if (i < 0) { xfree (buffer); return ((char *)NULL); } RL_CHECK_SIGNALS (); buffer[i] = '\0'; if (sizep) *sizep = i; return (buffer); } /* Re-read the current keybindings file. */ int rl_re_read_init_file (count, ignore) int count, ignore; { int r; r = rl_read_init_file ((const char *)NULL); rl_set_keymap_from_edit_mode (); return r; } /* Do key bindings from a file. If FILENAME is NULL it defaults to the first non-null filename from this list: 1. the filename used for the previous call 2. the value of the shell variable `INPUTRC' 3. ~/.inputrc 4. /etc/inputrc If the file existed and could be opened and read, 0 is returned, otherwise errno is returned. */ int rl_read_init_file (filename) const char *filename; { /* Default the filename. */ if (filename == 0) filename = last_readline_init_file; if (filename == 0) filename = sh_get_env_value ("INPUTRC"); if (filename == 0 || *filename == 0) { filename = DEFAULT_INPUTRC; /* Try to read DEFAULT_INPUTRC; fall back to SYS_INPUTRC on failure */ if (_rl_read_init_file (filename, 0) == 0) return 0; filename = SYS_INPUTRC; } #if defined (__MSDOS__) if (_rl_read_init_file (filename, 0) == 0) return 0; filename = "~/_inputrc"; #endif return (_rl_read_init_file (filename, 0)); } static int _rl_read_init_file (filename, include_level) const char *filename; int include_level; { register int i; char *buffer, *openname, *line, *end; size_t file_size; current_readline_init_file = filename; current_readline_init_include_level = include_level; openname = tilde_expand (filename); buffer = _rl_read_file (openname, &file_size); xfree (openname); RL_CHECK_SIGNALS (); if (buffer == 0) return (errno); if (include_level == 0 && filename != last_readline_init_file) { FREE (last_readline_init_file); last_readline_init_file = savestring (filename); } currently_reading_init_file = 1; /* Loop over the lines in the file. Lines that start with `#' are comments; all other lines are commands for readline initialization. */ current_readline_init_lineno = 1; line = buffer; end = buffer + file_size; while (line < end) { /* Find the end of this line. */ for (i = 0; line + i != end && line[i] != '\n'; i++); #if defined (__CYGWIN__) /* ``Be liberal in what you accept.'' */ if (line[i] == '\n' && line[i-1] == '\r') line[i - 1] = '\0'; #endif /* Mark end of line. */ line[i] = '\0'; /* Skip leading whitespace. */ while (*line && whitespace (*line)) { line++; i--; } /* If the line is not a comment, then parse it. */ if (*line && *line != '#') rl_parse_and_bind (line); /* Move to the next line. */ line += i + 1; current_readline_init_lineno++; } xfree (buffer); currently_reading_init_file = 0; return (0); } static void _rl_init_file_error (msg) const char *msg; { if (currently_reading_init_file) _rl_errmsg ("%s: line %d: %s\n", current_readline_init_file, current_readline_init_lineno, msg); else _rl_errmsg ("%s", msg); } /* **************************************************************** */ /* */ /* Parser Directives */ /* */ /* **************************************************************** */ typedef int _rl_parser_func_t PARAMS((char *)); /* Things that mean `Control'. */ const char * const _rl_possible_control_prefixes[] = { "Control-", "C-", "CTRL-", (const char *)NULL }; const char * const _rl_possible_meta_prefixes[] = { "Meta", "M-", (const char *)NULL }; /* Conditionals. */ /* Calling programs set this to have their argv[0]. */ const char *rl_readline_name = "other"; /* Stack of previous values of parsing_conditionalized_out. */ static unsigned char *if_stack = (unsigned char *)NULL; static int if_stack_depth; static int if_stack_size; /* Push _rl_parsing_conditionalized_out, and set parser state based on ARGS. */ static int parser_if (args) char *args; { register int i; /* Push parser state. */ if (if_stack_depth + 1 >= if_stack_size) { if (!if_stack) if_stack = (unsigned char *)xmalloc (if_stack_size = 20); else if_stack = (unsigned char *)xrealloc (if_stack, if_stack_size += 20); } if_stack[if_stack_depth++] = _rl_parsing_conditionalized_out; /* If parsing is turned off, then nothing can turn it back on except for finding the matching endif. In that case, return right now. */ if (_rl_parsing_conditionalized_out) return 0; /* Isolate first argument. */ for (i = 0; args[i] && !whitespace (args[i]); i++); if (args[i]) args[i++] = '\0'; /* Handle "$if term=foo" and "$if mode=emacs" constructs. If this isn't term=foo, or mode=emacs, then check to see if the first word in ARGS is the same as the value stored in rl_readline_name. */ if (rl_terminal_name && _rl_strnicmp (args, "term=", 5) == 0) { char *tem, *tname; /* Terminals like "aaa-60" are equivalent to "aaa". */ tname = savestring (rl_terminal_name); tem = strchr (tname, '-'); if (tem) *tem = '\0'; /* Test the `long' and `short' forms of the terminal name so that if someone has a `sun-cmd' and does not want to have bindings that will be executed if the terminal is a `sun', they can put `$if term=sun-cmd' into their .inputrc. */ _rl_parsing_conditionalized_out = _rl_stricmp (args + 5, tname) && _rl_stricmp (args + 5, rl_terminal_name); xfree (tname); } #if defined (VI_MODE) else if (_rl_strnicmp (args, "mode=", 5) == 0) { int mode; if (_rl_stricmp (args + 5, "emacs") == 0) mode = emacs_mode; else if (_rl_stricmp (args + 5, "vi") == 0) mode = vi_mode; else mode = no_mode; _rl_parsing_conditionalized_out = mode != rl_editing_mode; } #endif /* VI_MODE */ /* Check to see if the first word in ARGS is the same as the value stored in rl_readline_name. */ else if (_rl_stricmp (args, rl_readline_name) == 0) _rl_parsing_conditionalized_out = 0; else _rl_parsing_conditionalized_out = 1; return 0; } /* Invert the current parser state if there is anything on the stack. */ static int parser_else (args) char *args; { register int i; if (if_stack_depth == 0) { _rl_init_file_error ("$else found without matching $if"); return 0; } #if 0 /* Check the previous (n - 1) levels of the stack to make sure that we haven't previously turned off parsing. */ for (i = 0; i < if_stack_depth - 1; i++) #else /* Check the previous (n) levels of the stack to make sure that we haven't previously turned off parsing. */ for (i = 0; i < if_stack_depth; i++) #endif if (if_stack[i] == 1) return 0; /* Invert the state of parsing if at top level. */ _rl_parsing_conditionalized_out = !_rl_parsing_conditionalized_out; return 0; } /* Terminate a conditional, popping the value of _rl_parsing_conditionalized_out from the stack. */ static int parser_endif (args) char *args; { if (if_stack_depth) _rl_parsing_conditionalized_out = if_stack[--if_stack_depth]; else _rl_init_file_error ("$endif without matching $if"); return 0; } static int parser_include (args) char *args; { const char *old_init_file; char *e; int old_line_number, old_include_level, r; if (_rl_parsing_conditionalized_out) return (0); old_init_file = current_readline_init_file; old_line_number = current_readline_init_lineno; old_include_level = current_readline_init_include_level; e = strchr (args, '\n'); if (e) *e = '\0'; r = _rl_read_init_file ((const char *)args, old_include_level + 1); current_readline_init_file = old_init_file; current_readline_init_lineno = old_line_number; current_readline_init_include_level = old_include_level; return r; } /* Associate textual names with actual functions. */ static const struct { const char * const name; _rl_parser_func_t *function; } parser_directives [] = { { "if", parser_if }, { "endif", parser_endif }, { "else", parser_else }, { "include", parser_include }, { (char *)0x0, (_rl_parser_func_t *)0x0 } }; /* Handle a parser directive. STATEMENT is the line of the directive without any leading `$'. */ static int handle_parser_directive (statement) char *statement; { register int i; char *directive, *args; /* Isolate the actual directive. */ /* Skip whitespace. */ for (i = 0; whitespace (statement[i]); i++); directive = &statement[i]; for (; statement[i] && !whitespace (statement[i]); i++); if (statement[i]) statement[i++] = '\0'; for (; statement[i] && whitespace (statement[i]); i++); args = &statement[i]; /* Lookup the command, and act on it. */ for (i = 0; parser_directives[i].name; i++) if (_rl_stricmp (directive, parser_directives[i].name) == 0) { (*parser_directives[i].function) (args); return (0); } /* display an error message about the unknown parser directive */ _rl_init_file_error ("unknown parser directive"); return (1); } /* Read the binding command from STRING and perform it. A key binding command looks like: Keyname: function-name\0, a variable binding command looks like: set variable value. A new-style keybinding looks like "\C-x\C-x": exchange-point-and-mark. */ int rl_parse_and_bind (string) char *string; { char *funname, *kname; register int c, i; int key, equivalency; while (string && whitespace (*string)) string++; if (!string || !*string || *string == '#') return 0; /* If this is a parser directive, act on it. */ if (*string == '$') { handle_parser_directive (&string[1]); return 0; } /* If we aren't supposed to be parsing right now, then we're done. */ if (_rl_parsing_conditionalized_out) return 0; i = 0; /* If this keyname is a complex key expression surrounded by quotes, advance to after the matching close quote. This code allows the backslash to quote characters in the key expression. */ if (*string == '"') { int passc = 0; for (i = 1; c = string[i]; i++) { if (passc) { passc = 0; continue; } if (c == '\\') { passc++; continue; } if (c == '"') break; } /* If we didn't find a closing quote, abort the line. */ if (string[i] == '\0') { _rl_init_file_error ("no closing `\"' in key binding"); return 1; } } /* Advance to the colon (:) or whitespace which separates the two objects. */ for (; (c = string[i]) && c != ':' && c != ' ' && c != '\t'; i++ ); equivalency = (c == ':' && string[i + 1] == '='); /* Mark the end of the command (or keyname). */ if (string[i]) string[i++] = '\0'; /* If doing assignment, skip the '=' sign as well. */ if (equivalency) string[i++] = '\0'; /* If this is a command to set a variable, then do that. */ if (_rl_stricmp (string, "set") == 0) { char *var, *value, *e; var = string + i; /* Make VAR point to start of variable name. */ while (*var && whitespace (*var)) var++; /* Make VALUE point to start of value string. */ value = var; while (*value && !whitespace (*value)) value++; if (*value) *value++ = '\0'; while (*value && whitespace (*value)) value++; /* Strip trailing whitespace from values to boolean variables. Temp fix until I get a real quoted-string parser here. */ i = find_boolean_var (var); if (i >= 0) { /* remove trailing whitespace */ e = value + strlen (value) - 1; while (e >= value && whitespace (*e)) e--; e++; /* skip back to whitespace or EOS */ if (*e && e >= value) *e = '\0'; } rl_variable_bind (var, value); return 0; } /* Skip any whitespace between keyname and funname. */ for (; string[i] && whitespace (string[i]); i++); funname = &string[i]; /* Now isolate funname. For straight function names just look for whitespace, since that will signify the end of the string. But this could be a macro definition. In that case, the string is quoted, so skip to the matching delimiter. We allow the backslash to quote the delimiter characters in the macro body. */ /* This code exists to allow whitespace in macro expansions, which would otherwise be gobbled up by the next `for' loop.*/ /* XXX - it may be desirable to allow backslash quoting only if " is the quoted string delimiter, like the shell. */ if (*funname == '\'' || *funname == '"') { int delimiter, passc; delimiter = string[i++]; for (passc = 0; c = string[i]; i++) { if (passc) { passc = 0; continue; } if (c == '\\') { passc = 1; continue; } if (c == delimiter) break; } if (c) i++; } /* Advance to the end of the string. */ for (; string[i] && !whitespace (string[i]); i++); /* No extra whitespace at the end of the string. */ string[i] = '\0'; /* Handle equivalency bindings here. Make the left-hand side be exactly whatever the right-hand evaluates to, including keymaps. */ if (equivalency) { return 0; } /* If this is a new-style key-binding, then do the binding with rl_bind_keyseq (). Otherwise, let the older code deal with it. */ if (*string == '"') { char *seq; register int j, k, passc; seq = (char *)xmalloc (1 + strlen (string)); for (j = 1, k = passc = 0; string[j]; j++) { /* Allow backslash to quote characters, but leave them in place. This allows a string to end with a backslash quoting another backslash, or with a backslash quoting a double quote. The backslashes are left in place for rl_translate_keyseq (). */ if (passc || (string[j] == '\\')) { seq[k++] = string[j]; passc = !passc; continue; } if (string[j] == '"') break; seq[k++] = string[j]; } seq[k] = '\0'; /* Binding macro? */ if (*funname == '\'' || *funname == '"') { j = strlen (funname); /* Remove the delimiting quotes from each end of FUNNAME. */ if (j && funname[j - 1] == *funname) funname[j - 1] = '\0'; rl_macro_bind (seq, &funname[1], _rl_keymap); } else rl_bind_keyseq (seq, rl_named_function (funname)); xfree (seq); return 0; } /* Get the actual character we want to deal with. */ kname = strrchr (string, '-'); if (!kname) kname = string; else kname++; key = glean_key_from_name (kname); /* Add in control and meta bits. */ if (substring_member_of_array (string, _rl_possible_control_prefixes)) key = CTRL (_rl_to_upper (key)); if (substring_member_of_array (string, _rl_possible_meta_prefixes)) key = META (key); /* Temporary. Handle old-style keyname with macro-binding. */ if (*funname == '\'' || *funname == '"') { char useq[2]; int fl = strlen (funname); useq[0] = key; useq[1] = '\0'; if (fl && funname[fl - 1] == *funname) funname[fl - 1] = '\0'; rl_macro_bind (useq, &funname[1], _rl_keymap); } #if defined (PREFIX_META_HACK) /* Ugly, but working hack to keep prefix-meta around. */ else if (_rl_stricmp (funname, "prefix-meta") == 0) { char seq[2]; seq[0] = key; seq[1] = '\0'; rl_generic_bind (ISKMAP, seq, (char *)emacs_meta_keymap, _rl_keymap); } #endif /* PREFIX_META_HACK */ else rl_bind_key (key, rl_named_function (funname)); return 0; } /* Simple structure for boolean readline variables (i.e., those that can have one of two values; either "On" or 1 for truth, or "Off" or 0 for false. */ #define V_SPECIAL 0x1 static const struct { const char * const name; int *value; int flags; } boolean_varlist [] = { { "bind-tty-special-chars", &_rl_bind_stty_chars, 0 }, { "blink-matching-paren", &rl_blink_matching_paren, V_SPECIAL }, { "byte-oriented", &rl_byte_oriented, 0 }, { "completion-ignore-case", &_rl_completion_case_fold, 0 }, { "completion-map-case", &_rl_completion_case_map, 0 }, { "convert-meta", &_rl_convert_meta_chars_to_ascii, 0 }, { "disable-completion", &rl_inhibit_completion, 0 }, { "echo-control-characters", &_rl_echo_control_chars, 0 }, { "enable-keypad", &_rl_enable_keypad, 0 }, { "enable-meta-key", &_rl_enable_meta, 0 }, { "expand-tilde", &rl_complete_with_tilde_expansion, 0 }, { "history-preserve-point", &_rl_history_preserve_point, 0 }, { "horizontal-scroll-mode", &_rl_horizontal_scroll_mode, 0 }, { "input-meta", &_rl_meta_flag, 0 }, { "mark-directories", &_rl_complete_mark_directories, 0 }, { "mark-modified-lines", &_rl_mark_modified_lines, 0 }, { "mark-symlinked-directories", &_rl_complete_mark_symlink_dirs, 0 }, { "match-hidden-files", &_rl_match_hidden_files, 0 }, { "menu-complete-display-prefix", &_rl_menu_complete_prefix_first, 0 }, { "meta-flag", &_rl_meta_flag, 0 }, { "output-meta", &_rl_output_meta_chars, 0 }, { "page-completions", &_rl_page_completions, 0 }, { "prefer-visible-bell", &_rl_prefer_visible_bell, V_SPECIAL }, { "print-completions-horizontally", &_rl_print_completions_horizontally, 0 }, { "revert-all-at-newline", &_rl_revert_all_at_newline, 0 }, { "show-all-if-ambiguous", &_rl_complete_show_all, 0 }, { "show-all-if-unmodified", &_rl_complete_show_unmodified, 0 }, { "skip-completed-text", &_rl_skip_completed_text, 0 }, #if defined (VISIBLE_STATS) { "visible-stats", &rl_visible_stats, 0 }, #endif /* VISIBLE_STATS */ { (char *)NULL, (int *)NULL, 0 } }; static int find_boolean_var (name) const char *name; { register int i; for (i = 0; boolean_varlist[i].name; i++) if (_rl_stricmp (name, boolean_varlist[i].name) == 0) return i; return -1; } /* Hooks for handling special boolean variables, where a function needs to be called or another variable needs to be changed when they're changed. */ static void hack_special_boolean_var (i) int i; { const char *name; name = boolean_varlist[i].name; if (_rl_stricmp (name, "blink-matching-paren") == 0) _rl_enable_paren_matching (rl_blink_matching_paren); else if (_rl_stricmp (name, "prefer-visible-bell") == 0) { if (_rl_prefer_visible_bell) _rl_bell_preference = VISIBLE_BELL; else _rl_bell_preference = AUDIBLE_BELL; } } typedef int _rl_sv_func_t PARAMS((const char *)); /* These *must* correspond to the array indices for the appropriate string variable. (Though they're not used right now.) */ #define V_BELLSTYLE 0 #define V_COMBEGIN 1 #define V_EDITMODE 2 #define V_ISRCHTERM 3 #define V_KEYMAP 4 #define V_STRING 1 #define V_INT 2 /* Forward declarations */ static int sv_bell_style PARAMS((const char *)); static int sv_combegin PARAMS((const char *)); static int sv_dispprefix PARAMS((const char *)); static int sv_compquery PARAMS((const char *)); static int sv_compwidth PARAMS((const char *)); static int sv_editmode PARAMS((const char *)); static int sv_histsize PARAMS((const char *)); static int sv_isrchterm PARAMS((const char *)); static int sv_keymap PARAMS((const char *)); static const struct { const char * const name; int flags; _rl_sv_func_t *set_func; } string_varlist[] = { { "bell-style", V_STRING, sv_bell_style }, { "comment-begin", V_STRING, sv_combegin }, { "completion-display-width", V_INT, sv_compwidth }, { "completion-prefix-display-length", V_INT, sv_dispprefix }, { "completion-query-items", V_INT, sv_compquery }, { "editing-mode", V_STRING, sv_editmode }, { "history-size", V_INT, sv_histsize }, { "isearch-terminators", V_STRING, sv_isrchterm }, { "keymap", V_STRING, sv_keymap }, { (char *)NULL, 0, (_rl_sv_func_t *)0 } }; static int find_string_var (name) const char *name; { register int i; for (i = 0; string_varlist[i].name; i++) if (_rl_stricmp (name, string_varlist[i].name) == 0) return i; return -1; } /* A boolean value that can appear in a `set variable' command is true if the value is null or empty, `on' (case-insenstive), or "1". Any other values result in 0 (false). */ static int bool_to_int (value) const char *value; { return (value == 0 || *value == '\0' || (_rl_stricmp (value, "on") == 0) || (value[0] == '1' && value[1] == '\0')); } char * rl_variable_value (name) const char *name; { register int i; /* Check for simple variables first. */ i = find_boolean_var (name); if (i >= 0) return (*boolean_varlist[i].value ? "on" : "off"); i = find_string_var (name); if (i >= 0) return (_rl_get_string_variable_value (string_varlist[i].name)); /* Unknown variable names return NULL. */ return 0; } int rl_variable_bind (name, value) const char *name, *value; { register int i; int v; /* Check for simple variables first. */ i = find_boolean_var (name); if (i >= 0) { *boolean_varlist[i].value = bool_to_int (value); if (boolean_varlist[i].flags & V_SPECIAL) hack_special_boolean_var (i); return 0; } i = find_string_var (name); /* For the time being, unknown variable names or string names without a handler function are simply ignored. */ if (i < 0 || string_varlist[i].set_func == 0) return 0; v = (*string_varlist[i].set_func) (value); return v; } static int sv_editmode (value) const char *value; { if (_rl_strnicmp (value, "vi", 2) == 0) { #if defined (VI_MODE) _rl_keymap = vi_insertion_keymap; rl_editing_mode = vi_mode; #endif /* VI_MODE */ return 0; } else if (_rl_strnicmp (value, "emacs", 5) == 0) { _rl_keymap = emacs_standard_keymap; rl_editing_mode = emacs_mode; return 0; } return 1; } static int sv_combegin (value) const char *value; { if (value && *value) { FREE (_rl_comment_begin); _rl_comment_begin = savestring (value); return 0; } return 1; } static int sv_dispprefix (value) const char *value; { int nval = 0; if (value && *value) { nval = atoi (value); if (nval < 0) nval = 0; } _rl_completion_prefix_display_length = nval; return 0; } static int sv_compquery (value) const char *value; { int nval = 100; if (value && *value) { nval = atoi (value); if (nval < 0) nval = 0; } rl_completion_query_items = nval; return 0; } static int sv_compwidth (value) const char *value; { int nval = -1; if (value && *value) nval = atoi (value); _rl_completion_columns = nval; return 0; } static int sv_histsize (value) const char *value; { int nval = 500; if (value && *value) { nval = atoi (value); if (nval < 0) return 1; } stifle_history (nval); return 0; } static int sv_keymap (value) const char *value; { Keymap kmap; kmap = rl_get_keymap_by_name (value); if (kmap) { rl_set_keymap (kmap); return 0; } return 1; } static int sv_bell_style (value) const char *value; { if (value == 0 || *value == '\0') _rl_bell_preference = AUDIBLE_BELL; else if (_rl_stricmp (value, "none") == 0 || _rl_stricmp (value, "off") == 0) _rl_bell_preference = NO_BELL; else if (_rl_stricmp (value, "audible") == 0 || _rl_stricmp (value, "on") == 0) _rl_bell_preference = AUDIBLE_BELL; else if (_rl_stricmp (value, "visible") == 0) _rl_bell_preference = VISIBLE_BELL; else return 1; return 0; } static int sv_isrchterm (value) const char *value; { int beg, end, delim; char *v; if (value == 0) return 1; /* Isolate the value and translate it into a character string. */ v = savestring (value); FREE (_rl_isearch_terminators); if (v[0] == '"' || v[0] == '\'') { delim = v[0]; for (beg = end = 1; v[end] && v[end] != delim; end++) ; } else { for (beg = end = 0; whitespace (v[end]) == 0; end++) ; } v[end] = '\0'; /* The value starts at v + beg. Translate it into a character string. */ _rl_isearch_terminators = (char *)xmalloc (2 * strlen (v) + 1); rl_translate_keyseq (v + beg, _rl_isearch_terminators, &end); _rl_isearch_terminators[end] = '\0'; xfree (v); return 0; } /* Return the character which matches NAME. For example, `Space' returns ' '. */ typedef struct { const char * const name; int value; } assoc_list; static const assoc_list name_key_alist[] = { { "DEL", 0x7f }, { "ESC", '\033' }, { "Escape", '\033' }, { "LFD", '\n' }, { "Newline", '\n' }, { "RET", '\r' }, { "Return", '\r' }, { "Rubout", 0x7f }, { "SPC", ' ' }, { "Space", ' ' }, { "Tab", 0x09 }, { (char *)0x0, 0 } }; static int glean_key_from_name (name) char *name; { register int i; for (i = 0; name_key_alist[i].name; i++) if (_rl_stricmp (name, name_key_alist[i].name) == 0) return (name_key_alist[i].value); return (*(unsigned char *)name); /* XXX was return (*name) */ } /* Auxiliary functions to manage keymaps. */ static const struct { const char * const name; Keymap map; } keymap_names[] = { { "emacs", emacs_standard_keymap }, { "emacs-standard", emacs_standard_keymap }, { "emacs-meta", emacs_meta_keymap }, { "emacs-ctlx", emacs_ctlx_keymap }, #if defined (VI_MODE) { "vi", vi_movement_keymap }, { "vi-move", vi_movement_keymap }, { "vi-command", vi_movement_keymap }, { "vi-insert", vi_insertion_keymap }, #endif /* VI_MODE */ { (char *)0x0, (Keymap)0x0 } }; Keymap rl_get_keymap_by_name (name) const char *name; { register int i; for (i = 0; keymap_names[i].name; i++) if (_rl_stricmp (name, keymap_names[i].name) == 0) return (keymap_names[i].map); return ((Keymap) NULL); } char * rl_get_keymap_name (map) Keymap map; { register int i; for (i = 0; keymap_names[i].name; i++) if (map == keymap_names[i].map) return ((char *)keymap_names[i].name); return ((char *)NULL); } void rl_set_keymap (map) Keymap map; { if (map) _rl_keymap = map; } Keymap rl_get_keymap () { return (_rl_keymap); } void rl_set_keymap_from_edit_mode () { if (rl_editing_mode == emacs_mode) _rl_keymap = emacs_standard_keymap; #if defined (VI_MODE) else if (rl_editing_mode == vi_mode) _rl_keymap = vi_insertion_keymap; #endif /* VI_MODE */ } char * rl_get_keymap_name_from_edit_mode () { if (rl_editing_mode == emacs_mode) return "emacs"; #if defined (VI_MODE) else if (rl_editing_mode == vi_mode) return "vi"; #endif /* VI_MODE */ else return "none"; } /* **************************************************************** */ /* */ /* Key Binding and Function Information */ /* */ /* **************************************************************** */ /* Each of the following functions produces information about the state of keybindings and functions known to Readline. The info is always printed to rl_outstream, and in such a way that it can be read back in (i.e., passed to rl_parse_and_bind ()). */ /* Print the names of functions known to Readline. */ void rl_list_funmap_names () { register int i; const char **funmap_names; funmap_names = rl_funmap_names (); if (!funmap_names) return; for (i = 0; funmap_names[i]; i++) fprintf (rl_outstream, "%s\n", funmap_names[i]); xfree (funmap_names); } static char * _rl_get_keyname (key) int key; { char *keyname; int i, c; keyname = (char *)xmalloc (8); c = key; /* Since this is going to be used to write out keysequence-function pairs for possible inclusion in an inputrc file, we don't want to do any special meta processing on KEY. */ #if 1 /* XXX - Experimental */ /* We might want to do this, but the old version of the code did not. */ /* If this is an escape character, we don't want to do any more processing. Just add the special ESC key sequence and return. */ if (c == ESC) { keyname[0] = '\\'; keyname[1] = 'e'; keyname[2] = '\0'; return keyname; } #endif /* RUBOUT is translated directly into \C-? */ if (key == RUBOUT) { keyname[0] = '\\'; keyname[1] = 'C'; keyname[2] = '-'; keyname[3] = '?'; keyname[4] = '\0'; return keyname; } i = 0; /* Now add special prefixes needed for control characters. This can potentially change C. */ if (CTRL_CHAR (c)) { keyname[i++] = '\\'; keyname[i++] = 'C'; keyname[i++] = '-'; c = _rl_to_lower (UNCTRL (c)); } /* XXX experimental code. Turn the characters that are not ASCII or ISO Latin 1 (128 - 159) into octal escape sequences (\200 - \237). This changes C. */ if (c >= 128 && c <= 159) { keyname[i++] = '\\'; keyname[i++] = '2'; c -= 128; keyname[i++] = (c / 8) + '0'; c = (c % 8) + '0'; } /* Now, if the character needs to be quoted with a backslash, do that. */ if (c == '\\' || c == '"') keyname[i++] = '\\'; /* Now add the key, terminate the string, and return it. */ keyname[i++] = (char) c; keyname[i] = '\0'; return keyname; } /* Return a NULL terminated array of strings which represent the key sequences that are used to invoke FUNCTION in MAP. */ char ** rl_invoking_keyseqs_in_map (function, map) rl_command_func_t *function; Keymap map; { register int key; char **result; int result_index, result_size; result = (char **)NULL; result_index = result_size = 0; for (key = 0; key < KEYMAP_SIZE; key++) { switch (map[key].type) { case ISMACR: /* Macros match, if, and only if, the pointers are identical. Thus, they are treated exactly like functions in here. */ case ISFUNC: /* If the function in the keymap is the one we are looking for, then add the current KEY to the list of invoking keys. */ if (map[key].function == function) { char *keyname; keyname = _rl_get_keyname (key); if (result_index + 2 > result_size) { result_size += 10; result = (char **)xrealloc (result, result_size * sizeof (char *)); } result[result_index++] = keyname; result[result_index] = (char *)NULL; } break; case ISKMAP: { char **seqs; register int i; /* Find the list of keyseqs in this map which have FUNCTION as their target. Add the key sequences found to RESULT. */ if (map[key].function) seqs = rl_invoking_keyseqs_in_map (function, FUNCTION_TO_KEYMAP (map, key)); else break; if (seqs == 0) break; for (i = 0; seqs[i]; i++) { char *keyname = (char *)xmalloc (6 + strlen (seqs[i])); if (key == ESC) { /* If ESC is the meta prefix and we're converting chars with the eighth bit set to ESC-prefixed sequences, then we can use \M-. Otherwise we need to use the sequence for ESC. */ if (_rl_convert_meta_chars_to_ascii && map[ESC].type == ISKMAP) sprintf (keyname, "\\M-"); else sprintf (keyname, "\\e"); } else if (CTRL_CHAR (key)) sprintf (keyname, "\\C-%c", _rl_to_lower (UNCTRL (key))); else if (key == RUBOUT) sprintf (keyname, "\\C-?"); else if (key == '\\' || key == '"') { keyname[0] = '\\'; keyname[1] = (char) key; keyname[2] = '\0'; } else { keyname[0] = (char) key; keyname[1] = '\0'; } strcat (keyname, seqs[i]); xfree (seqs[i]); if (result_index + 2 > result_size) { result_size += 10; result = (char **)xrealloc (result, result_size * sizeof (char *)); } result[result_index++] = keyname; result[result_index] = (char *)NULL; } xfree (seqs); } break; } } return (result); } /* Return a NULL terminated array of strings which represent the key sequences that can be used to invoke FUNCTION using the current keymap. */ char ** rl_invoking_keyseqs (function) rl_command_func_t *function; { return (rl_invoking_keyseqs_in_map (function, _rl_keymap)); } /* Print all of the functions and their bindings to rl_outstream. If PRINT_READABLY is non-zero, then print the output in such a way that it can be read back in. */ void rl_function_dumper (print_readably) int print_readably; { register int i; const char **names; const char *name; names = rl_funmap_names (); fprintf (rl_outstream, "\n"); for (i = 0; name = names[i]; i++) { rl_command_func_t *function; char **invokers; function = rl_named_function (name); invokers = rl_invoking_keyseqs_in_map (function, _rl_keymap); if (print_readably) { if (!invokers) fprintf (rl_outstream, "# %s (not bound)\n", name); else { register int j; for (j = 0; invokers[j]; j++) { fprintf (rl_outstream, "\"%s\": %s\n", invokers[j], name); xfree (invokers[j]); } xfree (invokers); } } else { if (!invokers) fprintf (rl_outstream, "%s is not bound to any keys\n", name); else { register int j; fprintf (rl_outstream, "%s can be found on ", name); for (j = 0; invokers[j] && j < 5; j++) { fprintf (rl_outstream, "\"%s\"%s", invokers[j], invokers[j + 1] ? ", " : ".\n"); } if (j == 5 && invokers[j]) fprintf (rl_outstream, "...\n"); for (j = 0; invokers[j]; j++) xfree (invokers[j]); xfree (invokers); } } } free (names); } /* Print all of the current functions and their bindings to rl_outstream. If an explicit argument is given, then print the output in such a way that it can be read back in. */ int rl_dump_functions (count, key) int count, key; { if (rl_dispatching) fprintf (rl_outstream, "\r\n"); rl_function_dumper (rl_explicit_arg); rl_on_new_line (); return (0); } static void _rl_macro_dumper_internal (print_readably, map, prefix) int print_readably; Keymap map; char *prefix; { register int key; char *keyname, *out; int prefix_len; for (key = 0; key < KEYMAP_SIZE; key++) { switch (map[key].type) { case ISMACR: keyname = _rl_get_keyname (key); out = _rl_untranslate_macro_value ((char *)map[key].function); if (print_readably) fprintf (rl_outstream, "\"%s%s\": \"%s\"\n", prefix ? prefix : "", keyname, out ? out : ""); else fprintf (rl_outstream, "%s%s outputs %s\n", prefix ? prefix : "", keyname, out ? out : ""); xfree (keyname); xfree (out); break; case ISFUNC: break; case ISKMAP: prefix_len = prefix ? strlen (prefix) : 0; if (key == ESC) { keyname = (char *)xmalloc (3 + prefix_len); if (prefix) strcpy (keyname, prefix); keyname[prefix_len] = '\\'; keyname[prefix_len + 1] = 'e'; keyname[prefix_len + 2] = '\0'; } else { keyname = _rl_get_keyname (key); if (prefix) { out = (char *)xmalloc (strlen (keyname) + prefix_len + 1); strcpy (out, prefix); strcpy (out + prefix_len, keyname); xfree (keyname); keyname = out; } } _rl_macro_dumper_internal (print_readably, FUNCTION_TO_KEYMAP (map, key), keyname); xfree (keyname); break; } } } void rl_macro_dumper (print_readably) int print_readably; { _rl_macro_dumper_internal (print_readably, _rl_keymap, (char *)NULL); } int rl_dump_macros (count, key) int count, key; { if (rl_dispatching) fprintf (rl_outstream, "\r\n"); rl_macro_dumper (rl_explicit_arg); rl_on_new_line (); return (0); } static char * _rl_get_string_variable_value (name) const char *name; { static char numbuf[32]; char *ret; if (_rl_stricmp (name, "bell-style") == 0) { switch (_rl_bell_preference) { case NO_BELL: return "none"; case VISIBLE_BELL: return "visible"; case AUDIBLE_BELL: default: return "audible"; } } else if (_rl_stricmp (name, "comment-begin") == 0) return (_rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT); else if (_rl_stricmp (name, "completion-display-width") == 0) { sprintf (numbuf, "%d", _rl_completion_columns); return (numbuf); } else if (_rl_stricmp (name, "completion-prefix-display-length") == 0) { sprintf (numbuf, "%d", _rl_completion_prefix_display_length); return (numbuf); } else if (_rl_stricmp (name, "completion-query-items") == 0) { sprintf (numbuf, "%d", rl_completion_query_items); return (numbuf); } else if (_rl_stricmp (name, "editing-mode") == 0) return (rl_get_keymap_name_from_edit_mode ()); else if (_rl_stricmp (name, "history-size") == 0) { sprintf (numbuf, "%d", history_is_stifled() ? history_max_entries : 0); return (numbuf); } else if (_rl_stricmp (name, "isearch-terminators") == 0) { if (_rl_isearch_terminators == 0) return 0; ret = _rl_untranslate_macro_value (_rl_isearch_terminators); if (ret) { strncpy (numbuf, ret, sizeof (numbuf) - 1); xfree (ret); numbuf[sizeof(numbuf) - 1] = '\0'; } else numbuf[0] = '\0'; return numbuf; } else if (_rl_stricmp (name, "keymap") == 0) { ret = rl_get_keymap_name (_rl_keymap); if (ret == 0) ret = rl_get_keymap_name_from_edit_mode (); return (ret ? ret : "none"); } else return (0); } void rl_variable_dumper (print_readably) int print_readably; { int i; char *v; for (i = 0; boolean_varlist[i].name; i++) { if (print_readably) fprintf (rl_outstream, "set %s %s\n", boolean_varlist[i].name, *boolean_varlist[i].value ? "on" : "off"); else fprintf (rl_outstream, "%s is set to `%s'\n", boolean_varlist[i].name, *boolean_varlist[i].value ? "on" : "off"); } for (i = 0; string_varlist[i].name; i++) { v = _rl_get_string_variable_value (string_varlist[i].name); if (v == 0) /* _rl_isearch_terminators can be NULL */ continue; if (print_readably) fprintf (rl_outstream, "set %s %s\n", string_varlist[i].name, v); else fprintf (rl_outstream, "%s is set to `%s'\n", string_varlist[i].name, v); } } /* Print all of the current variables and their values to rl_outstream. If an explicit argument is given, then print the output in such a way that it can be read back in. */ int rl_dump_variables (count, key) int count, key; { if (rl_dispatching) fprintf (rl_outstream, "\r\n"); rl_variable_dumper (rl_explicit_arg); rl_on_new_line (); return (0); } /* Return non-zero if any members of ARRAY are a substring in STRING. */ static int substring_member_of_array (string, array) const char *string; const char * const *array; { while (*array) { if (_rl_strindex (string, *array)) return (1); array++; } return (0); } gdb-doc-7.6.2/readline/signals.c0000644000175000017500000004166412250770610015465 0ustar zumbizumbi/* signals.c -- signal handling support for readline. */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include #endif #include /* Just for NULL. Yuck. */ #include #include #if defined (HAVE_UNISTD_H) # include #endif /* HAVE_UNISTD_H */ /* System-specific feature definitions and include files. */ #include "rldefs.h" #if defined (GWINSZ_IN_SYS_IOCTL) # include #endif /* GWINSZ_IN_SYS_IOCTL */ /* Some standard library routines. */ #include "readline.h" #include "history.h" #include "rlprivate.h" #if defined (HANDLE_SIGNALS) #if !defined (RETSIGTYPE) # if defined (VOID_SIGHANDLER) # define RETSIGTYPE void # else # define RETSIGTYPE int # endif /* !VOID_SIGHANDLER */ #endif /* !RETSIGTYPE */ #if defined (VOID_SIGHANDLER) # define SIGHANDLER_RETURN return #else # define SIGHANDLER_RETURN return (0) #endif /* This typedef is equivalent to the one for Function; it allows us to say SigHandler *foo = signal (SIGKILL, SIG_IGN); */ typedef RETSIGTYPE SigHandler (); #if defined (HAVE_POSIX_SIGNALS) typedef struct sigaction sighandler_cxt; # define rl_sigaction(s, nh, oh) sigaction(s, nh, oh) #else typedef struct { SigHandler *sa_handler; int sa_mask, sa_flags; } sighandler_cxt; # define sigemptyset(m) #endif /* !HAVE_POSIX_SIGNALS */ #ifndef SA_RESTART # define SA_RESTART 0 #endif static SigHandler *rl_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *)); static void rl_maybe_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *)); static RETSIGTYPE rl_signal_handler PARAMS((int)); static RETSIGTYPE _rl_handle_signal PARAMS((int)); /* Exported variables for use by applications. */ /* If non-zero, readline will install its own signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP, SIGTTIN, and SIGTTOU. */ int rl_catch_signals = 1; /* If non-zero, readline will install a signal handler for SIGWINCH. */ #ifdef SIGWINCH int rl_catch_sigwinch = 1; #else int rl_catch_sigwinch = 0; /* for the readline state struct in readline.c */ #endif /* Private variables. */ int _rl_interrupt_immediately = 0; int volatile _rl_caught_signal = 0; /* should be sig_atomic_t, but that requires including everywhere */ /* If non-zero, print characters corresponding to received signals as long as the user has indicated his desire to do so (_rl_echo_control_chars). */ int _rl_echoctl = 0; int _rl_intr_char = 0; int _rl_quit_char = 0; int _rl_susp_char = 0; static int signals_set_flag; static int sigwinch_set_flag; /* **************************************************************** */ /* */ /* Signal Handling */ /* */ /* **************************************************************** */ static sighandler_cxt old_int, old_term, old_alrm, old_quit; #if defined (SIGTSTP) static sighandler_cxt old_tstp, old_ttou, old_ttin; #endif #if defined (SIGWINCH) static sighandler_cxt old_winch; #endif /* Readline signal handler functions. */ /* Called from RL_CHECK_SIGNALS() macro */ RETSIGTYPE _rl_signal_handler (sig) int sig; { _rl_caught_signal = 0; /* XXX */ _rl_handle_signal (sig); SIGHANDLER_RETURN; } static RETSIGTYPE rl_signal_handler (sig) int sig; { if (_rl_interrupt_immediately || RL_ISSTATE(RL_STATE_CALLBACK)) { _rl_interrupt_immediately = 0; _rl_handle_signal (sig); } else _rl_caught_signal = sig; SIGHANDLER_RETURN; } static RETSIGTYPE _rl_handle_signal (sig) int sig; { #if defined (HAVE_POSIX_SIGNALS) sigset_t set; #else /* !HAVE_POSIX_SIGNALS */ # if defined (HAVE_BSD_SIGNALS) long omask; # else /* !HAVE_BSD_SIGNALS */ sighandler_cxt dummy_cxt; /* needed for rl_set_sighandler call */ # endif /* !HAVE_BSD_SIGNALS */ #endif /* !HAVE_POSIX_SIGNALS */ RL_SETSTATE(RL_STATE_SIGHANDLER); #if !defined (HAVE_BSD_SIGNALS) && !defined (HAVE_POSIX_SIGNALS) /* Since the signal will not be blocked while we are in the signal handler, ignore it until rl_clear_signals resets the catcher. */ # if defined (SIGALRM) if (sig == SIGINT || sig == SIGALRM) # else if (sig == SIGINT) # endif rl_set_sighandler (sig, SIG_IGN, &dummy_cxt); #endif /* !HAVE_BSD_SIGNALS && !HAVE_POSIX_SIGNALS */ switch (sig) { case SIGINT: _rl_reset_completion_state (); rl_free_line_state (); /* FALLTHROUGH */ case SIGTERM: #if defined (SIGTSTP) case SIGTSTP: case SIGTTOU: case SIGTTIN: #endif /* SIGTSTP */ #if defined (SIGALRM) case SIGALRM: #endif #if defined (SIGQUIT) case SIGQUIT: #endif rl_echo_signal_char (sig); rl_cleanup_after_signal (); #if defined (HAVE_POSIX_SIGNALS) sigemptyset (&set); sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set); sigdelset (&set, sig); #else /* !HAVE_POSIX_SIGNALS */ # if defined (HAVE_BSD_SIGNALS) omask = sigblock (0); # endif /* HAVE_BSD_SIGNALS */ #endif /* !HAVE_POSIX_SIGNALS */ #if defined (__EMX__) signal (sig, SIG_ACK); #endif #if defined (HAVE_KILL) kill (getpid (), sig); #else raise (sig); /* assume we have raise */ #endif /* Let the signal that we just sent through. */ #if defined (HAVE_POSIX_SIGNALS) sigprocmask (SIG_SETMASK, &set, (sigset_t *)NULL); #else /* !HAVE_POSIX_SIGNALS */ # if defined (HAVE_BSD_SIGNALS) sigsetmask (omask & ~(sigmask (sig))); # endif /* HAVE_BSD_SIGNALS */ #endif /* !HAVE_POSIX_SIGNALS */ rl_reset_after_signal (); } RL_UNSETSTATE(RL_STATE_SIGHANDLER); SIGHANDLER_RETURN; } #if defined (SIGWINCH) static RETSIGTYPE rl_sigwinch_handler (sig) int sig; { SigHandler *oh; #if defined (MUST_REINSTALL_SIGHANDLERS) sighandler_cxt dummy_winch; /* We don't want to change old_winch -- it holds the state of SIGWINCH disposition set by the calling application. We need this state because we call the application's SIGWINCH handler after updating our own idea of the screen size. */ rl_set_sighandler (SIGWINCH, rl_sigwinch_handler, &dummy_winch); #endif RL_SETSTATE(RL_STATE_SIGHANDLER); rl_resize_terminal (); /* If another sigwinch handler has been installed, call it. */ oh = (SigHandler *)old_winch.sa_handler; if (oh && oh != (SigHandler *)SIG_IGN && oh != (SigHandler *)SIG_DFL) (*oh) (sig); RL_UNSETSTATE(RL_STATE_SIGHANDLER); SIGHANDLER_RETURN; } #endif /* SIGWINCH */ /* Functions to manage signal handling. */ #if !defined (HAVE_POSIX_SIGNALS) static int rl_sigaction (sig, nh, oh) int sig; sighandler_cxt *nh, *oh; { oh->sa_handler = signal (sig, nh->sa_handler); return 0; } #endif /* !HAVE_POSIX_SIGNALS */ /* Set up a readline-specific signal handler, saving the old signal information in OHANDLER. Return the old signal handler, like signal(). */ static SigHandler * rl_set_sighandler (sig, handler, ohandler) int sig; SigHandler *handler; sighandler_cxt *ohandler; { sighandler_cxt old_handler; #if defined (HAVE_POSIX_SIGNALS) struct sigaction act; act.sa_handler = handler; # if defined (SIGWINCH) act.sa_flags = (sig == SIGWINCH) ? SA_RESTART : 0; # else act.sa_flags = 0; # endif /* SIGWINCH */ sigemptyset (&act.sa_mask); sigemptyset (&ohandler->sa_mask); sigaction (sig, &act, &old_handler); #else old_handler.sa_handler = (SigHandler *)signal (sig, handler); #endif /* !HAVE_POSIX_SIGNALS */ /* XXX -- assume we have memcpy */ /* If rl_set_signals is called twice in a row, don't set the old handler to rl_signal_handler, because that would cause infinite recursion. */ if (handler != rl_signal_handler || old_handler.sa_handler != rl_signal_handler) memcpy (ohandler, &old_handler, sizeof (sighandler_cxt)); return (ohandler->sa_handler); } static void rl_maybe_set_sighandler (sig, handler, ohandler) int sig; SigHandler *handler; sighandler_cxt *ohandler; { sighandler_cxt dummy; SigHandler *oh; sigemptyset (&dummy.sa_mask); oh = rl_set_sighandler (sig, handler, ohandler); if (oh == (SigHandler *)SIG_IGN) rl_sigaction (sig, ohandler, &dummy); } int rl_set_signals () { sighandler_cxt dummy; SigHandler *oh; #if defined (HAVE_POSIX_SIGNALS) static int sigmask_set = 0; static sigset_t bset, oset; #endif #if defined (HAVE_POSIX_SIGNALS) if (rl_catch_signals && sigmask_set == 0) { sigemptyset (&bset); sigaddset (&bset, SIGINT); sigaddset (&bset, SIGTERM); #if defined (SIGQUIT) sigaddset (&bset, SIGQUIT); #endif #if defined (SIGALRM) sigaddset (&bset, SIGALRM); #endif #if defined (SIGTSTP) sigaddset (&bset, SIGTSTP); #endif #if defined (SIGTTIN) sigaddset (&bset, SIGTTIN); #endif #if defined (SIGTTOU) sigaddset (&bset, SIGTTOU); #endif sigmask_set = 1; } #endif /* HAVE_POSIX_SIGNALS */ if (rl_catch_signals && signals_set_flag == 0) { #if defined (HAVE_POSIX_SIGNALS) sigemptyset (&oset); sigprocmask (SIG_BLOCK, &bset, &oset); #endif rl_maybe_set_sighandler (SIGINT, rl_signal_handler, &old_int); rl_maybe_set_sighandler (SIGTERM, rl_signal_handler, &old_term); #if defined (SIGQUIT) rl_maybe_set_sighandler (SIGQUIT, rl_signal_handler, &old_quit); #endif #if defined (SIGALRM) oh = rl_set_sighandler (SIGALRM, rl_signal_handler, &old_alrm); if (oh == (SigHandler *)SIG_IGN) rl_sigaction (SIGALRM, &old_alrm, &dummy); #if defined (HAVE_POSIX_SIGNALS) && defined (SA_RESTART) /* If the application using readline has already installed a signal handler with SA_RESTART, SIGALRM will cause reads to be restarted automatically, so readline should just get out of the way. Since we tested for SIG_IGN above, we can just test for SIG_DFL here. */ if (oh != (SigHandler *)SIG_DFL && (old_alrm.sa_flags & SA_RESTART)) rl_sigaction (SIGALRM, &old_alrm, &dummy); #endif /* HAVE_POSIX_SIGNALS */ #endif /* SIGALRM */ #if defined (SIGTSTP) rl_maybe_set_sighandler (SIGTSTP, rl_signal_handler, &old_tstp); #endif /* SIGTSTP */ #if defined (SIGTTOU) rl_maybe_set_sighandler (SIGTTOU, rl_signal_handler, &old_ttou); #endif /* SIGTTOU */ #if defined (SIGTTIN) rl_maybe_set_sighandler (SIGTTIN, rl_signal_handler, &old_ttin); #endif /* SIGTTIN */ signals_set_flag = 1; #if defined (HAVE_POSIX_SIGNALS) sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL); #endif } #if defined (SIGWINCH) if (rl_catch_sigwinch && sigwinch_set_flag == 0) { rl_maybe_set_sighandler (SIGWINCH, rl_sigwinch_handler, &old_winch); sigwinch_set_flag = 1; } #endif /* SIGWINCH */ return 0; } int rl_clear_signals () { sighandler_cxt dummy; if (rl_catch_signals && signals_set_flag == 1) { sigemptyset (&dummy.sa_mask); rl_sigaction (SIGINT, &old_int, &dummy); rl_sigaction (SIGTERM, &old_term, &dummy); #if defined (SIGQUIT) rl_sigaction (SIGQUIT, &old_quit, &dummy); #endif #if defined (SIGALRM) rl_sigaction (SIGALRM, &old_alrm, &dummy); #endif #if defined (SIGTSTP) rl_sigaction (SIGTSTP, &old_tstp, &dummy); #endif /* SIGTSTP */ #if defined (SIGTTOU) rl_sigaction (SIGTTOU, &old_ttou, &dummy); #endif /* SIGTTOU */ #if defined (SIGTTIN) rl_sigaction (SIGTTIN, &old_ttin, &dummy); #endif /* SIGTTIN */ signals_set_flag = 0; } #if defined (SIGWINCH) if (rl_catch_sigwinch && sigwinch_set_flag == 1) { sigemptyset (&dummy.sa_mask); rl_sigaction (SIGWINCH, &old_winch, &dummy); sigwinch_set_flag = 0; } #endif return 0; } /* Clean up the terminal and readline state after catching a signal, before resending it to the calling application. */ void rl_cleanup_after_signal () { _rl_clean_up_for_exit (); if (rl_deprep_term_function) (*rl_deprep_term_function) (); rl_clear_pending_input (); rl_clear_signals (); } /* Reset the terminal and readline state after a signal handler returns. */ void rl_reset_after_signal () { if (rl_prep_term_function) (*rl_prep_term_function) (_rl_meta_flag); rl_set_signals (); } /* Free up the readline variable line state for the current line (undo list, any partial history entry, any keyboard macros in progress, and any numeric arguments in process) after catching a signal, before calling rl_cleanup_after_signal(). */ void rl_free_line_state () { register HIST_ENTRY *entry; rl_free_undo_list (); entry = current_history (); if (entry) entry->data = (char *)NULL; _rl_kill_kbd_macro (); rl_clear_message (); _rl_reset_argument (); } #endif /* HANDLE_SIGNALS */ /* **************************************************************** */ /* */ /* SIGINT Management */ /* */ /* **************************************************************** */ #if defined (HAVE_POSIX_SIGNALS) static sigset_t sigint_set, sigint_oset; static sigset_t sigwinch_set, sigwinch_oset; #else /* !HAVE_POSIX_SIGNALS */ # if defined (HAVE_BSD_SIGNALS) static int sigint_oldmask; static int sigwinch_oldmask; # endif /* HAVE_BSD_SIGNALS */ #endif /* !HAVE_POSIX_SIGNALS */ static int sigint_blocked; static int sigwinch_blocked; /* Cause SIGINT to not be delivered until the corresponding call to release_sigint(). */ void _rl_block_sigint () { if (sigint_blocked) return; #if defined (HAVE_POSIX_SIGNALS) sigemptyset (&sigint_set); sigemptyset (&sigint_oset); sigaddset (&sigint_set, SIGINT); sigprocmask (SIG_BLOCK, &sigint_set, &sigint_oset); #else /* !HAVE_POSIX_SIGNALS */ # if defined (HAVE_BSD_SIGNALS) sigint_oldmask = sigblock (sigmask (SIGINT)); # else /* !HAVE_BSD_SIGNALS */ # if defined (HAVE_USG_SIGHOLD) sighold (SIGINT); # endif /* HAVE_USG_SIGHOLD */ # endif /* !HAVE_BSD_SIGNALS */ #endif /* !HAVE_POSIX_SIGNALS */ sigint_blocked = 1; } /* Allow SIGINT to be delivered. */ void _rl_release_sigint () { if (sigint_blocked == 0) return; #if defined (HAVE_POSIX_SIGNALS) sigprocmask (SIG_SETMASK, &sigint_oset, (sigset_t *)NULL); #else # if defined (HAVE_BSD_SIGNALS) sigsetmask (sigint_oldmask); # else /* !HAVE_BSD_SIGNALS */ # if defined (HAVE_USG_SIGHOLD) sigrelse (SIGINT); # endif /* HAVE_USG_SIGHOLD */ # endif /* !HAVE_BSD_SIGNALS */ #endif /* !HAVE_POSIX_SIGNALS */ sigint_blocked = 0; } #ifdef SIGWINCH /* Cause SIGWINCH to not be delivered until the corresponding call to release_sigwinch(). */ void _rl_block_sigwinch () { if (sigwinch_blocked) return; #if defined (HAVE_POSIX_SIGNALS) sigemptyset (&sigwinch_set); sigemptyset (&sigwinch_oset); sigaddset (&sigwinch_set, SIGWINCH); sigprocmask (SIG_BLOCK, &sigwinch_set, &sigwinch_oset); #else /* !HAVE_POSIX_SIGNALS */ # if defined (HAVE_BSD_SIGNALS) sigwinch_oldmask = sigblock (sigmask (SIGWINCH)); # else /* !HAVE_BSD_SIGNALS */ # if defined (HAVE_USG_SIGHOLD) sighold (SIGWINCH); # endif /* HAVE_USG_SIGHOLD */ # endif /* !HAVE_BSD_SIGNALS */ #endif /* !HAVE_POSIX_SIGNALS */ sigwinch_blocked = 1; } /* Allow SIGWINCH to be delivered. */ void _rl_release_sigwinch () { if (sigwinch_blocked == 0) return; #if defined (HAVE_POSIX_SIGNALS) sigprocmask (SIG_SETMASK, &sigwinch_oset, (sigset_t *)NULL); #else # if defined (HAVE_BSD_SIGNALS) sigsetmask (sigwinch_oldmask); # else /* !HAVE_BSD_SIGNALS */ # if defined (HAVE_USG_SIGHOLD) sigrelse (SIGWINCH); # endif /* HAVE_USG_SIGHOLD */ # endif /* !HAVE_BSD_SIGNALS */ #endif /* !HAVE_POSIX_SIGNALS */ sigwinch_blocked = 0; } #endif /* SIGWINCH */ /* **************************************************************** */ /* */ /* Echoing special control characters */ /* */ /* **************************************************************** */ void rl_echo_signal_char (sig) int sig; { char cstr[3]; int cslen, c; if (_rl_echoctl == 0 || _rl_echo_control_chars == 0) return; switch (sig) { case SIGINT: c = _rl_intr_char; break; #if defined (SIGQUIT) case SIGQUIT: c = _rl_quit_char; break; #endif #if defined (SIGTSTP) case SIGTSTP: c = _rl_susp_char; break; #endif default: return; } if (CTRL_CHAR (c) || c == RUBOUT) { cstr[0] = '^'; cstr[1] = CTRL_CHAR (c) ? UNCTRL (c) : '?'; cstr[cslen = 2] = '\0'; } else { cstr[0] = c; cstr[cslen = 1] = '\0'; } _rl_output_some_chars (cstr, cslen); } gdb-doc-7.6.2/readline/examples/0000755000175000017500000000000012266504076015474 5ustar zumbizumbigdb-doc-7.6.2/readline/examples/Makefile.in0000644000175000017500000000773012250770610017540 0ustar zumbizumbi# # This is the Makefile for the readline examples subdirectory. # # Copyright (C) 1994,2008,2009 Free Software Foundation, Inc. # 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 3 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, see . RL_LIBRARY_VERSION = @LIBVERSION@ SHELL = @MAKE_SHELL@ RM = rm -f prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ bindir = @bindir@ srcdir = @srcdir@ datadir = @datadir@ VPATH = @srcdir@ top_srcdir = @top_srcdir@ #BUILD_DIR = . BUILD_DIR = @BUILD_DIR@ installdir = $(datadir)/readline INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ # Support an alternate destination root directory for package building DESTDIR = DEFS = @DEFS@ CC = @CC@ CFLAGS = @CFLAGS@ LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DREADLINE_LIBRARY -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"' CPPFLAGS = @CPPFLAGS@ INCLUDES = -I$(srcdir) -I$(top_srcdir) -I.. CCFLAGS = $(DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) LDFLAGS = -g -L.. @LDFLAGS@ PURIFY = @PURIFY@ READLINE_LIB = ../libreadline.a HISTORY_LIB = ../libhistory.a TERMCAP_LIB = @TERMCAP_LIB@ .c.o: ${RM} $@ $(CC) $(CCFLAGS) -c $< SOURCES = excallback.c fileman.c histexamp.c manexamp.c rl-fgets.c rl.c \ rlcat.c rlevent.c rlptytest.c rltest.c rlversion.c EXECUTABLES = fileman$(EXEEXT) rltest$(EXEEXT) rl$(EXEEXT) rlcat$(EXEEXT) \ rlevent$(EXEEXT) rlversion$(EXEEXT) histexamp$(EXEEXT) OBJECTS = fileman.o rltest.o rl.o rlevent.o rlcat.o rlversion.o histexamp.o all: $(EXECUTABLES) everything: all check: rlversion$(EXEEXT) @echo Readline version: `rlversion$(EXEEXT)` installdirs: -$(SHELL) $(top_srcdir)/support/mkdirs $(DESTDIR)$(installdir) install: installdirs @for f in $(SOURCES); do \ $(RM) $(DESTDIR)$(installdir)/$$f ; \ $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(installdir) ; \ done uninstall: @for f in $(SOURCES); do \ $(RM) $(DESTDIR)$(installdir)/$$f ; \ done -rmdir $(DESTDIR)$(installdir) rl$(EXEEXT): rl.o $(READLINE_LIB) $(PURIFY) $(CC) $(LDFLAGS) -o $@ rl.o $(READLINE_LIB) $(TERMCAP_LIB) rlcat$(EXEEXT): rlcat.o $(READLINE_LIB) $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlcat.o $(READLINE_LIB) $(TERMCAP_LIB) rlevent$(EXEEXT): rlevent.o $(READLINE_LIB) $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlevent.o $(READLINE_LIB) $(TERMCAP_LIB) fileman$(EXEEXT): fileman.o $(READLINE_LIB) $(PURIFY) $(CC) $(LDFLAGS) -o $@ fileman.o $(READLINE_LIB) $(TERMCAP_LIB) rltest$(EXEEXT): rltest.o $(READLINE_LIB) $(PURIFY) $(CC) $(LDFLAGS) -o $@ rltest.o $(READLINE_LIB) $(TERMCAP_LIB) rlptytest$(EXEEXT): rlptytest.o $(READLINE_LIB) $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlptytest.o $(READLINE_LIB) $(TERMCAP_LIB) rlversion$(EXEEXT): rlversion.o $(READLINE_LIB) $(CC) $(LDFLAGS) -o $@ rlversion.o $(READLINE_LIB) $(TERMCAP_LIB) histexamp$(EXEEXT): histexamp.o $(HISTORY_LIB) $(PURIFY) $(CC) $(LDFLAGS) -o $@ histexamp.o -lhistory $(TERMCAP_LIB) clean mostlyclean: $(RM) $(OBJECTS) $(RM) $(EXECUTABLES) *.exe distclean maintainer-clean: clean $(RM) Makefile fileman.o: fileman.c rltest.o: rltest.c rl.o: rl.c rlversion.o: rlversion.c histexamp.o: histexamp.c rlcat.o: rlcat.c rlptytest.o: rlptytest.c fileman.o: $(top_srcdir)/readline.h rltest.o: $(top_srcdir)/readline.h rl.o: $(top_srcdir)/readline.h rlversion.o: $(top_srcdir)/readline.h histexamp.o: $(top_srcdir)/history.h rlcat.o: $(top_srcdir)/readline.h $(top_srcdir)/history.h rlptytest.o: $(top_srcdir)/readline.h $(top_srcdir)/history.h gdb-doc-7.6.2/readline/examples/rlptytest.c0000644000175000017500000001460312250770610017706 0ustar zumbizumbi/* * * Another test harness for the readline callback interface. * * Author: Bob Rossi */ #if defined (HAVE_CONFIG_H) #include #endif #include #include #include #include #include #include #include #if 0 /* LINUX */ #include #else #include #endif #ifdef READLINE_LIBRARY # include "readline.h" #else # include #endif /** * Master/Slave PTY used to keep readline off of stdin/stdout. */ static int masterfd = -1; static int slavefd; void sigint (s) int s; { tty_reset (STDIN_FILENO); close (masterfd); close (slavefd); printf ("\n"); exit (0); } static int user_input() { int size; const int MAX = 1024; char *buf = (char *)malloc(MAX+1); size = read (STDIN_FILENO, buf, MAX); if (size == -1) return -1; size = write (masterfd, buf, size); if (size == -1) return -1; return 0; } static int readline_input() { const int MAX = 1024; char *buf = (char *)malloc(MAX+1); int size; size = read (masterfd, buf, MAX); if (size == -1) { free( buf ); buf = NULL; return -1; } buf[size] = 0; /* Display output from readline */ if ( size > 0 ) fprintf(stderr, "%s", buf); free( buf ); buf = NULL; return 0; } static void rlctx_send_user_command(char *line) { /* This happens when rl_callback_read_char gets EOF */ if ( line == NULL ) return; if (strcmp (line, "exit") == 0) { tty_reset (STDIN_FILENO); close (masterfd); close (slavefd); printf ("\n"); exit (0); } /* Don't add the enter command */ if ( line && *line != '\0' ) add_history(line); } static void custom_deprep_term_function () { } static int init_readline (int inputfd, int outputfd) { FILE *inputFILE, *outputFILE; inputFILE = fdopen (inputfd, "r"); if (!inputFILE) return -1; outputFILE = fdopen (outputfd, "w"); if (!outputFILE) return -1; rl_instream = inputFILE; rl_outstream = outputFILE; /* Tell readline what the prompt is if it needs to put it back */ rl_callback_handler_install("(rltest): ", rlctx_send_user_command); /* Set the terminal type to dumb so the output of readline can be * understood by tgdb */ if ( rl_reset_terminal("dumb") == -1 ) return -1; /* For some reason, readline can not deprep the terminal. * However, it doesn't matter because no other application is working on * the terminal besides readline */ rl_deprep_term_function = custom_deprep_term_function; using_history(); read_history(".history"); return 0; } static int main_loop(void) { fd_set rset; int max; max = (masterfd > STDIN_FILENO) ? masterfd : STDIN_FILENO; max = (max > slavefd) ? max : slavefd; for (;;) { /* Reset the fd_set, and watch for input from GDB or stdin */ FD_ZERO(&rset); FD_SET(STDIN_FILENO, &rset); FD_SET(slavefd, &rset); FD_SET(masterfd, &rset); /* Wait for input */ if (select(max + 1, &rset, NULL, NULL, NULL) == -1) { if (errno == EINTR) continue; else return -1; } /* Input received through the pty: Handle it * Wrote to masterfd, slave fd has that input, alert readline to read it. */ if (FD_ISSET(slavefd, &rset)) rl_callback_read_char(); /* Input received through the pty. * Readline read from slavefd, and it wrote to the masterfd. */ if (FD_ISSET(masterfd, &rset)) if ( readline_input() == -1 ) return -1; /* Input received: Handle it, write to masterfd (input to readline) */ if (FD_ISSET(STDIN_FILENO, &rset)) if ( user_input() == -1 ) return -1; } return 0; } /* The terminal attributes before calling tty_cbreak */ static struct termios save_termios; static struct winsize size; static enum { RESET, TCBREAK } ttystate = RESET; /* tty_cbreak: Sets terminal to cbreak mode. Also known as noncanonical mode. * 1. Signal handling is still turned on, so the user can still type those. * 2. echo is off * 3. Read in one char at a time. * * fd - The file descriptor of the terminal * * Returns: 0 on sucess, -1 on error */ int tty_cbreak(int fd){ struct termios buf; int ttysavefd = -1; if(tcgetattr(fd, &save_termios) < 0) return -1; buf = save_termios; buf.c_lflag &= ~(ECHO | ICANON); buf.c_iflag &= ~(ICRNL | INLCR); buf.c_cc[VMIN] = 1; buf.c_cc[VTIME] = 0; #if defined (VLNEXT) && defined (_POSIX_VDISABLE) buf.c_cc[VLNEXT] = _POSIX_VDISABLE; #endif #if defined (VDSUSP) && defined (_POSIX_VDISABLE) buf.c_cc[VDSUSP] = _POSIX_VDISABLE; #endif /* enable flow control; only stty start char can restart output */ #if 0 buf.c_iflag |= (IXON|IXOFF); #ifdef IXANY buf.c_iflag &= ~IXANY; #endif #endif /* disable flow control; let ^S and ^Q through to pty */ buf.c_iflag &= ~(IXON|IXOFF); #ifdef IXANY buf.c_iflag &= ~IXANY; #endif if(tcsetattr(fd, TCSAFLUSH, &buf) < 0) return -1; ttystate = TCBREAK; ttysavefd = fd; /* set size */ if(ioctl(fd, TIOCGWINSZ, (char *)&size) < 0) return -1; #ifdef DEBUG err_msg("%d rows and %d cols\n", size.ws_row, size.ws_col); #endif return (0); } int tty_off_xon_xoff (int fd) { struct termios buf; int ttysavefd = -1; if(tcgetattr(fd, &buf) < 0) return -1; buf.c_iflag &= ~(IXON|IXOFF); if(tcsetattr(fd, TCSAFLUSH, &buf) < 0) return -1; return 0; } /* tty_reset: Sets the terminal attributes back to their previous state. * PRE: tty_cbreak must have already been called. * * fd - The file descrioptor of the terminal to reset. * * Returns: 0 on success, -1 on error */ int tty_reset(int fd) { if(ttystate != TCBREAK) return (0); if(tcsetattr(fd, TCSAFLUSH, &save_termios) < 0) return (-1); ttystate = RESET; return 0; } int main() { int val; val = openpty (&masterfd, &slavefd, NULL, NULL, NULL); if (val == -1) return -1; val = tty_off_xon_xoff (masterfd); if (val == -1) return -1; val = init_readline (slavefd, slavefd); if (val == -1) return -1; val = tty_cbreak (STDIN_FILENO); if (val == -1) return -1; signal (SIGINT, sigint); val = main_loop (); tty_reset (STDIN_FILENO); if (val == -1) return -1; return 0; } gdb-doc-7.6.2/readline/examples/ChangeLog.gdb0000644000175000017500000000071312250770610017772 0ustar zumbizumbi2011-05-11 Jan Kratochvil Imported readline 6.2, and upstream patch 001. 2006-04-24 Daniel Jacobowitz Imported readline 5.1, and upstream patches 001-004. 2002-02-24 Elena Zannoni * ChangeLog.gdb: Rename from ChangeLog.Cygnus. 2000-07-09 Elena Zannoni * Import of readline 4.1. New files: excallback.c, rlfe.c. gdb-doc-7.6.2/readline/examples/rl-fgets.c0000644000175000017500000002561312250770610017362 0ustar zumbizumbi/* Date: Tue, 16 Mar 2004 19:38:40 -0800 From: Harold Levy Subject: fgets(stdin) --> readline() redirector To: chet@po.cwru.edu Hi Chet, Here is something you may find useful enough to include in the readline distribution. It is a shared library that redirects calls to fgets(stdin) to readline() via LD_PRELOAD, and it supports a custom prompt and list of command names. Many people have asked me for this file, so I thought I'd pass it your way in hope of just including it with readline to begin with. Best Regards, -Harold */ /****************************************************************************** ******************************************************************************* FILE NAME: fgets.c TARGET: libfgets.so AUTHOR: Harold Levy VERSION: 1.0 hlevy@synopsys.com ABSTRACT: Customize fgets() behavior via LD_PRELOAD in the following ways: -- If fgets(stdin) is called, redirect to GNU readline() to obtain command-line editing, file-name completion, history, etc. -- A list of commands for command-name completion can be configured by setting the environment-variable FGETS_COMMAND_FILE to a file containing the list of commands to be used. -- Command-line editing with readline() works best when the prompt string is known; you can set this with the FGETS_PROMPT environment variable. -- There special strings that libfgets will interpret as internal commands: _fgets_reset_ reset the command list _fgets_dump_ dump status _fgets_debug_ toggle debug messages HOW TO BUILD: Here are examples of how to build libfgets.so on various platforms; you will have to add -I and -L flags to configure access to the readline header and library files. (32-bit builds with gcc) AIX: gcc -fPIC fgets.c -shared -o libfgets.so -lc -ldl -lreadline -ltermcap HP-UX: gcc -fPIC fgets.c -shared -o libfgets.so -lc -ldld -lreadline Linux: gcc -fPIC fgets.c -shared -o libfgets.so -lc -ldl -lreadline SunOS: gcc -fPIC fgets.c -shared -o libfgets.so -lc -ldl -lgen -lreadline (64-bit builds without gcc) SunOS: SUNWspro/bin/cc -D_LARGEFILE64_SOURCE=1 -xtarget=ultra -xarch=v9 \ -KPIC fgets.c -Bdynamic -lc -ldl -lgen -ltermcap -lreadline HOW TO USE: Different operating systems have different levels of support for the LD_PRELOAD concept. The generic method for 32-bit platforms is to put libtermcap.so, libfgets.so, and libreadline.so (with absolute paths) in the LD_PRELOAD environment variable, and to put their parent directories in the LD_LIBRARY_PATH environment variable. Unfortunately there is no generic method for 64-bit platforms; e.g. for 64-bit SunOS, you would have to build both 32-bit and 64-bit libfgets and libreadline libraries, and use the LD_FLAGS_32 and LD_FLAGS_64 environment variables with preload and library_path configurations (a mix of 32-bit and 64-bit calls are made under 64-bit SunOS). EXAMPLE WRAPPER: Here is an example shell script wrapper around the program "foo" that uses fgets() for command-line input: #!/bin/csh #### replace this with the libtermcap.so directory: set dir1 = "/usr/lib" #### replace this with the libfgets.so directory: set dir2 = "/usr/fgets" #### replace this with the libreadline.so directory: set dir3 = "/usr/local/lib" set lib1 = "${dir1}/libtermcap.so" set lib2 = "${dir2}/libfgets.so" set lib3 = "${dir3}/libreadline.so" if ( "${?LD_PRELOAD}" ) then setenv LD_PRELOAD "${lib1}:${lib2}:${lib3}:${LD_PRELOAD}" else setenv LD_PRELOAD "${lib1}:${lib2}:${lib3}" endif if ( "${?LD_LIBRARY_PATH}" ) then setenv LD_LIBRARY_PATH "${dir1}:${dir2}:${dir3}:${LD_LIBRARY_PATH}" else setenv LD_LIBRARY_PATH "${dir1}:${dir2}:${dir3}" endif setenv FGETS_COMMAND_FILE "${dir2}/foo.commands" setenv FGETS_PROMPT "foo> " exec "foo" $* Copyright (C)©2003-2004 Harold Levy. This code links to the GNU readline library, and as such is bound by the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 or (at your option) any later version. The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. 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. ******************************************************************************* ******************************************************************************/ #include #include #include #include #include #include #include /* for dynamically connecting to the native fgets() */ #if defined(RTLD_NEXT) #define REAL_LIBC RTLD_NEXT #else #define REAL_LIBC ((void *) -1L) #endif typedef char * ( * fgets_t ) ( char * s, int n, FILE * stream ) ; /* private data */ /* -- writeable data is stored in the shared library's data segment -- every process that uses the shared library gets a private memory copy of its entire data segment -- static data in the shared library is not copied to the application -- only read-only (i.e. 'const') data is stored in the shared library's text segment */ static char ** my_fgets_names = NULL ; static int my_fgets_number_of_names = 0 ; static int my_fgets_debug_flag = 0 ; /* invoked with _fgets_reset_ */ static void my_fgets_reset ( void ) { if ( my_fgets_names && (my_fgets_number_of_names > 0) ) { int i ; if ( my_fgets_debug_flag ) { printf ( "libfgets: removing command list\n" ) ; } for ( i = 0 ; i < my_fgets_number_of_names ; i ++ ) { if ( my_fgets_names[i] ) free ( my_fgets_names[i] ) ; } free ( my_fgets_names ) ; } my_fgets_names = NULL ; my_fgets_number_of_names = 0 ; } /* invoked with _fgets_dump_ */ static void my_fgets_dump ( void ) { char * s ; printf ( "\n" ) ; s = getenv ( "FGETS_PROMPT" ) ; printf ( "FGETS_PROMPT = %s\n", s ? s : "" ) ; s = getenv ( "FGETS_COMMAND_FILE" ) ; printf ( "FGETS_COMMAND_FILE = %s\n", s ? s : "" ) ; printf ( "debug flag = %d\n", my_fgets_debug_flag ) ; printf ( "#commands = %d\n", my_fgets_number_of_names ) ; if ( my_fgets_debug_flag ) { if ( my_fgets_names && (my_fgets_number_of_names > 0) ) { int i ; for ( i = 0 ; i < my_fgets_number_of_names ; i ++ ) { printf ( "%s\n", my_fgets_names[i] ) ; } } } printf ( "\n" ) ; } /* invoked with _fgets_debug_ */ static void my_fgets_debug_toggle ( void ) { my_fgets_debug_flag = my_fgets_debug_flag ? 0 : 1 ; if ( my_fgets_debug_flag ) { printf ( "libfgets: debug flag = %d\n", my_fgets_debug_flag ) ; } } /* read the command list if needed, return the i-th name */ static char * my_fgets_lookup ( int index ) { if ( (! my_fgets_names) || (! my_fgets_number_of_names) ) { char * fname ; FILE * fp ; fgets_t _fgets ; int i ; char buf1[256], buf2[256] ; fname = getenv ( "FGETS_COMMAND_FILE" ) ; if ( ! fname ) { if ( my_fgets_debug_flag ) { printf ( "libfgets: empty or unset FGETS_COMMAND_FILE\n" ) ; } return NULL ; } fp = fopen ( fname, "r" ) ; if ( ! fp ) { if ( my_fgets_debug_flag ) { printf ( "libfgets: cannot open '%s' for reading\n", fname ) ; } return NULL ; } _fgets = (fgets_t) dlsym ( REAL_LIBC, "fgets" ) ; if ( ! _fgets ) { fprintf ( stderr, "libfgets: failed to dynamically link to native fgets()\n" ) ; return NULL ; } for ( i = 0 ; _fgets(buf1,255,fp) ; i ++ ) ; if ( ! i ) { fclose(fp) ; return NULL ; } my_fgets_names = (char**) calloc ( i, sizeof(char*) ) ; rewind ( fp ) ; i = 0 ; while ( _fgets(buf1,255,fp) ) { buf1[255] = 0 ; if ( 1 == sscanf(buf1,"%s",buf2) ) { my_fgets_names[i] = strdup(buf2) ; i ++ ; } } fclose ( fp ) ; my_fgets_number_of_names = i ; if ( my_fgets_debug_flag ) { printf ( "libfgets: successfully read %d commands\n", i ) ; } } if ( index < my_fgets_number_of_names ) { return my_fgets_names[index] ; } else { return NULL ; } } /* generate a list of partial name matches for readline() */ static char * my_fgets_generator ( const char * text, int state ) { static int list_index, len ; char * name ; if ( ! state ) { list_index = 0 ; len = strlen ( text ) ; } while ( ( name = my_fgets_lookup(list_index) ) ) { list_index ++ ; if ( ! strncmp ( name, text, len ) ) { return ( strdup ( name ) ) ; } } return ( NULL ) ; } /* partial name completion callback for readline() */ static char ** my_fgets_completion ( const char * text, int start, int end ) { char ** matches ; matches = NULL ; if ( ! start ) { matches = rl_completion_matches ( text, my_fgets_generator ) ; } return ( matches ) ; } /* fgets() intercept */ char * fgets ( char * s, int n, FILE * stream ) { if ( ! s ) return NULL ; if ( stream == stdin ) { char * prompt ; char * my_fgets_line ; rl_already_prompted = 1 ; rl_attempted_completion_function = my_fgets_completion ; rl_catch_signals = 1 ; rl_catch_sigwinch = 1 ; rl_set_signals () ; prompt = getenv ( "FGETS_PROMPT" ) ; for ( my_fgets_line = 0 ; ! my_fgets_line ; my_fgets_line=readline(prompt) ) ; if ( ! strncmp(my_fgets_line, "_fgets_reset_", 13) ) { my_fgets_reset () ; free ( my_fgets_line ) ; strcpy ( s, "\n" ) ; return ( s ) ; } if ( ! strncmp(my_fgets_line, "_fgets_dump_", 12) ) { my_fgets_dump () ; free ( my_fgets_line ) ; strcpy ( s, "\n" ) ; return ( s ) ; } if ( ! strncmp(my_fgets_line, "_fgets_debug_", 13) ) { my_fgets_debug_toggle () ; free ( my_fgets_line ) ; strcpy ( s, "\n" ) ; return ( s ) ; } (void) strncpy ( s, my_fgets_line, n-1 ) ; (void) strcat ( s, "\n" ) ; if ( *my_fgets_line ) add_history ( my_fgets_line ) ; free ( my_fgets_line ) ; return ( s ) ; } else { static fgets_t _fgets ; _fgets = (fgets_t) dlsym ( REAL_LIBC, "fgets" ) ; if ( ! _fgets ) { fprintf ( stderr, "libfgets: failed to dynamically link to native fgets()\n" ) ; strcpy ( s, "\n" ) ; return ( s ) ; } return ( _fgets ( s, n, stream ) ) ; } } gdb-doc-7.6.2/readline/examples/readlinebuf.h0000644000175000017500000000651212250770610020121 0ustar zumbizumbi/******************************************************************************* * $Revision$ * $Date$ * $Author$ * * Contents: A streambuf which uses the GNU readline library for line I/O * (c) 2001 by Dimitris Vyzovitis [vyzo@media.mit.edu] * * 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 _READLINEBUF_H_ #define _READLINEBUF_H_ #include #include #include #include #include #include #include #if (defined __GNUC__) && (__GNUC__ < 3) #include #else #include using std::streamsize; using std::streambuf; #endif class readlinebuf : public streambuf { public: #if (defined __GNUC__) && (__GNUC__ < 3) typedef char char_type; typedef int int_type; typedef streampos pos_type; typedef streamoff off_type; #endif static const int_type eof = EOF; // this is -1 static const int_type not_eof = 0; private: const char* prompt_; bool history_; char* line_; int low_; int high_; protected: virtual int_type showmanyc() const { return high_ - low_; } virtual streamsize xsgetn( char_type* buf, streamsize n ) { int rd = n > (high_ - low_)? (high_ - low_) : n; memcpy( buf, line_, rd ); low_ += rd; if ( rd < n ) { low_ = high_ = 0; free( line_ ); // free( NULL ) is a noop line_ = readline( prompt_ ); if ( line_ ) { high_ = strlen( line_ ); if ( history_ && high_ ) add_history( line_ ); rd += xsgetn( buf + rd, n - rd ); } } return rd; } virtual int_type underflow() { if ( high_ == low_ ) { low_ = high_ = 0; free( line_ ); // free( NULL ) is a noop line_ = readline( prompt_ ); if ( line_ ) { high_ = strlen( line_ ); if ( history_ && high_ ) add_history( line_ ); } } if ( low_ < high_ ) return line_[low_]; else return eof; } virtual int_type uflow() { int_type c = underflow(); if ( c != eof ) ++low_; return c; } virtual int_type pbackfail( int_type c = eof ) { if ( low_ > 0 ) --low_; else if ( c != eof ) { if ( high_ > 0 ) { char* nl = (char*)realloc( line_, high_ + 1 ); if ( nl ) { line_ = (char*)memcpy( nl + 1, line_, high_ ); high_ += 1; line_[0] = char( c ); } else return eof; } else { assert( !line_ ); line_ = (char*)malloc( sizeof( char ) ); *line_ = char( c ); high_ = 1; } } else return eof; return not_eof; } public: readlinebuf( const char* prompt = NULL, bool history = true ) : prompt_( prompt ), history_( history ), line_( NULL ), low_( 0 ), high_( 0 ) { setbuf( 0, 0 ); } }; #endif gdb-doc-7.6.2/readline/examples/autoconf/0000755000175000017500000000000012266504076017312 5ustar zumbizumbigdb-doc-7.6.2/readline/examples/autoconf/BASH_CHECK_LIB_TERMCAP0000644000175000017500000000244112250770610022501 0ustar zumbizumbiAC_DEFUN([BASH_CHECK_LIB_TERMCAP], [ if test "X$bash_cv_termcap_lib" = "X"; then _bash_needmsg=yes else AC_MSG_CHECKING(which library has the termcap functions) _bash_needmsg= fi AC_CACHE_VAL(bash_cv_termcap_lib, [AC_CHECK_FUNC(tgetent, bash_cv_termcap_lib=libc, [AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap, [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo, [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses, [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses, bash_cv_termcap_lib=gnutermcap)])])])])]) if test "X$_bash_needmsg" = "Xyes"; then AC_MSG_CHECKING(which library has the termcap functions) fi AC_MSG_RESULT(using $bash_cv_termcap_lib) if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then LDFLAGS="$LDFLAGS -L./lib/termcap" TERMCAP_LIB="./lib/termcap/libtermcap.a" TERMCAP_DEP="./lib/termcap/libtermcap.a" elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then TERMCAP_LIB=-ltermcap TERMCAP_DEP= elif test $bash_cv_termcap_lib = libtinfo; then TERMCAP_LIB=-ltinfo TERMCAP_DEP= elif test $bash_cv_termcap_lib = libncurses; then TERMCAP_LIB=-lncurses TERMCAP_DEP= elif test $bash_cv_termcap_lib = libc; then TERMCAP_LIB= TERMCAP_DEP= else TERMCAP_LIB=-lcurses TERMCAP_DEP= fi ]) gdb-doc-7.6.2/readline/examples/autoconf/wi_LIB_READLINE0000644000175000017500000000432612250770610021602 0ustar zumbizumbidnl Borut Razem dnl dnl This macro checks for the presence of the readline library. dnl It works also in cross-compilation environment. dnl dnl To get it into the aclocal.m4 dnl file, do this: dnl aclocal -I . --verbose dnl dnl The --verbose will show all of the files that are searched dnl for .m4 macros. AC_DEFUN([wi_LIB_READLINE], [ dnl check for the readline.h header file AC_CHECK_HEADER(readline/readline.h) if test "$ac_cv_header_readline_readline_h" = yes; then dnl check the readline version cat > conftest.$ac_ext < #include wi_LIB_READLINE_VERSION RL_VERSION_MAJOR RL_VERSION_MINOR EOF wi_READLINE_VERSION=$($CPP $CPPFLAGS conftest.$ac_ext | sed -n -e "s/^wi_LIB_READLINE_VERSION *\([[0-9\]][[0-9\]]*\) *\([[0-9\]][[0-9\]]*\)$/\1.\2/p") rm -rf conftest* if test -n "$wi_READLINE_VERSION"; then wi_MAJOR=$(expr $wi_READLINE_VERSION : '\([[0-9]][[0-9]]*\)\.') wi_MINOR=$(expr $wi_READLINE_VERSION : '[[0-9]][[0-9]]*\.\([[0-9]][[0-9]]*$\)') if test $wi_MINOR -lt 10; then wi_MINOR=$(expr $wi_MINOR \* 10) fi wi_READLINE_VERSION=$(expr $wi_MAJOR \* 100 + $wi_MINOR) else wi_READLINE_VERSION=-1 fi dnl check for the readline library ac_save_LIBS="$LIBS" # Note: $LIBCURSES is permitted to be empty. for LIBREADLINE in "-lreadline.dll" "-lreadline" "-lreadline $LIBCURSES" "-lreadline -ltermcap" "-lreadline -lncurses" "-lreadline -lcurses" do AC_MSG_CHECKING([for GNU Readline library $LIBREADLINE]) LIBS="$ac_save_LIBS $LIBREADLINE" AC_TRY_LINK([ /* includes */ #include #include ],[ /* function-body */ int dummy = rl_completion_append_character; /* rl_completion_append_character appeared in version 2.1 */ readline(NULL); ],[ wi_cv_lib_readline=yes AC_MSG_RESULT(yes) ],[ wi_cv_lib_readline=no AC_MSG_RESULT(no) ]) if test "$wi_cv_lib_readline" = yes; then AC_SUBST(LIBREADLINE) AC_DEFINE_UNQUOTED(HAVE_LIBREADLINE, $wi_READLINE_VERSION, [Readline]) break fi done LIBS="$ac_save_LIBS" fi ]) gdb-doc-7.6.2/readline/examples/autoconf/RL_LIB_READLINE_VERSION0000644000175000017500000000556712250770610022715 0ustar zumbizumbidnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB dnl require: dnl AC_PROG_CC dnl BASH_CHECK_LIB_TERMCAP AC_DEFUN([RL_LIB_READLINE_VERSION], [ AC_REQUIRE([BASH_CHECK_LIB_TERMCAP]) AC_MSG_CHECKING([version of installed readline library]) # What a pain in the ass this is. # save cpp and ld options _save_CFLAGS="$CFLAGS" _save_LDFLAGS="$LDFLAGS" _save_LIBS="$LIBS" # Don't set ac_cv_rl_prefix if the caller has already assigned a value. This # allows the caller to do something like $_rl_prefix=$withval if the user # specifies --with-installed-readline=PREFIX as an argument to configure if test -z "$ac_cv_rl_prefix"; then test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix} fi eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib LIBS="$LIBS -lreadline ${TERMCAP_LIB}" CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}" LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}" AC_CACHE_VAL(ac_cv_rl_version, [AC_TRY_RUN([ #include #include extern int rl_gnu_readline_p; main() { FILE *fp; fp = fopen("conftest.rlv", "w"); if (fp == 0) exit(1); if (rl_gnu_readline_p != 1) fprintf(fp, "0.0\n"); else fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0"); fclose(fp); exit(0); } ], ac_cv_rl_version=`cat conftest.rlv`, ac_cv_rl_version='0.0', ac_cv_rl_version='4.2')]) CFLAGS="$_save_CFLAGS" LDFLAGS="$_save_LDFLAGS" LIBS="$_save_LIBS" RL_MAJOR=0 RL_MINOR=0 # ( case "$ac_cv_rl_version" in 2*|3*|4*|5*|6*|7*|8*|9*) RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'` RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[[a-zA-Z]]*$::'` ;; esac # ((( case $RL_MAJOR in [[0-9][0-9]]) _RL_MAJOR=$RL_MAJOR ;; [[0-9]]) _RL_MAJOR=0$RL_MAJOR ;; *) _RL_MAJOR=00 ;; esac # ((( case $RL_MINOR in [[0-9][0-9]]) _RL_MINOR=$RL_MINOR ;; [[0-9]]) _RL_MINOR=0$RL_MINOR ;; *) _RL_MINOR=00 ;; esac RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}" # Readline versions greater than 4.2 have these defines in readline.h if test $ac_cv_rl_version = '0.0' ; then AC_MSG_WARN([Could not test version of installed readline library.]) elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then # set these for use by the caller RL_PREFIX=$ac_cv_rl_prefix RL_LIBDIR=$ac_cv_rl_libdir RL_INCLUDEDIR=$ac_cv_rl_includedir AC_MSG_RESULT($ac_cv_rl_version) else AC_DEFINE_UNQUOTED(RL_READLINE_VERSION, $RL_VERSION, [encoded version of the installed readline library]) AC_DEFINE_UNQUOTED(RL_VERSION_MAJOR, $RL_MAJOR, [major version of installed readline library]) AC_DEFINE_UNQUOTED(RL_VERSION_MINOR, $RL_MINOR, [minor version of installed readline library]) AC_SUBST(RL_VERSION) AC_SUBST(RL_MAJOR) AC_SUBST(RL_MINOR) # set these for use by the caller RL_PREFIX=$ac_cv_rl_prefix RL_LIBDIR=$ac_cv_rl_libdir RL_INCLUDEDIR=$ac_cv_rl_includedir AC_MSG_RESULT($ac_cv_rl_version) fi ]) gdb-doc-7.6.2/readline/examples/rlversion.c0000644000175000017500000000240712250770610017656 0ustar zumbizumbi/* * rlversion -- print out readline's version number */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #if defined (HAVE_CONFIG_H) # include #endif #include #include #include "posixstat.h" #ifdef HAVE_STDLIB_H # include #else extern void exit(); #endif #ifdef READLINE_LIBRARY # include "readline.h" #else # include #endif main() { printf ("%s\n", rl_library_version ? rl_library_version : "unknown"); exit (0); } gdb-doc-7.6.2/readline/examples/fileman.c0000644000175000017500000002624212250770610017251 0ustar zumbizumbi/* fileman.c - file manager example for readline library. */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ /* fileman.c -- A tiny application which demonstrates how to use the GNU Readline library. This application interactively allows users to manipulate files and their modes. */ #ifdef HAVE_CONFIG_H # include #endif #include #ifdef HAVE_SYS_FILE_H # include #endif #include #ifdef HAVE_UNISTD_H # include #endif #include #include #include #if defined (HAVE_STRING_H) # include #else /* !HAVE_STRING_H */ # include #endif /* !HAVE_STRING_H */ #ifdef HAVE_STDLIB_H # include #endif #include #ifdef READLINE_LIBRARY # include "readline.h" # include "history.h" #else # include # include #endif extern char *xmalloc PARAMS((size_t)); /* The names of functions that actually do the manipulation. */ int com_list PARAMS((char *)); int com_view PARAMS((char *)); int com_rename PARAMS((char *)); int com_stat PARAMS((char *)); int com_pwd PARAMS((char *)); int com_delete PARAMS((char *)); int com_help PARAMS((char *)); int com_cd PARAMS((char *)); int com_quit PARAMS((char *)); /* A structure which contains information on the commands this program can understand. */ typedef struct { char *name; /* User printable name of the function. */ rl_icpfunc_t *func; /* Function to call to do the job. */ char *doc; /* Documentation for this function. */ } COMMAND; COMMAND commands[] = { { "cd", com_cd, "Change to directory DIR" }, { "delete", com_delete, "Delete FILE" }, { "help", com_help, "Display this text" }, { "?", com_help, "Synonym for `help'" }, { "list", com_list, "List files in DIR" }, { "ls", com_list, "Synonym for `list'" }, { "pwd", com_pwd, "Print the current working directory" }, { "quit", com_quit, "Quit using Fileman" }, { "rename", com_rename, "Rename FILE to NEWNAME" }, { "stat", com_stat, "Print out statistics on FILE" }, { "view", com_view, "View the contents of FILE" }, { (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL } }; /* Forward declarations. */ char *stripwhite (); COMMAND *find_command (); /* The name of this program, as taken from argv[0]. */ char *progname; /* When non-zero, this global means the user is done using this program. */ int done; char * dupstr (s) char *s; { char *r; r = xmalloc (strlen (s) + 1); strcpy (r, s); return (r); } main (argc, argv) int argc; char **argv; { char *line, *s; progname = argv[0]; initialize_readline (); /* Bind our completer. */ /* Loop reading and executing lines until the user quits. */ for ( ; done == 0; ) { line = readline ("FileMan: "); if (!line) break; /* Remove leading and trailing whitespace from the line. Then, if there is anything left, add it to the history list and execute it. */ s = stripwhite (line); if (*s) { add_history (s); execute_line (s); } free (line); } exit (0); } /* Execute a command line. */ int execute_line (line) char *line; { register int i; COMMAND *command; char *word; /* Isolate the command word. */ i = 0; while (line[i] && whitespace (line[i])) i++; word = line + i; while (line[i] && !whitespace (line[i])) i++; if (line[i]) line[i++] = '\0'; command = find_command (word); if (!command) { fprintf (stderr, "%s: No such command for FileMan.\n", word); return (-1); } /* Get argument to command, if any. */ while (whitespace (line[i])) i++; word = line + i; /* Call the function. */ return ((*(command->func)) (word)); } /* Look up NAME as the name of a command, and return a pointer to that command. Return a NULL pointer if NAME isn't a command name. */ COMMAND * find_command (name) char *name; { register int i; for (i = 0; commands[i].name; i++) if (strcmp (name, commands[i].name) == 0) return (&commands[i]); return ((COMMAND *)NULL); } /* Strip whitespace from the start and end of STRING. Return a pointer into STRING. */ char * stripwhite (string) char *string; { register char *s, *t; for (s = string; whitespace (*s); s++) ; if (*s == 0) return (s); t = s + strlen (s) - 1; while (t > s && whitespace (*t)) t--; *++t = '\0'; return s; } /* **************************************************************** */ /* */ /* Interface to Readline Completion */ /* */ /* **************************************************************** */ char *command_generator PARAMS((const char *, int)); char **fileman_completion PARAMS((const char *, int, int)); /* Tell the GNU Readline library how to complete. We want to try to complete on command names if this is the first word in the line, or on filenames if not. */ initialize_readline () { /* Allow conditional parsing of the ~/.inputrc file. */ rl_readline_name = "FileMan"; /* Tell the completer that we want a crack first. */ rl_attempted_completion_function = fileman_completion; } /* Attempt to complete on the contents of TEXT. START and END bound the region of rl_line_buffer that contains the word to complete. TEXT is the word to complete. We can use the entire contents of rl_line_buffer in case we want to do some simple parsing. Return the array of matches, or NULL if there aren't any. */ char ** fileman_completion (text, start, end) const char *text; int start, end; { char **matches; matches = (char **)NULL; /* If this word is at the start of the line, then it is a command to complete. Otherwise it is the name of a file in the current directory. */ if (start == 0) matches = rl_completion_matches (text, command_generator); return (matches); } /* Generator function for command completion. STATE lets us know whether to start from scratch; without any state (i.e. STATE == 0), then we start at the top of the list. */ char * command_generator (text, state) const char *text; int state; { static int list_index, len; char *name; /* If this is a new word to complete, initialize now. This includes saving the length of TEXT for efficiency, and initializing the index variable to 0. */ if (!state) { list_index = 0; len = strlen (text); } /* Return the next name which partially matches from the command list. */ while (name = commands[list_index].name) { list_index++; if (strncmp (name, text, len) == 0) return (dupstr(name)); } /* If no names matched, then return NULL. */ return ((char *)NULL); } /* **************************************************************** */ /* */ /* FileMan Commands */ /* */ /* **************************************************************** */ /* String to pass to system (). This is for the LIST, VIEW and RENAME commands. */ static char syscom[1024]; /* List the file(s) named in arg. */ com_list (arg) char *arg; { if (!arg) arg = ""; sprintf (syscom, "ls -FClg %s", arg); return (system (syscom)); } com_view (arg) char *arg; { if (!valid_argument ("view", arg)) return 1; #if defined (__MSDOS__) /* more.com doesn't grok slashes in pathnames */ sprintf (syscom, "less %s", arg); #else sprintf (syscom, "more %s", arg); #endif return (system (syscom)); } com_rename (arg) char *arg; { too_dangerous ("rename"); return (1); } com_stat (arg) char *arg; { struct stat finfo; if (!valid_argument ("stat", arg)) return (1); if (stat (arg, &finfo) == -1) { perror (arg); return (1); } printf ("Statistics for `%s':\n", arg); printf ("%s has %d link%s, and is %d byte%s in length.\n", arg, finfo.st_nlink, (finfo.st_nlink == 1) ? "" : "s", finfo.st_size, (finfo.st_size == 1) ? "" : "s"); printf ("Inode Last Change at: %s", ctime (&finfo.st_ctime)); printf (" Last access at: %s", ctime (&finfo.st_atime)); printf (" Last modified at: %s", ctime (&finfo.st_mtime)); return (0); } com_delete (arg) char *arg; { too_dangerous ("delete"); return (1); } /* Print out help for ARG, or for all of the commands if ARG is not present. */ com_help (arg) char *arg; { register int i; int printed = 0; for (i = 0; commands[i].name; i++) { if (!*arg || (strcmp (arg, commands[i].name) == 0)) { printf ("%s\t\t%s.\n", commands[i].name, commands[i].doc); printed++; } } if (!printed) { printf ("No commands match `%s'. Possibilties are:\n", arg); for (i = 0; commands[i].name; i++) { /* Print in six columns. */ if (printed == 6) { printed = 0; printf ("\n"); } printf ("%s\t", commands[i].name); printed++; } if (printed) printf ("\n"); } return (0); } /* Change to the directory ARG. */ com_cd (arg) char *arg; { if (chdir (arg) == -1) { perror (arg); return 1; } com_pwd (""); return (0); } /* Print out the current working directory. */ com_pwd (ignore) char *ignore; { char dir[1024], *s; s = getcwd (dir, sizeof(dir) - 1); if (s == 0) { printf ("Error getting pwd: %s\n", dir); return 1; } printf ("Current directory is %s\n", dir); return 0; } /* The user wishes to quit using this program. Just set DONE non-zero. */ com_quit (arg) char *arg; { done = 1; return (0); } /* Function which tells you that you can't do this. */ too_dangerous (caller) char *caller; { fprintf (stderr, "%s: Too dangerous for me to distribute. Write it yourself.\n", caller); } /* Return non-zero if ARG is a valid argument for CALLER, else print an error message and return zero. */ int valid_argument (caller, arg) char *caller, *arg; { if (!arg || !*arg) { fprintf (stderr, "%s: Argument required.\n", caller); return (0); } return (1); } gdb-doc-7.6.2/readline/examples/rlevent.c0000644000175000017500000000633712250770610017320 0ustar zumbizumbi/* * rl - command-line interface to read a line from the standard input * (or another fd) using readline. * * usage: rl [-p prompt] [-u unit] [-d default] [-n nchars] */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #if defined (HAVE_CONFIG_H) # include #endif #include #include #ifdef HAVE_STDLIB_H # include #else extern void exit(); #endif #if defined (READLINE_LIBRARY) # include "posixstat.h" # include "readline.h" # include "history.h" #else # include # include # include #endif extern int optind; extern char *optarg; #if !defined (strchr) && !defined (__STDC__) extern char *strrchr(); #endif static char *progname; static char *deftext; static int event_hook () { fprintf (stderr, "ding!\n"); sleep (1); return 0; } static int set_deftext () { if (deftext) { rl_insert_text (deftext); deftext = (char *)NULL; rl_startup_hook = (rl_hook_func_t *)NULL; } return 0; } static void usage() { fprintf (stderr, "%s: usage: %s [-p prompt] [-u unit] [-d default] [-n nchars]\n", progname, progname); } int main (argc, argv) int argc; char **argv; { char *temp, *prompt; struct stat sb; int opt, fd, nch; FILE *ifp; progname = strrchr(argv[0], '/'); if (progname == 0) progname = argv[0]; else progname++; /* defaults */ prompt = "readline$ "; fd = nch = 0; deftext = (char *)0; while ((opt = getopt(argc, argv, "p:u:d:n:")) != EOF) { switch (opt) { case 'p': prompt = optarg; break; case 'u': fd = atoi(optarg); if (fd < 0) { fprintf (stderr, "%s: bad file descriptor `%s'\n", progname, optarg); exit (2); } break; case 'd': deftext = optarg; break; case 'n': nch = atoi(optarg); if (nch < 0) { fprintf (stderr, "%s: bad value for -n: `%s'\n", progname, optarg); exit (2); } break; default: usage (); exit (2); } } if (fd != 0) { if (fstat (fd, &sb) < 0) { fprintf (stderr, "%s: %d: bad file descriptor\n", progname, fd); exit (1); } ifp = fdopen (fd, "r"); rl_instream = ifp; } if (deftext && *deftext) rl_startup_hook = set_deftext; if (nch > 0) rl_num_chars_to_read = nch; rl_event_hook = event_hook; temp = readline (prompt); /* Test for EOF. */ if (temp == 0) exit (1); printf ("%s\n", temp); exit (0); } gdb-doc-7.6.2/readline/examples/histexamp.c0000644000175000017500000000551112250770610017634 0ustar zumbizumbi/* histexamp.c - history library example program. */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #include #ifdef READLINE_LIBRARY # include "history.h" #else # include #endif #include main (argc, argv) int argc; char **argv; { char line[1024], *t; int len, done; line[0] = 0; done = 0; using_history (); while (!done) { printf ("history$ "); fflush (stdout); t = fgets (line, sizeof (line) - 1, stdin); if (t && *t) { len = strlen (t); if (t[len - 1] == '\n') t[len - 1] = '\0'; } if (!t) strcpy (line, "quit"); if (line[0]) { char *expansion; int result; using_history (); result = history_expand (line, &expansion); if (result) fprintf (stderr, "%s\n", expansion); if (result < 0 || result == 2) { free (expansion); continue; } add_history (expansion); strncpy (line, expansion, sizeof (line) - 1); free (expansion); } if (strcmp (line, "quit") == 0) done = 1; else if (strcmp (line, "save") == 0) write_history ("history_file"); else if (strcmp (line, "read") == 0) read_history ("history_file"); else if (strcmp (line, "list") == 0) { register HIST_ENTRY **the_list; register int i; time_t tt; char timestr[128]; the_list = history_list (); if (the_list) for (i = 0; the_list[i]; i++) { tt = history_get_time (the_list[i]); if (tt) strftime (timestr, sizeof (timestr), "%a %R", localtime(&tt)); else strcpy (timestr, "??"); printf ("%d: %s: %s\n", i + history_base, timestr, the_list[i]->line); } } else if (strncmp (line, "delete", 6) == 0) { int which; if ((sscanf (line + 6, "%d", &which)) == 1) { HIST_ENTRY *entry = remove_history (which); if (!entry) fprintf (stderr, "No such entry %d\n", which); else { free (entry->line); free (entry); } } else { fprintf (stderr, "non-numeric arg given to `delete'\n"); } } } } gdb-doc-7.6.2/readline/examples/rlcat.c0000644000175000017500000000634312250770610016743 0ustar zumbizumbi/* * rlcat - cat(1) using readline * * usage: rlcat */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #if defined (HAVE_CONFIG_H) # include #endif #ifdef HAVE_UNISTD_H # include #endif #include #include "posixstat.h" #include #include #include #include #ifdef HAVE_STDLIB_H # include #else extern void exit(); #endif #ifndef errno extern int errno; #endif #if defined (READLINE_LIBRARY) # include "readline.h" # include "history.h" #else # include # include #endif extern int optind; extern char *optarg; static int stdcat(); static char *progname; static int vflag; static void usage() { fprintf (stderr, "%s: usage: %s [-vEVN] [filename]\n", progname, progname); } int main (argc, argv) int argc; char **argv; { char *temp; int opt, Vflag, Nflag; progname = strrchr(argv[0], '/'); if (progname == 0) progname = argv[0]; else progname++; vflag = Vflag = Nflag = 0; while ((opt = getopt(argc, argv, "vEVN")) != EOF) { switch (opt) { case 'v': vflag = 1; break; case 'V': Vflag = 1; break; case 'E': Vflag = 0; break; case 'N': Nflag = 1; break; default: usage (); exit (2); } } argc -= optind; argv += optind; if (isatty(0) == 0 || argc || Nflag) return stdcat(argc, argv); rl_variable_bind ("editing-mode", Vflag ? "vi" : "emacs"); while (temp = readline ("")) { if (*temp) add_history (temp); printf ("%s\n", temp); } return (ferror (stdout)); } static int fcopy(fp) FILE *fp; { int c; char *x; while ((c = getc(fp)) != EOF) { if (vflag && isascii ((unsigned char)c) && isprint((unsigned char)c) == 0) { x = rl_untranslate_keyseq (c); if (fputs (x, stdout) != 0) return 1; } else if (putchar (c) == EOF) return 1; } return (ferror (stdout)); } int stdcat (argc, argv) int argc; char **argv; { int i, fd, r; char *s; FILE *fp; if (argc == 0) return (fcopy(stdin)); for (i = 0, r = 1; i < argc; i++) { if (*argv[i] == '-' && argv[i][1] == 0) fp = stdin; else { fp = fopen (argv[i], "r"); if (fp == 0) { fprintf (stderr, "%s: %s: cannot open: %s\n", progname, argv[i], strerror(errno)); continue; } } r = fcopy (fp); if (fp != stdin) fclose(fp); } return r; } gdb-doc-7.6.2/readline/examples/rl.c0000644000175000017500000000615312250770610016252 0ustar zumbizumbi/* * rl - command-line interface to read a line from the standard input * (or another fd) using readline. * * usage: rl [-p prompt] [-u unit] [-d default] [-n nchars] */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #if defined (HAVE_CONFIG_H) # include #endif #include #include #ifdef HAVE_STDLIB_H # include #else extern void exit(); #endif #if defined (READLINE_LIBRARY) # include "posixstat.h" # include "readline.h" # include "history.h" #else # include # include # include #endif extern int optind; extern char *optarg; #if !defined (strchr) && !defined (__STDC__) extern char *strrchr(); #endif static char *progname; static char *deftext; static int set_deftext () { if (deftext) { rl_insert_text (deftext); deftext = (char *)NULL; rl_startup_hook = (rl_hook_func_t *)NULL; } return 0; } static void usage() { fprintf (stderr, "%s: usage: %s [-p prompt] [-u unit] [-d default] [-n nchars]\n", progname, progname); } int main (argc, argv) int argc; char **argv; { char *temp, *prompt; struct stat sb; int opt, fd, nch; FILE *ifp; progname = strrchr(argv[0], '/'); if (progname == 0) progname = argv[0]; else progname++; /* defaults */ prompt = "readline$ "; fd = nch = 0; deftext = (char *)0; while ((opt = getopt(argc, argv, "p:u:d:n:")) != EOF) { switch (opt) { case 'p': prompt = optarg; break; case 'u': fd = atoi(optarg); if (fd < 0) { fprintf (stderr, "%s: bad file descriptor `%s'\n", progname, optarg); exit (2); } break; case 'd': deftext = optarg; break; case 'n': nch = atoi(optarg); if (nch < 0) { fprintf (stderr, "%s: bad value for -n: `%s'\n", progname, optarg); exit (2); } break; default: usage (); exit (2); } } if (fd != 0) { if (fstat (fd, &sb) < 0) { fprintf (stderr, "%s: %d: bad file descriptor\n", progname, fd); exit (1); } ifp = fdopen (fd, "r"); rl_instream = ifp; } if (deftext && *deftext) rl_startup_hook = set_deftext; if (nch > 0) rl_num_chars_to_read = nch; temp = readline (prompt); /* Test for EOF. */ if (temp == 0) exit (1); printf ("%s\n", temp); exit (0); } gdb-doc-7.6.2/readline/examples/manexamp.c0000644000175000017500000000634412250770610017445 0ustar zumbizumbi/* manexamp.c -- The examples which appear in the documentation are here. */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #include #include /* **************************************************************** */ /* */ /* How to Emulate gets () */ /* */ /* **************************************************************** */ /* A static variable for holding the line. */ static char *line_read = (char *)NULL; /* Read a string, and return a pointer to it. Returns NULL on EOF. */ char * rl_gets () { /* If the buffer has already been allocated, return the memory to the free pool. */ if (line_read) { free (line_read); line_read = (char *)NULL; } /* Get a line from the user. */ line_read = readline (""); /* If the line has any text in it, save it on the history. */ if (line_read && *line_read) add_history (line_read); return (line_read); } /* **************************************************************** */ /* */ /* Writing a Function to be Called by Readline. */ /* */ /* **************************************************************** */ /* Invert the case of the COUNT following characters. */ invert_case_line (count, key) int count, key; { register int start, end; start = rl_point; if (count < 0) { direction = -1; count = -count; } else direction = 1; /* Find the end of the range to modify. */ end = start + (count * direction); /* Force it to be within range. */ if (end > rl_end) end = rl_end; else if (end < 0) end = -1; if (start > end) { int temp = start; start = end; end = temp; } if (start == end) return; /* Tell readline that we are modifying the line, so save the undo information. */ rl_modifying (start, end); for (; start != end; start += direction) { if (_rl_uppercase_p (rl_line_buffer[start])) rl_line_buffer[start] = _rl_to_lower (rl_line_buffer[start]); else if (_rl_lowercase_p (rl_line_buffer[start])) rl_line_buffer[start] = _rl_to_upper (rl_line_buffer[start]); } /* Move point to on top of the last character changed. */ rl_point = end - direction; } gdb-doc-7.6.2/readline/examples/excallback.c0000644000175000017500000001314612250770610017726 0ustar zumbizumbi/* From: Jeff Solomon Date: Fri, 9 Apr 1999 10:13:27 -0700 (PDT) To: chet@po.cwru.edu Subject: new readline example Message-ID: <14094.12094.527305.199695@mrclean.Stanford.EDU> Chet, I've been using readline 4.0. Specifically, I've been using the perl version Term::ReadLine::Gnu. It works great. Anyway, I've been playing around the alternate interface and I wanted to contribute a little C program, callback.c, to you that you could use as an example of the alternate interface in the /examples directory of the readline distribution. My example shows how, using the alternate interface, you can interactively change the prompt (which is very nice imo). Also, I point out that you must roll your own terminal setting when using the alternate interface because readline depreps (using your parlance) the terminal while in the user callback. I try to demostrate what I mean with an example. I've included the program below. To compile, I just put the program in the examples directory and made the appropriate changes to the EXECUTABLES and OBJECTS line and added an additional target 'callback'. I compiled on my Sun Solaris2.6 box using Sun's cc. Let me know what you think. Jeff */ /* Copyright (C) 1999 Jeff Solomon */ #if defined (HAVE_CONFIG_H) #include #endif #include #include #ifdef HAVE_UNISTD_H #include #endif #include /* xxx - should make this more general */ #ifdef READLINE_LIBRARY # include "readline.h" #else # include #endif /* This little examples demonstrates the alternate interface to using readline. * In the alternate interface, the user maintains control over program flow and * only calls readline when STDIN is readable. Using the alternate interface, * you can do anything else while still using readline (like talking to a * network or another program) without blocking. * * Specifically, this program highlights two importants features of the * alternate interface. The first is the ability to interactively change the * prompt, which can't be done using the regular interface since rl_prompt is * read-only. * * The second feature really highlights a subtle point when using the alternate * interface. That is, readline will not alter the terminal when inside your * callback handler. So let's so, your callback executes a user command that * takes a non-trivial amount of time to complete (seconds). While your * executing the command, the user continues to type keystrokes and expects them * to be re-echoed on the new prompt when it returns. Unfortunately, the default * terminal configuration doesn't do this. After the prompt returns, the user * must hit one additional keystroke and then will see all of his previous * keystrokes. To illustrate this, compile and run this program. Type "sleep" at * the prompt and then type "bar" before the prompt returns (you have 3 * seconds). Notice how "bar" is re-echoed on the prompt after the prompt * returns? This is what you expect to happen. Now comment out the 4 lines below * the line that says COMMENT LINE BELOW. Recompile and rerun the program and do * the same thing. When the prompt returns, you should not see "bar". Now type * "f", see how "barf" magically appears? This behavior is un-expected and not * desired. */ void process_line(char *line); int change_prompt(void); char *get_prompt(void); int prompt = 1; char prompt_buf[40], line_buf[256]; tcflag_t old_lflag; cc_t old_vtime; struct termios term; int main() { fd_set fds; /* Adjust the terminal slightly before the handler is installed. Disable * canonical mode processing and set the input character time flag to be * non-blocking. */ if( tcgetattr(STDIN_FILENO, &term) < 0 ) { perror("tcgetattr"); exit(1); } old_lflag = term.c_lflag; old_vtime = term.c_cc[VTIME]; term.c_lflag &= ~ICANON; term.c_cc[VTIME] = 1; /* COMMENT LINE BELOW - see above */ if( tcsetattr(STDIN_FILENO, TCSANOW, &term) < 0 ) { perror("tcsetattr"); exit(1); } rl_add_defun("change-prompt", change_prompt, CTRL('t')); rl_callback_handler_install(get_prompt(), process_line); while(1) { FD_ZERO(&fds); FD_SET(fileno(stdin), &fds); if( select(FD_SETSIZE, &fds, NULL, NULL, NULL) < 0) { perror("select"); exit(1); } if( FD_ISSET(fileno(stdin), &fds) ) { rl_callback_read_char(); } } } void process_line(char *line) { if( line == NULL ) { fprintf(stderr, "\n", line); /* reset the old terminal setting before exiting */ term.c_lflag = old_lflag; term.c_cc[VTIME] = old_vtime; if( tcsetattr(STDIN_FILENO, TCSANOW, &term) < 0 ) { perror("tcsetattr"); exit(1); } exit(0); } if( strcmp(line, "sleep") == 0 ) { sleep(3); } else { fprintf(stderr, "|%s|\n", line); } free (line); } int change_prompt(void) { /* toggle the prompt variable */ prompt = !prompt; /* save away the current contents of the line */ strcpy(line_buf, rl_line_buffer); /* install a new handler which will change the prompt and erase the current line */ rl_callback_handler_install(get_prompt(), process_line); /* insert the old text on the new line */ rl_insert_text(line_buf); /* redraw the current line - this is an undocumented function. It invokes the * redraw-current-line command. */ rl_refresh_line(0, 0); } char * get_prompt(void) { /* The prompts can even be different lengths! */ sprintf(prompt_buf, "%s", prompt ? "Hit ctrl-t to toggle prompt> " : "Pretty cool huh?> "); return prompt_buf; } gdb-doc-7.6.2/readline/examples/rlfe/0000755000175000017500000000000012266504076016424 5ustar zumbizumbigdb-doc-7.6.2/readline/examples/rlfe/os.h0000644000175000017500000002773412250770610017223 0ustar zumbizumbi/* Copyright (c) 1993-2002 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) * Copyright (c) 1987 Oliver Laumann * * 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, 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 (see the file COPYING); if not, write to the * Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * **************************************************************** * $Id$ FAU */ #include #include #include /* In strict ANSI mode, HP-UX machines define __hpux but not hpux */ #if defined(__hpux) && !defined(hpux) # define hpux #endif #if defined(__bsdi__) || defined(__386BSD__) || defined(_CX_UX) || defined(hpux) || defined(_IBMR2) || defined(linux) # include #endif /* __bsdi__ || __386BSD__ || _CX_UX || hpux || _IBMR2 || linux */ #ifdef ISC # ifdef ENAMETOOLONG # undef ENAMETOOLONG # endif # ifdef ENOTEMPTY # undef ENOTEMPTY # endif # include # include #endif #ifdef sun # define getpgrp __getpgrp # define exit __exit #endif #ifdef POSIX # include # if defined(__STDC__) # include # endif /* __STDC__ */ #endif /* POSIX */ #ifdef sun # undef getpgrp # undef exit #endif /* sun */ #ifndef linux /* all done in */ extern int errno; #endif /* linux */ #ifndef HAVE_STRERROR /* No macros, please */ #undef strerror #endif #if !defined(SYSV) && !defined(linux) # ifdef NEWSOS # define strlen ___strlen___ # include # undef strlen # else /* NEWSOS */ # include # endif /* NEWSOS */ #else /* SYSV */ # if defined(SVR4) || defined(NEWSOS) # define strlen ___strlen___ # include # undef strlen # if !defined(NEWSOS) && !defined(__hpux) extern size_t strlen(const char *); # endif # else /* SVR4 */ # include # endif /* SVR4 */ #endif /* SYSV */ #ifdef USEVARARGS # if defined(__STDC__) # include # define VA_LIST(var) va_list var; # define VA_DOTS ... # define VA_DECL # define VA_START(ap, fmt) va_start(ap, fmt) # define VA_ARGS(ap) ap # define VA_END(ap) va_end(ap) # else # include # define VA_LIST(var) va_list var; # define VA_DOTS va_alist # define VA_DECL va_dcl # define VA_START(ap, fmt) va_start(ap) # define VA_ARGS(ap) ap # define VA_END(ap) va_end(ap) # endif #else # define VA_LIST(var) # define VA_DOTS p1, p2, p3, p4, p5, p6 # define VA_DECL unsigned long VA_DOTS; # define VA_START(ap, fmt) # define VA_ARGS(ap) VA_DOTS # define VA_END(ap) # undef vsnprintf # define vsnprintf xsnprintf #endif #if !defined(sun) && !defined(B43) && !defined(ISC) && !defined(pyr) && !defined(_CX_UX) # include #endif #include #ifdef M_UNIX /* SCO */ # include # include # define ftruncate(fd, s) chsize(fd, s) #endif #ifdef SYSV # define index strchr # define rindex strrchr # define bzero(poi,len) memset(poi,0,len) # define bcmp memcmp # define killpg(pgrp,sig) kill( -(pgrp), sig) #endif #ifndef HAVE_GETCWD # define getcwd(b,l) getwd(b) #endif #ifndef USEBCOPY # ifdef USEMEMMOVE # define bcopy(s,d,len) memmove(d,s,len) # else # ifdef USEMEMCPY # define bcopy(s,d,len) memcpy(d,s,len) # else # define NEED_OWN_BCOPY # define bcopy xbcopy # endif # endif #endif #ifdef hpux # define setreuid(ruid, euid) setresuid(ruid, euid, -1) # define setregid(rgid, egid) setresgid(rgid, egid, -1) #endif #if defined(HAVE_SETEUID) || defined(HAVE_SETREUID) # define USE_SETEUID #endif #if !defined(HAVE__EXIT) && !defined(_exit) #define _exit(x) exit(x) #endif #ifndef HAVE_UTIMES # define utimes utime #endif #ifdef BUILTIN_TELNET # include # include #endif #if defined(USE_LOCALE) && (!defined(HAVE_SETLOCALE) || !defined(HAVE_STRFTIME)) # undef USE_LOCALE #endif /***************************************************************** * terminal handling */ #if defined (POSIX) || defined (__FreeBSD__) # include # ifdef hpux # include # endif /* hpux */ # ifdef NCCS # define MAXCC NCCS # else # define MAXCC 256 # endif #else /* POSIX */ # ifdef TERMIO # include # ifdef NCC # define MAXCC NCC # else # define MAXCC 256 # endif # ifdef CYTERMIO # include # endif # else /* TERMIO */ # include # endif /* TERMIO */ #endif /* POSIX */ #ifndef VDISABLE # ifdef _POSIX_VDISABLE # define VDISABLE _POSIX_VDISABLE # else # define VDISABLE 0377 # endif /* _POSIX_VDISABLE */ #endif /* !VDISABLE */ /* on sgi, regardless of the stream head's read mode (RNORM/RMSGN/RMSGD) * TIOCPKT mode causes data loss if our buffer is too small (IOSIZE) * to hold the whole packet at first read(). * (Marc Boucher) * * matthew green: * TIOCPKT is broken on dgux 5.4.1 generic AViiON mc88100 * * Joe Traister: On AIX4, programs like irc won't work if screen * uses TIOCPKT (select fails to return on pty read). */ #if defined(sgi) || defined(DGUX) || defined(_IBMR2) # undef TIOCPKT #endif /* linux ncurses is broken, we have to use our own tputs */ #if defined(linux) && defined(TERMINFO) # define tputs xtputs #endif /* Alexandre Oliva: SVR4 style ptys don't work with osf */ #ifdef __osf__ # undef HAVE_SVR4_PTYS #endif /***************************************************************** * utmp handling */ #ifdef GETUTENT typedef char *slot_t; #else typedef int slot_t; #endif #if defined(UTMPOK) || defined(BUGGYGETLOGIN) # if defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux) # include # define UTMPFILE UTMPX_FILE # define utmp utmpx # define getutent getutxent # define getutid getutxid # define getutline getutxline # define pututline pututxline # define setutent setutxent # define endutent endutxent # define ut_time ut_xtime # else /* SVR4 */ # include # endif /* SVR4 */ # ifdef apollo /* * We don't have GETUTENT, so we dig into utmp ourselves. * But we save the permanent filedescriptor and * open utmp just when we need to. * This code supports an unsorted utmp. jw. */ # define UTNOKEEP # endif /* apollo */ # ifndef UTMPFILE # ifdef UTMP_FILE # define UTMPFILE UTMP_FILE # else # ifdef _PATH_UTMP # define UTMPFILE _PATH_UTMP # else # define UTMPFILE "/etc/utmp" # endif /* _PATH_UTMP */ # endif # endif #endif /* UTMPOK || BUGGYGETLOGIN */ #if !defined(UTMPOK) && defined(USRLIMIT) # undef USRLIMIT #endif #ifdef LOGOUTOK # ifndef LOGINDEFAULT # define LOGINDEFAULT 0 # endif #else # ifdef LOGINDEFAULT # undef LOGINDEFAULT # endif # define LOGINDEFAULT 1 #endif /***************************************************************** * file stuff */ #ifndef F_OK #define F_OK 0 #endif #ifndef X_OK #define X_OK 1 #endif #ifndef W_OK #define W_OK 2 #endif #ifndef R_OK #define R_OK 4 #endif #ifndef S_IFIFO #define S_IFIFO 0010000 #endif #ifndef S_IREAD #define S_IREAD 0000400 #endif #ifndef S_IWRITE #define S_IWRITE 0000200 #endif #ifndef S_IEXEC #define S_IEXEC 0000100 #endif #if defined(S_IFIFO) && defined(S_IFMT) && !defined(S_ISFIFO) #define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO) #endif #if defined(S_IFSOCK) && defined(S_IFMT) && !defined(S_ISSOCK) #define S_ISSOCK(mode) (((mode) & S_IFMT) == S_IFSOCK) #endif #if defined(S_IFCHR) && defined(S_IFMT) && !defined(S_ISCHR) #define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR) #endif #if defined(S_IFDIR) && defined(S_IFMT) && !defined(S_ISDIR) #define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) #endif #if defined(S_IFLNK) && defined(S_IFMT) && !defined(S_ISLNK) #define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK) #endif /* * SunOS 4.1.3: `man 2V open' has only one line that mentions O_NOBLOCK: * * O_NONBLOCK Same as O_NDELAY above. * * on the very same SunOS 4.1.3, I traced the open system call and found * that an open("/dev/ttyy08", O_RDWR|O_NONBLOCK|O_NOCTTY) was blocked, * whereas open("/dev/ttyy08", O_RDWR|O_NDELAY |O_NOCTTY) went through. * * For this simple reason I now favour O_NDELAY. jw. 4.5.95 */ #if defined(sun) && !defined(SVR4) # undef O_NONBLOCK #endif #if !defined(O_NONBLOCK) && defined(O_NDELAY) # define O_NONBLOCK O_NDELAY #endif #if !defined(FNBLOCK) && defined(FNONBLOCK) # define FNBLOCK FNONBLOCK #endif #if !defined(FNBLOCK) && defined(FNDELAY) # define FNBLOCK FNDELAY #endif #if !defined(FNBLOCK) && defined(O_NONBLOCK) # define FNBLOCK O_NONBLOCK #endif #ifndef POSIX #undef mkfifo #define mkfifo(n,m) mknod(n,S_IFIFO|(m),0) #endif #if !defined(HAVE_LSTAT) && !defined(lstat) # define lstat stat #endif /***************************************************************** * signal handling */ #ifdef SIGVOID # define SIGRETURN # define sigret_t void #else # define SIGRETURN return 0; # define sigret_t int #endif /* Geeeee, reverse it? */ #if defined(SVR4) || (defined(SYSV) && defined(ISC)) || defined(_AIX) || defined(linux) || defined(ultrix) || defined(__386BSD__) || defined(__bsdi__) || defined(POSIX) || defined(NeXT) # define SIGHASARG #endif #ifdef SIGHASARG # define SIGPROTOARG (int) # define SIGDEFARG (sigsig) int sigsig; # define SIGARG 0 #else # define SIGPROTOARG (void) # define SIGDEFARG () # define SIGARG #endif #ifndef SIGCHLD #define SIGCHLD SIGCLD #endif #if defined(POSIX) || defined(hpux) # define signal xsignal #else # ifdef USESIGSET # define signal sigset # endif /* USESIGSET */ #endif /* used in screen.c and attacher.c */ #ifndef NSIG /* kbeal needs these w/o SYSV */ # define NSIG 32 #endif /* !NSIG */ /***************************************************************** * Wait stuff */ #if (!defined(sysV68) && !defined(M_XENIX)) || defined(NeXT) || defined(M_UNIX) # include #endif #ifndef WTERMSIG # ifndef BSDWAIT /* if wait is NOT a union: */ # define WTERMSIG(status) (status & 0177) # else # define WTERMSIG(status) status.w_T.w_Termsig # endif #endif #ifndef WSTOPSIG # ifndef BSDWAIT /* if wait is NOT a union: */ # define WSTOPSIG(status) ((status >> 8) & 0377) # else # define WSTOPSIG(status) status.w_S.w_Stopsig # endif #endif /* NET-2 uses WCOREDUMP */ #if defined(WCOREDUMP) && !defined(WIFCORESIG) # define WIFCORESIG(status) WCOREDUMP(status) #endif #ifndef WIFCORESIG # ifndef BSDWAIT /* if wait is NOT a union: */ # define WIFCORESIG(status) (status & 0200) # else # define WIFCORESIG(status) status.w_T.w_Coredump # endif #endif #ifndef WEXITSTATUS # ifndef BSDWAIT /* if wait is NOT a union: */ # define WEXITSTATUS(status) ((status >> 8) & 0377) # else # define WEXITSTATUS(status) status.w_T.w_Retcode # endif #endif /***************************************************************** * select stuff */ #if defined(M_XENIX) || defined(M_UNIX) || defined(_SEQUENT_) #include /* for timeval + FD... */ #endif /* * SunOS 3.5 - Tom Schmidt - Micron Semiconductor, Inc - 27-Jul-93 * tschmidt@vax.micron.com */ #ifndef FD_SET # ifndef SUNOS3 typedef struct fd_set { int fds_bits[1]; } fd_set; # endif # define FD_ZERO(fd) ((fd)->fds_bits[0] = 0) # define FD_SET(b, fd) ((fd)->fds_bits[0] |= 1 << (b)) # define FD_ISSET(b, fd) ((fd)->fds_bits[0] & 1 << (b)) # define FD_SETSIZE 32 #endif /***************************************************************** * user defineable stuff */ #ifndef TERMCAP_BUFSIZE # define TERMCAP_BUFSIZE 2048 #endif #ifndef MAXPATHLEN # define MAXPATHLEN 1024 #endif /* * you may try to vary this value. Use low values if your (VMS) system * tends to choke when pasting. Use high values if you want to test * how many characters your pty's can buffer. */ #define IOSIZE 4096 gdb-doc-7.6.2/readline/examples/rlfe/Makefile.in0000644000175000017500000001222112250770610020457 0ustar zumbizumbi# # Makefile template for rlfe # # See machine dependant config.h for more configuration options. # srcdir = @srcdir@ VPATH = @srcdir@ DESTDIR = # Where to install screen. prefix = @prefix@ exec_prefix = @exec_prefix@ # don't forget to change mandir and infodir in doc/Makefile. bindir = $(exec_prefix)/bin VERSION = @VERSION@ SCREEN = screen-$(VERSION) CC = @CC@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ #LDFLAGS = -L$(READLINE_DIR) LDFLAGS = @LDFLAGS@ LIBS = -lreadline -lhistory @LIBS@ CPP=@CPP@ CPP_DEPEND=$(CC) -MM INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ AWK = @AWK@ OPTIONS= #OPTIONS= -DDEBUG SHELL=/bin/sh CFILES= rlfe.c pty.c HFILES= extern.h os.h screen.h EXTRA_DIST=configure.in configure Makefile.in config.h.in ChangeLog README OFILES= rlfe.o pty.o all: rlfe rlfe: $(OFILES) $(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS) rlfe-$(VERSION).tar.gz: tar czf $@ $(CFILES) $(HFILES) $(EXTRA_DIST) .c.o: $(CC) -c -I. -I$(srcdir) $(CPPFLAGS) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CFLAGS) $< install_bin: .version screen -if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \ then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN) -chown root $(DESTDIR)$(bindir)/$(SCREEN) && chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN) # This doesn't work if $(bindir)/screen is a symlink -if [ -f $(DESTDIR)$(bindir)/screen ] && [ ! -f $(DESTDIR)$(bindir)/screen.old ]; then mv $(DESTDIR)$(bindir)/screen $(DESTDIR)$(bindir)/screen.old; fi rm -f $(DESTDIR)$(bindir)/screen (cd $(DESTDIR)$(bindir) && ln -sf $(SCREEN) screen) cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS) uninstall: .version rm -f $(DESTDIR)$(bindir)/$(SCREEN) rm -f $(DESTDIR)$(bindir)/screen -mv $(DESTDIR)$(bindir)/screen.old $(DESTDIR)$(bindir)/screen rm -f $(DESTDIR)$(ETCSCREENRC) cd doc; $(MAKE) uninstall shadow: mkdir shadow; cd shadow; ln -s ../*.[ch] ../*.in ../*.sh ../configure ../doc ../terminfo ../etc . rm -f shadow/term.h shadow/tty.c shadow/comm.h shadow/osdef.h echo "install all Makefiles and config:" > shadow/Makefile echo " rm -f config.cache" >> shadow/Makefile echo " sh ./configure" >> shadow/Makefile term.h: term.c term.sh AWK=$(AWK) srcdir=$(srcdir) sh $(srcdir)/term.sh kmapdef.c: term.h tty.c: tty.sh sh $(srcdir)/tty.sh tty.c mostlyclean: rm -f $(OFILES) rlfe *.o clean celan: mostlyclean rm -f tty.c term.h comm.h osdef.h kmapdef.c core # Delete all files from the current directory that are created by # configuring or building the program. # building of term.h/comm.h requires awk. Keep it in the distribution # we keep config.h, as this file knows where 'make dist' finds the ETCSCREENRC. #distclean: mostlyclean # rm -f $(SCREEN).tar $(SCREEN).tar.gz # rm -f config.status Makefile # rm -f osdef.h doc/Makefile maintainer-clean: @echo "This command is not even intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." # Delete everything from the current directory that can be # reconstructed with this Makefile. realclean: .version mostlyclean rm -f $(SCREEN).tar $(SCREEN).tar.gz rm -f config.status Makefile doc/Makefile rm -f tty.c term.h comm.h osdef.h kmapdef.c rm -f config.h echo "install all Makefiles and config:" > Makefile echo " sh ./configure" >> Makefile tags TAGS: $(CFILES) -ctags *.sh $(CFILES) *.h -ctags -e *.sh $(CFILES) *.h dist: .version $(SCREEN).tar.gz # Perform self-tests (if any). check: config: rm -f config.cache sh ./configure ############################################################################### .version: @rev=`sed < $(srcdir)/patchlevel.h -n -e '/#define REV/s/#define REV *//p'`; \ vers=`sed < $(srcdir)/patchlevel.h -n -e '/#define VERS/s/#define VERS *//p'`; \ pat=`sed < $(srcdir)/patchlevel.h -n -e '/#define PATCHLEVEL/s/#define PATCHLEVEL *//p'`; \ if [ "$${rev}.$${vers}.$${pat}" != "$(VERSION)" ]; then \ echo "This distribution is screen-$${rev}.$${vers}.$${pat}, but"; \ echo "the Makefile is from $(VERSION). Please update!"; exit 1; fi ############################################################################### mdepend: $(CFILES) term.h @rm -f DEPEND ; \ for i in ${CFILES} ; do \ echo "$$i" ; \ echo `echo "$$i" | sed -e 's/.c$$/.o/'`": $$i" `\ cc -E $$i |\ grep '^# .*"\./.*\.h"' |\ (sort -t'"' -u -k 2,2 2>/dev/null || sort -t'"' -u +1 -2) |\ sed -e 's/.*"\.\/\(.*\)".*/\1/'\ ` >> DEPEND ; \ done depend: depend.in ./config.status || ./configure depend.in: $(CFILES) term.h cp Makefile.in Makefile.in~ sed -e '/\#\#\# Dependencies/q' < Makefile.in > tmp_make for i in $(CFILES); do echo $$i; $(CPP_DEPEND) $$i >> tmp_make; done mv tmp_make Makefile.in Makefile makefile: config.status $(srcdir)/Makefile.in CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status config.status: $(srcdir)/configure $(SHELL) ./config.status --recheck $(srcdir)/configure: $(srcdir)/configure.in cd $(srcdir) && autoconf ############################################################################### ### Dependencies: pty.o: pty.c config.h gdb-doc-7.6.2/readline/examples/rlfe/ChangeLog0000644000175000017500000000247312250770610020174 0ustar zumbizumbi2004-11-04 Per Bothner * pty.c: Import from screen-4.0.2. * configure.in, Makefile.in, config.h.in: Set up autoconf handling, copying a bunk of stuff over from screen. * rlfe.c: Use OpenPTY from pty.c instead of get_master_pty. 2004-11-03 Per Bothner * rlfe.c: Get input emphasis (boldening) more robust. * rlfe.c: Various cleanups on comments and names. 2003-11-07 Wolfgang Taeuber * Specify a history file and the size of the history file with command * line options; use EDITOR/VISUAL to set vi/emacs preference. 1999-09-03 Chet Ramey * fep.c: Memmove is not universally available. This patch assumes that an autoconf test has been performed, and that memcpy is available without checking. * fep.c: VDISCARD is not universally available, even when termios is. * fep.c: If a system doesn't have TIOCSCTTY, the first `open' performed after setsid allocates a controlling terminal. The original code would leave the child process running on the slave pty without a controlling tty if TIOCSCTTY was not available. * fep.c: Most versions of SVR4, including solaris, don't allow terminal ioctl calls on the master side of the pty. 1999-08-28 Per Bothner * fep.c: Initial release. gdb-doc-7.6.2/readline/examples/rlfe/ChangeLog.gdb0000644000175000017500000000060612250770610020723 0ustar zumbizumbi2011-05-11 Jan Kratochvil Imported readline 6.2, and upstream patch 001. 2009-08-22 Ralf Wildenhues * configure: Regenerate. * configure.in: m4_include toplevel config/override.m4. * configure: Regenerate. 2009-07-30 Ralf Wildenhues * configure.in: Correctly quote AC_PROGRAM_SOURCE definition. gdb-doc-7.6.2/readline/examples/rlfe/config.h.in0000644000175000017500000002206512250770610020444 0ustar zumbizumbi/* Copyright 2004 Per Bothner * Based on config.h from screen-4.0.2. * Copyright (c) 1993-2000 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) * Copyright (c) 1987 Oliver Laumann * * 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, 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 (see the file COPYING); if not, write to the * Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * **************************************************************** * $Id$ FAU */ /********************************************************************** * * User Configuration Section */ /* * define PTYMODE if you do not like the default of 0622, which allows * public write to your pty. * define PTYGROUP to some numerical group-id if you do not want the * tty to be in "your" group. * Note, screen is unable to change mode or group of the pty if it * is not installed with sufficient privilege. (e.g. set-uid-root) * define PTYROFS if the /dev/pty devices are mounted on a read-only * filesystem so screen should not even attempt to set mode or group * even if running as root (e.g. on TiVo). */ #undef PTYMODE #undef PTYGROUP #undef PTYROFS /* * If screen is NOT installed set-uid root, screen can provide tty * security by exclusively locking the ptys. While this keeps other * users from opening your ptys, it also keeps your own subprocesses * from being able to open /dev/tty. Define LOCKPTY to add this * exclusive locking. */ #undef LOCKPTY /********************************************************************** * * End of User Configuration Section * * Rest of this file is modified by 'configure' * Change at your own risk! * */ /* * Some defines to identify special unix variants */ #ifndef SVR4 #undef SVR4 #endif #ifndef _POSIX_SOURCE #undef _POSIX_SOURCE #endif /* * Define POSIX if your system supports IEEE Std 1003.1-1988 (POSIX). */ #undef POSIX /* * Define TERMIO if you have struct termio instead of struct sgttyb. * This is usually the case for SVID systems, where BSD uses sgttyb. * POSIX systems should define this anyway, even though they use * struct termios. */ #undef TERMIO /* * Define CYTERMIO if you have cyrillic termio modes. */ #undef CYTERMIO /* * Define TERMINFO if your machine emulates the termcap routines * with the terminfo database. * Thus the .screenrc file is parsed for * the command 'terminfo' and not 'termcap'. */ #undef TERMINFO /* * If your library does not define ospeed, define this. */ #undef NEED_OSPEED /* * Define SYSV if your machine is SYSV complient (Sys V, HPUX, A/UX) */ #ifndef SYSV #undef SYSV #endif /* * Define SIGVOID if your signal handlers return void. On older * systems, signal returns int, but on newer ones, it returns void. */ #undef SIGVOID /* * Define USESIGSET if you have sigset for BSD 4.1 reliable signals. */ #undef USESIGSET /* * Define SYSVSIGS if signal handlers must be reinstalled after * they have been called. */ #undef SYSVSIGS /* * Define BSDWAIT if your system defines a 'union wait' in * * Only allow BSDWAIT i.e. wait3 on nonposix systems, since * posix implies wait(3) and waitpid(3). vdlinden@fwi.uva.nl * */ #ifndef POSIX #undef BSDWAIT #endif /* * On RISCOS we prefer wait2() over wait3(). rouilj@sni-usa.com */ #ifdef BSDWAIT #undef USE_WAIT2 #endif /* * Define if you have the utempter utmp helper program */ #undef HAVE_UTEMPTER /* * If ttyslot() breaks getlogin() by returning indexes to utmp entries * of type DEAD_PROCESS, then our getlogin() replacement should be * selected by defining BUGGYGETLOGIN. */ #undef BUGGYGETLOGIN /* * If your system has the calls setreuid() and setregid(), * define HAVE_SETREUID. Otherwise screen will use a forked process to * safely create output files without retaining any special privileges. */ #undef HAVE_SETREUID /* * If your system supports BSD4.4's seteuid() and setegid(), define * HAVE_SETEUID. */ #undef HAVE_SETEUID /* * If you want the "time" command to display the current load average * define LOADAV. Maybe you must install screen with the needed * privileges to read /dev/kmem. * Note that NLIST_ stuff is only checked, when getloadavg() is not available. */ #undef LOADAV #undef LOADAV_NUM #undef LOADAV_TYPE #undef LOADAV_SCALE #undef LOADAV_GETLOADAVG #undef LOADAV_UNIX #undef LOADAV_AVENRUN #undef LOADAV_USE_NLIST64 #undef NLIST_DECLARED #undef NLIST_STRUCT #undef NLIST_NAME_UNION /* * If your system has the new format /etc/ttys (like 4.3 BSD) and the * getttyent(3) library functions, define GETTTYENT. */ #undef GETTTYENT /* * Define USEBCOPY if the bcopy/memcpy from your system's C library * supports the overlapping of source and destination blocks. When * undefined, screen uses its own (probably slower) version of bcopy(). * * SYSV machines may have a working memcpy() -- Oh, this is * quite unlikely. Tell me if you see one. * "But then, memmove() should work, if at all available" he thought... * Boing, never say "works everywhere" unless you checked SCO UNIX. * Their memove fails the test in the configure script. Sigh. (Juergen) */ #undef USEBCOPY #undef USEMEMCPY #undef USEMEMMOVE /* * If your system has vsprintf() and requires the use of the macros in * "varargs.h" to use functions with variable arguments, * define USEVARARGS. */ #undef USEVARARGS /* * If your system has strerror() define this. */ #undef HAVE_STRERROR /* * If the select return value doesn't treat a descriptor that is * usable for reading and writing as two hits, define SELECT_BROKEN. */ #undef SELECT_BROKEN /* * Define this if your system supports named pipes. */ #undef NAMEDPIPE /* * Define this if your system exits select() immediatly if a pipe is * opened read-only and no writer has opened it. */ #undef BROKEN_PIPE /* * Define this if the unix-domain socket implementation doesn't * create a socket in the filesystem. */ #undef SOCK_NOT_IN_FS /* * If your system has setenv() and unsetenv() define USESETENV */ #undef USESETENV /* * If your system does not come with a setenv()/putenv()/getenv() * functions, you may bring in our own code by defining NEEDPUTENV. */ #undef NEEDPUTENV /* * If the passwords are stored in a shadow file and you want the * builtin lock to work properly, define SHADOWPW. */ #undef SHADOWPW /* * If you are on a SYS V machine that restricts filename length to 14 * characters, you may need to enforce that by setting NAME_MAX to 14 */ #undef NAME_MAX /* KEEP_UNDEF_HERE override system value */ #undef NAME_MAX /* * define HAVE_RENAME if your system has a rename() function */ #undef HAVE_RENAME /* * define HAVE__EXIT if your system has the _exit() call. */ #undef HAVE__EXIT /* * define HAVE_LSTAT if your system has symlinks and the lstat() call. */ #undef HAVE_LSTAT /* * define HAVE_UTIMES if your system has the utimes() call. */ #undef HAVE_UTIMES /* * define HAVE_FCHOWN if your system has the fchown() call. */ #undef HAVE_FCHOWN /* * define HAVE_FCHMOD if your system has the fchmod() call. */ #undef HAVE_FCHMOD /* * define HAVE_VSNPRINTF if your system has vsnprintf() (GNU lib). */ #undef HAVE_VSNPRINTF /* * define HAVE_GETCWD if your system has the getcwd() call. */ #undef HAVE_GETCWD /* * define HAVE_SETLOCALE if your system has the setlocale() call. */ #undef HAVE_SETLOCALE /* * define HAVE_STRFTIME if your system has the strftime() call. */ #undef HAVE_STRFTIME /* * define HAVE_NL_LANGINFO if your system has the nl_langinfo() call * and defines CODESET. */ #undef HAVE_NL_LANGINFO /* * Newer versions of Solaris include fdwalk, which can greatly improve * the startup time of screen; otherwise screen spends a lot of time * closing file descriptors. */ #undef HAVE_FDWALK /* * define HAVE_DEV_PTC if you have a /dev/ptc character special * device. */ #undef HAVE_DEV_PTC /* * define HAVE_SVR4_PTYS if you have a /dev/ptmx character special * device and support the ptsname(), grantpt(), unlockpt() functions. */ #undef HAVE_SVR4_PTYS /* * define HAVE_GETPT if you have the getpt() function. */ #undef HAVE_GETPT /* * define HAVE_OPENPTY if your system has the openpty() call. */ #undef HAVE_OPENPTY /* * define PTYRANGE0 and or PTYRANGE1 if you want to adapt screen * to unusual environments. E.g. For SunOs the defaults are "qpr" and * "0123456789abcdef". For SunOs 4.1.2 * #define PTYRANGE0 "pqrstuvwxyzPQRST" * is recommended by Dan Jacobson. */ #undef PTYRANGE0 #undef PTYRANGE1 #define USEVARARGS #undef HAVE_SYS_STROPTS_H #undef HAVE_SYS_WAIT_H gdb-doc-7.6.2/readline/examples/rlfe/screen.h0000644000175000017500000000007412250770610020045 0ustar zumbizumbi/* Dummy header to avoid modifying pty.c */ #include "os.h" gdb-doc-7.6.2/readline/examples/rlfe/extern.h0000644000175000017500000000252512250770610020076 0ustar zumbizumbi/* Copyright (c) 1993-2002 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) * Copyright (c) 1987 Oliver Laumann * * 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, 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 (see the file COPYING); if not, write to the * Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * **************************************************************** * $Id$ FAU */ #if !defined(__GNUC__) || __GNUC__ < 2 #undef __attribute__ #define __attribute__(x) #endif #if !defined (__P) # if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) # define __P(protos) protos # else # define __P(protos) () # endif #endif /* pty.c */ extern int OpenPTY __P((char **)); extern void InitPTY __P((int)); gdb-doc-7.6.2/readline/examples/rlfe/README0000644000175000017500000000551412250770610017301 0ustar zumbizumbirlfe (ReadLine Front-End) is a "universal wrapper" around readline. You specify an interactive program to run (typically a shell), and readline is used to edit input lines. There are other such front-ends; what distinguishes this one is that it monitors the state of the inferior pty, and if the inferior program switches its terminal to raw mode, then rlfe passes your characters through directly. This basically means you can run your entire session (including bash and terminal-mode emacs) under rlfe. FEATURES * Can use all readline commands (and history) in commands that read input lines in "canonical mode" - even 'cat'! * Automatically switches between "readline-editing mode" and "raw mode" depending on the terminal mode. If the inferior program invokes readline itself, it will do its own line editing. (The inferior readline will not know about rlfe, and it will have its own history.) You can even run programs like 'emavs -nw' and 'vi' under rlfe. The goal is you could leave rlfe always on without even knowing about it. (We're not quite there, but it works tolerably well.) * The input line (after any prompt) is changed to bold-face. INSTALL The usual: ./configure && make && make install Note so far rlfe has only been tested on GNU Linux (Fedora Core 2) and Mac OS X (10.3). This assumes readline header files and libraries are in the default places. If not, you can create a link named readline pointing to the readline sources. To link with libreadline.a and libhistory.a you can copy or link them, or add LDFLAGS='-/path/to/readline' to the make command-line. USAGE Just run it. That by default runs bash. You can run some other command by giving it as command-line arguments. There are a few tweaks: -h allows you to name the history file, and -s allows you to specify its size. It default to "emacs" mode, but if the the environment variable EDITOR is set to "vi" that mode is chosen. ISSUES * The mode switching depends on the terminal mode set by the inferior program. Thus ssh/telnet/screen-type programs will typically be in raw mode, so rlfe won't be much use, even if remote programs run in canonical mode. The work-around is to run rlfe on the remote end. * Echo supression and prompt recognition are somewhat fragile. (A protocol so that the o/s tty code can reliably communicate its state to rlfe could solve this problem, and the previous one.) * See the intro to rlfe.c for more notes. * Assumes a VT100-compatible terminal, though that could be generalized if anybody cares. * Requires ncurses. * It would be useful to integrate rlfe's logic in a terminal emulator. That would make it easier to reposition the edit position with a mouse, integrate cut-and-paste with the system clipboard, and more robustly handle escape sequence and multi-byte characters more robustly. AUTHOR Per Bothner LICENSE GPL. gdb-doc-7.6.2/readline/examples/rlfe/rlfe.c0000644000175000017500000004700012250770610017511 0ustar zumbizumbi/* A front-end using readline to "cook" input lines. * * Copyright (C) 2004, 1999 Per Bothner * * This front-end 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, or (at your option) * any later version. * * Some code from Johnson & Troan: "Linux Application Development" * (Addison-Wesley, 1998) was used directly or for inspiration. * * 2003-11-07 Wolfgang Taeuber * Specify a history file and the size of the history file with command * line options; use EDITOR/VISUAL to set vi/emacs preference. */ /* PROBLEMS/TODO: * * Only tested under GNU/Linux and Mac OS 10.x; needs to be ported. * * Switching between line-editing-mode vs raw-char-mode depending on * what tcgetattr returns is inherently not robust, plus it doesn't * work when ssh/telnetting in. A better solution is possible if the * tty system can send in-line escape sequences indicating the current * mode, echo'd input, etc. That would also allow a user preference * to set different colors for prompt, input, stdout, and stderr. * * When running mc -c under the Linux console, mc does not recognize * mouse clicks, which mc does when not running under rlfe. * * Pasting selected text containing tabs is like hitting the tab character, * which invokes readline completion. We don't want this. I don't know * if this is fixable without integrating rlfe into a terminal emulator. * * Echo suppression is a kludge, but can only be avoided with better kernel * support: We need a tty mode to disable "real" echoing, while still * letting the inferior think its tty driver to doing echoing. * Stevens's book claims SCR$ and BSD4.3+ have TIOCREMOTE. * * The latest readline may have some hooks we can use to avoid having * to back up the prompt. (See HAVE_ALREADY_PROMPTED.) * * Desirable readline feature: When in cooked no-echo mode (e.g. password), * echo characters are they are types with '*', but remove them when done. * * Asynchronous output while we're editing an input line should be * inserted in the output view *before* the input line, so that the * lines being edited (with the prompt) float at the end of the input. * * A "page mode" option to emulate more/less behavior: At each page of * output, pause for a user command. This required parsing the output * to keep track of line lengths. It also requires remembering the * output, if we want an option to scroll back, which suggests that * this should be integrated with a terminal emulator like xterm. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "extern.h" #if defined (HAVE_SYS_WAIT_H) # include #endif #ifdef READLINE_LIBRARY # include "readline.h" # include "history.h" #else # include # include #endif #ifndef COMMAND #define COMMAND "/bin/bash" #endif #ifndef COMMAND_ARGS #define COMMAND_ARGS COMMAND #endif #ifndef ALT_COMMAND #define ALT_COMMAND "/bin/sh" #endif #ifndef ALT_COMMAND_ARGS #define ALT_COMMAND_ARGS ALT_COMMAND #endif #ifndef HAVE_MEMMOVE # if __GNUC__ > 1 # define memmove(d, s, n) __builtin_memcpy(d, s, n) # else # define memmove(d, s, n) memcpy(d, s, n) # endif #else # define memmove(d, s, n) memcpy(d, s, n) #endif #define APPLICATION_NAME "rlfe" static int in_from_inferior_fd; static int out_to_inferior_fd; static void set_edit_mode (); static void usage_exit (); static char *hist_file = 0; static int hist_size = 0; /* Unfortunately, we cannot safely display echo from the inferior process. The reason is that the echo bit in the pty is "owned" by the inferior, and if we try to turn it off, we could confuse the inferior. Thus, when echoing, we get echo twice: First readline echoes while we're actually editing. Then we send the line to the inferior, and the terminal driver send back an extra echo. The work-around is to remember the input lines, and when we see that line come back, we supress the output. A better solution (supposedly available on SVR4) would be a smarter terminal driver, with more flags ... */ #define ECHO_SUPPRESS_MAX 1024 char echo_suppress_buffer[ECHO_SUPPRESS_MAX]; int echo_suppress_start = 0; int echo_suppress_limit = 0; /*#define DEBUG*/ #ifdef DEBUG FILE *logfile = NULL; #define DPRINT0(FMT) (fprintf(logfile, FMT), fflush(logfile)) #define DPRINT1(FMT, V1) (fprintf(logfile, FMT, V1), fflush(logfile)) #define DPRINT2(FMT, V1, V2) (fprintf(logfile, FMT, V1, V2), fflush(logfile)) #else #define DPRINT0(FMT) ((void) 0) /* Do nothing */ #define DPRINT1(FMT, V1) ((void) 0) /* Do nothing */ #define DPRINT2(FMT, V1, V2) ((void) 0) /* Do nothing */ #endif struct termios orig_term; /* Pid of child process. */ static pid_t child = -1; static void sig_child (int signo) { int status; wait (&status); if (hist_file != 0) { write_history (hist_file); if (hist_size) history_truncate_file (hist_file, hist_size); } DPRINT0 ("(Child process died.)\n"); tcsetattr(STDIN_FILENO, TCSANOW, &orig_term); exit (0); } volatile int propagate_sigwinch = 0; /* sigwinch_handler * propagate window size changes from input file descriptor to * master side of pty. */ void sigwinch_handler(int signal) { propagate_sigwinch = 1; } /* get_slave_pty() returns an integer file descriptor. * If it returns < 0, an error has occurred. * Otherwise, it has returned the slave file descriptor. */ int get_slave_pty(char *name) { struct group *gptr; gid_t gid; int slave = -1; /* chown/chmod the corresponding pty, if possible. * This will only work if the process has root permissions. * Alternatively, write and exec a small setuid program that * does just this. */ if ((gptr = getgrnam("tty")) != 0) { gid = gptr->gr_gid; } else { /* if the tty group does not exist, don't change the * group on the slave pty, only the owner */ gid = -1; } /* Note that we do not check for errors here. If this is code * where these actions are critical, check for errors! */ chown(name, getuid(), gid); /* This code only makes the slave read/writeable for the user. * If this is for an interactive shell that will want to * receive "write" and "wall" messages, OR S_IWGRP into the * second argument below. */ chmod(name, S_IRUSR|S_IWUSR); /* open the corresponding slave pty */ slave = open(name, O_RDWR); return (slave); } /* Certain special characters, such as ctrl/C, we want to pass directly to the inferior, rather than letting readline handle them. */ static char special_chars[20]; static int special_chars_count; static void add_special_char(int ch) { if (ch != 0) special_chars[special_chars_count++] = ch; } static int eof_char; static int is_special_char(int ch) { int i; #if 0 if (ch == eof_char && rl_point == rl_end) return 1; #endif for (i = special_chars_count; --i >= 0; ) if (special_chars[i] == ch) return 1; return 0; } static char buf[1024]; /* buf[0 .. buf_count-1] is the what has been emitted on the current line. It is used as the readline prompt. */ static int buf_count = 0; int do_emphasize_input = 1; int current_emphasize_input; char *start_input_mode = "\033[1m"; char *end_input_mode = "\033[0m"; int num_keys = 0; static void maybe_emphasize_input (int on) { if (on == current_emphasize_input || (on && ! do_emphasize_input)) return; fprintf (rl_outstream, on ? start_input_mode : end_input_mode); fflush (rl_outstream); current_emphasize_input = on; } static void null_prep_terminal (int meta) { } static void null_deprep_terminal () { maybe_emphasize_input (0); } static int pre_input_change_mode (void) { return 0; } char pending_special_char; static void line_handler (char *line) { if (line == NULL) { char buf[1]; DPRINT0("saw eof!\n"); buf[0] = '\004'; /* ctrl/d */ write (out_to_inferior_fd, buf, 1); } else { static char enter[] = "\r"; /* Send line to inferior: */ int length = strlen (line); if (length > ECHO_SUPPRESS_MAX-2) { echo_suppress_start = 0; echo_suppress_limit = 0; } else { if (echo_suppress_limit + length > ECHO_SUPPRESS_MAX - 2) { if (echo_suppress_limit - echo_suppress_start + length <= ECHO_SUPPRESS_MAX - 2) { memmove (echo_suppress_buffer, echo_suppress_buffer + echo_suppress_start, echo_suppress_limit - echo_suppress_start); echo_suppress_limit -= echo_suppress_start; echo_suppress_start = 0; } else { echo_suppress_limit = 0; } echo_suppress_start = 0; } memcpy (echo_suppress_buffer + echo_suppress_limit, line, length); echo_suppress_limit += length; echo_suppress_buffer[echo_suppress_limit++] = '\r'; echo_suppress_buffer[echo_suppress_limit++] = '\n'; } write (out_to_inferior_fd, line, length); if (pending_special_char == 0) { write (out_to_inferior_fd, enter, sizeof(enter)-1); if (*line) add_history (line); } free (line); } rl_callback_handler_remove (); buf_count = 0; num_keys = 0; if (pending_special_char != 0) { write (out_to_inferior_fd, &pending_special_char, 1); pending_special_char = 0; } } /* Value of rl_getc_function. Use this because readline should read from stdin, not rl_instream, points to the pty (so readline has monitor its terminal modes). */ int my_rl_getc (FILE *dummy) { int ch = rl_getc (stdin); if (is_special_char (ch)) { pending_special_char = ch; return '\r'; } return ch; } int main(int argc, char** argv) { char *path; int i; int master; char *name; int in_from_tty_fd; struct sigaction act; struct winsize ws; struct termios t; int maxfd; fd_set in_set; static char empty_string[1] = ""; char *prompt = empty_string; int ioctl_err = 0; int arg_base = 1; #ifdef DEBUG logfile = fopen("/tmp/rlfe.log", "w"); #endif while (arg_base= argc ) usage_exit(); switch(argv[arg_base][1]) { case 'h': arg_base++; hist_file = argv[arg_base]; break; case 's': arg_base++; hist_size = atoi(argv[arg_base]); if (hist_size<0) usage_exit(); break; default: usage_exit(); } arg_base++; } if (hist_file) read_history (hist_file); set_edit_mode (); rl_readline_name = APPLICATION_NAME; if ((master = OpenPTY (&name)) < 0) { perror("ptypair: could not open master pty"); exit(1); } DPRINT1("pty name: '%s'\n", name); /* set up SIGWINCH handler */ act.sa_handler = sigwinch_handler; sigemptyset(&(act.sa_mask)); act.sa_flags = 0; if (sigaction(SIGWINCH, &act, NULL) < 0) { perror("ptypair: could not handle SIGWINCH "); exit(1); } if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) < 0) { perror("ptypair: could not get window size"); exit(1); } if ((child = fork()) < 0) { perror("cannot fork"); exit(1); } if (child == 0) { int slave; /* file descriptor for slave pty */ /* We are in the child process */ close(master); #ifdef TIOCSCTTY if ((slave = get_slave_pty(name)) < 0) { perror("ptypair: could not open slave pty"); exit(1); } #endif /* We need to make this process a session group leader, because * it is on a new PTY, and things like job control simply will * not work correctly unless there is a session group leader * and process group leader (which a session group leader * automatically is). This also disassociates us from our old * controlling tty. */ if (setsid() < 0) { perror("could not set session leader"); } /* Tie us to our new controlling tty. */ #ifdef TIOCSCTTY if (ioctl(slave, TIOCSCTTY, NULL)) { perror("could not set new controlling tty"); } #else if ((slave = get_slave_pty(name)) < 0) { perror("ptypair: could not open slave pty"); exit(1); } #endif /* make slave pty be standard in, out, and error */ dup2(slave, STDIN_FILENO); dup2(slave, STDOUT_FILENO); dup2(slave, STDERR_FILENO); /* at this point the slave pty should be standard input */ if (slave > 2) { close(slave); } /* Try to restore window size; failure isn't critical */ if (ioctl(STDOUT_FILENO, TIOCSWINSZ, &ws) < 0) { perror("could not restore window size"); } /* now start the shell */ { static char* command_args[] = { COMMAND_ARGS, NULL }; static char* alt_command_args[] = { ALT_COMMAND_ARGS, NULL }; if (argc <= 1) { execvp (COMMAND, command_args); execvp (ALT_COMMAND, alt_command_args); } else execvp (argv[arg_base], &argv[arg_base]); } /* should never be reached */ exit(1); } /* parent */ signal (SIGCHLD, sig_child); /* Note that we only set termios settings for standard input; * the master side of a pty is NOT a tty. */ tcgetattr(STDIN_FILENO, &orig_term); t = orig_term; eof_char = t.c_cc[VEOF]; /* add_special_char(t.c_cc[VEOF]);*/ add_special_char(t.c_cc[VINTR]); add_special_char(t.c_cc[VQUIT]); add_special_char(t.c_cc[VSUSP]); #if defined (VDISCARD) add_special_char(t.c_cc[VDISCARD]); #endif t.c_lflag &= ~(ICANON | ISIG | ECHO | ECHOCTL | ECHOE | \ ECHOK | ECHOKE | ECHONL | ECHOPRT ); t.c_iflag &= ~ICRNL; t.c_iflag |= IGNBRK; t.c_cc[VMIN] = 1; t.c_cc[VTIME] = 0; tcsetattr(STDIN_FILENO, TCSANOW, &t); in_from_inferior_fd = master; out_to_inferior_fd = master; rl_instream = fdopen (master, "r"); rl_getc_function = my_rl_getc; rl_prep_term_function = null_prep_terminal; rl_deprep_term_function = null_deprep_terminal; rl_pre_input_hook = pre_input_change_mode; rl_callback_handler_install (prompt, line_handler); in_from_tty_fd = STDIN_FILENO; FD_ZERO (&in_set); maxfd = in_from_inferior_fd > in_from_tty_fd ? in_from_inferior_fd : in_from_tty_fd; for (;;) { int num; FD_SET (in_from_inferior_fd, &in_set); FD_SET (in_from_tty_fd, &in_set); num = select(maxfd+1, &in_set, NULL, NULL, NULL); if (propagate_sigwinch) { struct winsize ws; if (ioctl (STDIN_FILENO, TIOCGWINSZ, &ws) >= 0) { ioctl (master, TIOCSWINSZ, &ws); } propagate_sigwinch = 0; continue; } if (num <= 0) { perror ("select"); exit (-1); } if (FD_ISSET (in_from_tty_fd, &in_set)) { extern int _rl_echoing_p; struct termios term_master; int do_canon = 1; int do_icrnl = 1; int ioctl_ret; DPRINT1("[tty avail num_keys:%d]\n", num_keys); /* If we can't get tty modes for the master side of the pty, we can't handle non-canonical-mode programs. Always assume the master is in canonical echo mode if we can't tell. */ ioctl_ret = tcgetattr(master, &term_master); if (ioctl_ret >= 0) { do_canon = (term_master.c_lflag & ICANON) != 0; do_icrnl = (term_master.c_lflag & ICRNL) != 0; _rl_echoing_p = (term_master.c_lflag & ECHO) != 0; DPRINT1 ("echo,canon,crnl:%03d\n", 100 * _rl_echoing_p + 10 * do_canon + 1 * do_icrnl); } else { if (ioctl_err == 0) DPRINT1("tcgetattr on master fd failed: errno = %d\n", errno); ioctl_err = 1; } if (do_canon == 0 && num_keys == 0) { char ch[10]; int count = read (STDIN_FILENO, ch, sizeof(ch)); DPRINT1("[read %d chars from stdin: ", count); DPRINT2(" \"%.*s\"]\n", count, ch); if (do_icrnl) { int i = count; while (--i >= 0) { if (ch[i] == '\r') ch[i] = '\n'; } } maybe_emphasize_input (1); write (out_to_inferior_fd, ch, count); } else { if (num_keys == 0) { int i; /* Re-install callback handler for new prompt. */ if (prompt != empty_string) free (prompt); if (prompt == NULL) { DPRINT0("New empty prompt\n"); prompt = empty_string; } else { if (do_emphasize_input && buf_count > 0) { prompt = malloc (buf_count + strlen (end_input_mode) + strlen (start_input_mode) + 5); sprintf (prompt, "\001%s\002%.*s\001%s\002", end_input_mode, buf_count, buf, start_input_mode); } else { prompt = malloc (buf_count + 1); memcpy (prompt, buf, buf_count); prompt[buf_count] = '\0'; } DPRINT1("New prompt '%s'\n", prompt); #if 0 /* ifdef HAVE_RL_ALREADY_PROMPTED */ /* Doesn't quite work when do_emphasize_input is 1. */ rl_already_prompted = buf_count > 0; #else if (buf_count > 0) write (1, "\r", 1); #endif } rl_callback_handler_install (prompt, line_handler); } num_keys++; maybe_emphasize_input (1); rl_callback_read_char (); } } else /* output from inferior. */ { int i; int count; int old_count; if (buf_count > (sizeof(buf) >> 2)) buf_count = 0; count = read (in_from_inferior_fd, buf+buf_count, sizeof(buf) - buf_count); DPRINT2("read %d from inferior, buf_count=%d", count, buf_count); DPRINT2(": \"%.*s\"", count, buf+buf_count); maybe_emphasize_input (0); if (count <= 0) { DPRINT0 ("(Connection closed by foreign host.)\n"); tcsetattr(STDIN_FILENO, TCSANOW, &orig_term); exit (0); } old_count = buf_count; /* Look for any pending echo that we need to suppress. */ while (echo_suppress_start < echo_suppress_limit && count > 0 && buf[buf_count] == echo_suppress_buffer[echo_suppress_start]) { count--; buf_count++; echo_suppress_start++; } DPRINT1("suppressed %d characters of echo.\n", buf_count-old_count); /* Write to the terminal anything that was not suppressed. */ if (count > 0) write (1, buf + buf_count, count); /* Finally, look for a prompt candidate. * When we get around to going input (from the keyboard), * we will consider the prompt to be anything since the last * line terminator. So we need to save that text in the * initial part of buf. However, anything before the * most recent end-of-line is not interesting. */ buf_count += count; #if 1 for (i = buf_count; --i >= old_count; ) #else for (i = buf_count - 1; i-- >= buf_count - count; ) #endif { if (buf[i] == '\n' || buf[i] == '\r') { i++; memmove (buf, buf+i, buf_count - i); buf_count -= i; break; } } DPRINT2("-> i: %d, buf_count: %d\n", i, buf_count); } } } static void set_edit_mode () { int vi = 0; char *shellopts; shellopts = getenv ("SHELLOPTS"); while (shellopts != 0) { if (strncmp ("vi", shellopts, 2) == 0) { vi = 1; break; } shellopts = strchr (shellopts + 1, ':'); } if (!vi) { if (getenv ("EDITOR") != 0) vi |= strcmp (getenv ("EDITOR"), "vi") == 0; } if (vi) rl_variable_bind ("editing-mode", "vi"); else rl_variable_bind ("editing-mode", "emacs"); } static void usage_exit () { fprintf (stderr, "Usage: rlfe [-h histfile] [-s size] cmd [arg1] [arg2] ...\n\n"); exit (1); } gdb-doc-7.6.2/readline/examples/rlfe/pty.c0000644000175000017500000002015512250770610017377 0ustar zumbizumbi/* Copyright (c) 1993-2002 * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) * Copyright (c) 1987 Oliver Laumann * * 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, 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 (see the file COPYING); if not, write to the * Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * **************************************************************** */ #include "config.h" #include #include #include #include #include #include "screen.h" #ifndef sun # include #endif /* for solaris 2.1, Unixware (SVR4.2) and possibly others */ #if defined (HAVE_SVR4_PTYS) && defined (HAVE_SYS_STROPTS_H) # include #endif #if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL) # include #endif #ifdef ISC # include # include # include #endif #ifdef sgi # include #endif /* sgi */ #include "extern.h" /* * if no PTYRANGE[01] is in the config file, we pick a default */ #ifndef PTYRANGE0 # define PTYRANGE0 "qpr" #endif #ifndef PTYRANGE1 # define PTYRANGE1 "0123456789abcdef" #endif /* SVR4 pseudo ttys don't seem to work with SCO-5 */ #ifdef M_UNIX # undef HAVE_SVR4_PTYS #endif extern int eff_uid; /* used for opening a new pty-pair: */ static char PtyName[32], TtyName[32]; #if !(defined(sequent) || defined(_SEQUENT_) || defined(HAVE_SVR4_PTYS)) # ifdef hpux static char PtyProto[] = "/dev/ptym/ptyXY"; static char TtyProto[] = "/dev/pty/ttyXY"; # else # ifdef M_UNIX static char PtyProto[] = "/dev/ptypXY"; static char TtyProto[] = "/dev/ttypXY"; # else static char PtyProto[] = "/dev/ptyXY"; static char TtyProto[] = "/dev/ttyXY"; # endif # endif /* hpux */ #endif static void initmaster __P((int)); #if defined(sun) /* sun's utmp_update program opens the salve side, thus corrupting */ int pty_preopen = 1; #else int pty_preopen = 0; #endif /* * Open all ptys with O_NOCTTY, just to be on the safe side * (RISCos mips breaks otherwise) */ #ifndef O_NOCTTY # define O_NOCTTY 0 #endif /***************************************************************/ static void initmaster(f) int f; { #ifdef POSIX tcflush(f, TCIOFLUSH); #else # ifdef TIOCFLUSH (void) ioctl(f, TIOCFLUSH, (char *) 0); # endif #endif #ifdef LOCKPTY (void) ioctl(f, TIOCEXCL, (char *) 0); #endif } void InitPTY(f) int f; { if (f < 0) return; #if defined(I_PUSH) && defined(HAVE_SVR4_PTYS) && !defined(sgi) && !defined(linux) && !defined(__osf__) && !defined(M_UNIX) if (ioctl(f, I_PUSH, "ptem")) Panic(errno, "InitPTY: cannot I_PUSH ptem"); if (ioctl(f, I_PUSH, "ldterm")) Panic(errno, "InitPTY: cannot I_PUSH ldterm"); # ifdef sun if (ioctl(f, I_PUSH, "ttcompat")) Panic(errno, "InitPTY: cannot I_PUSH ttcompat"); # endif #endif } /***************************************************************/ #if defined(OSX) && !defined(PTY_DONE) #define PTY_DONE int OpenPTY(ttyn) char **ttyn; { register int f; if ((f = open_controlling_pty(TtyName)) < 0) return -1; initmaster(f); *ttyn = TtyName; return f; } #endif /***************************************************************/ #if (defined(sequent) || defined(_SEQUENT_)) && !defined(PTY_DONE) #define PTY_DONE int OpenPTY(ttyn) char **ttyn; { char *m, *s; register int f; if ((f = getpseudotty(&s, &m)) < 0) return -1; #ifdef _SEQUENT_ fvhangup(s); #endif strncpy(PtyName, m, sizeof(PtyName)); strncpy(TtyName, s, sizeof(TtyName)); initmaster(f); *ttyn = TtyName; return f; } #endif /***************************************************************/ #if defined(__sgi) && !defined(PTY_DONE) #define PTY_DONE int OpenPTY(ttyn) char **ttyn; { int f; char *name, *_getpty(); sigret_t (*sigcld)__P(SIGPROTOARG); /* * SIGCHLD set to SIG_DFL for _getpty() because it may fork() and * exec() /usr/adm/mkpts */ sigcld = signal(SIGCHLD, SIG_DFL); name = _getpty(&f, O_RDWR | O_NONBLOCK, 0600, 0); signal(SIGCHLD, sigcld); if (name == 0) return -1; initmaster(f); *ttyn = name; return f; } #endif /***************************************************************/ #if defined(MIPS) && defined(HAVE_DEV_PTC) && !defined(PTY_DONE) #define PTY_DONE int OpenPTY(ttyn) char **ttyn; { register int f; struct stat buf; strcpy(PtyName, "/dev/ptc"); if ((f = open(PtyName, O_RDWR | O_NOCTTY | O_NONBLOCK)) < 0) return -1; if (fstat(f, &buf) < 0) { close(f); return -1; } sprintf(TtyName, "/dev/ttyq%d", minor(buf.st_rdev)); initmaster(f); *ttyn = TtyName; return f; } #endif /***************************************************************/ #if defined(HAVE_SVR4_PTYS) && !defined(PTY_DONE) #define PTY_DONE int OpenPTY(ttyn) char **ttyn; { register int f; char *m, *ptsname(); int unlockpt __P((int)), grantpt __P((int)); #if defined(HAVE_GETPT) && defined(linux) int getpt __P((void)); #endif sigret_t (*sigcld)__P(SIGPROTOARG); strcpy(PtyName, "/dev/ptmx"); #if defined(HAVE_GETPT) && defined(linux) if ((f = getpt()) == -1) #else if ((f = open(PtyName, O_RDWR | O_NOCTTY)) == -1) #endif return -1; /* * SIGCHLD set to SIG_DFL for grantpt() because it fork()s and * exec()s pt_chmod */ sigcld = signal(SIGCHLD, SIG_DFL); if ((m = ptsname(f)) == NULL || grantpt(f) || unlockpt(f)) { signal(SIGCHLD, sigcld); close(f); return -1; } signal(SIGCHLD, sigcld); strncpy(TtyName, m, sizeof(TtyName)); initmaster(f); *ttyn = TtyName; return f; } #endif /***************************************************************/ #if defined(_AIX) && defined(HAVE_DEV_PTC) && !defined(PTY_DONE) #define PTY_DONE int OpenPTY(ttyn) char **ttyn; { register int f; /* a dumb looking loop replaced by mycrofts code: */ strcpy (PtyName, "/dev/ptc"); if ((f = open (PtyName, O_RDWR | O_NOCTTY)) < 0) return -1; strncpy(TtyName, ttyname(f), sizeof(TtyName)); if (eff_uid && access(TtyName, R_OK | W_OK)) { close(f); return -1; } initmaster(f); # ifdef _IBMR2 pty_preopen = 1; # endif *ttyn = TtyName; return f; } #endif /***************************************************************/ #if defined(HAVE_OPENPTY) && !defined(PTY_DONE) #define PTY_DONE int OpenPTY(ttyn) char **ttyn; { int f, s; if (openpty(&f, &s, TtyName, NULL, NULL) != 0) return -1; close(s); initmaster(f); pty_preopen = 1; *ttyn = TtyName; return f; } #endif /***************************************************************/ #ifndef PTY_DONE int OpenPTY(ttyn) char **ttyn; { register char *p, *q, *l, *d; register int f; debug("OpenPTY: Using BSD style ptys.\n"); strcpy(PtyName, PtyProto); strcpy(TtyName, TtyProto); for (p = PtyName; *p != 'X'; p++) ; for (q = TtyName; *q != 'X'; q++) ; for (l = PTYRANGE0; (*p = *l) != '\0'; l++) { for (d = PTYRANGE1; (p[1] = *d) != '\0'; d++) { debug1("OpenPTY tries '%s'\n", PtyName); if ((f = open(PtyName, O_RDWR | O_NOCTTY)) == -1) continue; q[0] = *l; q[1] = *d; if (eff_uid && access(TtyName, R_OK | W_OK)) { close(f); continue; } #if defined(sun) && defined(TIOCGPGRP) && !defined(SUNOS3) /* Hack to ensure that the slave side of the pty is * unused. May not work in anything other than SunOS4.1 */ { int pgrp; /* tcgetpgrp does not work (uses TIOCGETPGRP)! */ if (ioctl(f, TIOCGPGRP, (char *)&pgrp) != -1 || errno != EIO) { close(f); continue; } } #endif initmaster(f); *ttyn = TtyName; return f; } } return -1; } #endif gdb-doc-7.6.2/readline/examples/rlfe/configure0000755000175000017500000054163612250770610020342 0ustar zumbizumbi#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="rlfe.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS LIBOBJS XTERMPATH WRITEPATH AWK EGREP GREP CPP OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC VERSION target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking with_pty_mode with_pty_group ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pty-mode=mode default mode for ptys --with-pty-group=group default group for ptys Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" VERSION=0.4 old_CFLAGS="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:$LINENO: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 $as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi fi fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:$LINENO: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:$LINENO: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } if test "${ac_cv_prog_gcc_traditional+set}" = set; then $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 $as_echo "$ac_cv_prog_gcc_traditional" >&6; } if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi { $as_echo "$as_me:$LINENO: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } if test "${ac_cv_search_strerror+set}" = set; then $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_search_strerror=$ac_res else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_strerror+set}" = set; then break fi done if test "${ac_cv_search_strerror+set}" = set; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 $as_echo "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi if test "$cross_compiling" = yes; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(0);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test $CC != cc ; then echo "Your $CC failed - restarting with CC=cc" 1>&6 echo "" 1>&6 CC=cc export CC exec $0 $configure_args fi fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi if test "$cross_compiling" = yes; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(0);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) exec 5>&2 eval $ac_link echo "CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;" 1>&6 echo "$ac_compile" 1>&6 { { $as_echo "$as_me:$LINENO: error: Can't run the compiler - sorry" >&5 $as_echo "$as_me: error: Can't run the compiler - sorry" >&2;} { (exit 1); exit 1; }; } fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi if test "$cross_compiling" = yes; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main() { int __something_strange_(); __something_strange_(0); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then { { $as_echo "$as_me:$LINENO: error: Your compiler does not set the exit status - sorry" >&5 $as_echo "$as_me: error: Your compiler does not set the exit status - sorry" >&2;} { (exit 1); exit 1; }; } else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done if test -f etc/toolcheck; then { $as_echo "$as_me:$LINENO: checking for buggy tools..." >&5 $as_echo "$as_me: checking for buggy tools..." >&6;} sh etc/toolcheck 1>&6 fi { $as_echo "$as_me:$LINENO: checking for System V..." >&5 $as_echo "$as_me: checking for System V..." >&6;} cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { int x = SIGCHLD | FNDELAY; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >>confdefs.h <<\_ACEOF #define SYSV 1 _ACEOF fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: checking for Solaris 2.x..." >&5 $as_echo "$as_me: checking for Solaris 2.x..." >&6;} cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined(SVR4) && defined(sun) yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then LIBS="$LIBS -lsocket -lnsl -lkstat" fi rm -f conftest* { $as_echo "$as_me:$LINENO: checking select..." >&5 $as_echo "$as_me: checking select..." >&6;} cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { select(0, 0, 0, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS="$LIBS -lnet -lnsl" { $as_echo "$as_me:$LINENO: checking select with $LIBS..." >&5 $as_echo "$as_me: checking select with $LIBS..." >&6;} cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { select(0, 0, 0, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: !!! no select - no screen" >&5 $as_echo "$as_me: error: !!! no select - no screen" >&2;} { (exit 1); exit 1; }; } fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:$LINENO: checking select return value..." >&5 $as_echo "$as_me: checking select return value..." >&6;} if test "$cross_compiling" = yes; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include char *nam = "/tmp/conftest$$"; #ifdef NAMEDPIPE #ifndef O_NONBLOCK #define O_NONBLOCK O_NDELAY #endif #ifndef S_IFIFO #define S_IFIFO 0010000 #endif main() { #ifdef FD_SET fd_set f; #else int f; #endif #ifdef __FreeBSD__ /* From Andrew A. Chernov (ache@astral.msk.su): * opening RDWR fifo fails in BSD 4.4, but select return values are * right. */ exit(0); #endif (void)alarm(5); #ifdef POSIX if (mkfifo(nam, 0777)) #else if (mknod(nam, S_IFIFO|0777, 0)) #endif exit(1); close(0); if (open(nam, O_RDWR | O_NONBLOCK)) exit(1); if (write(0, "TEST", 4) == -1) exit(1); #else #include #include #include main() { int s1, s2, l; struct sockaddr_un a; #ifdef FD_SET fd_set f; #else int f; #endif (void)alarm(5); if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) exit(1); a.sun_family = AF_UNIX; strcpy(a.sun_path, nam); (void) unlink(nam); if (bind(s1, (struct sockaddr *) &a, strlen(nam)+2) == -1) exit(1); if (listen(s1, 2)) exit(1); if (fork() == 0) { if ((s2 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) kill(getppid(), 3); (void)connect(s2, (struct sockaddr *)&a, strlen(nam) + 2); if (write(s2, "HELLO", 5) == -1) kill(getppid(), 3); exit(0); } l = sizeof(a); close(0); if (accept(s1, (struct sockaddr *)&a, &l)) exit(1); #endif #ifdef FD_SET FD_SET(0, &f); #else f = 1; #endif if (select(1, &f, 0, 0, 0) == -1) exit(1); if (select(1, &f, &f, 0, 0) != 2) exit(1); exit(0); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "- select is ok" 1>&6 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) echo "- select can't count" 1>&6 cat >>confdefs.h <<\_ACEOF #define SELECT_BROKEN 1 _ACEOF fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: checking for tgetent..." >&5 $as_echo "$as_me: checking for tgetent..." >&6;} cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { tgetent((char *)0, (char *)0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 olibs="$LIBS" LIBS="-lcurses $olibs" { $as_echo "$as_me:$LINENO: checking libcurses..." >&5 $as_echo "$as_me: checking libcurses..." >&6;} cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifdef __hpux __sorry_hpux_libcurses_is_totally_broken_in_10_10(); #else tgetent((char *)0, (char *)0); #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS="-ltermcap $olibs" { $as_echo "$as_me:$LINENO: checking libtermcap..." >&5 $as_echo "$as_me: checking libtermcap..." >&6;} cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { tgetent((char *)0, (char *)0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS="-ltermlib $olibs" { $as_echo "$as_me:$LINENO: checking libtermlib..." >&5 $as_echo "$as_me: checking libtermlib..." >&6;} cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { tgetent((char *)0, (char *)0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS="-lncurses $olibs" { $as_echo "$as_me:$LINENO: checking libncurses..." >&5 $as_echo "$as_me: checking libncurses..." >&6;} cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { tgetent((char *)0, (char *)0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: !!! no tgetent - no screen" >&5 $as_echo "$as_me: error: !!! no tgetent - no screen" >&2;} { (exit 1); exit 1; }; } fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$cross_compiling" = yes; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main() { exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "- you use the termcap database" 1>&6 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) echo "- you use the terminfo database" 1>&6 cat >>confdefs.h <<\_ACEOF #define TERMINFO 1 _ACEOF fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: checking ospeed..." >&5 $as_echo "$as_me: checking ospeed..." >&6;} cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ extern short ospeed; int main () { ospeed=5; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >>confdefs.h <<\_ACEOF #define NEED_OSPEED 1 _ACEOF fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:$LINENO: checking for /dev/ptc..." >&5 $as_echo "$as_me: checking for /dev/ptc..." >&6;} if test -r /dev/ptc; then cat >>confdefs.h <<\_ACEOF #define HAVE_DEV_PTC 1 _ACEOF fi { $as_echo "$as_me:$LINENO: checking for SVR4 ptys..." >&5 $as_echo "$as_me: checking for SVR4 ptys..." >&6;} sysvr4ptys= if test -c /dev/ptmx ; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ptsname(0);grantpt(0);unlockpt(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then cat >>confdefs.h <<\_ACEOF #define HAVE_SVR4_PTYS 1 _ACEOF sysvr4ptys=1 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi for ac_func in getpt do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test -z "$sysvr4ptys"; then for ac_func in openpty do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else { $as_echo "$as_me:$LINENO: checking for openpty in -lutil" >&5 $as_echo_n "checking for openpty in -lutil... " >&6; } if test "${ac_cv_lib_util_openpty+set}" = set; then $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char openpty (); int main () { return openpty (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_util_openpty=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_util_openpty=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5 $as_echo "$ac_cv_lib_util_openpty" >&6; } if test "x$ac_cv_lib_util_openpty" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_OPENPTY 1 _ACEOF LIBS="$LIBS -lutil" fi fi done fi { $as_echo "$as_me:$LINENO: checking for ptyranges..." >&5 $as_echo "$as_me: checking for ptyranges..." >&6;} if test -d /dev/ptym ; then pdir='/dev/ptym' else pdir='/dev' fi cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef M_UNIX yes; #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then ptys=`echo /dev/ptyp??` else ptys=`echo $pdir/pty??` fi rm -f conftest* if test "$ptys" != "$pdir/pty??" ; then p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'` p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'` cat >>confdefs.h <<_ACEOF #define PTYRANGE0 "$p0" _ACEOF cat >>confdefs.h <<_ACEOF #define PTYRANGE1 "$p1" _ACEOF fi # Check whether --with-pty-mode was given. if test "${with_pty_mode+set}" = set; then withval=$with_pty_mode; ptymode="${withval}" fi # Check whether --with-pty-group was given. if test "${with_pty_group+set}" = set; then withval=$with_pty_group; ptygrp="${withval}" fi test -n "$ptymode" || ptymode=0620 if test -n "$ptygrp" ; then cat >>confdefs.h <<_ACEOF #define PTYMODE $ptymode _ACEOF cat >>confdefs.h <<_ACEOF #define PTYGROUP $ptygrp _ACEOF else { $as_echo "$as_me:$LINENO: checking default tty permissions/group..." >&5 $as_echo "$as_me: checking default tty permissions/group..." >&6;} rm -f conftest_grp if test "$cross_compiling" = yes; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include main() { struct stat sb; char *x,*ttyname(); int om, m; FILE *fp; if (!(x = ttyname(0))) exit(1); if (stat(x, &sb)) exit(1); om = sb.st_mode; if (om & 002) exit(0); m = system("mesg y"); if (m == -1 || m == 127) exit(1); if (stat(x, &sb)) exit(1); m = sb.st_mode; if (chmod(x, om)) exit(1); if (m & 002) exit(0); if (sb.st_gid == getgid()) exit(1); if (!(fp=fopen("conftest_grp", "w"))) exit(1); fprintf(fp, "%d\n", sb.st_gid); fclose(fp); exit(0); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then if test -f conftest_grp; then ptygrp=`cat conftest_grp` echo "- pty mode: $ptymode, group: $ptygrp" 1>&6 cat >>confdefs.h <<_ACEOF #define PTYMODE $ptymode _ACEOF cat >>confdefs.h <<_ACEOF #define PTYGROUP $ptygrp _ACEOF else echo "- ptys are world accessable" 1>&6 fi else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) WRITEPATH='' XTERMPATH='' # Extract the first word of "write", so it can be a program name with args. set dummy write; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_WRITEPATH+set}" = set; then $as_echo_n "(cached) " >&6 else case $WRITEPATH in [\\/]* | ?:[\\/]*) ac_cv_path_WRITEPATH="$WRITEPATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_WRITEPATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi WRITEPATH=$ac_cv_path_WRITEPATH if test -n "$WRITEPATH"; then { $as_echo "$as_me:$LINENO: result: $WRITEPATH" >&5 $as_echo "$WRITEPATH" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xterm", so it can be a program name with args. set dummy xterm; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_XTERMPATH+set}" = set; then $as_echo_n "(cached) " >&6 else case $XTERMPATH in [\\/]* | ?:[\\/]*) ac_cv_path_XTERMPATH="$XTERMPATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XTERMPATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi XTERMPATH=$ac_cv_path_XTERMPATH if test -n "$XTERMPATH"; then { $as_echo "$as_me:$LINENO: result: $XTERMPATH" >&5 $as_echo "$XTERMPATH" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi found= if test -n "$WRITEPATH$XTERMPATH"; then findfollow= lsfollow= found=`find $WRITEPATH $XTERMPATH -follow -print 2>/dev/null` if test -n "$found"; then findfollow=-follow lsfollow=L fi if test -n "$XTERMPATH"; then ptygrpn=`ls -l$lsfollow $XTERMPATH | sed -n -e 1p | $AWK '{print $4}'` if test tty != "$ptygrpn"; then XTERMPATH= fi fi fi if test -n "$WRITEPATH$XTERMPATH"; then found=`find $WRITEPATH $XTERMPATH $findfollow -perm -2000 -print` if test -n "$found"; then ptygrp=`ls -ln$lsfollow $found | sed -n -e 1p | $AWK '{print $4}'` echo "- pty mode: $ptymode, group: $ptygrp" 1>&6 cat >>confdefs.h <<_ACEOF #define PTYMODE $ptymode _ACEOF cat >>confdefs.h <<_ACEOF #define PTYGROUP $ptygrp _ACEOF else echo "- ptys are world accessable" 1>&6 fi else echo "- can't determine - assume ptys are world accessable" 1>&6 fi fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest_grp fi if test -n "$posix" ; then echo "assuming posix signal definition" 1>&6 cat >>confdefs.h <<\_ACEOF #define SIGVOID 1 _ACEOF else { $as_echo "$as_me:$LINENO: checking return type of signal handlers..." >&5 $as_echo "$as_me: checking return type of signal handlers..." >&6;} cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifdef signal #undef signal #endif extern void (*signal ()) (); int main () { int i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define SIGVOID 1 _ACEOF else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: checking sigset..." >&5 $as_echo "$as_me: checking sigset..." >&6;} cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #ifdef SIGVOID sigset(0, (void (*)())0); #else sigset(0, (int (*)())0); #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then cat >>confdefs.h <<\_ACEOF #define USESIGSET 1 _ACEOF else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:$LINENO: checking signal implementation..." >&5 $as_echo "$as_me: checking signal implementation..." >&6;} if test "$cross_compiling" = yes; then { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef SIGCLD #define SIGCLD SIGCHLD #endif #ifdef USESIGSET #define signal sigset #endif int got; #ifdef SIGVOID void #endif hand() { got++; } main() { /* on hpux we use sigvec to get bsd signals */ #ifdef __hpux (void)signal(SIGCLD, hand); kill(getpid(), SIGCLD); kill(getpid(), SIGCLD); if (got < 2) exit(1); #endif exit(0); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) cat >>confdefs.h <<\_ACEOF #define SYSVSIGS 1 _ACEOF fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/stropts.h sys/wait.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { $as_echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 $as_echo "$as_me: error: could not setup config headers machinery" >&2;} { (exit 1); exit 1; }; } fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 $as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 $as_echo "$as_me: error: could not create -" >&2;} { (exit 1); exit 1; }; } fi ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi gdb-doc-7.6.2/readline/examples/rlfe/configure.in0000644000175000017500000002154012250770610020727 0ustar zumbizumbidnl Process this file with autoconf to produce a configure script. m4_include([../../../config/override.m4]) AC_INIT(rlfe.c) AC_CONFIG_HEADER(config.h) VERSION=0.4 AC_SUBST(VERSION) dnl dnl Define some useful macros dnl AC_DEFUN([AC_PROGRAM_SOURCE], [AC_REQUIRE([AC_PROG_CPP])AC_PROVIDE([$0])cat > conftest.c <&5 | sed -e '1,/_CUT_HERE_/d' -e 's/ //g' > conftest.out" . ./conftest.out rm -f conftest* ])dnl dnl define(AC_NOTE, [echo "$1" 1>&AC_FD_MSG ])dnl old_CFLAGS="$CFLAGS" AC_PROG_CC AC_PROG_CPP AC_PROG_GCC_TRADITIONAL AC_ISC_POSIX AC_TRY_RUN(main(){exit(0);},,[ if test $CC != cc ; then AC_NOTE(Your $CC failed - restarting with CC=cc) AC_NOTE() CC=cc export CC exec $0 $configure_args fi ]) AC_TRY_RUN(main(){exit(0);},, exec 5>&2 eval $ac_link AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;) AC_NOTE($ac_compile) AC_MSG_ERROR(Can't run the compiler - sorry)) AC_TRY_RUN([ main() { int __something_strange_(); __something_strange_(0); } ],AC_MSG_ERROR(Your compiler does not set the exit status - sorry)) AC_PROG_AWK if test -f etc/toolcheck; then AC_CHECKING(for buggy tools) sh etc/toolcheck 1>&AC_FD_MSG fi dnl dnl **** special unix variants **** dnl AC_CHECKING(for System V) AC_TRY_COMPILE( [#include #include #include ], [int x = SIGCHLD | FNDELAY;], , AC_DEFINE(SYSV)) AC_CHECKING(for Solaris 2.x) AC_EGREP_CPP(yes, [#if defined(SVR4) && defined(sun) yes #endif ], LIBS="$LIBS -lsocket -lnsl -lkstat") dnl dnl **** select() **** dnl AC_CHECKING(select) AC_TRY_LINK(,[select(0, 0, 0, 0, 0);],, LIBS="$LIBS -lnet -lnsl" AC_CHECKING(select with $LIBS) AC_TRY_LINK(,[select(0, 0, 0, 0, 0);],, AC_MSG_ERROR(!!! no select - no screen)) ) dnl dnl **** check the select implementation **** dnl AC_CHECKING(select return value) AC_TRY_RUN([ #include #include #include char *nam = "/tmp/conftest$$"; #ifdef NAMEDPIPE #ifndef O_NONBLOCK #define O_NONBLOCK O_NDELAY #endif #ifndef S_IFIFO #define S_IFIFO 0010000 #endif main() { #ifdef FD_SET fd_set f; #else int f; #endif #ifdef __FreeBSD__ /* From Andrew A. Chernov (ache@astral.msk.su): * opening RDWR fifo fails in BSD 4.4, but select return values are * right. */ exit(0); #endif (void)alarm(5); #ifdef POSIX if (mkfifo(nam, 0777)) #else if (mknod(nam, S_IFIFO|0777, 0)) #endif exit(1); close(0); if (open(nam, O_RDWR | O_NONBLOCK)) exit(1); if (write(0, "TEST", 4) == -1) exit(1); #else #include #include #include main() { int s1, s2, l; struct sockaddr_un a; #ifdef FD_SET fd_set f; #else int f; #endif (void)alarm(5); if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) exit(1); a.sun_family = AF_UNIX; strcpy(a.sun_path, nam); (void) unlink(nam); if (bind(s1, (struct sockaddr *) &a, strlen(nam)+2) == -1) exit(1); if (listen(s1, 2)) exit(1); if (fork() == 0) { if ((s2 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) kill(getppid(), 3); (void)connect(s2, (struct sockaddr *)&a, strlen(nam) + 2); if (write(s2, "HELLO", 5) == -1) kill(getppid(), 3); exit(0); } l = sizeof(a); close(0); if (accept(s1, (struct sockaddr *)&a, &l)) exit(1); #endif #ifdef FD_SET FD_SET(0, &f); #else f = 1; #endif if (select(1, &f, 0, 0, 0) == -1) exit(1); if (select(1, &f, &f, 0, 0) != 2) exit(1); exit(0); } ],AC_NOTE(- select is ok), AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN)) dnl dnl **** termcap or terminfo **** dnl AC_CHECKING(for tgetent) AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, olibs="$LIBS" LIBS="-lcurses $olibs" AC_CHECKING(libcurses) AC_TRY_LINK(,[ #ifdef __hpux __sorry_hpux_libcurses_is_totally_broken_in_10_10(); #else tgetent((char *)0, (char *)0); #endif ],, LIBS="-ltermcap $olibs" AC_CHECKING(libtermcap) AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, LIBS="-ltermlib $olibs" AC_CHECKING(libtermlib) AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, LIBS="-lncurses $olibs" AC_CHECKING(libncurses) AC_TRY_LINK(,tgetent((char *)0, (char *)0);,, AC_MSG_ERROR(!!! no tgetent - no screen)))))) AC_TRY_RUN([ main() { exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); }], AC_NOTE(- you use the termcap database), AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO)) AC_CHECKING(ospeed) AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED)) dnl dnl **** PTY specific things **** dnl AC_CHECKING(for /dev/ptc) if test -r /dev/ptc; then AC_DEFINE(HAVE_DEV_PTC) fi AC_CHECKING(for SVR4 ptys) sysvr4ptys= if test -c /dev/ptmx ; then AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS) sysvr4ptys=1]) fi AC_CHECK_FUNCS(getpt) dnl check for openpty() if test -z "$sysvr4ptys"; then AC_CHECK_FUNCS(openpty,, [AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])]) fi AC_CHECKING(for ptyranges) if test -d /dev/ptym ; then pdir='/dev/ptym' else pdir='/dev' fi dnl SCO uses ptyp%d AC_EGREP_CPP(yes, [#ifdef M_UNIX yes; #endif ], ptys=`echo /dev/ptyp??`, ptys=`echo $pdir/pty??`) dnl if test -c /dev/ptyp19; then dnl ptys=`echo /dev/ptyp??` dnl else dnl ptys=`echo $pdir/pty??` dnl fi if test "$ptys" != "$pdir/pty??" ; then p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'` p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'` AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0") AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1") fi dnl **** pty mode/group handling **** dnl dnl support provided by Luke Mewburn , 931222 AC_ARG_WITH(pty-mode, [ --with-pty-mode=mode default mode for ptys], [ ptymode="${withval}" ]) AC_ARG_WITH(pty-group, [ --with-pty-group=group default group for ptys], [ ptygrp="${withval}" ]) test -n "$ptymode" || ptymode=0620 if test -n "$ptygrp" ; then AC_DEFINE_UNQUOTED(PTYMODE, $ptymode) AC_DEFINE_UNQUOTED(PTYGROUP,$ptygrp) else AC_CHECKING(default tty permissions/group) rm -f conftest_grp AC_TRY_RUN([ #include #include #include main() { struct stat sb; char *x,*ttyname(); int om, m; FILE *fp; if (!(x = ttyname(0))) exit(1); if (stat(x, &sb)) exit(1); om = sb.st_mode; if (om & 002) exit(0); m = system("mesg y"); if (m == -1 || m == 127) exit(1); if (stat(x, &sb)) exit(1); m = sb.st_mode; if (chmod(x, om)) exit(1); if (m & 002) exit(0); if (sb.st_gid == getgid()) exit(1); if (!(fp=fopen("conftest_grp", "w"))) exit(1); fprintf(fp, "%d\n", sb.st_gid); fclose(fp); exit(0); } ],[ if test -f conftest_grp; then ptygrp=`cat conftest_grp` AC_NOTE([- pty mode: $ptymode, group: $ptygrp]) AC_DEFINE_UNQUOTED(PTYMODE, $ptymode) AC_DEFINE_UNQUOTED(PTYGROUP,$ptygrp) else AC_NOTE(- ptys are world accessable) fi ],[ WRITEPATH='' XTERMPATH='' AC_PATH_PROG(WRITEPATH, write) AC_PATH_PROG(XTERMPATH, xterm) found= if test -n "$WRITEPATH$XTERMPATH"; then findfollow= lsfollow= found=`find $WRITEPATH $XTERMPATH -follow -print 2>/dev/null` if test -n "$found"; then findfollow=-follow lsfollow=L fi if test -n "$XTERMPATH"; then ptygrpn=`ls -l$lsfollow $XTERMPATH | sed -n -e 1p | $AWK '{print $4}'` if test tty != "$ptygrpn"; then XTERMPATH= fi fi fi if test -n "$WRITEPATH$XTERMPATH"; then found=`find $WRITEPATH $XTERMPATH $findfollow -perm -2000 -print` if test -n "$found"; then ptygrp=`ls -ln$lsfollow $found | sed -n -e 1p | $AWK '{print $4}'` AC_NOTE([- pty mode: $ptymode, group: $ptygrp]) AC_DEFINE_UNQUOTED(PTYMODE, $ptymode) AC_DEFINE_UNQUOTED(PTYGROUP,$ptygrp) else AC_NOTE(- ptys are world accessable) fi else AC_NOTE(- can't determine - assume ptys are world accessable) fi ] ) rm -f conftest_grp fi dnl dnl **** signal handling **** dnl if test -n "$posix" ; then dnl POSIX has reliable signals with void return type. AC_NOTE(assuming posix signal definition) AC_DEFINE(SIGVOID) else AC_CHECKING(return type of signal handlers) AC_TRY_COMPILE( [#include #include #ifdef signal #undef signal #endif extern void (*signal ()) ();], [int i;], AC_DEFINE(SIGVOID)) AC_CHECKING(sigset) AC_TRY_LINK([ #include #include ],[ #ifdef SIGVOID sigset(0, (void (*)())0); #else sigset(0, (int (*)())0); #endif ], AC_DEFINE(USESIGSET)) AC_CHECKING(signal implementation) AC_TRY_RUN([ #include #include #ifndef SIGCLD #define SIGCLD SIGCHLD #endif #ifdef USESIGSET #define signal sigset #endif int got; #ifdef SIGVOID void #endif hand() { got++; } main() { /* on hpux we use sigvec to get bsd signals */ #ifdef __hpux (void)signal(SIGCLD, hand); kill(getpid(), SIGCLD); kill(getpid(), SIGCLD); if (got < 2) exit(1); #endif exit(0); } ],,AC_DEFINE(SYSVSIGS)) fi AC_CHECK_HEADERS(sys/stropts.h sys/wait.h) AC_OUTPUT(Makefile) gdb-doc-7.6.2/readline/examples/rltest.c0000644000175000017500000000414212250770610017146 0ustar zumbizumbi/* **************************************************************** */ /* */ /* Testing Readline */ /* */ /* **************************************************************** */ /* Copyright (C) 1987-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #if defined (HAVE_CONFIG_H) #include #endif #include #include #ifdef HAVE_STDLIB_H # include #else extern void exit(); #endif #ifdef READLINE_LIBRARY # include "readline.h" # include "history.h" #else # include # include #endif extern HIST_ENTRY **history_list (); main () { char *temp, *prompt; int done; temp = (char *)NULL; prompt = "readline$ "; done = 0; while (!done) { temp = readline (prompt); /* Test for EOF. */ if (!temp) exit (1); /* If there is anything on the line, print it and remember it. */ if (*temp) { fprintf (stderr, "%s\r\n", temp); add_history (temp); } /* Check for `command' that we handle. */ if (strcmp (temp, "quit") == 0) done = 1; if (strcmp (temp, "list") == 0) { HIST_ENTRY **list; register int i; list = history_list (); if (list) { for (i = 0; list[i]; i++) fprintf (stderr, "%d: %s\r\n", i, list[i]->line); } } free (temp); } exit (0); } gdb-doc-7.6.2/readline/examples/Inputrc0000644000175000017500000000447212250770610017042 0ustar zumbizumbi# My ~/.inputrc file is in -*- text -*- for easy editing with Emacs. # # Notice the various bindings which are conditionalized depending # on which program is running, or what terminal is active. # # Copyright (C) 1989-2009 Free Software Foundation, Inc. # # 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 3 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, see . # # In all programs, all terminals, make sure this is bound. "\C-x\C-r": re-read-init-file # Hp terminals (and some others) have ugly default behaviour for C-h. "\C-h": backward-delete-char "\e\C-h": backward-kill-word "\C-xd": dump-functions # In xterm windows, make the arrow keys do the right thing. $if TERM=xterm "\e[A": previous-history "\e[B": next-history "\e[C": forward-char "\e[D": backward-char # alternate arrow key prefix "\eOA": previous-history "\eOB": next-history "\eOC": forward-char "\eOD": backward-char # Under Xterm in Bash, we bind local Function keys to do something useful. $if Bash "\e[11~": "Function Key 1" "\e[12~": "Function Key 2" "\e[13~": "Function Key 3" "\e[14~": "Function Key 4" "\e[15~": "Function Key 5" # I know the following escape sequence numbers are 1 greater than # the function key. Don't ask me why, I didn't design the xterm terminal. "\e[17~": "Function Key 6" "\e[18~": "Function Key 7" "\e[19~": "Function Key 8" "\e[20~": "Function Key 9" "\e[21~": "Function Key 10" $endif $endif # For Bash, all terminals, add some Bash specific hacks. $if Bash "\C-xv": show-bash-version "\C-x\C-e": shell-expand-line # Here is one for editing my path. "\C-xp": "$PATH\C-x\C-e\C-e\"\C-aPATH=\":\C-b" # Make C-x r read my mail in emacs. # "\C-xr": "emacs -f rmail\C-j" $endif # For FTP, different hacks: $if Ftp "\C-xg": "get \M-?" "\C-xt": "put \M-?" "\M-.": yank-last-arg $endif " ": self-insert gdb-doc-7.6.2/readline/compat.c0000644000175000017500000000455512250770610015306 0ustar zumbizumbi/* compat.c -- backwards compatibility functions. */ /* Copyright (C) 2000-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include #endif #include #include "rlstdc.h" #include "rltypedefs.h" extern void rl_free_undo_list PARAMS((void)); extern int rl_maybe_save_line PARAMS((void)); extern int rl_maybe_unsave_line PARAMS((void)); extern int rl_maybe_replace_line PARAMS((void)); extern int rl_crlf PARAMS((void)); extern int rl_ding PARAMS((void)); extern int rl_alphabetic PARAMS((int)); extern char **rl_completion_matches PARAMS((const char *, rl_compentry_func_t *)); extern char *rl_username_completion_function PARAMS((const char *, int)); extern char *rl_filename_completion_function PARAMS((const char *, int)); /* Provide backwards-compatible entry points for old function names. */ void free_undo_list () { rl_free_undo_list (); } int maybe_replace_line () { return rl_maybe_replace_line (); } int maybe_save_line () { return rl_maybe_save_line (); } int maybe_unsave_line () { return rl_maybe_unsave_line (); } int ding () { return rl_ding (); } int crlf () { return rl_crlf (); } int alphabetic (c) int c; { return rl_alphabetic (c); } char ** completion_matches (s, f) const char *s; rl_compentry_func_t *f; { return rl_completion_matches (s, f); } char * username_completion_function (s, i) const char *s; int i; { return rl_username_completion_function (s, i); } char * filename_completion_function (s, i) const char *s; int i; { return rl_filename_completion_function (s, i); } gdb-doc-7.6.2/readline/keymaps.c0000644000175000017500000000734412250770610015473 0ustar zumbizumbi/* keymaps.c -- Functions and keymaps for the GNU Readline library. */ /* Copyright (C) 1988,1989-2009 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include #endif #if defined (HAVE_STDLIB_H) # include #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #include /* for FILE * definition for readline.h */ #include "readline.h" #include "rlconf.h" #include "emacs_keymap.c" #if defined (VI_MODE) #include "vi_keymap.c" #endif #include "xmalloc.h" /* **************************************************************** */ /* */ /* Functions for manipulating Keymaps. */ /* */ /* **************************************************************** */ /* Return a new, empty keymap. Free it with free() when you are done. */ Keymap rl_make_bare_keymap () { register int i; Keymap keymap; keymap = (Keymap)xmalloc (KEYMAP_SIZE * sizeof (KEYMAP_ENTRY)); for (i = 0; i < KEYMAP_SIZE; i++) { keymap[i].type = ISFUNC; keymap[i].function = (rl_command_func_t *)NULL; } #if 0 for (i = 'A'; i < ('Z' + 1); i++) { keymap[i].type = ISFUNC; keymap[i].function = rl_do_lowercase_version; } #endif return (keymap); } /* Return a new keymap which is a copy of MAP. Just copies pointers, does not copy text of macros or descend into child keymaps. */ Keymap rl_copy_keymap (map) Keymap map; { register int i; Keymap temp; temp = rl_make_bare_keymap (); for (i = 0; i < KEYMAP_SIZE; i++) { temp[i].type = map[i].type; temp[i].function = map[i].function; } return (temp); } /* Return a new keymap with the printing characters bound to rl_insert, the uppercase Meta characters bound to run their lowercase equivalents, and the Meta digits bound to produce numeric arguments. */ Keymap rl_make_keymap () { register int i; Keymap newmap; newmap = rl_make_bare_keymap (); /* All ASCII printing characters are self-inserting. */ for (i = ' '; i < 127; i++) newmap[i].function = rl_insert; newmap[TAB].function = rl_insert; newmap[RUBOUT].function = rl_rubout; /* RUBOUT == 127 */ newmap[CTRL('H')].function = rl_rubout; #if KEYMAP_SIZE > 128 /* Printing characters in ISO Latin-1 and some 8-bit character sets. */ for (i = 128; i < 256; i++) newmap[i].function = rl_insert; #endif /* KEYMAP_SIZE > 128 */ return (newmap); } /* Free the storage associated with MAP. */ void rl_discard_keymap (map) Keymap map; { int i; if (map == 0) return; for (i = 0; i < KEYMAP_SIZE; i++) { switch (map[i].type) { case ISFUNC: break; case ISKMAP: rl_discard_keymap ((Keymap)map[i].function); xfree ((char *)map[i].function); break; case ISMACR: xfree ((char *)map[i].function); break; } } } /* Convenience function that discards, then frees, MAP. */ void rl_free_keymap (map) Keymap map; { rl_discard_keymap (map); xfree ((char *)map); } gdb-doc-7.6.2/readline/text.c0000644000175000017500000011207412250770610015003 0ustar zumbizumbi/* text.c -- text handling commands for readline. */ /* Copyright (C) 1987-2010 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. Readline 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 3 of the License, or (at your option) any later version. Readline 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 Readline. If not, see . */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include #endif #if defined (HAVE_UNISTD_H) # include #endif /* HAVE_UNISTD_H */ #if defined (HAVE_STDLIB_H) # include #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #if defined (HAVE_LOCALE_H) # include #endif #include /* System-specific feature definitions and include files. */ #include "rldefs.h" #include "rlmbutil.h" #if defined (__EMX__) # define INCL_DOSPROCESS # include #endif /* __EMX__ */ /* Some standard library routines. */ #include "readline.h" #include "history.h" #include "rlprivate.h" #include "rlshell.h" #include "xmalloc.h" /* Forward declarations. */ static int rl_change_case PARAMS((int, int)); static int _rl_char_search PARAMS((int, int, int)); #if defined (READLINE_CALLBACKS) static int _rl_insert_next_callback PARAMS((_rl_callback_generic_arg *)); static int _rl_char_search_callback PARAMS((_rl_callback_generic_arg *)); #endif /* The largest chunk of text that can be inserted in one call to rl_insert_text. Text blocks larger than this are divided. */ #define TEXT_COUNT_MAX 1024 /* **************************************************************** */ /* */ /* Insert and Delete */ /* */ /* **************************************************************** */ /* Insert a string of text into the line at point. This is the only way that you should do insertion. _rl_insert_char () calls this function. Returns the number of characters inserted. */ int rl_insert_text (string) const char *string; { register int i, l; l = (string && *string) ? strlen (string) : 0; if (l == 0) return 0; if (rl_end + l >= rl_line_buffer_len) rl_extend_line_buffer (rl_end + l); for (i = rl_end; i >= rl_point; i--) rl_line_buffer[i + l] = rl_line_buffer[i]; strncpy (rl_line_buffer + rl_point, string, l); /* Remember how to undo this if we aren't undoing something. */ if (_rl_doing_an_undo == 0) { /* If possible and desirable, concatenate the undos. */ if ((l == 1) && rl_undo_list && (rl_undo_list->what == UNDO_INSERT) && (rl_undo_list->end == rl_point) && (rl_undo_list->end - rl_undo_list->start < 20)) rl_undo_list->end++; else rl_add_undo (UNDO_INSERT, rl_point, rl_point + l, (char *)NULL); } rl_point += l; rl_end += l; rl_line_buffer[rl_end] = '\0'; return l; } /* Delete the string between FROM and TO. FROM is inclusive, TO is not. Returns the number of characters deleted. */ int rl_delete_text (from, to) int from, to; { register char *text; register int diff, i; /* Fix it if the caller is confused. */ if (from > to) SWAP (from, to); /* fix boundaries */ if (to > rl_end) { to = rl_end; if (from > to) from = to; } if (from < 0) from = 0; text = rl_copy_text (from, to); /* Some versions of strncpy() can't handle overlapping arguments. */ diff = to - from; for (i = from; i < rl_end - diff; i++) rl_line_buffer[i] = rl_line_buffer[i + diff]; /* Remember how to undo this delete. */ if (_rl_doing_an_undo == 0) rl_add_undo (UNDO_DELETE, from, to, text); else xfree (text); rl_end -= diff; rl_line_buffer[rl_end] = '\0'; return (diff); } /* Fix up point so that it is within the line boundaries after killing text. If FIX_MARK_TOO is non-zero, the mark is forced within line boundaries also. */ #define _RL_FIX_POINT(x) \ do { \ if (x > rl_end) \ x = rl_end; \ else if (x < 0) \ x = 0; \ } while (0) void _rl_fix_point (fix_mark_too) int fix_mark_too; { _RL_FIX_POINT (rl_point); if (fix_mark_too) _RL_FIX_POINT (rl_mark); } #undef _RL_FIX_POINT /* Replace the contents of the line buffer between START and END with TEXT. The operation is undoable. To replace the entire line in an undoable mode, use _rl_replace_text(text, 0, rl_end); */ int _rl_replace_text (text, start, end) const char *text; int start, end; { int n; n = 0; rl_begin_undo_group (); if (start <= end) rl_delete_text (start, end + 1); rl_point = start; if (*text) n = rl_insert_text (text); rl_end_undo_group (); return n; } /* Replace the current line buffer contents with TEXT. If CLEAR_UNDO is non-zero, we free the current undo list. */ void rl_replace_line (text, clear_undo) const char *text; int clear_undo; { int len; len = strlen (text); if (len >= rl_line_buffer_len) rl_extend_line_buffer (len); strcpy (rl_line_buffer, text); rl_end = len; if (clear_undo) rl_free_undo_list (); _rl_fix_point (1); } /* **************************************************************** */ /* */ /* Readline character functions */ /* */ /* **************************************************************** */ /* This is not a gap editor, just a stupid line input routine. No hair is involved in writing any of the functions, and none should be. */ /* Note that: rl_end is the place in the string that we would place '\0'; i.e., it is always safe to place '\0' there. rl_point is the place in the string where the cursor is. Sometimes this is the same as rl_end. Any command that is called interactively receives two arguments. The first is a count: the numeric arg pased to this command. The second is the key which invoked this command. */ /* **************************************************************** */ /* */ /* Movement Commands */ /* */ /* **************************************************************** */ /* Note that if you `optimize' the display for these functions, you cannot use said functions in other functions which do not do optimizing display. I.e., you will have to update the data base for rl_redisplay, and you might as well let rl_redisplay do that job. */ /* Move forward COUNT bytes. */ int rl_forward_byte (count, key) int count, key; { if (count < 0) return (rl_backward_byte (-count, key)); if (count > 0) { int end, lend; end = rl_point + count; #if defined (VI_MODE) lend = rl_end > 0 ? rl_end - (VI_COMMAND_MODE()) : rl_end; #else lend = rl_end; #endif if (end > lend) { rl_point = lend; rl_ding (); } else rl_point = end; } if (rl_end < 0) rl_end = 0; return 0; } int _rl_forward_char_internal (count) int count; { int point; #if defined (HANDLE_MULTIBYTE) point = _rl_find_next_mbchar (rl_line_buffer, rl_point, count, MB_FIND_NONZERO); #if defined (VI_MODE) if (point >= rl_end && VI_COMMAND_MODE()) point = _rl_find_prev_mbchar (rl_line_buffer, rl_end, MB_FIND_NONZERO); #endif if (rl_end < 0) rl_end = 0; #else point = rl_point + count; if (point > rl_end) point = rl_end; #endif return (point); } #if defined (HANDLE_MULTIBYTE) /* Move forward COUNT characters. */ int rl_forward_char (count, key) int count, key; { int point; if (MB_CUR_MAX == 1 || rl_byte_oriented) return (rl_forward_byte (count, key)); if (count < 0) return (rl_backward_char (-count, key)); if (count > 0) { if (rl_point == rl_end && EMACS_MODE()) { rl_ding (); return 0; } point = _rl_forward_char_internal (count); if (rl_point == point) rl_ding (); rl_point = point; } return 0; } #else /* !HANDLE_MULTIBYTE */ int rl_forward_char (count, key) int count, key; { return (rl_forward_byte (count, key)); } #endif /* !HANDLE_MULTIBYTE */ /* Backwards compatibility. */ int rl_forward (count, key) int count, key; { return (rl_forward_char (count, key)); } /* Move backward COUNT bytes. */ int rl_backward_byte (count, key) int count, key; { if (count < 0) return (rl_forward_byte (-count, key)); if (count > 0) { if (rl_point < count) { rl_point = 0; rl_ding (); } else rl_point -= count; } if (rl_point < 0) rl_point = 0; return 0; } #if defined (HANDLE_MULTIBYTE) /* Move backward COUNT characters. */ int rl_backward_char (count, key) int count, key; { int point; if (MB_CUR_MAX == 1 || rl_byte_oriented) return (rl_backward_byte (count, key)); if (count < 0) return (rl_forward_char (-count, key)); if (count > 0) { point = rl_point; while (count > 0 && point > 0) { point = _rl_find_prev_mbchar (rl_line_buffer, point, MB_FIND_NONZERO); count--; } if (count > 0) { rl_point = 0; rl_ding (); } else rl_point = point; } return 0; } #else int rl_backward_char (count, key) int count, key; { return (rl_backward_byte (count, key)); } #endif /* Backwards compatibility. */ int rl_backward (count, key) int count, key; { return (rl_backward_char (count, key)); } /* Move to the beginning of the line. */ int rl_beg_of_line (count, key) int count, key; { rl_point = 0; return 0; } /* Move to the end of the line. */ int rl_end_of_line (count, key) int count, key; { rl_point = rl_end; return 0; } /* Move forward a word. We do what Emacs does. Handles multibyte chars. */ int rl_forward_word (count, key) int count, key; { int c; if (count < 0) return (rl_backward_word (-count, key)); while (count) { if (rl_point == rl_end) return 0; /* If we are not in a word, move forward until we are in one. Then, move forward until we hit a non-alphabetic character. */ c = _rl_char_value (rl_line_buffer, rl_point); if (_rl_walphabetic (c) == 0) { rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); while (rl_point < rl_end) { c = _rl_char_value (rl_line_buffer, rl_point); if (_rl_walphabetic (c)) break; rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); } } if (rl_point == rl_end) return 0; rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); while (rl_point < rl_end) { c = _rl_char_value (rl_line_buffer, rl_point); if (_rl_walphabetic (c) == 0) break; rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); } --count; } return 0; } /* Move backward a word. We do what Emacs does. Handles multibyte chars. */ int rl_backward_word (count, key) int count, key; { int c, p; if (count < 0) return (rl_forward_word (-count, key)); while (count) { if (rl_point == 0) return 0; /* Like rl_forward_word (), except that we look at the characters just before point. */ p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO); c = _rl_char_value (rl_line_buffer, p); if (_rl_walphabetic (c) == 0) { rl_point = p; while (rl_point > 0) { p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO); c = _rl_char_value (rl_line_buffer, p); if (_rl_walphabetic (c)) break; rl_point = p; } } while (rl_point) { p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO); c = _rl_char_value (rl_line_buffer, p); if (_rl_walphabetic (c) == 0) break; else rl_point = p; } --count; } return 0; } /* Clear the current line. Numeric argument to C-l does this. */ int rl_refresh_line (ignore1, ignore2) int ignore1, ignore2; { int curr_line; curr_line = _rl_current_display_line (); _rl_move_vert (curr_line); _rl_move_cursor_relative (0, rl_line_buffer); /* XXX is this right */ _rl_clear_to_eol (0); /* arg of 0 means to not use spaces */ rl_forced_update_display (); rl_display_fixed = 1; return 0; } /* C-l typed to a line without quoting clears the screen, and then reprints the prompt and the current input line. Given a numeric arg, redraw only the current line. */ int rl_clear_screen (count, key) int count, key; { if (rl_explicit_arg) { rl_refresh_line (count, key); return 0; } _rl_clear_screen (); /* calls termcap function to clear screen */ rl_forced_update_display (); rl_display_fixed = 1; return 0; } int rl_skip_csi_sequence (count, key) int count, key; { int ch; RL_SETSTATE (RL_STATE_MOREINPUT); do ch = rl_read_key (); while (ch >= 0x20 && ch < 0x40); RL_UNSETSTATE (RL_STATE_MOREINPUT); return 0; } int rl_arrow_keys (count, c) int count, c; { int ch; RL_SETSTATE(RL_STATE_MOREINPUT); ch = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); switch (_rl_to_upper (ch)) { case 'A': rl_get_previous_history (count, ch); break; case 'B': rl_get_next_history (count, ch); break; case 'C': if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) rl_forward_char (count, ch); else rl_forward_byte (count, ch); break; case 'D': if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) rl_backward_char (count, ch); else rl_backward_byte (count, ch); break; default: rl_ding (); } return 0; } /* **************************************************************** */ /* */ /* Text commands */ /* */ /* **************************************************************** */ #ifdef HANDLE_MULTIBYTE static char pending_bytes[MB_LEN_MAX]; static int pending_bytes_length = 0; static mbstate_t ps = {0}; #endif /* Insert the character C at the current location, moving point forward. If C introduces a multibyte sequence, we read the whole sequence and then insert the multibyte char into the line buffer. */ int _rl_insert_char (count, c) int count, c; { register int i; char *string; #ifdef HANDLE_MULTIBYTE int string_size; char incoming[MB_LEN_MAX + 1]; int incoming_length = 0; mbstate_t ps_back; static int stored_count = 0; #endif if (count <= 0) return 0; #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX == 1 || rl_byte_oriented) { incoming[0] = c; incoming[1] = '\0'; incoming_length = 1; } else { wchar_t wc; size_t ret; if (stored_count <= 0) stored_count = count; else count = stored_count; ps_back = ps; pending_bytes[pending_bytes_length++] = c; ret = mbrtowc (&wc, pending_bytes, pending_bytes_length, &ps); if (ret == (size_t)-2) { /* Bytes too short to compose character, try to wait for next byte. Restore the state of the byte sequence, because in this case the effect of mbstate is undefined. */ ps = ps_back; return 1; } else if (ret == (size_t)-1) { /* Invalid byte sequence for the current locale. Treat first byte as a single character. */ incoming[0] = pending_bytes[0]; incoming[1] = '\0'; incoming_length = 1; pending_bytes_length--; memmove (pending_bytes, pending_bytes + 1, pending_bytes_length); /* Clear the state of the byte sequence, because in this case the effect of mbstate is undefined. */ memset (&ps, 0, sizeof (mbstate_t)); } else if (ret == (size_t)0) { incoming[0] = '\0'; incoming_length = 0; pending_bytes_length--; /* Clear the state of the byte sequence, because in this case the effect of mbstate is undefined. */ memset (&ps, 0, sizeof (mbstate_t)); } else { /* We successfully read a single multibyte character. */ memcpy (incoming, pending_bytes, pending_bytes_length); incoming[pending_bytes_length] = '\0'; incoming_length = pending_bytes_length; pending_bytes_length = 0; } } #endif /* HANDLE_MULTIBYTE */ /* If we can optimize, then do it. But don't let people crash readline because of extra large arguments. */ if (count > 1 && count <= TEXT_COUNT_MAX) { #if defined (HANDLE_MULTIBYTE) string_size = count * incoming_length; string = (char *)xmalloc (1 + string_size); i = 0; while (i < string_size) { strncpy (string + i, incoming, incoming_length); i += incoming_length; } incoming_length = 0; stored_count = 0; #else /* !HANDLE_MULTIBYTE */ string = (char *)xmalloc (1 + count); for (i = 0; i < count; i++) string[i] = c; #endif /* !HANDLE_MULTIBYTE */ string[i] = '\0'; rl_insert_text (string); xfree (string); return 0; } if (count > TEXT_COUNT_MAX) { int decreaser; #if defined (HANDLE_MULTIBYTE) string_size = incoming_length * TEXT_COUNT_MAX; string = (char *)xmalloc (1 + string_size); i = 0; while (i < string_size) { strncpy (string + i, incoming, incoming_length); i += incoming_length; } while (count) { decreaser = (count > TEXT_COUNT_MAX) ? TEXT_COUNT_MAX : count; string[decreaser*incoming_length] = '\0'; rl_insert_text (string); count -= decreaser; } xfree (string); incoming_length = 0; stored_count = 0; #else /* !HANDLE_MULTIBYTE */ char str[TEXT_COUNT_MAX+1]; for (i = 0; i < TEXT_COUNT_MAX; i++) str[i] = c; while (count) { decreaser = (count > TEXT_COUNT_MAX ? TEXT_COUNT_MAX : count); str[decreaser] = '\0'; rl_insert_text (str); count -= decreaser; } #endif /* !HANDLE_MULTIBYTE */ return 0; } if (MB_CUR_MAX == 1 || rl_byte_oriented) { /* We are inserting a single character. If there is pending input, then make a string of all of the pending characters that are bound to rl_insert, and insert them all. Don't do this if we're current reading input from a macro. */ if ((RL_ISSTATE (RL_STATE_MACROINPUT) == 0) && _rl_any_typein ()) _rl_insert_typein (c); else { /* Inserting a single character. */ char str[2]; str[1] = '\0'; str[0] = c; rl_insert_text (str); } } #if defined (HANDLE_MULTIBYTE) else { rl_insert_text (incoming); stored_count = 0; } #endif return 0; } /* Overwrite the character at point (or next COUNT characters) with C. If C introduces a multibyte character sequence, read the entire sequence before starting the overwrite loop. */ int _rl_overwrite_char (count, c) int count, c; { int i; #if defined (HANDLE_MULTIBYTE) char mbkey[MB_LEN_MAX]; int k; /* Read an entire multibyte character sequence to insert COUNT times. */ if (count > 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0) k = _rl_read_mbstring (c, mbkey, MB_LEN_MAX); #endif rl_begin_undo_group (); for (i = 0; i < count; i++) { #if defined (HANDLE_MULTIBYTE) if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) rl_insert_text (mbkey); else #endif _rl_insert_char (1, c); if (rl_point < rl_end) rl_delete (1, c); } rl_end_undo_group (); return 0; } int rl_insert (count, c) int count, c; { return (rl_insert_mode == RL_IM_INSERT ? _rl_insert_char (count, c) : _rl_overwrite_char (count, c)); } /* Insert the next typed character verbatim. */ static int _rl_insert_next (count) int count; { int c; RL_SETSTATE(RL_STATE_MOREINPUT); c = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); if (c < 0) return -1; #if defined (HANDLE_SIGNALS) if (RL_ISSTATE (RL_STATE_CALLBACK) == 0) _rl_restore_tty_signals (); #endif return (_rl_insert_char (count, c)); } #if defined (READLINE_CALLBACKS) static int _rl_insert_next_callback (data) _rl_callback_generic_arg *data; { int count; count = data->count; /* Deregister function, let rl_callback_read_char deallocate data */ _rl_callback_func = 0; _rl_want_redisplay = 1; return _rl_insert_next (count); } #endif int rl_quoted_insert (count, key) int count, key; { /* Let's see...should the callback interface futz with signal handling? */ #if defined (HANDLE_SIGNALS) if (RL_ISSTATE (RL_STATE_CALLBACK) == 0) _rl_disable_tty_signals (); #endif #if defined (READLINE_CALLBACKS) if (RL_ISSTATE (RL_STATE_CALLBACK)) { _rl_callback_data = _rl_callback_data_alloc (count); _rl_callback_func = _rl_insert_next_callback; return (0); } #endif return _rl_insert_next (count); } /* Insert a tab character. */ int rl_tab_insert (count, key) int count, key; { return (_rl_insert_char (count, '\t')); } /* What to do when a NEWLINE is pressed. We accept the whole line. KEY is the key that invoked this command. I guess it could have meaning in the future. */ int rl_newline (count, key) int count, key; { rl_done = 1; if (_rl_history_preserve_point) _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point; RL_SETSTATE(RL_STATE_DONE); #if defined (VI_MODE) if (rl_editing_mode == vi_mode) { _rl_vi_done_inserting (); if (_rl_vi_textmod_command (_rl_vi_last_command) == 0) /* XXX */ _rl_vi_reset_last (); } #endif /* VI_MODE */ /* If we've been asked to erase empty lines, suppress the final update, since _rl_update_final calls rl_crlf(). */ if (rl_erase_empty_line && rl_point == 0 && rl_end == 0) return 0; if (_rl_echoing_p) _rl_update_final (); return 0; } /* What to do for some uppercase characters, like meta characters, and some characters appearing in emacs_ctlx_keymap. This function is just a stub, you bind keys to it and the code in _rl_dispatch () is special cased. */ int rl_do_lowercase_version (ignore1, ignore2) int ignore1, ignore2; { return 0; } /* This is different from what vi does, so the code's not shared. Emacs rubout in overwrite mode has one oddity: it replaces a control character that's displayed as two characters (^X) with two spaces. */ int _rl_overwrite_rubout (count, key) int count, key; { int opoint; int i, l; if (rl_point == 0) { rl_ding (); return 1; } opoint = rl_point; /* L == number of spaces to insert */ for (i = l = 0; i < count; i++) { rl_backward_char (1, key); l += rl_character_len (rl_line_buffer[rl_point], rl_point); /* not exactly right */ } rl_begin_undo_group (); if (count > 1 || rl_explicit_arg) rl_kill_text (opoint, rl_point); else rl_delete_text (opoint, rl_point); /* Emacs puts point at the beginning of the sequence of spaces. */ if (rl_point < rl_end) { opoint = rl_point; _rl_insert_char (l, ' '); rl_point = opoint; } rl_end_undo_group (); return 0; } /* Rubout the character behind point. */ int rl_rubout (count, key) int count, key; { if (count < 0) return (rl_delete (-count, key)); if (!rl_point) { rl_ding (); return -1; } if (rl_insert_mode == RL_IM_OVERWRITE) return (_rl_overwrite_rubout (count, key)); return (_rl_rubout_char (count, key)); } int _rl_rubout_char (count, key) int count, key; { int orig_point; unsigned char c; /* Duplicated code because this is called from other parts of the library. */ if (count < 0) return (rl_delete (-count, key)); if (rl_point == 0) { rl_ding (); return -1; } orig_point = rl_point; if (count > 1 || rl_explicit_arg) { rl_backward_char (count, key); rl_kill_text (orig_point, rl_point); } else if (MB_CUR_MAX == 1 || rl_byte_oriented) { c = rl_line_buffer[--rl_point]; rl_delete_text (rl_point, orig_point); /* The erase-at-end-of-line hack is of questionable merit now. */ if (rl_point == rl_end && ISPRINT (c) && _rl_last_c_pos) { int l; l = rl_character_len (c, rl_point); _rl_erase_at_end_of_line (l); } } else { rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO); rl_delete_text (rl_point, orig_point); } return 0; } /* Delete the character under the cursor. Given a numeric argument, kill that many characters instead. */ int rl_delete (count, key) int count, key; { int xpoint; if (count < 0) return (_rl_rubout_char (-count, key)); if (rl_point == rl_end) { rl_ding (); return -1; } if (count > 1 || rl_explicit_arg) { xpoint = rl_point; if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) rl_forward_char (count, key); else rl_forward_byte (count, key); rl_kill_text (xpoint, rl_point); rl_point = xpoint; } else { xpoint = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); rl_delete_text (rl_point, xpoint); } return 0; } /* Delete the character under the cursor, unless the insertion point is at the end of the line, in which case the character behind the cursor is deleted. COUNT is obeyed and may be used to delete forward or backward that many characters. */ int rl_rubout_or_delete (count, key) int count, key; { if (rl_end != 0 && rl_point == rl_end) return (_rl_rubout_char (count, key)); else return (rl_delete (count, key)); } /* Delete all spaces and tabs around point. */ int rl_delete_horizontal_space (count, ignore) int count, ignore; { int start; while (rl_point && whitespace (rl_line_buffer[rl_point - 1])) rl_point--; start = rl_point; while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point])) rl_point++; if (start != rl_point) { rl_delete_text (start, rl_point); rl_point = start; } if (rl_point < 0) rl_point = 0; return 0; } /* Like the tcsh editing function delete-char-or-list. The eof character is caught before this is invoked, so this really does the same thing as delete-char-or-list-or-eof, as long as it's bound to the eof character. */ int rl_delete_or_show_completions (count, key) int count, key; { if (rl_end != 0 && rl_point == rl_end) return (rl_possible_completions (count, key)); else return (rl_delete (count, key)); } #ifndef RL_COMMENT_BEGIN_DEFAULT #define RL_COMMENT_BEGIN_DEFAULT "#" #endif /* Turn the current line into a comment in shell history. A K*rn shell style function. */ int rl_insert_comment (count, key) int count, key; { char *rl_comment_text; int rl_comment_len; rl_beg_of_line (1, key); rl_comment_text = _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT; if (rl_explicit_arg == 0) rl_insert_text (rl_comment_text); else { rl_comment_len = strlen (rl_comment_text); if (STREQN (rl_comment_text, rl_line_buffer, rl_comment_len)) rl_delete_text (rl_point, rl_point + rl_comment_len); else rl_insert_text (rl_comment_text); } (*rl_redisplay_function) (); rl_newline (1, '\n'); return (0); } /* **************************************************************** */ /* */ /* Changing Case */ /* */ /* **************************************************************** */ /* The three kinds of things that we know how to do. */ #define UpCase 1 #define DownCase 2 #define CapCase 3 /* Uppercase the word at point. */ int rl_upcase_word (count, key) int count, key; { return (rl_change_case (count, UpCase)); } /* Lowercase the word at point. */ int rl_downcase_word (count, key) int count, key; { return (rl_change_case (count, DownCase)); } /* Upcase the first letter, downcase the rest. */ int rl_capitalize_word (count, key) int count, key; { return (rl_change_case (count, CapCase)); } /* The meaty function. Change the case of COUNT words, performing OP on them. OP is one of UpCase, DownCase, or CapCase. If a negative argument is given, leave point where it started, otherwise, leave it where it moves to. */ static int rl_change_case (count, op) int count, op; { int start, next, end; int inword, c, nc, nop; #if defined (HANDLE_MULTIBYTE) wchar_t wc, nwc; char mb[MB_LEN_MAX+1]; int mlen; size_t m; mbstate_t mps; #endif start = rl_point; rl_forward_word (count, 0); end = rl_point; if (op != UpCase && op != DownCase && op != CapCase) { rl_ding (); return -1; } if (count < 0) SWAP (start, end); #if defined (HANDLE_MULTIBYTE) memset (&mps, 0, sizeof (mbstate_t)); #endif /* We are going to modify some text, so let's prepare to undo it. */ rl_modifying (start, end); inword = 0; while (start < end) { c = _rl_char_value (rl_line_buffer, start); /* This assumes that the upper and lower case versions are the same width. */ next = MB_NEXTCHAR (rl_line_buffer, start, 1, MB_FIND_NONZERO); if (_rl_walphabetic (c) == 0) { inword = 0; start = next; continue; } if (op == CapCase) { nop = inword ? DownCase : UpCase; inword = 1; } else nop = op; if (MB_CUR_MAX == 1 || rl_byte_oriented || isascii (c)) { nc = (nop == UpCase) ? _rl_to_upper (c) : _rl_to_lower (c); rl_line_buffer[start] = nc; } #if defined (HANDLE_MULTIBYTE) else { m = mbrtowc (&wc, rl_line_buffer + start, end - start, &mps); if (MB_INVALIDCH (m)) wc = (wchar_t)rl_line_buffer[start]; else if (MB_NULLWCH (m)) wc = L'\0'; nwc = (nop == UpCase) ? _rl_to_wupper (wc) : _rl_to_wlower (wc); if (nwc != wc) /* just skip unchanged characters */ { mlen = wcrtomb (mb, nwc, &mps); if (mlen > 0) mb[mlen] = '\0'; /* Assume the same width */ strncpy (rl_line_buffer + start, mb, mlen); } } #endif start = next; } rl_point = end; return 0; } /* **************************************************************** */ /* */ /* Transposition */ /* */ /* **************************************************************** */ /* Transpose the words at point. If point is at the end of the line, transpose the two words before point. */ int rl_transpose_words (count, key) int count, key; { char *word1, *word2; int w1_beg, w1_end, w2_beg, w2_end; int orig_point = rl_point; if (!count) return 0; /* Find the two words. */ rl_forward_word (count, key); w2_end = rl_point; rl_backward_word (1, key); w2_beg = rl_point; rl_backward_word (count, key); w1_beg = rl_point; rl_forward_word (1, key); w1_end = rl_point; /* Do some check to make sure that there really are two words. */ if ((w1_beg == w2_beg) || (w2_beg < w1_end)) { rl_ding (); rl_point = orig_point; return -1; } /* Get the text of the words. */ word1 = rl_copy_text (w1_beg, w1_end); word2 = rl_copy_text (w2_beg, w2_end); /* We are about to do many insertions and deletions. Remember them as one operation. */ rl_begin_undo_group (); /* Do the stuff at word2 first, so that we don't have to worry about word1 moving. */ rl_point = w2_beg; rl_delete_text (w2_beg, w2_end); rl_insert_text (word1); rl_point = w1_beg; rl_delete_text (w1_beg, w1_end); rl_insert_text (word2); /* This is exactly correct since the text before this point has not changed in length. */ rl_point = w2_end; /* I think that does it. */ rl_end_undo_group (); xfree (word1); xfree (word2); return 0; } /* Transpose the characters at point. If point is at the end of the line, then transpose the characters before point. */ int rl_transpose_chars (count, key) int count, key; { #if defined (HANDLE_MULTIBYTE) char *dummy; int i; #else char dummy[2]; #endif int char_length, prev_point; if (count == 0) return 0; if (!rl_point || rl_end < 2) { rl_ding (); return -1; } rl_begin_undo_group (); if (rl_point == rl_end) { rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO); count = 1; } prev_point = rl_point; rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO); #if defined (HANDLE_MULTIBYTE) char_length = prev_point - rl_point; dummy = (char *)xmalloc (char_length + 1); for (i = 0; i < char_length; i++) dummy[i] = rl_line_buffer[rl_point + i]; dummy[i] = '\0'; #else dummy[0] = rl_line_buffer[rl_point]; dummy[char_length = 1] = '\0'; #endif rl_delete_text (rl_point, rl_point + char_length); rl_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, count, MB_FIND_NONZERO); _rl_fix_point (0); rl_insert_text (dummy); rl_end_undo_group (); #if defined (HANDLE_MULTIBYTE) xfree (dummy); #endif return 0; } /* **************************************************************** */ /* */ /* Character Searching */ /* */ /* **************************************************************** */ int #if defined (HANDLE_MULTIBYTE) _rl_char_search_internal (count, dir, smbchar, len) int count, dir; char *smbchar; int len; #else _rl_char_search_internal (count, dir, schar) int count, dir, schar; #endif { int pos, inc; #if defined (HANDLE_MULTIBYTE) int prepos; #endif if (dir == 0) return -1; pos = rl_point; inc = (dir < 0) ? -1 : 1; while (count) { if ((dir < 0 && pos <= 0) || (dir > 0 && pos >= rl_end)) { rl_ding (); return -1; } #if defined (HANDLE_MULTIBYTE) pos = (inc > 0) ? _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY) : _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY); #else pos += inc; #endif do { #if defined (HANDLE_MULTIBYTE) if (_rl_is_mbchar_matched (rl_line_buffer, pos, rl_end, smbchar, len)) #else if (rl_line_buffer[pos] == schar) #endif { count--; if (dir < 0) rl_point = (dir == BTO) ? _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY) : pos; else rl_point = (dir == FTO) ? _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY) : pos; break; } #if defined (HANDLE_MULTIBYTE) prepos = pos; #endif } #if defined (HANDLE_MULTIBYTE) while ((dir < 0) ? (pos = _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY)) != prepos : (pos = _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY)) != prepos); #else while ((dir < 0) ? pos-- : ++pos < rl_end); #endif } return (0); } /* Search COUNT times for a character read from the current input stream. FDIR is the direction to search if COUNT is non-negative; otherwise the search goes in BDIR. So much is dependent on HANDLE_MULTIBYTE that there are two separate versions of this function. */ #if defined (HANDLE_MULTIBYTE) static int _rl_char_search (count, fdir, bdir) int count, fdir, bdir; { char mbchar[MB_LEN_MAX]; int mb_len; mb_len = _rl_read_mbchar (mbchar, MB_LEN_MAX); if (mb_len <= 0) return -1; if (count < 0) return (_rl_char_search_internal (-count, bdir, mbchar, mb_len)); else return (_rl_char_search_internal (count, fdir, mbchar, mb_len)); } #else /* !HANDLE_MULTIBYTE */ static int _rl_char_search (count, fdir, bdir) int count, fdir, bdir; { int c; RL_SETSTATE(RL_STATE_MOREINPUT); c = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); if (c < 0) return -1; if (count < 0) return (_rl_char_search_internal (-count, bdir, c)); else return (_rl_char_search_internal (count, fdir, c)); } #endif /* !HANDLE_MULTIBYTE */ #if defined (READLINE_CALLBACKS) static int _rl_char_search_callback (data) _rl_callback_generic_arg *data; { _rl_callback_func = 0; _rl_want_redisplay = 1; return (_rl_char_search (data->count, data->i1, data->i2)); } #endif int rl_char_search (count, key) int count, key; { #if defined (READLINE_CALLBACKS) if (RL_ISSTATE (RL_STATE_CALLBACK)) { _rl_callback_data = _rl_callback_data_alloc (count); _rl_callback_data->i1 = FFIND; _rl_callback_data->i2 = BFIND; _rl_callback_func = _rl_char_search_callback; return (0); } #endif return (_rl_char_search (count, FFIND, BFIND)); } int rl_backward_char_search (count, key) int count, key; { #if defined (READLINE_CALLBACKS) if (RL_ISSTATE (RL_STATE_CALLBACK)) { _rl_callback_data = _rl_callback_data_alloc (count); _rl_callback_data->i1 = BFIND; _rl_callback_data->i2 = FFIND; _rl_callback_func = _rl_char_search_callback; return (0); } #endif return (_rl_char_search (count, BFIND, FFIND)); } /* **************************************************************** */ /* */ /* The Mark and the Region. */ /* */ /* **************************************************************** */ /* Set the mark at POSITION. */ int _rl_set_mark_at_pos (position) int position; { if (position > rl_end) return -1; rl_mark = position; return 0; } /* A bindable command to set the mark. */ int rl_set_mark (count, key) int count, key; { return (_rl_set_mark_at_pos (rl_explicit_arg ? count : rl_point)); } /* Exchange the position of mark and point. */ int rl_exchange_point_and_mark (count, key) int count, key; { if (rl_mark > rl_end) rl_mark = -1; if (rl_mark == -1) { rl_ding (); return -1; } else SWAP (rl_point, rl_mark); return 0; } gdb-doc-7.6.2/readline/histfile.c0000644000175000017500000003304312250770610015624 0ustar zumbizumbi/* histfile.c - functions to manipulate the history file. */ /* Copyright (C) 1989-2010 Free Software Foundation, Inc. This file contains the GNU History Library (History), a set of routines for managing the text of previously typed lines. History 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 3 of the License, or (at your option) any later version. History 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 History. If not, see . */ /* The goal is to make the implementation transparent, so that you don't have to know what data types are used, just what functions you can call. I think I have done that. */ #define READLINE_LIBRARY #if defined (__TANDEM) # include #endif #if defined (HAVE_CONFIG_H) # include #endif #include #include #if ! defined (_MINIX) && defined (HAVE_SYS_FILE_H) # include #endif #include "posixstat.h" #include #if defined (HAVE_STDLIB_H) # include #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ #if defined (HAVE_UNISTD_H) # include #endif #include #if defined (__EMX__) # undef HAVE_MMAP #endif #ifdef HISTORY_USE_MMAP # include # ifdef MAP_FILE # define MAP_RFLAGS (MAP_FILE|MAP_PRIVATE) # define MAP_WFLAGS (MAP_FILE|MAP_SHARED) # else # define MAP_RFLAGS MAP_PRIVATE # define MAP_WFLAGS MAP_SHARED # endif # ifndef MAP_FAILED # define MAP_FAILED ((void *)-1) # endif #endif /* HISTORY_USE_MMAP */ /* If we're compiling for __EMX__ (OS/2) or __CYGWIN__ (cygwin32 environment on win 95/98/nt), we want to open files with O_BINARY mode so that there is no \n -> \r\n conversion performed. On other systems, we don't want to mess around with O_BINARY at all, so we ensure that it's defined to 0. */ #if defined (__EMX__) || defined (__CYGWIN__) # ifndef O_BINARY # define O_BINARY 0 # endif #else /* !__EMX__ && !__CYGWIN__ */ # undef O_BINARY # define O_BINARY 0 #endif /* !__EMX__ && !__CYGWIN__ */ #include #if !defined (errno) extern int errno; #endif /* !errno */ #include "history.h" #include "histlib.h" #include "rlshell.h" #include "xmalloc.h" /* If non-zero, we write timestamps to the history file in history_do_write() */ int history_write_timestamps = 0; /* Does S look like the beginning of a history timestamp entry? Placeholder for more extensive tests. */ #define HIST_TIMESTAMP_START(s) (*(s) == history_comment_char && isdigit ((s)[1]) ) /* Return the string that should be used in the place of this filename. This only matters when you don't specify the filename to read_history (), or write_history (). */ static char * history_filename (filename) const char *filename; { char *return_val; const char *home; int home_len; return_val = filename ? savestring (filename) : (char *)NULL; if (return_val) return (return_val); home = sh_get_env_value ("HOME"); if (home == 0) { #if 0 home = "."; home_len = 1; #else return (NULL); #endif } else home_len = strlen (home); return_val = (char *)xmalloc (2 + home_len + 8); /* strlen(".history") == 8 */ strcpy (return_val, home); return_val[home_len] = '/'; #if defined (__MSDOS__) strcpy (return_val + home_len + 1, "_history"); #else strcpy (return_val + home_len + 1, ".history"); #endif return (return_val); } /* Add the contents of FILENAME to the history list, a line at a time. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ int read_history (filename) const char *filename; { return (read_history_range (filename, 0, -1)); } /* Read a range of lines from FILENAME, adding them to the history list. Start reading at the FROM'th line and end at the TO'th. If FROM is zero, start at the beginning. If TO is less than FROM, read until the end of the file. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ int read_history_range (filename, from, to) const char *filename; int from, to; { register char *line_start, *line_end, *p; char *input, *buffer, *bufend, *last_ts; int file, current_line, chars_read; struct stat finfo; size_t file_size; #if defined (EFBIG) int overflow_errno = EFBIG; #elif defined (EOVERFLOW) int overflow_errno = EOVERFLOW; #else int overflow_errno = EIO; #endif buffer = last_ts = (char *)NULL; input = history_filename (filename); file = input ? open (input, O_RDONLY|O_BINARY, 0666) : -1; if ((file < 0) || (fstat (file, &finfo) == -1)) goto error_and_exit; file_size = (size_t)finfo.st_size; /* check for overflow on very large files */ if (file_size != finfo.st_size || file_size + 1 < file_size) { errno = overflow_errno; goto error_and_exit; } #ifdef HISTORY_USE_MMAP /* We map read/write and private so we can change newlines to NULs without affecting the underlying object. */ buffer = (char *)mmap (0, file_size, PROT_READ|PROT_WRITE, MAP_RFLAGS, file, 0); if ((void *)buffer == MAP_FAILED) { errno = overflow_errno; goto error_and_exit; } chars_read = file_size; #else buffer = (char *)malloc (file_size + 1); if (buffer == 0) { errno = overflow_errno; goto error_and_exit; } chars_read = read (file, buffer, file_size); #endif if (chars_read < 0) { error_and_exit: if (errno != 0) chars_read = errno; else chars_read = EIO; if (file >= 0) close (file); FREE (input); #ifndef HISTORY_USE_MMAP FREE (buffer); #endif return (chars_read); } close (file); /* Set TO to larger than end of file if negative. */ if (to < 0) to = chars_read; /* Start at beginning of file, work to end. */ bufend = buffer + chars_read; current_line = 0; /* Skip lines until we are at FROM. */ for (line_start = line_end = buffer; line_end < bufend && current_line < from; line_end++) if (*line_end == '\n') { p = line_end + 1; /* If we see something we think is a timestamp, continue with this line. We should check more extensively here... */ if (HIST_TIMESTAMP_START(p) == 0) current_line++; line_start = p; } /* If there are lines left to gobble, then gobble them now. */ for (line_end = line_start; line_end < bufend; line_end++) if (*line_end == '\n') { /* Change to allow Windows-like \r\n end of line delimiter. */ if (line_end > line_start && line_end[-1] == '\r') line_end[-1] = '\0'; else *line_end = '\0'; if (*line_start) { if (HIST_TIMESTAMP_START(line_start) == 0) { add_history (line_start); if (last_ts) { add_history_time (last_ts); last_ts = NULL; } } else { last_ts = line_start; current_line--; } } current_line++; if (current_line >= to) break; line_start = line_end + 1; } FREE (input); #ifndef HISTORY_USE_MMAP FREE (buffer); #else munmap (buffer, file_size); #endif return (0); } /* Truncate the history file FNAME, leaving only LINES trailing lines. If FNAME is NULL, then use ~/.history. Returns 0 on success, errno on failure. */ int history_truncate_file (fname, lines) const char *fname; int lines; { char *buffer, *filename, *bp, *bp1; /* bp1 == bp+1 */ int file, chars_read, rv; struct stat finfo; size_t file_size; buffer = (char *)NULL; filename = history_filename (fname); file = filename ? open (filename, O_RDONLY|O_BINARY, 0666) : -1; rv = 0; /* Don't try to truncate non-regular files. */ if (file == -1 || fstat (file, &finfo) == -1) { rv = errno; if (file != -1) close (file); goto truncate_exit; } if (S_ISREG (finfo.st_mode) == 0) { close (file); #ifdef EFTYPE rv = EFTYPE; #else rv = EINVAL; #endif goto truncate_exit; } file_size = (size_t)finfo.st_size; /* check for overflow on very large files */ if (file_size != finfo.st_size || file_size + 1 < file_size) { close (file); #if defined (EFBIG) rv = errno = EFBIG; #elif defined (EOVERFLOW) rv = errno = EOVERFLOW; #else rv = errno = EINVAL; #endif goto truncate_exit; } buffer = (char *)malloc (file_size + 1); if (buffer == 0) { close (file); goto truncate_exit; } chars_read = read (file, buffer, file_size); close (file); if (chars_read <= 0) { rv = (chars_read < 0) ? errno : 0; goto truncate_exit; } /* Count backwards from the end of buffer until we have passed LINES lines. bp1 is set funny initially. But since bp[1] can't be a comment character (since it's off the end) and *bp can't be both a newline and the history comment character, it should be OK. */ for (bp1 = bp = buffer + chars_read - 1; lines && bp > buffer; bp--) { if (*bp == '\n' && HIST_TIMESTAMP_START(bp1) == 0) lines--; bp1 = bp; } /* If this is the first line, then the file contains exactly the number of lines we want to truncate to, so we don't need to do anything. It's the first line if we don't find a newline between the current value of i and 0. Otherwise, write from the start of this line until the end of the buffer. */ for ( ; bp > buffer; bp--) { if (*bp == '\n' && HIST_TIMESTAMP_START(bp1) == 0) { bp++; break; } bp1 = bp; } /* Write only if there are more lines in the file than we want to truncate to. */ if (bp > buffer && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1)) { write (file, bp, chars_read - (bp - buffer)); #if defined (__BEOS__) /* BeOS ignores O_TRUNC. */ ftruncate (file, chars_read - (bp - buffer)); #endif close (file); } truncate_exit: FREE (buffer); xfree (filename); return rv; } /* Workhorse function for writing history. Writes NELEMENT entries from the history list to FILENAME. OVERWRITE is non-zero if you wish to replace FILENAME with the entries. */ static int history_do_write (filename, nelements, overwrite) const char *filename; int nelements, overwrite; { register int i; char *output; int file, mode, rv; #ifdef HISTORY_USE_MMAP size_t cursize; mode = overwrite ? O_RDWR|O_CREAT|O_TRUNC|O_BINARY : O_RDWR|O_APPEND|O_BINARY; #else mode = overwrite ? O_WRONLY|O_CREAT|O_TRUNC|O_BINARY : O_WRONLY|O_APPEND|O_BINARY; #endif output = history_filename (filename); file = output ? open (output, mode, 0600) : -1; rv = 0; if (file == -1) { FREE (output); return (errno); } #ifdef HISTORY_USE_MMAP cursize = overwrite ? 0 : lseek (file, 0, SEEK_END); #endif if (nelements > history_length) nelements = history_length; /* Build a buffer of all the lines to write, and write them in one syscall. Suggested by Peter Ho (peter@robosts.oxford.ac.uk). */ { HIST_ENTRY **the_history; /* local */ register int j; int buffer_size; char *buffer; the_history = history_list (); /* Calculate the total number of bytes to write. */ for (buffer_size = 0, i = history_length - nelements; i < history_length; i++) #if 0 buffer_size += 2 + HISTENT_BYTES (the_history[i]); #else { if (history_write_timestamps && the_history[i]->timestamp && the_history[i]->timestamp[0]) buffer_size += strlen (the_history[i]->timestamp) + 1; buffer_size += strlen (the_history[i]->line) + 1; } #endif /* Allocate the buffer, and fill it. */ #ifdef HISTORY_USE_MMAP if (ftruncate (file, buffer_size+cursize) == -1) goto mmap_error; buffer = (char *)mmap (0, buffer_size, PROT_READ|PROT_WRITE, MAP_WFLAGS, file, cursize); if ((void *)buffer == MAP_FAILED) { mmap_error: rv = errno; FREE (output); close (file); return rv; } #else buffer = (char *)malloc (buffer_size); if (buffer == 0) { rv = errno; FREE (output); close (file); return rv; } #endif for (j = 0, i = history_length - nelements; i < history_length; i++) { if (history_write_timestamps && the_history[i]->timestamp && the_history[i]->timestamp[0]) { strcpy (buffer + j, the_history[i]->timestamp); j += strlen (the_history[i]->timestamp); buffer[j++] = '\n'; } strcpy (buffer + j, the_history[i]->line); j += strlen (the_history[i]->line); buffer[j++] = '\n'; } #ifdef HISTORY_USE_MMAP if (msync (buffer, buffer_size, 0) != 0 || munmap (buffer, buffer_size) != 0) rv = errno; #else if (write (file, buffer, buffer_size) < 0) rv = errno; xfree (buffer); #endif } close (file); FREE (output); return (rv); } /* Append NELEMENT entries to FILENAME. The entries appended are from the end of the list minus NELEMENTs up to the end of the list. */ int append_history (nelements, filename) int nelements; const char *filename; { return (history_do_write (filename, nelements, HISTORY_APPEND)); } /* Overwrite FILENAME with the current history. If FILENAME is NULL, then write the history list to ~/.history. Values returned are as in read_history ().*/ int write_history (filename) const char *filename; { return (history_do_write (filename, history_length, HISTORY_OVERWRITE)); } gdb-doc-7.6.2/readline/support/0000755000175000017500000000000012266504075015371 5ustar zumbizumbigdb-doc-7.6.2/readline/support/mkdirs0000755000175000017500000000216512250770610016605 0ustar zumbizumbi#! /bin/sh # # mkdirs - a work-alike for `mkdir -p' # # Chet Ramey # chet@po.cwru.edu # Copyright (C) 1996-2002 Free Software Foundation, Inc. # # 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 3 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, see . for dir do test -d "$dir" && continue tomake=$dir while test -n "$dir" ; do # dir=${dir%/*} # dir=`expr "$dir" ':' '\(/.*\)/[^/]*'` if dir=`expr "$dir" ':' '\(.*\)/[^/]*'`; then tomake="$dir $tomake" else dir= fi done for d in $tomake do test -d "$d" && continue echo mkdir "$d" mkdir "$d" done done exit 0 gdb-doc-7.6.2/readline/support/mkinstalldirs0000755000175000017500000000370412250770610020174 0ustar zumbizumbi#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" 1>&2 exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # End: # mkinstalldirs ends here gdb-doc-7.6.2/readline/support/wcwidth.c0000644000175000017500000003324512250770610017206 0ustar zumbizumbi/* * This is an implementation of wcwidth() and wcswidth() (defined in * IEEE Std 1002.1-2001) for Unicode. * * http://www.opengroup.org/onlinepubs/007904975/functions/wcwidth.html * http://www.opengroup.org/onlinepubs/007904975/functions/wcswidth.html * * In fixed-width output devices, Latin characters all occupy a single * "cell" position of equal width, whereas ideographic CJK characters * occupy two such cells. Interoperability between terminal-line * applications and (teletype-style) character terminals using the * UTF-8 encoding requires agreement on which character should advance * the cursor by how many cell positions. No established formal * standards exist at present on which Unicode character shall occupy * how many cell positions on character terminals. These routines are * a first attempt of defining such behavior based on simple rules * applied to data provided by the Unicode Consortium. * * For some graphical characters, the Unicode standard explicitly * defines a character-cell width via the definition of the East Asian * FullWidth (F), Wide (W), Half-width (H), and Narrow (Na) classes. * In all these cases, there is no ambiguity about which width a * terminal shall use. For characters in the East Asian Ambiguous (A) * class, the width choice depends purely on a preference of backward * compatibility with either historic CJK or Western practice. * Choosing single-width for these characters is easy to justify as * the appropriate long-term solution, as the CJK practice of * displaying these characters as double-width comes from historic * implementation simplicity (8-bit encoded characters were displayed * single-width and 16-bit ones double-width, even for Greek, * Cyrillic, etc.) and not any typographic considerations. * * Much less clear is the choice of width for the Not East Asian * (Neutral) class. Existing practice does not dictate a width for any * of these characters. It would nevertheless make sense * typographically to allocate two character cells to characters such * as for instance EM SPACE or VOLUME INTEGRAL, which cannot be * represented adequately with a single-width glyph. The following * routines at present merely assign a single-cell width to all * neutral characters, in the interest of simplicity. This is not * entirely satisfactory and should be reconsidered before * establishing a formal standard in this area. At the moment, the * decision which Not East Asian (Neutral) characters should be * represented by double-width glyphs cannot yet be answered by * applying a simple rule from the Unicode database content. Setting * up a proper standard for the behavior of UTF-8 character terminals * will require a careful analysis not only of each Unicode character, * but also of each presentation form, something the author of these * routines has avoided to do so far. * * http://www.unicode.org/unicode/reports/tr11/ * * Markus Kuhn -- 2007-05-26 (Unicode 5.0) * * Permission to use, copy, modify, and distribute this software * for any purpose and without fee is hereby granted. The author * disclaims all warranties with regard to this software. * * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c */ #ifdef __GO32__ # include #endif #include struct interval { int first; int last; }; /* auxiliary function for binary search in interval table */ static int bisearch(wchar_t ucs, const struct interval *table, int max) { int min = 0; int mid; if (ucs < table[0].first || ucs > table[max].last) return 0; while (max >= min) { mid = (min + max) / 2; if (ucs > table[mid].last) min = mid + 1; else if (ucs < table[mid].first) max = mid - 1; else return 1; } return 0; } /* The following two functions define the column width of an ISO 10646 * character as follows: * * - The null character (U+0000) has a column width of 0. * * - Other C0/C1 control characters and DEL will lead to a return * value of -1. * * - Non-spacing and enclosing combining characters (general * category code Mn or Me in the Unicode database) have a * column width of 0. * * - SOFT HYPHEN (U+00AD) has a column width of 1. * * - Other format characters (general category code Cf in the Unicode * database) and ZERO WIDTH SPACE (U+200B) have a column width of 0. * * - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF) * have a column width of 0. * * - Spacing characters in the East Asian Wide (W) or East Asian * Full-width (F) category as defined in Unicode Technical * Report #11 have a column width of 2. * * - All remaining characters (including all printable * ISO 8859-1 and WGL4 characters, Unicode control characters, * etc.) have a column width of 1. * * This implementation assumes that wchar_t characters are encoded * in ISO 10646. */ int mk_wcwidth(wchar_t ucs) { /* sorted list of non-overlapping intervals of non-spacing characters */ /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */ static const struct interval combining[] = { { 0x0300, 0x036F }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 }, { 0x0591, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 }, { 0x05C4, 0x05C5 }, { 0x05C7, 0x05C7 }, { 0x0600, 0x0603 }, { 0x0610, 0x0615 }, { 0x064B, 0x065E }, { 0x0670, 0x0670 }, { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED }, { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A }, { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, { 0x0901, 0x0902 }, { 0x093C, 0x093C }, { 0x0941, 0x0948 }, { 0x094D, 0x094D }, { 0x0951, 0x0954 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 }, { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD }, { 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C }, { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D }, { 0x0A70, 0x0A71 }, { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC }, { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD }, { 0x0AE2, 0x0AE3 }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C }, { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, { 0x0B4D, 0x0B4D }, { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 }, { 0x0BC0, 0x0BC0 }, { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 }, { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0CBC, 0x0CBC }, { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD }, { 0x0CE2, 0x0CE3 }, { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D }, { 0x0DCA, 0x0DCA }, { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 }, { 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E }, { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC }, { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 }, { 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E }, { 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 }, { 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 }, { 0x1032, 0x1032 }, { 0x1036, 0x1037 }, { 0x1039, 0x1039 }, { 0x1058, 0x1059 }, { 0x1160, 0x11FF }, { 0x135F, 0x135F }, { 0x1712, 0x1714 }, { 0x1732, 0x1734 }, { 0x1752, 0x1753 }, { 0x1772, 0x1773 }, { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD }, { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD }, { 0x180B, 0x180D }, { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 }, { 0x1927, 0x1928 }, { 0x1932, 0x1932 }, { 0x1939, 0x193B }, { 0x1A17, 0x1A18 }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 }, { 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, { 0x1B42, 0x1B42 }, { 0x1B6B, 0x1B73 }, { 0x1DC0, 0x1DCA }, { 0x1DFE, 0x1DFF }, { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2063 }, { 0x206A, 0x206F }, { 0x20D0, 0x20EF }, { 0x302A, 0x302F }, { 0x3099, 0x309A }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B }, { 0xA825, 0xA826 }, { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F }, { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB }, { 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F }, { 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x1D167, 0x1D169 }, { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD }, { 0x1D242, 0x1D244 }, { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F }, { 0xE0100, 0xE01EF } }; /* test for 8-bit control characters */ if (ucs == 0) return 0; if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0)) return -1; /* binary search in table of non-spacing characters */ if (bisearch(ucs, combining, sizeof(combining) / sizeof(struct interval) - 1)) return 0; /* if we arrive here, ucs is not a combining or C0/C1 control character */ return 1 + (ucs >= 0x1100 && (ucs <= 0x115f || /* Hangul Jamo init. consonants */ ucs == 0x2329 || ucs == 0x232a || (ucs >= 0x2e80 && ucs <= 0xa4cf && ucs != 0x303f) || /* CJK ... Yi */ (ucs >= 0xac00 && ucs <= 0xd7a3) || /* Hangul Syllables */ (ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */ (ucs >= 0xfe10 && ucs <= 0xfe19) || /* Vertical forms */ (ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */ (ucs >= 0xff00 && ucs <= 0xff60) || /* Fullwidth Forms */ (ucs >= 0xffe0 && ucs <= 0xffe6) || (ucs >= 0x20000 && ucs <= 0x2fffd) || (ucs >= 0x30000 && ucs <= 0x3fffd))); } int mk_wcswidth(const wchar_t *pwcs, size_t n) { int w, width = 0; for (;*pwcs && n-- > 0; pwcs++) if ((w = mk_wcwidth(*pwcs)) < 0) return -1; else width += w; return width; } /* * The following functions are the same as mk_wcwidth() and * mk_wcswidth(), except that spacing characters in the East Asian * Ambiguous (A) category as defined in Unicode Technical Report #11 * have a column width of 2. This variant might be useful for users of * CJK legacy encodings who want to migrate to UCS without changing * the traditional terminal character-width behaviour. It is not * otherwise recommended for general use. */ int mk_wcwidth_cjk(wchar_t ucs) { /* sorted list of non-overlapping intervals of East Asian Ambiguous * characters, generated by "uniset +WIDTH-A -cat=Me -cat=Mn -cat=Cf c" */ static const struct interval ambiguous[] = { { 0x00A1, 0x00A1 }, { 0x00A4, 0x00A4 }, { 0x00A7, 0x00A8 }, { 0x00AA, 0x00AA }, { 0x00AE, 0x00AE }, { 0x00B0, 0x00B4 }, { 0x00B6, 0x00BA }, { 0x00BC, 0x00BF }, { 0x00C6, 0x00C6 }, { 0x00D0, 0x00D0 }, { 0x00D7, 0x00D8 }, { 0x00DE, 0x00E1 }, { 0x00E6, 0x00E6 }, { 0x00E8, 0x00EA }, { 0x00EC, 0x00ED }, { 0x00F0, 0x00F0 }, { 0x00F2, 0x00F3 }, { 0x00F7, 0x00FA }, { 0x00FC, 0x00FC }, { 0x00FE, 0x00FE }, { 0x0101, 0x0101 }, { 0x0111, 0x0111 }, { 0x0113, 0x0113 }, { 0x011B, 0x011B }, { 0x0126, 0x0127 }, { 0x012B, 0x012B }, { 0x0131, 0x0133 }, { 0x0138, 0x0138 }, { 0x013F, 0x0142 }, { 0x0144, 0x0144 }, { 0x0148, 0x014B }, { 0x014D, 0x014D }, { 0x0152, 0x0153 }, { 0x0166, 0x0167 }, { 0x016B, 0x016B }, { 0x01CE, 0x01CE }, { 0x01D0, 0x01D0 }, { 0x01D2, 0x01D2 }, { 0x01D4, 0x01D4 }, { 0x01D6, 0x01D6 }, { 0x01D8, 0x01D8 }, { 0x01DA, 0x01DA }, { 0x01DC, 0x01DC }, { 0x0251, 0x0251 }, { 0x0261, 0x0261 }, { 0x02C4, 0x02C4 }, { 0x02C7, 0x02C7 }, { 0x02C9, 0x02CB }, { 0x02CD, 0x02CD }, { 0x02D0, 0x02D0 }, { 0x02D8, 0x02DB }, { 0x02DD, 0x02DD }, { 0x02DF, 0x02DF }, { 0x0391, 0x03A1 }, { 0x03A3, 0x03A9 }, { 0x03B1, 0x03C1 }, { 0x03C3, 0x03C9 }, { 0x0401, 0x0401 }, { 0x0410, 0x044F }, { 0x0451, 0x0451 }, { 0x2010, 0x2010 }, { 0x2013, 0x2016 }, { 0x2018, 0x2019 }, { 0x201C, 0x201D }, { 0x2020, 0x2022 }, { 0x2024, 0x2027 }, { 0x2030, 0x2030 }, { 0x2032, 0x2033 }, { 0x2035, 0x2035 }, { 0x203B, 0x203B }, { 0x203E, 0x203E }, { 0x2074, 0x2074 }, { 0x207F, 0x207F }, { 0x2081, 0x2084 }, { 0x20AC, 0x20AC }, { 0x2103, 0x2103 }, { 0x2105, 0x2105 }, { 0x2109, 0x2109 }, { 0x2113, 0x2113 }, { 0x2116, 0x2116 }, { 0x2121, 0x2122 }, { 0x2126, 0x2126 }, { 0x212B, 0x212B }, { 0x2153, 0x2154 }, { 0x215B, 0x215E }, { 0x2160, 0x216B }, { 0x2170, 0x2179 }, { 0x2190, 0x2199 }, { 0x21B8, 0x21B9 }, { 0x21D2, 0x21D2 }, { 0x21D4, 0x21D4 }, { 0x21E7, 0x21E7 }, { 0x2200, 0x2200 }, { 0x2202, 0x2203 }, { 0x2207, 0x2208 }, { 0x220B, 0x220B }, { 0x220F, 0x220F }, { 0x2211, 0x2211 }, { 0x2215, 0x2215 }, { 0x221A, 0x221A }, { 0x221D, 0x2220 }, { 0x2223, 0x2223 }, { 0x2225, 0x2225 }, { 0x2227, 0x222C }, { 0x222E, 0x222E }, { 0x2234, 0x2237 }, { 0x223C, 0x223D }, { 0x2248, 0x2248 }, { 0x224C, 0x224C }, { 0x2252, 0x2252 }, { 0x2260, 0x2261 }, { 0x2264, 0x2267 }, { 0x226A, 0x226B }, { 0x226E, 0x226F }, { 0x2282, 0x2283 }, { 0x2286, 0x2287 }, { 0x2295, 0x2295 }, { 0x2299, 0x2299 }, { 0x22A5, 0x22A5 }, { 0x22BF, 0x22BF }, { 0x2312, 0x2312 }, { 0x2460, 0x24E9 }, { 0x24EB, 0x254B }, { 0x2550, 0x2573 }, { 0x2580, 0x258F }, { 0x2592, 0x2595 }, { 0x25A0, 0x25A1 }, { 0x25A3, 0x25A9 }, { 0x25B2, 0x25B3 }, { 0x25B6, 0x25B7 }, { 0x25BC, 0x25BD }, { 0x25C0, 0x25C1 }, { 0x25C6, 0x25C8 }, { 0x25CB, 0x25CB }, { 0x25CE, 0x25D1 }, { 0x25E2, 0x25E5 }, { 0x25EF, 0x25EF }, { 0x2605, 0x2606 }, { 0x2609, 0x2609 }, { 0x260E, 0x260F }, { 0x2614, 0x2615 }, { 0x261C, 0x261C }, { 0x261E, 0x261E }, { 0x2640, 0x2640 }, { 0x2642, 0x2642 }, { 0x2660, 0x2661 }, { 0x2663, 0x2665 }, { 0x2667, 0x266A }, { 0x266C, 0x266D }, { 0x266F, 0x266F }, { 0x273D, 0x273D }, { 0x2776, 0x277F }, { 0xE000, 0xF8FF }, { 0xFFFD, 0xFFFD }, { 0xF0000, 0xFFFFD }, { 0x100000, 0x10FFFD } }; /* binary search in table of non-spacing characters */ if (bisearch(ucs, ambiguous, sizeof(ambiguous) / sizeof(struct interval) - 1)) return 2; return mk_wcwidth(ucs); } int mk_wcswidth_cjk(const wchar_t *pwcs, size_t n) { int w, width = 0; for (;*pwcs && n-- > 0; pwcs++) if ((w = mk_wcwidth_cjk(*pwcs)) < 0) return -1; else width += w; return width; } gdb-doc-7.6.2/readline/support/shlib-install0000755000175000017500000001165312250770610020063 0ustar zumbizumbi#! /bin/sh # # shlib-install - install a shared library and do any necessary host-specific # post-installation configuration (like ldconfig) # # usage: shlib-install [-D] -O host_os [-V host_vendor] -d installation-dir [-b bin-dir] -i install-prog [-U] library # # Chet Ramey # chet@po.cwru.edu # # defaults # INSTALLDIR=/usr/local/lib LDCONFIG=ldconfig PROGNAME=`basename $0` USAGE="$PROGNAME [-D] -O host_os [-V host_vendor] -d installation-dir [-b bin-dir] -i install-prog [-U] library" # process options while [ $# -gt 0 ]; do case "$1" in -O) shift; host_os="$1"; shift ;; -V) shift; host_vendor="$1"; shift ;; -d) shift; INSTALLDIR="$1"; shift ;; -b) shift; BINDIR="$1" ; shift ;; -i) shift; INSTALLPROG="$1" ; shift ;; -D) echo=echo ; shift ;; -U) uninstall=true ; shift ;; -*) echo "$USAGE" >&2 ; exit 2;; *) break ;; esac done # set install target name LIBNAME="$1" if [ -z "$LIBNAME" ]; then echo "$USAGE" >&2 exit 2 fi OLDSUFF=old MV=mv RM="rm -f" LN="ln -s" # pre-install if [ -z "$uninstall" ]; then ${echo} $RM ${INSTALLDIR}/${LIBNAME}.${OLDSUFF} if [ -f "$INSTALLDIR/$LIBNAME" ]; then ${echo} $MV $INSTALLDIR/$LIBNAME ${INSTALLDIR}/${LIBNAME}.${OLDSUFF} fi fi # install/uninstall if [ -z "$uninstall" ] ; then ${echo} eval ${INSTALLPROG} $LIBNAME ${INSTALLDIR}/${LIBNAME} else ${echo} ${RM} ${INSTALLDIR}/${LIBNAME} fi # post-install/uninstall # HP-UX and Darwin/MacOS X require that a shared library have execute permission # Linux does, too, and ldd warns about it # Cygwin installs both a dll (which must go in $BINDIR) and an implicit # link library (in $libdir) case "$host_os" in hpux*|darwin*|macosx*|linux*) if [ -z "$uninstall" ]; then chmod 555 ${INSTALLDIR}/${LIBNAME} fi ;; cygwin*|mingw*) IMPLIBNAME=`echo ${LIBNAME} \ | sed -e 's,^cyg,lib,' -e 's,[0-9]*.dll$,.dll.a,'` if [ -z "$uninstall" ]; then ${echo} $RM ${BINDIR}/${LIBNAME}.${OLDSUFF} if [ -f "$BINDIR/$LIBNAME" ]; then ${echo} $MV $BINDIR/$LIBNAME $BINDIR/$LIBNAME.$OLDSUFF fi ${echo} $MV ${INSTALLDIR}/${LIBNAME} ${BINDIR}/${LIBNAME} ${echo} chmod a+x ${BINDIR}/${LIBNAME} ${echo} eval ${INSTALLPROG} ${LIBNAME}.a \ ${INSTALLDIR}/${IMPLIBNAME} else ${echo} ${RM} ${BINDIR}/${LIBNAME} ${echo} ${RM} ${INSTALLDIR}/${IMPLIBNAME} fi ;; *) ;; esac case "$LIBNAME" in *.*.[0-9].[0-9]) # libname.so.M.N LINK2=`echo $LIBNAME | sed 's:\(.*\..*\.[0-9]\)\.[0-9]:\1:'` # libname.so.M LINK1=`echo $LIBNAME | sed 's:\(.*\..*\)\.[0-9]\.[0-9]:\1:'` # libname.so ;; *.*.[0-9]) # libname.so.M LINK1=`echo $LIBNAME | sed 's:\(.*\..*\)\.[0-9]:\1:'` # libname.so ;; *.[0-9]) # libname.M LINK1=`echo $LIBNAME | sed 's:\(.*\)\.[0-9]:\1:'` # libname ;; *.[0-9].[0-9].dylib) # libname.M.N.dylib LINK2=`echo $LIBNAME | sed 's:\(.*\.[0-9]\)\.[0-9]:\1:'` # libname.M.dylib LINK1=`echo $LIBNAME | sed 's:\(.*\)\.[0-9]\.[0-9]:\1:'` # libname.dylib esac INSTALL_LINK1='${echo} cd $INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK1' INSTALL_LINK2='${echo} cd $INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK2' # # Create symlinks to the installed library. This section is incomplete. # case "$host_os-$host_vendor" in *linux*|freebsd*-gentoo) # libname.so.M -> libname.so.M.N ${echo} ${RM} ${INSTALLDIR}/$LINK2 if [ -z "$uninstall" ]; then eval $INSTALL_LINK2 fi # libname.so -> libname.so.M ${echo} ${RM} ${INSTALLDIR}/$LINK1 if [ -z "$uninstall" ]; then ${echo} cd $INSTALLDIR && ${echo} ${LN} $LINK2 $LINK1 fi ;; bsdi4*|*gnu*|darwin*|macosx*|netbsd*) # libname.so.M -> libname.so.M.N ${echo} ${RM} ${INSTALLDIR}/$LINK2 if [ -z "$uninstall" ]; then eval $INSTALL_LINK2 fi # libname.so -> libname.so.M.N ${echo} ${RM} ${INSTALLDIR}/$LINK1 if [ -z "$uninstall" ]; then eval $INSTALL_LINK1 fi ;; solaris2*|aix4.[2-9]*|aix[5-9]*|osf*|irix[56]*|sysv[45]*|dgux*|interix*) # libname.so -> libname.so.M ${echo} ${RM} ${INSTALLDIR}/$LINK1 if [ -z "$uninstall" ]; then eval $INSTALL_LINK1 fi ;; # FreeBSD 3.x and above can have either a.out or ELF shared libraries freebsd3*|freebsdaout*) if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then # libname.so -> libname.so.M ${echo} ${RM} ${INSTALLDIR}/$LINK1 if [ -z "$uninstall" ]; then eval $INSTALL_LINK1 fi else # libname.so.M -> libname.so.M.N ${echo} ${RM} ${INSTALLDIR}/$LINK2 if [ -z "$uninstall" ]; then eval $INSTALL_LINK2 fi # libname.so -> libname.so.M.N ${echo} ${RM} ${INSTALLDIR}/$LINK1 if [ -z "$uninstall" ]; then eval $INSTALL_LINK1 fi fi ;; freebsd[4-9]*|freebsdelf*|dragonfly*) # libname.so -> libname.so.M ${echo} ${RM} ${INSTALLDIR}/$LINK1 if [ -z "$uninstall" ]; then eval $INSTALL_LINK1 fi ;; hpux1*) # libname.sl -> libname.M ${echo} ${RM} ${INSTALLDIR}/$LINK1.sl if [ -z "$uninstall" ]; then eval $INSTALL_LINK1 fi ;; cygwin*|mingw*) # Links to .dlls don't work. Hence shobj-conf used DLLVERSION.dll # instead of so.SHLIB_MAJOR.SHLIB_MINOR. The postinstall above # took care of everything else. ;; *) ;; esac exit 0 gdb-doc-7.6.2/readline/support/shobj-conf0000755000175000017500000003351712250770610017351 0ustar zumbizumbi#! /bin/sh # # shobj-conf -- output a series of variable assignments to be substituted # into a Makefile by configure which specify system-dependent # information for creating shared objects that may be loaded # into bash with `enable -f' # # usage: shobj-conf [-C compiler] -c host_cpu -o host_os -v host_vendor # # Chet Ramey # chet@po.cwru.edu # Copyright (C) 1996-2009 Free Software Foundation, Inc. # # This file is part of GNU Bash, the Bourne Again SHell. # # 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 3 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, see . # # # defaults # SHOBJ_STATUS=supported SHLIB_STATUS=supported SHOBJ_CC=cc SHOBJ_CFLAGS= SHOBJ_LD= SHOBJ_LDFLAGS= SHOBJ_XLDFLAGS= SHOBJ_LIBS= SHLIB_XLDFLAGS= SHLIB_LIBS= SHLIB_DOT='.' SHLIB_LIBPREF='lib' SHLIB_LIBSUFF='so' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF)' SHLIB_DLLVERSION='$(SHLIB_MAJOR)' PROGNAME=`basename $0` USAGE="$PROGNAME [-C compiler] -c host_cpu -o host_os -v host_vendor" while [ $# -gt 0 ]; do case "$1" in -C) shift; SHOBJ_CC="$1"; shift ;; -c) shift; host_cpu="$1"; shift ;; -o) shift; host_os="$1"; shift ;; -v) shift; host_vendor="$1"; shift ;; *) echo "$USAGE" >&2 ; exit 2;; esac done case "${host_os}-${SHOBJ_CC}-${host_vendor}" in sunos4*-*gcc*) SHOBJ_CFLAGS=-fpic SHOBJ_LD=/usr/bin/ld SHOBJ_LDFLAGS='-assert pure-text' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' ;; sunos4*) SHOBJ_CFLAGS=-pic SHOBJ_LD=/usr/bin/ld SHOBJ_LDFLAGS='-assert pure-text' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' ;; sunos5*-*gcc*|solaris2*-*gcc*) SHOBJ_LD='${CC}' ld_used=`gcc -print-prog-name=ld` if ${ld_used} -V 2>&1 | grep GNU >/dev/null 2>&1; then # This line works for the GNU ld SHOBJ_LDFLAGS='-shared -Wl,-h,$@' # http://sourceware.org/ml/binutils/2001-08/msg00361.html SHOBJ_CFLAGS=-fPIC else # This line works for the Solaris linker in /usr/ccs/bin/ld SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@' SHOBJ_CFLAGS=-fpic fi # SHLIB_XLDFLAGS='-R $(libdir)' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; sunos5*|solaris2*) SHOBJ_CFLAGS='-K pic' SHOBJ_LD=/usr/ccs/bin/ld SHOBJ_LDFLAGS='-G -dy -z text -i -h $@' # SHLIB_XLDFLAGS='-R $(libdir)' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; # All versions of Linux (including Gentoo/FreeBSD) or the semi-mythical GNU Hurd. linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo) SHOBJ_CFLAGS=-fPIC SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' ;; freebsd2*) SHOBJ_CFLAGS=-fpic SHOBJ_LD=ld SHOBJ_LDFLAGS='-x -Bshareable' SHLIB_XLDFLAGS='-R$(libdir)' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' ;; # FreeBSD-3.x ELF freebsd3*|freebsdaout*) SHOBJ_CFLAGS=-fPIC SHOBJ_LD='${CC}' if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' else SHOBJ_LDFLAGS='-shared' SHLIB_XLDFLAGS='-R$(libdir)' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' fi ;; # FreeBSD-4.x and later have only ELF freebsd[4-9]*|freebsdelf*|dragonfly*) SHOBJ_CFLAGS=-fPIC SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; # Darwin/MacOS X darwin[89]*|darwin10*) SHOBJ_STATUS=supported SHLIB_STATUS=supported SHOBJ_CFLAGS='-fno-common' SHOBJ_LD='MACOSX_DEPLOYMENT_TARGET=10.3 ${CC}' SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)' SHLIB_LIBSUFF='dylib' SHOBJ_LDFLAGS='-dynamiclib -dynamic -undefined dynamic_lookup -arch_only `/usr/bin/arch`' SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1 ;; darwin*|macosx*) SHOBJ_STATUS=unsupported SHLIB_STATUS=supported SHOBJ_CFLAGS='-fno-common' SHOBJ_LD='${CC}' SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)' SHLIB_LIBSUFF='dylib' case "${host_os}" in darwin[789]*|darwin10*) SHOBJ_LDFLAGS='' SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' ;; *) SHOBJ_LDFLAGS='-dynamic' SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' ;; esac SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1 ;; openbsd*|netbsd*) SHOBJ_CFLAGS=-fPIC SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared' SHLIB_XLDFLAGS='-R$(libdir)' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' ;; bsdi2*) SHOBJ_CC=shlicc2 SHOBJ_CFLAGS= SHOBJ_LD=ld SHOBJ_LDFLAGS=-r SHOBJ_LIBS=-lc_s.2.1.0 # BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in # the ass -- they require changing {/usr/lib,etc}/shlib.map on # each system, and the library creation process is byzantine SHLIB_STATUS=unsupported ;; bsdi3*) SHOBJ_CC=shlicc2 SHOBJ_CFLAGS= SHOBJ_LD=ld SHOBJ_LDFLAGS=-r SHOBJ_LIBS=-lc_s.3.0.0 # BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in # the ass -- they require changing {/usr/lib,etc}/shlib.map on # each system, and the library creation process is byzantine SHLIB_STATUS=unsupported ;; bsdi4*) # BSD/OS 4.x now supports ELF and SunOS-style dynamically-linked # shared libraries. gcc 2.x is the standard compiler, and the # `normal' gcc options should work as they do in Linux. SHOBJ_CFLAGS=-fPIC SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' ;; osf*-*gcc*) # Fix to use gcc linker driver from bfischer@TechFak.Uni-Bielefeld.DE SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' SHLIB_XLDFLAGS='-rpath $(libdir)' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; osf*) SHOBJ_LD=ld SHOBJ_LDFLAGS='-shared -soname $@ -expect_unresolved "*"' SHLIB_XLDFLAGS='-rpath $(libdir)' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; aix4.[2-9]*-*gcc*|aix[5-9].*-*gcc*) # lightly tested by jik@cisco.com SHOBJ_CFLAGS=-fpic SHOBJ_LD='ld' SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall' SHOBJ_XLDFLAGS='-G' SHLIB_XLDFLAGS='-bM:SRE' SHLIB_LIBS='-lcurses -lc' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; aix4.[2-9]*|aix[5-9].*) SHOBJ_CFLAGS=-K SHOBJ_LD='ld' SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall' SHOBJ_XLDFLAGS='-G' SHLIB_XLDFLAGS='-bM:SRE' SHLIB_LIBS='-lcurses -lc' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; # # THE FOLLOWING ARE UNTESTED -- and some may not support the dlopen interface # irix[56]*-*gcc*) SHOBJ_CFLAGS='-fpic' SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; irix[56]*) SHOBJ_CFLAGS='-K PIC' SHOBJ_LD=ld # SHOBJ_LDFLAGS='-call_shared -hidden_symbol -no_unresolved -soname $@' # Change from David Kaelbling . If you have problems, # remove the `-no_unresolved' SHOBJ_LDFLAGS='-shared -no_unresolved -soname $@' SHLIB_XLDFLAGS='-rpath $(libdir)' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; hpux9*-*gcc*) # must use gcc; the bundled cc cannot compile PIC code SHOBJ_CFLAGS='-fpic' SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s' SHLIB_XLDFLAGS='-Wl,+b,$(libdir)' SHLIB_LIBSUFF='sl' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; hpux9*) SHOBJ_STATUS=unsupported SHLIB_STATUS=unsupported # If you are using the HP ANSI C compiler, you can uncomment and use # this code (I have not tested it) # SHOBJ_STATUS=supported # SHLIB_STATUS=supported # # SHOBJ_CFLAGS='+z' # SHOBJ_LD='ld' # SHOBJ_LDFLAGS='-b +s' # # SHLIB_XLDFLAGS='+b $(libdir)' # SHLIB_LIBSUFF='sl' # SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; hpux10*-*gcc*) # must use gcc; the bundled cc cannot compile PIC code SHOBJ_CFLAGS='-fpic' SHOBJ_LD='${CC}' # if you have problems linking here, moving the `-Wl,+h,$@' from # SHLIB_XLDFLAGS to SHOBJ_LDFLAGS has been reported to work SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s' SHLIB_XLDFLAGS='-Wl,+h,$@ -Wl,+b,$(libdir)' SHLIB_LIBSUFF='sl' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; hpux10*) SHOBJ_STATUS=unsupported SHLIB_STATUS=unsupported # If you are using the HP ANSI C compiler, you can uncomment and use # this code (I have not tested it) # SHOBJ_STATUS=supported # SHLIB_STATUS=supported # # SHOBJ_CFLAGS='+z' # SHOBJ_LD='ld' # SHOBJ_LDFLAGS='-b +s +h $@' # # SHLIB_XLDFLAGS='+b $(libdir)' # SHLIB_LIBSUFF='sl' # SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; hpux11*-*gcc*) # must use gcc; the bundled cc cannot compile PIC code SHOBJ_CFLAGS='-fpic' SHOBJ_LD='${CC}' # SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,-B,symbolic -Wl,+s -Wl,+std -Wl,+h,$@' SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s -Wl,+h,$@' SHLIB_XLDFLAGS='-Wl,+b,$(libdir)' SHLIB_LIBSUFF='sl' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; hpux11*) SHOBJ_STATUS=unsupported SHLIB_STATUS=unsupported # If you are using the HP ANSI C compiler, you can uncomment and use # this code (I have not tested it) # SHOBJ_STATUS=supported # SHLIB_STATUS=supported # # SHOBJ_CFLAGS='+z' # SHOBJ_LD='ld' # SHOBJ_LDFLAGS='-b +s +h $@' # # SHLIB_XLDFLAGS='+b $(libdir)' # SHLIB_LIBSUFF='sl' # SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; sysv4*-*gcc*) SHOBJ_CFLAGS=-shared SHOBJ_LDFLAGS='-shared -h $@' SHOBJ_LD='${CC}' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; sysv4*) SHOBJ_CFLAGS='-K PIC' SHOBJ_LD=ld SHOBJ_LDFLAGS='-dy -z text -G -h $@' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; sco3.2v5*-*gcc*) SHOBJ_CFLAGS='-fpic' # DEFAULTS TO ELF SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; sco3.2v5*) SHOBJ_CFLAGS='-K pic -b elf' SHOBJ_LD=ld SHOBJ_LDFLAGS='-G -b elf -dy -z text -h $@' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; sysv5uw7*-*gcc*) SHOBJ_CFLAGS='-fpic' SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; sysv5uw7*) SHOBJ_CFLAGS='-K PIC' SHOBJ_LD=ld SHOBJ_LDFLAGS='-G -dy -z text -h $@' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; sysv5UnixWare*-*gcc*) SHOBJ_CFLAGS=-fpic SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; sysv5UnixWare*) SHOBJ_CFLAGS='-K PIC' SHOBJ_LD=ld SHOBJ_LDFLAGS='-G -dy -z text -h $@' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; sysv5OpenUNIX*-*gcc*) SHOBJ_CFLAGS=-fpic SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; sysv5OpenUNIX*) SHOBJ_CFLAGS='-K PIC' SHOBJ_LD=ld SHOBJ_LDFLAGS='-G -dy -z text -h $@' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; dgux*-*gcc*) SHOBJ_CFLAGS=-fpic SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; dgux*) SHOBJ_CFLAGS='-K pic' SHOBJ_LD=ld SHOBJ_LDFLAGS='-G -dy -h $@' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; msdos*) SHOBJ_STATUS=unsupported SHLIB_STATUS=unsupported ;; cygwin*) SHOBJ_LD='$(CC)' SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a' SHLIB_LIBPREF='cyg' SHLIB_LIBSUFF='dll' SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)' SHLIB_LIBS='$(TERMCAP_LIB)' SHLIB_DOT= # For official cygwin releases, DLLVERSION will be defined in the # environment of configure, and will be incremented any time the API # changes in a non-backwards compatible manner. Otherwise, it is just # SHLIB_MAJOR. if [ -n "$DLLVERSION" ] ; then SHLIB_DLLVERSION="$DLLVERSION" fi ;; mingw*) SHOBJ_LD='$(CC)' SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a' SHLIB_LIBSUFF='dll' SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)' SHLIB_LIBS='$(TERMCAP_LIB)' SHLIB_DOT= # For official cygwin releases, DLLVERSION will be defined in the # environment of configure, and will be incremented any time the API # changes in a non-backwards compatible manner. Otherwise, it is just # SHLIB_MAJOR. if [ -n "$DLLVERSION" ] ; then SHLIB_DLLVERSION="$DLLVERSION" fi ;; # # Rely on correct gcc configuration for everything else # *-*gcc*) SHOBJ_CFLAGS=-fpic SHOBJ_LD='${CC}' SHOBJ_LDFLAGS='-shared' SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' ;; *) SHOBJ_STATUS=unsupported SHLIB_STATUS=unsupported ;; esac echo SHOBJ_CC=\'"$SHOBJ_CC"\' echo SHOBJ_CFLAGS=\'"$SHOBJ_CFLAGS"\' echo SHOBJ_LD=\'"$SHOBJ_LD"\' echo SHOBJ_LDFLAGS=\'"$SHOBJ_LDFLAGS"\' echo SHOBJ_XLDFLAGS=\'"$SHOBJ_XLDFLAGS"\' echo SHOBJ_LIBS=\'"$SHOBJ_LIBS"\' echo SHLIB_XLDFLAGS=\'"$SHLIB_XLDFLAGS"\' echo SHLIB_LIBS=\'"$SHLIB_LIBS"\' echo SHLIB_DOT=\'"$SHLIB_DOT"\' echo SHLIB_LIBPREF=\'"$SHLIB_LIBPREF"\' echo SHLIB_LIBSUFF=\'"$SHLIB_LIBSUFF"\' echo SHLIB_LIBVERSION=\'"$SHLIB_LIBVERSION"\' echo SHLIB_DLLVERSION=\'"$SHLIB_DLLVERSION"\' echo SHOBJ_STATUS=\'"$SHOBJ_STATUS"\' echo SHLIB_STATUS=\'"$SHLIB_STATUS"\' exit 0 gdb-doc-7.6.2/readline/support/config.sub0000755000175000017500000010151712250770610017352 0ustar zumbizumbi#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 20098 # Free Software Foundation, Inc. timestamp='2008-03-26' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gdb-doc-7.6.2/readline/support/config.guess0000755000175000017500000012770012250770610017711 0ustar zumbizumbi#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2008-03-12' # This file 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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: gdb-doc-7.6.2/readline/support/mkdist0000755000175000017500000000471312250770610016610 0ustar zumbizumbi#! /bin/bash - # # mkdist - make a distribution directory from a master manifest file # # usage: mkdist [-m manifest] [-s srcdir] [-r rootname] [-v] version # # SRCDIR defaults to src # MANIFEST defaults to $SRCDIR/MANIFEST # # Chet Ramey # chet@po.cwru.edu # Copyright (C) 1996-2002 Free Software Foundation, Inc. # # 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 3 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, see . # SRCDIR=src ROOTNAME=bash usage() { echo usage: mkdist [-m manifest] [-s srcdir] [-r rootname] [-v] version 1>&2 exit 2 } vmsg() { if [ -n "$verbose" ]; then echo mkdist: "$@" fi } while getopts m:s:r:v name do case $name in m) MANIFEST=$OPTARG ;; s) SRCDIR=$OPTARG ;; r) ROOTNAME=$OPTARG ;; v) verbose=yes ;; ?) usage ;; esac done : ${MANIFEST:=$SRCDIR/MANIFEST} vmsg using $MANIFEST shift $(( $OPTIND - 1 )) if [ $# -lt 1 ]; then usage fi version=$1 newdir=${ROOTNAME}-$version vmsg creating distribution for $ROOTNAME version $version in $newdir if [ ! -d $newdir ]; then mkdir $newdir || { echo $0: cannot make directory $newdir 1>&2 ; exit 1; } fi dirmode=755 filmode=644 while read fname type mode do [ -z "$fname" ] && continue case "$fname" in \#*) continue ;; esac case "$type" in d) mkdir $newdir/$fname ;; f) cp -p $SRCDIR/$fname $newdir/$fname ;; s) ln -s $mode $newdir/$fname ; mode= ;; # symlink l) ln $mode $newdir/$fname ; mode= ;; # hard link *) echo "unknown file type $type" 1>&2 ;; esac if [ -n "$mode" ]; then chmod $mode $newdir/$fname fi done < $MANIFEST # cut off the `-alpha' in something like `2.0-alpha', leaving just the # numeric version #version=${version%%-*} #case "$version" in #*.*.*) vers=${version%.*} ;; #*.*) vers=${version} ;; #esac #echo $vers > $newdir/.distribution #case "$version" in #*.*.*) plevel=${version##*.} ;; #*) plevel=0 ;; #esac #[ -z "$plevel" ] && plevel=0 #echo ${plevel} > $newdir/.patchlevel vmsg $newdir created exit 0 gdb-doc-7.6.2/readline/support/install.sh0000755000175000017500000001234312250770610017372 0ustar zumbizumbi#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5. # # $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # This script is compatible with the BSD install script, but was written # from scratch. # # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" tranformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 gdb-doc-7.6.2/readline/support/config.rpath0000755000175000017500000003511212250770610017674 0ustar zumbizumbi#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2003 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # 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 3 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, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | pw32* | os2*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux*) case $CC in icc|ecc) wl='-Wl,' ;; ccc) wl='-Wl,' ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; sco3.2v5*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) wl='-Wl,' ;; sysv4*MP*) ;; uts4*) ;; esac fi # Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then case "$host_os" in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris* | sysv5*) if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = yes; then # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi4*) ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then hardcode_direct=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10* | hpux11*) if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=no ;; ia64*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; *) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4.2uw2*) hardcode_direct=yes hardcode_minus_L=no ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) ;; sysv5*) hardcode_libdir_flag_spec= ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. libname_spec='lib$name' case "$host_os" in aix3*) ;; aix4* | aix5*) ;; amigaos*) ;; beos*) ;; bsdi4*) ;; cygwin* | mingw* | pw32*) shrext=.dll ;; darwin* | rhapsody*) shrext=.dylib ;; dgux*) ;; freebsd1*) ;; freebsd*) ;; gnu*) ;; hpux9* | hpux10* | hpux11*) case "$host_cpu" in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac ;; irix5* | irix6* | nonstopux*) case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux*) ;; netbsd*) ;; newsos6) ;; nto-qnx) ;; openbsd*) ;; os2*) libname_spec='$name' shrext=.dll ;; osf3* | osf4* | osf5*) ;; sco3.2v5*) ;; solaris*) ;; sunos4*) ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ;; sysv4*MP*) ;; uts4*) ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: gdb-doc-7.6.2/MAINTAINERS0000644000175000017500000000723312250770606013572 0ustar zumbizumbiPlease feel free to add, edit, delete this file. Please do not make ChangeLog entries. COPYING, COPYING.LIB, README http://gnu.org. Makefile.*; configure; configure.ac; src-release Any global maintainer can approve changes to these files, but they should be aware that they need to be kept in sync with their counterparts in the GCC repository. Also please notify the following of any committed patches: binutils@sourceware.org gdb-patches@sourceware.org bfd/; binutils/; elfcpp/; gas/; gold/; gprof/; ld/; opcodes/; cpu/; BFD's part of include/ binutils: http://sourceware.org/binutils/ Patches to binutils@sourceware.org. Please notify the following of any interface changes: gdb-patches@sourceware.org cgen/; cgen parts of opcodes/, sim/ & include/ cgen: http://sourceware.org/cgen/ Patches to cgen@sourceware.org May need separate opcodes/ or sim/ approval for commits of regenerated files there. config.guess; config.sub; readline/support/config.{sub,guess} config: http://savannah.gnu.org/projects/config Patches to config-patches@gnu.org. Changes need to be done in tandem with the official CONFIG sources or submitted to the master file maintainer and brought in via a merge. When updating any of these files, please be sure to update all of them. Please notify the following of any committed patches: binutils@sourceware.org gdb-patches@sourceware.org depcomp; mkinstalldirs Send bug reports and patches to bug-automake@gnu.org. gdb/; readline/; sim/; GDB's part of include/ GDB: http://www.gnu.org/software/gdb/ Patches to gdb-patches@sourceware.org. See also gdb/MAINTAINERS and sim/MAINTAINERS. include/ See binutils/, gdb/, sid/, gcc/, libiberty/ etc. intl/; config.rhost; libiberty/; libiberty's part of include/; compile; depcomp; install-sh; missing; ylwrap; config/ gcc: http://gcc.gnu.org Changes need to be done in tandem with the official GCC sources or submitted to the master file maintainer and brought in via a merge. Note: approved patches in gcc's libiberty or intl are automatically approved in this libiberty and intl also; feel free to merge them yourself if needed sooner than the next merge. Otherwise, changes are automatically merged, usually within a day. libdecnumber/ See libiberty. The master copy of this directory is in the GCC repository. ltconfig; ltmain.sh; ltcf-*.sh libtool: http://www.gnu.org/software/libtool/ Changes need to be done in tandem with the official LIBTOOL sources or submitted to the master file maintainer and brought in via a merge. move-if-change Send bug reports and patches to bug-gnulib@gnu.org. symlink-tree gcc: http://gcc.gnu.org See libiberty. newlib/; libgloss/ http://sourceware.org/newlib/ Patches to newlib@sourceware.org. sid/; SID's part of cgen/ sid: http://sourceware.org/sid/ Patches to sid@sourceware.org texinfo/texinfo.tex texinfo: http://ftp.gnu.org. Latest version can be found on ftp://ftp.gnu.org and can be imported at any (reasonable) time. Please not use GCC's texinfo. Please do not import texinfo. tcl/; tix/; itcl/; tk/; libgui/ insight: http://sourceware.org/insight/ Contact insight@sourceware.org. winsup/ cygwin: http://sourceware.org/cygwin Patches to cygwin-patches@cygwin.com. General discussion cygwin@cygwin.com. config-ml.in; makefile.vms; mkdep; setup.com; etc/; utils/; Any global maintainer can approve changes to these files and directories. modules file If you understand the file format (or can cut-and-paste existing entries), modify it. If it scares you, get someone who does understand it to help you. Be prepared to fix it if you do break it. /* Local variables: */ /* change-log-default-name: "/dev/null" */ /* End: */
    ' . &t2h_anchor('', $href, $entry) . '  ' . $descr . "
    ' . $entry . '' . $descr . "